finso-vue-components 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,11 @@ export interface FAutocompleteProps {
13
13
  modelValue?: any;
14
14
  rules?: string | GenericValidateFunction<any>;
15
15
  }
16
- declare const _default: import("vue").DefineComponent<FAutocompleteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ declare var __VLS_11: string | number, __VLS_12: any;
17
+ type __VLS_Slots = {} & {
18
+ [K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
19
+ };
20
+ declare const __VLS_component: import("vue").DefineComponent<FAutocompleteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
21
  change: (value: any) => any;
18
22
  }, string, import("vue").PublicProps, Readonly<FAutocompleteProps> & Readonly<{
19
23
  onChange?: ((value: any) => any) | undefined;
@@ -27,7 +31,13 @@ declare const _default: import("vue").DefineComponent<FAutocompleteProps, {}, {}
27
31
  modelValue: any;
28
32
  rules: string | GenericValidateFunction<any>;
29
33
  items: any[];
30
- returnObject: boolean;
31
34
  noDataText: string;
35
+ returnObject: boolean;
32
36
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
37
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
33
38
  export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -24,8 +24,8 @@ declare const _default: import("vue").DefineComponent<FCurrencyFieldProps, {}, {
24
24
  modelValue: number | null;
25
25
  rules: string | GenericValidateFunction<number | null>;
26
26
  label: string;
27
- locale: string;
28
27
  currency: string;
28
+ locale: string;
29
29
  precision: number;
30
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
31
  export default _default;
@@ -1,29 +1,108 @@
1
+ export type FDataTableHeaderType = 'image' | 'money' | 'status' | 'boolean' | 'gsmNo';
1
2
  export interface FDataTableHeader {
2
3
  title: string;
3
4
  key: string;
4
5
  align?: 'start' | 'center' | 'end';
5
6
  sortable?: boolean;
6
7
  width?: string | number;
8
+ type?: FDataTableHeaderType;
7
9
  }
8
10
  export interface FDataTableProps {
9
11
  headers: FDataTableHeader[];
10
12
  items: Record<string, unknown>[];
11
13
  loading?: boolean;
12
- search?: string;
13
- itemsPerPage?: number;
14
14
  hover?: boolean;
15
15
  density?: 'default' | 'comfortable' | 'compact';
16
+ maxHeight?: number;
17
+ showSelect?: boolean;
18
+ /** Server-side mode: uses v-data-table-server with external pagination */
19
+ serverSide?: boolean;
20
+ totalCount?: number;
21
+ /** Action column */
22
+ canEditRecord?: boolean;
23
+ canDeleteRecord?: boolean;
24
+ canReadRecord?: boolean;
25
+ showDeleteConfirm?: boolean;
26
+ /** Labels (i18n-free) */
27
+ labelActive?: string;
28
+ labelPassive?: string;
29
+ labelDeleteTitle?: string;
30
+ /** Static message or dynamic formatter: (item) => `${item.code} kodlu kaydı silmek istiyor musunuz?` */
31
+ deleteMessageFormatter?: (item: any) => string;
32
+ labelDeleteMessage?: string;
33
+ labelDeleteConfirm?: string;
34
+ labelDeleteCancel?: string;
35
+ labelItemsPerPage?: string;
36
+ labelNoData?: string;
37
+ /** Money formatting */
38
+ moneyLocale?: string;
39
+ moneyCurrency?: string;
40
+ /** GSM formatting */
41
+ gsmPattern?: string;
16
42
  }
17
- declare var __VLS_7: string | number, __VLS_8: any;
43
+ type __VLS_Props = FDataTableProps;
44
+ type __VLS_PublicProps = __VLS_Props & {
45
+ 'page'?: number;
46
+ 'itemsPerPage'?: number;
47
+ 'sortBy'?: {
48
+ key: string;
49
+ order: string;
50
+ }[];
51
+ };
52
+ declare var __VLS_6: `item.${string}`, __VLS_7: {
53
+ item: any;
54
+ value: any;
55
+ }, __VLS_25: {
56
+ item: any;
57
+ }, __VLS_44: string | number, __VLS_45: any;
18
58
  type __VLS_Slots = {} & {
19
- [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any;
59
+ [K in NonNullable<typeof __VLS_6>]?: (props: typeof __VLS_7) => any;
60
+ } & {
61
+ [K in NonNullable<typeof __VLS_44>]?: (props: typeof __VLS_45) => any;
62
+ } & {
63
+ 'item.actions'?: (props: typeof __VLS_25) => any;
20
64
  };
21
- declare const __VLS_component: import("vue").DefineComponent<FDataTableProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FDataTableProps> & Readonly<{}>, {
65
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
66
+ "show-record": (item: any) => any;
67
+ "delete-record": (item: any) => any;
68
+ "update:page": (value: number) => any;
69
+ "update:itemsPerPage": (value: number) => any;
70
+ "update:sortBy": (value: {
71
+ key: string;
72
+ order: string;
73
+ }[]) => any;
74
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
75
+ "onShow-record"?: ((item: any) => any) | undefined;
76
+ "onDelete-record"?: ((item: any) => any) | undefined;
77
+ "onUpdate:page"?: ((value: number) => any) | undefined;
78
+ "onUpdate:itemsPerPage"?: ((value: number) => any) | undefined;
79
+ "onUpdate:sortBy"?: ((value: {
80
+ key: string;
81
+ order: string;
82
+ }[]) => any) | undefined;
83
+ }>, {
22
84
  density: "default" | "comfortable" | "compact";
85
+ maxHeight: number;
23
86
  loading: boolean;
24
- search: string;
25
- itemsPerPage: number;
26
87
  hover: boolean;
88
+ showSelect: boolean;
89
+ serverSide: boolean;
90
+ totalCount: number;
91
+ canEditRecord: boolean;
92
+ canDeleteRecord: boolean;
93
+ canReadRecord: boolean;
94
+ showDeleteConfirm: boolean;
95
+ labelActive: string;
96
+ labelPassive: string;
97
+ labelDeleteTitle: string;
98
+ labelDeleteMessage: string;
99
+ labelDeleteConfirm: string;
100
+ labelDeleteCancel: string;
101
+ labelItemsPerPage: string;
102
+ labelNoData: string;
103
+ moneyLocale: string;
104
+ moneyCurrency: string;
105
+ gsmPattern: string;
27
106
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
107
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
29
108
  export default _default;
@@ -1,2 +1,2 @@
1
1
  export { default as FDataTable } from './FDataTable.vue';
2
- export type { FDataTableProps, FDataTableHeader } from './FDataTable.vue';
2
+ export type { FDataTableProps, FDataTableHeader, FDataTableHeaderType } from './FDataTable.vue';
@@ -12,7 +12,11 @@ export interface FTextFieldProps {
12
12
  modelValue?: string;
13
13
  rules?: string | GenericValidateFunction<string>;
14
14
  }
15
- declare const _default: import("vue").DefineComponent<FTextFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ declare var __VLS_11: string | number, __VLS_12: any;
16
+ type __VLS_Slots = {} & {
17
+ [K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
18
+ };
19
+ declare const __VLS_component: import("vue").DefineComponent<FTextFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
20
  clickAppendInner: () => any;
17
21
  }, string, import("vue").PublicProps, Readonly<FTextFieldProps> & Readonly<{
18
22
  onClickAppendInner?: (() => any) | undefined;
@@ -28,4 +32,10 @@ declare const _default: import("vue").DefineComponent<FTextFieldProps, {}, {}, {
28
32
  modelValue: string;
29
33
  rules: string | GenericValidateFunction<string>;
30
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
31
36
  export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -0,0 +1 @@
1
+ .f-data-table__logo[data-v-18a58608]{object-fit:contain}.f-data-table__actions[data-v-18a58608]{display:flex;gap:4px;align-items:center}
@@ -1,8 +1,8 @@
1
- import { defineComponent as m, resolveComponent as N, openBlock as i, createBlock as p, computed as F, withDirectives as R, unref as o, mergeProps as f, isRef as g, createSlots as B, renderList as x, withCtx as S, renderSlot as T, normalizeProps as M, guardReactiveProps as k, ref as _, watch as I, useModel as j, createElementBlock as D, toDisplayString as $, mergeModels as P } from "vue";
2
- import { VTextField as A, VDataTable as U, VTextarea as z, VAutocomplete as O, VCheckbox as E, VSelect as L, VNumberInput as W, VSwitch as Y } from "vuetify/components";
3
- import { vMaska as q } from "maska/vue";
4
- import { useField as v } from "vee-validate";
5
- const G = /* @__PURE__ */ m({
1
+ import { defineComponent as k, resolveComponent as h, openBlock as f, createBlock as g, computed as F, withDirectives as oe, unref as c, mergeProps as _, isRef as N, createSlots as I, renderList as A, withCtx as y, renderSlot as M, normalizeProps as j, guardReactiveProps as z, useModel as X, ref as H, createElementBlock as P, resolveDynamicComponent as re, toHandlers as se, createVNode as B, toDisplayString as V, createTextVNode as x, createCommentVNode as O, createElementVNode as de, withModifiers as Y, mergeModels as L, watch as ue } from "vue";
2
+ import { VTextField as G, VTextarea as ie, VAutocomplete as ce, VCheckbox as me, VSelect as fe, VNumberInput as pe, VSwitch as ye } from "vuetify/components";
3
+ import { vMaska as ve } from "maska/vue";
4
+ import { useField as T } from "vee-validate";
5
+ const ge = /* @__PURE__ */ k({
6
6
  __name: "FButton",
7
7
  props: {
8
8
  color: { default: "primary" },
@@ -10,15 +10,15 @@ const G = /* @__PURE__ */ m({
10
10
  },
11
11
  setup(t) {
12
12
  const e = t;
13
- return (r, l) => {
14
- const a = N("v-btn");
15
- return i(), p(a, {
13
+ return (n, a) => {
14
+ const l = h("v-btn");
15
+ return f(), g(l, {
16
16
  color: e.color,
17
17
  rounded: e.rounded
18
18
  }, null, 8, ["color", "rounded"]);
19
19
  };
20
20
  }
21
- }), H = /* @__PURE__ */ m({
21
+ }), be = /* @__PURE__ */ k({
22
22
  name: "FTextField",
23
23
  inheritAttrs: !1,
24
24
  __name: "FTextField",
@@ -37,13 +37,13 @@ const G = /* @__PURE__ */ m({
37
37
  },
38
38
  emits: ["clickAppendInner"],
39
39
  setup(t) {
40
- const e = t, r = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
40
+ const e = t, n = F(() => e.rules), { errorMessage: a, value: l } = T(() => e.name, n, {
41
41
  initialValue: e.modelValue,
42
42
  syncVModel: !0
43
43
  });
44
- return (d, n) => R((i(), p(o(A), f(d.$attrs, {
45
- modelValue: o(a),
46
- "onUpdate:modelValue": n[0] || (n[0] = (s) => g(a) ? a.value = s : null),
44
+ return (u, r) => oe((f(), g(c(G), _(u.$attrs, {
45
+ modelValue: c(l),
46
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => N(l) ? l.value = d : null),
47
47
  name: e.name,
48
48
  color: e.color,
49
49
  density: e.density,
@@ -51,45 +51,244 @@ const G = /* @__PURE__ */ m({
51
51
  variant: e.variant,
52
52
  clearable: e.clearable,
53
53
  "hide-details": e.hideDetails,
54
- "error-messages": o(l),
54
+ "error-messages": c(a),
55
55
  "append-inner-icon": e.appendInnerIcon,
56
- "onClick:appendInner": n[1] || (n[1] = (s) => d.$emit("clickAppendInner"))
57
- }), null, 16, ["modelValue", "name", "color", "density", "rounded", "variant", "clearable", "hide-details", "error-messages", "append-inner-icon"])), [
58
- [o(q), e.mask]
56
+ "onClick:appendInner": r[1] || (r[1] = (d) => u.$emit("clickAppendInner"))
57
+ }), I({ _: 2 }, [
58
+ A(u.$slots, (d, p) => ({
59
+ name: p,
60
+ fn: y((i) => [
61
+ M(u.$slots, p, j(z(i ?? {})))
62
+ ])
63
+ }))
64
+ ]), 1040, ["modelValue", "name", "color", "density", "rounded", "variant", "clearable", "hide-details", "error-messages", "append-inner-icon"])), [
65
+ [c(ve), e.mask]
59
66
  ]);
60
67
  }
61
- }), J = /* @__PURE__ */ m({
68
+ }), he = { key: 1 }, Fe = { key: 4 }, Ve = { class: "f-data-table__actions" }, ke = /* @__PURE__ */ k({
62
69
  name: "FDataTable",
63
70
  inheritAttrs: !1,
64
71
  __name: "FDataTable",
65
- props: {
72
+ props: /* @__PURE__ */ L({
66
73
  headers: {},
67
74
  items: {},
68
75
  loading: { type: Boolean, default: !1 },
69
- search: { default: "" },
70
- itemsPerPage: { default: 10 },
71
76
  hover: { type: Boolean, default: !0 },
72
- density: { default: "default" }
73
- },
74
- setup(t) {
75
- return (e, r) => (i(), p(o(U), f(e.$attrs, {
76
- headers: t.headers,
77
- items: t.items,
78
- loading: t.loading,
79
- search: t.search,
80
- "items-per-page": t.itemsPerPage,
81
- hover: t.hover,
82
- density: t.density
83
- }), B({ _: 2 }, [
84
- x(e.$slots, (l, a) => ({
85
- name: a,
86
- fn: S((d) => [
87
- T(e.$slots, a, M(k(d ?? {})))
88
- ])
89
- }))
90
- ]), 1040, ["headers", "items", "loading", "search", "items-per-page", "hover", "density"]));
77
+ density: { default: "default" },
78
+ maxHeight: { default: 576 },
79
+ showSelect: { type: Boolean, default: !1 },
80
+ serverSide: { type: Boolean, default: !1 },
81
+ totalCount: { default: 0 },
82
+ canEditRecord: { type: Boolean, default: !0 },
83
+ canDeleteRecord: { type: Boolean, default: !0 },
84
+ canReadRecord: { type: Boolean, default: !0 },
85
+ showDeleteConfirm: { type: Boolean, default: !0 },
86
+ labelActive: { default: "Active" },
87
+ labelPassive: { default: "Passive" },
88
+ labelDeleteTitle: { default: "Delete" },
89
+ deleteMessageFormatter: {},
90
+ labelDeleteMessage: { default: "Are you sure you want to delete this record?" },
91
+ labelDeleteConfirm: { default: "Delete" },
92
+ labelDeleteCancel: { default: "Cancel" },
93
+ labelItemsPerPage: { default: "Items per page" },
94
+ labelNoData: { default: "No data available" },
95
+ moneyLocale: { default: "tr-TR" },
96
+ moneyCurrency: { default: "TRY" },
97
+ gsmPattern: { default: "(XXX) XXX XXXX" }
98
+ }, {
99
+ page: { default: 1 },
100
+ pageModifiers: {},
101
+ itemsPerPage: { default: 10 },
102
+ itemsPerPageModifiers: {},
103
+ sortBy: { default: () => [] },
104
+ sortByModifiers: {}
105
+ }),
106
+ emits: /* @__PURE__ */ L(["show-record", "delete-record"], ["update:page", "update:itemsPerPage", "update:sortBy"]),
107
+ setup(t, { emit: e }) {
108
+ const n = t, a = e, l = X(t, "page"), u = X(t, "itemsPerPage"), r = X(t, "sortBy"), d = H(!1), p = H(null);
109
+ function i(s, m) {
110
+ return m.split(".").reduce((S, E) => S == null ? void 0 : S[E], s);
111
+ }
112
+ function $(s) {
113
+ return s == null ? "" : new Intl.NumberFormat(n.moneyLocale, {
114
+ style: "currency",
115
+ currency: n.moneyCurrency
116
+ }).format(s);
117
+ }
118
+ function w(s) {
119
+ if (!s) return "";
120
+ const m = s.replace(/\D/g, "");
121
+ return m.length < 10 ? s : `(${m.substring(0, 3)}) ${m.substring(3, 6)} ${m.substring(6, 10)}`;
122
+ }
123
+ const R = F(() => {
124
+ const S = n.items.length * 52 + 56;
125
+ return Math.min(S, n.maxHeight);
126
+ }), v = F(() => !n.canEditRecord && !n.canReadRecord ? {} : {
127
+ "click:row": (s, { item: m }) => {
128
+ a("show-record", m);
129
+ }
130
+ }), D = F(
131
+ () => n.headers.filter((s) => s.type && s.key !== "actions")
132
+ ), C = F(() => n.headers.some((s) => s.key === "actions"));
133
+ function W(s) {
134
+ n.showDeleteConfirm ? (p.value = s, d.value = !0) : a("delete-record", s);
135
+ }
136
+ function q() {
137
+ a("delete-record", p.value), d.value = !1, p.value = null;
138
+ }
139
+ return (s, m) => {
140
+ const S = h("v-img"), E = h("v-avatar"), J = h("v-chip"), K = h("v-icon"), U = h("v-btn"), Q = h("v-card-title"), Z = h("v-card-text"), ee = h("v-spacer"), te = h("v-card-actions"), ae = h("v-card"), le = h("v-dialog");
141
+ return f(), P("div", null, [
142
+ (f(), g(re(t.serverSide ? "v-data-table-server" : "v-data-table"), _(s.$attrs, {
143
+ page: l.value,
144
+ "onUpdate:page": m[0] || (m[0] = (o) => l.value = o),
145
+ "items-per-page": u.value,
146
+ "onUpdate:itemsPerPage": m[1] || (m[1] = (o) => u.value = o),
147
+ "sort-by": r.value,
148
+ "onUpdate:sortBy": m[2] || (m[2] = (o) => r.value = o),
149
+ headers: t.headers,
150
+ items: t.items,
151
+ "items-length": t.serverSide ? t.totalCount : void 0,
152
+ loading: t.loading,
153
+ hover: t.hover,
154
+ density: t.density,
155
+ height: R.value,
156
+ "show-select": t.showSelect,
157
+ "items-per-page-text": t.labelItemsPerPage,
158
+ "no-data-text": t.labelNoData
159
+ }, se(v.value)), I({ _: 2 }, [
160
+ A(D.value, (o) => ({
161
+ name: `item.${o.key}`,
162
+ fn: y(({ item: b }) => [
163
+ M(s.$slots, `item.${o.key}`, {
164
+ item: b,
165
+ value: i(b, o.key)
166
+ }, () => [
167
+ o.type === "image" ? (f(), g(E, {
168
+ key: 0,
169
+ rounded: "lg",
170
+ variant: "elevated"
171
+ }, {
172
+ default: y(() => [
173
+ B(S, {
174
+ src: i(b, o.key),
175
+ class: "f-data-table__logo"
176
+ }, null, 8, ["src"])
177
+ ]),
178
+ _: 2
179
+ }, 1024)) : o.type === "money" ? (f(), P("span", he, V($(i(b, o.key))), 1)) : o.type === "status" ? (f(), g(J, {
180
+ key: 2,
181
+ color: i(b, o.key) ? "green-darken-1" : "red-darken-2",
182
+ size: "small"
183
+ }, {
184
+ default: y(() => [
185
+ x(V(i(b, o.key) ? t.labelActive : t.labelPassive), 1)
186
+ ]),
187
+ _: 2
188
+ }, 1032, ["color"])) : o.type === "boolean" ? (f(), g(K, {
189
+ key: 3,
190
+ color: i(b, o.key) ? "green-darken-1" : "red-darken-2"
191
+ }, {
192
+ default: y(() => [
193
+ x(V(i(b, o.key) ? "mdi-check" : "mdi-close"), 1)
194
+ ]),
195
+ _: 2
196
+ }, 1032, ["color"])) : o.type === "gsmNo" ? (f(), P("span", Fe, V(w(i(b, o.key))), 1)) : O("", !0)
197
+ ], !0)
198
+ ])
199
+ })),
200
+ C.value ? {
201
+ name: "item.actions",
202
+ fn: y(({ item: o }) => [
203
+ M(s.$slots, "item.actions", { item: o }, () => [
204
+ de("div", Ve, [
205
+ t.canEditRecord || t.canReadRecord ? (f(), g(U, {
206
+ key: 0,
207
+ icon: "mdi-pencil",
208
+ variant: "text",
209
+ size: "small",
210
+ onClick: Y((b) => a("show-record", o), ["stop"])
211
+ }, null, 8, ["onClick"])) : O("", !0),
212
+ t.canDeleteRecord ? (f(), g(U, {
213
+ key: 1,
214
+ icon: "mdi-delete",
215
+ variant: "text",
216
+ size: "small",
217
+ color: "red-darken-2",
218
+ onClick: Y((b) => W(o), ["stop"])
219
+ }, null, 8, ["onClick"])) : O("", !0)
220
+ ])
221
+ ], !0)
222
+ ]),
223
+ key: "0"
224
+ } : void 0,
225
+ A(s.$slots, (o, b) => ({
226
+ name: b,
227
+ fn: y((ne) => [
228
+ M(s.$slots, b, j(z(ne ?? {})), void 0, !0)
229
+ ])
230
+ }))
231
+ ]), 1040, ["page", "items-per-page", "sort-by", "headers", "items", "items-length", "loading", "hover", "density", "height", "show-select", "items-per-page-text", "no-data-text"])),
232
+ B(le, {
233
+ modelValue: d.value,
234
+ "onUpdate:modelValue": m[4] || (m[4] = (o) => d.value = o),
235
+ "max-width": "400"
236
+ }, {
237
+ default: y(() => [
238
+ B(ae, null, {
239
+ default: y(() => [
240
+ B(Q, null, {
241
+ default: y(() => [
242
+ x(V(t.labelDeleteTitle), 1)
243
+ ]),
244
+ _: 1
245
+ }),
246
+ B(Z, null, {
247
+ default: y(() => [
248
+ x(V(t.deleteMessageFormatter && p.value ? t.deleteMessageFormatter(p.value) : t.labelDeleteMessage), 1)
249
+ ]),
250
+ _: 1
251
+ }),
252
+ B(te, null, {
253
+ default: y(() => [
254
+ B(ee),
255
+ B(U, {
256
+ variant: "text",
257
+ onClick: m[3] || (m[3] = (o) => d.value = !1)
258
+ }, {
259
+ default: y(() => [
260
+ x(V(t.labelDeleteCancel), 1)
261
+ ]),
262
+ _: 1
263
+ }),
264
+ B(U, {
265
+ color: "red-darken-2",
266
+ variant: "flat",
267
+ onClick: q
268
+ }, {
269
+ default: y(() => [
270
+ x(V(t.labelDeleteConfirm), 1)
271
+ ]),
272
+ _: 1
273
+ })
274
+ ]),
275
+ _: 1
276
+ })
277
+ ]),
278
+ _: 1
279
+ })
280
+ ]),
281
+ _: 1
282
+ }, 8, ["modelValue"])
283
+ ]);
284
+ };
91
285
  }
92
- }), K = /* @__PURE__ */ m({
286
+ }), De = (t, e) => {
287
+ const n = t.__vccOpts || t;
288
+ for (const [a, l] of e)
289
+ n[a] = l;
290
+ return n;
291
+ }, Be = /* @__PURE__ */ De(ke, [["__scopeId", "data-v-18a58608"]]), _e = /* @__PURE__ */ k({
93
292
  name: "FTextarea",
94
293
  inheritAttrs: !1,
95
294
  __name: "FTextarea",
@@ -107,13 +306,13 @@ const G = /* @__PURE__ */ m({
107
306
  rules: { type: [String, Function], default: "" }
108
307
  },
109
308
  setup(t) {
110
- const e = t, r = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
309
+ const e = t, n = F(() => e.rules), { errorMessage: a, value: l } = T(() => e.name, n, {
111
310
  initialValue: e.modelValue,
112
311
  syncVModel: !0
113
312
  });
114
- return (d, n) => (i(), p(o(z), f(d.$attrs, {
115
- modelValue: o(a),
116
- "onUpdate:modelValue": n[0] || (n[0] = (s) => g(a) ? a.value = s : null),
313
+ return (u, r) => (f(), g(c(ie), _(u.$attrs, {
314
+ modelValue: c(l),
315
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => N(l) ? l.value = d : null),
117
316
  name: e.name,
118
317
  rounded: e.rounded,
119
318
  variant: e.variant,
@@ -123,10 +322,10 @@ const G = /* @__PURE__ */ m({
123
322
  label: e.label,
124
323
  "hide-details": e.hideDetails,
125
324
  "no-resize": e.noResize,
126
- "error-messages": o(l)
325
+ "error-messages": c(a)
127
326
  }), null, 16, ["modelValue", "name", "rounded", "variant", "rows", "density", "color", "label", "hide-details", "no-resize", "error-messages"]));
128
327
  }
129
- }), Q = /* @__PURE__ */ m({
328
+ }), $e = /* @__PURE__ */ k({
130
329
  name: "FAutocomplete",
131
330
  inheritAttrs: !1,
132
331
  __name: "FAutocomplete",
@@ -146,34 +345,41 @@ const G = /* @__PURE__ */ m({
146
345
  },
147
346
  emits: ["change"],
148
347
  setup(t, { emit: e }) {
149
- const r = e, l = t, a = F(() => l.rules), { errorMessage: d, value: n } = v(() => l.name, a, {
150
- initialValue: l.modelValue,
348
+ const n = e, a = t, l = F(() => a.rules), { errorMessage: u, value: r } = T(() => a.name, l, {
349
+ initialValue: a.modelValue,
151
350
  syncVModel: !0
152
351
  });
153
- function s(y) {
154
- r("change", y);
352
+ function d(p) {
353
+ n("change", p);
155
354
  }
156
- return (y, c) => (i(), p(o(O), f(y.$attrs, {
157
- modelValue: o(n),
355
+ return (p, i) => (f(), g(c(ce), _(p.$attrs, {
356
+ modelValue: c(r),
158
357
  "onUpdate:modelValue": [
159
- c[0] || (c[0] = (V) => g(n) ? n.value = V : null),
160
- c[1] || (c[1] = (V) => s(o(n)))
358
+ i[0] || (i[0] = ($) => N(r) ? r.value = $ : null),
359
+ i[1] || (i[1] = ($) => d(c(r)))
161
360
  ],
162
- name: l.name,
163
- items: l.items,
164
- rounded: l.rounded,
165
- variant: l.variant,
166
- density: l.density,
167
- color: l.color,
168
- clearable: l.clearable,
169
- "hide-details": l.hideDetails,
170
- "return-object": l.returnObject,
171
- "no-data-text": l.noDataText,
172
- "error-messages": o(d),
361
+ name: a.name,
362
+ items: a.items,
363
+ rounded: a.rounded,
364
+ variant: a.variant,
365
+ density: a.density,
366
+ color: a.color,
367
+ clearable: a.clearable,
368
+ "hide-details": a.hideDetails,
369
+ "return-object": a.returnObject,
370
+ "no-data-text": a.noDataText,
371
+ "error-messages": c(u),
173
372
  "menu-props": { maxWidth: 0 }
174
- }), null, 16, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "clearable", "hide-details", "return-object", "no-data-text", "error-messages"]));
373
+ }), I({ _: 2 }, [
374
+ A(p.$slots, ($, w) => ({
375
+ name: w,
376
+ fn: y((R) => [
377
+ M(p.$slots, w, j(z(R ?? {})))
378
+ ])
379
+ }))
380
+ ]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "clearable", "hide-details", "return-object", "no-data-text", "error-messages"]));
175
381
  }
176
- }), X = /* @__PURE__ */ m({
382
+ }), Ce = /* @__PURE__ */ k({
177
383
  name: "FCheckbox",
178
384
  inheritAttrs: !1,
179
385
  __name: "FCheckbox",
@@ -185,14 +391,14 @@ const G = /* @__PURE__ */ m({
185
391
  },
186
392
  setup(t) {
187
393
  const e = t;
188
- return (r, l) => (i(), p(o(E), f(r.$attrs, {
394
+ return (n, a) => (f(), g(c(me), _(n.$attrs, {
189
395
  color: e.color,
190
396
  "hide-details": e.hideDetails,
191
397
  indeterminate: e.indeterminate,
192
398
  density: e.density
193
399
  }), null, 16, ["color", "hide-details", "indeterminate", "density"]));
194
400
  }
195
- }), Z = /* @__PURE__ */ m({
401
+ }), Se = /* @__PURE__ */ k({
196
402
  name: "FCurrencyField",
197
403
  inheritAttrs: !1,
198
404
  __name: "FCurrencyField",
@@ -212,41 +418,41 @@ const G = /* @__PURE__ */ m({
212
418
  rules: { type: [String, Function], default: "" }
213
419
  },
214
420
  setup(t) {
215
- const e = t, r = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
421
+ const e = t, n = F(() => e.rules), { errorMessage: a, value: l } = T(() => e.name, n, {
216
422
  initialValue: e.modelValue,
217
423
  syncVModel: !0
218
- }), d = F(
424
+ }), u = F(
219
425
  () => new Intl.NumberFormat(e.locale, {
220
426
  style: "currency",
221
427
  currency: e.currency,
222
428
  minimumFractionDigits: e.precision,
223
429
  maximumFractionDigits: e.precision
224
430
  })
225
- ), n = _(s(e.modelValue));
226
- function s(u) {
227
- return u == null || isNaN(u) ? "" : d.value.format(u);
431
+ ), r = H(d(e.modelValue));
432
+ function d(v) {
433
+ return v == null || isNaN(v) ? "" : u.value.format(v);
228
434
  }
229
- function y(u) {
230
- const h = u.replace(/[^\d,.-]/g, "").replace(/\./g, "").replace(",", "."), b = parseFloat(h);
231
- return isNaN(b) ? null : Math.round(b * Math.pow(10, e.precision)) / Math.pow(10, e.precision);
435
+ function p(v) {
436
+ const D = v.replace(/[^\d,.-]/g, "").replace(/\./g, "").replace(",", "."), C = parseFloat(D);
437
+ return isNaN(C) ? null : Math.round(C * Math.pow(10, e.precision)) / Math.pow(10, e.precision);
232
438
  }
233
- const c = _(!1);
234
- function V(u) {
235
- const h = u.target;
236
- n.value = h.value, a.value = y(h.value);
439
+ const i = H(!1);
440
+ function $(v) {
441
+ const D = v.target;
442
+ r.value = D.value, l.value = p(D.value);
237
443
  }
238
444
  function w() {
239
- c.value = !1, n.value = s(a.value);
445
+ i.value = !1, r.value = d(l.value);
240
446
  }
241
- function C(u) {
242
- c.value = !0;
243
- const h = u.target, b = a.value;
244
- b != null ? n.value = b.toFixed(e.precision).replace(".", ",") : n.value = "", setTimeout(() => h.select(), 0);
447
+ function R(v) {
448
+ i.value = !0;
449
+ const D = v.target, C = l.value;
450
+ C != null ? r.value = C.toFixed(e.precision).replace(".", ",") : r.value = "", setTimeout(() => D.select(), 0);
245
451
  }
246
- return I(() => e.modelValue, (u) => {
247
- a.value = u, c.value || (n.value = s(u));
248
- }), (u, h) => (i(), p(o(A), f(u.$attrs, {
249
- "model-value": n.value,
452
+ return ue(() => e.modelValue, (v) => {
453
+ l.value = v, i.value || (r.value = d(v));
454
+ }), (v, D) => (f(), g(c(G), _(v.$attrs, {
455
+ "model-value": r.value,
250
456
  name: e.name,
251
457
  label: e.label,
252
458
  readonly: e.readonly,
@@ -255,14 +461,14 @@ const G = /* @__PURE__ */ m({
255
461
  variant: e.variant,
256
462
  density: e.density,
257
463
  color: e.color,
258
- "error-messages": o(l),
464
+ "error-messages": c(a),
259
465
  inputmode: "decimal",
260
- onInput: V,
466
+ onInput: $,
261
467
  onBlur: w,
262
- onFocus: C
468
+ onFocus: R
263
469
  }), null, 16, ["model-value", "name", "label", "readonly", "hide-details", "rounded", "variant", "density", "color", "error-messages"]));
264
470
  }
265
- }), ee = /* @__PURE__ */ m({
471
+ }), we = /* @__PURE__ */ k({
266
472
  name: "FSelect",
267
473
  inheritAttrs: !1,
268
474
  __name: "FSelect",
@@ -279,13 +485,13 @@ const G = /* @__PURE__ */ m({
279
485
  rules: { type: [String, Function], default: "" }
280
486
  },
281
487
  setup(t) {
282
- const e = t, r = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
488
+ const e = t, n = F(() => e.rules), { errorMessage: a, value: l } = T(() => e.name, n, {
283
489
  initialValue: e.modelValue,
284
490
  syncVModel: !0
285
491
  });
286
- return (d, n) => (i(), p(o(L), f(d.$attrs, {
287
- modelValue: o(a),
288
- "onUpdate:modelValue": n[0] || (n[0] = (s) => g(a) ? a.value = s : null),
492
+ return (u, r) => (f(), g(c(fe), _(u.$attrs, {
493
+ modelValue: c(l),
494
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => N(l) ? l.value = d : null),
289
495
  name: e.name,
290
496
  items: e.items,
291
497
  rounded: e.rounded,
@@ -294,17 +500,17 @@ const G = /* @__PURE__ */ m({
294
500
  color: e.color,
295
501
  "hide-details": e.hideDetails,
296
502
  "return-object": e.returnObject,
297
- "error-messages": o(l)
298
- }), B({ _: 2 }, [
299
- x(d.$slots, (s, y) => ({
300
- name: y,
301
- fn: S((c) => [
302
- T(d.$slots, y, M(k(c ?? {})))
503
+ "error-messages": c(a)
504
+ }), I({ _: 2 }, [
505
+ A(u.$slots, (d, p) => ({
506
+ name: p,
507
+ fn: y((i) => [
508
+ M(u.$slots, p, j(z(i ?? {})))
303
509
  ])
304
510
  }))
305
511
  ]), 1040, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "hide-details", "return-object", "error-messages"]));
306
512
  }
307
- }), te = /* @__PURE__ */ m({
513
+ }), xe = /* @__PURE__ */ k({
308
514
  name: "FNumberField",
309
515
  inheritAttrs: !1,
310
516
  __name: "FNumberField",
@@ -328,13 +534,13 @@ const G = /* @__PURE__ */ m({
328
534
  rules: { type: [String, Function], default: "" }
329
535
  },
330
536
  setup(t) {
331
- const e = t, r = F(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
537
+ const e = t, n = F(() => e.rules), { errorMessage: a, value: l } = T(() => e.name, n, {
332
538
  initialValue: e.modelValue,
333
539
  syncVModel: !0
334
540
  });
335
- return (d, n) => (i(), p(o(W), f(d.$attrs, {
336
- modelValue: o(a),
337
- "onUpdate:modelValue": n[0] || (n[0] = (s) => g(a) ? a.value = s : null),
541
+ return (u, r) => (f(), g(c(pe), _(u.$attrs, {
542
+ modelValue: c(l),
543
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => N(l) ? l.value = d : null),
338
544
  name: e.name,
339
545
  color: e.color,
340
546
  density: e.density,
@@ -350,14 +556,14 @@ const G = /* @__PURE__ */ m({
350
556
  min: e.min,
351
557
  precision: e.precision,
352
558
  inset: e.inset,
353
- "error-messages": o(l)
559
+ "error-messages": c(a)
354
560
  }), null, 16, ["modelValue", "name", "color", "density", "rounded", "variant", "control-variant", "hide-details", "placeholder", "label", "prefix", "disabled", "readonly", "min", "precision", "inset", "error-messages"]));
355
561
  }
356
- }), ae = { key: 0 }, le = { key: 1 }, ne = /* @__PURE__ */ m({
562
+ }), Me = { key: 0 }, Te = { key: 1 }, Re = /* @__PURE__ */ k({
357
563
  name: "FSwitch",
358
564
  inheritAttrs: !1,
359
565
  __name: "FSwitch",
360
- props: /* @__PURE__ */ P({
566
+ props: /* @__PURE__ */ L({
361
567
  color: { default: "secondary" },
362
568
  density: { default: "comfortable" },
363
569
  hideDetails: { type: [Boolean, String], default: "auto" },
@@ -369,38 +575,38 @@ const G = /* @__PURE__ */ m({
369
575
  }),
370
576
  emits: ["update:modelValue"],
371
577
  setup(t) {
372
- const e = t, r = j(t, "modelValue");
373
- return (l, a) => (i(), p(o(Y), f(l.$attrs, {
374
- modelValue: r.value,
375
- "onUpdate:modelValue": a[0] || (a[0] = (d) => r.value = d),
578
+ const e = t, n = X(t, "modelValue");
579
+ return (a, l) => (f(), g(c(ye), _(a.$attrs, {
580
+ modelValue: n.value,
581
+ "onUpdate:modelValue": l[0] || (l[0] = (u) => n.value = u),
376
582
  color: e.color,
377
583
  "hide-details": e.hideDetails,
378
584
  density: e.density
379
- }), B({ _: 2 }, [
585
+ }), I({ _: 2 }, [
380
586
  e.labelTrue || e.labelFalse ? {
381
587
  name: "label",
382
- fn: S(() => [
383
- r.value ? (i(), D("span", ae, $(e.labelTrue), 1)) : (i(), D("span", le, $(e.labelFalse), 1))
588
+ fn: y(() => [
589
+ n.value ? (f(), P("span", Me, V(e.labelTrue), 1)) : (f(), P("span", Te, V(e.labelFalse), 1))
384
590
  ]),
385
591
  key: "0"
386
592
  } : void 0
387
593
  ]), 1040, ["modelValue", "color", "hide-details", "density"]));
388
594
  }
389
- }), ue = {
595
+ }), Ue = {
390
596
  install(t) {
391
- t.component("FButton", G), t.component("FTextField", H), t.component("FDataTable", J), t.component("FTextarea", K), t.component("FAutocomplete", Q), t.component("FCheckbox", X), t.component("FCurrencyField", Z), t.component("FSelect", ee), t.component("FNumberField", te), t.component("FSwitch", ne);
597
+ t.component("FButton", ge), t.component("FTextField", be), t.component("FDataTable", Be), t.component("FTextarea", _e), t.component("FAutocomplete", $e), t.component("FCheckbox", Ce), t.component("FCurrencyField", Se), t.component("FSelect", we), t.component("FNumberField", xe), t.component("FSwitch", Re);
392
598
  }
393
599
  };
394
600
  export {
395
- Q as FAutocomplete,
396
- G as FButton,
397
- X as FCheckbox,
398
- Z as FCurrencyField,
399
- J as FDataTable,
400
- te as FNumberField,
401
- ee as FSelect,
402
- ne as FSwitch,
403
- H as FTextField,
404
- K as FTextarea,
405
- ue as default
601
+ $e as FAutocomplete,
602
+ ge as FButton,
603
+ Ce as FCheckbox,
604
+ Se as FCurrencyField,
605
+ Be as FDataTable,
606
+ xe as FNumberField,
607
+ we as FSelect,
608
+ Re as FSwitch,
609
+ be as FTextField,
610
+ _e as FTextarea,
611
+ Ue as default
406
612
  };
@@ -1 +1 @@
1
- (function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vuetify/components"),require("maska/vue"),require("vee-validate")):typeof define=="function"&&define.amd?define(["exports","vue","vuetify/components","maska/vue","vee-validate"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.FinsoVueComponents={},r.Vue,r.VuetifyComponents,r.MaskaVue,r.VeeValidate))})(this,(function(r,e,m,$,y){"use strict";const g=e.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(n){const t=n;return(d,l)=>{const a=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(a,{color:t.color,rounded:t.rounded},null,8,["color","rounded"])}}}),V=e.defineComponent({name:"FTextField",inheritAttrs:!1,__name:"FTextField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},appendInnerIcon:{default:""},mask:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},emits:["clickAppendInner"],setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0});return(i,o)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(m.VTextField),e.mergeProps(i.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,clearable:t.clearable,"hide-details":t.hideDetails,"error-messages":e.unref(l),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":o[1]||(o[1]=s=>i.$emit("clickAppendInner"))}),null,16,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref($.vMaska),t.mask]])}}),b=e.defineComponent({name:"FDataTable",inheritAttrs:!1,__name:"FDataTable",props:{headers:{},items:{},loading:{type:Boolean,default:!1},search:{default:""},itemsPerPage:{default:10},hover:{type:Boolean,default:!0},density:{default:"default"}},setup(n){return(t,d)=>(e.openBlock(),e.createBlock(e.unref(m.VDataTable),e.mergeProps(t.$attrs,{headers:n.headers,items:n.items,loading:n.loading,search:n.search,"items-per-page":n.itemsPerPage,hover:n.hover,density:n.density}),e.createSlots({_:2},[e.renderList(t.$slots,(l,a)=>({name:a,fn:e.withCtx(i=>[e.renderSlot(t.$slots,a,e.normalizeProps(e.guardReactiveProps(i??{})))])}))]),1040,["headers","items","loading","search","items-per-page","hover","density"]))}}),B=e.defineComponent({name:"FTextarea",inheritAttrs:!1,__name:"FTextarea",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},label:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},noResize:{type:Boolean,default:!0},rows:{default:""},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0});return(i,o)=>(e.openBlock(),e.createBlock(e.unref(m.VTextarea),e.mergeProps(i.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,rounded:t.rounded,variant:t.variant,rows:t.rows,density:t.density,color:t.color,label:t.label,"hide-details":t.hideDetails,"no-resize":t.noResize,"error-messages":e.unref(l)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),k=e.defineComponent({name:"FAutocomplete",inheritAttrs:!1,__name:"FAutocomplete",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},clearable:{type:Boolean,default:!0},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!0},noDataText:{default:""},modelValue:{default:null},rules:{type:[String,Function],default:""}},emits:["change"],setup(n,{emit:t}){const d=t,l=n,a=e.computed(()=>l.rules),{errorMessage:i,value:o}=y.useField(()=>l.name,a,{initialValue:l.modelValue,syncVModel:!0});function s(f){d("change",f)}return(f,c)=>(e.openBlock(),e.createBlock(e.unref(m.VAutocomplete),e.mergeProps(f.$attrs,{modelValue:e.unref(o),"onUpdate:modelValue":[c[0]||(c[0]=F=>e.isRef(o)?o.value=F:null),c[1]||(c[1]=F=>s(e.unref(o)))],name:l.name,items:l.items,rounded:l.rounded,variant:l.variant,density:l.density,color:l.color,clearable:l.clearable,"hide-details":l.hideDetails,"return-object":l.returnObject,"no-data-text":l.noDataText,"error-messages":e.unref(i),"menu-props":{maxWidth:0}}),null,16,["modelValue","name","items","rounded","variant","density","color","clearable","hide-details","return-object","no-data-text","error-messages"]))}}),S=e.defineComponent({name:"FCheckbox",inheritAttrs:!1,__name:"FCheckbox",props:{color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},indeterminate:{type:Boolean,default:!1},density:{default:"compact"}},setup(n){const t=n;return(d,l)=>(e.openBlock(),e.createBlock(e.unref(m.VCheckbox),e.mergeProps(d.$attrs,{color:t.color,"hide-details":t.hideDetails,indeterminate:t.indeterminate,density:t.density}),null,16,["color","hide-details","indeterminate","density"]))}}),_=e.defineComponent({name:"FCurrencyField",inheritAttrs:!1,__name:"FCurrencyField",props:{name:{},label:{default:""},readonly:{type:Boolean,default:!1},hideDetails:{type:[Boolean,String],default:"auto"},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},locale:{default:"tr-TR"},currency:{default:"TRY"},precision:{default:2},modelValue:{default:null},rules:{type:[String,Function],default:""}},setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0}),i=e.computed(()=>new Intl.NumberFormat(t.locale,{style:"currency",currency:t.currency,minimumFractionDigits:t.precision,maximumFractionDigits:t.precision})),o=e.ref(s(t.modelValue));function s(u){return u==null||isNaN(u)?"":i.value.format(u)}function f(u){const p=u.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),h=parseFloat(p);return isNaN(h)?null:Math.round(h*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const c=e.ref(!1);function F(u){const p=u.target;o.value=p.value,a.value=f(p.value)}function w(){c.value=!1,o.value=s(a.value)}function R(u){c.value=!0;const p=u.target,h=a.value;h!=null?o.value=h.toFixed(t.precision).replace(".",","):o.value="",setTimeout(()=>p.select(),0)}return e.watch(()=>t.modelValue,u=>{a.value=u,c.value||(o.value=s(u))}),(u,p)=>(e.openBlock(),e.createBlock(e.unref(m.VTextField),e.mergeProps(u.$attrs,{"model-value":o.value,name:t.name,label:t.label,readonly:t.readonly,"hide-details":t.hideDetails,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"error-messages":e.unref(l),inputmode:"decimal",onInput:F,onBlur:w,onFocus:R}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),D=e.defineComponent({name:"FSelect",inheritAttrs:!1,__name:"FSelect",props:{name:{},items:{default:()=>[]},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},color:{default:"secondary"},hideDetails:{type:[Boolean,String],default:"auto"},returnObject:{type:Boolean,default:!1},modelValue:{default:""},rules:{type:[String,Function],default:""}},setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0});return(i,o)=>(e.openBlock(),e.createBlock(e.unref(m.VSelect),e.mergeProps(i.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,items:t.items,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"hide-details":t.hideDetails,"return-object":t.returnObject,"error-messages":e.unref(l)}),e.createSlots({_:2},[e.renderList(i.$slots,(s,f)=>({name:f,fn:e.withCtx(c=>[e.renderSlot(i.$slots,f,e.normalizeProps(e.guardReactiveProps(c??{})))])}))]),1040,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),C=e.defineComponent({name:"FNumberField",inheritAttrs:!1,__name:"FNumberField",props:{name:{},rounded:{default:"lg"},variant:{default:"outlined"},density:{default:"compact"},controlVariant:{default:"stacked"},color:{default:"secondary"},label:{default:""},placeholder:{default:""},prefix:{default:""},hideDetails:{type:[Boolean,String],default:"auto"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},min:{default:0},precision:{default:0},inset:{type:Boolean,default:!0},modelValue:{default:-1},rules:{type:[String,Function],default:""}},setup(n){const t=n,d=e.computed(()=>t.rules),{errorMessage:l,value:a}=y.useField(()=>t.name,d,{initialValue:t.modelValue,syncVModel:!0});return(i,o)=>(e.openBlock(),e.createBlock(e.unref(m.VNumberInput),e.mergeProps(i.$attrs,{modelValue:e.unref(a),"onUpdate:modelValue":o[0]||(o[0]=s=>e.isRef(a)?a.value=s:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,"control-variant":t.controlVariant,"hide-details":t.hideDetails,placeholder:t.placeholder,label:t.label,prefix:t.prefix,disabled:t.disabled,readonly:t.readonly,min:t.min,precision:t.precision,inset:t.inset,"error-messages":e.unref(l)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),M={key:0},x={key:1},T=e.defineComponent({name:"FSwitch",inheritAttrs:!1,__name:"FSwitch",props:e.mergeModels({color:{default:"secondary"},density:{default:"comfortable"},hideDetails:{type:[Boolean,String],default:"auto"},labelTrue:{default:""},labelFalse:{default:""}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const t=n,d=e.useModel(n,"modelValue");return(l,a)=>(e.openBlock(),e.createBlock(e.unref(m.VSwitch),e.mergeProps(l.$attrs,{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=i=>d.value=i),color:t.color,"hide-details":t.hideDetails,density:t.density}),e.createSlots({_:2},[t.labelTrue||t.labelFalse?{name:"label",fn:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(t.labelTrue),1)):(e.openBlock(),e.createElementBlock("span",x,e.toDisplayString(t.labelFalse),1))]),key:"0"}:void 0]),1040,["modelValue","color","hide-details","density"]))}}),P={install(n){n.component("FButton",g),n.component("FTextField",V),n.component("FDataTable",b),n.component("FTextarea",B),n.component("FAutocomplete",k),n.component("FCheckbox",S),n.component("FCurrencyField",_),n.component("FSelect",D),n.component("FNumberField",C),n.component("FSwitch",T)}};r.FAutocomplete=k,r.FButton=g,r.FCheckbox=S,r.FCurrencyField=_,r.FDataTable=b,r.FNumberField=C,r.FSelect=D,r.FSwitch=T,r.FTextField=V,r.FTextarea=B,r.default=P,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(m,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):(m=typeof globalThis<"u"?globalThis:m||self,e(m.FinsoVueComponents={},m.Vue,m.VuetifyComponents,m.MaskaVue,m.VeeValidate))})(this,(function(m,e,k,z,B){"use strict";const _=e.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(o){const t=o;return(a,l)=>{const n=e.resolveComponent("v-btn");return e.openBlock(),e.createBlock(n,{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:l,value:n}=B.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,d)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(k.VTextField),e.mergeProps(c.$attrs,{modelValue:e.unref(n),"onUpdate:modelValue":d[0]||(d[0]=i=>e.isRef(n)?n.value=i:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,clearable:t.clearable,"hide-details":t.hideDetails,"error-messages":e.unref(l),"append-inner-icon":t.appendInnerIcon,"onClick:appendInner":d[1]||(d[1]=i=>c.$emit("clickAppendInner"))}),e.createSlots({_:2},[e.renderList(c.$slots,(i,p)=>({name:p,fn:e.withCtx(u=>[e.renderSlot(c.$slots,p,e.normalizeProps(e.guardReactiveProps(u??{})))])}))]),1040,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref(z.vMaska),t.mask]])}}),U={key:1},j={key:4},E={class:"f-data-table__actions"},$=((o,t)=>{const a=o.__vccOpts||o;for(const[l,n]of t)a[l]=n;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:!1},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,l=t,n=e.useModel(o,"page"),c=e.useModel(o,"itemsPerPage"),d=e.useModel(o,"sortBy"),i=e.ref(!1),p=e.ref(null);function u(s,f){return f.split(".").reduce((F,w)=>F==null?void 0:F[w],s)}function b(s){return s==null?"":new Intl.NumberFormat(a.moneyLocale,{style:"currency",currency:a.moneyCurrency}).format(s)}function C(s){if(!s)return"";const f=s.replace(/\D/g,"");return f.length<10?s:`(${f.substring(0,3)}) ${f.substring(3,6)} ${f.substring(6,10)}`}const D=e.computed(()=>{const F=a.items.length*52+56;return Math.min(F,a.maxHeight)}),y=e.computed(()=>!a.canEditRecord&&!a.canReadRecord?{}:{"click:row":(s,{item:f})=>{l("show-record",f)}}),h=e.computed(()=>a.headers.filter(s=>s.type&&s.key!=="actions")),V=e.computed(()=>a.headers.some(s=>s.key==="actions"));function O(s){a.showDeleteConfirm?(p.value=s,i.value=!0):l("delete-record",s)}function q(){l("delete-record",p.value),i.value=!1,p.value=null}return(s,f)=>{const F=e.resolveComponent("v-img"),w=e.resolveComponent("v-avatar"),Y=e.resolveComponent("v-chip"),G=e.resolveComponent("v-icon"),S=e.resolveComponent("v-btn"),W=e.resolveComponent("v-card-title"),J=e.resolveComponent("v-card-text"),K=e.resolveComponent("v-spacer"),Q=e.resolveComponent("v-card-actions"),Z=e.resolveComponent("v-card"),v=e.resolveComponent("v-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(s.$attrs,{page:n.value,"onUpdate:page":f[0]||(f[0]=r=>n.value=r),"items-per-page":c.value,"onUpdate:itemsPerPage":f[1]||(f[1]=r=>c.value=r),"sort-by":d.value,"onUpdate:sortBy":f[2]||(f[2]=r=>d.value=r),headers:o.headers,items:o.items,"items-length":o.serverSide?o.totalCount:void 0,loading:o.loading,hover:o.hover,density:o.density,height:D.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(h.value,r=>({name:`item.${r.key}`,fn:e.withCtx(({item:g})=>[e.renderSlot(s.$slots,`item.${r.key}`,{item:g,value:u(g,r.key)},()=>[r.type==="image"?(e.openBlock(),e.createBlock(w,{key:0,rounded:"lg",variant:"elevated"},{default:e.withCtx(()=>[e.createVNode(F,{src:u(g,r.key),class:"f-data-table__logo"},null,8,["src"])]),_:2},1024)):r.type==="money"?(e.openBlock(),e.createElementBlock("span",U,e.toDisplayString(b(u(g,r.key))),1)):r.type==="status"?(e.openBlock(),e.createBlock(Y,{key:2,color:u(g,r.key)?"green-darken-1":"red-darken-2",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u(g,r.key)?o.labelActive:o.labelPassive),1)]),_:2},1032,["color"])):r.type==="boolean"?(e.openBlock(),e.createBlock(G,{key:3,color:u(g,r.key)?"green-darken-1":"red-darken-2"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u(g,r.key)?"mdi-check":"mdi-close"),1)]),_:2},1032,["color"])):r.type==="gsmNo"?(e.openBlock(),e.createElementBlock("span",j,e.toDisplayString(C(u(g,r.key))),1)):e.createCommentVNode("",!0)],!0)])})),V.value?{name:"item.actions",fn:e.withCtx(({item:r})=>[e.renderSlot(s.$slots,"item.actions",{item:r},()=>[e.createElementVNode("div",E,[o.canEditRecord||o.canReadRecord?(e.openBlock(),e.createBlock(S,{key:0,icon:"mdi-pencil",variant:"text",size:"small",onClick:e.withModifiers(g=>l("show-record",r),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0),o.canDeleteRecord?(e.openBlock(),e.createBlock(S,{key:1,icon:"mdi-delete",variant:"text",size:"small",color:"red-darken-2",onClick:e.withModifiers(g=>O(r),["stop"])},null,8,["onClick"])):e.createCommentVNode("",!0)])],!0)]),key:"0"}:void 0,e.renderList(s.$slots,(r,g)=>({name:g,fn:e.withCtx(ee=>[e.renderSlot(s.$slots,g,e.normalizeProps(e.guardReactiveProps(ee??{})),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(v,{modelValue:i.value,"onUpdate:modelValue":f[4]||(f[4]=r=>i.value=r),"max-width":"400"},{default:e.withCtx(()=>[e.createVNode(Z,null,{default:e.withCtx(()=>[e.createVNode(W,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.labelDeleteTitle),1)]),_:1}),e.createVNode(J,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.deleteMessageFormatter&&p.value?o.deleteMessageFormatter(p.value):o.labelDeleteMessage),1)]),_:1}),e.createVNode(Q,null,{default:e.withCtx(()=>[e.createVNode(K),e.createVNode(S,{variant:"text",onClick:f[3]||(f[3]=r=>i.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.labelDeleteCancel),1)]),_:1}),e.createVNode(S,{color:"red-darken-2",variant:"flat",onClick:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.labelDeleteConfirm),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-18a58608"]]),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:l,value:n}=B.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,d)=>(e.openBlock(),e.createBlock(e.unref(k.VTextarea),e.mergeProps(c.$attrs,{modelValue:e.unref(n),"onUpdate:modelValue":d[0]||(d[0]=i=>e.isRef(n)?n.value=i:null),name:t.name,rounded:t.rounded,variant:t.variant,rows:t.rows,density:t.density,color:t.color,label:t.label,"hide-details":t.hideDetails,"no-resize":t.noResize,"error-messages":e.unref(l)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),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,l=o,n=e.computed(()=>l.rules),{errorMessage:c,value:d}=B.useField(()=>l.name,n,{initialValue:l.modelValue,syncVModel:!0});function i(p){a("change",p)}return(p,u)=>(e.openBlock(),e.createBlock(e.unref(k.VAutocomplete),e.mergeProps(p.$attrs,{modelValue:e.unref(d),"onUpdate:modelValue":[u[0]||(u[0]=b=>e.isRef(d)?d.value=b:null),u[1]||(u[1]=b=>i(e.unref(d)))],name:l.name,items:l.items,rounded:l.rounded,variant:l.variant,density:l.density,color:l.color,clearable:l.clearable,"hide-details":l.hideDetails,"return-object":l.returnObject,"no-data-text":l.noDataText,"error-messages":e.unref(c),"menu-props":{maxWidth:0}}),e.createSlots({_:2},[e.renderList(p.$slots,(b,C)=>({name:C,fn:e.withCtx(D=>[e.renderSlot(p.$slots,C,e.normalizeProps(e.guardReactiveProps(D??{})))])}))]),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,l)=>(e.openBlock(),e.createBlock(e.unref(k.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"]))}}),N=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:l,value:n}=B.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})),d=e.ref(i(t.modelValue));function i(y){return y==null||isNaN(y)?"":c.value.format(y)}function p(y){const h=y.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),V=parseFloat(h);return isNaN(V)?null:Math.round(V*Math.pow(10,t.precision))/Math.pow(10,t.precision)}const u=e.ref(!1);function b(y){const h=y.target;d.value=h.value,n.value=p(h.value)}function C(){u.value=!1,d.value=i(n.value)}function D(y){u.value=!0;const h=y.target,V=n.value;V!=null?d.value=V.toFixed(t.precision).replace(".",","):d.value="",setTimeout(()=>h.select(),0)}return e.watch(()=>t.modelValue,y=>{n.value=y,u.value||(d.value=i(y))}),(y,h)=>(e.openBlock(),e.createBlock(e.unref(k.VTextField),e.mergeProps(y.$attrs,{"model-value":d.value,name:t.name,label:t.label,readonly:t.readonly,"hide-details":t.hideDetails,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"error-messages":e.unref(l),inputmode:"decimal",onInput:b,onBlur:C,onFocus:D}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),R=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:l,value:n}=B.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,d)=>(e.openBlock(),e.createBlock(e.unref(k.VSelect),e.mergeProps(c.$attrs,{modelValue:e.unref(n),"onUpdate:modelValue":d[0]||(d[0]=i=>e.isRef(n)?n.value=i:null),name:t.name,items:t.items,rounded:t.rounded,variant:t.variant,density:t.density,color:t.color,"hide-details":t.hideDetails,"return-object":t.returnObject,"error-messages":e.unref(l)}),e.createSlots({_:2},[e.renderList(c.$slots,(i,p)=>({name:p,fn:e.withCtx(u=>[e.renderSlot(c.$slots,p,e.normalizeProps(e.guardReactiveProps(u??{})))])}))]),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:l,value:n}=B.useField(()=>t.name,a,{initialValue:t.modelValue,syncVModel:!0});return(c,d)=>(e.openBlock(),e.createBlock(e.unref(k.VNumberInput),e.mergeProps(c.$attrs,{modelValue:e.unref(n),"onUpdate:modelValue":d[0]||(d[0]=i=>e.isRef(n)?n.value=i:null),name:t.name,color:t.color,density:t.density,rounded:t.rounded,variant:t.variant,"control-variant":t.controlVariant,"hide-details":t.hideDetails,placeholder:t.placeholder,label:t.label,prefix:t.prefix,disabled:t.disabled,readonly:t.readonly,min:t.min,precision:t.precision,inset:t.inset,"error-messages":e.unref(l)}),null,16,["modelValue","name","color","density","rounded","variant","control-variant","hide-details","placeholder","label","prefix","disabled","readonly","min","precision","inset","error-messages"]))}}),X={key:0},H={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(l,n)=>(e.openBlock(),e.createBlock(e.unref(k.VSwitch),e.mergeProps(l.$attrs,{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[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",X,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"]))}}),L={install(o){o.component("FButton",_),o.component("FTextField",x),o.component("FDataTable",$),o.component("FTextarea",M),o.component("FAutocomplete",P),o.component("FCheckbox",T),o.component("FCurrencyField",N),o.component("FSelect",R),o.component("FNumberField",A),o.component("FSwitch",I)}};m.FAutocomplete=P,m.FButton=_,m.FCheckbox=T,m.FCurrencyField=N,m.FDataTable=$,m.FNumberField=A,m.FSelect=R,m.FSwitch=I,m.FTextField=x,m.FTextarea=M,m.default=L,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ export { FNumberField } from './components/FNumberField';
11
11
  export { FSwitch } from './components/FSwitch';
12
12
  export type { FButtonProps } from './components/FButton';
13
13
  export type { FTextFieldProps } from './components/FTextField';
14
- export type { FDataTableProps, FDataTableHeader } from './components/FDataTable';
14
+ export type { FDataTableProps, FDataTableHeader, FDataTableHeaderType } from './components/FDataTable';
15
15
  export type { FTextareaProps } from './components/FTextarea';
16
16
  export type { FAutocompleteProps } from './components/FAutocomplete';
17
17
  export type { FCheckboxProps } from './components/FCheckbox';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "finso-vue-components",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Finso Vue 3 + Vuetify UI Component Library",
5
5
  "type": "module",
6
6
  "main": "./dist/finso-vue-components.umd.cjs",
@@ -17,13 +17,6 @@
17
17
  "files": [
18
18
  "dist"
19
19
  ],
20
- "scripts": {
21
- "build": "vite build && vue-tsc --emitDeclarationOnly",
22
- "storybook": "storybook dev -p 6006",
23
- "build-storybook": "storybook build",
24
- "lint": "eslint src/",
25
- "prepublishOnly": "pnpm build"
26
- },
27
20
  "peerDependencies": {
28
21
  "maska": "^3.0.0",
29
22
  "vee-validate": "^4.12.0",
@@ -63,5 +56,10 @@
63
56
  "publishConfig": {
64
57
  "access": "public"
65
58
  },
66
- "packageManager": "pnpm@10.29.3+sha512.498e1fb4cca5aa06c1dcf2611e6fafc50972ffe7189998c409e90de74566444298ffe43e6cd2acdc775ba1aa7cc5e092a8b7054c811ba8c5770f84693d33d2dc"
67
- }
59
+ "scripts": {
60
+ "build": "vite build && vue-tsc --emitDeclarationOnly",
61
+ "storybook": "storybook dev -p 6006",
62
+ "build-storybook": "storybook build",
63
+ "lint": "eslint src/"
64
+ }
65
+ }