@a-vision-software/vue-input-components 1.4.10 → 1.4.12
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/src/components/FileUpload.vue.d.ts +14 -14
- package/dist/src/components/Modal.vue.d.ts +1 -1
- package/dist/src/components/TextInput.vue.d.ts +1 -93
- package/dist/src/types/dropdown.d.ts +1 -1
- package/dist/src/types/fileupload.d.ts +24 -11
- package/dist/src/types/navigation.d.ts +1 -1
- package/dist/src/types/textinput.d.ts +8 -4
- package/dist/vue-input-components.cjs.js +1 -1
- package/dist/vue-input-components.css +1 -1
- package/dist/vue-input-components.es.js +3765 -3586
- package/dist/vue-input-components.umd.js +1 -1
- package/package.json +2 -2
- package/src/components/Dropdown.vue +1 -1
- package/src/components/FileUpload.vue +156 -67
- package/src/components/TextInput.vue +1 -1
- package/src/types/dropdown.ts +1 -1
- package/src/types/fileupload.ts +35 -21
- package/src/types/navigation.ts +1 -1
- package/src/types/textinput.ts +12 -4
- package/src/views/FileUploadTestView.vue +22 -28
- package/src/views/TextInputTestView.vue +3 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
-
"upload-complete": (files: File[]) => void;
|
|
6
|
-
"upload-error": (error: string) => void;
|
|
1
|
+
import { FileUploadProps, UploadStatus } from '../types/fileupload';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FileUploadProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
4
|
"files-selected": (files: File[]) => void;
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"onUpload-error"?: ((error: string) => any) | undefined;
|
|
5
|
+
"upload-started": (files: File[]) => void;
|
|
6
|
+
"upload-complete": (files: File[]) => void;
|
|
7
|
+
"upload-progress": (progress: number) => void;
|
|
8
|
+
"upload-success": (status: UploadStatus) => void;
|
|
9
|
+
"upload-error": (status: UploadStatus) => void;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FileUploadProps>>> & Readonly<{
|
|
15
11
|
"onFiles-selected"?: ((files: File[]) => any) | undefined;
|
|
16
|
-
"
|
|
12
|
+
"onUpload-started"?: ((files: File[]) => any) | undefined;
|
|
13
|
+
"onUpload-complete"?: ((files: File[]) => any) | undefined;
|
|
14
|
+
"onUpload-progress"?: ((progress: number) => any) | undefined;
|
|
15
|
+
"onUpload-success"?: ((status: UploadStatus) => any) | undefined;
|
|
16
|
+
"onUpload-error"?: ((status: UploadStatus) => any) | undefined;
|
|
17
17
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
18
|
export default _default;
|
|
19
19
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -41,12 +41,12 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
|
|
|
41
41
|
title: string;
|
|
42
42
|
modelValue: boolean;
|
|
43
43
|
maxHeight: string;
|
|
44
|
+
iconColor: string;
|
|
44
45
|
minWidth: string;
|
|
45
46
|
maxWidth: string;
|
|
46
47
|
minHeight: string;
|
|
47
48
|
titleBarColor: string;
|
|
48
49
|
isLargeIcon: boolean;
|
|
49
|
-
iconColor: string;
|
|
50
50
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
|
|
51
51
|
header?(_: {}): any;
|
|
52
52
|
default?(_: {}): any;
|
|
@@ -1,95 +1,3 @@
|
|
|
1
|
-
import { TextInputProps } from '../types/textinput';
|
|
2
1
|
|
|
3
|
-
declare const _default: import('vue').
|
|
4
|
-
modelValue: string;
|
|
5
|
-
type: string;
|
|
6
|
-
placeholder: string;
|
|
7
|
-
label: string;
|
|
8
|
-
icon: undefined;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
readonly: boolean;
|
|
11
|
-
maxlength: undefined;
|
|
12
|
-
error: string;
|
|
13
|
-
min: undefined;
|
|
14
|
-
max: undefined;
|
|
15
|
-
labelPosition: string;
|
|
16
|
-
labelAlign: string;
|
|
17
|
-
labelWidth: string;
|
|
18
|
-
height: string;
|
|
19
|
-
maxHeight: string;
|
|
20
|
-
bgColor: string;
|
|
21
|
-
width: string;
|
|
22
|
-
}>>, {
|
|
23
|
-
focus: () => void | undefined;
|
|
24
|
-
blur: () => void | undefined;
|
|
25
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
-
"update:modelValue": (value: string) => void;
|
|
27
|
-
changed: () => void;
|
|
28
|
-
saved: () => void;
|
|
29
|
-
focus: () => void;
|
|
30
|
-
blur: () => void;
|
|
31
|
-
keydown: (event: KeyboardEvent) => void;
|
|
32
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TextInputProps>, {
|
|
33
|
-
modelValue: string;
|
|
34
|
-
type: string;
|
|
35
|
-
placeholder: string;
|
|
36
|
-
label: string;
|
|
37
|
-
icon: undefined;
|
|
38
|
-
disabled: boolean;
|
|
39
|
-
readonly: boolean;
|
|
40
|
-
maxlength: undefined;
|
|
41
|
-
error: string;
|
|
42
|
-
min: undefined;
|
|
43
|
-
max: undefined;
|
|
44
|
-
labelPosition: string;
|
|
45
|
-
labelAlign: string;
|
|
46
|
-
labelWidth: string;
|
|
47
|
-
height: string;
|
|
48
|
-
maxHeight: string;
|
|
49
|
-
bgColor: string;
|
|
50
|
-
width: string;
|
|
51
|
-
}>>> & Readonly<{
|
|
52
|
-
onBlur?: (() => any) | undefined;
|
|
53
|
-
onFocus?: (() => any) | undefined;
|
|
54
|
-
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
55
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
56
|
-
onChanged?: (() => any) | undefined;
|
|
57
|
-
onSaved?: (() => any) | undefined;
|
|
58
|
-
}>, {
|
|
59
|
-
error: string;
|
|
60
|
-
disabled: boolean;
|
|
61
|
-
max: string | Date;
|
|
62
|
-
type: "number" | "textarea" | "text" | "date" | "email" | "password" | "tel" | "url";
|
|
63
|
-
icon: string;
|
|
64
|
-
label: string;
|
|
65
|
-
modelValue: string;
|
|
66
|
-
width: string;
|
|
67
|
-
labelPosition: "top" | "left";
|
|
68
|
-
labelAlign: "left" | "center" | "right";
|
|
69
|
-
labelWidth: string;
|
|
70
|
-
placeholder: string;
|
|
71
|
-
maxHeight: string;
|
|
72
|
-
readonly: boolean;
|
|
73
|
-
maxlength: number;
|
|
74
|
-
min: string | Date;
|
|
75
|
-
height: string;
|
|
76
|
-
bgColor: string;
|
|
77
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps>;
|
|
78
3
|
export default _default;
|
|
79
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
80
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
81
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
82
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
83
|
-
} : {
|
|
84
|
-
type: import('vue').PropType<T[K]>;
|
|
85
|
-
required: true;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
type __VLS_WithDefaults<P, D> = {
|
|
89
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
90
|
-
default: D[K];
|
|
91
|
-
}> : P[K];
|
|
92
|
-
};
|
|
93
|
-
type __VLS_Prettify<T> = {
|
|
94
|
-
[K in keyof T]: T[K];
|
|
95
|
-
} & {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
interface FileUploadProps {
|
|
2
|
+
width?: string;
|
|
3
|
+
height?: string;
|
|
3
4
|
label?: string;
|
|
5
|
+
labelPosition?: 'top' | 'left';
|
|
6
|
+
icon?: string;
|
|
4
7
|
placeholder?: string;
|
|
5
8
|
error?: string;
|
|
6
9
|
disabled?: boolean;
|
|
@@ -9,16 +12,26 @@ export interface FileUploadProps {
|
|
|
9
12
|
accept?: string;
|
|
10
13
|
maxSize?: number;
|
|
11
14
|
uploadUrl?: string;
|
|
15
|
+
showUploadButton?: boolean;
|
|
16
|
+
doUpload?: boolean;
|
|
17
|
+
iconColor?: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
bgColor?: string;
|
|
20
|
+
borderColor?: string;
|
|
21
|
+
progressColor?: string;
|
|
22
|
+
activeColor?: string;
|
|
23
|
+
uploadData?: Record<string, any>;
|
|
12
24
|
}
|
|
13
|
-
|
|
14
|
-
|
|
25
|
+
interface UploadStatus {
|
|
26
|
+
type: 'pending' | 'success' | 'error' | 'processing';
|
|
27
|
+
message: string;
|
|
28
|
+
}
|
|
29
|
+
interface FileUploadEmits {
|
|
15
30
|
(e: 'files-selected', files: File[]): void;
|
|
16
|
-
(e: '
|
|
31
|
+
(e: 'upload-started', files: File[]): void;
|
|
32
|
+
(e: 'upload-complete', files: File[]): void;
|
|
17
33
|
(e: 'upload-progress', progress: number): void;
|
|
18
|
-
(e: 'upload-success',
|
|
19
|
-
(e: 'upload-error',
|
|
20
|
-
}
|
|
21
|
-
export interface FileUploadComponent {
|
|
22
|
-
focus: () => void;
|
|
23
|
-
blur: () => void;
|
|
34
|
+
(e: 'upload-success', status: UploadStatus): void;
|
|
35
|
+
(e: 'upload-error', status: UploadStatus): void;
|
|
24
36
|
}
|
|
37
|
+
export type { FileUploadProps, FileUploadEmits, UploadStatus };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
modelValue: string;
|
|
1
|
+
export type TextInputProps = {
|
|
3
2
|
required?: boolean;
|
|
4
|
-
type?: 'text' | 'textarea' | 'password' | 'email' | 'tel' | 'url' | 'date' | 'number';
|
|
5
3
|
placeholder?: string;
|
|
6
4
|
label?: string;
|
|
7
5
|
labelPosition?: 'top' | 'left';
|
|
@@ -19,7 +17,13 @@ export interface TextInputProps {
|
|
|
19
17
|
bgColor?: string;
|
|
20
18
|
autosave?: (value: string) => Promise<void>;
|
|
21
19
|
error?: string;
|
|
22
|
-
}
|
|
20
|
+
} & ({
|
|
21
|
+
modelValue: string;
|
|
22
|
+
type?: 'text' | 'textarea' | 'password' | 'email' | 'tel' | 'url' | 'date';
|
|
23
|
+
} | {
|
|
24
|
+
modelValue: number;
|
|
25
|
+
type: 'number';
|
|
26
|
+
});
|
|
23
27
|
export interface TextInputEmits {
|
|
24
28
|
(e: 'update:modelValue', value: string): void;
|
|
25
29
|
(e: 'changed'): void;
|