@nocobase/client 2.2.0-beta.8 → 2.3.0-alpha.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/es/collection-manager/constants.d.ts +1 -1
- package/es/index.mjs +25 -25
- package/es/locale/index.d.ts +3 -0
- package/es/route-switch/antd/admin-layout/AdminLayoutResponsiveOpenModeProvider.d.ts +12 -0
- package/es/schema-component/antd/upload/placeholder.d.ts +6 -0
- package/es/schema-component/antd/upload/shared.d.ts +8 -3
- package/lib/index.js +25 -25
- package/lib/locale/en-US.json +4 -0
- package/lib/locale/index.js +2 -1
- package/lib/locale/zh-CN.json +4 -0
- package/package.json +7 -7
package/es/locale/index.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import { FC } from 'react';
|
|
10
|
+
export declare const AdminLayoutResponsiveOpenModeProvider: FC<{
|
|
11
|
+
responsive: boolean;
|
|
12
|
+
}>;
|
|
@@ -6,8 +6,14 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
interface UploadPlaceholderWindow {
|
|
10
|
+
__nocobase_public_path__?: string;
|
|
11
|
+
__webpack_public_path__?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function getUploadPlaceholderUrl(path: string, browserWindow?: UploadPlaceholderWindow): string;
|
|
9
14
|
export declare const UPLOAD_PLACEHOLDER: {
|
|
10
15
|
ext: RegExp;
|
|
11
16
|
icon: string;
|
|
12
17
|
}[];
|
|
13
18
|
export declare const UNKNOWN_FILE_ICON: string;
|
|
19
|
+
export {};
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { UploadFile } from 'antd/es/upload/interface';
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import type { IUploadProps, UploadProps } from './type';
|
|
11
|
+
import type { FileCollectionReference, IUploadProps, UploadProps } from './type';
|
|
12
12
|
export declare const FILE_SIZE_LIMIT_DEFAULT: number;
|
|
13
13
|
export interface FileModel {
|
|
14
14
|
id: number;
|
|
15
|
+
storageId?: string | number;
|
|
15
16
|
filename: string;
|
|
16
17
|
path: string;
|
|
17
18
|
title: string;
|
|
@@ -23,6 +24,7 @@ export interface FileModel {
|
|
|
23
24
|
export interface PreviewerProps {
|
|
24
25
|
index: number;
|
|
25
26
|
list: FileModel[];
|
|
27
|
+
fileCollection?: FileCollectionReference;
|
|
26
28
|
onSwitchIndex(index: any): void;
|
|
27
29
|
}
|
|
28
30
|
export interface AttachmentFileType {
|
|
@@ -47,6 +49,10 @@ export declare class AttachmentFileTypes {
|
|
|
47
49
|
*/
|
|
48
50
|
export declare const attachmentFileTypes: AttachmentFileTypes;
|
|
49
51
|
export declare function matchMimetype(file: FileModel | UploadFile<any>, type: string): any;
|
|
52
|
+
export declare function getLocalPreviewUrl(file: any): string;
|
|
53
|
+
export declare function rememberLocalPreviewUrl(file: any, sourceFile: any): void;
|
|
54
|
+
export declare function revokeLocalPreviewUrl(file: any): void;
|
|
55
|
+
export declare function revokeLocalPreviewUrls(files?: any[]): void;
|
|
50
56
|
export declare function getThumbnailPlaceholderURL(file: any, options?: any): any;
|
|
51
57
|
export declare function getResponseMessage({ error, response }: UploadFile<any>): any;
|
|
52
58
|
export declare function normalizeFile(file: UploadFile & Record<string, any>): {
|
|
@@ -73,7 +79,7 @@ export declare function normalizeFile(file: UploadFile & Record<string, any>): {
|
|
|
73
79
|
"aria-labelledby"?: string;
|
|
74
80
|
};
|
|
75
81
|
export declare function useUploadProps<T extends IUploadProps = UploadProps>(props: T): {
|
|
76
|
-
customRequest({ action, data, file, filename, headers, onError, onProgress, onSuccess
|
|
82
|
+
customRequest({ action, data, file, filename, headers, onError, onProgress, onSuccess }: {
|
|
77
83
|
action: any;
|
|
78
84
|
data: any;
|
|
79
85
|
file: any;
|
|
@@ -82,7 +88,6 @@ export declare function useUploadProps<T extends IUploadProps = UploadProps>(pro
|
|
|
82
88
|
onError: any;
|
|
83
89
|
onProgress: any;
|
|
84
90
|
onSuccess: any;
|
|
85
|
-
withCredentials: any;
|
|
86
91
|
}): {
|
|
87
92
|
abort(): void;
|
|
88
93
|
};
|