mc-plus 1.0.21 → 1.0.22
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/es/{hooks-D0n33nb8.js → hooks-Bd2T19-k.js} +11 -11
- package/dist/es/index.js +15 -12
- package/dist/es/mc-alert-BPMKgrkJ.js +12 -0
- package/dist/es/{mc-button-C3M_uIUL.js → mc-button-DTRgW-cB.js} +5 -5
- package/dist/es/{mc-drawer-Dle-4Mf2.js → mc-drawer-Q5ABQyWA.js} +1 -1
- package/dist/es/{mc-form-C_zKtVSz.js → mc-form-C00hex94.js} +27 -27
- package/dist/es/{mc-input-DtvjCuAH.js → mc-input-Bi14QxKi.js} +2 -2
- package/dist/es/mc-lightbox-CH6D0Hzz.js +35 -0
- package/dist/es/{mc-select-BpTBi_Ax.js → mc-select-BfRLyj_A.js} +3 -3
- package/dist/es/{mc-step-DPbqaW4a.js → mc-step-BNxvCF7V.js} +1 -1
- package/dist/es/{mc-tooltip-XvEaoUdt.js → mc-tooltip-CV3tcUfN.js} +3 -3
- package/dist/es/mc-upload-BfgOsSV7.js +120 -0
- package/dist/es/theme/mc-alert.css +1 -1
- package/dist/es/theme/mc-button.css +1 -1
- package/dist/es/theme/mc-form.css +1 -1
- package/dist/es/theme/mc-lightbox.css +1 -1
- package/dist/es/theme/mc-upload.css +1 -0
- package/dist/index.css +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/mc-lightbox/index.d.ts +3 -1
- package/dist/types/components/mc-upload/constanst.d.ts +11 -0
- package/dist/types/components/mc-upload/index.d.ts +124 -0
- package/dist/types/components/mc-upload/types.d.ts +46 -0
- package/dist/types/components/mc-upload/utils.d.ts +4 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +10 -10
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/mc-alert-BfTDI70R.js +0 -12
- package/dist/es/mc-lightbox-BcK5Hqfm.js +0 -26
|
@@ -18,7 +18,9 @@ export declare const McLightbox: {
|
|
|
18
18
|
portCssSelector: string;
|
|
19
19
|
hideFooter: boolean;
|
|
20
20
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
21
|
-
|
|
21
|
+
lightboxRef: HTMLDivElement;
|
|
22
|
+
wrapperRef: HTMLDivElement;
|
|
23
|
+
contentRef: HTMLDivElement;
|
|
22
24
|
footerRef: HTMLDivElement;
|
|
23
25
|
}, any, import('vue').ComponentProvideOptions, {
|
|
24
26
|
P: {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const WILDCARD = "[?]";
|
|
2
|
+
export declare const UPLOAD_TEXT_EH: {
|
|
3
|
+
upload_note: string;
|
|
4
|
+
max_size: string;
|
|
5
|
+
max_count: string;
|
|
6
|
+
uploaded_by: string;
|
|
7
|
+
uploaded_on: string;
|
|
8
|
+
limit_count: string;
|
|
9
|
+
limit_size: string;
|
|
10
|
+
limit_type: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export declare const McUpload: {
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').UploadProps> & Readonly<{
|
|
4
|
+
"onUpdate:modelValue"?: ((files: import('../../core').UploadFile[]) => any) | undefined;
|
|
5
|
+
onUpload?: ((files: import('../../core').UploadFile[]) => any) | undefined;
|
|
6
|
+
"onDelete:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
7
|
+
"onReview:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
8
|
+
"onError:count"?: (() => any) | undefined;
|
|
9
|
+
"onError:size"?: (() => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
uploadInputRef: import('vue').Ref<HTMLDivElement | void>;
|
|
12
|
+
clear: () => void;
|
|
13
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
14
|
+
"update:modelValue": (files: import('../../core').UploadFile[]) => any;
|
|
15
|
+
upload: (files: import('../../core').UploadFile[]) => any;
|
|
16
|
+
"delete:file": (file: import('../../core').UploadFile) => any;
|
|
17
|
+
"review:file": (file: import('../../core').UploadFile) => any;
|
|
18
|
+
"error:count": () => any;
|
|
19
|
+
"error:size": () => any;
|
|
20
|
+
}, import('vue').PublicProps, {
|
|
21
|
+
modelValue: import('../../core').UploadFile[];
|
|
22
|
+
fileSize: number | string;
|
|
23
|
+
fileCount: number;
|
|
24
|
+
hiddenIcon: boolean;
|
|
25
|
+
uploadUser: string;
|
|
26
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
27
|
+
uploadFileRef: HTMLInputElement;
|
|
28
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
29
|
+
P: {};
|
|
30
|
+
B: {};
|
|
31
|
+
D: {};
|
|
32
|
+
C: {};
|
|
33
|
+
M: {};
|
|
34
|
+
Defaults: {};
|
|
35
|
+
}, Readonly<import('../../core').UploadProps> & Readonly<{
|
|
36
|
+
"onUpdate:modelValue"?: ((files: import('../../core').UploadFile[]) => any) | undefined;
|
|
37
|
+
onUpload?: ((files: import('../../core').UploadFile[]) => any) | undefined;
|
|
38
|
+
"onDelete:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
39
|
+
"onReview:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
40
|
+
"onError:count"?: (() => any) | undefined;
|
|
41
|
+
"onError:size"?: (() => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
uploadInputRef: import('vue').Ref<HTMLDivElement | void>;
|
|
44
|
+
clear: () => void;
|
|
45
|
+
}, {}, {}, {}, {
|
|
46
|
+
modelValue: import('../../core').UploadFile[];
|
|
47
|
+
fileSize: number | string;
|
|
48
|
+
fileCount: number;
|
|
49
|
+
hiddenIcon: boolean;
|
|
50
|
+
uploadUser: string;
|
|
51
|
+
}>;
|
|
52
|
+
__isFragment?: never;
|
|
53
|
+
__isTeleport?: never;
|
|
54
|
+
__isSuspense?: never;
|
|
55
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('../../core').UploadProps> & Readonly<{
|
|
56
|
+
"onUpdate:modelValue"?: ((files: import('../../core').UploadFile[]) => any) | undefined;
|
|
57
|
+
onUpload?: ((files: import('../../core').UploadFile[]) => any) | undefined;
|
|
58
|
+
"onDelete:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
59
|
+
"onReview:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
60
|
+
"onError:count"?: (() => any) | undefined;
|
|
61
|
+
"onError:size"?: (() => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
uploadInputRef: import('vue').Ref<HTMLDivElement | void>;
|
|
64
|
+
clear: () => void;
|
|
65
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
66
|
+
"update:modelValue": (files: import('../../core').UploadFile[]) => any;
|
|
67
|
+
upload: (files: import('../../core').UploadFile[]) => any;
|
|
68
|
+
"delete:file": (file: import('../../core').UploadFile) => any;
|
|
69
|
+
"review:file": (file: import('../../core').UploadFile) => any;
|
|
70
|
+
"error:count": () => any;
|
|
71
|
+
"error:size": () => any;
|
|
72
|
+
}, string, {
|
|
73
|
+
modelValue: import('../../core').UploadFile[];
|
|
74
|
+
fileSize: number | string;
|
|
75
|
+
fileCount: number;
|
|
76
|
+
hiddenIcon: boolean;
|
|
77
|
+
uploadUser: string;
|
|
78
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
79
|
+
$slots: {
|
|
80
|
+
default?(_: {}): any;
|
|
81
|
+
};
|
|
82
|
+
}) & import('vue').Plugin;
|
|
83
|
+
export declare const McFileList: {
|
|
84
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../core').FileListProps> & Readonly<{
|
|
85
|
+
"onDelete:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
86
|
+
"onReview:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
87
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
88
|
+
"delete:file": (file: import('../../core').UploadFile) => any;
|
|
89
|
+
"review:file": (file: import('../../core').UploadFile) => any;
|
|
90
|
+
}, import('vue').PublicProps, {
|
|
91
|
+
files: import('../../core').UploadFile[];
|
|
92
|
+
deletable: boolean;
|
|
93
|
+
theme: import('../../core').FileListTheme;
|
|
94
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
95
|
+
fileContainerRef: HTMLDivElement;
|
|
96
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
97
|
+
P: {};
|
|
98
|
+
B: {};
|
|
99
|
+
D: {};
|
|
100
|
+
C: {};
|
|
101
|
+
M: {};
|
|
102
|
+
Defaults: {};
|
|
103
|
+
}, Readonly<import('../../core').FileListProps> & Readonly<{
|
|
104
|
+
"onDelete:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
105
|
+
"onReview:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
106
|
+
}>, {}, {}, {}, {}, {
|
|
107
|
+
files: import('../../core').UploadFile[];
|
|
108
|
+
deletable: boolean;
|
|
109
|
+
theme: import('../../core').FileListTheme;
|
|
110
|
+
}>;
|
|
111
|
+
__isFragment?: never;
|
|
112
|
+
__isTeleport?: never;
|
|
113
|
+
__isSuspense?: never;
|
|
114
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('../../core').FileListProps> & Readonly<{
|
|
115
|
+
"onDelete:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
116
|
+
"onReview:file"?: ((file: import('../../core').UploadFile) => any) | undefined;
|
|
117
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
118
|
+
"delete:file": (file: import('../../core').UploadFile) => any;
|
|
119
|
+
"review:file": (file: import('../../core').UploadFile) => any;
|
|
120
|
+
}, string, {
|
|
121
|
+
files: import('../../core').UploadFile[];
|
|
122
|
+
deletable: boolean;
|
|
123
|
+
theme: import('../../core').FileListTheme;
|
|
124
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export type UploadState = "loading" | "failed" | "successed";
|
|
3
|
+
export type UploadFunc = (file: File) => Promise<UploadFile>;
|
|
4
|
+
export interface UploadFile {
|
|
5
|
+
fid?: number;
|
|
6
|
+
name?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
status?: UploadState;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
uploadBy?: string;
|
|
11
|
+
uploadTime?: string | number;
|
|
12
|
+
}
|
|
13
|
+
export interface UploadProps {
|
|
14
|
+
modelValue?: UploadFile[];
|
|
15
|
+
fileSize?: number | string;
|
|
16
|
+
fileCount?: number;
|
|
17
|
+
hiddenIcon?: boolean;
|
|
18
|
+
allowedFileTypes?: string[];
|
|
19
|
+
uploadUser?: string;
|
|
20
|
+
uploadFunc?: UploadFunc;
|
|
21
|
+
}
|
|
22
|
+
export interface UploadEmits {
|
|
23
|
+
(e: "upload", files: UploadFile[]): void;
|
|
24
|
+
(e: "update:modelValue", files: UploadFile[]): void;
|
|
25
|
+
(e: "delete:file", file: UploadFile): void;
|
|
26
|
+
(e: "review:file", file: UploadFile): void;
|
|
27
|
+
(e: "error:count"): void;
|
|
28
|
+
(e: "error:size"): void;
|
|
29
|
+
}
|
|
30
|
+
export interface UploadInstance {
|
|
31
|
+
uploadInputRef: Ref<HTMLDivElement | void>;
|
|
32
|
+
clear: () => void;
|
|
33
|
+
}
|
|
34
|
+
export type FileListTheme = "grey" | "white";
|
|
35
|
+
export interface FileListProps {
|
|
36
|
+
files?: UploadFile[];
|
|
37
|
+
deletable?: boolean;
|
|
38
|
+
theme?: FileListTheme;
|
|
39
|
+
}
|
|
40
|
+
export interface FileListEmits {
|
|
41
|
+
(e: "delete:file", file: UploadFile): void;
|
|
42
|
+
(e: "review:file", file: UploadFile): void;
|
|
43
|
+
}
|
|
44
|
+
export interface FileInstance {
|
|
45
|
+
ref: Ref<HTMLDivElement | void>;
|
|
46
|
+
}
|