finso-vue-components 0.2.0 → 0.4.0
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/FAutocomplete/FAutocomplete.vue.d.ts +33 -0
- package/dist/components/FAutocomplete/index.d.ts +2 -0
- package/dist/components/FButton/FButton.vue.d.ts +1 -23
- package/dist/components/FCheckbox/FCheckbox.vue.d.ts +13 -0
- package/dist/components/FCheckbox/index.d.ts +2 -0
- package/dist/components/FCurrencyField/FCurrencyField.vue.d.ts +31 -0
- package/dist/components/FCurrencyField/index.d.ts +2 -0
- package/dist/components/FDataTable/FDataTable.vue.d.ts +1 -1
- package/dist/components/FNumberField/FNumberField.vue.d.ts +39 -0
- package/dist/components/FNumberField/index.d.ts +2 -0
- package/dist/components/FSelect/FSelect.vue.d.ts +25 -0
- package/dist/components/FSelect/index.d.ts +2 -0
- package/dist/components/FSwitch/FSwitch.vue.d.ts +23 -0
- package/dist/components/FSwitch/index.d.ts +2 -0
- package/dist/components/FTextField/FTextField.vue.d.ts +2 -18
- package/dist/components/FTextarea/FTextarea.vue.d.ts +27 -0
- package/dist/components/FTextarea/index.d.ts +2 -0
- package/dist/finso-vue-components.js +343 -102
- package/dist/finso-vue-components.umd.cjs +1 -1
- package/dist/index.d.ts +28 -0
- package/package.json +10 -8
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type GenericValidateFunction } from 'vee-validate';
|
|
2
|
+
export interface FAutocompleteProps {
|
|
3
|
+
name: string;
|
|
4
|
+
items?: any[];
|
|
5
|
+
rounded?: string;
|
|
6
|
+
variant?: 'outlined' | 'plain' | 'underlined' | 'filled';
|
|
7
|
+
density?: 'default' | 'comfortable' | 'compact';
|
|
8
|
+
color?: string;
|
|
9
|
+
clearable?: boolean;
|
|
10
|
+
hideDetails?: boolean | 'auto';
|
|
11
|
+
returnObject?: boolean;
|
|
12
|
+
noDataText?: string;
|
|
13
|
+
modelValue?: any;
|
|
14
|
+
rules?: string | GenericValidateFunction<any>;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: import("vue").DefineComponent<FAutocompleteProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
change: (value: any) => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<FAutocompleteProps> & Readonly<{
|
|
19
|
+
onChange?: ((value: any) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
color: string;
|
|
22
|
+
rounded: string;
|
|
23
|
+
density: "default" | "comfortable" | "compact";
|
|
24
|
+
variant: "outlined" | "plain" | "underlined" | "filled";
|
|
25
|
+
clearable: boolean;
|
|
26
|
+
hideDetails: boolean | "auto";
|
|
27
|
+
modelValue: any;
|
|
28
|
+
rules: string | GenericValidateFunction<any>;
|
|
29
|
+
items: any[];
|
|
30
|
+
returnObject: boolean;
|
|
31
|
+
noDataText: string;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
export default _default;
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
export interface FButtonProps {
|
|
2
|
-
variant?: 'flat' | 'text' | 'elevated' | 'tonal' | 'outlined' | 'plain';
|
|
3
2
|
color?: string;
|
|
4
|
-
size?: 'x-small' | 'small' | 'default' | 'large' | 'x-large';
|
|
5
3
|
rounded?: string | number | boolean;
|
|
6
|
-
loading?: boolean;
|
|
7
|
-
disabled?: boolean;
|
|
8
4
|
}
|
|
9
|
-
declare
|
|
10
|
-
type __VLS_Slots = {} & {
|
|
11
|
-
prepend?: (props: typeof __VLS_6) => any;
|
|
12
|
-
} & {
|
|
13
|
-
default?: (props: typeof __VLS_8) => any;
|
|
14
|
-
} & {
|
|
15
|
-
append?: (props: typeof __VLS_10) => any;
|
|
16
|
-
};
|
|
17
|
-
declare const __VLS_component: import("vue").DefineComponent<FButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FButtonProps> & Readonly<{}>, {
|
|
18
|
-
variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
|
|
5
|
+
declare const _default: import("vue").DefineComponent<FButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FButtonProps> & Readonly<{}>, {
|
|
19
6
|
color: string;
|
|
20
|
-
size: "x-small" | "small" | "default" | "large" | "x-large";
|
|
21
7
|
rounded: string | number | boolean;
|
|
22
|
-
loading: boolean;
|
|
23
|
-
disabled: boolean;
|
|
24
8
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
26
9
|
export default _default;
|
|
27
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
-
new (): {
|
|
29
|
-
$slots: S;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FCheckboxProps {
|
|
2
|
+
color?: string;
|
|
3
|
+
hideDetails?: boolean | 'auto';
|
|
4
|
+
indeterminate?: boolean;
|
|
5
|
+
density?: 'default' | 'comfortable' | 'compact';
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("vue").DefineComponent<FCheckboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FCheckboxProps> & Readonly<{}>, {
|
|
8
|
+
color: string;
|
|
9
|
+
density: "default" | "comfortable" | "compact";
|
|
10
|
+
hideDetails: boolean | "auto";
|
|
11
|
+
indeterminate: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type GenericValidateFunction } from 'vee-validate';
|
|
2
|
+
export interface FCurrencyFieldProps {
|
|
3
|
+
name: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
readonly?: boolean;
|
|
6
|
+
hideDetails?: boolean | 'auto';
|
|
7
|
+
rounded?: string;
|
|
8
|
+
variant?: 'outlined' | 'plain' | 'underlined' | 'filled';
|
|
9
|
+
density?: 'default' | 'comfortable' | 'compact';
|
|
10
|
+
color?: string;
|
|
11
|
+
locale?: string;
|
|
12
|
+
currency?: string;
|
|
13
|
+
precision?: number;
|
|
14
|
+
modelValue?: number | null;
|
|
15
|
+
rules?: string | GenericValidateFunction<number | null>;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import("vue").DefineComponent<FCurrencyFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FCurrencyFieldProps> & Readonly<{}>, {
|
|
18
|
+
color: string;
|
|
19
|
+
rounded: string;
|
|
20
|
+
density: "default" | "comfortable" | "compact";
|
|
21
|
+
variant: "outlined" | "plain" | "underlined" | "filled";
|
|
22
|
+
readonly: boolean;
|
|
23
|
+
hideDetails: boolean | "auto";
|
|
24
|
+
modelValue: number | null;
|
|
25
|
+
rules: string | GenericValidateFunction<number | null>;
|
|
26
|
+
label: string;
|
|
27
|
+
locale: string;
|
|
28
|
+
currency: string;
|
|
29
|
+
precision: number;
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
export default _default;
|
|
@@ -19,8 +19,8 @@ type __VLS_Slots = {} & {
|
|
|
19
19
|
[K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any;
|
|
20
20
|
};
|
|
21
21
|
declare const __VLS_component: import("vue").DefineComponent<FDataTableProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FDataTableProps> & Readonly<{}>, {
|
|
22
|
-
loading: boolean;
|
|
23
22
|
density: "default" | "comfortable" | "compact";
|
|
23
|
+
loading: boolean;
|
|
24
24
|
search: string;
|
|
25
25
|
itemsPerPage: number;
|
|
26
26
|
hover: boolean;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type GenericValidateFunction } from 'vee-validate';
|
|
2
|
+
export interface FNumberFieldProps {
|
|
3
|
+
name: string;
|
|
4
|
+
rounded?: string;
|
|
5
|
+
variant?: 'outlined' | 'plain' | 'underlined' | 'filled';
|
|
6
|
+
density?: 'default' | 'comfortable' | 'compact';
|
|
7
|
+
controlVariant?: 'default' | 'stacked' | 'split';
|
|
8
|
+
color?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
prefix?: string;
|
|
12
|
+
hideDetails?: boolean | 'auto';
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
readonly?: boolean;
|
|
15
|
+
min?: number;
|
|
16
|
+
precision?: number;
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
modelValue?: number;
|
|
19
|
+
rules?: string | GenericValidateFunction<any>;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: import("vue").DefineComponent<FNumberFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FNumberFieldProps> & Readonly<{}>, {
|
|
22
|
+
color: string;
|
|
23
|
+
rounded: string;
|
|
24
|
+
density: "default" | "comfortable" | "compact";
|
|
25
|
+
variant: "outlined" | "plain" | "underlined" | "filled";
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
readonly: boolean;
|
|
28
|
+
placeholder: string;
|
|
29
|
+
hideDetails: boolean | "auto";
|
|
30
|
+
modelValue: number;
|
|
31
|
+
rules: string | GenericValidateFunction<any>;
|
|
32
|
+
label: string;
|
|
33
|
+
prefix: string;
|
|
34
|
+
min: number;
|
|
35
|
+
precision: number;
|
|
36
|
+
controlVariant: "default" | "stacked" | "split";
|
|
37
|
+
inset: boolean;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type GenericValidateFunction } from 'vee-validate';
|
|
2
|
+
export interface FSelectProps {
|
|
3
|
+
name: string;
|
|
4
|
+
items?: any[];
|
|
5
|
+
rounded?: string;
|
|
6
|
+
variant?: 'outlined' | 'plain' | 'underlined' | 'filled';
|
|
7
|
+
density?: 'default' | 'comfortable' | 'compact';
|
|
8
|
+
color?: string;
|
|
9
|
+
hideDetails?: boolean | 'auto';
|
|
10
|
+
returnObject?: boolean;
|
|
11
|
+
modelValue?: any;
|
|
12
|
+
rules?: string | GenericValidateFunction<any>;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import("vue").DefineComponent<FSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FSelectProps> & Readonly<{}>, {
|
|
15
|
+
color: string;
|
|
16
|
+
rounded: string;
|
|
17
|
+
density: "default" | "comfortable" | "compact";
|
|
18
|
+
variant: "outlined" | "plain" | "underlined" | "filled";
|
|
19
|
+
hideDetails: boolean | "auto";
|
|
20
|
+
modelValue: any;
|
|
21
|
+
rules: string | GenericValidateFunction<any>;
|
|
22
|
+
items: any[];
|
|
23
|
+
returnObject: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface FSwitchProps {
|
|
2
|
+
color?: string;
|
|
3
|
+
density?: 'default' | 'comfortable' | 'compact';
|
|
4
|
+
hideDetails?: boolean | 'auto';
|
|
5
|
+
labelTrue?: string;
|
|
6
|
+
labelFalse?: string;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = FSwitchProps;
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
10
|
+
modelValue?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
color: string;
|
|
18
|
+
density: "default" | "comfortable" | "compact";
|
|
19
|
+
hideDetails: boolean | "auto";
|
|
20
|
+
labelTrue: string;
|
|
21
|
+
labelFalse: string;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -12,25 +12,15 @@ export interface FTextFieldProps {
|
|
|
12
12
|
modelValue?: string;
|
|
13
13
|
rules?: string | GenericValidateFunction<string>;
|
|
14
14
|
}
|
|
15
|
-
declare
|
|
16
|
-
type __VLS_Slots = {} & {
|
|
17
|
-
prepend?: (props: typeof __VLS_10) => any;
|
|
18
|
-
} & {
|
|
19
|
-
'prepend-inner'?: (props: typeof __VLS_12) => any;
|
|
20
|
-
} & {
|
|
21
|
-
'append-inner'?: (props: typeof __VLS_14) => any;
|
|
22
|
-
} & {
|
|
23
|
-
append?: (props: typeof __VLS_16) => any;
|
|
24
|
-
};
|
|
25
|
-
declare const __VLS_component: import("vue").DefineComponent<FTextFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
declare const _default: import("vue").DefineComponent<FTextFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
16
|
clickAppendInner: () => any;
|
|
27
17
|
}, string, import("vue").PublicProps, Readonly<FTextFieldProps> & Readonly<{
|
|
28
18
|
onClickAppendInner?: (() => any) | undefined;
|
|
29
19
|
}>, {
|
|
30
|
-
variant: "outlined" | "plain" | "underlined" | "filled" | "solo" | "solo-inverted" | "solo-filled";
|
|
31
20
|
color: string;
|
|
32
21
|
rounded: string;
|
|
33
22
|
density: "default" | "comfortable" | "compact";
|
|
23
|
+
variant: "outlined" | "plain" | "underlined" | "filled" | "solo" | "solo-inverted" | "solo-filled";
|
|
34
24
|
clearable: boolean;
|
|
35
25
|
hideDetails: boolean | "auto";
|
|
36
26
|
appendInnerIcon: string;
|
|
@@ -38,10 +28,4 @@ declare const __VLS_component: import("vue").DefineComponent<FTextFieldProps, {}
|
|
|
38
28
|
modelValue: string;
|
|
39
29
|
rules: string | GenericValidateFunction<string>;
|
|
40
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
42
31
|
export default _default;
|
|
43
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
44
|
-
new (): {
|
|
45
|
-
$slots: S;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type GenericValidateFunction } from 'vee-validate';
|
|
2
|
+
export interface FTextareaProps {
|
|
3
|
+
name: string;
|
|
4
|
+
rounded?: string;
|
|
5
|
+
variant?: 'outlined' | 'plain' | 'underlined' | 'filled';
|
|
6
|
+
density?: 'default' | 'comfortable' | 'compact';
|
|
7
|
+
color?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
hideDetails?: boolean | 'auto';
|
|
10
|
+
noResize?: boolean;
|
|
11
|
+
rows?: string | number;
|
|
12
|
+
modelValue?: string;
|
|
13
|
+
rules?: string | GenericValidateFunction<string>;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: import("vue").DefineComponent<FTextareaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FTextareaProps> & Readonly<{}>, {
|
|
16
|
+
color: string;
|
|
17
|
+
rounded: string;
|
|
18
|
+
density: "default" | "comfortable" | "compact";
|
|
19
|
+
variant: "outlined" | "plain" | "underlined" | "filled";
|
|
20
|
+
hideDetails: boolean | "auto";
|
|
21
|
+
modelValue: string;
|
|
22
|
+
rules: string | GenericValidateFunction<string>;
|
|
23
|
+
label: string;
|
|
24
|
+
noResize: boolean;
|
|
25
|
+
rows: string | number;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
export default _default;
|
|
@@ -1,50 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { vMaska as
|
|
4
|
-
import { useField as
|
|
5
|
-
const
|
|
6
|
-
name: "FButton",
|
|
7
|
-
inheritAttrs: !1,
|
|
1
|
+
import { defineComponent as c, resolveComponent as M, openBlock as i, createBlock as m, computed as y, withDirectives as k, unref as o, mergeProps as p, isRef as g, createSlots as D, renderList as A, withCtx as x, renderSlot as w, normalizeProps as C, guardReactiveProps as N, ref as R, watch as B, useModel as I, createElementBlock as S, toDisplayString as _, mergeModels as j } from "vue";
|
|
2
|
+
import { VTextField as T, VDataTable as P, VTextarea as U, VAutocomplete as z, VCheckbox as O, VSelect as E, VNumberInput as L, 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__ */ c({
|
|
8
6
|
__name: "FButton",
|
|
9
7
|
props: {
|
|
10
|
-
variant: { default: "flat" },
|
|
11
8
|
color: { default: "primary" },
|
|
12
|
-
|
|
13
|
-
rounded: { type: [String, Number, Boolean], default: "lg" },
|
|
14
|
-
loading: { type: Boolean, default: !1 },
|
|
15
|
-
disabled: { type: Boolean, default: !1 }
|
|
9
|
+
rounded: { type: [String, Number, Boolean], default: "lg" }
|
|
16
10
|
},
|
|
17
|
-
setup(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
default: t(() => [
|
|
27
|
-
l(e.$slots, "default")
|
|
28
|
-
]),
|
|
29
|
-
_: 2
|
|
30
|
-
}, [
|
|
31
|
-
e.$slots.prepend ? {
|
|
32
|
-
name: "prepend",
|
|
33
|
-
fn: t(() => [
|
|
34
|
-
l(e.$slots, "prepend")
|
|
35
|
-
]),
|
|
36
|
-
key: "0"
|
|
37
|
-
} : void 0,
|
|
38
|
-
e.$slots.append ? {
|
|
39
|
-
name: "append",
|
|
40
|
-
fn: t(() => [
|
|
41
|
-
l(e.$slots, "append")
|
|
42
|
-
]),
|
|
43
|
-
key: "1"
|
|
44
|
-
} : void 0
|
|
45
|
-
]), 1040, ["variant", "color", "size", "rounded", "loading", "disabled"]));
|
|
11
|
+
setup(t) {
|
|
12
|
+
const e = t;
|
|
13
|
+
return (r, l) => {
|
|
14
|
+
const a = M("v-btn");
|
|
15
|
+
return i(), m(a, {
|
|
16
|
+
color: e.color,
|
|
17
|
+
rounded: e.rounded
|
|
18
|
+
}, null, 8, ["color", "rounded"]);
|
|
19
|
+
};
|
|
46
20
|
}
|
|
47
|
-
}),
|
|
21
|
+
}), H = /* @__PURE__ */ c({
|
|
48
22
|
name: "FTextField",
|
|
49
23
|
inheritAttrs: !1,
|
|
50
24
|
__name: "FTextField",
|
|
@@ -62,14 +36,14 @@ const I = /* @__PURE__ */ i({
|
|
|
62
36
|
rules: { type: [String, Function], default: "" }
|
|
63
37
|
},
|
|
64
38
|
emits: ["clickAppendInner"],
|
|
65
|
-
setup(
|
|
66
|
-
const e =
|
|
39
|
+
setup(t) {
|
|
40
|
+
const e = t, r = y(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
|
|
67
41
|
initialValue: e.modelValue,
|
|
68
42
|
syncVModel: !0
|
|
69
43
|
});
|
|
70
|
-
return (
|
|
71
|
-
modelValue: o(
|
|
72
|
-
"onUpdate:modelValue":
|
|
44
|
+
return (d, n) => k((i(), m(o(T), p(d.$attrs, {
|
|
45
|
+
modelValue: o(a),
|
|
46
|
+
"onUpdate:modelValue": n[0] || (n[0] = (u) => g(a) ? a.value = u : null),
|
|
73
47
|
name: e.name,
|
|
74
48
|
color: e.color,
|
|
75
49
|
density: e.density,
|
|
@@ -77,43 +51,14 @@ const I = /* @__PURE__ */ i({
|
|
|
77
51
|
variant: e.variant,
|
|
78
52
|
clearable: e.clearable,
|
|
79
53
|
"hide-details": e.hideDetails,
|
|
80
|
-
"error-messages": o(
|
|
54
|
+
"error-messages": o(l),
|
|
81
55
|
"append-inner-icon": e.appendInnerIcon,
|
|
82
|
-
"onClick:appendInner":
|
|
83
|
-
}),
|
|
84
|
-
|
|
85
|
-
name: "prepend",
|
|
86
|
-
fn: t(() => [
|
|
87
|
-
l(a.$slots, "prepend")
|
|
88
|
-
]),
|
|
89
|
-
key: "0"
|
|
90
|
-
} : void 0,
|
|
91
|
-
a.$slots["prepend-inner"] ? {
|
|
92
|
-
name: "prepend-inner",
|
|
93
|
-
fn: t(() => [
|
|
94
|
-
l(a.$slots, "prepend-inner")
|
|
95
|
-
]),
|
|
96
|
-
key: "1"
|
|
97
|
-
} : void 0,
|
|
98
|
-
a.$slots["append-inner"] ? {
|
|
99
|
-
name: "append-inner",
|
|
100
|
-
fn: t(() => [
|
|
101
|
-
l(a.$slots, "append-inner")
|
|
102
|
-
]),
|
|
103
|
-
key: "2"
|
|
104
|
-
} : void 0,
|
|
105
|
-
a.$slots.append ? {
|
|
106
|
-
name: "append",
|
|
107
|
-
fn: t(() => [
|
|
108
|
-
l(a.$slots, "append")
|
|
109
|
-
]),
|
|
110
|
-
key: "3"
|
|
111
|
-
} : void 0
|
|
112
|
-
]), 1040, ["modelValue", "name", "color", "density", "rounded", "variant", "clearable", "hide-details", "error-messages", "append-inner-icon"])), [
|
|
113
|
-
[o(V), e.mask]
|
|
56
|
+
"onClick:appendInner": n[1] || (n[1] = (u) => 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]
|
|
114
59
|
]);
|
|
115
60
|
}
|
|
116
|
-
}),
|
|
61
|
+
}), J = /* @__PURE__ */ c({
|
|
117
62
|
name: "FDataTable",
|
|
118
63
|
inheritAttrs: !1,
|
|
119
64
|
__name: "FDataTable",
|
|
@@ -126,32 +71,328 @@ const I = /* @__PURE__ */ i({
|
|
|
126
71
|
hover: { type: Boolean, default: !0 },
|
|
127
72
|
density: { default: "default" }
|
|
128
73
|
},
|
|
129
|
-
setup(
|
|
130
|
-
return (e,
|
|
131
|
-
headers:
|
|
132
|
-
items:
|
|
133
|
-
loading:
|
|
134
|
-
search:
|
|
135
|
-
"items-per-page":
|
|
136
|
-
hover:
|
|
137
|
-
density:
|
|
138
|
-
}),
|
|
139
|
-
|
|
140
|
-
name:
|
|
141
|
-
fn:
|
|
142
|
-
|
|
74
|
+
setup(t) {
|
|
75
|
+
return (e, r) => (i(), m(o(P), p(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
|
+
}), D({ _: 2 }, [
|
|
84
|
+
A(e.$slots, (l, a) => ({
|
|
85
|
+
name: a,
|
|
86
|
+
fn: x((d) => [
|
|
87
|
+
w(e.$slots, a, C(N(d ?? {})))
|
|
143
88
|
])
|
|
144
89
|
}))
|
|
145
90
|
]), 1040, ["headers", "items", "loading", "search", "items-per-page", "hover", "density"]));
|
|
146
91
|
}
|
|
147
|
-
}),
|
|
148
|
-
|
|
149
|
-
|
|
92
|
+
}), K = /* @__PURE__ */ c({
|
|
93
|
+
name: "FTextarea",
|
|
94
|
+
inheritAttrs: !1,
|
|
95
|
+
__name: "FTextarea",
|
|
96
|
+
props: {
|
|
97
|
+
name: {},
|
|
98
|
+
rounded: { default: "lg" },
|
|
99
|
+
variant: { default: "outlined" },
|
|
100
|
+
density: { default: "compact" },
|
|
101
|
+
color: { default: "secondary" },
|
|
102
|
+
label: { default: "" },
|
|
103
|
+
hideDetails: { type: [Boolean, String], default: "auto" },
|
|
104
|
+
noResize: { type: Boolean, default: !0 },
|
|
105
|
+
rows: { default: "" },
|
|
106
|
+
modelValue: { default: "" },
|
|
107
|
+
rules: { type: [String, Function], default: "" }
|
|
108
|
+
},
|
|
109
|
+
setup(t) {
|
|
110
|
+
const e = t, r = y(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
|
|
111
|
+
initialValue: e.modelValue,
|
|
112
|
+
syncVModel: !0
|
|
113
|
+
});
|
|
114
|
+
return (d, n) => (i(), m(o(U), p(d.$attrs, {
|
|
115
|
+
modelValue: o(a),
|
|
116
|
+
"onUpdate:modelValue": n[0] || (n[0] = (u) => g(a) ? a.value = u : null),
|
|
117
|
+
name: e.name,
|
|
118
|
+
rounded: e.rounded,
|
|
119
|
+
variant: e.variant,
|
|
120
|
+
rows: e.rows,
|
|
121
|
+
density: e.density,
|
|
122
|
+
color: e.color,
|
|
123
|
+
label: e.label,
|
|
124
|
+
"hide-details": e.hideDetails,
|
|
125
|
+
"no-resize": e.noResize,
|
|
126
|
+
"error-messages": o(l)
|
|
127
|
+
}), null, 16, ["modelValue", "name", "rounded", "variant", "rows", "density", "color", "label", "hide-details", "no-resize", "error-messages"]));
|
|
128
|
+
}
|
|
129
|
+
}), Q = /* @__PURE__ */ c({
|
|
130
|
+
name: "FAutocomplete",
|
|
131
|
+
inheritAttrs: !1,
|
|
132
|
+
__name: "FAutocomplete",
|
|
133
|
+
props: {
|
|
134
|
+
name: {},
|
|
135
|
+
items: { default: () => [] },
|
|
136
|
+
rounded: { default: "lg" },
|
|
137
|
+
variant: { default: "outlined" },
|
|
138
|
+
density: { default: "compact" },
|
|
139
|
+
color: { default: "secondary" },
|
|
140
|
+
clearable: { type: Boolean, default: !0 },
|
|
141
|
+
hideDetails: { type: [Boolean, String], default: "auto" },
|
|
142
|
+
returnObject: { type: Boolean, default: !0 },
|
|
143
|
+
noDataText: { default: "" },
|
|
144
|
+
modelValue: { default: null },
|
|
145
|
+
rules: { type: [String, Function], default: "" }
|
|
146
|
+
},
|
|
147
|
+
emits: ["change"],
|
|
148
|
+
setup(t, { emit: e }) {
|
|
149
|
+
const r = e, l = t, a = y(() => l.rules), { errorMessage: d, value: n } = v(() => l.name, a, {
|
|
150
|
+
initialValue: l.modelValue,
|
|
151
|
+
syncVModel: !0
|
|
152
|
+
});
|
|
153
|
+
function u(b) {
|
|
154
|
+
r("change", b);
|
|
155
|
+
}
|
|
156
|
+
return (b, h) => (i(), m(o(z), p(b.$attrs, {
|
|
157
|
+
modelValue: o(n),
|
|
158
|
+
"onUpdate:modelValue": [
|
|
159
|
+
h[0] || (h[0] = (V) => g(n) ? n.value = V : null),
|
|
160
|
+
h[1] || (h[1] = (V) => u(o(n)))
|
|
161
|
+
],
|
|
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)
|
|
173
|
+
}), null, 16, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "clearable", "hide-details", "return-object", "no-data-text", "error-messages"]));
|
|
174
|
+
}
|
|
175
|
+
}), W = /* @__PURE__ */ c({
|
|
176
|
+
name: "FCheckbox",
|
|
177
|
+
inheritAttrs: !1,
|
|
178
|
+
__name: "FCheckbox",
|
|
179
|
+
props: {
|
|
180
|
+
color: { default: "secondary" },
|
|
181
|
+
hideDetails: { type: [Boolean, String], default: "auto" },
|
|
182
|
+
indeterminate: { type: Boolean, default: !1 },
|
|
183
|
+
density: { default: "compact" }
|
|
184
|
+
},
|
|
185
|
+
setup(t) {
|
|
186
|
+
const e = t;
|
|
187
|
+
return (r, l) => (i(), m(o(O), p(r.$attrs, {
|
|
188
|
+
color: e.color,
|
|
189
|
+
"hide-details": e.hideDetails,
|
|
190
|
+
indeterminate: e.indeterminate,
|
|
191
|
+
density: e.density
|
|
192
|
+
}), null, 16, ["color", "hide-details", "indeterminate", "density"]));
|
|
193
|
+
}
|
|
194
|
+
}), X = /* @__PURE__ */ c({
|
|
195
|
+
name: "FCurrencyField",
|
|
196
|
+
inheritAttrs: !1,
|
|
197
|
+
__name: "FCurrencyField",
|
|
198
|
+
props: {
|
|
199
|
+
name: {},
|
|
200
|
+
label: { default: "" },
|
|
201
|
+
readonly: { type: Boolean, default: !1 },
|
|
202
|
+
hideDetails: { type: [Boolean, String], default: "auto" },
|
|
203
|
+
rounded: { default: "lg" },
|
|
204
|
+
variant: { default: "outlined" },
|
|
205
|
+
density: { default: "compact" },
|
|
206
|
+
color: { default: "secondary" },
|
|
207
|
+
locale: { default: "tr-TR" },
|
|
208
|
+
currency: { default: "TRY" },
|
|
209
|
+
precision: { default: 2 },
|
|
210
|
+
modelValue: { default: null },
|
|
211
|
+
rules: { type: [String, Function], default: "" }
|
|
212
|
+
},
|
|
213
|
+
setup(t) {
|
|
214
|
+
const e = t, r = y(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
|
|
215
|
+
initialValue: e.modelValue,
|
|
216
|
+
syncVModel: !0
|
|
217
|
+
}), d = y(
|
|
218
|
+
() => new Intl.NumberFormat(e.locale, {
|
|
219
|
+
style: "currency",
|
|
220
|
+
currency: e.currency,
|
|
221
|
+
minimumFractionDigits: e.precision,
|
|
222
|
+
maximumFractionDigits: e.precision
|
|
223
|
+
})
|
|
224
|
+
), n = R(u(e.modelValue));
|
|
225
|
+
function u(s) {
|
|
226
|
+
return s == null || isNaN(s) ? "" : d.value.format(s);
|
|
227
|
+
}
|
|
228
|
+
function b(s) {
|
|
229
|
+
const F = s.replace(/[^\d,.-]/g, "").replace(/\./g, "").replace(",", "."), f = parseFloat(F);
|
|
230
|
+
return isNaN(f) ? null : Math.round(f * Math.pow(10, e.precision)) / Math.pow(10, e.precision);
|
|
231
|
+
}
|
|
232
|
+
function h(s) {
|
|
233
|
+
const F = s.target, f = b(F.value);
|
|
234
|
+
a.value = f;
|
|
235
|
+
}
|
|
236
|
+
function V() {
|
|
237
|
+
n.value = u(a.value);
|
|
238
|
+
}
|
|
239
|
+
function $(s) {
|
|
240
|
+
const F = s.target, f = a.value;
|
|
241
|
+
f != null && (n.value = f.toFixed(e.precision).replace(".", ",")), setTimeout(() => F.select(), 0);
|
|
242
|
+
}
|
|
243
|
+
return B(() => e.modelValue, (s) => {
|
|
244
|
+
a.value = s, n.value = u(s);
|
|
245
|
+
}), B(a, (s) => {
|
|
246
|
+
n.value = u(s);
|
|
247
|
+
}), (s, F) => (i(), m(o(T), p(s.$attrs, {
|
|
248
|
+
"model-value": n.value,
|
|
249
|
+
name: e.name,
|
|
250
|
+
label: e.label,
|
|
251
|
+
readonly: e.readonly,
|
|
252
|
+
"hide-details": e.hideDetails,
|
|
253
|
+
rounded: e.rounded,
|
|
254
|
+
variant: e.variant,
|
|
255
|
+
density: e.density,
|
|
256
|
+
color: e.color,
|
|
257
|
+
"error-messages": o(l),
|
|
258
|
+
inputmode: "decimal",
|
|
259
|
+
onInput: h,
|
|
260
|
+
onBlur: V,
|
|
261
|
+
onFocus: $
|
|
262
|
+
}), null, 16, ["model-value", "name", "label", "readonly", "hide-details", "rounded", "variant", "density", "color", "error-messages"]));
|
|
263
|
+
}
|
|
264
|
+
}), Z = /* @__PURE__ */ c({
|
|
265
|
+
name: "FSelect",
|
|
266
|
+
inheritAttrs: !1,
|
|
267
|
+
__name: "FSelect",
|
|
268
|
+
props: {
|
|
269
|
+
name: {},
|
|
270
|
+
items: { default: () => [] },
|
|
271
|
+
rounded: { default: "lg" },
|
|
272
|
+
variant: { default: "outlined" },
|
|
273
|
+
density: { default: "compact" },
|
|
274
|
+
color: { default: "secondary" },
|
|
275
|
+
hideDetails: { type: [Boolean, String], default: "auto" },
|
|
276
|
+
returnObject: { type: Boolean, default: !1 },
|
|
277
|
+
modelValue: { default: "" },
|
|
278
|
+
rules: { type: [String, Function], default: "" }
|
|
279
|
+
},
|
|
280
|
+
setup(t) {
|
|
281
|
+
const e = t, r = y(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
|
|
282
|
+
initialValue: e.modelValue,
|
|
283
|
+
syncVModel: !0
|
|
284
|
+
});
|
|
285
|
+
return (d, n) => (i(), m(o(E), p(d.$attrs, {
|
|
286
|
+
modelValue: o(a),
|
|
287
|
+
"onUpdate:modelValue": n[0] || (n[0] = (u) => g(a) ? a.value = u : null),
|
|
288
|
+
name: e.name,
|
|
289
|
+
items: e.items,
|
|
290
|
+
rounded: e.rounded,
|
|
291
|
+
variant: e.variant,
|
|
292
|
+
density: e.density,
|
|
293
|
+
color: e.color,
|
|
294
|
+
"hide-details": e.hideDetails,
|
|
295
|
+
"return-object": e.returnObject,
|
|
296
|
+
"error-messages": o(l)
|
|
297
|
+
}), null, 16, ["modelValue", "name", "items", "rounded", "variant", "density", "color", "hide-details", "return-object", "error-messages"]));
|
|
298
|
+
}
|
|
299
|
+
}), ee = /* @__PURE__ */ c({
|
|
300
|
+
name: "FNumberField",
|
|
301
|
+
inheritAttrs: !1,
|
|
302
|
+
__name: "FNumberField",
|
|
303
|
+
props: {
|
|
304
|
+
name: {},
|
|
305
|
+
rounded: { default: "lg" },
|
|
306
|
+
variant: { default: "outlined" },
|
|
307
|
+
density: { default: "compact" },
|
|
308
|
+
controlVariant: { default: "stacked" },
|
|
309
|
+
color: { default: "secondary" },
|
|
310
|
+
label: { default: "" },
|
|
311
|
+
placeholder: { default: "" },
|
|
312
|
+
prefix: { default: "" },
|
|
313
|
+
hideDetails: { type: [Boolean, String], default: "auto" },
|
|
314
|
+
disabled: { type: Boolean, default: !1 },
|
|
315
|
+
readonly: { type: Boolean, default: !1 },
|
|
316
|
+
min: { default: 0 },
|
|
317
|
+
precision: { default: 0 },
|
|
318
|
+
inset: { type: Boolean, default: !0 },
|
|
319
|
+
modelValue: { default: -1 },
|
|
320
|
+
rules: { type: [String, Function], default: "" }
|
|
321
|
+
},
|
|
322
|
+
setup(t) {
|
|
323
|
+
const e = t, r = y(() => e.rules), { errorMessage: l, value: a } = v(() => e.name, r, {
|
|
324
|
+
initialValue: e.modelValue,
|
|
325
|
+
syncVModel: !0
|
|
326
|
+
});
|
|
327
|
+
return (d, n) => (i(), m(o(L), p(d.$attrs, {
|
|
328
|
+
modelValue: o(a),
|
|
329
|
+
"onUpdate:modelValue": n[0] || (n[0] = (u) => g(a) ? a.value = u : null),
|
|
330
|
+
name: e.name,
|
|
331
|
+
color: e.color,
|
|
332
|
+
density: e.density,
|
|
333
|
+
rounded: e.rounded,
|
|
334
|
+
variant: e.variant,
|
|
335
|
+
"control-variant": e.controlVariant,
|
|
336
|
+
"hide-details": e.hideDetails,
|
|
337
|
+
placeholder: e.placeholder,
|
|
338
|
+
label: e.label,
|
|
339
|
+
prefix: e.prefix,
|
|
340
|
+
disabled: e.disabled,
|
|
341
|
+
readonly: e.readonly,
|
|
342
|
+
min: e.min,
|
|
343
|
+
precision: e.precision,
|
|
344
|
+
inset: e.inset,
|
|
345
|
+
"error-messages": o(l)
|
|
346
|
+
}), null, 16, ["modelValue", "name", "color", "density", "rounded", "variant", "control-variant", "hide-details", "placeholder", "label", "prefix", "disabled", "readonly", "min", "precision", "inset", "error-messages"]));
|
|
347
|
+
}
|
|
348
|
+
}), te = { key: 0 }, ae = { key: 1 }, le = /* @__PURE__ */ c({
|
|
349
|
+
name: "FSwitch",
|
|
350
|
+
inheritAttrs: !1,
|
|
351
|
+
__name: "FSwitch",
|
|
352
|
+
props: /* @__PURE__ */ j({
|
|
353
|
+
color: { default: "secondary" },
|
|
354
|
+
density: { default: "comfortable" },
|
|
355
|
+
hideDetails: { type: [Boolean, String], default: "auto" },
|
|
356
|
+
labelTrue: { default: "" },
|
|
357
|
+
labelFalse: { default: "" }
|
|
358
|
+
}, {
|
|
359
|
+
modelValue: { type: Boolean },
|
|
360
|
+
modelModifiers: {}
|
|
361
|
+
}),
|
|
362
|
+
emits: ["update:modelValue"],
|
|
363
|
+
setup(t) {
|
|
364
|
+
const e = t, r = I(t, "modelValue");
|
|
365
|
+
return (l, a) => (i(), m(o(Y), p(l.$attrs, {
|
|
366
|
+
modelValue: r.value,
|
|
367
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => r.value = d),
|
|
368
|
+
color: e.color,
|
|
369
|
+
"hide-details": e.hideDetails,
|
|
370
|
+
density: e.density
|
|
371
|
+
}), D({ _: 2 }, [
|
|
372
|
+
e.labelTrue || e.labelFalse ? {
|
|
373
|
+
name: "label",
|
|
374
|
+
fn: x(() => [
|
|
375
|
+
r.value ? (i(), S("span", te, _(e.labelTrue), 1)) : (i(), S("span", ae, _(e.labelFalse), 1))
|
|
376
|
+
]),
|
|
377
|
+
key: "0"
|
|
378
|
+
} : void 0
|
|
379
|
+
]), 1040, ["modelValue", "color", "hide-details", "density"]));
|
|
380
|
+
}
|
|
381
|
+
}), se = {
|
|
382
|
+
install(t) {
|
|
383
|
+
t.component("FButton", G), t.component("FTextField", H), t.component("FDataTable", J), t.component("FTextarea", K), t.component("FAutocomplete", Q), t.component("FCheckbox", W), t.component("FCurrencyField", X), t.component("FSelect", Z), t.component("FNumberField", ee), t.component("FSwitch", le);
|
|
150
384
|
}
|
|
151
385
|
};
|
|
152
386
|
export {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
387
|
+
Q as FAutocomplete,
|
|
388
|
+
G as FButton,
|
|
389
|
+
W as FCheckbox,
|
|
390
|
+
X as FCurrencyField,
|
|
391
|
+
J as FDataTable,
|
|
392
|
+
ee as FNumberField,
|
|
393
|
+
Z as FSelect,
|
|
394
|
+
le as FSwitch,
|
|
395
|
+
H as FTextField,
|
|
396
|
+
K as FTextarea,
|
|
397
|
+
se as default
|
|
157
398
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,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):(a=typeof globalThis<"u"?globalThis:a||self,e(a.FinsoVueComponents={},a.Vue,a.VuetifyComponents,a.MaskaVue,a.VeeValidate))})(this,(function(a,e,l,c,y){"use strict";const s=e.defineComponent({name:"FButton",inheritAttrs:!1,__name:"FButton",props:{variant:{default:"flat"},color:{default:"primary"},size:{default:"default"},rounded:{type:[String,Number,Boolean],default:"lg"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(t){return(n,i)=>(e.openBlock(),e.createBlock(e.unref(l.VBtn),e.mergeProps(n.$attrs,{variant:t.variant,color:t.color,size:t.size,rounded:t.rounded,loading:t.loading,disabled:t.disabled}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:2},[n.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"prepend")]),key:"0"}:void 0,n.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"append")]),key:"1"}:void 0]),1040,["variant","color","size","rounded","loading","disabled"]))}}),p=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(t){const n=t,i=e.computed(()=>n.rules),{errorMessage:m,value:d}=y.useField(()=>n.name,i,{initialValue:n.modelValue,syncVModel:!0});return(r,o)=>e.withDirectives((e.openBlock(),e.createBlock(e.unref(l.VTextField),e.mergeProps(r.$attrs,{modelValue:e.unref(d),"onUpdate:modelValue":o[0]||(o[0]=u=>e.isRef(d)?d.value=u:null),name:n.name,color:n.color,density:n.density,rounded:n.rounded,variant:n.variant,clearable:n.clearable,"hide-details":n.hideDetails,"error-messages":e.unref(m),"append-inner-icon":n.appendInnerIcon,"onClick:appendInner":o[1]||(o[1]=u=>r.$emit("clickAppendInner"))}),e.createSlots({_:2},[r.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"prepend")]),key:"0"}:void 0,r.$slots["prepend-inner"]?{name:"prepend-inner",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"prepend-inner")]),key:"1"}:void 0,r.$slots["append-inner"]?{name:"append-inner",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"append-inner")]),key:"2"}:void 0,r.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"append")]),key:"3"}:void 0]),1040,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[e.unref(c.vMaska),n.mask]])}}),f=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(t){return(n,i)=>(e.openBlock(),e.createBlock(e.unref(l.VDataTable),e.mergeProps(n.$attrs,{headers:t.headers,items:t.items,loading:t.loading,search:t.search,"items-per-page":t.itemsPerPage,hover:t.hover,density:t.density}),e.createSlots({_:2},[e.renderList(n.$slots,(m,d)=>({name:d,fn:e.withCtx(r=>[e.renderSlot(n.$slots,d,e.normalizeProps(e.guardReactiveProps(r??{})))])}))]),1040,["headers","items","loading","search","items-per-page","hover","density"]))}}),h={install(t){t.component("FButton",s),t.component("FTextField",p),t.component("FDataTable",f)}};a.FButton=s,a.FDataTable=f,a.FTextField=p,a.default=h,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(r,t){typeof exports=="object"&&typeof module<"u"?t(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"],t):(r=typeof globalThis<"u"?globalThis:r||self,t(r.FinsoVueComponents={},r.Vue,r.VuetifyComponents,r.MaskaVue,r.VeeValidate))})(this,(function(r,t,c,$,f){"use strict";const g=t.defineComponent({__name:"FButton",props:{color:{default:"primary"},rounded:{type:[String,Number,Boolean],default:"lg"}},setup(n){const e=n;return(d,l)=>{const a=t.resolveComponent("v-btn");return t.openBlock(),t.createBlock(a,{color:e.color,rounded:e.rounded},null,8,["color","rounded"])}}}),V=t.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 e=n,d=t.computed(()=>e.rules),{errorMessage:l,value:a}=f.useField(()=>e.name,d,{initialValue:e.modelValue,syncVModel:!0});return(i,o)=>t.withDirectives((t.openBlock(),t.createBlock(t.unref(c.VTextField),t.mergeProps(i.$attrs,{modelValue:t.unref(a),"onUpdate:modelValue":o[0]||(o[0]=u=>t.isRef(a)?a.value=u:null),name:e.name,color:e.color,density:e.density,rounded:e.rounded,variant:e.variant,clearable:e.clearable,"hide-details":e.hideDetails,"error-messages":t.unref(l),"append-inner-icon":e.appendInnerIcon,"onClick:appendInner":o[1]||(o[1]=u=>i.$emit("clickAppendInner"))}),null,16,["modelValue","name","color","density","rounded","variant","clearable","hide-details","error-messages","append-inner-icon"])),[[t.unref($.vMaska),e.mask]])}}),b=t.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(e,d)=>(t.openBlock(),t.createBlock(t.unref(c.VDataTable),t.mergeProps(e.$attrs,{headers:n.headers,items:n.items,loading:n.loading,search:n.search,"items-per-page":n.itemsPerPage,hover:n.hover,density:n.density}),t.createSlots({_:2},[t.renderList(e.$slots,(l,a)=>({name:a,fn:t.withCtx(i=>[t.renderSlot(e.$slots,a,t.normalizeProps(t.guardReactiveProps(i??{})))])}))]),1040,["headers","items","loading","search","items-per-page","hover","density"]))}}),B=t.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 e=n,d=t.computed(()=>e.rules),{errorMessage:l,value:a}=f.useField(()=>e.name,d,{initialValue:e.modelValue,syncVModel:!0});return(i,o)=>(t.openBlock(),t.createBlock(t.unref(c.VTextarea),t.mergeProps(i.$attrs,{modelValue:t.unref(a),"onUpdate:modelValue":o[0]||(o[0]=u=>t.isRef(a)?a.value=u:null),name:e.name,rounded:e.rounded,variant:e.variant,rows:e.rows,density:e.density,color:e.color,label:e.label,"hide-details":e.hideDetails,"no-resize":e.noResize,"error-messages":t.unref(l)}),null,16,["modelValue","name","rounded","variant","rows","density","color","label","hide-details","no-resize","error-messages"]))}}),k=t.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:e}){const d=e,l=n,a=t.computed(()=>l.rules),{errorMessage:i,value:o}=f.useField(()=>l.name,a,{initialValue:l.modelValue,syncVModel:!0});function u(h){d("change",h)}return(h,p)=>(t.openBlock(),t.createBlock(t.unref(c.VAutocomplete),t.mergeProps(h.$attrs,{modelValue:t.unref(o),"onUpdate:modelValue":[p[0]||(p[0]=F=>t.isRef(o)?o.value=F:null),p[1]||(p[1]=F=>u(t.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":t.unref(i)}),null,16,["modelValue","name","items","rounded","variant","density","color","clearable","hide-details","return-object","no-data-text","error-messages"]))}}),S=t.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 e=n;return(d,l)=>(t.openBlock(),t.createBlock(t.unref(c.VCheckbox),t.mergeProps(d.$attrs,{color:e.color,"hide-details":e.hideDetails,indeterminate:e.indeterminate,density:e.density}),null,16,["color","hide-details","indeterminate","density"]))}}),_=t.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 e=n,d=t.computed(()=>e.rules),{errorMessage:l,value:a}=f.useField(()=>e.name,d,{initialValue:e.modelValue,syncVModel:!0}),i=t.computed(()=>new Intl.NumberFormat(e.locale,{style:"currency",currency:e.currency,minimumFractionDigits:e.precision,maximumFractionDigits:e.precision})),o=t.ref(u(e.modelValue));function u(s){return s==null||isNaN(s)?"":i.value.format(s)}function h(s){const y=s.replace(/[^\d,.-]/g,"").replace(/\./g,"").replace(",","."),m=parseFloat(y);return isNaN(m)?null:Math.round(m*Math.pow(10,e.precision))/Math.pow(10,e.precision)}function p(s){const y=s.target,m=h(y.value);a.value=m}function F(){o.value=u(a.value)}function A(s){const y=s.target,m=a.value;m!=null&&(o.value=m.toFixed(e.precision).replace(".",",")),setTimeout(()=>y.select(),0)}return t.watch(()=>e.modelValue,s=>{a.value=s,o.value=u(s)}),t.watch(a,s=>{o.value=u(s)}),(s,y)=>(t.openBlock(),t.createBlock(t.unref(c.VTextField),t.mergeProps(s.$attrs,{"model-value":o.value,name:e.name,label:e.label,readonly:e.readonly,"hide-details":e.hideDetails,rounded:e.rounded,variant:e.variant,density:e.density,color:e.color,"error-messages":t.unref(l),inputmode:"decimal",onInput:p,onBlur:F,onFocus:A}),null,16,["model-value","name","label","readonly","hide-details","rounded","variant","density","color","error-messages"]))}}),D=t.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 e=n,d=t.computed(()=>e.rules),{errorMessage:l,value:a}=f.useField(()=>e.name,d,{initialValue:e.modelValue,syncVModel:!0});return(i,o)=>(t.openBlock(),t.createBlock(t.unref(c.VSelect),t.mergeProps(i.$attrs,{modelValue:t.unref(a),"onUpdate:modelValue":o[0]||(o[0]=u=>t.isRef(a)?a.value=u:null),name:e.name,items:e.items,rounded:e.rounded,variant:e.variant,density:e.density,color:e.color,"hide-details":e.hideDetails,"return-object":e.returnObject,"error-messages":t.unref(l)}),null,16,["modelValue","name","items","rounded","variant","density","color","hide-details","return-object","error-messages"]))}}),T=t.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 e=n,d=t.computed(()=>e.rules),{errorMessage:l,value:a}=f.useField(()=>e.name,d,{initialValue:e.modelValue,syncVModel:!0});return(i,o)=>(t.openBlock(),t.createBlock(t.unref(c.VNumberInput),t.mergeProps(i.$attrs,{modelValue:t.unref(a),"onUpdate:modelValue":o[0]||(o[0]=u=>t.isRef(a)?a.value=u:null),name:e.name,color:e.color,density:e.density,rounded:e.rounded,variant:e.variant,"control-variant":e.controlVariant,"hide-details":e.hideDetails,placeholder:e.placeholder,label:e.label,prefix:e.prefix,disabled:e.disabled,readonly:e.readonly,min:e.min,precision:e.precision,inset:e.inset,"error-messages":t.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},C=t.defineComponent({name:"FSwitch",inheritAttrs:!1,__name:"FSwitch",props:t.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 e=n,d=t.useModel(n,"modelValue");return(l,a)=>(t.openBlock(),t.createBlock(t.unref(c.VSwitch),t.mergeProps(l.$attrs,{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=i=>d.value=i),color:e.color,"hide-details":e.hideDetails,density:e.density}),t.createSlots({_:2},[e.labelTrue||e.labelFalse?{name:"label",fn:t.withCtx(()=>[d.value?(t.openBlock(),t.createElementBlock("span",M,t.toDisplayString(e.labelTrue),1)):(t.openBlock(),t.createElementBlock("span",x,t.toDisplayString(e.labelFalse),1))]),key:"0"}:void 0]),1040,["modelValue","color","hide-details","density"]))}}),w={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",T),n.component("FSwitch",C)}};r.FAutocomplete=k,r.FButton=g,r.FCheckbox=S,r.FCurrencyField=_,r.FDataTable=b,r.FNumberField=T,r.FSelect=D,r.FSwitch=C,r.FTextField=V,r.FTextarea=B,r.default=w,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/dist/index.d.ts
CHANGED
|
@@ -2,12 +2,33 @@ import type { Plugin } from 'vue';
|
|
|
2
2
|
export { FButton } from './components/FButton';
|
|
3
3
|
export { FTextField } from './components/FTextField';
|
|
4
4
|
export { FDataTable } from './components/FDataTable';
|
|
5
|
+
export { FTextarea } from './components/FTextarea';
|
|
6
|
+
export { FAutocomplete } from './components/FAutocomplete';
|
|
7
|
+
export { FCheckbox } from './components/FCheckbox';
|
|
8
|
+
export { FCurrencyField } from './components/FCurrencyField';
|
|
9
|
+
export { FSelect } from './components/FSelect';
|
|
10
|
+
export { FNumberField } from './components/FNumberField';
|
|
11
|
+
export { FSwitch } from './components/FSwitch';
|
|
5
12
|
export type { FButtonProps } from './components/FButton';
|
|
6
13
|
export type { FTextFieldProps } from './components/FTextField';
|
|
7
14
|
export type { FDataTableProps, FDataTableHeader } from './components/FDataTable';
|
|
15
|
+
export type { FTextareaProps } from './components/FTextarea';
|
|
16
|
+
export type { FAutocompleteProps } from './components/FAutocomplete';
|
|
17
|
+
export type { FCheckboxProps } from './components/FCheckbox';
|
|
18
|
+
export type { FCurrencyFieldProps } from './components/FCurrencyField';
|
|
19
|
+
export type { FSelectProps } from './components/FSelect';
|
|
20
|
+
export type { FNumberFieldProps } from './components/FNumberField';
|
|
21
|
+
export type { FSwitchProps } from './components/FSwitch';
|
|
8
22
|
import { FButton } from './components/FButton';
|
|
9
23
|
import { FTextField } from './components/FTextField';
|
|
10
24
|
import { FDataTable } from './components/FDataTable';
|
|
25
|
+
import { FTextarea } from './components/FTextarea';
|
|
26
|
+
import { FAutocomplete } from './components/FAutocomplete';
|
|
27
|
+
import { FCheckbox } from './components/FCheckbox';
|
|
28
|
+
import { FCurrencyField } from './components/FCurrencyField';
|
|
29
|
+
import { FSelect } from './components/FSelect';
|
|
30
|
+
import { FNumberField } from './components/FNumberField';
|
|
31
|
+
import { FSwitch } from './components/FSwitch';
|
|
11
32
|
declare const FinsoComponents: Plugin;
|
|
12
33
|
export default FinsoComponents;
|
|
13
34
|
declare module 'vue' {
|
|
@@ -15,5 +36,12 @@ declare module 'vue' {
|
|
|
15
36
|
FButton: typeof FButton;
|
|
16
37
|
FTextField: typeof FTextField;
|
|
17
38
|
FDataTable: typeof FDataTable;
|
|
39
|
+
FTextarea: typeof FTextarea;
|
|
40
|
+
FAutocomplete: typeof FAutocomplete;
|
|
41
|
+
FCheckbox: typeof FCheckbox;
|
|
42
|
+
FCurrencyField: typeof FCurrencyField;
|
|
43
|
+
FSelect: typeof FSelect;
|
|
44
|
+
FNumberField: typeof FNumberField;
|
|
45
|
+
FSwitch: typeof FSwitch;
|
|
18
46
|
}
|
|
19
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "finso-vue-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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
|
+
}
|