beer-assembly-biz 1.1.2-alpha.8 → 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.
- package/UserModals.d.ts +7 -3
- package/UserModals.js +6 -0
- package/auth/AuthPassword.d.ts +2 -3
- package/auth/AuthPassword.js +5 -5
- package/auth/AuthStyle01.d.ts +3 -4
- package/auth/AuthStyle01.js +4 -5
- package/auth/AuthStyle02.d.ts +3 -4
- package/auth/AuthStyle02.js +4 -5
- package/auth/AuthThirdPartyAuth.d.ts +2 -3
- package/auth/AuthThirdPartyAuth.js +1 -2
- package/content/ParentContext.d.ts +4 -2
- package/content/ParentContext.js +4 -2
- package/content/PermissionContext.d.ts +4 -2
- package/content/PermissionContext.js +4 -2
- package/icon/icon/directory.svg +12 -0
- package/icon/icon/empty.svg +43 -0
- package/icon/icon/media.png +0 -0
- package/icon/icon/volc.svg +96 -0
- package/images/images/assets_background_01.png +0 -0
- package/images/images/avatar.png +0 -0
- package/images/images/layout_01.png +0 -0
- package/images/images/layout_02.png +0 -0
- package/images/images/layout_03.png +0 -0
- package/index.d.ts +14 -0
- package/index.js +14 -0
- package/{AppLayout.d.ts → layout/AppLayout.d.ts} +4 -2
- package/{AppLayout.js → layout/AppLayout.js} +4 -2
- package/{BackPageContainer.d.ts → layout/BackPageContainer.d.ts} +4 -2
- package/{BackPageContainer.js → layout/BackPageContainer.js} +4 -2
- package/{MyPageContainer.d.ts → layout/MyPageContainer.d.ts} +4 -2
- package/{MyPageContainer.js → layout/MyPageContainer.js} +5 -3
- package/media/MediaModals.d.ts +0 -0
- package/media/MediaModals.js +461 -0
- package/net-disk/DirectoryMenusPanel.d.ts +0 -0
- package/net-disk/DirectoryMenusPanel.js +337 -0
- package/net-disk/DirectorySelect.d.ts +0 -0
- package/net-disk/DirectorySelect.js +240 -0
- package/net-disk/FileItemList.d.ts +0 -0
- package/net-disk/FileItemList.js +126 -0
- package/net-disk/FileItemTable.d.ts +0 -0
- package/net-disk/FileItemTable.js +422 -0
- package/net-disk/FileNavigation.d.ts +0 -0
- package/net-disk/FileNavigation.js +43 -0
- package/net-disk/NetDisk.d.ts +0 -0
- package/net-disk/NetDisk.js +36 -0
- package/net-disk/NetDiskModals.d.ts +0 -0
- package/net-disk/NetDiskModals.js +40 -0
- package/package.json +29 -19
- package/{Permission.d.ts → permission/Permission.d.ts} +4 -2
- package/{Permission.js → permission/Permission.js} +5 -3
- package/promises.d.ts +3 -0
- package/promises.js +3 -0
- package/rich/AIEditor.css +1647 -0
- package/rich/AIEditor.d.ts +51 -0
- package/rich/AIEditor.js +90 -0
- package/slider/SliderCode.d.ts +23 -0
- package/slider/SliderCode.js +203 -0
- package/type.d.ts +3 -0
- package/type.js +1 -0
- package/InlineContainer.d.ts +0 -6
- package/InlineContainer.js +0 -28
- package/MediaModals.d.ts +0 -32
- package/MediaModals.js +0 -373
- package/NetDiskModals.d.ts +0 -15
- package/NetDiskModals.js +0 -28
- package/SubMenusContainer.d.ts +0 -26
- package/SubMenusContainer.js +0 -64
- package/Upgrade.d.ts +0 -7
- package/Upgrade.js +0 -46
- package/fonts/harmony/HarmonyOS_Medium.a.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.a0.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.a1.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.aa.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ab.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ac.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ad.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ae.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.af.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ag.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ah.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ai.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.aj.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ak.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.al.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.am.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.an.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ao.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ap.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.aq.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ar.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.as.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.at.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.au.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.av.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.aw.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ax.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.ay.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.az.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.b.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.c.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.d.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.e.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.f.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.g.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.h.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.i.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.j.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.k.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.l.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.m.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.n.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.o.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.p.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.q.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.r.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.s.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.t.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.u.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.v.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.w.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.x.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.y.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Medium.z.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.a.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.a0.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.a1.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.aa.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ab.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ac.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ad.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ae.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.af.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ag.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ah.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ai.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.aj.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ak.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.al.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.am.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.an.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ao.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ap.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.aq.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ar.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.as.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.at.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.au.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.av.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.aw.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ax.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.ay.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.az.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.b.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.c.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.d.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.e.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.f.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.g.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.h.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.i.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.j.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.k.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.l.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.m.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.n.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.o.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.p.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.q.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.r.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.s.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.t.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.u.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.v.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.w.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.x.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.y.woff2 +0 -0
- package/fonts/harmony/HarmonyOS_Regular.z.woff2 +0 -0
- package/fonts/harmony/medium.css +0 -485
- package/fonts/harmony/regular.css +0 -485
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import React, { CSSProperties, FC, ReactNode, useEffect, useState } from 'react';
|
|
3
|
+
// import { App, ConfigProvider, Dropdown, Select, Skeleton, theme, Tree } from 'antd';
|
|
4
|
+
// import { css } from '@emotion/css';
|
|
5
|
+
// import { CaretDownOutlined, MenuOutlined, PlusOutlined } from '@ant-design/icons';
|
|
6
|
+
// import type { ItemType } from 'antd/es/menu/interface';
|
|
7
|
+
// import Flux from './Flux';
|
|
8
|
+
//
|
|
9
|
+
// export declare type Module = {
|
|
10
|
+
// code: string
|
|
11
|
+
// name: string
|
|
12
|
+
// };
|
|
13
|
+
// export declare type ModuleItem = {
|
|
14
|
+
// code?: string | undefined
|
|
15
|
+
// name?: string | ReactNode | undefined
|
|
16
|
+
// children?: ModuleItem[] | undefined
|
|
17
|
+
// };
|
|
18
|
+
// export declare type DirectoryMenusPanel = {
|
|
19
|
+
// /**
|
|
20
|
+
// * 宽度.
|
|
21
|
+
// */
|
|
22
|
+
// width?: number | undefined
|
|
23
|
+
// /**
|
|
24
|
+
// * 字体大小.
|
|
25
|
+
// */
|
|
26
|
+
// fontSize?: number | undefined
|
|
27
|
+
// /**
|
|
28
|
+
// * 样式.
|
|
29
|
+
// */
|
|
30
|
+
// style?: CSSProperties | undefined
|
|
31
|
+
// /**
|
|
32
|
+
// * 模块列表.
|
|
33
|
+
// */
|
|
34
|
+
// appList?: Module[] | undefined
|
|
35
|
+
// /**
|
|
36
|
+
// * 模块菜单明细.
|
|
37
|
+
// */
|
|
38
|
+
// appItems?: ModuleItem[] | undefined
|
|
39
|
+
// /**
|
|
40
|
+
// * 创建事件.
|
|
41
|
+
// */
|
|
42
|
+
// onCreate?: () => void | undefined
|
|
43
|
+
// /**
|
|
44
|
+
// * 模块切换事件.
|
|
45
|
+
// * @param app 模块.
|
|
46
|
+
// */
|
|
47
|
+
// onAppChange?: (app: Module | undefined) => Promise<void> | undefined
|
|
48
|
+
// /**
|
|
49
|
+
// * 模块明细切换事件.
|
|
50
|
+
// * @param code 明细.
|
|
51
|
+
// */
|
|
52
|
+
// onAppItemChange?: (code: string) => Promise<void> | undefined
|
|
53
|
+
// /**
|
|
54
|
+
// * 目录右侧菜单.
|
|
55
|
+
// */
|
|
56
|
+
// directoryMenus?: ItemType[] | undefined
|
|
57
|
+
// /**
|
|
58
|
+
// * 明细右侧菜单.
|
|
59
|
+
// */
|
|
60
|
+
// itemMenus?: ItemType[] | undefined
|
|
61
|
+
// /**
|
|
62
|
+
// * 是否允许创建.
|
|
63
|
+
// */
|
|
64
|
+
// isAllowCreate?: boolean | undefined
|
|
65
|
+
// };
|
|
66
|
+
// export const Component: FC<DirectoryMenusPanel> = (props) => {
|
|
67
|
+
// const { token } = theme.useToken();
|
|
68
|
+
//
|
|
69
|
+
// const [appList, setAppList] = useState<Module[]>([]);
|
|
70
|
+
// const [app, setApp] = useState<string>('');
|
|
71
|
+
// const [appModuleLoading, setAppModuleLoading] = useState(false);
|
|
72
|
+
// const [appModuleItems, setAppModuleItems] = useState<ModuleItem[]>([]);
|
|
73
|
+
//
|
|
74
|
+
// const TreeTitle = (titleProps: { children?: ReactNode | undefined }) => {
|
|
75
|
+
// return <Flux className={css`
|
|
76
|
+
// & .menus {
|
|
77
|
+
// display: none;
|
|
78
|
+
// }
|
|
79
|
+
//
|
|
80
|
+
// &:hover {
|
|
81
|
+
// .menus {
|
|
82
|
+
// display: flex;
|
|
83
|
+
// }
|
|
84
|
+
// }
|
|
85
|
+
// `}>
|
|
86
|
+
// {titleProps.children}
|
|
87
|
+
// {props?.directoryMenus === undefined || props?.directoryMenus.length <= 0 ? undefined : <Dropdown menu={{
|
|
88
|
+
// items: props?.directoryMenus
|
|
89
|
+
// }} trigger={['click']}>
|
|
90
|
+
// <div className="menus" style={{
|
|
91
|
+
// alignItems: 'center',
|
|
92
|
+
// justifyContent: 'center',
|
|
93
|
+
// position: 'absolute',
|
|
94
|
+
// top: 0,
|
|
95
|
+
// right: 4,
|
|
96
|
+
// bottom: 0,
|
|
97
|
+
// width: 30
|
|
98
|
+
// }} onClick={(e) => {
|
|
99
|
+
// e.stopPropagation();
|
|
100
|
+
// }}>
|
|
101
|
+
// <div style={{
|
|
102
|
+
// width: 24,
|
|
103
|
+
// maxWidth: 24,
|
|
104
|
+
// height: 24,
|
|
105
|
+
// display: 'flex',
|
|
106
|
+
// alignItems: 'center',
|
|
107
|
+
// justifyContent: 'center',
|
|
108
|
+
// fontSize: token.fontSize + 1
|
|
109
|
+
// }}>
|
|
110
|
+
// <MenuOutlined style={{ display: 'block' }}/>
|
|
111
|
+
// </div>
|
|
112
|
+
// </div>
|
|
113
|
+
// </Dropdown>}
|
|
114
|
+
// </Flux>;
|
|
115
|
+
// };
|
|
116
|
+
// const TreeLabel = (labelProps: { children?: ReactNode | undefined }) => {
|
|
117
|
+
// return <Flux style={{
|
|
118
|
+
// marginLeft: 18,
|
|
119
|
+
// overflow: 'hidden',
|
|
120
|
+
// position: 'relative'
|
|
121
|
+
// }} className={css`
|
|
122
|
+
// & .menus {
|
|
123
|
+
// display: none;
|
|
124
|
+
// }
|
|
125
|
+
//
|
|
126
|
+
// &:hover {
|
|
127
|
+
// .menus {
|
|
128
|
+
// display: flex;
|
|
129
|
+
// }
|
|
130
|
+
// }
|
|
131
|
+
// `}>
|
|
132
|
+
// {labelProps.children}
|
|
133
|
+
// {props?.itemMenus === undefined || props?.itemMenus.length <= 0 ? undefined : <Dropdown menu={{
|
|
134
|
+
// items: props?.itemMenus
|
|
135
|
+
// }} trigger={['click']}>
|
|
136
|
+
// <div className="menus" style={{
|
|
137
|
+
// alignItems: 'center',
|
|
138
|
+
// justifyContent: 'center',
|
|
139
|
+
// position: 'absolute',
|
|
140
|
+
// top: 0,
|
|
141
|
+
// right: 0,
|
|
142
|
+
// bottom: 0,
|
|
143
|
+
// width: 30
|
|
144
|
+
// }}>
|
|
145
|
+
// <div style={{
|
|
146
|
+
// width: 24,
|
|
147
|
+
// maxWidth: 24,
|
|
148
|
+
// height: 24,
|
|
149
|
+
// display: 'flex',
|
|
150
|
+
// alignItems: 'center',
|
|
151
|
+
// justifyContent: 'center',
|
|
152
|
+
// fontSize: token.fontSize + 1
|
|
153
|
+
// }}>
|
|
154
|
+
// <MenuOutlined style={{ display: 'block' }}/>
|
|
155
|
+
// </div>
|
|
156
|
+
// </div>
|
|
157
|
+
// </Dropdown>}
|
|
158
|
+
// </Flux>;
|
|
159
|
+
// };
|
|
160
|
+
//
|
|
161
|
+
// const onConfirmApp = (code: string) => {
|
|
162
|
+
// setApp(code);
|
|
163
|
+
// };
|
|
164
|
+
// const onSelectItem = (itemCode: string) => {
|
|
165
|
+
// props?.onAppItemChange?.(itemCode);
|
|
166
|
+
// };
|
|
167
|
+
//
|
|
168
|
+
// useEffect(() => {
|
|
169
|
+
// if (app === undefined || app === '') {
|
|
170
|
+
// return;
|
|
171
|
+
// }
|
|
172
|
+
// setAppModuleLoading(true);
|
|
173
|
+
// const change = props?.onAppChange;
|
|
174
|
+
// if (change === undefined) {
|
|
175
|
+
// setAppModuleLoading(false);
|
|
176
|
+
// return;
|
|
177
|
+
// }
|
|
178
|
+
// change(appList.find(it => it.code === app))
|
|
179
|
+
// ?.then(() => setAppModuleLoading(false));
|
|
180
|
+
// }, [app]);
|
|
181
|
+
// useEffect(() => {
|
|
182
|
+
// setAppList(props.appList || []);
|
|
183
|
+
// const code = props?.appList?.[0]?.code;
|
|
184
|
+
// if (code !== undefined) {
|
|
185
|
+
// setApp(code);
|
|
186
|
+
// }
|
|
187
|
+
// }, [props.appList]);
|
|
188
|
+
// useEffect(() => {
|
|
189
|
+
// setAppModuleItems(props?.appItems?.map((it: any) => {
|
|
190
|
+
// it.title = <TreeTitle>{it.name}</TreeTitle>;
|
|
191
|
+
// it.key = it.code;
|
|
192
|
+
// it.children = it?.children?.map((c: any) => {
|
|
193
|
+
// return {
|
|
194
|
+
// ...c,
|
|
195
|
+
// key: c.code,
|
|
196
|
+
// title: <TreeLabel>{c.name}</TreeLabel>
|
|
197
|
+
// };
|
|
198
|
+
// });
|
|
199
|
+
// return it;
|
|
200
|
+
// }) || []);
|
|
201
|
+
// }, [props.appItems]);
|
|
202
|
+
// return <App style={{
|
|
203
|
+
// width: props.width || 320,
|
|
204
|
+
// minWidth: props.width || 320,
|
|
205
|
+
// maxWidth: props.width || 320,
|
|
206
|
+
// height: '100%',
|
|
207
|
+
// background: '#fff',
|
|
208
|
+
// overflow: 'hidden',
|
|
209
|
+
// display: 'flex',
|
|
210
|
+
// flexDirection: 'column',
|
|
211
|
+
// ...(props.style || {})
|
|
212
|
+
// }}>
|
|
213
|
+
// <ConfigProvider
|
|
214
|
+
// theme={{
|
|
215
|
+
// token: {
|
|
216
|
+
// fontSize: props?.fontSize || 13
|
|
217
|
+
// },
|
|
218
|
+
// components: {
|
|
219
|
+
// Tree: {
|
|
220
|
+
// motion: false,
|
|
221
|
+
// directoryNodeSelectedBg: '#eee',
|
|
222
|
+
// directoryNodeSelectedColor: '#333',
|
|
223
|
+
// titleHeight: 32,
|
|
224
|
+
// padding: 0
|
|
225
|
+
// }
|
|
226
|
+
// }
|
|
227
|
+
// }}>
|
|
228
|
+
// <div style={{
|
|
229
|
+
// padding: '10px 16px',
|
|
230
|
+
// borderBottom: '1px solid #eee',
|
|
231
|
+
// fontSize: token.fontSize + 2,
|
|
232
|
+
// fontWeight: 500
|
|
233
|
+
// }}>
|
|
234
|
+
// <Flux style={{
|
|
235
|
+
// height: 32
|
|
236
|
+
// }} size={10}>
|
|
237
|
+
// <Select
|
|
238
|
+
// variant="filled"
|
|
239
|
+
// placeholder="选择模块"
|
|
240
|
+
// className={css`
|
|
241
|
+
// flex: 1;
|
|
242
|
+
//
|
|
243
|
+
// .ant-select-selection-item {
|
|
244
|
+
// font-size: 14px;
|
|
245
|
+
// font-weight: 500;
|
|
246
|
+
// }`}
|
|
247
|
+
// value={app}
|
|
248
|
+
// onChange={(e) => onConfirmApp(e)}
|
|
249
|
+
// options={appList.map(it => {
|
|
250
|
+
// return {
|
|
251
|
+
// value: it.code,
|
|
252
|
+
// label: it.name
|
|
253
|
+
// };
|
|
254
|
+
// })}
|
|
255
|
+
// />
|
|
256
|
+
// {props?.isAllowCreate ? <a className={css`
|
|
257
|
+
// background: rgba(0, 0, 0, 0.04);
|
|
258
|
+
// width: 30px;
|
|
259
|
+
// height: 30px;
|
|
260
|
+
// display: flex;
|
|
261
|
+
// align-items: center;
|
|
262
|
+
// justify-content: center;
|
|
263
|
+
// color: #333;
|
|
264
|
+
// border-radius: ${token.borderRadius}px;
|
|
265
|
+
// overflow: hidden;
|
|
266
|
+
// font-size: 16px;
|
|
267
|
+
//
|
|
268
|
+
// &:hover {
|
|
269
|
+
// color: #333;
|
|
270
|
+
// background: rgba(0, 0, 0, 0.08);
|
|
271
|
+
// }
|
|
272
|
+
// `} onClick={() => props?.onCreate?.()}>
|
|
273
|
+
// <PlusOutlined/>
|
|
274
|
+
// </a> : undefined}
|
|
275
|
+
// </Flux>
|
|
276
|
+
// </div>
|
|
277
|
+
// {appModuleLoading ? <Skeleton style={{
|
|
278
|
+
// minHeight: 400,
|
|
279
|
+
// padding: '5px 16px'
|
|
280
|
+
// }} active/> : <div
|
|
281
|
+
// style={{
|
|
282
|
+
// flexGrow: 1,
|
|
283
|
+
// overflowX: 'hidden',
|
|
284
|
+
// overflowY: 'auto'
|
|
285
|
+
// }}
|
|
286
|
+
// className={css`
|
|
287
|
+
// .ant-tree-treenode {
|
|
288
|
+
// &:before {
|
|
289
|
+
// bottom: 0 !important;
|
|
290
|
+
// }
|
|
291
|
+
//
|
|
292
|
+
// padding: 1px 0 !important;
|
|
293
|
+
// margin: 0 !important;
|
|
294
|
+
// }
|
|
295
|
+
//
|
|
296
|
+
// .ant-tree-node-content-wrapper {
|
|
297
|
+
// padding: 0 4px !important;
|
|
298
|
+
// }
|
|
299
|
+
//
|
|
300
|
+
// .ant-tree-switcher {
|
|
301
|
+
// &:before {
|
|
302
|
+
// display: none;
|
|
303
|
+
// }
|
|
304
|
+
//
|
|
305
|
+
// width: 18px !important;
|
|
306
|
+
// margin: 0 0 0 10px !important;
|
|
307
|
+
// }
|
|
308
|
+
//
|
|
309
|
+
// .ant-tree-switcher-noop {
|
|
310
|
+
// width: 0 !important;
|
|
311
|
+
// }
|
|
312
|
+
//
|
|
313
|
+
// .ant-tree-indent {
|
|
314
|
+
// width: 0 !important;
|
|
315
|
+
// }
|
|
316
|
+
// `}>
|
|
317
|
+
// <Tree.DirectoryTree
|
|
318
|
+
// style={{
|
|
319
|
+
// background: '#fff'
|
|
320
|
+
// }}
|
|
321
|
+
// treeData={appModuleItems as never}
|
|
322
|
+
// icon={false}
|
|
323
|
+
// showIcon={false}
|
|
324
|
+
// blockNode={true}
|
|
325
|
+
// switcherIcon={<CaretDownOutlined style={{
|
|
326
|
+
// fontSize: token.fontSize - 1
|
|
327
|
+
// }}/>}
|
|
328
|
+
// onSelect={(e) => {
|
|
329
|
+
// onSelectItem(e.toString());
|
|
330
|
+
// }}
|
|
331
|
+
// />
|
|
332
|
+
// </div>}
|
|
333
|
+
// </ConfigProvider>
|
|
334
|
+
// </App>;
|
|
335
|
+
// };
|
|
336
|
+
//
|
|
337
|
+
// export default Component;
|
|
File without changes
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import React, { FC, useEffect, useState } from 'react';
|
|
3
|
+
// import { Modal, Space, Spin, theme, Typography } from 'antd';
|
|
4
|
+
// import { css } from '@emotion/css';
|
|
5
|
+
// import { RootPath } from './FileItemTable';
|
|
6
|
+
// import FileNavigation from './FileNavigation';
|
|
7
|
+
// import IconDirectory from './icon/directory.svg';
|
|
8
|
+
// import IconConfirm from './icon/select_confirm.svg';
|
|
9
|
+
// import IconCancel from './icon/close.svg';
|
|
10
|
+
//
|
|
11
|
+
// const { Text } = Typography;
|
|
12
|
+
// export declare type Directory = {
|
|
13
|
+
// id: string
|
|
14
|
+
// name: string
|
|
15
|
+
// }
|
|
16
|
+
// export declare type DirectorySelectProps = {
|
|
17
|
+
// phrase?: string | undefined
|
|
18
|
+
// open?: boolean | undefined
|
|
19
|
+
// isCreate?: boolean | undefined
|
|
20
|
+
// request?: {
|
|
21
|
+
// getDirectoryList?: (parentId: string | undefined) => Promise<Directory[]> | undefined;
|
|
22
|
+
// create?: (parentId: string, name: string) => Promise<boolean> | undefined;
|
|
23
|
+
// } | undefined
|
|
24
|
+
// onCancel?: () => void | undefined
|
|
25
|
+
// onOk?: (value: string) => Promise<void> | undefined
|
|
26
|
+
// };
|
|
27
|
+
// const App: FC<DirectorySelectProps> = (props) => {
|
|
28
|
+
// const { token } = theme.useToken();
|
|
29
|
+
// const inputRef = React.createRef<HTMLInputElement>();
|
|
30
|
+
// const [loading, setLoading] = useState(false);
|
|
31
|
+
// const [isCreate, setIsCreate] = useState(false);
|
|
32
|
+
// const [directoryList, setDirectoryList] = useState([] as Directory[]);
|
|
33
|
+
// const [modal, setModal] = useState(false);
|
|
34
|
+
// const [rootPaths, setRootPaths] = useState([] as RootPath[]);
|
|
35
|
+
// const [directoryName, setDirectoryName] = useState('');
|
|
36
|
+
// const Directory = () => {
|
|
37
|
+
// return <div style={{
|
|
38
|
+
// width: 20,
|
|
39
|
+
// height: 20,
|
|
40
|
+
// marginRight: 6,
|
|
41
|
+
// display: 'flex',
|
|
42
|
+
// alignItems: 'center'
|
|
43
|
+
// }}>
|
|
44
|
+
// <img src={IconDirectory} style={{
|
|
45
|
+
// width: 18,
|
|
46
|
+
// display: 'block'
|
|
47
|
+
// }} alt=""/>
|
|
48
|
+
// </div>;
|
|
49
|
+
// };
|
|
50
|
+
// const requestDirectory = async () => {
|
|
51
|
+
// setLoading(true);
|
|
52
|
+
// const result = await props?.request?.getDirectoryList?.(rootPaths[rootPaths.length - 1]?.id);
|
|
53
|
+
// setLoading(false);
|
|
54
|
+
// if (result !== undefined) {
|
|
55
|
+
// setDirectoryList(result);
|
|
56
|
+
// }
|
|
57
|
+
// };
|
|
58
|
+
// const onSwitchPath = async (_id: string, index: number) => {
|
|
59
|
+
// setRootPaths(rootPaths.slice(0, index + 1));
|
|
60
|
+
// };
|
|
61
|
+
// const onOpen = async (fileId: string, name: string) => {
|
|
62
|
+
// setRootPaths([...rootPaths, {
|
|
63
|
+
// id: fileId,
|
|
64
|
+
// title: name
|
|
65
|
+
// }]);
|
|
66
|
+
// };
|
|
67
|
+
// const onConfirm = async () => {
|
|
68
|
+
// props?.onOk?.(rootPaths[rootPaths.length - 1]?.id);
|
|
69
|
+
// };
|
|
70
|
+
// const onCancelCreate = async () => {
|
|
71
|
+
// setIsCreate(false);
|
|
72
|
+
// };
|
|
73
|
+
// const onConfirmCreate = async () => {
|
|
74
|
+
// setLoading(true);
|
|
75
|
+
// const result = await props?.request?.create?.(rootPaths[rootPaths.length - 1]?.id || '', directoryName);
|
|
76
|
+
// setLoading(false);
|
|
77
|
+
// if (result !== undefined && result) {
|
|
78
|
+
// await requestDirectory();
|
|
79
|
+
// setIsCreate(false);
|
|
80
|
+
// }
|
|
81
|
+
// };
|
|
82
|
+
// useEffect(() => {
|
|
83
|
+
// inputRef?.current?.focus();
|
|
84
|
+
// }, [isCreate]);
|
|
85
|
+
// useEffect(() => {
|
|
86
|
+
// if (props?.open === true) {
|
|
87
|
+
// setRootPaths([{
|
|
88
|
+
// id: '',
|
|
89
|
+
// title: '根目录'
|
|
90
|
+
// }]);
|
|
91
|
+
// }
|
|
92
|
+
// setModal(props?.open || false);
|
|
93
|
+
// }, [props.open]);
|
|
94
|
+
// useEffect(() => {
|
|
95
|
+
// if (props?.open === true) {
|
|
96
|
+
// requestDirectory()
|
|
97
|
+
// .then();
|
|
98
|
+
// }
|
|
99
|
+
// }, [rootPaths]);
|
|
100
|
+
// return <>
|
|
101
|
+
// <Modal open={modal} width={380} title={<><span style={{ marginInlineStart: 10 }}>{props?.phrase || '移动'}到</span></>} onCancel={props?.onCancel} styles={{
|
|
102
|
+
// content: {
|
|
103
|
+
// padding: '15px 12px 15px 12px'
|
|
104
|
+
// },
|
|
105
|
+
// body: {
|
|
106
|
+
// padding: '0',
|
|
107
|
+
// borderBottom: '1px solid #eee',
|
|
108
|
+
// height: 356
|
|
109
|
+
// },
|
|
110
|
+
// footer: {
|
|
111
|
+
// textAlign: 'inherit'
|
|
112
|
+
// }
|
|
113
|
+
// }} onOk={onConfirm} okText={(props?.phrase || '移动') + '到此'} maskClosable={false} footer={(node) => {
|
|
114
|
+
// return <div style={{
|
|
115
|
+
// display: 'flex',
|
|
116
|
+
// alignItems: 'center',
|
|
117
|
+
// marginInlineStart: 10,
|
|
118
|
+
// userSelect: 'none'
|
|
119
|
+
// }}>
|
|
120
|
+
// <div style={{
|
|
121
|
+
// width: '100%',
|
|
122
|
+
// flex: 1
|
|
123
|
+
// }}>
|
|
124
|
+
// {props?.isCreate === false ? undefined : <a onClick={() => {
|
|
125
|
+
// setDirectoryName('');
|
|
126
|
+
// setIsCreate(true);
|
|
127
|
+
// }}>新建文件夹</a>}
|
|
128
|
+
// </div>
|
|
129
|
+
// <Space>
|
|
130
|
+
// {node}
|
|
131
|
+
// </Space>
|
|
132
|
+
// </div>;
|
|
133
|
+
// }}>
|
|
134
|
+
// <div>
|
|
135
|
+
// <FileNavigation style={{
|
|
136
|
+
// marginBottom: 4,
|
|
137
|
+
// marginLeft: 10,
|
|
138
|
+
// marginTop: 4
|
|
139
|
+
// }} paths={rootPaths} onSwitchPath={onSwitchPath}/>
|
|
140
|
+
// <Spin spinning={loading}>
|
|
141
|
+
// <div style={{
|
|
142
|
+
// maxHeight: 320,
|
|
143
|
+
// overflow: 'auto',
|
|
144
|
+
// marginBottom: 5
|
|
145
|
+
// }} className={css`
|
|
146
|
+
// .item:hover {
|
|
147
|
+
// background: #efefef;
|
|
148
|
+
// }
|
|
149
|
+
// `}>
|
|
150
|
+
// {isCreate ? <>
|
|
151
|
+
// <div className="item" style={{
|
|
152
|
+
// height: 34,
|
|
153
|
+
// padding: '0 12px',
|
|
154
|
+
// display: 'flex',
|
|
155
|
+
// marginBottom: 2,
|
|
156
|
+
// alignItems: 'center',
|
|
157
|
+
// cursor: 'pointer',
|
|
158
|
+
// position: 'relative',
|
|
159
|
+
// userSelect: 'none',
|
|
160
|
+
// borderRadius: token.borderRadius,
|
|
161
|
+
// overflow: 'hidden'
|
|
162
|
+
// }}>
|
|
163
|
+
// <Directory/>
|
|
164
|
+
// <div style={{ marginRight: '10px' }}>
|
|
165
|
+
// <input
|
|
166
|
+
// ref={inputRef as never}
|
|
167
|
+
// style={{
|
|
168
|
+
// outline: 'none',
|
|
169
|
+
// border: '1px solid #d3d3d3',
|
|
170
|
+
// padding: '3px 5px',
|
|
171
|
+
// borderRadius: 2
|
|
172
|
+
// }}
|
|
173
|
+
// className={css`
|
|
174
|
+
// :focus {
|
|
175
|
+
// outline: 2px solid ${token.colorPrimary} !important;
|
|
176
|
+
// border-color: ${token.colorPrimary};
|
|
177
|
+
// }
|
|
178
|
+
// `}
|
|
179
|
+
// type="text"
|
|
180
|
+
// value={directoryName}
|
|
181
|
+
// onChange={(e) => setDirectoryName(e.target.value)}/>
|
|
182
|
+
// </div>
|
|
183
|
+
// <div style={{
|
|
184
|
+
// backgroundImage: `url(${IconConfirm})`,
|
|
185
|
+
// backgroundSize: '22px 22px',
|
|
186
|
+
// backgroundPosition: 'center',
|
|
187
|
+
// backgroundRepeat: 'no-repeat',
|
|
188
|
+
// width: 22,
|
|
189
|
+
// height: 22,
|
|
190
|
+
// marginRight: 8,
|
|
191
|
+
// borderRadius: 10,
|
|
192
|
+
// overflow: 'hidden'
|
|
193
|
+
// }} className={css`
|
|
194
|
+
// &:hover {
|
|
195
|
+
// background: #ddd;
|
|
196
|
+
// }
|
|
197
|
+
// `} onClick={onConfirmCreate}/>
|
|
198
|
+
// <div style={{
|
|
199
|
+
// backgroundImage: `url(${IconCancel})`,
|
|
200
|
+
// backgroundSize: '16px 16px',
|
|
201
|
+
// backgroundPosition: 'center',
|
|
202
|
+
// backgroundRepeat: 'no-repeat',
|
|
203
|
+
// width: 22,
|
|
204
|
+
// height: 22,
|
|
205
|
+
// borderRadius: 10,
|
|
206
|
+
// overflow: 'hidden'
|
|
207
|
+
// }} className={css`
|
|
208
|
+
// &:hover {
|
|
209
|
+
// background: #ddd;
|
|
210
|
+
// }
|
|
211
|
+
// `} onClick={onCancelCreate}/>
|
|
212
|
+
// </div>
|
|
213
|
+
// </> : undefined}
|
|
214
|
+
// {directoryList.map(it => (
|
|
215
|
+
// <div key={it.id} className="item" style={{
|
|
216
|
+
// height: 30,
|
|
217
|
+
// padding: '0 12px',
|
|
218
|
+
// display: 'flex',
|
|
219
|
+
// marginBottom: 2,
|
|
220
|
+
// alignItems: 'center',
|
|
221
|
+
// cursor: 'pointer',
|
|
222
|
+
// position: 'relative',
|
|
223
|
+
// userSelect: 'none',
|
|
224
|
+
// borderRadius: token.borderRadius,
|
|
225
|
+
// overflow: 'hidden'
|
|
226
|
+
// }} onDoubleClick={() => onOpen(it.id, it.name)}>
|
|
227
|
+
// <Directory/>
|
|
228
|
+
// <Text style={{
|
|
229
|
+
// width: '100%',
|
|
230
|
+
// fontSize: token.fontSize
|
|
231
|
+
// }} ellipsis={true}>{it.name}</Text>
|
|
232
|
+
// </div>
|
|
233
|
+
// ))}
|
|
234
|
+
// </div>
|
|
235
|
+
// </Spin>
|
|
236
|
+
// </div>
|
|
237
|
+
// </Modal>
|
|
238
|
+
// </>;
|
|
239
|
+
// };
|
|
240
|
+
// export default App;
|
|
File without changes
|