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