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