@spacecorexdev/filemanager 0.1.0 → 0.2.0
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/index.js +198 -197
- package/dist/ui/index.js +198 -197
- package/package.json +2 -2
- package/types/ui/FileManager/FileContextMenu.d.ts +2 -0
- package/types/ui/FileManager/FileGridView.d.ts +1 -0
- package/types/ui/FileManager/FileTableView.d.ts +1 -0
- package/types/ui/FileManager/hooks/useFileManagerActions.d.ts +2 -0
- package/types/ui/FileManager/index.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spacecorexdev/filemanager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Vendorsys 文件管理与文件预览组件包",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@file-viewer/renderer-word": "^2.1.23",
|
|
60
60
|
"@mantine/core": "^8.3.18",
|
|
61
61
|
"@mantine/hooks": "^8.3.18",
|
|
62
|
-
"@spacecorexdev/core": "
|
|
62
|
+
"@spacecorexdev/core": "^0.2.0",
|
|
63
63
|
"@univerjs/preset-docs-advanced": "^0.25.0",
|
|
64
64
|
"@univerjs/preset-docs-core": "^0.25.0",
|
|
65
65
|
"@univerjs/preset-sheets-core": "^0.25.0",
|
|
@@ -34,6 +34,8 @@ interface FileContextMenuProps {
|
|
|
34
34
|
onCreateContract?: (file: ProjectFile) => void;
|
|
35
35
|
/** 是否为管理员或负责人 */
|
|
36
36
|
isAdminOrOwner?: boolean;
|
|
37
|
+
/** 只读模式:隐藏所有会修改资源或生成写凭证的菜单 */
|
|
38
|
+
readOnly?: boolean;
|
|
37
39
|
trigger?: 'click' | 'hover' | 'contextMenu';
|
|
38
40
|
placement?: 'top' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
39
41
|
/** 手动控制显示状态(用于右键菜单) */
|
|
@@ -7,6 +7,7 @@ interface FileGridViewProps {
|
|
|
7
7
|
dragSourceId: string | null;
|
|
8
8
|
isFolderExpanded: (folderId: string) => boolean;
|
|
9
9
|
smallView: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
10
11
|
onPreview: (file: ProjectFile) => void;
|
|
11
12
|
onDownload: (file: ProjectFile) => void;
|
|
12
13
|
/** 下载文件夹回调(仅管理员/负责人提供) */
|
|
@@ -7,6 +7,7 @@ interface FileTableViewProps {
|
|
|
7
7
|
dragOverId: string | null;
|
|
8
8
|
dragSourceId: string | null;
|
|
9
9
|
smallView: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
10
11
|
isFolderExpanded: (folderId: string) => boolean;
|
|
11
12
|
onExpand: (expanded: boolean, record: ProjectFile) => void;
|
|
12
13
|
onPreview: (file: ProjectFile) => void;
|
|
@@ -71,5 +71,7 @@ export declare const useFileManagerActions: (projectId: string, currentUserRole:
|
|
|
71
71
|
api?: FileManagerApi;
|
|
72
72
|
/** 功能开关,缺省全部开启 */
|
|
73
73
|
features?: FileManagerFeatures;
|
|
74
|
+
/** 允许 VIEWER 查看合同及附件,不开放写操作 */
|
|
75
|
+
allowViewerContracts?: boolean;
|
|
74
76
|
}) => FileManagerActions;
|
|
75
77
|
export {};
|
|
@@ -11,6 +11,8 @@ interface FileManagerProps {
|
|
|
11
11
|
api?: FileManagerApi;
|
|
12
12
|
/** 功能开关,缺省全部开启(合同、跨项目移动复制、微信分享、版本历史、外部预览链接) */
|
|
13
13
|
features?: FileManagerFeatures;
|
|
14
|
+
/** 允许 VIEWER 查看合同及附件,仅开放读取,不授予任何写权限 */
|
|
15
|
+
allowViewerContracts?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export declare const FileManager: React.FC<FileManagerProps>;
|
|
16
18
|
export {};
|