beer-assembly-biz 1.1.2-alpha.9 → 1.1.3-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.
Files changed (179) hide show
  1. package/UserModals.d.ts +7 -3
  2. package/UserModals.js +6 -0
  3. package/auth/AuthPassword.d.ts +2 -3
  4. package/auth/AuthPassword.js +5 -5
  5. package/auth/AuthStyle01.d.ts +3 -4
  6. package/auth/AuthStyle01.js +4 -5
  7. package/auth/AuthStyle02.d.ts +3 -4
  8. package/auth/AuthStyle02.js +4 -5
  9. package/auth/AuthThirdPartyAuth.d.ts +2 -3
  10. package/auth/AuthThirdPartyAuth.js +1 -2
  11. package/content/ParentContext.d.ts +4 -2
  12. package/content/ParentContext.js +4 -2
  13. package/content/PermissionContext.d.ts +4 -2
  14. package/content/PermissionContext.js +4 -2
  15. package/icon/icon/directory.svg +12 -0
  16. package/icon/icon/empty.svg +43 -0
  17. package/icon/icon/media.png +0 -0
  18. package/icon/icon/volc.svg +96 -0
  19. package/images/images/assets_background_01.png +0 -0
  20. package/images/images/avatar.png +0 -0
  21. package/images/images/layout_01.png +0 -0
  22. package/images/images/layout_02.png +0 -0
  23. package/images/images/layout_03.png +0 -0
  24. package/index.d.ts +14 -0
  25. package/index.js +14 -0
  26. package/{AppLayout.d.ts → layout/AppLayout.d.ts} +4 -2
  27. package/{AppLayout.js → layout/AppLayout.js} +4 -2
  28. package/{BackPageContainer.d.ts → layout/BackPageContainer.d.ts} +4 -2
  29. package/{BackPageContainer.js → layout/BackPageContainer.js} +4 -2
  30. package/{MyPageContainer.d.ts → layout/MyPageContainer.d.ts} +4 -2
  31. package/{MyPageContainer.js → layout/MyPageContainer.js} +5 -3
  32. package/media/MediaModals.d.ts +0 -0
  33. package/media/MediaModals.js +461 -0
  34. package/net-disk/DirectoryMenusPanel.d.ts +0 -0
  35. package/net-disk/DirectoryMenusPanel.js +337 -0
  36. package/net-disk/DirectorySelect.d.ts +0 -0
  37. package/net-disk/DirectorySelect.js +240 -0
  38. package/net-disk/FileItemList.d.ts +0 -0
  39. package/net-disk/FileItemList.js +126 -0
  40. package/net-disk/FileItemTable.d.ts +0 -0
  41. package/net-disk/FileItemTable.js +422 -0
  42. package/net-disk/FileNavigation.d.ts +0 -0
  43. package/net-disk/FileNavigation.js +43 -0
  44. package/net-disk/NetDisk.d.ts +0 -0
  45. package/net-disk/NetDisk.js +36 -0
  46. package/net-disk/NetDiskModals.d.ts +0 -0
  47. package/net-disk/NetDiskModals.js +40 -0
  48. package/package.json +29 -19
  49. package/{Permission.d.ts → permission/Permission.d.ts} +4 -2
  50. package/{Permission.js → permission/Permission.js} +5 -3
  51. package/promises.d.ts +3 -0
  52. package/promises.js +3 -0
  53. package/rich/AIEditor.css +1647 -0
  54. package/rich/AIEditor.d.ts +51 -0
  55. package/rich/AIEditor.js +90 -0
  56. package/slider/SliderCode.d.ts +23 -0
  57. package/slider/SliderCode.js +203 -0
  58. package/type.d.ts +3 -0
  59. package/type.js +1 -0
  60. package/InlineContainer.d.ts +0 -6
  61. package/InlineContainer.js +0 -28
  62. package/MediaModals.d.ts +0 -32
  63. package/MediaModals.js +0 -373
  64. package/NetDiskModals.d.ts +0 -15
  65. package/NetDiskModals.js +0 -28
  66. package/SubMenusContainer.d.ts +0 -27
  67. package/SubMenusContainer.js +0 -72
  68. package/Upgrade.d.ts +0 -7
  69. package/Upgrade.js +0 -46
  70. package/fonts/harmony/HarmonyOS_Medium.a.woff2 +0 -0
  71. package/fonts/harmony/HarmonyOS_Medium.a0.woff2 +0 -0
  72. package/fonts/harmony/HarmonyOS_Medium.a1.woff2 +0 -0
  73. package/fonts/harmony/HarmonyOS_Medium.aa.woff2 +0 -0
  74. package/fonts/harmony/HarmonyOS_Medium.ab.woff2 +0 -0
  75. package/fonts/harmony/HarmonyOS_Medium.ac.woff2 +0 -0
  76. package/fonts/harmony/HarmonyOS_Medium.ad.woff2 +0 -0
  77. package/fonts/harmony/HarmonyOS_Medium.ae.woff2 +0 -0
  78. package/fonts/harmony/HarmonyOS_Medium.af.woff2 +0 -0
  79. package/fonts/harmony/HarmonyOS_Medium.ag.woff2 +0 -0
  80. package/fonts/harmony/HarmonyOS_Medium.ah.woff2 +0 -0
  81. package/fonts/harmony/HarmonyOS_Medium.ai.woff2 +0 -0
  82. package/fonts/harmony/HarmonyOS_Medium.aj.woff2 +0 -0
  83. package/fonts/harmony/HarmonyOS_Medium.ak.woff2 +0 -0
  84. package/fonts/harmony/HarmonyOS_Medium.al.woff2 +0 -0
  85. package/fonts/harmony/HarmonyOS_Medium.am.woff2 +0 -0
  86. package/fonts/harmony/HarmonyOS_Medium.an.woff2 +0 -0
  87. package/fonts/harmony/HarmonyOS_Medium.ao.woff2 +0 -0
  88. package/fonts/harmony/HarmonyOS_Medium.ap.woff2 +0 -0
  89. package/fonts/harmony/HarmonyOS_Medium.aq.woff2 +0 -0
  90. package/fonts/harmony/HarmonyOS_Medium.ar.woff2 +0 -0
  91. package/fonts/harmony/HarmonyOS_Medium.as.woff2 +0 -0
  92. package/fonts/harmony/HarmonyOS_Medium.at.woff2 +0 -0
  93. package/fonts/harmony/HarmonyOS_Medium.au.woff2 +0 -0
  94. package/fonts/harmony/HarmonyOS_Medium.av.woff2 +0 -0
  95. package/fonts/harmony/HarmonyOS_Medium.aw.woff2 +0 -0
  96. package/fonts/harmony/HarmonyOS_Medium.ax.woff2 +0 -0
  97. package/fonts/harmony/HarmonyOS_Medium.ay.woff2 +0 -0
  98. package/fonts/harmony/HarmonyOS_Medium.az.woff2 +0 -0
  99. package/fonts/harmony/HarmonyOS_Medium.b.woff2 +0 -0
  100. package/fonts/harmony/HarmonyOS_Medium.c.woff2 +0 -0
  101. package/fonts/harmony/HarmonyOS_Medium.d.woff2 +0 -0
  102. package/fonts/harmony/HarmonyOS_Medium.e.woff2 +0 -0
  103. package/fonts/harmony/HarmonyOS_Medium.f.woff2 +0 -0
  104. package/fonts/harmony/HarmonyOS_Medium.g.woff2 +0 -0
  105. package/fonts/harmony/HarmonyOS_Medium.h.woff2 +0 -0
  106. package/fonts/harmony/HarmonyOS_Medium.i.woff2 +0 -0
  107. package/fonts/harmony/HarmonyOS_Medium.j.woff2 +0 -0
  108. package/fonts/harmony/HarmonyOS_Medium.k.woff2 +0 -0
  109. package/fonts/harmony/HarmonyOS_Medium.l.woff2 +0 -0
  110. package/fonts/harmony/HarmonyOS_Medium.m.woff2 +0 -0
  111. package/fonts/harmony/HarmonyOS_Medium.n.woff2 +0 -0
  112. package/fonts/harmony/HarmonyOS_Medium.o.woff2 +0 -0
  113. package/fonts/harmony/HarmonyOS_Medium.p.woff2 +0 -0
  114. package/fonts/harmony/HarmonyOS_Medium.q.woff2 +0 -0
  115. package/fonts/harmony/HarmonyOS_Medium.r.woff2 +0 -0
  116. package/fonts/harmony/HarmonyOS_Medium.s.woff2 +0 -0
  117. package/fonts/harmony/HarmonyOS_Medium.t.woff2 +0 -0
  118. package/fonts/harmony/HarmonyOS_Medium.u.woff2 +0 -0
  119. package/fonts/harmony/HarmonyOS_Medium.v.woff2 +0 -0
  120. package/fonts/harmony/HarmonyOS_Medium.w.woff2 +0 -0
  121. package/fonts/harmony/HarmonyOS_Medium.x.woff2 +0 -0
  122. package/fonts/harmony/HarmonyOS_Medium.y.woff2 +0 -0
  123. package/fonts/harmony/HarmonyOS_Medium.z.woff2 +0 -0
  124. package/fonts/harmony/HarmonyOS_Regular.a.woff2 +0 -0
  125. package/fonts/harmony/HarmonyOS_Regular.a0.woff2 +0 -0
  126. package/fonts/harmony/HarmonyOS_Regular.a1.woff2 +0 -0
  127. package/fonts/harmony/HarmonyOS_Regular.aa.woff2 +0 -0
  128. package/fonts/harmony/HarmonyOS_Regular.ab.woff2 +0 -0
  129. package/fonts/harmony/HarmonyOS_Regular.ac.woff2 +0 -0
  130. package/fonts/harmony/HarmonyOS_Regular.ad.woff2 +0 -0
  131. package/fonts/harmony/HarmonyOS_Regular.ae.woff2 +0 -0
  132. package/fonts/harmony/HarmonyOS_Regular.af.woff2 +0 -0
  133. package/fonts/harmony/HarmonyOS_Regular.ag.woff2 +0 -0
  134. package/fonts/harmony/HarmonyOS_Regular.ah.woff2 +0 -0
  135. package/fonts/harmony/HarmonyOS_Regular.ai.woff2 +0 -0
  136. package/fonts/harmony/HarmonyOS_Regular.aj.woff2 +0 -0
  137. package/fonts/harmony/HarmonyOS_Regular.ak.woff2 +0 -0
  138. package/fonts/harmony/HarmonyOS_Regular.al.woff2 +0 -0
  139. package/fonts/harmony/HarmonyOS_Regular.am.woff2 +0 -0
  140. package/fonts/harmony/HarmonyOS_Regular.an.woff2 +0 -0
  141. package/fonts/harmony/HarmonyOS_Regular.ao.woff2 +0 -0
  142. package/fonts/harmony/HarmonyOS_Regular.ap.woff2 +0 -0
  143. package/fonts/harmony/HarmonyOS_Regular.aq.woff2 +0 -0
  144. package/fonts/harmony/HarmonyOS_Regular.ar.woff2 +0 -0
  145. package/fonts/harmony/HarmonyOS_Regular.as.woff2 +0 -0
  146. package/fonts/harmony/HarmonyOS_Regular.at.woff2 +0 -0
  147. package/fonts/harmony/HarmonyOS_Regular.au.woff2 +0 -0
  148. package/fonts/harmony/HarmonyOS_Regular.av.woff2 +0 -0
  149. package/fonts/harmony/HarmonyOS_Regular.aw.woff2 +0 -0
  150. package/fonts/harmony/HarmonyOS_Regular.ax.woff2 +0 -0
  151. package/fonts/harmony/HarmonyOS_Regular.ay.woff2 +0 -0
  152. package/fonts/harmony/HarmonyOS_Regular.az.woff2 +0 -0
  153. package/fonts/harmony/HarmonyOS_Regular.b.woff2 +0 -0
  154. package/fonts/harmony/HarmonyOS_Regular.c.woff2 +0 -0
  155. package/fonts/harmony/HarmonyOS_Regular.d.woff2 +0 -0
  156. package/fonts/harmony/HarmonyOS_Regular.e.woff2 +0 -0
  157. package/fonts/harmony/HarmonyOS_Regular.f.woff2 +0 -0
  158. package/fonts/harmony/HarmonyOS_Regular.g.woff2 +0 -0
  159. package/fonts/harmony/HarmonyOS_Regular.h.woff2 +0 -0
  160. package/fonts/harmony/HarmonyOS_Regular.i.woff2 +0 -0
  161. package/fonts/harmony/HarmonyOS_Regular.j.woff2 +0 -0
  162. package/fonts/harmony/HarmonyOS_Regular.k.woff2 +0 -0
  163. package/fonts/harmony/HarmonyOS_Regular.l.woff2 +0 -0
  164. package/fonts/harmony/HarmonyOS_Regular.m.woff2 +0 -0
  165. package/fonts/harmony/HarmonyOS_Regular.n.woff2 +0 -0
  166. package/fonts/harmony/HarmonyOS_Regular.o.woff2 +0 -0
  167. package/fonts/harmony/HarmonyOS_Regular.p.woff2 +0 -0
  168. package/fonts/harmony/HarmonyOS_Regular.q.woff2 +0 -0
  169. package/fonts/harmony/HarmonyOS_Regular.r.woff2 +0 -0
  170. package/fonts/harmony/HarmonyOS_Regular.s.woff2 +0 -0
  171. package/fonts/harmony/HarmonyOS_Regular.t.woff2 +0 -0
  172. package/fonts/harmony/HarmonyOS_Regular.u.woff2 +0 -0
  173. package/fonts/harmony/HarmonyOS_Regular.v.woff2 +0 -0
  174. package/fonts/harmony/HarmonyOS_Regular.w.woff2 +0 -0
  175. package/fonts/harmony/HarmonyOS_Regular.x.woff2 +0 -0
  176. package/fonts/harmony/HarmonyOS_Regular.y.woff2 +0 -0
  177. package/fonts/harmony/HarmonyOS_Regular.z.woff2 +0 -0
  178. package/fonts/harmony/medium.css +0 -485
  179. package/fonts/harmony/regular.css +0 -485
@@ -0,0 +1,461 @@
1
+ "use strict";
2
+ // import React, { CSSProperties, ReactNode, useEffect, useRef, useState } from 'react';
3
+ // import { css } from '@emotion/css';
4
+ // import { Breadcrumb, Button, Dropdown, Input, message, Modal, Popconfirm, Space, Spin, theme, Typography } from 'antd';
5
+ // import ElementUtils from 'beer-network/elementUtils';
6
+ // import Flux from 'beer-assembly/Flux';
7
+ // import { CloudDownloadOutlined, CopyOutlined, DeleteOutlined, ExclamationCircleFilled, HighlightOutlined, RightCircleOutlined, ScissorOutlined } from '@ant-design/icons';
8
+ // import DirectorySelect, { DirectorySelectProps } from 'beer-assembly/DirectorySelect';
9
+ // import InlineContainer from './InlineContainer';
10
+ // import IconDirectory from './icon/directory.svg';
11
+ // import IconMedia from './icon/media.png';
12
+ //
13
+ // export type Handler<T> = {
14
+ // ok: (callback?: (params: T) => void) => void
15
+ // }
16
+ // type DirectoryRequest = NonNullable<DirectorySelectProps['request']>;
17
+ // export declare type MediaItem = {
18
+ // id: string
19
+ // name: string
20
+ // type: 'DIRECTORY' | 'FILE'
21
+ // url: string
22
+ // active: boolean
23
+ // };
24
+ // export declare type RequestParams = {
25
+ // /**
26
+ // * 获取列表数据.
27
+ // * @param parentId 父类ID.
28
+ // */
29
+ // requestList: (parentId: string) => Promise<MediaItem[]>
30
+ // rename: (id: string, name: string) => Promise<Boolean>
31
+ // copy: (id: string) => Promise<Boolean>
32
+ // move: (moveId: string, targetId: string) => Promise<Boolean>
33
+ // remove: (id: string) => Promise<Boolean>
34
+ // createDirectory: (parentId: string, name: string) => Promise<Boolean>
35
+ // putFile: (parentId: string, files: FileList) => Promise<Boolean>
36
+ // } & {
37
+ // directory: DirectoryRequest
38
+ // };
39
+ //
40
+ // export class MediaModals {
41
+ // public static useMedia(request?: RequestParams): [Handler<string[]>, ReactNode] {
42
+ // const [messageApi, contextHolder] = message.useMessage();
43
+ // const { token } = theme.useToken();
44
+ // const [isOpenModal, setIsOpenModal] = useState(false);
45
+ // const [isOpenMoveModal, setIsOpenMoveModal] = useState(false);
46
+ // const [isOpenRenameModal, setIsOpenRenameModal] = useState(false);
47
+ // const [isOpenConfirmModal, setIsOpenConfirmModal] = useState(false);
48
+ // const [isLoading, setIsLoading] = useState(false);
49
+ // const [path, setPath] = useState<{ id: string, name: string }[]>([]);
50
+ // const [dataList, setDataList] = useState<MediaItem[][]>([]);
51
+ // const [selectId, setSelectId] = useState('');
52
+ // const [selectName, setSelectName] = useState('');
53
+ // const callbackRef = useRef<((params: string[]) => void) | undefined>(undefined);
54
+ // const refreshData = (force?: boolean) => {
55
+ // const item = path[path.length - 1];
56
+ // const chunkArray = (array: any[], size: number): any[][] => {
57
+ // const result: any[][] = [];
58
+ // for (let i = 0; i < array.length; i += size) {
59
+ // result.push(array.slice(i, i + size));
60
+ // }
61
+ // return result;
62
+ // };
63
+ // setIsLoading(true);
64
+ // if (force === true) {
65
+ // setDataList([]);
66
+ // }
67
+ // request?.requestList?.(item.id)
68
+ // .then(result => {
69
+ // setIsLoading(false);
70
+ // setDataList(chunkArray(result || [], 5));
71
+ // })
72
+ // .catch(() => {
73
+ // setIsLoading(false);
74
+ // });
75
+ // };
76
+ // const onActiveItem = (id: string) => {
77
+ // setDataList(dataList?.map(item => {
78
+ // return item.map(it => {
79
+ // return {
80
+ // ...it,
81
+ // active: it.id === id
82
+ // };
83
+ // });
84
+ // }));
85
+ // };
86
+ // const onDownload = async (name: string, url?: string) => {
87
+ // if ((url || '').trim() === '') {
88
+ // return;
89
+ // }
90
+ // ElementUtils.download(url || '', name);
91
+ // };
92
+ // const onPutFile = async () => {
93
+ // const files = await ElementUtils.selectFile();
94
+ // if (files === null) {
95
+ // return;
96
+ // }
97
+ // for (let i = 0; i < files.length; i += 1) {
98
+ // const file = files[i];
99
+ // if (file.size > (1048576 * 15)) {
100
+ // messageApi.error(`文件 ${file.name} 太大,不能超过 15MB`);
101
+ // return;
102
+ // }
103
+ // if (!['image/jpeg', 'image/png', 'image/gif', 'image/webp'].includes(file.type)) {
104
+ // messageApi.error(`文件 ${file.name} 不是有效的图片格式`);
105
+ // return;
106
+ // }
107
+ // }
108
+ // const parentId = path[path.length - 1]?.id;
109
+ // setIsLoading(true);
110
+ // const result = await request?.putFile(parentId, files);
111
+ // setIsLoading(false);
112
+ // if (result === true) {
113
+ // refreshData();
114
+ // }
115
+ // };
116
+ // const onCreateDirectory = async (name: string) => {
117
+ // const parentId = path[path.length - 1]?.id;
118
+ // setIsLoading(true);
119
+ // const result = await request?.createDirectory(parentId, name);
120
+ // setIsLoading(false);
121
+ // if (result === true) {
122
+ // refreshData();
123
+ // }
124
+ // setSelectName('');
125
+ // return true;
126
+ // };
127
+ // const onOpenDirectory = async (id: string, name: string) => {
128
+ // if (isLoading) {
129
+ // return;
130
+ // }
131
+ // const paths = [...getPaths(), {
132
+ // id,
133
+ // name
134
+ // }];
135
+ // setPaths(paths);
136
+ // };
137
+ // const onBackDirectory = async (id: string) => {
138
+ // if (isLoading) {
139
+ // return;
140
+ // }
141
+ // const paths = getPaths();
142
+ // const index = paths.findIndex(it => it.id === id);
143
+ // if (index < 0) {
144
+ // return;
145
+ // }
146
+ // paths.splice(index + 1);
147
+ // setPaths(paths);
148
+ // };
149
+ // const onSelectItem = async (id: string, name: string, url?: string) => {
150
+ // const current = callbackRef?.current;
151
+ // if (current === undefined) {
152
+ // return;
153
+ // }
154
+ // current?.([url || '']);
155
+ // setIsOpenModal(false);
156
+ // };
157
+ // const onRename = async (id: string, name: string) => {
158
+ // setIsOpenRenameModal(true);
159
+ // setSelectId(id);
160
+ // setSelectName(name);
161
+ // };
162
+ // const onConfirmRename = async () => {
163
+ // if (await request?.rename(selectId, selectName)) {
164
+ // refreshData();
165
+ // setSelectName('');
166
+ // setIsOpenRenameModal(false);
167
+ // }
168
+ // };
169
+ // const onCopy = async (id: string) => {
170
+ // const result = await request?.copy(id);
171
+ // if (result === true) {
172
+ // refreshData();
173
+ // }
174
+ // return result;
175
+ // };
176
+ // const onMove = async (id: string) => {
177
+ // setIsOpenMoveModal(true);
178
+ // setSelectId(id);
179
+ // };
180
+ // const onConfirmMove = async (targetId: string) => {
181
+ // const result = await request?.move(selectId, targetId);
182
+ // if (result === true) {
183
+ // setIsOpenMoveModal(false);
184
+ // refreshData();
185
+ // }
186
+ // };
187
+ // const onRemove = async (id: string) => {
188
+ // setIsOpenConfirmModal(true);
189
+ // setSelectId(id);
190
+ // };
191
+ // const onConfirmRemove = async () => {
192
+ // const result = await request?.remove(selectId);
193
+ // if (result === true) {
194
+ // setIsOpenConfirmModal(false);
195
+ // refreshData();
196
+ // }
197
+ // return result;
198
+ // };
199
+ // const setPaths = (items: { id: string, name: string }[]) => {
200
+ // setPath(items);
201
+ // sessionStorage.setItem('MEDIA_MODALS_PATHS', JSON.stringify(items));
202
+ // };
203
+ // const getPaths = (): { id: string, name: string }[] => {
204
+ // const paths = JSON.parse(sessionStorage.getItem('MEDIA_MODALS_PATHS') || '[]');
205
+ // if (paths.length <= 0) {
206
+ // paths.push({
207
+ // id: '0',
208
+ // name: '根目录'
209
+ // });
210
+ // }
211
+ // return paths;
212
+ // };
213
+ // const Item = (props: {
214
+ // id: string
215
+ // name: string
216
+ // type: 'DIRECTORY' | 'FILE'
217
+ // src?: string,
218
+ // style?: CSSProperties,
219
+ // active?: boolean
220
+ // }) => {
221
+ // const directoryMenusItem = props.type === 'DIRECTORY' ? [
222
+ // {
223
+ // label: <Space style={{ width: 100 }} size={5} onClick={() => onOpenDirectory(props.id, props.name)}><RightCircleOutlined/>打开目录</Space>,
224
+ // key: '0'
225
+ // },
226
+ // {
227
+ // type: 'divider'
228
+ // }
229
+ // ] : [
230
+ // {
231
+ // label: <Space style={{ width: 100 }} size={5} onClick={() => onDownload(props.name, props.src)}><CloudDownloadOutlined/>下载文件</Space>,
232
+ // key: '0'
233
+ // },
234
+ // {
235
+ // type: 'divider'
236
+ // }
237
+ // ];
238
+ // const menusItems = [
239
+ // ...directoryMenusItem,
240
+ // {
241
+ // label: <Space style={{ width: 100 }} size={5} onClick={() => onRename(props.id, props.name)}><HighlightOutlined/>重命名</Space>,
242
+ // key: '1'
243
+ // },
244
+ // {
245
+ // label: <Space style={{ width: 100 }} size={5} onClick={() => onCopy(props.id)}><CopyOutlined/>{props?.type === 'DIRECTORY' ? '复制目录' : '复制文件'}</Space>,
246
+ // key: '2'
247
+ // },
248
+ // {
249
+ // label: <Space style={{ width: 100 }} size={5} onClick={() => onMove(props.id)}><ScissorOutlined/>{props?.type === 'DIRECTORY' ? '移动目录' : '移动文件'}</Space>,
250
+ // key: '3'
251
+ // },
252
+ // {
253
+ // type: 'divider'
254
+ // },
255
+ // {
256
+ // label: <Space style={{ width: 100 }} size={5} onClick={() => onRemove(props.id)}><DeleteOutlined/>{props?.type === 'DIRECTORY' ? '删除目录' : '删除文件'}</Space>,
257
+ // key: '4',
258
+ // danger: true
259
+ // }
260
+ // ];
261
+ // return <Dropdown menu={{
262
+ // items: menusItems as never
263
+ // }} trigger={['contextMenu']}>
264
+ // <div
265
+ // style={{
266
+ // padding: '8px 12px',
267
+ // backgroundColor: props?.active ? '#e6f1ff' : undefined,
268
+ // display: 'block',
269
+ // cursor: 'pointer',
270
+ // userSelect: 'none',
271
+ // position: 'relative',
272
+ // ...props.style
273
+ // }}
274
+ // className={css`
275
+ // border: ${props?.active ? '1px solid #cddef5' : '1px solid #fff'};
276
+ //
277
+ // &:hover {
278
+ // background-color: #eef1f5;
279
+ // border: 1px solid ${props.active ? '#cddef5' : '#e6e6e6'};
280
+ // }
281
+ // `}
282
+ // onClick={() => {
283
+ // setTimeout(() => onActiveItem(props.id), 10);
284
+ // }}
285
+ // onDoubleClick={() => {
286
+ // if (props.type === 'DIRECTORY') {
287
+ // onOpenDirectory(props.id, props.name)
288
+ // .then();
289
+ // return;
290
+ // }
291
+ // onSelectItem(props.id, props.name, props.src)
292
+ // .then();
293
+ // }}>
294
+ // <img src={props?.type === 'DIRECTORY' ? IconDirectory : props?.src} alt="" style={{
295
+ // width: 56,
296
+ // height: 56,
297
+ // margin: 'auto',
298
+ // display: 'block',
299
+ // overflow: 'hidden',
300
+ // objectFit: props?.type === 'DIRECTORY' ? undefined : 'cover'
301
+ // }}/>
302
+ // <Typography.Text style={{
303
+ // width: 70,
304
+ // fontSize: token.fontSize - 2,
305
+ // display: 'block',
306
+ // textAlign: 'center',
307
+ // color: '#323232',
308
+ // marginTop: props?.type === 'DIRECTORY' ? undefined : 1
309
+ // }} ellipsis={true}>{props?.name}</Typography.Text>
310
+ // </div>
311
+ // </Dropdown>;
312
+ // };
313
+ // const handler: Handler<string[]> = {
314
+ // ok: (callback?: (params: string[]) => void) => {
315
+ // setPath(getPaths());
316
+ // setIsOpenModal(true);
317
+ // if (callbackRef !== undefined) {
318
+ // callbackRef.current = callback;
319
+ // }
320
+ // }
321
+ // };
322
+ // useEffect(() => {
323
+ // if ((path || []).length <= 0) {
324
+ // return;
325
+ // }
326
+ // refreshData(true);
327
+ // }, [path]);
328
+ // return [handler, <>
329
+ // <InlineContainer>
330
+ // <Modal
331
+ // width={565}
332
+ // footer={null}
333
+ // styles={{
334
+ // content: { padding: 0 }
335
+ // }}
336
+ // open={isOpenModal}
337
+ // maskClosable={false}
338
+ // onCancel={() => {
339
+ // if (isLoading) {
340
+ // return;
341
+ // }
342
+ // setIsOpenModal(false);
343
+ // }}
344
+ // title={<div style={{
345
+ // padding: '16px 0 0 0'
346
+ // }}>
347
+ // <img style={{
348
+ // marginInlineStart: 20,
349
+ // display: 'block',
350
+ // height: '17px',
351
+ // padding: '2px 0 0 0'
352
+ // }} alt="" src={IconMedia}/>
353
+ // </div>}>
354
+ // <Flux style={{
355
+ // marginBottom: 6,
356
+ // padding: '0 20px 10px 20px',
357
+ // borderBottom: '1px solid #f3f3f3',
358
+ // justifyContent: 'space-between'
359
+ // }}>
360
+ // <Breadcrumb
361
+ // items={path?.map((it, index) => {
362
+ // return {
363
+ // title: (index + 1 === path.length
364
+ // ? <Typography.Text style={{
365
+ // maxWidth: 70,
366
+ // fontSize: token.fontSize - 1
367
+ // }} ellipsis={true}>{it.name}</Typography.Text>
368
+ // : <a onClick={() => onBackDirectory(it.id)}><Typography.Text style={{
369
+ // maxWidth: 70,
370
+ // fontSize: token.fontSize - 1,
371
+ // color: 'rgba(0, 0, 0, 0.45)'
372
+ // }} ellipsis={true}>{it.name}</Typography.Text></a>)
373
+ // };
374
+ // })}
375
+ // />
376
+ // <Space>
377
+ // <Button type="primary" onClick={() => onPutFile()} size="small" style={{
378
+ // height: 24,
379
+ // fontSize: token.fontSize - 1
380
+ // }} loading={isLoading}>上传文件</Button>
381
+ // <Popconfirm
382
+ // title="请输入目录名称"
383
+ // description={<Input value={selectName} onChange={(e) => setSelectName(e.currentTarget.value)}></Input>}
384
+ // onCancel={() => setSelectName('')}
385
+ // onConfirm={() => onCreateDirectory(selectName)}
386
+ // okText="确定"
387
+ // cancelText="取消"
388
+ // >
389
+ // <Button size="small" style={{
390
+ // height: 24,
391
+ // fontSize: token.fontSize - 1
392
+ // }} loading={isLoading}>新建目录</Button>
393
+ // </Popconfirm>
394
+ // </Space>
395
+ // </Flux>
396
+ // <Spin spinning={isLoading}>
397
+ // <div style={{
398
+ // padding: '6px 0 24px 0',
399
+ // height: 333,
400
+ // maxHeight: 333,
401
+ // overflowY: 'auto',
402
+ // overflowX: 'hidden'
403
+ // }}>
404
+ // {dataList?.map((group, index) => (
405
+ // <div key={index} style={{
406
+ // padding: '0 20px 10px 20px',
407
+ // display: 'flex'
408
+ // }}>
409
+ // {group?.map((item) => (
410
+ // <Item
411
+ // id={item.id}
412
+ // key={item.id}
413
+ // active={item.active}
414
+ // style={{ marginRight: 10 }}
415
+ // type={item.type}
416
+ // src={item.url}
417
+ // name={item.name}/>
418
+ // ))}
419
+ // </div>
420
+ // ))}
421
+ // </div>
422
+ // </Spin>
423
+ // </Modal>
424
+ // </InlineContainer>
425
+ // <Modal
426
+ // title="重命名"
427
+ // width={340}
428
+ // open={isOpenRenameModal}
429
+ // onOk={() => onConfirmRename()}
430
+ // onCancel={() => setIsOpenRenameModal(false)}
431
+ // okText="确定"
432
+ // cancelText="取消">
433
+ // <Input value={selectName} onChange={(e) => setSelectName(e.currentTarget.value)}></Input>
434
+ // </Modal>
435
+ // <Modal
436
+ // title={<><ExclamationCircleFilled style={{
437
+ // marginRight: 6,
438
+ // fontSize: token.fontSize + 3,
439
+ // color: '#faad14'
440
+ // }}/>是否确认删除?</>}
441
+ // width={400}
442
+ // open={isOpenConfirmModal}
443
+ // onOk={() => onConfirmRemove()}
444
+ // onCancel={() => setIsOpenConfirmModal(false)}
445
+ // okText="确定"
446
+ // cancelText="取消">
447
+ // 删除操作不能回复,确定要删除选中的文件或文件夹吗?
448
+ // </Modal>
449
+ // <DirectorySelect
450
+ // open={isOpenMoveModal}
451
+ // onCancel={() => {
452
+ // refreshData();
453
+ // setIsOpenMoveModal(false);
454
+ // }}
455
+ // request={request?.directory}
456
+ // onOk={(value) => onConfirmMove(value)}>
457
+ // </DirectorySelect>
458
+ // {contextHolder}
459
+ // </>];
460
+ // }
461
+ // }
File without changes