finso-vue-components 0.4.8 → 0.4.10
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.
|
@@ -2,6 +2,7 @@ export interface FDialogProps {
|
|
|
2
2
|
width?: number;
|
|
3
3
|
persistent?: boolean;
|
|
4
4
|
transition?: string;
|
|
5
|
+
hideClose?: boolean;
|
|
5
6
|
}
|
|
6
7
|
type __VLS_Props = FDialogProps;
|
|
7
8
|
type __VLS_PublicProps = __VLS_Props & {
|
|
@@ -23,6 +24,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
23
24
|
width: number;
|
|
24
25
|
transition: string;
|
|
25
26
|
persistent: boolean;
|
|
27
|
+
hideClose: boolean;
|
|
26
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
29
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
28
30
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.f-data-table__logo[data-v-
|
|
1
|
+
.f-data-table__logo[data-v-f628243a]{object-fit:contain}.f-data-table__actions[data-v-f628243a]{display:flex;gap:4px;align-items:center}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as _, resolveComponent as
|
|
2
|
-
import { VTextField as
|
|
1
|
+
import { defineComponent as _, resolveComponent as v, openBlock as c, createBlock as g, computed as V, withDirectives as oe, unref as f, mergeProps as k, isRef as I, createSlots as U, renderList as P, withCtx as y, renderSlot as x, normalizeProps as E, guardReactiveProps as O, useModel as R, ref as j, createElementBlock as N, resolveDynamicComponent as re, toHandlers as se, createVNode as F, toDisplayString as w, createTextVNode as H, createCommentVNode as X, createElementVNode as L, withModifiers as W, mergeModels as T, watch as de } from "vue";
|
|
2
|
+
import { VTextField as q, VTextarea as ie, VAutocomplete as ue, VCheckbox as ce, VSelect as me, VNumberInput as fe, VSwitch as pe } from "vuetify/components";
|
|
3
3
|
import { vMaska as ye } from "maska/vue";
|
|
4
|
-
import { useField as
|
|
5
|
-
const
|
|
4
|
+
import { useField as M } from "vee-validate";
|
|
5
|
+
const ve = /* @__PURE__ */ _({
|
|
6
6
|
__name: "FButton",
|
|
7
7
|
props: {
|
|
8
8
|
color: { default: "primary" },
|
|
@@ -11,14 +11,14 @@ const ge = /* @__PURE__ */ _({
|
|
|
11
11
|
setup(t) {
|
|
12
12
|
const e = t;
|
|
13
13
|
return (n, a) => {
|
|
14
|
-
const l =
|
|
15
|
-
return
|
|
14
|
+
const l = v("v-btn");
|
|
15
|
+
return c(), g(l, {
|
|
16
16
|
color: e.color,
|
|
17
17
|
rounded: e.rounded
|
|
18
18
|
}, null, 8, ["color", "rounded"]);
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
}),
|
|
21
|
+
}), ge = /* @__PURE__ */ _({
|
|
22
22
|
name: "FTextField",
|
|
23
23
|
inheritAttrs: !1,
|
|
24
24
|
__name: "FTextField",
|
|
@@ -37,13 +37,13 @@ const ge = /* @__PURE__ */ _({
|
|
|
37
37
|
},
|
|
38
38
|
emits: ["clickAppendInner"],
|
|
39
39
|
setup(t) {
|
|
40
|
-
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } =
|
|
40
|
+
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } = M(() => e.name, n, {
|
|
41
41
|
initialValue: e.modelValue,
|
|
42
42
|
syncVModel: !0
|
|
43
43
|
});
|
|
44
|
-
return (i, o) =>
|
|
45
|
-
modelValue:
|
|
46
|
-
"onUpdate:modelValue": o[0] || (o[0] = (s) =>
|
|
44
|
+
return (i, o) => oe((c(), g(f(q), k(i.$attrs, {
|
|
45
|
+
modelValue: f(l),
|
|
46
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => I(l) ? l.value = s : null),
|
|
47
47
|
name: e.name,
|
|
48
48
|
color: e.color,
|
|
49
49
|
density: e.density,
|
|
@@ -51,25 +51,25 @@ const ge = /* @__PURE__ */ _({
|
|
|
51
51
|
variant: e.variant,
|
|
52
52
|
clearable: e.clearable,
|
|
53
53
|
"hide-details": e.hideDetails,
|
|
54
|
-
"error-messages":
|
|
54
|
+
"error-messages": f(a),
|
|
55
55
|
"append-inner-icon": e.appendInnerIcon,
|
|
56
56
|
"onClick:appendInner": o[1] || (o[1] = (s) => i.$emit("clickAppendInner"))
|
|
57
|
-
}),
|
|
58
|
-
|
|
59
|
-
name:
|
|
60
|
-
fn:
|
|
61
|
-
|
|
57
|
+
}), U({ _: 2 }, [
|
|
58
|
+
P(i.$slots, (s, m) => ({
|
|
59
|
+
name: m,
|
|
60
|
+
fn: y((u) => [
|
|
61
|
+
x(i.$slots, m, E(O(u ?? {})))
|
|
62
62
|
])
|
|
63
63
|
}))
|
|
64
64
|
]), 1040, ["modelValue", "name", "color", "density", "rounded", "variant", "clearable", "hide-details", "error-messages", "append-inner-icon"])), [
|
|
65
|
-
[
|
|
65
|
+
[f(ye), e.mask]
|
|
66
66
|
]);
|
|
67
67
|
}
|
|
68
|
-
}), he = { key: 1 },
|
|
68
|
+
}), he = { key: 1 }, be = { key: 4 }, Fe = { class: "f-data-table__actions" }, Ve = { class: "text-h6" }, _e = /* @__PURE__ */ _({
|
|
69
69
|
name: "FDataTable",
|
|
70
70
|
inheritAttrs: !1,
|
|
71
71
|
__name: "FDataTable",
|
|
72
|
-
props: /* @__PURE__ */
|
|
72
|
+
props: /* @__PURE__ */ T({
|
|
73
73
|
headers: {},
|
|
74
74
|
items: {},
|
|
75
75
|
loading: { type: Boolean, default: !1 },
|
|
@@ -103,49 +103,49 @@ const ge = /* @__PURE__ */ _({
|
|
|
103
103
|
sortBy: { default: () => [] },
|
|
104
104
|
sortByModifiers: {}
|
|
105
105
|
}),
|
|
106
|
-
emits: /* @__PURE__ */
|
|
106
|
+
emits: /* @__PURE__ */ T(["show-record", "delete-record"], ["update:page", "update:itemsPerPage", "update:sortBy"]),
|
|
107
107
|
setup(t, { emit: e }) {
|
|
108
|
-
const n = t, a = e, l =
|
|
109
|
-
function u(d,
|
|
110
|
-
return
|
|
108
|
+
const n = t, a = e, l = R(t, "page"), i = R(t, "itemsPerPage"), o = R(t, "sortBy"), s = j(!1), m = j(null);
|
|
109
|
+
function u(d, p) {
|
|
110
|
+
return p.split(".").reduce((S, z) => S == null ? void 0 : S[z], d);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function D(d) {
|
|
113
113
|
return d == null ? "" : new Intl.NumberFormat(n.moneyLocale, {
|
|
114
114
|
style: "currency",
|
|
115
115
|
currency: n.moneyCurrency
|
|
116
116
|
}).format(d);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function $(d) {
|
|
119
119
|
if (!d) return "";
|
|
120
|
-
const
|
|
121
|
-
return
|
|
120
|
+
const p = d.replace(/\D/g, "");
|
|
121
|
+
return p.length < 10 ? d : `(${p.substring(0, 3)}) ${p.substring(3, 6)} ${p.substring(6, 10)}`;
|
|
122
122
|
}
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
return Math.min(
|
|
126
|
-
}),
|
|
127
|
-
"click:row": (d, { item:
|
|
128
|
-
a("show-record",
|
|
123
|
+
const A = V(() => {
|
|
124
|
+
const S = n.items.length === 0 ? 108 : n.items.length * 52 + 56;
|
|
125
|
+
return Math.min(S, n.maxHeight);
|
|
126
|
+
}), h = V(() => !n.canEditRecord && !n.canReadRecord ? {} : {
|
|
127
|
+
"click:row": (d, { item: p }) => {
|
|
128
|
+
a("show-record", p);
|
|
129
129
|
}
|
|
130
|
-
}),
|
|
130
|
+
}), B = V(
|
|
131
131
|
() => n.headers.filter((d) => d.type && d.key !== "actions")
|
|
132
|
-
),
|
|
133
|
-
function
|
|
134
|
-
n.showDeleteConfirm ? (
|
|
132
|
+
), C = V(() => n.headers.some((d) => d.key === "actions"));
|
|
133
|
+
function J(d) {
|
|
134
|
+
n.showDeleteConfirm ? (m.value = d, s.value = !0) : a("delete-record", d);
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
a("delete-record",
|
|
136
|
+
function K() {
|
|
137
|
+
a("delete-record", m.value), s.value = !1, m.value = null;
|
|
138
138
|
}
|
|
139
|
-
return (d,
|
|
140
|
-
const
|
|
141
|
-
return
|
|
142
|
-
(
|
|
139
|
+
return (d, p) => {
|
|
140
|
+
const S = v("v-img"), z = v("v-avatar"), Q = v("v-chip"), Z = v("v-icon"), G = v("v-btn"), ee = v("v-card-text"), te = v("v-spacer"), Y = v("f-button"), ae = v("v-card-actions"), le = v("f-dialog");
|
|
141
|
+
return c(), N("div", null, [
|
|
142
|
+
(c(), g(re(t.serverSide ? "v-data-table-server" : "v-data-table"), k(d.$attrs, {
|
|
143
143
|
page: l.value,
|
|
144
|
-
"onUpdate:page":
|
|
144
|
+
"onUpdate:page": p[0] || (p[0] = (r) => l.value = r),
|
|
145
145
|
"items-per-page": i.value,
|
|
146
|
-
"onUpdate:itemsPerPage":
|
|
146
|
+
"onUpdate:itemsPerPage": p[1] || (p[1] = (r) => i.value = r),
|
|
147
147
|
"sort-by": o.value,
|
|
148
|
-
"onUpdate:sortBy":
|
|
148
|
+
"onUpdate:sortBy": p[2] || (p[2] = (r) => o.value = r),
|
|
149
149
|
class: "rounded-b-lg",
|
|
150
150
|
headers: t.headers,
|
|
151
151
|
items: t.items,
|
|
@@ -153,130 +153,115 @@ const ge = /* @__PURE__ */ _({
|
|
|
153
153
|
loading: t.loading,
|
|
154
154
|
hover: t.hover,
|
|
155
155
|
density: t.density,
|
|
156
|
-
height:
|
|
156
|
+
height: A.value,
|
|
157
157
|
"show-select": t.showSelect,
|
|
158
158
|
"items-per-page-text": t.labelItemsPerPage,
|
|
159
159
|
"no-data-text": t.labelNoData
|
|
160
|
-
},
|
|
161
|
-
|
|
160
|
+
}, se(h.value)), U({ _: 2 }, [
|
|
161
|
+
P(B.value, (r) => ({
|
|
162
162
|
name: `item.${r.key}`,
|
|
163
|
-
fn:
|
|
164
|
-
|
|
165
|
-
item:
|
|
166
|
-
value: u(
|
|
163
|
+
fn: y(({ item: b }) => [
|
|
164
|
+
x(d.$slots, `item.${r.key}`, {
|
|
165
|
+
item: b,
|
|
166
|
+
value: u(b, r.key)
|
|
167
167
|
}, () => [
|
|
168
|
-
r.type === "image" ? (
|
|
168
|
+
r.type === "image" ? (c(), g(z, {
|
|
169
169
|
key: 0,
|
|
170
170
|
rounded: "lg",
|
|
171
171
|
variant: "elevated",
|
|
172
172
|
color: "white"
|
|
173
173
|
}, {
|
|
174
|
-
default:
|
|
175
|
-
F(
|
|
176
|
-
src: u(
|
|
174
|
+
default: y(() => [
|
|
175
|
+
F(S, {
|
|
176
|
+
src: u(b, r.key),
|
|
177
177
|
class: "f-data-table__logo"
|
|
178
178
|
}, null, 8, ["src"])
|
|
179
179
|
]),
|
|
180
180
|
_: 2
|
|
181
|
-
}, 1024)) : r.type === "money" ? (
|
|
181
|
+
}, 1024)) : r.type === "money" ? (c(), N("span", he, w(D(u(b, r.key))), 1)) : r.type === "status" ? (c(), g(Q, {
|
|
182
182
|
key: 2,
|
|
183
|
-
color: u(
|
|
183
|
+
color: u(b, r.key) ? "green-darken-1" : "red-darken-2",
|
|
184
184
|
size: "small"
|
|
185
185
|
}, {
|
|
186
|
-
default:
|
|
187
|
-
|
|
186
|
+
default: y(() => [
|
|
187
|
+
H(w(u(b, r.key) ? t.labelActive : t.labelPassive), 1)
|
|
188
188
|
]),
|
|
189
189
|
_: 2
|
|
190
|
-
}, 1032, ["color"])) : r.type === "boolean" ? (
|
|
190
|
+
}, 1032, ["color"])) : r.type === "boolean" ? (c(), g(Z, {
|
|
191
191
|
key: 3,
|
|
192
|
-
color: u(
|
|
192
|
+
color: u(b, r.key) ? "green-darken-1" : "red-darken-2"
|
|
193
193
|
}, {
|
|
194
|
-
default:
|
|
195
|
-
|
|
194
|
+
default: y(() => [
|
|
195
|
+
H(w(u(b, r.key) ? "mdi-check" : "mdi-close"), 1)
|
|
196
196
|
]),
|
|
197
197
|
_: 2
|
|
198
|
-
}, 1032, ["color"])) : r.type === "gsmNo" ? (
|
|
198
|
+
}, 1032, ["color"])) : r.type === "gsmNo" ? (c(), N("span", be, w($(u(b, r.key))), 1)) : X("", !0)
|
|
199
199
|
], !0)
|
|
200
200
|
])
|
|
201
201
|
})),
|
|
202
|
-
|
|
202
|
+
C.value ? {
|
|
203
203
|
name: "item.actions",
|
|
204
|
-
fn:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
t.canEditRecord || t.canReadRecord ? (
|
|
204
|
+
fn: y(({ item: r }) => [
|
|
205
|
+
x(d.$slots, "item.actions", { item: r }, () => [
|
|
206
|
+
L("div", Fe, [
|
|
207
|
+
t.canEditRecord || t.canReadRecord ? (c(), g(G, {
|
|
208
208
|
key: 0,
|
|
209
209
|
color: "primary",
|
|
210
210
|
icon: "mdi-pencil-outline",
|
|
211
211
|
variant: "text",
|
|
212
212
|
size: "small",
|
|
213
|
-
onClick:
|
|
214
|
-
}, null, 8, ["onClick"])) :
|
|
215
|
-
t.canDeleteRecord ? (
|
|
213
|
+
onClick: W((b) => a("show-record", r), ["stop"])
|
|
214
|
+
}, null, 8, ["onClick"])) : X("", !0),
|
|
215
|
+
t.canDeleteRecord ? (c(), g(G, {
|
|
216
216
|
key: 1,
|
|
217
217
|
icon: "mdi-trash-can-outline",
|
|
218
218
|
variant: "text",
|
|
219
219
|
size: "small",
|
|
220
220
|
color: "red-darken-2",
|
|
221
|
-
onClick:
|
|
222
|
-
}, null, 8, ["onClick"])) :
|
|
221
|
+
onClick: W((b) => J(r), ["stop"])
|
|
222
|
+
}, null, 8, ["onClick"])) : X("", !0)
|
|
223
223
|
])
|
|
224
224
|
], !0)
|
|
225
225
|
]),
|
|
226
226
|
key: "0"
|
|
227
227
|
} : void 0,
|
|
228
|
-
|
|
229
|
-
name:
|
|
230
|
-
fn:
|
|
231
|
-
|
|
228
|
+
P(d.$slots, (r, b) => ({
|
|
229
|
+
name: b,
|
|
230
|
+
fn: y((ne) => [
|
|
231
|
+
x(d.$slots, b, E(O(ne ?? {})), void 0, !0)
|
|
232
232
|
])
|
|
233
233
|
}))
|
|
234
234
|
]), 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
|
-
F(
|
|
235
|
+
F(le, {
|
|
236
236
|
modelValue: s.value,
|
|
237
|
-
"onUpdate:modelValue":
|
|
238
|
-
"max-width": "400"
|
|
237
|
+
"onUpdate:modelValue": p[4] || (p[4] = (r) => s.value = r),
|
|
238
|
+
"max-width": "400",
|
|
239
|
+
"hide-close": !0
|
|
239
240
|
}, {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
]),
|
|
265
|
-
_: 1
|
|
266
|
-
}),
|
|
267
|
-
F(j, {
|
|
268
|
-
color: "red-darken-2",
|
|
269
|
-
variant: "flat",
|
|
270
|
-
onClick: J
|
|
271
|
-
}, {
|
|
272
|
-
default: m(() => [
|
|
273
|
-
M(k(t.labelDeleteConfirm), 1)
|
|
274
|
-
]),
|
|
275
|
-
_: 1
|
|
276
|
-
})
|
|
277
|
-
]),
|
|
278
|
-
_: 1
|
|
279
|
-
})
|
|
241
|
+
header: y(() => [
|
|
242
|
+
L("div", Ve, w(t.labelDeleteTitle), 1)
|
|
243
|
+
]),
|
|
244
|
+
default: y(() => [
|
|
245
|
+
F(ee, null, {
|
|
246
|
+
default: y(() => [
|
|
247
|
+
H(w(t.deleteMessageFormatter && m.value ? t.deleteMessageFormatter(m.value) : t.labelDeleteMessage), 1)
|
|
248
|
+
]),
|
|
249
|
+
_: 1
|
|
250
|
+
}),
|
|
251
|
+
F(ae, null, {
|
|
252
|
+
default: y(() => [
|
|
253
|
+
F(te),
|
|
254
|
+
F(Y, {
|
|
255
|
+
variant: "plain",
|
|
256
|
+
color: "red-darken-2",
|
|
257
|
+
text: t.labelDeleteCancel,
|
|
258
|
+
onClick: p[3] || (p[3] = (r) => s.value = !1)
|
|
259
|
+
}, null, 8, ["text"]),
|
|
260
|
+
F(Y, {
|
|
261
|
+
variant: "tonal",
|
|
262
|
+
text: t.labelDeleteConfirm,
|
|
263
|
+
onClick: K
|
|
264
|
+
}, null, 8, ["text"])
|
|
280
265
|
]),
|
|
281
266
|
_: 1
|
|
282
267
|
})
|
|
@@ -291,7 +276,7 @@ const ge = /* @__PURE__ */ _({
|
|
|
291
276
|
for (const [a, l] of e)
|
|
292
277
|
n[a] = l;
|
|
293
278
|
return n;
|
|
294
|
-
}, De = /* @__PURE__ */ ke(_e, [["__scopeId", "data-v-
|
|
279
|
+
}, De = /* @__PURE__ */ ke(_e, [["__scopeId", "data-v-f628243a"]]);
|
|
295
280
|
var $e = /* @__PURE__ */ ((t) => (t.IMAGE = "image", t.MONEY = "money", t.STATUS = "status", t.BOOLEAN = "boolean", t.GSM_NO = "gsmNo", t))($e || {});
|
|
296
281
|
const Be = /* @__PURE__ */ _({
|
|
297
282
|
name: "FTextarea",
|
|
@@ -311,13 +296,13 @@ const Be = /* @__PURE__ */ _({
|
|
|
311
296
|
rules: { type: [String, Function], default: "" }
|
|
312
297
|
},
|
|
313
298
|
setup(t) {
|
|
314
|
-
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } =
|
|
299
|
+
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } = M(() => e.name, n, {
|
|
315
300
|
initialValue: e.modelValue,
|
|
316
301
|
syncVModel: !0
|
|
317
302
|
});
|
|
318
|
-
return (i, o) => (
|
|
319
|
-
modelValue:
|
|
320
|
-
"onUpdate:modelValue": o[0] || (o[0] = (s) =>
|
|
303
|
+
return (i, o) => (c(), g(f(ie), k(i.$attrs, {
|
|
304
|
+
modelValue: f(l),
|
|
305
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => I(l) ? l.value = s : null),
|
|
321
306
|
name: e.name,
|
|
322
307
|
rounded: e.rounded,
|
|
323
308
|
variant: e.variant,
|
|
@@ -327,7 +312,7 @@ const Be = /* @__PURE__ */ _({
|
|
|
327
312
|
label: e.label,
|
|
328
313
|
"hide-details": e.hideDetails,
|
|
329
314
|
"no-resize": e.noResize,
|
|
330
|
-
"error-messages":
|
|
315
|
+
"error-messages": f(a)
|
|
331
316
|
}), null, 16, ["modelValue", "name", "rounded", "variant", "rows", "density", "color", "label", "hide-details", "no-resize", "error-messages"]));
|
|
332
317
|
}
|
|
333
318
|
}), we = /* @__PURE__ */ _({
|
|
@@ -350,18 +335,18 @@ const Be = /* @__PURE__ */ _({
|
|
|
350
335
|
},
|
|
351
336
|
emits: ["change"],
|
|
352
337
|
setup(t, { emit: e }) {
|
|
353
|
-
const n = e, a = t, l = V(() => a.rules), { errorMessage: i, value: o } =
|
|
338
|
+
const n = e, a = t, l = V(() => a.rules), { errorMessage: i, value: o } = M(() => a.name, l, {
|
|
354
339
|
initialValue: a.modelValue,
|
|
355
340
|
syncVModel: !0
|
|
356
341
|
});
|
|
357
|
-
function s(
|
|
358
|
-
n("change",
|
|
342
|
+
function s(m) {
|
|
343
|
+
n("change", m);
|
|
359
344
|
}
|
|
360
|
-
return (
|
|
361
|
-
modelValue:
|
|
345
|
+
return (m, u) => (c(), g(f(ue), k(m.$attrs, {
|
|
346
|
+
modelValue: f(o),
|
|
362
347
|
"onUpdate:modelValue": [
|
|
363
|
-
u[0] || (u[0] = (
|
|
364
|
-
u[1] || (u[1] = (
|
|
348
|
+
u[0] || (u[0] = (D) => I(o) ? o.value = D : null),
|
|
349
|
+
u[1] || (u[1] = (D) => s(f(o)))
|
|
365
350
|
],
|
|
366
351
|
name: a.name,
|
|
367
352
|
items: a.items,
|
|
@@ -373,18 +358,18 @@ const Be = /* @__PURE__ */ _({
|
|
|
373
358
|
"hide-details": a.hideDetails,
|
|
374
359
|
"return-object": a.returnObject,
|
|
375
360
|
"no-data-text": a.noDataText,
|
|
376
|
-
"error-messages":
|
|
361
|
+
"error-messages": f(i),
|
|
377
362
|
"menu-props": { maxWidth: 0 }
|
|
378
|
-
}),
|
|
379
|
-
|
|
380
|
-
name:
|
|
381
|
-
fn:
|
|
382
|
-
|
|
363
|
+
}), U({ _: 2 }, [
|
|
364
|
+
P(m.$slots, (D, $) => ({
|
|
365
|
+
name: $,
|
|
366
|
+
fn: y((A) => [
|
|
367
|
+
x(m.$slots, $, E(O(A ?? {})))
|
|
383
368
|
])
|
|
384
369
|
}))
|
|
385
370
|
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "clearable", "hide-details", "return-object", "no-data-text", "error-messages"]));
|
|
386
371
|
}
|
|
387
|
-
}),
|
|
372
|
+
}), xe = /* @__PURE__ */ _({
|
|
388
373
|
name: "FCheckbox",
|
|
389
374
|
inheritAttrs: !1,
|
|
390
375
|
__name: "FCheckbox",
|
|
@@ -396,14 +381,14 @@ const Be = /* @__PURE__ */ _({
|
|
|
396
381
|
},
|
|
397
382
|
setup(t) {
|
|
398
383
|
const e = t;
|
|
399
|
-
return (n, a) => (
|
|
384
|
+
return (n, a) => (c(), g(f(ce), k(n.$attrs, {
|
|
400
385
|
color: e.color,
|
|
401
386
|
"hide-details": e.hideDetails,
|
|
402
387
|
indeterminate: e.indeterminate,
|
|
403
388
|
density: e.density
|
|
404
389
|
}), null, 16, ["color", "hide-details", "indeterminate", "density"]));
|
|
405
390
|
}
|
|
406
|
-
}),
|
|
391
|
+
}), Ce = /* @__PURE__ */ _({
|
|
407
392
|
name: "FCurrencyField",
|
|
408
393
|
inheritAttrs: !1,
|
|
409
394
|
__name: "FCurrencyField",
|
|
@@ -423,7 +408,7 @@ const Be = /* @__PURE__ */ _({
|
|
|
423
408
|
rules: { type: [String, Function], default: "" }
|
|
424
409
|
},
|
|
425
410
|
setup(t) {
|
|
426
|
-
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } =
|
|
411
|
+
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } = M(() => e.name, n, {
|
|
427
412
|
initialValue: e.modelValue,
|
|
428
413
|
syncVModel: !0
|
|
429
414
|
}), i = V(
|
|
@@ -433,30 +418,30 @@ const Be = /* @__PURE__ */ _({
|
|
|
433
418
|
minimumFractionDigits: e.precision,
|
|
434
419
|
maximumFractionDigits: e.precision
|
|
435
420
|
})
|
|
436
|
-
), o =
|
|
437
|
-
function s(
|
|
438
|
-
return
|
|
421
|
+
), o = j(s(e.modelValue));
|
|
422
|
+
function s(h) {
|
|
423
|
+
return h == null || isNaN(h) ? "" : i.value.format(h);
|
|
439
424
|
}
|
|
440
|
-
function
|
|
441
|
-
const
|
|
442
|
-
return isNaN(
|
|
425
|
+
function m(h) {
|
|
426
|
+
const B = h.replace(/[^\d,.-]/g, "").replace(/\./g, "").replace(",", "."), C = parseFloat(B);
|
|
427
|
+
return isNaN(C) ? null : Math.round(C * Math.pow(10, e.precision)) / Math.pow(10, e.precision);
|
|
443
428
|
}
|
|
444
|
-
const u =
|
|
445
|
-
function
|
|
446
|
-
const
|
|
447
|
-
o.value =
|
|
429
|
+
const u = j(!1);
|
|
430
|
+
function D(h) {
|
|
431
|
+
const B = h.target;
|
|
432
|
+
o.value = B.value, l.value = m(B.value);
|
|
448
433
|
}
|
|
449
|
-
function
|
|
434
|
+
function $() {
|
|
450
435
|
u.value = !1, o.value = s(l.value);
|
|
451
436
|
}
|
|
452
|
-
function
|
|
437
|
+
function A(h) {
|
|
453
438
|
u.value = !0;
|
|
454
|
-
const
|
|
455
|
-
|
|
439
|
+
const B = h.target, C = l.value;
|
|
440
|
+
C != null ? o.value = C.toFixed(e.precision).replace(".", ",") : o.value = "", setTimeout(() => B.select(), 0);
|
|
456
441
|
}
|
|
457
|
-
return
|
|
458
|
-
l.value =
|
|
459
|
-
}), (
|
|
442
|
+
return de(() => e.modelValue, (h) => {
|
|
443
|
+
l.value = h, u.value || (o.value = s(h));
|
|
444
|
+
}), (h, B) => (c(), g(f(q), k(h.$attrs, {
|
|
460
445
|
"model-value": o.value,
|
|
461
446
|
name: e.name,
|
|
462
447
|
label: e.label,
|
|
@@ -466,14 +451,14 @@ const Be = /* @__PURE__ */ _({
|
|
|
466
451
|
variant: e.variant,
|
|
467
452
|
density: e.density,
|
|
468
453
|
color: e.color,
|
|
469
|
-
"error-messages":
|
|
454
|
+
"error-messages": f(a),
|
|
470
455
|
inputmode: "decimal",
|
|
471
|
-
onInput:
|
|
472
|
-
onBlur:
|
|
473
|
-
onFocus:
|
|
456
|
+
onInput: D,
|
|
457
|
+
onBlur: $,
|
|
458
|
+
onFocus: A
|
|
474
459
|
}), null, 16, ["model-value", "name", "label", "readonly", "hide-details", "rounded", "variant", "density", "color", "error-messages"]));
|
|
475
460
|
}
|
|
476
|
-
}),
|
|
461
|
+
}), Se = /* @__PURE__ */ _({
|
|
477
462
|
name: "FSelect",
|
|
478
463
|
inheritAttrs: !1,
|
|
479
464
|
__name: "FSelect",
|
|
@@ -490,13 +475,13 @@ const Be = /* @__PURE__ */ _({
|
|
|
490
475
|
rules: { type: [String, Function], default: "" }
|
|
491
476
|
},
|
|
492
477
|
setup(t) {
|
|
493
|
-
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } =
|
|
478
|
+
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } = M(() => e.name, n, {
|
|
494
479
|
initialValue: e.modelValue,
|
|
495
480
|
syncVModel: !0
|
|
496
481
|
});
|
|
497
|
-
return (i, o) => (
|
|
498
|
-
modelValue:
|
|
499
|
-
"onUpdate:modelValue": o[0] || (o[0] = (s) =>
|
|
482
|
+
return (i, o) => (c(), g(f(me), k(i.$attrs, {
|
|
483
|
+
modelValue: f(l),
|
|
484
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => I(l) ? l.value = s : null),
|
|
500
485
|
name: e.name,
|
|
501
486
|
items: e.items,
|
|
502
487
|
rounded: e.rounded,
|
|
@@ -505,12 +490,12 @@ const Be = /* @__PURE__ */ _({
|
|
|
505
490
|
color: e.color,
|
|
506
491
|
"hide-details": e.hideDetails,
|
|
507
492
|
"return-object": e.returnObject,
|
|
508
|
-
"error-messages":
|
|
509
|
-
}),
|
|
510
|
-
|
|
511
|
-
name:
|
|
512
|
-
fn:
|
|
513
|
-
|
|
493
|
+
"error-messages": f(a)
|
|
494
|
+
}), U({ _: 2 }, [
|
|
495
|
+
P(i.$slots, (s, m) => ({
|
|
496
|
+
name: m,
|
|
497
|
+
fn: y((u) => [
|
|
498
|
+
x(i.$slots, m, E(O(u ?? {})))
|
|
514
499
|
])
|
|
515
500
|
}))
|
|
516
501
|
]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "hide-details", "return-object", "error-messages"]));
|
|
@@ -539,13 +524,13 @@ const Be = /* @__PURE__ */ _({
|
|
|
539
524
|
rules: { type: [String, Function], default: "" }
|
|
540
525
|
},
|
|
541
526
|
setup(t) {
|
|
542
|
-
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } =
|
|
527
|
+
const e = t, n = V(() => e.rules), { errorMessage: a, value: l } = M(() => e.name, n, {
|
|
543
528
|
initialValue: e.modelValue,
|
|
544
529
|
syncVModel: !0
|
|
545
530
|
});
|
|
546
|
-
return (i, o) => (
|
|
547
|
-
modelValue:
|
|
548
|
-
"onUpdate:modelValue": o[0] || (o[0] = (s) =>
|
|
531
|
+
return (i, o) => (c(), g(f(fe), k(i.$attrs, {
|
|
532
|
+
modelValue: f(l),
|
|
533
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => I(l) ? l.value = s : null),
|
|
549
534
|
name: e.name,
|
|
550
535
|
color: e.color,
|
|
551
536
|
density: e.density,
|
|
@@ -561,14 +546,14 @@ const Be = /* @__PURE__ */ _({
|
|
|
561
546
|
min: e.min,
|
|
562
547
|
precision: e.precision,
|
|
563
548
|
inset: e.inset,
|
|
564
|
-
"error-messages":
|
|
549
|
+
"error-messages": f(a)
|
|
565
550
|
}), null, 16, ["modelValue", "name", "color", "density", "rounded", "variant", "control-variant", "hide-details", "placeholder", "label", "prefix", "disabled", "readonly", "min", "precision", "inset", "error-messages"]));
|
|
566
551
|
}
|
|
567
552
|
}), Ae = { key: 0 }, Re = { key: 1 }, Ne = /* @__PURE__ */ _({
|
|
568
553
|
name: "FSwitch",
|
|
569
554
|
inheritAttrs: !1,
|
|
570
555
|
__name: "FSwitch",
|
|
571
|
-
props: /* @__PURE__ */
|
|
556
|
+
props: /* @__PURE__ */ T({
|
|
572
557
|
color: { default: "secondary" },
|
|
573
558
|
density: { default: "comfortable" },
|
|
574
559
|
hideDetails: { type: [Boolean, String], default: "auto" },
|
|
@@ -580,18 +565,18 @@ const Be = /* @__PURE__ */ _({
|
|
|
580
565
|
}),
|
|
581
566
|
emits: ["update:modelValue"],
|
|
582
567
|
setup(t) {
|
|
583
|
-
const e = t, n =
|
|
584
|
-
return (a, l) => (
|
|
568
|
+
const e = t, n = R(t, "modelValue");
|
|
569
|
+
return (a, l) => (c(), g(f(pe), k(a.$attrs, {
|
|
585
570
|
modelValue: n.value,
|
|
586
571
|
"onUpdate:modelValue": l[0] || (l[0] = (i) => n.value = i),
|
|
587
572
|
color: e.color,
|
|
588
573
|
"hide-details": e.hideDetails,
|
|
589
574
|
density: e.density
|
|
590
|
-
}),
|
|
575
|
+
}), U({ _: 2 }, [
|
|
591
576
|
e.labelTrue || e.labelFalse ? {
|
|
592
577
|
name: "label",
|
|
593
|
-
fn:
|
|
594
|
-
n.value ? (
|
|
578
|
+
fn: y(() => [
|
|
579
|
+
n.value ? (c(), N("span", Ae, w(e.labelTrue), 1)) : (c(), N("span", Re, w(e.labelFalse), 1))
|
|
595
580
|
]),
|
|
596
581
|
key: "0"
|
|
597
582
|
} : void 0
|
|
@@ -601,52 +586,54 @@ const Be = /* @__PURE__ */ _({
|
|
|
601
586
|
name: "FDialog",
|
|
602
587
|
inheritAttrs: !1,
|
|
603
588
|
__name: "FDialog",
|
|
604
|
-
props: /* @__PURE__ */
|
|
589
|
+
props: /* @__PURE__ */ T({
|
|
605
590
|
width: { default: 750 },
|
|
606
591
|
persistent: { type: Boolean, default: !0 },
|
|
607
|
-
transition: { default: "slide-y-transition" }
|
|
592
|
+
transition: { default: "slide-y-transition" },
|
|
593
|
+
hideClose: { type: Boolean, default: !1 }
|
|
608
594
|
}, {
|
|
609
595
|
modelValue: { type: Boolean },
|
|
610
596
|
modelModifiers: {}
|
|
611
597
|
}),
|
|
612
|
-
emits: /* @__PURE__ */
|
|
598
|
+
emits: /* @__PURE__ */ T(["closeDialog"], ["update:modelValue"]),
|
|
613
599
|
setup(t) {
|
|
614
|
-
const e = t, n =
|
|
600
|
+
const e = t, n = R(t, "modelValue");
|
|
615
601
|
return (a, l) => {
|
|
616
|
-
const i =
|
|
617
|
-
return
|
|
602
|
+
const i = v("v-btn"), o = v("v-card-title"), s = v("v-divider"), m = v("v-card-text"), u = v("v-card"), D = v("v-dialog");
|
|
603
|
+
return c(), g(D, k(a.$attrs, {
|
|
618
604
|
modelValue: n.value,
|
|
619
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
605
|
+
"onUpdate:modelValue": l[1] || (l[1] = ($) => n.value = $),
|
|
620
606
|
transition: e.transition,
|
|
621
607
|
class: "f-dialog",
|
|
622
608
|
width: e.width,
|
|
623
609
|
persistent: e.persistent
|
|
624
610
|
}), {
|
|
625
|
-
default:
|
|
611
|
+
default: y(() => [
|
|
626
612
|
F(u, {
|
|
627
613
|
class: "f-dialog-card",
|
|
628
614
|
density: "default",
|
|
629
615
|
variant: "elevated",
|
|
630
616
|
rounded: "lg"
|
|
631
617
|
}, {
|
|
632
|
-
default:
|
|
618
|
+
default: y(() => [
|
|
633
619
|
F(o, { class: "d-flex justify-space-between align-center" }, {
|
|
634
|
-
default:
|
|
635
|
-
|
|
636
|
-
|
|
620
|
+
default: y(() => [
|
|
621
|
+
L("header", null, [
|
|
622
|
+
x(a.$slots, "header")
|
|
637
623
|
]),
|
|
638
|
-
|
|
624
|
+
e.hideClose ? X("", !0) : (c(), g(i, {
|
|
625
|
+
key: 0,
|
|
639
626
|
icon: "mdi-close",
|
|
640
627
|
variant: "text",
|
|
641
|
-
onClick: l[0] || (l[0] = (
|
|
642
|
-
})
|
|
628
|
+
onClick: l[0] || (l[0] = ($) => a.$emit("closeDialog"))
|
|
629
|
+
}))
|
|
643
630
|
]),
|
|
644
631
|
_: 3
|
|
645
632
|
}),
|
|
646
633
|
F(s),
|
|
647
|
-
F(
|
|
648
|
-
default:
|
|
649
|
-
|
|
634
|
+
F(m, { class: "py-4 px-1 overflow-auto overflow-x-hidden" }, {
|
|
635
|
+
default: y(() => [
|
|
636
|
+
x(a.$slots, "default")
|
|
650
637
|
]),
|
|
651
638
|
_: 3
|
|
652
639
|
})
|
|
@@ -660,21 +647,21 @@ const Be = /* @__PURE__ */ _({
|
|
|
660
647
|
}
|
|
661
648
|
}), je = {
|
|
662
649
|
install(t) {
|
|
663
|
-
t.component("FButton",
|
|
650
|
+
t.component("FButton", ve), t.component("FTextField", ge), t.component("FDataTable", De), t.component("FTextarea", Be), t.component("FAutocomplete", we), t.component("FCheckbox", xe), t.component("FCurrencyField", Ce), t.component("FSelect", Se), t.component("FNumberField", Me), t.component("FSwitch", Ne), t.component("FDialog", Pe);
|
|
664
651
|
}
|
|
665
652
|
};
|
|
666
653
|
export {
|
|
667
654
|
we as FAutocomplete,
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
655
|
+
ve as FButton,
|
|
656
|
+
xe as FCheckbox,
|
|
657
|
+
Ce as FCurrencyField,
|
|
671
658
|
De as FDataTable,
|
|
672
659
|
$e as FDataTableHeaderType,
|
|
673
660
|
Pe as FDialog,
|
|
674
661
|
Me as FNumberField,
|
|
675
|
-
|
|
662
|
+
Se as FSelect,
|
|
676
663
|
Ne as FSwitch,
|
|
677
|
-
|
|
664
|
+
ge as FTextField,
|
|
678
665
|
Be as FTextarea,
|
|
679
666
|
je as default
|
|
680
667
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,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):(u=typeof globalThis<"u"?globalThis:u||self,e(u.FinsoVueComponents={},u.Vue,u.VuetifyComponents,u.MaskaVue,u.VeeValidate))})(this,(function(u,e,b,j,F){"use strict";const S=e.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(o){const t=o;return(a,n)=>{const l=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(l,{color:t.color,rounded:t.rounded},null,8,["color","rounded"])}}}),x=e.defineComponent({name:"FTextField",inheritAttrs:!1,__name:"FTextField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},appendInnerIcon:{default:""},mask:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},emits:["clickAppendInner"],setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,r)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(b.VTextField),e.mergeProps(c.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=s=>e.isRef(l)?l.value=s:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,clearable:t.clearable,"hide-details":t.hideDetails,"error-messages":e.unref(n),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":r[1]||(r[1]=s=>c.$emit("clickAppendInner"))}),e.createSlots({_:2},[e.renderList(c.$slots,(s,f)=>({name:f,fn:e.withCtx(m=>[e.renderSlot(c.$slots,f,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref(j.vMaska),t.mask]])}}),z={key:1},O={key:4},X={class:"f-data-table__actions"},$=((o,t)=>{const a=o.__vccOpts||o;for(const[n,l]of t)a[n]=l;return a})(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 a=o,n=t,l=e.useModel(o,"page"),c=e.useModel(o,"itemsPerPage"),r=e.useModel(o,"sortBy"),s=e.ref(!1),f=e.ref(null);function m(i,p){return p.split(".").reduce((B,w)=>B==null?void 0:B[w],i)}function h(i){return i==null?"":new Intl.NumberFormat(a.moneyLocale,{style:"currency",currency:a.moneyCurrency}).format(i)}function k(i){if(!i)return"";const p=i.replace(/\D/g,"");return p.length<10?i:`(${p.substring(0,3)}) ${p.substring(3,6)} ${p.substring(6,10)}`}const _=e.computed(()=>{const B=a.items.length*52+56;return Math.min(B,a.maxHeight)}),y=e.computed(()=>!a.canEditRecord&&!a.canReadRecord?{}:{"click:row":(i,{item:p})=>{n("show-record",p)}}),V=e.computed(()=>a.headers.filter(i=>i.type&&i.key!=="actions")),C=e.computed(()=>a.headers.some(i=>i.key==="actions"));function G(i){a.showDeleteConfirm?(f.value=i,s.value=!0):n("delete-record",i)}function Y(){n("delete-record",f.value),s.value=!1,f.value=null}return(i,p)=>{const B=e.resolveComponent("v-img"),w=e.resolveComponent("v-avatar"),W=e.resolveComponent("v-chip"),J=e.resolveComponent("v-icon"),D=e.resolveComponent("v-btn"),K=e.resolveComponent("v-card-title"),Q=e.resolveComponent("v-card-text"),Z=e.resolveComponent("v-spacer"),v=e.resolveComponent("v-card-actions"),ee=e.resolveComponent("v-card"),te=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(i.$attrs,{page:l.value,"onUpdate:page":p[0]||(p[0]=d=>l.value=d),"items-per-page":c.value,"onUpdate:itemsPerPage":p[1]||(p[1]=d=>c.value=d),"sort-by":r.value,"onUpdate:sortBy":p[2]||(p[2]=d=>r.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:_.value,"show-select":o.showSelect,"items-per-page-text":o.labelItemsPerPage,"no-data-text":o.labelNoData},e.toHandlers(y.value)),e.createSlots({_:2},[e.renderList(V.value,d=>({name:`item.${d.key}`,fn:e.withCtx(({item:g})=>[e.renderSlot(i.$slots,`item.${d.key}`,{item:g,value:m(g,d.key)},()=>[d.type==="image"?(e.openBlock(),e.createBlock(w,{key:0,rounded:"lg",variant:"elevated",color:"white"},{default:e.withCtx(()=>[e.createVNode(B,{src:m(g,d.key),class:"f-data-table__logo"},null,8,["src"])]),_:2},1024)):d.type==="money"?(e.openBlock(),e.createElementBlock("span",z,e.toDisplayString(h(m(g,d.key))),1)):d.type==="status"?(e.openBlock(),e.createBlock(W,{key:2,color:m(g,d.key)?"green-darken-1":"red-darken-2",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(g,d.key)?o.labelActive:o.labelPassive),1)]),_:2},1032,["color"])):d.type==="boolean"?(e.openBlock(),e.createBlock(J,{key:3,color:m(g,d.key)?"green-darken-1":"red-darken-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(g,d.key)?"mdi-check":"mdi-close"),1)]),_:2},1032,["color"])):d.type==="gsmNo"?(e.openBlock(),e.createElementBlock("span",O,e.toDisplayString(k(m(g,d.key))),1)):e.createCommentVNode("",!0)],!0)])})),C.value?{name:"item.actions",fn:e.withCtx(({item:d})=>[e.renderSlot(i.$slots,"item.actions",{item:d},()=>[e.createElementVNode("div",X,[o.canEditRecord||o.canReadRecord?(e.openBlock(),e.createBlock(D,{key:0,color:"primary",icon:"mdi-pencil-outline",variant:"text",size:"small",onClick:e.withModifiers(g=>n("show-record",d),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),o.canDeleteRecord?(e.openBlock(),e.createBlock(D,{key:1,icon:"mdi-trash-can-outline",variant:"text",size:"small",color:"red-darken-2",onClick:e.withModifiers(g=>G(d),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0)])],!0)]),key:"0"}:void 0,e.renderList(i.$slots,(d,g)=>({name:g,fn:e.withCtx(oe=>[e.renderSlot(i.$slots,g,e.normalizeProps(e.guardReactiveProps(oe??{})),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(te,{modelValue:s.value,"onUpdate:modelValue":p[4]||(p[4]=d=>s.value=d),"max-width":"400"},{default:e.withCtx(()=>[e.createVNode(ee,null,{default:e.withCtx(()=>[e.createVNode(K,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.labelDeleteTitle),1)]),_:1}),e.createVNode(Q,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.deleteMessageFormatter&&f.value?o.deleteMessageFormatter(f.value):o.labelDeleteMessage),1)]),_:1}),e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(Z),e.createVNode(D,{variant:"text",onClick:p[3]||(p[3]=d=>s.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.labelDeleteCancel),1)]),_:1}),e.createVNode(D,{color:"red-darken-2",variant:"flat",onClick:Y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.labelDeleteConfirm),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-6f315b52"]]);var M=(o=>(o.IMAGE="image",o.MONEY="money",o.STATUS="status",o.BOOLEAN="boolean",o.GSM_NO="gsmNo",o))(M||{});const N=e.defineComponent({name:"FTextarea",inheritAttrs:!1,__name:"FTextarea",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},label:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},noResize:{type:Boolean,default:!0},rows:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,r)=>(e.openBlock(),e.createBlock(e.unref(b.VTextarea),e.mergeProps(c.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=s=>e.isRef(l)?l.value=s:null),name:t.name,rounded:t.rounded,variant:t.variant,rows:t.rows,density:t.density,color:t.color,label:t.label,"hide-details":t.hideDetails,"no-resize":t.noResize,"error-messages":e.unref(n)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),P=e.defineComponent({name:"FAutocomplete",inheritAttrs:!1,__name:"FAutocomplete",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!0},noDataText:{default:""},modelValue:{default:null},rules:{type:[String,Function],default:""}},emits:["change"],setup(o,{emit:t}){const a=t,n=o,l=e.computed(()=>n.rules),{errorMessage:c,value:r}=F.useField(()=>n.name,l,{initialValue:n.modelValue,syncVModel:!0});function s(f){a("change",f)}return(f,m)=>(e.openBlock(),e.createBlock(e.unref(b.VAutocomplete),e.mergeProps(f.$attrs,{modelValue:e.unref(r),"onUpdate:modelValue":[m[0]||(m[0]=h=>e.isRef(r)?r.value=h:null),m[1]||(m[1]=h=>s(e.unref(r)))],name:n.name,items:n.items,rounded:n.rounded,variant:n.variant,density:n.density,color:n.color,clearable:n.clearable,"hide-details":n.hideDetails,"return-object":n.returnObject,"no-data-text":n.noDataText,"error-messages":e.unref(c),"menu-props":{maxWidth:0}}),e.createSlots({_:2},[e.renderList(f.$slots,(h,k)=>({name:k,fn:e.withCtx(_=>[e.renderSlot(f.$slots,k,e.normalizeProps(e.guardReactiveProps(_??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","clearable","hide-details","return-object","no-data-text","error-messages"]))}}),T=e.defineComponent({name:"FCheckbox",inheritAttrs:!1,__name:"FCheckbox",props:{color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},indeterminate:{type:Boolean,default:!1},density:{default:"compact"}},setup(o){const t=o;return(a,n)=>(e.openBlock(),e.createBlock(e.unref(b.VCheckbox),e.mergeProps(a.$attrs,{color:t.color,"hide-details":t.hideDetails,indeterminate:t.indeterminate,density:t.density}),null,16,["color","hide-details","indeterminate","density"]))}}),R=e.defineComponent({name:"FCurrencyField",inheritAttrs:!1,__name:"FCurrencyField",props:{name:{},label:{default:""},readonly:{type:Boolean,default:!1},hideDetails:{type:[Boolean,String],default:"auto"},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},locale:{default:"tr-TR"},currency:{default:"TRY"},precision:{default:2},modelValue:{default:null},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0}),c=e.computed(()=>new Intl.NumberFormat(t.locale,{style:"currency",currency:t.currency,minimumFractionDigits:t.precision,maximumFractionDigits:t.precision})),r=e.ref(s(t.modelValue));function s(y){return y==null||isNaN(y)?"":c.value.format(y)}function f(y){const V=y.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),C=parseFloat(V);return isNaN(C)?null:Math.round(C*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const m=e.ref(!1);function h(y){const V=y.target;r.value=V.value,l.value=f(V.value)}function k(){m.value=!1,r.value=s(l.value)}function _(y){m.value=!0;const V=y.target,C=l.value;C!=null?r.value=C.toFixed(t.precision).replace(".",","):r.value="",setTimeout(()=>V.select(),0)}return e.watch(()=>t.modelValue,y=>{l.value=y,m.value||(r.value=s(y))}),(y,V)=>(e.openBlock(),e.createBlock(e.unref(b.VTextField),e.mergeProps(y.$attrs,{"model-value":r.value,name:t.name,label:t.label,readonly:t.readonly,"hide-details":t.hideDetails,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"error-messages":e.unref(n),inputmode:"decimal",onInput:h,onBlur:k,onFocus:_}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),A=e.defineComponent({name:"FSelect",inheritAttrs:!1,__name:"FSelect",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!1},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,r)=>(e.openBlock(),e.createBlock(e.unref(b.VSelect),e.mergeProps(c.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=s=>e.isRef(l)?l.value=s:null),name:t.name,items:t.items,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"hide-details":t.hideDetails,"return-object":t.returnObject,"error-messages":e.unref(n)}),e.createSlots({_:2},[e.renderList(c.$slots,(s,f)=>({name:f,fn:e.withCtx(m=>[e.renderSlot(c.$slots,f,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),I=e.defineComponent({name:"FNumberField",inheritAttrs:!1,__name:"FNumberField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},controlVariant:{default:"stacked"},color:{default:"secondary"},label:{default:""},placeholder:{default:""},prefix:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},min:{default:0},precision:{default:0},inset:{type:Boolean,default:!0},modelValue:{default:-1},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,r)=>(e.openBlock(),e.createBlock(e.unref(b.VNumberInput),e.mergeProps(c.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=s=>e.isRef(l)?l.value=s:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,"control-variant":t.controlVariant,"hide-details":t.hideDetails,placeholder:t.placeholder,label:t.label,prefix:t.prefix,disabled:t.disabled,readonly:t.readonly,min:t.min,precision:t.precision,inset:t.inset,"error-messages":e.unref(n)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),L={key:0},H={key:1},E=e.defineComponent({name:"FSwitch",inheritAttrs:!1,__name:"FSwitch",props:e.mergeModels({color:{default:"secondary"},density:{default:"comfortable"},hideDetails:{type:[Boolean,String],default:"auto"},labelTrue:{default:""},labelFalse:{default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,a=e.useModel(o,"modelValue");return(n,l)=>(e.openBlock(),e.createBlock(e.unref(b.VSwitch),e.mergeProps(n.$attrs,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c),color:t.color,"hide-details":t.hideDetails,density:t.density}),e.createSlots({_:2},[t.labelTrue||t.labelFalse?{name:"label",fn:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("span",L,e.toDisplayString(t.labelTrue),1)):(e.openBlock(),e.createElementBlock("span",H,e.toDisplayString(t.labelFalse),1))]),key:"0"}:void 0]),1040,["modelValue","color","hide-details","density"]))}}),U=e.defineComponent({name:"FDialog",inheritAttrs:!1,__name:"FDialog",props:e.mergeModels({width:{default:750},persistent:{type:Boolean,default:!0},transition:{default:"slide-y-transition"}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["closeDialog"],["update:modelValue"]),setup(o){const t=o,a=e.useModel(o,"modelValue");return(n,l)=>{const c=e.resolveComponent("v-btn"),r=e.resolveComponent("v-card-title"),s=e.resolveComponent("v-divider"),f=e.resolveComponent("v-card-text"),m=e.resolveComponent("v-card"),h=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(h,e.mergeProps(n.$attrs,{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=k=>a.value=k),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(r,{class:"d-flex justify-space-between align-center"},{default:e.withCtx(()=>[e.createElementVNode("header",null,[e.renderSlot(n.$slots,"header")]),e.createVNode(c,{icon:"mdi-close",variant:"text",onClick:l[0]||(l[0]=k=>n.$emit("closeDialog"))})]),_:3}),e.createVNode(s),e.createVNode(f,{class:"py-4 px-1 overflow-auto overflow-x-hidden"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3})]),_:3})]),_:3},16,["modelValue","transition","width","persistent"])}}}),q={install(o){o.component("FButton",S),o.component("FTextField",x),o.component("FDataTable",$),o.component("FTextarea",N),o.component("FAutocomplete",P),o.component("FCheckbox",T),o.component("FCurrencyField",R),o.component("FSelect",A),o.component("FNumberField",I),o.component("FSwitch",E),o.component("FDialog",U)}};u.FAutocomplete=P,u.FButton=S,u.FCheckbox=T,u.FCurrencyField=R,u.FDataTable=$,u.FDataTableHeaderType=M,u.FDialog=U,u.FNumberField=I,u.FSelect=A,u.FSwitch=E,u.FTextField=x,u.FTextarea=N,u.default=q,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(u,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):(u=typeof globalThis<"u"?globalThis:u||self,e(u.FinsoVueComponents={},u.Vue,u.VuetifyComponents,u.MaskaVue,u.VeeValidate))})(this,(function(u,e,V,z,F){"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(a,n)=>{const l=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(l,{color:t.color,rounded:t.rounded},null,8,["color","rounded"])}}}),S=e.defineComponent({name:"FTextField",inheritAttrs:!1,__name:"FTextField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},appendInnerIcon:{default:""},mask:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},emits:["clickAppendInner"],setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,r)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(V.VTextField),e.mergeProps(c.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=d=>e.isRef(l)?l.value=d: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(n),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":r[1]||(r[1]=d=>c.$emit("clickAppendInner"))}),e.createSlots({_:2},[e.renderList(c.$slots,(d,f)=>({name:f,fn:e.withCtx(m=>[e.renderSlot(c.$slots,f,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref(z.vMaska),t.mask]])}}),O={key:1},X={key:4},L={class:"f-data-table__actions"},H={class:"text-h6"},x=((o,t)=>{const a=o.__vccOpts||o;for(const[n,l]of t)a[n]=l;return a})(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 a=o,n=t,l=e.useModel(o,"page"),c=e.useModel(o,"itemsPerPage"),r=e.useModel(o,"sortBy"),d=e.ref(!1),f=e.ref(null);function m(i,p){return p.split(".").reduce((C,D)=>C==null?void 0:C[D],i)}function h(i){return i==null?"":new Intl.NumberFormat(a.moneyLocale,{style:"currency",currency:a.moneyCurrency}).format(i)}function k(i){if(!i)return"";const p=i.replace(/\D/g,"");return p.length<10?i:`(${p.substring(0,3)}) ${p.substring(3,6)} ${p.substring(6,10)}`}const _=e.computed(()=>{const C=a.items.length===0?108:a.items.length*52+56;return Math.min(C,a.maxHeight)}),y=e.computed(()=>!a.canEditRecord&&!a.canReadRecord?{}:{"click:row":(i,{item:p})=>{n("show-record",p)}}),b=e.computed(()=>a.headers.filter(i=>i.type&&i.key!=="actions")),B=e.computed(()=>a.headers.some(i=>i.key==="actions"));function W(i){a.showDeleteConfirm?(f.value=i,d.value=!0):n("delete-record",i)}function J(){n("delete-record",f.value),d.value=!1,f.value=null}return(i,p)=>{const C=e.resolveComponent("v-img"),D=e.resolveComponent("v-avatar"),K=e.resolveComponent("v-chip"),Q=e.resolveComponent("v-icon"),U=e.resolveComponent("v-btn"),Z=e.resolveComponent("v-card-text"),v=e.resolveComponent("v-spacer"),j=e.resolveComponent("f-button"),ee=e.resolveComponent("v-card-actions"),te=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(i.$attrs,{page:l.value,"onUpdate:page":p[0]||(p[0]=s=>l.value=s),"items-per-page":c.value,"onUpdate:itemsPerPage":p[1]||(p[1]=s=>c.value=s),"sort-by":r.value,"onUpdate:sortBy":p[2]||(p[2]=s=>r.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:_.value,"show-select":o.showSelect,"items-per-page-text":o.labelItemsPerPage,"no-data-text":o.labelNoData},e.toHandlers(y.value)),e.createSlots({_:2},[e.renderList(b.value,s=>({name:`item.${s.key}`,fn:e.withCtx(({item:g})=>[e.renderSlot(i.$slots,`item.${s.key}`,{item:g,value:m(g,s.key)},()=>[s.type==="image"?(e.openBlock(),e.createBlock(D,{key:0,rounded:"lg",variant:"elevated",color:"white"},{default:e.withCtx(()=>[e.createVNode(C,{src:m(g,s.key),class:"f-data-table__logo"},null,8,["src"])]),_:2},1024)):s.type==="money"?(e.openBlock(),e.createElementBlock("span",O,e.toDisplayString(h(m(g,s.key))),1)):s.type==="status"?(e.openBlock(),e.createBlock(K,{key:2,color:m(g,s.key)?"green-darken-1":"red-darken-2",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(g,s.key)?o.labelActive:o.labelPassive),1)]),_:2},1032,["color"])):s.type==="boolean"?(e.openBlock(),e.createBlock(Q,{key:3,color:m(g,s.key)?"green-darken-1":"red-darken-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m(g,s.key)?"mdi-check":"mdi-close"),1)]),_:2},1032,["color"])):s.type==="gsmNo"?(e.openBlock(),e.createElementBlock("span",X,e.toDisplayString(k(m(g,s.key))),1)):e.createCommentVNode("",!0)],!0)])})),B.value?{name:"item.actions",fn:e.withCtx(({item:s})=>[e.renderSlot(i.$slots,"item.actions",{item:s},()=>[e.createElementVNode("div",L,[o.canEditRecord||o.canReadRecord?(e.openBlock(),e.createBlock(U,{key:0,color:"primary",icon:"mdi-pencil-outline",variant:"text",size:"small",onClick:e.withModifiers(g=>n("show-record",s),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),o.canDeleteRecord?(e.openBlock(),e.createBlock(U,{key:1,icon:"mdi-trash-can-outline",variant:"text",size:"small",color:"red-darken-2",onClick:e.withModifiers(g=>W(s),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0)])],!0)]),key:"0"}:void 0,e.renderList(i.$slots,(s,g)=>({name:g,fn:e.withCtx(oe=>[e.renderSlot(i.$slots,g,e.normalizeProps(e.guardReactiveProps(oe??{})),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(te,{modelValue:d.value,"onUpdate:modelValue":p[4]||(p[4]=s=>d.value=s),"max-width":"400","hide-close":!0},{header:e.withCtx(()=>[e.createElementVNode("div",H,e.toDisplayString(o.labelDeleteTitle),1)]),default:e.withCtx(()=>[e.createVNode(Z,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.deleteMessageFormatter&&f.value?o.deleteMessageFormatter(f.value):o.labelDeleteMessage),1)]),_:1}),e.createVNode(ee,null,{default:e.withCtx(()=>[e.createVNode(v),e.createVNode(j,{variant:"plain",color:"red-darken-2",text:o.labelDeleteCancel,onClick:p[3]||(p[3]=s=>d.value=!1)},null,8,["text"]),e.createVNode(j,{variant:"tonal",text:o.labelDeleteConfirm,onClick:J},null,8,["text"])]),_:1})]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-f628243a"]]);var $=(o=>(o.IMAGE="image",o.MONEY="money",o.STATUS="status",o.BOOLEAN="boolean",o.GSM_NO="gsmNo",o))($||{});const M=e.defineComponent({name:"FTextarea",inheritAttrs:!1,__name:"FTextarea",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},label:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},noResize:{type:Boolean,default:!0},rows:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,r)=>(e.openBlock(),e.createBlock(e.unref(V.VTextarea),e.mergeProps(c.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=d=>e.isRef(l)?l.value=d: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(n)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),N=e.defineComponent({name:"FAutocomplete",inheritAttrs:!1,__name:"FAutocomplete",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!0},noDataText:{default:""},modelValue:{default:null},rules:{type:[String,Function],default:""}},emits:["change"],setup(o,{emit:t}){const a=t,n=o,l=e.computed(()=>n.rules),{errorMessage:c,value:r}=F.useField(()=>n.name,l,{initialValue:n.modelValue,syncVModel:!0});function d(f){a("change",f)}return(f,m)=>(e.openBlock(),e.createBlock(e.unref(V.VAutocomplete),e.mergeProps(f.$attrs,{modelValue:e.unref(r),"onUpdate:modelValue":[m[0]||(m[0]=h=>e.isRef(r)?r.value=h:null),m[1]||(m[1]=h=>d(e.unref(r)))],name:n.name,items:n.items,rounded:n.rounded,variant:n.variant,density:n.density,color:n.color,clearable:n.clearable,"hide-details":n.hideDetails,"return-object":n.returnObject,"no-data-text":n.noDataText,"error-messages":e.unref(c),"menu-props":{maxWidth:0}}),e.createSlots({_:2},[e.renderList(f.$slots,(h,k)=>({name:k,fn:e.withCtx(_=>[e.renderSlot(f.$slots,k,e.normalizeProps(e.guardReactiveProps(_??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","clearable","hide-details","return-object","no-data-text","error-messages"]))}}),P=e.defineComponent({name:"FCheckbox",inheritAttrs:!1,__name:"FCheckbox",props:{color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},indeterminate:{type:Boolean,default:!1},density:{default:"compact"}},setup(o){const t=o;return(a,n)=>(e.openBlock(),e.createBlock(e.unref(V.VCheckbox),e.mergeProps(a.$attrs,{color:t.color,"hide-details":t.hideDetails,indeterminate:t.indeterminate,density:t.density}),null,16,["color","hide-details","indeterminate","density"]))}}),R=e.defineComponent({name:"FCurrencyField",inheritAttrs:!1,__name:"FCurrencyField",props:{name:{},label:{default:""},readonly:{type:Boolean,default:!1},hideDetails:{type:[Boolean,String],default:"auto"},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},locale:{default:"tr-TR"},currency:{default:"TRY"},precision:{default:2},modelValue:{default:null},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0}),c=e.computed(()=>new Intl.NumberFormat(t.locale,{style:"currency",currency:t.currency,minimumFractionDigits:t.precision,maximumFractionDigits:t.precision})),r=e.ref(d(t.modelValue));function d(y){return y==null||isNaN(y)?"":c.value.format(y)}function f(y){const b=y.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),B=parseFloat(b);return isNaN(B)?null:Math.round(B*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const m=e.ref(!1);function h(y){const b=y.target;r.value=b.value,l.value=f(b.value)}function k(){m.value=!1,r.value=d(l.value)}function _(y){m.value=!0;const b=y.target,B=l.value;B!=null?r.value=B.toFixed(t.precision).replace(".",","):r.value="",setTimeout(()=>b.select(),0)}return e.watch(()=>t.modelValue,y=>{l.value=y,m.value||(r.value=d(y))}),(y,b)=>(e.openBlock(),e.createBlock(e.unref(V.VTextField),e.mergeProps(y.$attrs,{"model-value":r.value,name:t.name,label:t.label,readonly:t.readonly,"hide-details":t.hideDetails,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"error-messages":e.unref(n),inputmode:"decimal",onInput:h,onBlur:k,onFocus:_}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),T=e.defineComponent({name:"FSelect",inheritAttrs:!1,__name:"FSelect",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!1},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,r)=>(e.openBlock(),e.createBlock(e.unref(V.VSelect),e.mergeProps(c.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=d=>e.isRef(l)?l.value=d: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(n)}),e.createSlots({_:2},[e.renderList(c.$slots,(d,f)=>({name:f,fn:e.withCtx(m=>[e.renderSlot(c.$slots,f,e.normalizeProps(e.guardReactiveProps(m??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),A=e.defineComponent({name:"FNumberField",inheritAttrs:!1,__name:"FNumberField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},controlVariant:{default:"stacked"},color:{default:"secondary"},label:{default:""},placeholder:{default:""},prefix:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},min:{default:0},precision:{default:0},inset:{type:Boolean,default:!0},modelValue:{default:-1},rules:{type:[String,Function],default:""}},setup(o){const t=o,a=e.computed(()=>t.rules),{errorMessage:n,value:l}=F.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,r)=>(e.openBlock(),e.createBlock(e.unref(V.VNumberInput),e.mergeProps(c.$attrs,{modelValue:e.unref(l),"onUpdate:modelValue":r[0]||(r[0]=d=>e.isRef(l)?l.value=d: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(n)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),q={key:0},G={key:1},I=e.defineComponent({name:"FSwitch",inheritAttrs:!1,__name:"FSwitch",props:e.mergeModels({color:{default:"secondary"},density:{default:"comfortable"},hideDetails:{type:[Boolean,String],default:"auto"},labelTrue:{default:""},labelFalse:{default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,a=e.useModel(o,"modelValue");return(n,l)=>(e.openBlock(),e.createBlock(e.unref(V.VSwitch),e.mergeProps(n.$attrs,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c),color:t.color,"hide-details":t.hideDetails,density:t.density}),e.createSlots({_:2},[t.labelTrue||t.labelFalse?{name:"label",fn:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("span",q,e.toDisplayString(t.labelTrue),1)):(e.openBlock(),e.createElementBlock("span",G,e.toDisplayString(t.labelFalse),1))]),key:"0"}:void 0]),1040,["modelValue","color","hide-details","density"]))}}),E=e.defineComponent({name:"FDialog",inheritAttrs:!1,__name:"FDialog",props:e.mergeModels({width:{default:750},persistent:{type:Boolean,default:!0},transition:{default:"slide-y-transition"},hideClose:{type:Boolean,default:!1}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["closeDialog"],["update:modelValue"]),setup(o){const t=o,a=e.useModel(o,"modelValue");return(n,l)=>{const c=e.resolveComponent("v-btn"),r=e.resolveComponent("v-card-title"),d=e.resolveComponent("v-divider"),f=e.resolveComponent("v-card-text"),m=e.resolveComponent("v-card"),h=e.resolveComponent("v-dialog");return e.openBlock(),e.createBlock(h,e.mergeProps(n.$attrs,{modelValue:a.value,"onUpdate:modelValue":l[1]||(l[1]=k=>a.value=k),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(r,{class:"d-flex justify-space-between align-center"},{default:e.withCtx(()=>[e.createElementVNode("header",null,[e.renderSlot(n.$slots,"header")]),t.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:0,icon:"mdi-close",variant:"text",onClick:l[0]||(l[0]=k=>n.$emit("closeDialog"))}))]),_:3}),e.createVNode(d),e.createVNode(f,{class:"py-4 px-1 overflow-auto overflow-x-hidden"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3})]),_:3})]),_:3},16,["modelValue","transition","width","persistent"])}}}),Y={install(o){o.component("FButton",w),o.component("FTextField",S),o.component("FDataTable",x),o.component("FTextarea",M),o.component("FAutocomplete",N),o.component("FCheckbox",P),o.component("FCurrencyField",R),o.component("FSelect",T),o.component("FNumberField",A),o.component("FSwitch",I),o.component("FDialog",E)}};u.FAutocomplete=N,u.FButton=w,u.FCheckbox=P,u.FCurrencyField=R,u.FDataTable=x,u.FDataTableHeaderType=$,u.FDialog=E,u.FNumberField=A,u.FSelect=T,u.FSwitch=I,u.FTextField=S,u.FTextarea=M,u.default=Y,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|