finso-vue-components 0.4.16 → 0.4.18
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.
|
@@ -44,15 +44,15 @@ type __VLS_PublicProps = __VLS_Props & {
|
|
|
44
44
|
declare var __VLS_6: `item.${string}`, __VLS_7: {
|
|
45
45
|
item: any;
|
|
46
46
|
value: any;
|
|
47
|
-
},
|
|
47
|
+
}, __VLS_33: {
|
|
48
48
|
item: any;
|
|
49
|
-
},
|
|
49
|
+
}, __VLS_52: string | number, __VLS_53: any;
|
|
50
50
|
type __VLS_Slots = {} & {
|
|
51
51
|
[K in NonNullable<typeof __VLS_6>]?: (props: typeof __VLS_7) => any;
|
|
52
52
|
} & {
|
|
53
|
-
[K in NonNullable<typeof
|
|
53
|
+
[K in NonNullable<typeof __VLS_52>]?: (props: typeof __VLS_53) => any;
|
|
54
54
|
} & {
|
|
55
|
-
'item.actions'?: (props: typeof
|
|
55
|
+
'item.actions'?: (props: typeof __VLS_33) => any;
|
|
56
56
|
};
|
|
57
57
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
58
58
|
"show-record": (item: any) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.f-data-table__logo[data-v-
|
|
1
|
+
.f-data-table__logo[data-v-5832fd4e]{object-fit:contain}.f-data-table__actions[data-v-5832fd4e]{display:flex;gap:4px;align-items:center;min-width:80px}[data-v-7639bf96] .v-time-picker{min-height:540px}[data-v-f2792853] .v-picker-title{display:none}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as x, resolveComponent as
|
|
2
|
-
import { VTextField as
|
|
3
|
-
import { vMaska as
|
|
4
|
-
import { useField as
|
|
1
|
+
import { defineComponent as x, resolveComponent as g, openBlock as m, createBlock as V, computed as $, withDirectives as ie, unref as b, mergeProps as B, isRef as R, createSlots as Y, renderList as X, withCtx as p, renderSlot as P, normalizeProps as K, guardReactiveProps as L, useModel as j, ref as T, createElementBlock as A, resolveDynamicComponent as de, toHandlers as ue, toDisplayString as M, createTextVNode as U, createCommentVNode as O, createElementVNode as z, withModifiers as Z, createVNode as k, mergeModels as E, watch as ce, onMounted as me } from "vue";
|
|
2
|
+
import { VTextField as ee, VTextarea as fe, VAutocomplete as pe, VCheckbox as ve, VSelect as ye, VNumberInput as ge, VSwitch as be } from "vuetify/components";
|
|
3
|
+
import { vMaska as he } from "maska/vue";
|
|
4
|
+
import { useField as N } from "vee-validate";
|
|
5
5
|
const W = /* @__PURE__ */ x({
|
|
6
6
|
__name: "FButton",
|
|
7
7
|
props: {
|
|
@@ -11,14 +11,14 @@ const W = /* @__PURE__ */ x({
|
|
|
11
11
|
setup(t) {
|
|
12
12
|
const e = t;
|
|
13
13
|
return (o, n) => {
|
|
14
|
-
const l =
|
|
15
|
-
return
|
|
14
|
+
const l = g("v-btn");
|
|
15
|
+
return m(), V(l, {
|
|
16
16
|
color: e.color,
|
|
17
17
|
rounded: e.rounded
|
|
18
18
|
}, null, 8, ["color", "rounded"]);
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
}),
|
|
21
|
+
}), Ve = /* @__PURE__ */ x({
|
|
22
22
|
name: "FTextField",
|
|
23
23
|
inheritAttrs: !1,
|
|
24
24
|
__name: "FTextField",
|
|
@@ -37,13 +37,13 @@ const W = /* @__PURE__ */ x({
|
|
|
37
37
|
},
|
|
38
38
|
emits: ["clickAppendInner"],
|
|
39
39
|
setup(t) {
|
|
40
|
-
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } =
|
|
40
|
+
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } = N(() => e.name, o, {
|
|
41
41
|
initialValue: e.modelValue,
|
|
42
42
|
syncVModel: !0
|
|
43
43
|
});
|
|
44
|
-
return (
|
|
45
|
-
modelValue:
|
|
46
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
44
|
+
return (i, a) => ie((m(), V(b(ee), B(i.$attrs, {
|
|
45
|
+
modelValue: b(l),
|
|
46
|
+
"onUpdate:modelValue": a[0] || (a[0] = (c) => R(l) ? l.value = c : null),
|
|
47
47
|
name: e.name,
|
|
48
48
|
color: e.color,
|
|
49
49
|
density: e.density,
|
|
@@ -51,25 +51,31 @@ const W = /* @__PURE__ */ x({
|
|
|
51
51
|
variant: e.variant,
|
|
52
52
|
clearable: e.clearable,
|
|
53
53
|
"hide-details": e.hideDetails,
|
|
54
|
-
"error-messages":
|
|
54
|
+
"error-messages": b(n),
|
|
55
55
|
"append-inner-icon": e.appendInnerIcon,
|
|
56
|
-
"onClick:appendInner": a[1] || (a[1] = (
|
|
57
|
-
}),
|
|
58
|
-
|
|
59
|
-
name:
|
|
60
|
-
fn:
|
|
61
|
-
|
|
56
|
+
"onClick:appendInner": a[1] || (a[1] = (c) => i.$emit("clickAppendInner"))
|
|
57
|
+
}), Y({ _: 2 }, [
|
|
58
|
+
X(i.$slots, (c, f) => ({
|
|
59
|
+
name: f,
|
|
60
|
+
fn: p((u) => [
|
|
61
|
+
P(i.$slots, f, K(L(u ?? {})))
|
|
62
62
|
])
|
|
63
63
|
}))
|
|
64
64
|
]), 1040, ["modelValue", "name", "color", "density", "rounded", "variant", "clearable", "hide-details", "error-messages", "append-inner-icon"])), [
|
|
65
|
-
[
|
|
65
|
+
[b(he), e.mask]
|
|
66
66
|
]);
|
|
67
67
|
}
|
|
68
|
-
}),
|
|
68
|
+
}), _e = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "text-white text-caption d-flex justify-center align-center fill-height"
|
|
71
|
+
}, ke = {
|
|
72
|
+
key: 1,
|
|
73
|
+
class: "text-white text-caption d-flex justify-center align-center fill-height"
|
|
74
|
+
}, Fe = { key: 1 }, De = { key: 4 }, $e = { class: "f-data-table__actions" }, xe = { class: "text-h6" }, we = /* @__PURE__ */ x({
|
|
69
75
|
name: "FDataTable",
|
|
70
76
|
inheritAttrs: !1,
|
|
71
77
|
__name: "FDataTable",
|
|
72
|
-
props: /* @__PURE__ */
|
|
78
|
+
props: /* @__PURE__ */ E({
|
|
73
79
|
headers: {},
|
|
74
80
|
items: {},
|
|
75
81
|
loading: { type: Boolean, default: !1 },
|
|
@@ -103,49 +109,55 @@ const W = /* @__PURE__ */ x({
|
|
|
103
109
|
sortBy: { default: () => [] },
|
|
104
110
|
sortByModifiers: {}
|
|
105
111
|
}),
|
|
106
|
-
emits: /* @__PURE__ */
|
|
112
|
+
emits: /* @__PURE__ */ E(["show-record", "delete-record"], ["update:page", "update:itemsPerPage", "update:sortBy"]),
|
|
107
113
|
setup(t, { emit: e }) {
|
|
108
|
-
const o = t, n = e, l =
|
|
109
|
-
function u(
|
|
110
|
-
return
|
|
114
|
+
const o = t, n = e, l = j(t, "page"), i = j(t, "itemsPerPage"), a = j(t, "sortBy"), c = T(!1), f = T(null);
|
|
115
|
+
function u(v, y) {
|
|
116
|
+
return y.split(".").reduce((C, I) => C == null ? void 0 : C[I], v);
|
|
111
117
|
}
|
|
112
|
-
function d(
|
|
113
|
-
return
|
|
118
|
+
function d(v) {
|
|
119
|
+
return v == null ? "" : new Intl.NumberFormat(o.moneyLocale, {
|
|
114
120
|
style: "currency",
|
|
115
121
|
currency: o.moneyCurrency
|
|
116
|
-
}).format(
|
|
122
|
+
}).format(v);
|
|
117
123
|
}
|
|
118
|
-
function r(
|
|
119
|
-
if (!
|
|
120
|
-
const
|
|
121
|
-
return
|
|
124
|
+
function r(v) {
|
|
125
|
+
if (!v) return "";
|
|
126
|
+
const y = v.replace(/\D/g, "");
|
|
127
|
+
return y.length < 10 ? v : `(${y.substring(0, 3)}) ${y.substring(3, 6)} ${y.substring(6, 10)}`;
|
|
122
128
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
+
function w(v, y) {
|
|
130
|
+
return y.split(",").map((C) => {
|
|
131
|
+
const I = u(v, C.trim());
|
|
132
|
+
return typeof I == "string" ? I.charAt(0).toUpperCase() : "";
|
|
133
|
+
}).join("");
|
|
134
|
+
}
|
|
135
|
+
const _ = $(() => {
|
|
136
|
+
const C = o.items.length === 0 ? 108 : o.items.length * 52 + 56;
|
|
137
|
+
return Math.min(C, o.maxHeight);
|
|
138
|
+
}), D = $(() => !o.canEditRecord && !o.canReadRecord ? {} : {
|
|
139
|
+
"click:row": (v, { item: y }) => {
|
|
140
|
+
n("show-record", y);
|
|
129
141
|
}
|
|
130
|
-
}),
|
|
131
|
-
() => o.headers.filter((
|
|
132
|
-
),
|
|
133
|
-
function
|
|
134
|
-
o.showDeleteConfirm ? (
|
|
142
|
+
}), h = $(
|
|
143
|
+
() => o.headers.filter((v) => v.type && v.key !== "actions")
|
|
144
|
+
), G = $(() => o.headers.some((v) => v.key === "actions"));
|
|
145
|
+
function S(v) {
|
|
146
|
+
o.showDeleteConfirm ? (f.value = v, c.value = !0) : n("delete-record", v);
|
|
135
147
|
}
|
|
136
|
-
function
|
|
137
|
-
n("delete-record",
|
|
148
|
+
function H() {
|
|
149
|
+
n("delete-record", f.value), c.value = !1, f.value = null;
|
|
138
150
|
}
|
|
139
|
-
return (
|
|
140
|
-
const
|
|
141
|
-
return
|
|
142
|
-
(
|
|
151
|
+
return (v, y) => {
|
|
152
|
+
const C = g("v-icon"), I = g("v-img"), te = g("v-avatar"), le = g("v-chip"), J = g("v-btn"), ae = g("v-card-text"), ne = g("v-spacer"), Q = g("f-button"), oe = g("v-card-actions"), re = g("f-dialog");
|
|
153
|
+
return m(), A("div", null, [
|
|
154
|
+
(m(), V(de(t.serverSide ? "v-data-table-server" : "v-data-table"), B(v.$attrs, {
|
|
143
155
|
page: l.value,
|
|
144
|
-
"onUpdate:page":
|
|
145
|
-
"items-per-page":
|
|
146
|
-
"onUpdate:itemsPerPage":
|
|
156
|
+
"onUpdate:page": y[0] || (y[0] = (s) => l.value = s),
|
|
157
|
+
"items-per-page": i.value,
|
|
158
|
+
"onUpdate:itemsPerPage": y[1] || (y[1] = (s) => i.value = s),
|
|
147
159
|
"sort-by": a.value,
|
|
148
|
-
"onUpdate:sortBy":
|
|
160
|
+
"onUpdate:sortBy": y[2] || (y[2] = (s) => a.value = s),
|
|
149
161
|
class: "rounded-b-lg",
|
|
150
162
|
headers: t.headers,
|
|
151
163
|
items: t.items,
|
|
@@ -153,114 +165,136 @@ const W = /* @__PURE__ */ x({
|
|
|
153
165
|
loading: t.loading,
|
|
154
166
|
hover: t.hover,
|
|
155
167
|
density: t.density,
|
|
156
|
-
height:
|
|
168
|
+
height: _.value,
|
|
157
169
|
"show-select": t.showSelect,
|
|
158
170
|
"items-per-page-text": t.labelItemsPerPage,
|
|
159
171
|
"no-data-text": t.labelNoData
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
name: `item.${
|
|
163
|
-
fn:
|
|
164
|
-
|
|
165
|
-
item:
|
|
166
|
-
value: u(
|
|
172
|
+
}, ue(D.value)), Y({ _: 2 }, [
|
|
173
|
+
X(h.value, (s) => ({
|
|
174
|
+
name: `item.${s.key}`,
|
|
175
|
+
fn: p(({ item: F }) => [
|
|
176
|
+
P(v.$slots, `item.${s.key}`, {
|
|
177
|
+
item: F,
|
|
178
|
+
value: u(F, s.key)
|
|
167
179
|
}, () => [
|
|
168
|
-
|
|
180
|
+
s.type === "image" ? (m(), V(te, {
|
|
169
181
|
key: 0,
|
|
170
182
|
rounded: "lg",
|
|
171
183
|
variant: "elevated",
|
|
172
|
-
|
|
184
|
+
border: ""
|
|
173
185
|
}, {
|
|
174
|
-
default:
|
|
175
|
-
F(
|
|
176
|
-
|
|
186
|
+
default: p(() => [
|
|
187
|
+
u(F, s.key) ? (m(), V(I, {
|
|
188
|
+
key: 0,
|
|
189
|
+
src: u(F, s.key),
|
|
177
190
|
class: "f-data-table__logo"
|
|
178
|
-
},
|
|
191
|
+
}, {
|
|
192
|
+
error: p(() => [
|
|
193
|
+
s.imageInitialsKey ? (m(), A("span", _e, M(w(F, s.imageInitialsKey)), 1)) : (m(), V(C, {
|
|
194
|
+
key: 1,
|
|
195
|
+
color: "white"
|
|
196
|
+
}, {
|
|
197
|
+
default: p(() => [...y[5] || (y[5] = [
|
|
198
|
+
U("mdi-account", -1)
|
|
199
|
+
])]),
|
|
200
|
+
_: 1
|
|
201
|
+
}))
|
|
202
|
+
]),
|
|
203
|
+
_: 2
|
|
204
|
+
}, 1032, ["src"])) : s.imageInitialsKey ? (m(), A("span", ke, M(w(F, s.imageInitialsKey)), 1)) : (m(), V(C, {
|
|
205
|
+
key: 2,
|
|
206
|
+
color: "white"
|
|
207
|
+
}, {
|
|
208
|
+
default: p(() => [...y[6] || (y[6] = [
|
|
209
|
+
U("mdi-account", -1)
|
|
210
|
+
])]),
|
|
211
|
+
_: 1
|
|
212
|
+
}))
|
|
179
213
|
]),
|
|
180
214
|
_: 2
|
|
181
|
-
}, 1024)) :
|
|
215
|
+
}, 1024)) : s.type === "money" ? (m(), A("span", Fe, M(d(u(F, s.key))), 1)) : s.type === "status" ? (m(), V(le, {
|
|
182
216
|
key: 2,
|
|
183
|
-
color: u(
|
|
217
|
+
color: u(F, s.key) ? "green-darken-1" : "red-darken-2",
|
|
184
218
|
size: "small"
|
|
185
219
|
}, {
|
|
186
|
-
default:
|
|
187
|
-
|
|
220
|
+
default: p(() => [
|
|
221
|
+
U(M(u(F, s.key) ? t.labelActive : t.labelPassive), 1)
|
|
188
222
|
]),
|
|
189
223
|
_: 2
|
|
190
|
-
}, 1032, ["color"])) :
|
|
224
|
+
}, 1032, ["color"])) : s.type === "boolean" ? (m(), V(C, {
|
|
191
225
|
key: 3,
|
|
192
|
-
color: u(
|
|
226
|
+
color: u(F, s.key) ? "green-darken-1" : "red-darken-2"
|
|
193
227
|
}, {
|
|
194
|
-
default:
|
|
195
|
-
|
|
228
|
+
default: p(() => [
|
|
229
|
+
U(M(u(F, s.key) ? "mdi-check" : "mdi-close"), 1)
|
|
196
230
|
]),
|
|
197
231
|
_: 2
|
|
198
|
-
}, 1032, ["color"])) :
|
|
232
|
+
}, 1032, ["color"])) : s.type === "gsmNo" ? (m(), A("span", De, M(r(u(F, s.key))), 1)) : O("", !0)
|
|
199
233
|
], !0)
|
|
200
234
|
])
|
|
201
235
|
})),
|
|
202
|
-
|
|
236
|
+
G.value ? {
|
|
203
237
|
name: "item.actions",
|
|
204
|
-
fn:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
t.canEditRecord || t.canReadRecord ? (
|
|
238
|
+
fn: p(({ item: s }) => [
|
|
239
|
+
P(v.$slots, "item.actions", { item: s }, () => [
|
|
240
|
+
z("div", $e, [
|
|
241
|
+
t.canEditRecord || t.canReadRecord ? (m(), V(J, {
|
|
208
242
|
key: 0,
|
|
209
243
|
color: "primary",
|
|
210
244
|
icon: "mdi-pencil-outline",
|
|
211
245
|
variant: "text",
|
|
212
246
|
size: "small",
|
|
213
|
-
onClick:
|
|
214
|
-
}, null, 8, ["onClick"])) :
|
|
215
|
-
t.canDeleteRecord ? (
|
|
247
|
+
onClick: Z((F) => n("show-record", s), ["stop"])
|
|
248
|
+
}, null, 8, ["onClick"])) : O("", !0),
|
|
249
|
+
t.canDeleteRecord ? (m(), V(J, {
|
|
216
250
|
key: 1,
|
|
217
251
|
icon: "mdi-trash-can-outline",
|
|
218
252
|
variant: "text",
|
|
219
253
|
size: "small",
|
|
220
254
|
color: "red-darken-2",
|
|
221
|
-
onClick:
|
|
222
|
-
}, null, 8, ["onClick"])) :
|
|
255
|
+
onClick: Z((F) => S(s), ["stop"])
|
|
256
|
+
}, null, 8, ["onClick"])) : O("", !0)
|
|
223
257
|
])
|
|
224
258
|
], !0)
|
|
225
259
|
]),
|
|
226
260
|
key: "0"
|
|
227
261
|
} : void 0,
|
|
228
|
-
|
|
229
|
-
name:
|
|
230
|
-
fn:
|
|
231
|
-
|
|
262
|
+
X(v.$slots, (s, F) => ({
|
|
263
|
+
name: F,
|
|
264
|
+
fn: p((se) => [
|
|
265
|
+
P(v.$slots, F, K(L(se ?? {})), void 0, !0)
|
|
232
266
|
])
|
|
233
267
|
}))
|
|
234
268
|
]), 1040, ["page", "items-per-page", "sort-by", "headers", "items", "items-length", "loading", "hover", "density", "height", "show-select", "items-per-page-text", "no-data-text"])),
|
|
235
|
-
|
|
236
|
-
modelValue:
|
|
237
|
-
"onUpdate:modelValue":
|
|
269
|
+
k(re, {
|
|
270
|
+
modelValue: c.value,
|
|
271
|
+
"onUpdate:modelValue": y[4] || (y[4] = (s) => c.value = s),
|
|
238
272
|
"max-width": "400",
|
|
239
273
|
"hide-close": !0
|
|
240
274
|
}, {
|
|
241
|
-
header:
|
|
242
|
-
|
|
275
|
+
header: p(() => [
|
|
276
|
+
z("div", xe, M(t.labelDeleteTitle), 1)
|
|
243
277
|
]),
|
|
244
|
-
default:
|
|
245
|
-
|
|
246
|
-
default:
|
|
247
|
-
|
|
278
|
+
default: p(() => [
|
|
279
|
+
k(ae, null, {
|
|
280
|
+
default: p(() => [
|
|
281
|
+
U(M(t.deleteMessageFormatter && f.value ? t.deleteMessageFormatter(f.value) : t.labelDeleteMessage), 1)
|
|
248
282
|
]),
|
|
249
283
|
_: 1
|
|
250
284
|
}),
|
|
251
|
-
|
|
252
|
-
default:
|
|
253
|
-
|
|
254
|
-
|
|
285
|
+
k(oe, null, {
|
|
286
|
+
default: p(() => [
|
|
287
|
+
k(ne),
|
|
288
|
+
k(Q, {
|
|
255
289
|
variant: "plain",
|
|
256
290
|
color: "red-darken-2",
|
|
257
291
|
text: t.labelDeleteCancel,
|
|
258
|
-
onClick:
|
|
292
|
+
onClick: y[3] || (y[3] = (s) => c.value = !1)
|
|
259
293
|
}, null, 8, ["text"]),
|
|
260
|
-
|
|
294
|
+
k(Q, {
|
|
261
295
|
variant: "tonal",
|
|
262
296
|
text: t.labelDeleteConfirm,
|
|
263
|
-
onClick:
|
|
297
|
+
onClick: H
|
|
264
298
|
}, null, 8, ["text"])
|
|
265
299
|
]),
|
|
266
300
|
_: 1
|
|
@@ -276,9 +310,9 @@ const W = /* @__PURE__ */ x({
|
|
|
276
310
|
for (const [n, l] of e)
|
|
277
311
|
o[n] = l;
|
|
278
312
|
return o;
|
|
279
|
-
},
|
|
280
|
-
var
|
|
281
|
-
const
|
|
313
|
+
}, Be = /* @__PURE__ */ q(we, [["__scopeId", "data-v-5832fd4e"]]);
|
|
314
|
+
var Ce = /* @__PURE__ */ ((t) => (t.IMAGE = "image", t.MONEY = "money", t.STATUS = "status", t.BOOLEAN = "boolean", t.GSM_NO = "gsmNo", t))(Ce || {});
|
|
315
|
+
const Me = /* @__PURE__ */ x({
|
|
282
316
|
name: "FTextarea",
|
|
283
317
|
inheritAttrs: !1,
|
|
284
318
|
__name: "FTextarea",
|
|
@@ -296,13 +330,13 @@ const we = /* @__PURE__ */ x({
|
|
|
296
330
|
rules: { type: [String, Function], default: "" }
|
|
297
331
|
},
|
|
298
332
|
setup(t) {
|
|
299
|
-
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } =
|
|
333
|
+
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } = N(() => e.name, o, {
|
|
300
334
|
initialValue: e.modelValue,
|
|
301
335
|
syncVModel: !0
|
|
302
336
|
});
|
|
303
|
-
return (
|
|
304
|
-
modelValue:
|
|
305
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
337
|
+
return (i, a) => (m(), V(b(fe), B(i.$attrs, {
|
|
338
|
+
modelValue: b(l),
|
|
339
|
+
"onUpdate:modelValue": a[0] || (a[0] = (c) => R(l) ? l.value = c : null),
|
|
306
340
|
name: e.name,
|
|
307
341
|
rounded: e.rounded,
|
|
308
342
|
variant: e.variant,
|
|
@@ -312,10 +346,10 @@ const we = /* @__PURE__ */ x({
|
|
|
312
346
|
label: e.label,
|
|
313
347
|
"hide-details": e.hideDetails,
|
|
314
348
|
"no-resize": e.noResize,
|
|
315
|
-
"error-messages":
|
|
349
|
+
"error-messages": b(n)
|
|
316
350
|
}), null, 16, ["modelValue", "name", "rounded", "variant", "rows", "density", "color", "label", "hide-details", "no-resize", "error-messages"]));
|
|
317
351
|
}
|
|
318
|
-
}),
|
|
352
|
+
}), Se = /* @__PURE__ */ x({
|
|
319
353
|
name: "FAutocomplete",
|
|
320
354
|
inheritAttrs: !1,
|
|
321
355
|
__name: "FAutocomplete",
|
|
@@ -335,18 +369,18 @@ const we = /* @__PURE__ */ x({
|
|
|
335
369
|
},
|
|
336
370
|
emits: ["change"],
|
|
337
371
|
setup(t, { emit: e }) {
|
|
338
|
-
const o = e, n = t, l = $(() => n.rules), { errorMessage:
|
|
372
|
+
const o = e, n = t, l = $(() => n.rules), { errorMessage: i, value: a } = N(() => n.name, l, {
|
|
339
373
|
initialValue: n.modelValue,
|
|
340
374
|
syncVModel: !0
|
|
341
375
|
});
|
|
342
|
-
function
|
|
343
|
-
o("change",
|
|
376
|
+
function c(f) {
|
|
377
|
+
o("change", f);
|
|
344
378
|
}
|
|
345
|
-
return (
|
|
346
|
-
modelValue:
|
|
379
|
+
return (f, u) => (m(), V(b(pe), B(f.$attrs, {
|
|
380
|
+
modelValue: b(a),
|
|
347
381
|
"onUpdate:modelValue": [
|
|
348
|
-
u[0] || (u[0] = (d) =>
|
|
349
|
-
u[1] || (u[1] = (d) =>
|
|
382
|
+
u[0] || (u[0] = (d) => R(a) ? a.value = d : null),
|
|
383
|
+
u[1] || (u[1] = (d) => c(b(a)))
|
|
350
384
|
],
|
|
351
385
|
name: n.name,
|
|
352
386
|
items: n.items,
|
|
@@ -358,18 +392,18 @@ const we = /* @__PURE__ */ x({
|
|
|
358
392
|
"hide-details": n.hideDetails,
|
|
359
393
|
"return-object": n.returnObject,
|
|
360
394
|
"no-data-text": n.noDataText,
|
|
361
|
-
"error-messages":
|
|
395
|
+
"error-messages": b(i),
|
|
362
396
|
"menu-props": { maxWidth: 0 }
|
|
363
|
-
}),
|
|
364
|
-
|
|
397
|
+
}), Y({ _: 2 }, [
|
|
398
|
+
X(f.$slots, (d, r) => ({
|
|
365
399
|
name: r,
|
|
366
|
-
fn:
|
|
367
|
-
|
|
400
|
+
fn: p((w) => [
|
|
401
|
+
P(f.$slots, r, K(L(w ?? {})))
|
|
368
402
|
])
|
|
369
403
|
}))
|
|
370
404
|
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "clearable", "hide-details", "return-object", "no-data-text", "error-messages"]));
|
|
371
405
|
}
|
|
372
|
-
}),
|
|
406
|
+
}), Pe = /* @__PURE__ */ x({
|
|
373
407
|
name: "FCheckbox",
|
|
374
408
|
inheritAttrs: !1,
|
|
375
409
|
__name: "FCheckbox",
|
|
@@ -381,14 +415,14 @@ const we = /* @__PURE__ */ x({
|
|
|
381
415
|
},
|
|
382
416
|
setup(t) {
|
|
383
417
|
const e = t;
|
|
384
|
-
return (o, n) => (
|
|
418
|
+
return (o, n) => (m(), V(b(ve), B(o.$attrs, {
|
|
385
419
|
color: e.color,
|
|
386
420
|
"hide-details": e.hideDetails,
|
|
387
421
|
indeterminate: e.indeterminate,
|
|
388
422
|
density: e.density
|
|
389
423
|
}), null, 16, ["color", "hide-details", "indeterminate", "density"]));
|
|
390
424
|
}
|
|
391
|
-
}),
|
|
425
|
+
}), Te = /* @__PURE__ */ x({
|
|
392
426
|
name: "FCurrencyField",
|
|
393
427
|
inheritAttrs: !1,
|
|
394
428
|
__name: "FCurrencyField",
|
|
@@ -408,40 +442,40 @@ const we = /* @__PURE__ */ x({
|
|
|
408
442
|
rules: { type: [String, Function], default: "" }
|
|
409
443
|
},
|
|
410
444
|
setup(t) {
|
|
411
|
-
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } =
|
|
445
|
+
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } = N(() => e.name, o, {
|
|
412
446
|
initialValue: e.modelValue,
|
|
413
447
|
syncVModel: !0
|
|
414
|
-
}),
|
|
448
|
+
}), i = $(
|
|
415
449
|
() => new Intl.NumberFormat(e.locale, {
|
|
416
450
|
style: "currency",
|
|
417
451
|
currency: e.currency,
|
|
418
452
|
minimumFractionDigits: e.precision,
|
|
419
453
|
maximumFractionDigits: e.precision
|
|
420
454
|
})
|
|
421
|
-
), a =
|
|
422
|
-
function
|
|
423
|
-
return
|
|
455
|
+
), a = T(c(e.modelValue));
|
|
456
|
+
function c(_) {
|
|
457
|
+
return _ == null || isNaN(_) ? "" : i.value.format(_);
|
|
424
458
|
}
|
|
425
|
-
function
|
|
426
|
-
const
|
|
427
|
-
return isNaN(
|
|
459
|
+
function f(_) {
|
|
460
|
+
const D = _.replace(/[^\d,.-]/g, "").replace(/\./g, "").replace(",", "."), h = parseFloat(D);
|
|
461
|
+
return isNaN(h) ? null : Math.round(h * Math.pow(10, e.precision)) / Math.pow(10, e.precision);
|
|
428
462
|
}
|
|
429
|
-
const u =
|
|
430
|
-
function d(
|
|
431
|
-
const
|
|
432
|
-
a.value =
|
|
463
|
+
const u = T(!1);
|
|
464
|
+
function d(_) {
|
|
465
|
+
const D = _.target;
|
|
466
|
+
a.value = D.value, l.value = f(D.value);
|
|
433
467
|
}
|
|
434
468
|
function r() {
|
|
435
|
-
u.value = !1, a.value =
|
|
469
|
+
u.value = !1, a.value = c(l.value);
|
|
436
470
|
}
|
|
437
|
-
function
|
|
471
|
+
function w(_) {
|
|
438
472
|
u.value = !0;
|
|
439
|
-
const
|
|
440
|
-
|
|
473
|
+
const D = _.target, h = l.value;
|
|
474
|
+
h != null ? a.value = h.toFixed(e.precision).replace(".", ",") : a.value = "", setTimeout(() => D.select(), 0);
|
|
441
475
|
}
|
|
442
|
-
return
|
|
443
|
-
l.value =
|
|
444
|
-
}), (
|
|
476
|
+
return ce(() => e.modelValue, (_) => {
|
|
477
|
+
l.value = _, u.value || (a.value = c(_));
|
|
478
|
+
}), (_, D) => (m(), V(b(ee), B(_.$attrs, {
|
|
445
479
|
"model-value": a.value,
|
|
446
480
|
name: e.name,
|
|
447
481
|
label: e.label,
|
|
@@ -451,14 +485,14 @@ const we = /* @__PURE__ */ x({
|
|
|
451
485
|
variant: e.variant,
|
|
452
486
|
density: e.density,
|
|
453
487
|
color: e.color,
|
|
454
|
-
"error-messages":
|
|
488
|
+
"error-messages": b(n),
|
|
455
489
|
inputmode: "decimal",
|
|
456
490
|
onInput: d,
|
|
457
491
|
onBlur: r,
|
|
458
|
-
onFocus:
|
|
492
|
+
onFocus: w
|
|
459
493
|
}), null, 16, ["model-value", "name", "label", "readonly", "hide-details", "rounded", "variant", "density", "color", "error-messages"]));
|
|
460
494
|
}
|
|
461
|
-
}),
|
|
495
|
+
}), Ne = /* @__PURE__ */ x({
|
|
462
496
|
name: "FSelect",
|
|
463
497
|
inheritAttrs: !1,
|
|
464
498
|
__name: "FSelect",
|
|
@@ -475,13 +509,13 @@ const we = /* @__PURE__ */ x({
|
|
|
475
509
|
rules: { type: [String, Function], default: "" }
|
|
476
510
|
},
|
|
477
511
|
setup(t) {
|
|
478
|
-
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } =
|
|
512
|
+
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } = N(() => e.name, o, {
|
|
479
513
|
initialValue: e.modelValue,
|
|
480
514
|
syncVModel: !0
|
|
481
515
|
});
|
|
482
|
-
return (
|
|
483
|
-
modelValue:
|
|
484
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
516
|
+
return (i, a) => (m(), V(b(ye), B(i.$attrs, {
|
|
517
|
+
modelValue: b(l),
|
|
518
|
+
"onUpdate:modelValue": a[0] || (a[0] = (c) => R(l) ? l.value = c : null),
|
|
485
519
|
name: e.name,
|
|
486
520
|
items: e.items,
|
|
487
521
|
rounded: e.rounded,
|
|
@@ -490,17 +524,17 @@ const we = /* @__PURE__ */ x({
|
|
|
490
524
|
color: e.color,
|
|
491
525
|
"hide-details": e.hideDetails,
|
|
492
526
|
"return-object": e.returnObject,
|
|
493
|
-
"error-messages":
|
|
494
|
-
}),
|
|
495
|
-
|
|
496
|
-
name:
|
|
497
|
-
fn:
|
|
498
|
-
|
|
527
|
+
"error-messages": b(n)
|
|
528
|
+
}), Y({ _: 2 }, [
|
|
529
|
+
X(i.$slots, (c, f) => ({
|
|
530
|
+
name: f,
|
|
531
|
+
fn: p((u) => [
|
|
532
|
+
P(i.$slots, f, K(L(u ?? {})))
|
|
499
533
|
])
|
|
500
534
|
}))
|
|
501
535
|
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "hide-details", "return-object", "error-messages"]));
|
|
502
536
|
}
|
|
503
|
-
}),
|
|
537
|
+
}), Ae = /* @__PURE__ */ x({
|
|
504
538
|
name: "FNumberField",
|
|
505
539
|
inheritAttrs: !1,
|
|
506
540
|
__name: "FNumberField",
|
|
@@ -524,13 +558,13 @@ const we = /* @__PURE__ */ x({
|
|
|
524
558
|
rules: { type: [String, Function], default: "" }
|
|
525
559
|
},
|
|
526
560
|
setup(t) {
|
|
527
|
-
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } =
|
|
561
|
+
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } = N(() => e.name, o, {
|
|
528
562
|
initialValue: e.modelValue,
|
|
529
563
|
syncVModel: !0
|
|
530
564
|
});
|
|
531
|
-
return (
|
|
532
|
-
modelValue:
|
|
533
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
565
|
+
return (i, a) => (m(), V(b(ge), B(i.$attrs, {
|
|
566
|
+
modelValue: b(l),
|
|
567
|
+
"onUpdate:modelValue": a[0] || (a[0] = (c) => R(l) ? l.value = c : null),
|
|
534
568
|
name: e.name,
|
|
535
569
|
color: e.color,
|
|
536
570
|
density: e.density,
|
|
@@ -546,14 +580,14 @@ const we = /* @__PURE__ */ x({
|
|
|
546
580
|
min: e.min,
|
|
547
581
|
precision: e.precision,
|
|
548
582
|
inset: e.inset,
|
|
549
|
-
"error-messages":
|
|
583
|
+
"error-messages": b(n)
|
|
550
584
|
}), null, 16, ["modelValue", "name", "color", "density", "rounded", "variant", "control-variant", "hide-details", "placeholder", "label", "prefix", "disabled", "readonly", "min", "precision", "inset", "error-messages"]));
|
|
551
585
|
}
|
|
552
|
-
}),
|
|
586
|
+
}), Re = { key: 0 }, Ie = { key: 1 }, Ue = /* @__PURE__ */ x({
|
|
553
587
|
name: "FSwitch",
|
|
554
588
|
inheritAttrs: !1,
|
|
555
589
|
__name: "FSwitch",
|
|
556
|
-
props: /* @__PURE__ */
|
|
590
|
+
props: /* @__PURE__ */ E({
|
|
557
591
|
color: { default: "secondary" },
|
|
558
592
|
density: { default: "comfortable" },
|
|
559
593
|
hideDetails: { type: [Boolean, String], default: "auto" },
|
|
@@ -565,28 +599,28 @@ const we = /* @__PURE__ */ x({
|
|
|
565
599
|
}),
|
|
566
600
|
emits: ["update:modelValue"],
|
|
567
601
|
setup(t) {
|
|
568
|
-
const e = t, o =
|
|
569
|
-
return (n, l) => (
|
|
602
|
+
const e = t, o = j(t, "modelValue");
|
|
603
|
+
return (n, l) => (m(), V(b(be), B(n.$attrs, {
|
|
570
604
|
modelValue: o.value,
|
|
571
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
605
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => o.value = i),
|
|
572
606
|
color: e.color,
|
|
573
607
|
"hide-details": e.hideDetails,
|
|
574
608
|
density: e.density
|
|
575
|
-
}),
|
|
609
|
+
}), Y({ _: 2 }, [
|
|
576
610
|
e.labelTrue || e.labelFalse ? {
|
|
577
611
|
name: "label",
|
|
578
|
-
fn:
|
|
579
|
-
o.value ? (
|
|
612
|
+
fn: p(() => [
|
|
613
|
+
o.value ? (m(), A("span", Re, M(e.labelTrue), 1)) : (m(), A("span", Ie, M(e.labelFalse), 1))
|
|
580
614
|
]),
|
|
581
615
|
key: "0"
|
|
582
616
|
} : void 0
|
|
583
617
|
]), 1040, ["modelValue", "color", "hide-details", "density"]));
|
|
584
618
|
}
|
|
585
|
-
}),
|
|
619
|
+
}), je = /* @__PURE__ */ x({
|
|
586
620
|
name: "FDialog",
|
|
587
621
|
inheritAttrs: !1,
|
|
588
622
|
__name: "FDialog",
|
|
589
|
-
props: /* @__PURE__ */
|
|
623
|
+
props: /* @__PURE__ */ E({
|
|
590
624
|
width: { default: 750 },
|
|
591
625
|
persistent: { type: Boolean, default: !0 },
|
|
592
626
|
transition: { default: "slide-y-transition" },
|
|
@@ -595,12 +629,12 @@ const we = /* @__PURE__ */ x({
|
|
|
595
629
|
modelValue: { type: Boolean },
|
|
596
630
|
modelModifiers: {}
|
|
597
631
|
}),
|
|
598
|
-
emits: /* @__PURE__ */
|
|
632
|
+
emits: /* @__PURE__ */ E(["closeDialog"], ["update:modelValue"]),
|
|
599
633
|
setup(t) {
|
|
600
|
-
const e = t, o =
|
|
634
|
+
const e = t, o = j(t, "modelValue");
|
|
601
635
|
return (n, l) => {
|
|
602
|
-
const
|
|
603
|
-
return
|
|
636
|
+
const i = g("v-btn"), a = g("v-card-title"), c = g("v-divider"), f = g("v-card-text"), u = g("v-card"), d = g("v-dialog");
|
|
637
|
+
return m(), V(d, B(n.$attrs, {
|
|
604
638
|
modelValue: o.value,
|
|
605
639
|
"onUpdate:modelValue": l[1] || (l[1] = (r) => o.value = r),
|
|
606
640
|
transition: e.transition,
|
|
@@ -608,20 +642,20 @@ const we = /* @__PURE__ */ x({
|
|
|
608
642
|
width: e.width,
|
|
609
643
|
persistent: e.persistent
|
|
610
644
|
}), {
|
|
611
|
-
default:
|
|
612
|
-
|
|
645
|
+
default: p(() => [
|
|
646
|
+
k(u, {
|
|
613
647
|
class: "f-dialog-card",
|
|
614
648
|
density: "default",
|
|
615
649
|
variant: "elevated",
|
|
616
650
|
rounded: "lg"
|
|
617
651
|
}, {
|
|
618
|
-
default:
|
|
619
|
-
|
|
620
|
-
default:
|
|
621
|
-
|
|
622
|
-
|
|
652
|
+
default: p(() => [
|
|
653
|
+
k(a, { class: "d-flex justify-space-between align-center" }, {
|
|
654
|
+
default: p(() => [
|
|
655
|
+
z("header", null, [
|
|
656
|
+
P(n.$slots, "header")
|
|
623
657
|
]),
|
|
624
|
-
e.hideClose ?
|
|
658
|
+
e.hideClose ? O("", !0) : (m(), V(i, {
|
|
625
659
|
key: 0,
|
|
626
660
|
icon: "mdi-close",
|
|
627
661
|
variant: "text",
|
|
@@ -630,10 +664,10 @@ const we = /* @__PURE__ */ x({
|
|
|
630
664
|
]),
|
|
631
665
|
_: 3
|
|
632
666
|
}),
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
default:
|
|
636
|
-
|
|
667
|
+
k(c),
|
|
668
|
+
k(f, { class: "py-4 px-1 overflow-auto overflow-x-hidden" }, {
|
|
669
|
+
default: p(() => [
|
|
670
|
+
P(n.$slots, "default")
|
|
637
671
|
]),
|
|
638
672
|
_: 3
|
|
639
673
|
})
|
|
@@ -645,10 +679,10 @@ const we = /* @__PURE__ */ x({
|
|
|
645
679
|
}, 16, ["modelValue", "transition", "width", "persistent"]);
|
|
646
680
|
};
|
|
647
681
|
}
|
|
648
|
-
}),
|
|
682
|
+
}), Oe = {
|
|
649
683
|
class: "d-flex mt-5 mb-n6",
|
|
650
684
|
style: { width: "100%" }
|
|
651
|
-
},
|
|
685
|
+
}, Xe = /* @__PURE__ */ x({
|
|
652
686
|
name: "FTimePicker",
|
|
653
687
|
inheritAttrs: !1,
|
|
654
688
|
__name: "FTimePicker",
|
|
@@ -667,70 +701,70 @@ const we = /* @__PURE__ */ x({
|
|
|
667
701
|
labelConfirm: { default: "Confirm" }
|
|
668
702
|
},
|
|
669
703
|
setup(t) {
|
|
670
|
-
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } =
|
|
704
|
+
const e = t, o = $(() => e.rules), { errorMessage: n, value: l } = N(() => e.name, o, {
|
|
671
705
|
initialValue: e.modelValue || "",
|
|
672
706
|
syncVModel: !0
|
|
673
|
-
}),
|
|
674
|
-
function
|
|
675
|
-
l.value = a.value,
|
|
707
|
+
}), i = T(!1), a = T(l);
|
|
708
|
+
function c() {
|
|
709
|
+
l.value = a.value, i.value = !1;
|
|
676
710
|
}
|
|
677
|
-
function
|
|
711
|
+
function f(u) {
|
|
678
712
|
a.value && a.value.includes(":") && (a.value = u.toString().padStart(2, "0") + a.value.substring(a.value.indexOf(":")));
|
|
679
713
|
}
|
|
680
714
|
return (u, d) => {
|
|
681
|
-
const r =
|
|
682
|
-
return
|
|
683
|
-
modelValue:
|
|
684
|
-
"onUpdate:modelValue": d[4] || (d[4] = (
|
|
715
|
+
const r = g("v-spacer"), w = g("v-time-picker"), _ = g("v-menu"), D = g("v-text-field");
|
|
716
|
+
return m(), V(D, B(u.$attrs, {
|
|
717
|
+
modelValue: b(l),
|
|
718
|
+
"onUpdate:modelValue": d[4] || (d[4] = (h) => R(l) ? l.value = h : null),
|
|
685
719
|
"prepend-inner-icon": "mdi-clock-time-four-outline",
|
|
686
720
|
name: e.name,
|
|
687
|
-
active:
|
|
688
|
-
focus:
|
|
721
|
+
active: i.value,
|
|
722
|
+
focus: i.value,
|
|
689
723
|
density: e.density,
|
|
690
724
|
rounded: e.rounded,
|
|
691
725
|
variant: e.variant,
|
|
692
726
|
"hide-details": e.hideDetails,
|
|
693
727
|
readonly: e.readonly,
|
|
694
|
-
"error-messages":
|
|
728
|
+
"error-messages": b(n)
|
|
695
729
|
}), {
|
|
696
|
-
default:
|
|
697
|
-
|
|
698
|
-
modelValue:
|
|
699
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
730
|
+
default: p(() => [
|
|
731
|
+
k(_, {
|
|
732
|
+
modelValue: i.value,
|
|
733
|
+
"onUpdate:modelValue": d[3] || (d[3] = (h) => i.value = h),
|
|
700
734
|
activator: "parent",
|
|
701
735
|
location: "center",
|
|
702
736
|
disabled: e.readonly,
|
|
703
737
|
"close-on-content-click": !1
|
|
704
738
|
}, {
|
|
705
|
-
default:
|
|
706
|
-
|
|
739
|
+
default: p(() => [
|
|
740
|
+
i.value ? (m(), V(w, {
|
|
707
741
|
key: 0,
|
|
708
742
|
modelValue: a.value,
|
|
709
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
743
|
+
"onUpdate:modelValue": d[1] || (d[1] = (h) => a.value = h),
|
|
710
744
|
"full-width": "",
|
|
711
745
|
color: "secondary",
|
|
712
746
|
format: "24hr",
|
|
713
747
|
title: e.title,
|
|
714
|
-
"onUpdate:hour": d[2] || (d[2] = (
|
|
748
|
+
"onUpdate:hour": d[2] || (d[2] = (h) => f(h))
|
|
715
749
|
}, {
|
|
716
|
-
actions:
|
|
717
|
-
|
|
718
|
-
|
|
750
|
+
actions: p(() => [
|
|
751
|
+
z("div", Oe, [
|
|
752
|
+
k(W, {
|
|
719
753
|
variant: "plain",
|
|
720
754
|
color: "red-darken-2",
|
|
721
755
|
text: e.labelCancel,
|
|
722
|
-
onClick: d[0] || (d[0] = (
|
|
756
|
+
onClick: d[0] || (d[0] = (h) => i.value = !1)
|
|
723
757
|
}, null, 8, ["text"]),
|
|
724
|
-
|
|
725
|
-
|
|
758
|
+
k(r),
|
|
759
|
+
k(W, {
|
|
726
760
|
variant: "tonal",
|
|
727
761
|
text: e.labelConfirm,
|
|
728
|
-
onClick:
|
|
762
|
+
onClick: c
|
|
729
763
|
}, null, 8, ["text"])
|
|
730
764
|
])
|
|
731
765
|
]),
|
|
732
766
|
_: 1
|
|
733
|
-
}, 8, ["modelValue", "title"])) :
|
|
767
|
+
}, 8, ["modelValue", "title"])) : O("", !0)
|
|
734
768
|
]),
|
|
735
769
|
_: 1
|
|
736
770
|
}, 8, ["modelValue", "disabled"])
|
|
@@ -739,7 +773,7 @@ const we = /* @__PURE__ */ x({
|
|
|
739
773
|
}, 16, ["modelValue", "name", "active", "focus", "density", "rounded", "variant", "hide-details", "readonly", "error-messages"]);
|
|
740
774
|
};
|
|
741
775
|
}
|
|
742
|
-
}),
|
|
776
|
+
}), ze = /* @__PURE__ */ q(Xe, [["__scopeId", "data-v-7639bf96"]]), Ee = { class: "position-relative" }, Ye = /* @__PURE__ */ x({
|
|
743
777
|
name: "FDatePicker",
|
|
744
778
|
inheritAttrs: !1,
|
|
745
779
|
__name: "FDatePicker",
|
|
@@ -767,39 +801,39 @@ const we = /* @__PURE__ */ x({
|
|
|
767
801
|
if (d instanceof Date)
|
|
768
802
|
r = d;
|
|
769
803
|
else {
|
|
770
|
-
const
|
|
771
|
-
|
|
804
|
+
const h = d.split("/");
|
|
805
|
+
h.length === 3 ? r = new Date(Number(h[2]), Number(h[1]) - 1, Number(h[0])) : r = new Date(d);
|
|
772
806
|
}
|
|
773
807
|
if (isNaN(r.getTime())) return "";
|
|
774
|
-
const
|
|
775
|
-
return `${
|
|
808
|
+
const w = `0${r.getDate()}`.slice(-2), _ = `0${r.getMonth() + 1}`.slice(-2), D = r.getFullYear();
|
|
809
|
+
return `${w}/${_}/${D}`;
|
|
776
810
|
}
|
|
777
811
|
function l(d) {
|
|
778
812
|
if (!d) return null;
|
|
779
813
|
const r = d.split("/");
|
|
780
814
|
return r.length === 3 ? new Date(Number(r[2]), Number(r[1]) - 1, Number(r[0])) : null;
|
|
781
815
|
}
|
|
782
|
-
const { errorMessage:
|
|
816
|
+
const { errorMessage: i, value: a } = N(() => e.name, o, {
|
|
783
817
|
initialValue: e.modelValue ? n(e.modelValue) : "",
|
|
784
818
|
syncVModel: !0
|
|
785
|
-
}),
|
|
786
|
-
a.value = n(d),
|
|
819
|
+
}), c = T(null), f = T(!1), u = (d) => {
|
|
820
|
+
a.value = n(d), f.value = !1;
|
|
787
821
|
};
|
|
788
|
-
return
|
|
789
|
-
|
|
822
|
+
return me(() => {
|
|
823
|
+
c.value = e.modelValue ? l(e.modelValue) : null;
|
|
790
824
|
}), (d, r) => {
|
|
791
|
-
const
|
|
792
|
-
return
|
|
793
|
-
modelValue:
|
|
794
|
-
"onUpdate:modelValue": r[4] || (r[4] = (
|
|
825
|
+
const w = g("v-text-field"), _ = g("v-date-picker"), D = g("v-locale-provider"), h = g("v-btn"), G = g("v-menu");
|
|
826
|
+
return m(), V(G, {
|
|
827
|
+
modelValue: f.value,
|
|
828
|
+
"onUpdate:modelValue": r[4] || (r[4] = (S) => f.value = S),
|
|
795
829
|
location: "center",
|
|
796
830
|
disabled: e.disabled,
|
|
797
831
|
"close-on-content-click": !1
|
|
798
832
|
}, {
|
|
799
|
-
activator:
|
|
800
|
-
|
|
801
|
-
modelValue:
|
|
802
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
833
|
+
activator: p(({ props: S }) => [
|
|
834
|
+
k(w, B({ ...d.$attrs, ...S }, {
|
|
835
|
+
modelValue: b(a),
|
|
836
|
+
"onUpdate:modelValue": r[0] || (r[0] = (H) => R(a) ? a.value = H : null),
|
|
803
837
|
"prepend-inner-icon": "mdi-calendar-outline",
|
|
804
838
|
name: e.name,
|
|
805
839
|
density: e.density,
|
|
@@ -808,20 +842,20 @@ const we = /* @__PURE__ */ x({
|
|
|
808
842
|
"hide-details": e.hideDetails,
|
|
809
843
|
color: e.color,
|
|
810
844
|
readonly: "",
|
|
811
|
-
"error-messages":
|
|
812
|
-
"onClick:clear": r[1] || (r[1] = (
|
|
845
|
+
"error-messages": b(i),
|
|
846
|
+
"onClick:clear": r[1] || (r[1] = (H) => a.value = "")
|
|
813
847
|
}), null, 16, ["modelValue", "name", "density", "rounded", "variant", "hide-details", "color", "error-messages"])
|
|
814
848
|
]),
|
|
815
|
-
default:
|
|
816
|
-
|
|
817
|
-
|
|
849
|
+
default: p(() => [
|
|
850
|
+
z("div", Ee, [
|
|
851
|
+
k(D, {
|
|
818
852
|
locale: e.locale
|
|
819
853
|
}, {
|
|
820
|
-
default:
|
|
821
|
-
|
|
822
|
-
modelValue:
|
|
854
|
+
default: p(() => [
|
|
855
|
+
k(_, {
|
|
856
|
+
modelValue: c.value,
|
|
823
857
|
"onUpdate:modelValue": [
|
|
824
|
-
r[2] || (r[2] = (
|
|
858
|
+
r[2] || (r[2] = (S) => c.value = S),
|
|
825
859
|
u
|
|
826
860
|
],
|
|
827
861
|
title: "",
|
|
@@ -836,13 +870,13 @@ const we = /* @__PURE__ */ x({
|
|
|
836
870
|
]),
|
|
837
871
|
_: 1
|
|
838
872
|
}, 8, ["locale"]),
|
|
839
|
-
|
|
873
|
+
k(h, {
|
|
840
874
|
class: "position-absolute top-0 right-0",
|
|
841
875
|
color: "white",
|
|
842
876
|
icon: "mdi-close",
|
|
843
877
|
size: "small",
|
|
844
878
|
variant: "text",
|
|
845
|
-
onClick: r[3] || (r[3] = (
|
|
879
|
+
onClick: r[3] || (r[3] = (S) => f.value = !1)
|
|
846
880
|
})
|
|
847
881
|
])
|
|
848
882
|
]),
|
|
@@ -850,25 +884,25 @@ const we = /* @__PURE__ */ x({
|
|
|
850
884
|
}, 8, ["modelValue", "disabled"]);
|
|
851
885
|
};
|
|
852
886
|
}
|
|
853
|
-
}),
|
|
887
|
+
}), He = /* @__PURE__ */ q(Ye, [["__scopeId", "data-v-f2792853"]]), qe = {
|
|
854
888
|
install(t) {
|
|
855
|
-
t.component("FButton", W), t.component("FTextField",
|
|
889
|
+
t.component("FButton", W), t.component("FTextField", Ve), t.component("FDataTable", Be), t.component("FTextarea", Me), t.component("FAutocomplete", Se), t.component("FCheckbox", Pe), t.component("FCurrencyField", Te), t.component("FSelect", Ne), t.component("FNumberField", Ae), t.component("FSwitch", Ue), t.component("FDialog", je), t.component("FTimePicker", ze), t.component("FDatePicker", He);
|
|
856
890
|
}
|
|
857
891
|
};
|
|
858
892
|
export {
|
|
859
|
-
|
|
893
|
+
Se as FAutocomplete,
|
|
860
894
|
W as FButton,
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
895
|
+
Pe as FCheckbox,
|
|
896
|
+
Te as FCurrencyField,
|
|
897
|
+
Be as FDataTable,
|
|
898
|
+
Ce as FDataTableHeaderType,
|
|
899
|
+
He as FDatePicker,
|
|
900
|
+
je as FDialog,
|
|
901
|
+
Ae as FNumberField,
|
|
902
|
+
Ne as FSelect,
|
|
903
|
+
Ue as FSwitch,
|
|
904
|
+
Ve as FTextField,
|
|
905
|
+
Me as FTextarea,
|
|
906
|
+
ze as FTimePicker,
|
|
907
|
+
qe as default
|
|
874
908
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(y,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):(y=typeof globalThis<"u"?globalThis:y||self,e(y.FinsoVueComponents={},y.Vue,y.VuetifyComponents,y.MaskaVue,y.VeeValidate))})(this,(function(y,e,F,Y,_){"use strict";const w=e.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(o){const t=o;return(r,a)=>{const l=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(l,{color:t.color,rounded:t.rounded},null,8,["color","rounded"])}}}),N=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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=_.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0});return(s,n)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(F.VTextField),e.mergeProps(s.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":n[0]||(n[0]=c=>e.isRef(l)?l.value=c: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(a),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":n[1]||(n[1]=c=>s.$emit("clickAppendInner"))}),e.createSlots({_:2},[e.renderList(s.$slots,(c,f)=>({name:f,fn:e.withCtx(m=>[e.renderSlot(s.$slots,f,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref(Y.vMaska),t.mask]])}}),H={key:1},q={key:4},G={class:"f-data-table__actions"},W={class:"text-h6"},J=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},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},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 r=o,a=t,l=e.useModel(o,"page"),s=e.useModel(o,"itemsPerPage"),n=e.useModel(o,"sortBy"),c=e.ref(!1),f=e.ref(null);function m(p,h){return h.split(".").reduce((D,$)=>D==null?void 0:D[$],p)}function i(p){return p==null?"":new Intl.NumberFormat(r.moneyLocale,{style:"currency",currency:r.moneyCurrency}).format(p)}function d(p){if(!p)return"";const h=p.replace(/\D/g,"");return h.length<10?p:`(${h.substring(0,3)}) ${h.substring(3,6)} ${h.substring(6,10)}`}const C=e.computed(()=>{const D=r.items.length===0?108:r.items.length*52+56;return Math.min(D,r.maxHeight)}),k=e.computed(()=>!r.canEditRecord&&!r.canReadRecord?{}:{"click:row":(p,{item:h})=>{a("show-record",h)}}),V=e.computed(()=>r.headers.filter(p=>p.type&&p.key!=="actions")),g=e.computed(()=>r.headers.some(p=>p.key==="actions"));function S(p){r.showDeleteConfirm?(f.value=p,c.value=!0):a("delete-record",p)}function B(){a("delete-record",f.value),c.value=!1,f.value=null}return(p,h)=>{const D=e.resolveComponent("v-img"),$=e.resolveComponent("v-avatar"),oe=e.resolveComponent("v-chip"),le=e.resolveComponent("v-icon"),v=e.resolveComponent("v-btn"),ne=e.resolveComponent("v-card-text"),ae=e.resolveComponent("v-spacer"),L=e.resolveComponent("f-button"),re=e.resolveComponent("v-card-actions"),de=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(p.$attrs,{page:l.value,"onUpdate:page":h[0]||(h[0]=u=>l.value=u),"items-per-page":s.value,"onUpdate:itemsPerPage":h[1]||(h[1]=u=>s.value=u),"sort-by":n.value,"onUpdate:sortBy":h[2]||(h[2]=u=>n.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:C.value,"show-select":o.showSelect,"items-per-page-text":o.labelItemsPerPage,"no-data-text":o.labelNoData},e.toHandlers(k.value)),e.createSlots({_:2},[e.renderList(V.value,u=>({name:`item.${u.key}`,fn:e.withCtx(({item:b})=>[e.renderSlot(p.$slots,`item.${u.key}`,{item:b,value:m(b,u.key)},()=>[u.type==="image"?(e.openBlock(),e.createBlock($,{key:0,rounded:"lg",variant:"elevated",color:"white"},{default:e.withCtx(()=>[e.createVNode(D,{src:m(b,u.key),class:"f-data-table__logo"},null,8,["src"])]),_:2},1024)):u.type==="money"?(e.openBlock(),e.createElementBlock("span",H,e.toDisplayString(i(m(b,u.key))),1)):u.type==="status"?(e.openBlock(),e.createBlock(oe,{key:2,color:m(b,u.key)?"green-darken-1":"red-darken-2",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(b,u.key)?o.labelActive:o.labelPassive),1)]),_:2},1032,["color"])):u.type==="boolean"?(e.openBlock(),e.createBlock(le,{key:3,color:m(b,u.key)?"green-darken-1":"red-darken-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(b,u.key)?"mdi-check":"mdi-close"),1)]),_:2},1032,["color"])):u.type==="gsmNo"?(e.openBlock(),e.createElementBlock("span",q,e.toDisplayString(d(m(b,u.key))),1)):e.createCommentVNode("",!0)],!0)])})),g.value?{name:"item.actions",fn:e.withCtx(({item:u})=>[e.renderSlot(p.$slots,"item.actions",{item:u},()=>[e.createElementVNode("div",G,[o.canEditRecord||o.canReadRecord?(e.openBlock(),e.createBlock(v,{key:0,color:"primary",icon:"mdi-pencil-outline",variant:"text",size:"small",onClick:e.withModifiers(b=>a("show-record",u),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),o.canDeleteRecord?(e.openBlock(),e.createBlock(v,{key:1,icon:"mdi-trash-can-outline",variant:"text",size:"small",color:"red-darken-2",onClick:e.withModifiers(b=>S(u),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0)])],!0)]),key:"0"}:void 0,e.renderList(p.$slots,(u,b)=>({name:b,fn:e.withCtx(se=>[e.renderSlot(p.$slots,b,e.normalizeProps(e.guardReactiveProps(se??{})),void 0,!0)])}))]),1040,["page","items-per-page","sort-by","headers","items","items-length","loading","hover","density","height","show-select","items-per-page-text","no-data-text"])),e.createVNode(de,{modelValue:c.value,"onUpdate:modelValue":h[4]||(h[4]=u=>c.value=u),"max-width":"400","hide-close":!0},{header:e.withCtx(()=>[e.createElementVNode("div",W,e.toDisplayString(o.labelDeleteTitle),1)]),default:e.withCtx(()=>[e.createVNode(ne,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.deleteMessageFormatter&&f.value?o.deleteMessageFormatter(f.value):o.labelDeleteMessage),1)]),_:1}),e.createVNode(re,null,{default:e.withCtx(()=>[e.createVNode(ae),e.createVNode(L,{variant:"plain",color:"red-darken-2",text:o.labelDeleteCancel,onClick:h[3]||(h[3]=u=>c.value=!1)},null,8,["text"]),e.createVNode(L,{variant:"tonal",text:o.labelDeleteConfirm,onClick:B},null,8,["text"])]),_:1})]),_:1},8,["modelValue"])])}}}),x=(o,t)=>{const r=o.__vccOpts||o;for(const[a,l]of t)r[a]=l;return r},M=x(J,[["__scopeId","data-v-ee2b82fa"]]);var P=(o=>(o.IMAGE="image",o.MONEY="money",o.STATUS="status",o.BOOLEAN="boolean",o.GSM_NO="gsmNo",o))(P||{});const T=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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=_.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0});return(s,n)=>(e.openBlock(),e.createBlock(e.unref(F.VTextarea),e.mergeProps(s.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":n[0]||(n[0]=c=>e.isRef(l)?l.value=c: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(a)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),R=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 r=t,a=o,l=e.computed(()=>a.rules),{errorMessage:s,value:n}=_.useField(()=>a.name,l,{initialValue:a.modelValue,syncVModel:!0});function c(f){r("change",f)}return(f,m)=>(e.openBlock(),e.createBlock(e.unref(F.VAutocomplete),e.mergeProps(f.$attrs,{modelValue:e.unref(n),"onUpdate:modelValue":[m[0]||(m[0]=i=>e.isRef(n)?n.value=i:null),m[1]||(m[1]=i=>c(e.unref(n)))],name:a.name,items:a.items,rounded:a.rounded,variant:a.variant,density:a.density,color:a.color,clearable:a.clearable,"hide-details":a.hideDetails,"return-object":a.returnObject,"no-data-text":a.noDataText,"error-messages":e.unref(s),"menu-props":{maxWidth:0}}),e.createSlots({_:2},[e.renderList(f.$slots,(i,d)=>({name:d,fn:e.withCtx(C=>[e.renderSlot(f.$slots,d,e.normalizeProps(e.guardReactiveProps(C??{})))])}))]),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(r,a)=>(e.openBlock(),e.createBlock(e.unref(F.VCheckbox),e.mergeProps(r.$attrs,{color:t.color,"hide-details":t.hideDetails,indeterminate:t.indeterminate,density:t.density}),null,16,["color","hide-details","indeterminate","density"]))}}),U=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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=_.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0}),s=e.computed(()=>new Intl.NumberFormat(t.locale,{style:"currency",currency:t.currency,minimumFractionDigits:t.precision,maximumFractionDigits:t.precision})),n=e.ref(c(t.modelValue));function c(k){return k==null||isNaN(k)?"":s.value.format(k)}function f(k){const V=k.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),g=parseFloat(V);return isNaN(g)?null:Math.round(g*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const m=e.ref(!1);function i(k){const V=k.target;n.value=V.value,l.value=f(V.value)}function d(){m.value=!1,n.value=c(l.value)}function C(k){m.value=!0;const V=k.target,g=l.value;g!=null?n.value=g.toFixed(t.precision).replace(".",","):n.value="",setTimeout(()=>V.select(),0)}return e.watch(()=>t.modelValue,k=>{l.value=k,m.value||(n.value=c(k))}),(k,V)=>(e.openBlock(),e.createBlock(e.unref(F.VTextField),e.mergeProps(k.$attrs,{"model-value":n.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(a),inputmode:"decimal",onInput:i,onBlur:d,onFocus:C}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),I=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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=_.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0});return(s,n)=>(e.openBlock(),e.createBlock(e.unref(F.VSelect),e.mergeProps(s.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":n[0]||(n[0]=c=>e.isRef(l)?l.value=c: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(a)}),e.createSlots({_:2},[e.renderList(s.$slots,(c,f)=>({name:f,fn:e.withCtx(m=>[e.renderSlot(s.$slots,f,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),E=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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=_.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0});return(s,n)=>(e.openBlock(),e.createBlock(e.unref(F.VNumberInput),e.mergeProps(s.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":n[0]||(n[0]=c=>e.isRef(l)?l.value=c: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(a)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),K={key:0},Q={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,r=e.useModel(o,"modelValue");return(a,l)=>(e.openBlock(),e.createBlock(e.unref(F.VSwitch),e.mergeProps(a.$attrs,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=s=>r.value=s),color:t.color,"hide-details":t.hideDetails,density:t.density}),e.createSlots({_:2},[t.labelTrue||t.labelFalse?{name:"label",fn:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("span",K,e.toDisplayString(t.labelTrue),1)):(e.openBlock(),e.createElementBlock("span",Q,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,r=e.useModel(o,"modelValue");return(a,l)=>{const s=e.resolveComponent("v-btn"),n=e.resolveComponent("v-card-title"),c=e.resolveComponent("v-divider"),f=e.resolveComponent("v-card-text"),m=e.resolveComponent("v-card"),i=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(i,e.mergeProps(a.$attrs,{modelValue:r.value,"onUpdate:modelValue":l[1]||(l[1]=d=>r.value=d),transition:t.transition,class:"f-dialog",width:t.width,persistent:t.persistent}),{default:e.withCtx(()=>[e.createVNode(m,{class:"f-dialog-card",density:"default",variant:"elevated",rounded:"lg"},{default:e.withCtx(()=>[e.createVNode(n,{class:"d-flex justify-space-between align-center"},{default:e.withCtx(()=>[e.createElementVNode("header",null,[e.renderSlot(a.$slots,"header")]),t.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,icon:"mdi-close",variant:"text",onClick:l[0]||(l[0]=d=>a.$emit("closeDialog"))}))]),_:3}),e.createVNode(c),e.createVNode(f,{class:"py-4 px-1 overflow-auto overflow-x-hidden"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})]),_:3})]),_:3},16,["modelValue","transition","width","persistent"])}}}),Z={class:"d-flex mt-5 mb-n6",style:{width:"100%"}},z=x(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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=_.useField(()=>t.name,r,{initialValue:t.modelValue||"",syncVModel:!0}),s=e.ref(!1),n=e.ref(l);function c(){l.value=n.value,s.value=!1}function f(m){n.value&&n.value.includes(":")&&(n.value=m.toString().padStart(2,"0")+n.value.substring(n.value.indexOf(":")))}return(m,i)=>{const d=e.resolveComponent("v-spacer"),C=e.resolveComponent("v-time-picker"),k=e.resolveComponent("v-menu"),V=e.resolveComponent("v-text-field");return e.openBlock(),e.createBlock(V,e.mergeProps(m.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":i[4]||(i[4]=g=>e.isRef(l)?l.value=g:null),"prepend-inner-icon":"mdi-clock-time-four-outline",name:t.name,active:s.value,focus:s.value,density:t.density,rounded:t.rounded,variant:t.variant,"hide-details":t.hideDetails,readonly:t.readonly,"error-messages":e.unref(a)}),{default:e.withCtx(()=>[e.createVNode(k,{modelValue:s.value,"onUpdate:modelValue":i[3]||(i[3]=g=>s.value=g),activator:"parent",location:"center",disabled:t.readonly,"close-on-content-click":!1},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(C,{key:0,modelValue:n.value,"onUpdate:modelValue":i[1]||(i[1]=g=>n.value=g),"full-width":"",color:"secondary",format:"24hr",title:t.title,"onUpdate:hour":i[2]||(i[2]=g=>f(g))},{actions:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createVNode(w,{variant:"plain",color:"red-darken-2",text:t.labelCancel,onClick:i[0]||(i[0]=g=>s.value=!1)},null,8,["text"]),e.createVNode(d),e.createVNode(w,{variant:"tonal",text:t.labelConfirm,onClick:c},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"]]),ee={class:"position-relative"},X=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,r=e.computed(()=>t.rules);function a(i){if(!i)return"";let d;if(i instanceof Date)d=i;else{const g=i.split("/");g.length===3?d=new Date(Number(g[2]),Number(g[1])-1,Number(g[0])):d=new Date(i)}if(isNaN(d.getTime()))return"";const C=`0${d.getDate()}`.slice(-2),k=`0${d.getMonth()+1}`.slice(-2),V=d.getFullYear();return`${C}/${k}/${V}`}function l(i){if(!i)return null;const d=i.split("/");return d.length===3?new Date(Number(d[2]),Number(d[1])-1,Number(d[0])):null}const{errorMessage:s,value:n}=_.useField(()=>t.name,r,{initialValue:t.modelValue?a(t.modelValue):"",syncVModel:!0}),c=e.ref(null),f=e.ref(!1),m=i=>{n.value=a(i),f.value=!1};return e.onMounted(()=>{c.value=t.modelValue?l(t.modelValue):null}),(i,d)=>{const C=e.resolveComponent("v-text-field"),k=e.resolveComponent("v-date-picker"),V=e.resolveComponent("v-locale-provider"),g=e.resolveComponent("v-btn"),S=e.resolveComponent("v-menu");return e.openBlock(),e.createBlock(S,{modelValue:f.value,"onUpdate:modelValue":d[4]||(d[4]=B=>f.value=B),location:"center",disabled:t.disabled,"close-on-content-click":!1},{activator:e.withCtx(({props:B})=>[e.createVNode(C,e.mergeProps({...i.$attrs,...B},{modelValue:e.unref(n),"onUpdate:modelValue":d[0]||(d[0]=p=>e.isRef(n)?n.value=p: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(s),"onClick:clear":d[1]||(d[1]=p=>n.value="")}),null,16,["modelValue","name","density","rounded","variant","hide-details","color","error-messages"])]),default:e.withCtx(()=>[e.createElementVNode("div",ee,[e.createVNode(V,{locale:t.locale},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:c.value,"onUpdate:modelValue":[d[2]||(d[2]=B=>c.value=B),m],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(g,{class:"position-absolute top-0 right-0",color:"white",icon:"mdi-close",size:"small",variant:"text",onClick:d[3]||(d[3]=B=>f.value=!1)})])]),_:1},8,["modelValue","disabled"])}}}),[["__scopeId","data-v-f2792853"]]),te={install(o){o.component("FButton",w),o.component("FTextField",N),o.component("FDataTable",M),o.component("FTextarea",T),o.component("FAutocomplete",R),o.component("FCheckbox",A),o.component("FCurrencyField",U),o.component("FSelect",I),o.component("FNumberField",E),o.component("FSwitch",O),o.component("FDialog",j),o.component("FTimePicker",z),o.component("FDatePicker",X)}};y.FAutocomplete=R,y.FButton=w,y.FCheckbox=A,y.FCurrencyField=U,y.FDataTable=M,y.FDataTableHeaderType=P,y.FDatePicker=X,y.FDialog=j,y.FNumberField=E,y.FSelect=I,y.FSwitch=O,y.FTextField=N,y.FTextarea=T,y.FTimePicker=z,y.default=te,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(g,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):(g=typeof globalThis<"u"?globalThis:g||self,e(g.FinsoVueComponents={},g.Vue,g.VuetifyComponents,g.MaskaVue,g.VeeValidate))})(this,(function(g,e,_,q,F){"use strict";const x=e.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(o){const t=o;return(r,a)=>{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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=F.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0});return(d,n)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(_.VTextField),e.mergeProps(d.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":n[0]||(n[0]=u=>e.isRef(l)?l.value=u: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(a),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":n[1]||(n[1]=u=>d.$emit("clickAppendInner"))}),e.createSlots({_:2},[e.renderList(d.$slots,(u,f)=>({name:f,fn:e.withCtx(m=>[e.renderSlot(d.$slots,f,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref(q.vMaska),t.mask]])}}),K={key:0,class:"text-white text-caption d-flex justify-center align-center fill-height"},G={key:1,class:"text-white text-caption d-flex justify-center align-center fill-height"},W={key:1},J={key:4},Q={class:"f-data-table__actions"},Z={class:"text-h6"},v=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},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},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 r=o,a=t,l=e.useModel(o,"page"),d=e.useModel(o,"itemsPerPage"),n=e.useModel(o,"sortBy"),u=e.ref(!1),f=e.ref(null);function m(p,y){return y.split(".").reduce((B,D)=>B==null?void 0:B[D],p)}function c(p){return p==null?"":new Intl.NumberFormat(r.moneyLocale,{style:"currency",currency:r.moneyCurrency}).format(p)}function i(p){if(!p)return"";const y=p.replace(/\D/g,"");return y.length<10?p:`(${y.substring(0,3)}) ${y.substring(3,6)} ${y.substring(6,10)}`}function C(p,y){return y.split(",").map(B=>{const D=m(p,B.trim());return typeof D=="string"?D.charAt(0).toUpperCase():""}).join("")}const h=e.computed(()=>{const B=r.items.length===0?108:r.items.length*52+56;return Math.min(B,r.maxHeight)}),b=e.computed(()=>!r.canEditRecord&&!r.canReadRecord?{}:{"click:row":(p,{item:y})=>{a("show-record",y)}}),k=e.computed(()=>r.headers.filter(p=>p.type&&p.key!=="actions")),N=e.computed(()=>r.headers.some(p=>p.key==="actions"));function w(p){r.showDeleteConfirm?(f.value=p,u.value=!0):a("delete-record",p)}function S(){a("delete-record",f.value),u.value=!1,f.value=null}return(p,y)=>{const B=e.resolveComponent("v-icon"),D=e.resolveComponent("v-img"),ae=e.resolveComponent("v-avatar"),re=e.resolveComponent("v-chip"),Y=e.resolveComponent("v-btn"),ie=e.resolveComponent("v-card-text"),se=e.resolveComponent("v-spacer"),H=e.resolveComponent("f-button"),de=e.resolveComponent("v-card-actions"),ce=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(p.$attrs,{page:l.value,"onUpdate:page":y[0]||(y[0]=s=>l.value=s),"items-per-page":d.value,"onUpdate:itemsPerPage":y[1]||(y[1]=s=>d.value=s),"sort-by":n.value,"onUpdate:sortBy":y[2]||(y[2]=s=>n.value=s),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:h.value,"show-select":o.showSelect,"items-per-page-text":o.labelItemsPerPage,"no-data-text":o.labelNoData},e.toHandlers(b.value)),e.createSlots({_:2},[e.renderList(k.value,s=>({name:`item.${s.key}`,fn:e.withCtx(({item:V})=>[e.renderSlot(p.$slots,`item.${s.key}`,{item:V,value:m(V,s.key)},()=>[s.type==="image"?(e.openBlock(),e.createBlock(ae,{key:0,rounded:"lg",variant:"elevated",border:""},{default:e.withCtx(()=>[m(V,s.key)?(e.openBlock(),e.createBlock(D,{key:0,src:m(V,s.key),class:"f-data-table__logo"},{error:e.withCtx(()=>[s.imageInitialsKey?(e.openBlock(),e.createElementBlock("span",K,e.toDisplayString(C(V,s.imageInitialsKey)),1)):(e.openBlock(),e.createBlock(B,{key:1,color:"white"},{default:e.withCtx(()=>[...y[5]||(y[5]=[e.createTextVNode("mdi-account",-1)])]),_:1}))]),_:2},1032,["src"])):s.imageInitialsKey?(e.openBlock(),e.createElementBlock("span",G,e.toDisplayString(C(V,s.imageInitialsKey)),1)):(e.openBlock(),e.createBlock(B,{key:2,color:"white"},{default:e.withCtx(()=>[...y[6]||(y[6]=[e.createTextVNode("mdi-account",-1)])]),_:1}))]),_:2},1024)):s.type==="money"?(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(c(m(V,s.key))),1)):s.type==="status"?(e.openBlock(),e.createBlock(re,{key:2,color:m(V,s.key)?"green-darken-1":"red-darken-2",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(V,s.key)?o.labelActive:o.labelPassive),1)]),_:2},1032,["color"])):s.type==="boolean"?(e.openBlock(),e.createBlock(B,{key:3,color:m(V,s.key)?"green-darken-1":"red-darken-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(V,s.key)?"mdi-check":"mdi-close"),1)]),_:2},1032,["color"])):s.type==="gsmNo"?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(i(m(V,s.key))),1)):e.createCommentVNode("",!0)],!0)])})),N.value?{name:"item.actions",fn:e.withCtx(({item:s})=>[e.renderSlot(p.$slots,"item.actions",{item:s},()=>[e.createElementVNode("div",Q,[o.canEditRecord||o.canReadRecord?(e.openBlock(),e.createBlock(Y,{key:0,color:"primary",icon:"mdi-pencil-outline",variant:"text",size:"small",onClick:e.withModifiers(V=>a("show-record",s),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),o.canDeleteRecord?(e.openBlock(),e.createBlock(Y,{key:1,icon:"mdi-trash-can-outline",variant:"text",size:"small",color:"red-darken-2",onClick:e.withModifiers(V=>w(s),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0)])],!0)]),key:"0"}:void 0,e.renderList(p.$slots,(s,V)=>({name:V,fn:e.withCtx(me=>[e.renderSlot(p.$slots,V,e.normalizeProps(e.guardReactiveProps(me??{})),void 0,!0)])}))]),1040,["page","items-per-page","sort-by","headers","items","items-length","loading","hover","density","height","show-select","items-per-page-text","no-data-text"])),e.createVNode(ce,{modelValue:u.value,"onUpdate:modelValue":y[4]||(y[4]=s=>u.value=s),"max-width":"400","hide-close":!0},{header:e.withCtx(()=>[e.createElementVNode("div",Z,e.toDisplayString(o.labelDeleteTitle),1)]),default:e.withCtx(()=>[e.createVNode(ie,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.deleteMessageFormatter&&f.value?o.deleteMessageFormatter(f.value):o.labelDeleteMessage),1)]),_:1}),e.createVNode(de,null,{default:e.withCtx(()=>[e.createVNode(se),e.createVNode(H,{variant:"plain",color:"red-darken-2",text:o.labelDeleteCancel,onClick:y[3]||(y[3]=s=>u.value=!1)},null,8,["text"]),e.createVNode(H,{variant:"tonal",text:o.labelDeleteConfirm,onClick:S},null,8,["text"])]),_:1})]),_:1},8,["modelValue"])])}}}),$=(o,t)=>{const r=o.__vccOpts||o;for(const[a,l]of t)r[a]=l;return r},P=$(v,[["__scopeId","data-v-5832fd4e"]]);var T=(o=>(o.IMAGE="image",o.MONEY="money",o.STATUS="status",o.BOOLEAN="boolean",o.GSM_NO="gsmNo",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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=F.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0});return(d,n)=>(e.openBlock(),e.createBlock(e.unref(_.VTextarea),e.mergeProps(d.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":n[0]||(n[0]=u=>e.isRef(l)?l.value=u: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(a)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),A=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 r=t,a=o,l=e.computed(()=>a.rules),{errorMessage:d,value:n}=F.useField(()=>a.name,l,{initialValue:a.modelValue,syncVModel:!0});function u(f){r("change",f)}return(f,m)=>(e.openBlock(),e.createBlock(e.unref(_.VAutocomplete),e.mergeProps(f.$attrs,{modelValue:e.unref(n),"onUpdate:modelValue":[m[0]||(m[0]=c=>e.isRef(n)?n.value=c:null),m[1]||(m[1]=c=>u(e.unref(n)))],name:a.name,items:a.items,rounded:a.rounded,variant:a.variant,density:a.density,color:a.color,clearable:a.clearable,"hide-details":a.hideDetails,"return-object":a.returnObject,"no-data-text":a.noDataText,"error-messages":e.unref(d),"menu-props":{maxWidth:0}}),e.createSlots({_:2},[e.renderList(f.$slots,(c,i)=>({name:i,fn:e.withCtx(C=>[e.renderSlot(f.$slots,i,e.normalizeProps(e.guardReactiveProps(C??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","clearable","hide-details","return-object","no-data-text","error-messages"]))}}),I=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(r,a)=>(e.openBlock(),e.createBlock(e.unref(_.VCheckbox),e.mergeProps(r.$attrs,{color:t.color,"hide-details":t.hideDetails,indeterminate:t.indeterminate,density:t.density}),null,16,["color","hide-details","indeterminate","density"]))}}),U=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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=F.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0}),d=e.computed(()=>new Intl.NumberFormat(t.locale,{style:"currency",currency:t.currency,minimumFractionDigits:t.precision,maximumFractionDigits:t.precision})),n=e.ref(u(t.modelValue));function u(h){return h==null||isNaN(h)?"":d.value.format(h)}function f(h){const b=h.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),k=parseFloat(b);return isNaN(k)?null:Math.round(k*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const m=e.ref(!1);function c(h){const b=h.target;n.value=b.value,l.value=f(b.value)}function i(){m.value=!1,n.value=u(l.value)}function C(h){m.value=!0;const b=h.target,k=l.value;k!=null?n.value=k.toFixed(t.precision).replace(".",","):n.value="",setTimeout(()=>b.select(),0)}return e.watch(()=>t.modelValue,h=>{l.value=h,m.value||(n.value=u(h))}),(h,b)=>(e.openBlock(),e.createBlock(e.unref(_.VTextField),e.mergeProps(h.$attrs,{"model-value":n.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(a),inputmode:"decimal",onInput:c,onBlur:i,onFocus:C}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),E=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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=F.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0});return(d,n)=>(e.openBlock(),e.createBlock(e.unref(_.VSelect),e.mergeProps(d.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":n[0]||(n[0]=u=>e.isRef(l)?l.value=u: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(a)}),e.createSlots({_:2},[e.renderList(d.$slots,(u,f)=>({name:f,fn:e.withCtx(m=>[e.renderSlot(d.$slots,f,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),j=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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=F.useField(()=>t.name,r,{initialValue:t.modelValue,syncVModel:!0});return(d,n)=>(e.openBlock(),e.createBlock(e.unref(_.VNumberInput),e.mergeProps(d.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":n[0]||(n[0]=u=>e.isRef(l)?l.value=u: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(a)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),ee={key:0},te={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,r=e.useModel(o,"modelValue");return(a,l)=>(e.openBlock(),e.createBlock(e.unref(_.VSwitch),e.mergeProps(a.$attrs,{modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),color:t.color,"hide-details":t.hideDetails,density:t.density}),e.createSlots({_:2},[t.labelTrue||t.labelFalse?{name:"label",fn:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("span",ee,e.toDisplayString(t.labelTrue),1)):(e.openBlock(),e.createElementBlock("span",te,e.toDisplayString(t.labelFalse),1))]),key:"0"}:void 0]),1040,["modelValue","color","hide-details","density"]))}}),z=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,r=e.useModel(o,"modelValue");return(a,l)=>{const d=e.resolveComponent("v-btn"),n=e.resolveComponent("v-card-title"),u=e.resolveComponent("v-divider"),f=e.resolveComponent("v-card-text"),m=e.resolveComponent("v-card"),c=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(c,e.mergeProps(a.$attrs,{modelValue:r.value,"onUpdate:modelValue":l[1]||(l[1]=i=>r.value=i),transition:t.transition,class:"f-dialog",width:t.width,persistent:t.persistent}),{default:e.withCtx(()=>[e.createVNode(m,{class:"f-dialog-card",density:"default",variant:"elevated",rounded:"lg"},{default:e.withCtx(()=>[e.createVNode(n,{class:"d-flex justify-space-between align-center"},{default:e.withCtx(()=>[e.createElementVNode("header",null,[e.renderSlot(a.$slots,"header")]),t.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,icon:"mdi-close",variant:"text",onClick:l[0]||(l[0]=i=>a.$emit("closeDialog"))}))]),_:3}),e.createVNode(u),e.createVNode(f,{class:"py-4 px-1 overflow-auto overflow-x-hidden"},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})]),_:3})]),_:3},16,["modelValue","transition","width","persistent"])}}}),oe={class:"d-flex mt-5 mb-n6",style:{width:"100%"}},X=$(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,r=e.computed(()=>t.rules),{errorMessage:a,value:l}=F.useField(()=>t.name,r,{initialValue:t.modelValue||"",syncVModel:!0}),d=e.ref(!1),n=e.ref(l);function u(){l.value=n.value,d.value=!1}function f(m){n.value&&n.value.includes(":")&&(n.value=m.toString().padStart(2,"0")+n.value.substring(n.value.indexOf(":")))}return(m,c)=>{const i=e.resolveComponent("v-spacer"),C=e.resolveComponent("v-time-picker"),h=e.resolveComponent("v-menu"),b=e.resolveComponent("v-text-field");return e.openBlock(),e.createBlock(b,e.mergeProps(m.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":c[4]||(c[4]=k=>e.isRef(l)?l.value=k:null),"prepend-inner-icon":"mdi-clock-time-four-outline",name:t.name,active:d.value,focus:d.value,density:t.density,rounded:t.rounded,variant:t.variant,"hide-details":t.hideDetails,readonly:t.readonly,"error-messages":e.unref(a)}),{default:e.withCtx(()=>[e.createVNode(h,{modelValue:d.value,"onUpdate:modelValue":c[3]||(c[3]=k=>d.value=k),activator:"parent",location:"center",disabled:t.readonly,"close-on-content-click":!1},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createBlock(C,{key:0,modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=k=>n.value=k),"full-width":"",color:"secondary",format:"24hr",title:t.title,"onUpdate:hour":c[2]||(c[2]=k=>f(k))},{actions:e.withCtx(()=>[e.createElementVNode("div",oe,[e.createVNode(x,{variant:"plain",color:"red-darken-2",text:t.labelCancel,onClick:c[0]||(c[0]=k=>d.value=!1)},null,8,["text"]),e.createVNode(i),e.createVNode(x,{variant:"tonal",text:t.labelConfirm,onClick:u},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"]]),le={class:"position-relative"},L=$(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,r=e.computed(()=>t.rules);function a(c){if(!c)return"";let i;if(c instanceof Date)i=c;else{const k=c.split("/");k.length===3?i=new Date(Number(k[2]),Number(k[1])-1,Number(k[0])):i=new Date(c)}if(isNaN(i.getTime()))return"";const C=`0${i.getDate()}`.slice(-2),h=`0${i.getMonth()+1}`.slice(-2),b=i.getFullYear();return`${C}/${h}/${b}`}function l(c){if(!c)return null;const i=c.split("/");return i.length===3?new Date(Number(i[2]),Number(i[1])-1,Number(i[0])):null}const{errorMessage:d,value:n}=F.useField(()=>t.name,r,{initialValue:t.modelValue?a(t.modelValue):"",syncVModel:!0}),u=e.ref(null),f=e.ref(!1),m=c=>{n.value=a(c),f.value=!1};return e.onMounted(()=>{u.value=t.modelValue?l(t.modelValue):null}),(c,i)=>{const C=e.resolveComponent("v-text-field"),h=e.resolveComponent("v-date-picker"),b=e.resolveComponent("v-locale-provider"),k=e.resolveComponent("v-btn"),N=e.resolveComponent("v-menu");return e.openBlock(),e.createBlock(N,{modelValue:f.value,"onUpdate:modelValue":i[4]||(i[4]=w=>f.value=w),location:"center",disabled:t.disabled,"close-on-content-click":!1},{activator:e.withCtx(({props:w})=>[e.createVNode(C,e.mergeProps({...c.$attrs,...w},{modelValue:e.unref(n),"onUpdate:modelValue":i[0]||(i[0]=S=>e.isRef(n)?n.value=S: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(d),"onClick:clear":i[1]||(i[1]=S=>n.value="")}),null,16,["modelValue","name","density","rounded","variant","hide-details","color","error-messages"])]),default:e.withCtx(()=>[e.createElementVNode("div",le,[e.createVNode(b,{locale:t.locale},{default:e.withCtx(()=>[e.createVNode(h,{modelValue:u.value,"onUpdate:modelValue":[i[2]||(i[2]=w=>u.value=w),m],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(k,{class:"position-absolute top-0 right-0",color:"white",icon:"mdi-close",size:"small",variant:"text",onClick:i[3]||(i[3]=w=>f.value=!1)})])]),_:1},8,["modelValue","disabled"])}}}),[["__scopeId","data-v-f2792853"]]),ne={install(o){o.component("FButton",x),o.component("FTextField",M),o.component("FDataTable",P),o.component("FTextarea",R),o.component("FAutocomplete",A),o.component("FCheckbox",I),o.component("FCurrencyField",U),o.component("FSelect",E),o.component("FNumberField",j),o.component("FSwitch",O),o.component("FDialog",z),o.component("FTimePicker",X),o.component("FDatePicker",L)}};g.FAutocomplete=A,g.FButton=x,g.FCheckbox=I,g.FCurrencyField=U,g.FDataTable=P,g.FDataTableHeaderType=T,g.FDatePicker=L,g.FDialog=z,g.FNumberField=j,g.FSelect=E,g.FSwitch=O,g.FTextField=M,g.FTextarea=R,g.FTimePicker=X,g.default=ne,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|