@voicenter-team/voicenter-ui-plus 3.4.2 → 3.4.3
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/library/assets/assets/sass/main.css +1 -1
- package/library/assets/components/VcFileUploader/VcFileUploaderArea.css +1 -0
- package/library/assets/components/VcFileUploader/{VcFileUploader.css → VcFileUploaderSimple.css} +1 -1
- package/library/components/VcFileUploader/VcFileUploader.vue.mjs +87 -5
- package/library/components/VcFileUploader/VcFileUploader.vue2.mjs +1 -381
- package/library/components/VcFileUploader/VcFileUploaderArea.vue.mjs +338 -0
- package/library/components/VcFileUploader/VcFileUploaderArea.vue3.mjs +5 -0
- package/library/components/VcFileUploader/VcFileUploaderSimple.vue.mjs +7 -0
- package/library/components/VcFileUploader/VcFileUploaderSimple.vue2.mjs +200 -0
- package/library/components/VcFileUploader/VcSimpleUploaderAction.vue.mjs +62 -0
- package/library/components/VcFileUploader/VcSimpleUploaderAction.vue2.mjs +4 -0
- package/library/components/VcFileUploader/VcSimpleUploaderFileList.vue.mjs +75 -0
- package/library/components/VcFileUploader/VcSimpleUploaderFileList.vue2.mjs +4 -0
- package/library/composables/input/useFileUploader.mjs +163 -0
- package/library/index.mjs +151 -146
- package/library/index.mjs.br +0 -0
- package/library/index.mjs.gz +0 -0
- package/library/localization/locales/en.json.mjs +2 -0
- package/library/plugin-components.gen.mjs +157 -152
- package/library/plugin.mjs +149 -144
- package/library/plugin.mjs.br +0 -0
- package/library/plugin.mjs.gz +0 -0
- package/library/style.css +4 -2
- package/library/style.css.br +0 -0
- package/library/style.css.gz +0 -0
- package/library/types/components/VcFileUploader/VcFileUploader.vue.d.ts +29 -139
- package/library/types/components/VcFileUploader/VcFileUploaderArea.vue.d.ts +122 -0
- package/library/types/components/VcFileUploader/VcFileUploaderSimple.vue.d.ts +127 -0
- package/library/types/components/VcFileUploader/VcSimpleUploaderAction.vue.d.ts +38 -0
- package/library/types/components/VcFileUploader/VcSimpleUploaderFileList.vue.d.ts +41 -0
- package/library/types/components/exports.d.ts +5 -1
- package/library/types/components.gen.d.ts +2 -0
- package/library/types/composables/input/useFileUploader.d.ts +82 -0
- package/library/types/localization/locales/en.json.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { FileUploaded, TIcon } from '../../types';
|
|
2
|
+
import { IFileTypeStyle, IFileUploaderProps } from '../../composables/input/useFileUploader';
|
|
3
|
+
declare function triggerInputClick(): void;
|
|
4
|
+
declare function onFileChange(): Promise<void>;
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IFileUploaderProps>, {
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
dataTestName: string;
|
|
8
|
+
multiple: boolean;
|
|
9
|
+
showFileName: boolean;
|
|
10
|
+
hideClearAction: boolean;
|
|
11
|
+
files: () => never[];
|
|
12
|
+
modelValue: () => never[];
|
|
13
|
+
buttonType: string;
|
|
14
|
+
buttonColor: string;
|
|
15
|
+
buttonSize: string;
|
|
16
|
+
buttonIcon: string;
|
|
17
|
+
buttonText: string;
|
|
18
|
+
maxLength: number;
|
|
19
|
+
accept: string;
|
|
20
|
+
noDataText: string;
|
|
21
|
+
fileType: string;
|
|
22
|
+
tagIcon: string;
|
|
23
|
+
tagMaxContentWidth: string;
|
|
24
|
+
fileSizeLimit: undefined;
|
|
25
|
+
fileListSizeLimit: undefined;
|
|
26
|
+
useArea: boolean;
|
|
27
|
+
areaHintText: string;
|
|
28
|
+
areaListHeight: undefined;
|
|
29
|
+
fileTypeMap: undefined;
|
|
30
|
+
}>>, {
|
|
31
|
+
clear: () => void;
|
|
32
|
+
click: typeof triggerInputClick;
|
|
33
|
+
inputUploader: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
34
|
+
triggerInputClick: typeof triggerInputClick;
|
|
35
|
+
onFileChange: typeof onFileChange;
|
|
36
|
+
onTagClose: (index: number | undefined) => void;
|
|
37
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
+
"update:modelValue": (pl: FileUploaded[]) => void;
|
|
39
|
+
input: (pl: FileUploaded[]) => void;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IFileUploaderProps>, {
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
dataTestName: string;
|
|
43
|
+
multiple: boolean;
|
|
44
|
+
showFileName: boolean;
|
|
45
|
+
hideClearAction: boolean;
|
|
46
|
+
files: () => never[];
|
|
47
|
+
modelValue: () => never[];
|
|
48
|
+
buttonType: string;
|
|
49
|
+
buttonColor: string;
|
|
50
|
+
buttonSize: string;
|
|
51
|
+
buttonIcon: string;
|
|
52
|
+
buttonText: string;
|
|
53
|
+
maxLength: number;
|
|
54
|
+
accept: string;
|
|
55
|
+
noDataText: string;
|
|
56
|
+
fileType: string;
|
|
57
|
+
tagIcon: string;
|
|
58
|
+
tagMaxContentWidth: string;
|
|
59
|
+
fileSizeLimit: undefined;
|
|
60
|
+
fileListSizeLimit: undefined;
|
|
61
|
+
useArea: boolean;
|
|
62
|
+
areaHintText: string;
|
|
63
|
+
areaListHeight: undefined;
|
|
64
|
+
fileTypeMap: undefined;
|
|
65
|
+
}>>> & Readonly<{
|
|
66
|
+
"onUpdate:modelValue"?: ((pl: FileUploaded[]) => any) | undefined;
|
|
67
|
+
onInput?: ((pl: FileUploaded[]) => any) | undefined;
|
|
68
|
+
}>, {
|
|
69
|
+
maxLength: number;
|
|
70
|
+
disabled: boolean;
|
|
71
|
+
modelValue: FileUploaded[];
|
|
72
|
+
dataTestName: string;
|
|
73
|
+
buttonType: import('../../types').ButtonType;
|
|
74
|
+
multiple: boolean;
|
|
75
|
+
accept: string;
|
|
76
|
+
noDataText: string;
|
|
77
|
+
files: FileUploaded[];
|
|
78
|
+
fileSizeLimit: number;
|
|
79
|
+
fileListSizeLimit: number;
|
|
80
|
+
buttonIcon: TIcon;
|
|
81
|
+
buttonText: string;
|
|
82
|
+
buttonColor: "" | "success" | "warning" | "primary" | "secondary" | "destructive" | "active" | "primary-alternative";
|
|
83
|
+
buttonSize: import('../../types').ButtonSize;
|
|
84
|
+
tagIcon: TIcon;
|
|
85
|
+
fileType: import('../../types').ReturnFileType;
|
|
86
|
+
tagMaxContentWidth: string;
|
|
87
|
+
showFileName: boolean;
|
|
88
|
+
hideClearAction: boolean;
|
|
89
|
+
useArea: boolean;
|
|
90
|
+
areaHintText: string;
|
|
91
|
+
areaListHeight: string | number;
|
|
92
|
+
fileTypeMap: Record<string, IFileTypeStyle>;
|
|
93
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
94
|
+
area?(_: {}): any;
|
|
95
|
+
item?(_: {
|
|
96
|
+
data: FileUploaded;
|
|
97
|
+
close: (index: number | undefined) => void;
|
|
98
|
+
}): any;
|
|
99
|
+
}>;
|
|
100
|
+
export default _default;
|
|
101
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
102
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
103
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
104
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
105
|
+
} : {
|
|
106
|
+
type: import('vue').PropType<T[K]>;
|
|
107
|
+
required: true;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
type __VLS_WithDefaults<P, D> = {
|
|
111
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
112
|
+
default: D[K];
|
|
113
|
+
}> : P[K];
|
|
114
|
+
};
|
|
115
|
+
type __VLS_Prettify<T> = {
|
|
116
|
+
[K in keyof T]: T[K];
|
|
117
|
+
} & {};
|
|
118
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
119
|
+
new (): {
|
|
120
|
+
$slots: S;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { IFileUploaderProps } from '../../composables/input/useFileUploader';
|
|
2
|
+
declare function onFileChange(): Promise<void>;
|
|
3
|
+
declare function triggerInputClick(): void;
|
|
4
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IFileUploaderProps>, {
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
dataTestName: string;
|
|
7
|
+
multiple: boolean;
|
|
8
|
+
showFileName: boolean;
|
|
9
|
+
hideClearAction: boolean;
|
|
10
|
+
files: () => never[];
|
|
11
|
+
modelValue: () => never[];
|
|
12
|
+
buttonType: string;
|
|
13
|
+
buttonColor: string;
|
|
14
|
+
buttonSize: string;
|
|
15
|
+
buttonIcon: string;
|
|
16
|
+
buttonText: string;
|
|
17
|
+
maxLength: number;
|
|
18
|
+
accept: string;
|
|
19
|
+
noDataText: string;
|
|
20
|
+
fileType: string;
|
|
21
|
+
tagIcon: string;
|
|
22
|
+
tagMaxContentWidth: string;
|
|
23
|
+
fileSizeLimit: undefined;
|
|
24
|
+
fileListSizeLimit: undefined;
|
|
25
|
+
useArea: boolean;
|
|
26
|
+
areaHintText: string;
|
|
27
|
+
areaListHeight: undefined;
|
|
28
|
+
fileTypeMap: undefined;
|
|
29
|
+
}>>, {
|
|
30
|
+
clear: () => void;
|
|
31
|
+
click: typeof triggerInputClick;
|
|
32
|
+
inputUploader: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
33
|
+
triggerInputClick: typeof triggerInputClick;
|
|
34
|
+
onFileChange: typeof onFileChange;
|
|
35
|
+
onTagClose: (index: number | undefined) => void;
|
|
36
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
"update:modelValue": (pl: import("../..").FileUploaded[]) => void;
|
|
38
|
+
input: (pl: import("../..").FileUploaded[]) => void;
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<IFileUploaderProps>, {
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
dataTestName: string;
|
|
42
|
+
multiple: boolean;
|
|
43
|
+
showFileName: boolean;
|
|
44
|
+
hideClearAction: boolean;
|
|
45
|
+
files: () => never[];
|
|
46
|
+
modelValue: () => never[];
|
|
47
|
+
buttonType: string;
|
|
48
|
+
buttonColor: string;
|
|
49
|
+
buttonSize: string;
|
|
50
|
+
buttonIcon: string;
|
|
51
|
+
buttonText: string;
|
|
52
|
+
maxLength: number;
|
|
53
|
+
accept: string;
|
|
54
|
+
noDataText: string;
|
|
55
|
+
fileType: string;
|
|
56
|
+
tagIcon: string;
|
|
57
|
+
tagMaxContentWidth: string;
|
|
58
|
+
fileSizeLimit: undefined;
|
|
59
|
+
fileListSizeLimit: undefined;
|
|
60
|
+
useArea: boolean;
|
|
61
|
+
areaHintText: string;
|
|
62
|
+
areaListHeight: undefined;
|
|
63
|
+
fileTypeMap: undefined;
|
|
64
|
+
}>>> & Readonly<{
|
|
65
|
+
"onUpdate:modelValue"?: ((pl: import("../..").FileUploaded[]) => any) | undefined;
|
|
66
|
+
onInput?: ((pl: import("../..").FileUploaded[]) => any) | undefined;
|
|
67
|
+
}>, {
|
|
68
|
+
maxLength: number;
|
|
69
|
+
disabled: boolean;
|
|
70
|
+
modelValue: import("../..").FileUploaded[];
|
|
71
|
+
dataTestName: string;
|
|
72
|
+
buttonType: import("../..").ButtonType;
|
|
73
|
+
multiple: boolean;
|
|
74
|
+
accept: string;
|
|
75
|
+
noDataText: string;
|
|
76
|
+
files: import("../..").FileUploaded[];
|
|
77
|
+
fileSizeLimit: number;
|
|
78
|
+
fileListSizeLimit: number;
|
|
79
|
+
buttonIcon: import("../..").TIcon;
|
|
80
|
+
buttonText: string;
|
|
81
|
+
buttonColor: "" | "success" | "warning" | "primary" | "secondary" | "destructive" | "active" | "primary-alternative";
|
|
82
|
+
buttonSize: import("../..").ButtonSize;
|
|
83
|
+
tagIcon: import("../..").TIcon;
|
|
84
|
+
fileType: import("../..").ReturnFileType;
|
|
85
|
+
tagMaxContentWidth: string;
|
|
86
|
+
showFileName: boolean;
|
|
87
|
+
hideClearAction: boolean;
|
|
88
|
+
useArea: boolean;
|
|
89
|
+
areaHintText: string;
|
|
90
|
+
areaListHeight: string | number;
|
|
91
|
+
fileTypeMap: Record<string, import('../../composables/input/useFileUploader').IFileTypeStyle>;
|
|
92
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
93
|
+
action?(_: {
|
|
94
|
+
click: typeof triggerInputClick;
|
|
95
|
+
}): any;
|
|
96
|
+
"tag-item"?(_: {
|
|
97
|
+
data: import("../..").FileUploaded;
|
|
98
|
+
close: (itemId: number | undefined) => void;
|
|
99
|
+
}): any;
|
|
100
|
+
"tag-item-other"?(_: {
|
|
101
|
+
data: import("../..").FileUploaded;
|
|
102
|
+
close: (itemId: number | undefined) => void;
|
|
103
|
+
}): any;
|
|
104
|
+
}>;
|
|
105
|
+
export default _default;
|
|
106
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
107
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
108
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
109
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
110
|
+
} : {
|
|
111
|
+
type: import('vue').PropType<T[K]>;
|
|
112
|
+
required: true;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
type __VLS_WithDefaults<P, D> = {
|
|
116
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
117
|
+
default: D[K];
|
|
118
|
+
}> : P[K];
|
|
119
|
+
};
|
|
120
|
+
type __VLS_Prettify<T> = {
|
|
121
|
+
[K in keyof T]: T[K];
|
|
122
|
+
} & {};
|
|
123
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
124
|
+
new (): {
|
|
125
|
+
$slots: S;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ButtonSize, ButtonType, FileUploaded, TIcon } from '../../types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
buttonType?: ButtonType | undefined;
|
|
4
|
+
buttonColor?: "" | "success" | "warning" | "primary" | "secondary" | "destructive" | "active" | "primary-alternative" | undefined;
|
|
5
|
+
buttonIcon?: TIcon | undefined;
|
|
6
|
+
buttonSize?: ButtonSize | undefined;
|
|
7
|
+
uploadButtonText?: string | undefined;
|
|
8
|
+
uploadedButtonText?: string | undefined;
|
|
9
|
+
showFileName?: boolean | undefined;
|
|
10
|
+
hideClearAction?: boolean | undefined;
|
|
11
|
+
items?: FileUploaded[] | undefined;
|
|
12
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"input:click": () => void;
|
|
14
|
+
clear: () => void;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
16
|
+
buttonType?: ButtonType | undefined;
|
|
17
|
+
buttonColor?: "" | "success" | "warning" | "primary" | "secondary" | "destructive" | "active" | "primary-alternative" | undefined;
|
|
18
|
+
buttonIcon?: TIcon | undefined;
|
|
19
|
+
buttonSize?: ButtonSize | undefined;
|
|
20
|
+
uploadButtonText?: string | undefined;
|
|
21
|
+
uploadedButtonText?: string | undefined;
|
|
22
|
+
showFileName?: boolean | undefined;
|
|
23
|
+
hideClearAction?: boolean | undefined;
|
|
24
|
+
items?: FileUploaded[] | undefined;
|
|
25
|
+
}>>> & Readonly<{
|
|
26
|
+
onClear?: (() => any) | undefined;
|
|
27
|
+
"onInput:click"?: (() => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
31
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
32
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
33
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
34
|
+
} : {
|
|
35
|
+
type: import('vue').PropType<T[K]>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FileUploaded, TIcon } from '../../types';
|
|
2
|
+
declare function onTagClose(itemId: number | undefined): void;
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
items: FileUploaded[];
|
|
5
|
+
maxLength?: number | undefined;
|
|
6
|
+
tagMaxContentWidth?: string | undefined;
|
|
7
|
+
tagIcon?: TIcon | undefined;
|
|
8
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"on-close": (index?: number | undefined) => void;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
+
items: FileUploaded[];
|
|
12
|
+
maxLength?: number | undefined;
|
|
13
|
+
tagMaxContentWidth?: string | undefined;
|
|
14
|
+
tagIcon?: TIcon | undefined;
|
|
15
|
+
}>>> & Readonly<{
|
|
16
|
+
"onOn-close"?: ((index?: number | undefined) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
18
|
+
"tag-item"?(_: {
|
|
19
|
+
data: FileUploaded;
|
|
20
|
+
close: typeof onTagClose;
|
|
21
|
+
}): any;
|
|
22
|
+
"tag-item-other"?(_: {
|
|
23
|
+
data: FileUploaded;
|
|
24
|
+
close: typeof onTagClose;
|
|
25
|
+
}): any;
|
|
26
|
+
}>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
30
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
31
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
32
|
+
} : {
|
|
33
|
+
type: import('vue').PropType<T[K]>;
|
|
34
|
+
required: true;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -29,6 +29,8 @@ import VcPhoneInput from './VcPhoneInput/VcPhoneInput.vue';
|
|
|
29
29
|
import VcTagInput from './VcTagInput/VcTagInput.vue';
|
|
30
30
|
import VcOtpInput from './VcOtpInput/VcOtpInput.vue';
|
|
31
31
|
import VcFileUploader from './VcFileUploader/VcFileUploader.vue';
|
|
32
|
+
import VcFileUploaderSimple from './VcFileUploader/VcFileUploaderSimple.vue';
|
|
33
|
+
import VcFileUploaderArea from './VcFileUploader/VcFileUploaderArea.vue';
|
|
32
34
|
import VcCard from './VcCard/VcCard.vue';
|
|
33
35
|
import VcCodeBlock from './VcCodeBlock/VcCodeBlock.vue';
|
|
34
36
|
import VcModal from './VcModal/VcModal.vue';
|
|
@@ -105,7 +107,7 @@ import VcBaseVerticalForm from '../entity/components/Form/VcBaseVerticalForm.vue
|
|
|
105
107
|
import VcEntityVerticalCreateForm from '../entity/components/Form/VcEntityVerticalCreateForm.vue';
|
|
106
108
|
import VcEntityVerticalEditForm from '../entity/components/Form/VcEntityVerticalEditForm.vue';
|
|
107
109
|
import VcEntityEditPageForm from '../entity/components/Form/VcEntityEditPageForm.vue';
|
|
108
|
-
export { VcButton, VcButtonIcon, VcToggleButton, VcInput, VcInputNumber, VcInputError, VcInputLabel, VcSelect, VcSelectGrouped, VcSelectOption, VcInfiniteScrollSelect, VcAutocomplete, VcCheckbox, VcCheckboxButton, VcCheckboxButtonGroup, VcCheckboxGroup, VcRadio, VcRadioGroup, VcRadioButtonsGroup, VcSwitch, VcSlider, VcColorPicker, VcDatePicker, VcDatePickerPanel, VcDatetimeRangePicker, VcExtendedDatetimeRangePicker, VcTimeInput, VcPhoneInput, VcTagInput, VcOtpInput, VcFileUploader, VcCard, VcCodeBlock, VcModal, VcConfirmModal, VcPopover, VcConfirmPopover, VcSelectPopover, VcTabs, VcTabNav, VcTabPane, VcVerticalTabs, VcRadioTabs, VcRadioTabsNav, VcCollapse, VcCollapseItem, VcWizard, VcDropdown, VcDropdownItem, VcTable, VcPagination, VcTree, VcTreeSelect, VcTransfer, VcTag, VcDelimitedList, VcSparkline, VcViewSwitcher, VcSegmented, VcLoading, VcProgress, VcProgressCircular, VcSkeletonLoader, VcNotification, VcPluginOverlays, VcForm, VcFormItem, VcSplitButton, VcHyperLink, VcIcon, VcIconPicker, VcMeterGroup, VcMeterGroupLabel, VcMdEditor, VcSystemUserPrompt, VcSoundPlayer, VcJsonSchema, VcPlayerPlaybackRate, VcPlayerPlaybackRatePopup, VcPlayerPlayStopButton, VcPlayerSkipButtons, VcSoundCurrentTime, VcSoundDuration, VcSoundPlayerError, VcSoundPlayerMarker, VcSoundPlayerMarkers, VcSoundPlayerProgress, VcSoundPlayerWrapper, VcSoundVolume, VcHtmlEditor, VcPdfDocument, VcExcelFileUploader, VcImageUploader, VcTour, VcSipFlow, VcEntityAddButton, VcEntityCancelButton, VcEntityDeleteIconButton, VcEntityEditIconButton, VcEntityRestoreButton, VcEntityStatusButton, VcEntityEditableTabs, VcEntityListTable, VcBaseVerticalForm, VcEntityVerticalCreateForm, VcEntityVerticalEditForm, VcEntityEditPageForm, };
|
|
110
|
+
export { VcButton, VcButtonIcon, VcToggleButton, VcInput, VcInputNumber, VcInputError, VcInputLabel, VcSelect, VcSelectGrouped, VcSelectOption, VcInfiniteScrollSelect, VcAutocomplete, VcCheckbox, VcCheckboxButton, VcCheckboxButtonGroup, VcCheckboxGroup, VcRadio, VcRadioGroup, VcRadioButtonsGroup, VcSwitch, VcSlider, VcColorPicker, VcDatePicker, VcDatePickerPanel, VcDatetimeRangePicker, VcExtendedDatetimeRangePicker, VcTimeInput, VcPhoneInput, VcTagInput, VcOtpInput, VcFileUploader, VcFileUploaderSimple, VcFileUploaderArea, VcCard, VcCodeBlock, VcModal, VcConfirmModal, VcPopover, VcConfirmPopover, VcSelectPopover, VcTabs, VcTabNav, VcTabPane, VcVerticalTabs, VcRadioTabs, VcRadioTabsNav, VcCollapse, VcCollapseItem, VcWizard, VcDropdown, VcDropdownItem, VcTable, VcPagination, VcTree, VcTreeSelect, VcTransfer, VcTag, VcDelimitedList, VcSparkline, VcViewSwitcher, VcSegmented, VcLoading, VcProgress, VcProgressCircular, VcSkeletonLoader, VcNotification, VcPluginOverlays, VcForm, VcFormItem, VcSplitButton, VcHyperLink, VcIcon, VcIconPicker, VcMeterGroup, VcMeterGroupLabel, VcMdEditor, VcSystemUserPrompt, VcSoundPlayer, VcJsonSchema, VcPlayerPlaybackRate, VcPlayerPlaybackRatePopup, VcPlayerPlayStopButton, VcPlayerSkipButtons, VcSoundCurrentTime, VcSoundDuration, VcSoundPlayerError, VcSoundPlayerMarker, VcSoundPlayerMarkers, VcSoundPlayerProgress, VcSoundPlayerWrapper, VcSoundVolume, VcHtmlEditor, VcPdfDocument, VcExcelFileUploader, VcImageUploader, VcTour, VcSipFlow, VcEntityAddButton, VcEntityCancelButton, VcEntityDeleteIconButton, VcEntityEditIconButton, VcEntityRestoreButton, VcEntityStatusButton, VcEntityEditableTabs, VcEntityListTable, VcBaseVerticalForm, VcEntityVerticalCreateForm, VcEntityVerticalEditForm, VcEntityEditPageForm, };
|
|
109
111
|
declare module '@vue/runtime-core' {
|
|
110
112
|
interface GlobalComponents {
|
|
111
113
|
VcButton: typeof VcButton;
|
|
@@ -139,6 +141,8 @@ declare module '@vue/runtime-core' {
|
|
|
139
141
|
VcTagInput: typeof VcTagInput;
|
|
140
142
|
VcOtpInput: typeof VcOtpInput;
|
|
141
143
|
VcFileUploader: typeof VcFileUploader;
|
|
144
|
+
VcFileUploaderSimple: typeof VcFileUploaderSimple;
|
|
145
|
+
VcFileUploaderArea: typeof VcFileUploaderArea;
|
|
142
146
|
VcCard: typeof VcCard;
|
|
143
147
|
VcCodeBlock: typeof VcCodeBlock;
|
|
144
148
|
VcModal: typeof VcModal;
|
|
@@ -29,6 +29,8 @@ export { default as VcPhoneInput } from './components/VcPhoneInput/VcPhoneInput.
|
|
|
29
29
|
export { default as VcTagInput } from './components/VcTagInput/VcTagInput.vue';
|
|
30
30
|
export { default as VcOtpInput } from './components/VcOtpInput/VcOtpInput.vue';
|
|
31
31
|
export { default as VcFileUploader } from './components/VcFileUploader/VcFileUploader.vue';
|
|
32
|
+
export { default as VcFileUploaderSimple } from './components/VcFileUploader/VcFileUploaderSimple.vue';
|
|
33
|
+
export { default as VcFileUploaderArea } from './components/VcFileUploader/VcFileUploaderArea.vue';
|
|
32
34
|
export { default as VcCard } from './components/VcCard/VcCard.vue';
|
|
33
35
|
export { default as VcCodeBlock } from './components/VcCodeBlock/VcCodeBlock.vue';
|
|
34
36
|
export { default as VcModal } from './components/VcModal/VcModal.vue';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { ButtonColor, ButtonSize, ButtonType, FileUploaded, ReturnFileType } from '../../types';
|
|
3
|
+
import { TIcon } from '../../types/icons.types';
|
|
4
|
+
import { IVcBaseInputProps } from './useInputBase';
|
|
5
|
+
import { IUseInputErrorProps } from './useInputError';
|
|
6
|
+
import { IUseInputLabelProps } from './useInputLabel';
|
|
7
|
+
export interface IFileUploaderProps extends IVcBaseInputProps, IUseInputErrorProps, IUseInputLabelProps {
|
|
8
|
+
/** @description Array of initially uploaded files */
|
|
9
|
+
files?: Array<FileUploaded>;
|
|
10
|
+
/** @description Array of currently selected uploaded files */
|
|
11
|
+
modelValue?: Array<FileUploaded>;
|
|
12
|
+
/** @description Maximum number of files that can be displayed before showing overflow */
|
|
13
|
+
maxLength?: number;
|
|
14
|
+
/** @description Maximum file size limit in bytes for individual files */
|
|
15
|
+
fileSizeLimit?: number;
|
|
16
|
+
/** @description Maximum total size limit in bytes for all files combined */
|
|
17
|
+
fileListSizeLimit?: number;
|
|
18
|
+
/** @description Accepted file types (mime types or extensions) */
|
|
19
|
+
accept?: string;
|
|
20
|
+
/** @description Visual style variant of the upload button (VcFileUploaderSimple only) */
|
|
21
|
+
buttonType?: ButtonType;
|
|
22
|
+
/**
|
|
23
|
+
* @description Icon shown in the upload button (VcFileUploaderSimple only). Accepts a
|
|
24
|
+
* class string (legacy `vc-icon-*`) or a Vue component (e.g. a Lucide icon from `@lucide/vue`).
|
|
25
|
+
*/
|
|
26
|
+
buttonIcon?: TIcon;
|
|
27
|
+
/** @description Text label for the upload button (VcFileUploaderSimple only) */
|
|
28
|
+
buttonText?: string;
|
|
29
|
+
/** @description Color theme of the upload button (VcFileUploaderSimple only) */
|
|
30
|
+
buttonColor?: ButtonColor;
|
|
31
|
+
/** @description Size variant of the upload button (VcFileUploaderSimple only) */
|
|
32
|
+
buttonSize?: ButtonSize;
|
|
33
|
+
/**
|
|
34
|
+
* @description Icon shown in the per-file tag (VcFileUploaderSimple only). Accepts a
|
|
35
|
+
* class string (legacy `vc-icon-*`) or a Vue component (e.g. a Lucide icon from `@lucide/vue`).
|
|
36
|
+
*/
|
|
37
|
+
tagIcon?: TIcon;
|
|
38
|
+
/** @description Text to display when no files are selected */
|
|
39
|
+
noDataText?: string;
|
|
40
|
+
/** @description Return type for uploaded files (file, base64, dataUrl) */
|
|
41
|
+
fileType?: ReturnFileType;
|
|
42
|
+
/** @description Maximum width for file name content in tags (VcFileUploaderSimple only) */
|
|
43
|
+
tagMaxContentWidth?: string;
|
|
44
|
+
/** @description Whether to allow multiple file selection */
|
|
45
|
+
multiple?: boolean;
|
|
46
|
+
/** @description Whether to show uploaded file names as tags (VcFileUploaderSimple only) */
|
|
47
|
+
showFileName?: boolean;
|
|
48
|
+
/** @description Whether to hide the clear all files action button (VcFileUploaderSimple only) */
|
|
49
|
+
hideClearAction?: boolean;
|
|
50
|
+
/** @description Renders the drag-and-drop area variant (VcFileUploaderArea) instead of the button variant (VcFileUploaderSimple) */
|
|
51
|
+
useArea?: boolean;
|
|
52
|
+
/** @description Optional helper text shown under the drop area, e.g. accepted formats/size (VcFileUploaderArea only) */
|
|
53
|
+
areaHintText?: string;
|
|
54
|
+
/** @description Max height of the selected-files list before it scrolls, e.g. `320` or `'20rem'` (VcFileUploaderArea only) */
|
|
55
|
+
areaListHeight?: string | number;
|
|
56
|
+
/**
|
|
57
|
+
* @description Per-extension icon/color overrides for the file list (VcFileUploaderArea only),
|
|
58
|
+
* keyed by lowercase extension without the dot. Merged over the built-in defaults - only the
|
|
59
|
+
* extensions you name are affected, and either `icon` or `color` alone is enough to override just that part,
|
|
60
|
+
* e.g. `{ zip: { color: '#8B5CF6' }, docx: { icon: FileType2 } }`. The reserved key `default`
|
|
61
|
+
* restyles the fallback used for any extension with no built-in or custom entry.
|
|
62
|
+
*/
|
|
63
|
+
fileTypeMap?: Record<string, IFileTypeStyle>;
|
|
64
|
+
}
|
|
65
|
+
export interface IFileTypeStyle {
|
|
66
|
+
/** @description Icon shown for this extension. Accepts a class string (legacy `vc-icon-*`) or a Vue component. */
|
|
67
|
+
icon?: TIcon;
|
|
68
|
+
/** @description CSS color for the icon and its tinted background (any valid CSS color, e.g. `var(--success-actions)` or `#8B5CF6`) */
|
|
69
|
+
color?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface IFileUploaderEmit {
|
|
72
|
+
(e: 'update:modelValue', pl: Array<FileUploaded>): void;
|
|
73
|
+
(e: 'input', pl: Array<FileUploaded>): void;
|
|
74
|
+
}
|
|
75
|
+
export default function useFileUploader(props: IFileUploaderProps, emit: IFileUploaderEmit): {
|
|
76
|
+
items: Ref<FileUploaded[], FileUploaded[]>;
|
|
77
|
+
errorText: import("vue").ComputedRef<string>;
|
|
78
|
+
parseFiles: (files: Array<FileUploaded>) => void;
|
|
79
|
+
processFiles: (rawFiles: Array<File>) => Promise<void>;
|
|
80
|
+
onTagClose: (index: number | undefined) => void;
|
|
81
|
+
onClear: () => void;
|
|
82
|
+
};
|
|
@@ -96,6 +96,8 @@ declare const _default: {
|
|
|
96
96
|
"voicenterUi.uploader.file.size.sum.should.not.exceed": "Files size sum should not exceed {value} {measure}",
|
|
97
97
|
"voicenterUi.uploader.some.files.were.concat.size.limit": "Some files were concatenated because of size limit",
|
|
98
98
|
"voicenterUi.uploader.file.size.is.but.limit.is": "File size is {fileSize} {fileMeasure} but limit is {limitSize} {limitMeasure}",
|
|
99
|
+
"voicenterUi.uploader.area.browse": "Browse file",
|
|
100
|
+
"voicenterUi.uploader.area.dropInstructions": "or Drop here to attach",
|
|
99
101
|
"voicenterUi.pagination.pages": "Page:",
|
|
100
102
|
"voicenterUi.table.no.data": "No Data",
|
|
101
103
|
"voicenterUi.table.filter.by": "Filter by {column}",
|