@weaveui/web 0.0.1
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/LICENSE +35 -0
- package/README.md +119 -0
- package/THIRD_PARTY_NOTICES +29 -0
- package/dist/apm-log.es.js +996 -0
- package/dist/apm-log.umd.cjs +1 -0
- package/dist/business/apm-log/behavior-directive.d.ts +9 -0
- package/dist/business/apm-log/behavior-log.d.ts +6 -0
- package/dist/business/apm-log/behavior-types.d.ts +121 -0
- package/dist/business/apm-log/browser.d.ts +3 -0
- package/dist/business/apm-log/directive.d.ts +13 -0
- package/dist/business/apm-log/index.d.ts +8 -0
- package/dist/business/apm-log/legacy-apm-log.d.ts +6 -0
- package/dist/business/apm-log/types.d.ts +147 -0
- package/dist/business/apm-log/vue.d.ts +5 -0
- package/dist/business/monitor/index.d.ts +81 -0
- package/dist/business/monitor/monitor-plugin.d.ts +9 -0
- package/dist/business/monitor/runtime-types.d.ts +166 -0
- package/dist/business/monitor/runtime.d.ts +6 -0
- package/dist/business/monitor/types.d.ts +221 -0
- package/dist/business/permission/Permission.d.ts +18 -0
- package/dist/business/permission/PermissionPluginClass.d.ts +40 -0
- package/dist/business/permission/directive.d.ts +7 -0
- package/dist/business/permission/index.d.ts +35 -0
- package/dist/business/permission/permission-plugin.d.ts +16 -0
- package/dist/business/permission/storage.d.ts +30 -0
- package/dist/business/permission/tree.d.ts +19 -0
- package/dist/business/permission/types.d.ts +115 -0
- package/dist/business/upload-cos/index.d.ts +117 -0
- package/dist/business/upload-cos/src/UploadCos.vue.d.ts +70 -0
- package/dist/business/upload-cos/src/types.d.ts +72 -0
- package/dist/business/upload-cos/src/utils.d.ts +9 -0
- package/dist/index.d.ts +1894 -0
- package/dist/index.es.js +4315 -0
- package/dist/index.umd.cjs +6 -0
- package/dist/monitor.es.js +1217 -0
- package/dist/monitor.umd.cjs +1 -0
- package/dist/permission.es.js +631 -0
- package/dist/permission.umd.cjs +1 -0
- package/dist/style.css +1 -0
- package/dist/upload-cos.es.js +426 -0
- package/dist/upload-cos.style.css +1 -0
- package/dist/upload-cos.umd.cjs +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/is.d.ts +2 -0
- package/dist/utils/withInstall.d.ts +7 -0
- package/package.json +105 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { UploadCosCredential, UploadCosFile, UploadCosProps } from './types';
|
|
2
|
+
declare function triggerUpload(): void;
|
|
3
|
+
declare function openFile(file: UploadCosFile): void;
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
'upload-button'?(_: {
|
|
8
|
+
triggerUpload: typeof triggerUpload;
|
|
9
|
+
isUploading: boolean;
|
|
10
|
+
}): any;
|
|
11
|
+
'file-list'?(_: {
|
|
12
|
+
uploadedFiles: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
name?: string | undefined;
|
|
15
|
+
origin_name?: string | undefined;
|
|
16
|
+
url?: string | undefined;
|
|
17
|
+
size?: number | undefined;
|
|
18
|
+
width?: number | undefined;
|
|
19
|
+
height?: number | undefined;
|
|
20
|
+
ext?: string | undefined;
|
|
21
|
+
path?: string | undefined;
|
|
22
|
+
}[];
|
|
23
|
+
openFile: typeof openFile;
|
|
24
|
+
progressMap: Record<string, number>;
|
|
25
|
+
}): any;
|
|
26
|
+
};
|
|
27
|
+
refs: {
|
|
28
|
+
fileInput: HTMLInputElement;
|
|
29
|
+
};
|
|
30
|
+
rootEl: HTMLDivElement;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
33
|
+
declare const __VLS_component: import('vue').DefineComponent<UploadCosProps, {
|
|
34
|
+
triggerUpload: () => void;
|
|
35
|
+
handleSingleFileUpload: (file: File, credential?: UploadCosCredential) => Promise<UploadCosFile>;
|
|
36
|
+
uploadDefault: (file: File) => Promise<UploadCosFile>;
|
|
37
|
+
formatFileSize: (sizeInBytes: number) => string;
|
|
38
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
39
|
+
uploadfiles: (file: UploadCosFile) => any;
|
|
40
|
+
errorUpLoad: (error: unknown, response?: unknown) => any;
|
|
41
|
+
overLimitTips: () => any;
|
|
42
|
+
"update:overLoaderList": (files: UploadCosFile[]) => any;
|
|
43
|
+
"upload-progress": (file: File, percent: number) => any;
|
|
44
|
+
}, string, import('vue').PublicProps, Readonly<UploadCosProps> & Readonly<{
|
|
45
|
+
onUploadfiles?: ((file: UploadCosFile) => any) | undefined;
|
|
46
|
+
onErrorUpLoad?: ((error: unknown, response?: unknown) => any) | undefined;
|
|
47
|
+
onOverLimitTips?: (() => any) | undefined;
|
|
48
|
+
"onUpdate:overLoaderList"?: ((files: UploadCosFile[]) => any) | undefined;
|
|
49
|
+
"onUpload-progress"?: ((file: File, percent: number) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
appChanneId: string;
|
|
52
|
+
multiple: boolean;
|
|
53
|
+
accept: string;
|
|
54
|
+
baseUrl: string;
|
|
55
|
+
limit: number;
|
|
56
|
+
overLoaderList: readonly UploadCosFile[];
|
|
57
|
+
fileType: string;
|
|
58
|
+
appName: string;
|
|
59
|
+
isUseCos: boolean;
|
|
60
|
+
defaultUploadConfig: import('./types').UploadCosDefaultUploadConfig;
|
|
61
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
62
|
+
fileInput: HTMLInputElement;
|
|
63
|
+
}, HTMLDivElement>;
|
|
64
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
65
|
+
export default _default;
|
|
66
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
67
|
+
new (): {
|
|
68
|
+
$slots: S;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export interface UploadCosFile {
|
|
2
|
+
name?: string;
|
|
3
|
+
origin_name?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
size?: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
ext?: string;
|
|
9
|
+
path?: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface UploadCosImageDimensions {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A short-lived COS credential returned by a trusted backend service.
|
|
18
|
+
* Do not put long-lived COS secrets in client-side component props.
|
|
19
|
+
*/
|
|
20
|
+
export interface UploadCosCredential {
|
|
21
|
+
tmpSecretID: string;
|
|
22
|
+
tmpSecretKey: string;
|
|
23
|
+
sessionToken: string;
|
|
24
|
+
bucket: string;
|
|
25
|
+
region: string;
|
|
26
|
+
dir?: string;
|
|
27
|
+
startTime?: number;
|
|
28
|
+
expiredTime?: number;
|
|
29
|
+
}
|
|
30
|
+
export type UploadCosProgressReporter = (percent: number) => void;
|
|
31
|
+
export interface UploadCosDefaultUploadConfig {
|
|
32
|
+
uploadUrl?: string;
|
|
33
|
+
token?: string;
|
|
34
|
+
yyid?: string;
|
|
35
|
+
appChannelId?: string | number;
|
|
36
|
+
dataChannelId?: string | number;
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
}
|
|
39
|
+
export interface UploadCosProps {
|
|
40
|
+
appChanneId?: string;
|
|
41
|
+
multiple?: boolean;
|
|
42
|
+
accept?: string;
|
|
43
|
+
baseUrl?: string;
|
|
44
|
+
limit?: number;
|
|
45
|
+
overLoaderList?: readonly UploadCosFile[];
|
|
46
|
+
fileType?: string;
|
|
47
|
+
appName?: string;
|
|
48
|
+
isUseCos?: boolean;
|
|
49
|
+
defaultUploadConfig?: UploadCosDefaultUploadConfig;
|
|
50
|
+
}
|
|
51
|
+
export interface UploadCosEmits {
|
|
52
|
+
uploadfiles: [file: UploadCosFile];
|
|
53
|
+
errorUpLoad: [error: unknown, response?: unknown];
|
|
54
|
+
overLimitTips: [];
|
|
55
|
+
'update:overLoaderList': [files: UploadCosFile[]];
|
|
56
|
+
'upload-progress': [file: File, percent: number];
|
|
57
|
+
}
|
|
58
|
+
export interface UploadCosUploadButtonSlotProps {
|
|
59
|
+
triggerUpload: () => void;
|
|
60
|
+
isUploading: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface UploadCosFileListSlotProps {
|
|
63
|
+
uploadedFiles: UploadCosFile[];
|
|
64
|
+
openFile: (file: UploadCosFile) => void;
|
|
65
|
+
progressMap: Record<string, number>;
|
|
66
|
+
}
|
|
67
|
+
export interface UploadCosExposed {
|
|
68
|
+
triggerUpload: () => void;
|
|
69
|
+
handleSingleFileUpload: (file: File, credential?: UploadCosCredential) => Promise<UploadCosFile>;
|
|
70
|
+
uploadDefault: (file: File) => Promise<UploadCosFile>;
|
|
71
|
+
formatFileSize: (sizeInBytes: number) => string;
|
|
72
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function createRandomKey(): string;
|
|
2
|
+
export declare function formatFileSize(sizeInBytes: number): string;
|
|
3
|
+
export declare function getFileExtension(fileName: string): string;
|
|
4
|
+
export declare function createCosFileName(appName: string, extension: string): {
|
|
5
|
+
fileId: string;
|
|
6
|
+
fileName: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function normalizeCosDirectory(directory?: string): string;
|
|
9
|
+
export declare function joinUrl(baseUrl: string, path: string): string;
|