beer-assembly-biz 1.1.2-alpha.9 → 1.1.3-alpha.10

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 (183) hide show
  1. package/UploadModals.d.ts +12 -0
  2. package/UploadModals.js +233 -0
  3. package/UserModals.d.ts +7 -3
  4. package/UserModals.js +6 -0
  5. package/auth/AuthPassword.d.ts +2 -3
  6. package/auth/AuthPassword.js +5 -5
  7. package/auth/AuthStyle01.d.ts +3 -4
  8. package/auth/AuthStyle01.js +4 -5
  9. package/auth/AuthStyle02.d.ts +3 -4
  10. package/auth/AuthStyle02.js +4 -5
  11. package/auth/AuthThirdPartyAuth.d.ts +2 -3
  12. package/auth/AuthThirdPartyAuth.js +1 -2
  13. package/content/ParentContext.d.ts +4 -2
  14. package/content/ParentContext.js +4 -2
  15. package/content/PermissionContext.d.ts +4 -2
  16. package/content/PermissionContext.js +4 -2
  17. package/icon/icon/directory.svg +12 -0
  18. package/icon/icon/empty.svg +43 -0
  19. package/icon/icon/media.png +0 -0
  20. package/icon/icon/volc.svg +96 -0
  21. package/images/images/assets_background_01.png +0 -0
  22. package/images/images/avatar.png +0 -0
  23. package/images/images/layout_01.png +0 -0
  24. package/images/images/layout_02.png +0 -0
  25. package/images/images/layout_03.png +0 -0
  26. package/index.d.ts +18 -0
  27. package/index.js +18 -0
  28. package/{AppLayout.d.ts → layout/AppLayout.d.ts} +4 -2
  29. package/{AppLayout.js → layout/AppLayout.js} +7 -5
  30. package/{BackPageContainer.d.ts → layout/BackPageContainer.d.ts} +5 -2
  31. package/{BackPageContainer.js → layout/BackPageContainer.js} +8 -3
  32. package/{MyPageContainer.d.ts → layout/MyPageContainer.d.ts} +4 -2
  33. package/{MyPageContainer.js → layout/MyPageContainer.js} +5 -3
  34. package/{SubMenusContainer.d.ts → layout/SubMenusContainer.d.ts} +5 -5
  35. package/{SubMenusContainer.js → layout/SubMenusContainer.js} +2 -3
  36. package/media/Media.d.ts +84 -0
  37. package/media/Media.js +241 -0
  38. package/media/MediaModals.d.ts +17 -0
  39. package/media/MediaModals.js +172 -0
  40. package/net-disk/DirectoryMenusPanel.d.ts +0 -0
  41. package/net-disk/DirectoryMenusPanel.js +337 -0
  42. package/net-disk/DirectorySelect.d.ts +0 -0
  43. package/net-disk/DirectorySelect.js +240 -0
  44. package/net-disk/FileItemList.d.ts +0 -0
  45. package/net-disk/FileItemList.js +126 -0
  46. package/net-disk/FileItemTable.d.ts +0 -0
  47. package/net-disk/FileItemTable.js +422 -0
  48. package/net-disk/FileNavigation.d.ts +0 -0
  49. package/net-disk/FileNavigation.js +43 -0
  50. package/net-disk/NetDisk.d.ts +0 -0
  51. package/net-disk/NetDisk.js +36 -0
  52. package/net-disk/NetDiskModals.d.ts +0 -0
  53. package/net-disk/NetDiskModals.js +40 -0
  54. package/package.json +30 -19
  55. package/{Permission.d.ts → permission/Permission.d.ts} +4 -2
  56. package/{Permission.js → permission/Permission.js} +5 -3
  57. package/promises.d.ts +48 -0
  58. package/promises.js +141 -0
  59. package/rich/AIEditor.css +1647 -0
  60. package/rich/AIEditor.d.ts +51 -0
  61. package/rich/AIEditor.js +90 -0
  62. package/slider/SliderCode.d.ts +23 -0
  63. package/slider/SliderCode.js +203 -0
  64. package/type.d.ts +3 -0
  65. package/type.js +1 -0
  66. package/InlineContainer.d.ts +0 -6
  67. package/InlineContainer.js +0 -28
  68. package/MediaModals.d.ts +0 -32
  69. package/MediaModals.js +0 -373
  70. package/NetDiskModals.d.ts +0 -15
  71. package/NetDiskModals.js +0 -28
  72. package/Upgrade.d.ts +0 -7
  73. package/Upgrade.js +0 -46
  74. package/fonts/harmony/HarmonyOS_Medium.a.woff2 +0 -0
  75. package/fonts/harmony/HarmonyOS_Medium.a0.woff2 +0 -0
  76. package/fonts/harmony/HarmonyOS_Medium.a1.woff2 +0 -0
  77. package/fonts/harmony/HarmonyOS_Medium.aa.woff2 +0 -0
  78. package/fonts/harmony/HarmonyOS_Medium.ab.woff2 +0 -0
  79. package/fonts/harmony/HarmonyOS_Medium.ac.woff2 +0 -0
  80. package/fonts/harmony/HarmonyOS_Medium.ad.woff2 +0 -0
  81. package/fonts/harmony/HarmonyOS_Medium.ae.woff2 +0 -0
  82. package/fonts/harmony/HarmonyOS_Medium.af.woff2 +0 -0
  83. package/fonts/harmony/HarmonyOS_Medium.ag.woff2 +0 -0
  84. package/fonts/harmony/HarmonyOS_Medium.ah.woff2 +0 -0
  85. package/fonts/harmony/HarmonyOS_Medium.ai.woff2 +0 -0
  86. package/fonts/harmony/HarmonyOS_Medium.aj.woff2 +0 -0
  87. package/fonts/harmony/HarmonyOS_Medium.ak.woff2 +0 -0
  88. package/fonts/harmony/HarmonyOS_Medium.al.woff2 +0 -0
  89. package/fonts/harmony/HarmonyOS_Medium.am.woff2 +0 -0
  90. package/fonts/harmony/HarmonyOS_Medium.an.woff2 +0 -0
  91. package/fonts/harmony/HarmonyOS_Medium.ao.woff2 +0 -0
  92. package/fonts/harmony/HarmonyOS_Medium.ap.woff2 +0 -0
  93. package/fonts/harmony/HarmonyOS_Medium.aq.woff2 +0 -0
  94. package/fonts/harmony/HarmonyOS_Medium.ar.woff2 +0 -0
  95. package/fonts/harmony/HarmonyOS_Medium.as.woff2 +0 -0
  96. package/fonts/harmony/HarmonyOS_Medium.at.woff2 +0 -0
  97. package/fonts/harmony/HarmonyOS_Medium.au.woff2 +0 -0
  98. package/fonts/harmony/HarmonyOS_Medium.av.woff2 +0 -0
  99. package/fonts/harmony/HarmonyOS_Medium.aw.woff2 +0 -0
  100. package/fonts/harmony/HarmonyOS_Medium.ax.woff2 +0 -0
  101. package/fonts/harmony/HarmonyOS_Medium.ay.woff2 +0 -0
  102. package/fonts/harmony/HarmonyOS_Medium.az.woff2 +0 -0
  103. package/fonts/harmony/HarmonyOS_Medium.b.woff2 +0 -0
  104. package/fonts/harmony/HarmonyOS_Medium.c.woff2 +0 -0
  105. package/fonts/harmony/HarmonyOS_Medium.d.woff2 +0 -0
  106. package/fonts/harmony/HarmonyOS_Medium.e.woff2 +0 -0
  107. package/fonts/harmony/HarmonyOS_Medium.f.woff2 +0 -0
  108. package/fonts/harmony/HarmonyOS_Medium.g.woff2 +0 -0
  109. package/fonts/harmony/HarmonyOS_Medium.h.woff2 +0 -0
  110. package/fonts/harmony/HarmonyOS_Medium.i.woff2 +0 -0
  111. package/fonts/harmony/HarmonyOS_Medium.j.woff2 +0 -0
  112. package/fonts/harmony/HarmonyOS_Medium.k.woff2 +0 -0
  113. package/fonts/harmony/HarmonyOS_Medium.l.woff2 +0 -0
  114. package/fonts/harmony/HarmonyOS_Medium.m.woff2 +0 -0
  115. package/fonts/harmony/HarmonyOS_Medium.n.woff2 +0 -0
  116. package/fonts/harmony/HarmonyOS_Medium.o.woff2 +0 -0
  117. package/fonts/harmony/HarmonyOS_Medium.p.woff2 +0 -0
  118. package/fonts/harmony/HarmonyOS_Medium.q.woff2 +0 -0
  119. package/fonts/harmony/HarmonyOS_Medium.r.woff2 +0 -0
  120. package/fonts/harmony/HarmonyOS_Medium.s.woff2 +0 -0
  121. package/fonts/harmony/HarmonyOS_Medium.t.woff2 +0 -0
  122. package/fonts/harmony/HarmonyOS_Medium.u.woff2 +0 -0
  123. package/fonts/harmony/HarmonyOS_Medium.v.woff2 +0 -0
  124. package/fonts/harmony/HarmonyOS_Medium.w.woff2 +0 -0
  125. package/fonts/harmony/HarmonyOS_Medium.x.woff2 +0 -0
  126. package/fonts/harmony/HarmonyOS_Medium.y.woff2 +0 -0
  127. package/fonts/harmony/HarmonyOS_Medium.z.woff2 +0 -0
  128. package/fonts/harmony/HarmonyOS_Regular.a.woff2 +0 -0
  129. package/fonts/harmony/HarmonyOS_Regular.a0.woff2 +0 -0
  130. package/fonts/harmony/HarmonyOS_Regular.a1.woff2 +0 -0
  131. package/fonts/harmony/HarmonyOS_Regular.aa.woff2 +0 -0
  132. package/fonts/harmony/HarmonyOS_Regular.ab.woff2 +0 -0
  133. package/fonts/harmony/HarmonyOS_Regular.ac.woff2 +0 -0
  134. package/fonts/harmony/HarmonyOS_Regular.ad.woff2 +0 -0
  135. package/fonts/harmony/HarmonyOS_Regular.ae.woff2 +0 -0
  136. package/fonts/harmony/HarmonyOS_Regular.af.woff2 +0 -0
  137. package/fonts/harmony/HarmonyOS_Regular.ag.woff2 +0 -0
  138. package/fonts/harmony/HarmonyOS_Regular.ah.woff2 +0 -0
  139. package/fonts/harmony/HarmonyOS_Regular.ai.woff2 +0 -0
  140. package/fonts/harmony/HarmonyOS_Regular.aj.woff2 +0 -0
  141. package/fonts/harmony/HarmonyOS_Regular.ak.woff2 +0 -0
  142. package/fonts/harmony/HarmonyOS_Regular.al.woff2 +0 -0
  143. package/fonts/harmony/HarmonyOS_Regular.am.woff2 +0 -0
  144. package/fonts/harmony/HarmonyOS_Regular.an.woff2 +0 -0
  145. package/fonts/harmony/HarmonyOS_Regular.ao.woff2 +0 -0
  146. package/fonts/harmony/HarmonyOS_Regular.ap.woff2 +0 -0
  147. package/fonts/harmony/HarmonyOS_Regular.aq.woff2 +0 -0
  148. package/fonts/harmony/HarmonyOS_Regular.ar.woff2 +0 -0
  149. package/fonts/harmony/HarmonyOS_Regular.as.woff2 +0 -0
  150. package/fonts/harmony/HarmonyOS_Regular.at.woff2 +0 -0
  151. package/fonts/harmony/HarmonyOS_Regular.au.woff2 +0 -0
  152. package/fonts/harmony/HarmonyOS_Regular.av.woff2 +0 -0
  153. package/fonts/harmony/HarmonyOS_Regular.aw.woff2 +0 -0
  154. package/fonts/harmony/HarmonyOS_Regular.ax.woff2 +0 -0
  155. package/fonts/harmony/HarmonyOS_Regular.ay.woff2 +0 -0
  156. package/fonts/harmony/HarmonyOS_Regular.az.woff2 +0 -0
  157. package/fonts/harmony/HarmonyOS_Regular.b.woff2 +0 -0
  158. package/fonts/harmony/HarmonyOS_Regular.c.woff2 +0 -0
  159. package/fonts/harmony/HarmonyOS_Regular.d.woff2 +0 -0
  160. package/fonts/harmony/HarmonyOS_Regular.e.woff2 +0 -0
  161. package/fonts/harmony/HarmonyOS_Regular.f.woff2 +0 -0
  162. package/fonts/harmony/HarmonyOS_Regular.g.woff2 +0 -0
  163. package/fonts/harmony/HarmonyOS_Regular.h.woff2 +0 -0
  164. package/fonts/harmony/HarmonyOS_Regular.i.woff2 +0 -0
  165. package/fonts/harmony/HarmonyOS_Regular.j.woff2 +0 -0
  166. package/fonts/harmony/HarmonyOS_Regular.k.woff2 +0 -0
  167. package/fonts/harmony/HarmonyOS_Regular.l.woff2 +0 -0
  168. package/fonts/harmony/HarmonyOS_Regular.m.woff2 +0 -0
  169. package/fonts/harmony/HarmonyOS_Regular.n.woff2 +0 -0
  170. package/fonts/harmony/HarmonyOS_Regular.o.woff2 +0 -0
  171. package/fonts/harmony/HarmonyOS_Regular.p.woff2 +0 -0
  172. package/fonts/harmony/HarmonyOS_Regular.q.woff2 +0 -0
  173. package/fonts/harmony/HarmonyOS_Regular.r.woff2 +0 -0
  174. package/fonts/harmony/HarmonyOS_Regular.s.woff2 +0 -0
  175. package/fonts/harmony/HarmonyOS_Regular.t.woff2 +0 -0
  176. package/fonts/harmony/HarmonyOS_Regular.u.woff2 +0 -0
  177. package/fonts/harmony/HarmonyOS_Regular.v.woff2 +0 -0
  178. package/fonts/harmony/HarmonyOS_Regular.w.woff2 +0 -0
  179. package/fonts/harmony/HarmonyOS_Regular.x.woff2 +0 -0
  180. package/fonts/harmony/HarmonyOS_Regular.y.woff2 +0 -0
  181. package/fonts/harmony/HarmonyOS_Regular.z.woff2 +0 -0
  182. package/fonts/harmony/medium.css +0 -485
  183. package/fonts/harmony/regular.css +0 -485
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { Handler } from './type';
3
+ export type FileType = 'IMAGE' | 'GIT' | 'VIDEO' | 'DOCUMENT';
4
+ /**
5
+ * 文件上传模态框.
6
+ */
7
+ export declare class UploadModals {
8
+ /**
9
+ * 弹出文件上传.
10
+ */
11
+ static useUpload(fileType: FileType[], key?: string): [Handler<File[]>, ReactNode];
12
+ }
@@ -0,0 +1,233 @@
1
+ import React, { useRef, useState } from 'react';
2
+ import { Button, Checkbox, Modal, Space } from 'antd';
3
+ import { css } from '@emotion/css';
4
+ import ElementUtils from 'beer-network/elementUtils';
5
+ /**
6
+ * 文件上传模态框.
7
+ */
8
+ export class UploadModals {
9
+ /**
10
+ * 弹出文件上传.
11
+ */
12
+ static useUpload(fileType, key = 'DEFAULT') {
13
+ const [isOpenModal, setIsOpenModal] = useState(false);
14
+ const [isPop, setIsPop] = useState(false);
15
+ const callbackRef = useRef(undefined);
16
+ const getPopStatus = () => {
17
+ return localStorage.getItem('__UPLOAD_MODALS_' + key) !== '1';
18
+ };
19
+ const setPopStatus = (status) => {
20
+ if (status) {
21
+ localStorage.setItem('__UPLOAD_MODALS_' + key, '1');
22
+ }
23
+ };
24
+ const filterFile = (files) => {
25
+ if (files === null) {
26
+ return [];
27
+ }
28
+ const result = [];
29
+ for (let i = 0; i < files.length; i += 1) {
30
+ const file = files.item(i) ?? undefined;
31
+ if (file === undefined) {
32
+ continue;
33
+ }
34
+ const type = fileType.find(it => {
35
+ if (it === 'IMAGE' && ['image/png', 'image/jpeg', 'image/webp'].indexOf(file.type) > -1) {
36
+ return true;
37
+ }
38
+ const fileExtension = file.name.split('.')
39
+ ?.pop()
40
+ ?.toLowerCase() ?? 'none';
41
+ return it === 'VIDEO' && ['wmv', 'avi', '3gp', 'mov', 'mp4', 'flv', 'rmvb', 'mkv', 'm4v', 'x-flv'].indexOf(fileExtension) > -1;
42
+ });
43
+ if (type === undefined) {
44
+ continue;
45
+ }
46
+ let size = 0;
47
+ switch (type) {
48
+ case 'IMAGE':
49
+ size = 10 * 1024 * 1024;
50
+ break;
51
+ case 'VIDEO':
52
+ size = 300 * 1024 * 1024;
53
+ break;
54
+ default:
55
+ size = 50 * 1024 * 1024;
56
+ break;
57
+ }
58
+ if (file.size > size) {
59
+ continue;
60
+ }
61
+ result.push(file);
62
+ }
63
+ return result;
64
+ };
65
+ const onSelectFile = async () => {
66
+ const fileList = await ElementUtils.selectFile(true);
67
+ await callbackRef.current?.(filterFile(fileList));
68
+ };
69
+ const onConfirm = async () => {
70
+ if (callbackRef.current) {
71
+ setPopStatus(isPop);
72
+ onSelectFile()
73
+ .then();
74
+ setIsOpenModal(false);
75
+ }
76
+ else {
77
+ setIsOpenModal(false);
78
+ }
79
+ return true;
80
+ };
81
+ const handler = {
82
+ ok: (callback) => {
83
+ if (!getPopStatus()) {
84
+ onSelectFile()
85
+ .then();
86
+ return;
87
+ }
88
+ setIsPop(false);
89
+ setIsOpenModal(true);
90
+ callbackRef.current = callback;
91
+ }
92
+ };
93
+ return [handler, React.createElement(React.Fragment, null,
94
+ React.createElement(Modal, { title: "\u6587\u4EF6\u4E0A\u4F20\u8981\u6C42", width: 360, open: isOpenModal, onCancel: () => setIsOpenModal(false), styles: {
95
+ content: {
96
+ padding: 0
97
+ },
98
+ header: {
99
+ paddingBlock: '16px 0',
100
+ paddingInline: 20,
101
+ marginInlineStart: 0,
102
+ marginBlockEnd: 0
103
+ },
104
+ wrapper: {
105
+ padding: 0
106
+ },
107
+ body: {
108
+ paddingInline: 20,
109
+ paddingBlockStart: 8,
110
+ paddingBlockEnd: 4
111
+ },
112
+ footer: {
113
+ margin: 0,
114
+ paddingBlockEnd: 12
115
+ }
116
+ }, footer: React.createElement(Space, { style: {
117
+ width: '100%',
118
+ boxSizing: 'border-box',
119
+ justifyContent: 'space-between',
120
+ paddingInline: 20,
121
+ paddingBlock: 4
122
+ } },
123
+ React.createElement(Checkbox, { checked: isPop, onChange: (e) => setIsPop(e.target.checked) }, "\u4E0B\u6B21\u4E0D\u5728\u5F39\u51FA"),
124
+ React.createElement(Space, { size: 12 },
125
+ React.createElement(Button, { type: "primary", onClick: onConfirm }, "\u786E\u5B9A"),
126
+ React.createElement(Button, { onClick: () => setIsOpenModal(false) }, "\u53D6\u6D88"))) },
127
+ React.createElement("div", { className: css `
128
+ .title {
129
+ font-weight: 500;
130
+ font-size: 14px;
131
+ margin: 12px 0 4px 0;
132
+ }
133
+
134
+ .title:first-child {
135
+ margin-top: 4px;
136
+ }
137
+
138
+ ul {
139
+ margin: 0;
140
+ padding-left: 20px;
141
+ }
142
+
143
+ li {
144
+ padding-block: 2px;
145
+ }
146
+
147
+ .desc {
148
+ margin: 4px 0;
149
+ font-size: 12px;
150
+ color: #444
151
+ }
152
+
153
+ code {
154
+ background: #EFEFEF;
155
+ padding: 2px 4px;
156
+ border-radius: 2px;
157
+ font-size: 12px;
158
+ }
159
+ ` },
160
+ fileType.find(it => it === 'IMAGE') !== undefined ? React.createElement(React.Fragment, null,
161
+ fileType.length === 1 ? undefined : React.createElement("div", { className: "title" }, "\u56FE\u7247"),
162
+ React.createElement("ul", null,
163
+ React.createElement("li", null, "\u5355\u5F20\u5927\u5C0F\uFF1A\u226410M"),
164
+ React.createElement("li", null,
165
+ "\u683C\u5F0F\uFF1A",
166
+ React.createElement("code", null, "JPEG"),
167
+ "\u3001",
168
+ React.createElement("code", null, "JPG"),
169
+ "\u3001",
170
+ React.createElement("code", null, "PNG"),
171
+ "\u3001",
172
+ React.createElement("code", null, "WEBP")))) : undefined,
173
+ fileType.find(it => it === 'GIT') !== undefined ? React.createElement(React.Fragment, null,
174
+ fileType.length === 1 ? undefined : React.createElement("div", { className: "title" }, "\u52A8\u56FE\uFF08GIF\uFF09"),
175
+ React.createElement("ul", null,
176
+ React.createElement("li", null, "\u5355\u4E2A\u5927\u5C0F\uFF1A\u226410M"),
177
+ React.createElement("li", null,
178
+ "\u683C\u5F0F\uFF1A",
179
+ React.createElement("code", null, "GIF")))) : undefined,
180
+ fileType.find(it => it === 'VIDEO') !== undefined ? React.createElement(React.Fragment, null,
181
+ fileType.length === 1 ? undefined : React.createElement("div", { className: "title" }, "\u89C6\u9891"),
182
+ React.createElement("ul", null,
183
+ React.createElement("li", null, "\u5355\u4E2A\u5927\u5C0F\uFF1A\u2264300M"),
184
+ React.createElement("li", null, "\u65F6\u957F\uFF1A\u226410\u5206\u949F"),
185
+ React.createElement("li", null,
186
+ "\u683C\u5F0F\uFF1A",
187
+ React.createElement("code", null, "WMV"),
188
+ "\u3001",
189
+ React.createElement("code", null, "AVI"),
190
+ "\u3001",
191
+ React.createElement("code", null, "3GP"),
192
+ "\u3001",
193
+ React.createElement("code", null, "MOV"),
194
+ "\u3001",
195
+ React.createElement("code", null, "MP4"),
196
+ "\u3001",
197
+ React.createElement("code", null, "FLV"),
198
+ "\u3001",
199
+ React.createElement("code", null, "RMVB"),
200
+ "\u3001",
201
+ React.createElement("code", null, "MKV"),
202
+ "\u3001",
203
+ React.createElement("code", null, "M4V"),
204
+ "\u3001",
205
+ React.createElement("code", null, "X-FLV")))) : undefined,
206
+ fileType.find(it => it === 'DOCUMENT') !== undefined ? React.createElement(React.Fragment, null,
207
+ fileType.length === 1 ? undefined : React.createElement("div", { className: "title" }, "\u6587\u6863"),
208
+ React.createElement("ul", null,
209
+ React.createElement("li", null, "\u5355\u4E2A\u5927\u5C0F\uFF1A\u226430M"),
210
+ React.createElement("li", null,
211
+ "\u683C\u5F0F\uFF1A",
212
+ React.createElement("code", null, "PDF"),
213
+ "\u3001",
214
+ React.createElement("code", null, "DOC"),
215
+ "\u3001",
216
+ React.createElement("code", null, "DOCX"),
217
+ "\u3001",
218
+ React.createElement("code", null, "XLS"),
219
+ "\u3001",
220
+ React.createElement("code", null, "XLSX"),
221
+ "\u3001",
222
+ React.createElement("code", null, "PPT"),
223
+ "\u3001",
224
+ React.createElement("code", null, "PPTX"),
225
+ "\u3001",
226
+ React.createElement("code", null, "TXT")))) : undefined,
227
+ React.createElement("div", { style: { marginTop: 12 } },
228
+ React.createElement("div", { className: "desc" },
229
+ React.createElement("span", { style: { fontWeight: 500 } }, "\u4E25\u7981\u4E0A\u4F20\u5BFC\u6D41\u3001\u8FDD\u89C4\u6216\u8FDD\u7981\u5185\u5BB9"),
230
+ "\uFF0C\u8FDD\u8005\u5C06\u5C01\u7981\u8D26\u53F7\u5904\u7406\u3002"),
231
+ React.createElement("div", { className: "desc" }, "\u8BF7\u786E\u4FDD\u6587\u4EF6\u7B26\u5408\u683C\u5F0F\u53CA\u5927\u5C0F\u8981\u6C42\uFF0C\u5426\u5219\u53EF\u80FD\u4E0A\u4F20\u5931\u8D25\u3002")))))];
232
+ }
233
+ }
package/UserModals.d.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
- export type Handler<T> = {
3
- ok: (callback: (params: T) => Promise<boolean>, args?: {}, initialValues?: {}) => void;
4
- };
2
+ import { Handler } from './type';
3
+ /**
4
+ * 用户相关模态框.
5
+ */
5
6
  export declare class UserModals {
7
+ /**
8
+ * 重置密码.
9
+ */
6
10
  static useResetPassword(): [Handler<string>, ReactNode];
7
11
  }
package/UserModals.js CHANGED
@@ -1,7 +1,13 @@
1
1
  import React, { useRef, useState } from 'react';
2
2
  import { Form, Input, Modal } from 'antd';
3
3
  import { Promises } from './promises';
4
+ /**
5
+ * 用户相关模态框.
6
+ */
4
7
  export class UserModals {
8
+ /**
9
+ * 重置密码.
10
+ */
5
11
  static useResetPassword() {
6
12
  const [form] = Form.useForm();
7
13
  const [isOpenModal, setIsOpenModal] = useState(false);
@@ -1,4 +1,4 @@
1
- import { Slider, SliderCodeToken } from 'beer-assembly/SliderCode';
1
+ import { Slider, SliderCodeToken } from '../slider/SliderCode';
2
2
  import React from 'react';
3
3
  export declare type AuthPasswordProps = {
4
4
  /**
@@ -34,5 +34,4 @@ export declare type AuthPasswordProps = {
34
34
  */
35
35
  onErrorMessage?: (message: string) => void;
36
36
  };
37
- declare const App: (props: AuthPasswordProps) => React.JSX.Element;
38
- export default App;
37
+ export declare const AuthPassword: (props: AuthPasswordProps) => React.JSX.Element;
@@ -1,9 +1,10 @@
1
- import { Button, Checkbox, Dropdown, Form, Input } from 'antd';
2
- import SliderCode from 'beer-assembly/SliderCode';
1
+ import { Button, Checkbox, Dropdown, Form, Input, theme } from 'antd';
2
+ import { SliderCode } from '../slider/SliderCode';
3
3
  import { css } from '@emotion/css';
4
4
  import React, { useState } from 'react';
5
5
  import { useForm } from 'antd/es/form/Form';
6
- const App = (props) => {
6
+ export const AuthPassword = (props) => {
7
+ const { token } = theme.useToken();
7
8
  const [form] = useForm();
8
9
  const [isLoading, setIsLoading] = useState(false);
9
10
  const [protocol, setProtocol] = useState(false);
@@ -52,7 +53,7 @@ const App = (props) => {
52
53
  React.createElement(Form.Item, { name: "password", style: { marginBottom: 12 } },
53
54
  React.createElement(Input.Password, { className: "input", maxLength: 32, placeholder: "\u8BF7\u8F93\u5165\u5BC6\u7801", autoComplete: "on", style: { height: 36 } })),
54
55
  props?.protocol === undefined ? undefined : React.createElement(Form.Item, { style: { marginBottom: 12 } },
55
- React.createElement(Checkbox, { style: { fontSize: 13 }, onChange: (e) => {
56
+ React.createElement(Checkbox, { style: { fontSize: token.fontSize + 1 }, onChange: (e) => {
56
57
  setProtocol(e.target.checked);
57
58
  } },
58
59
  React.createElement("span", { dangerouslySetInnerHTML: { __html: props?.protocol } }))),
@@ -74,4 +75,3 @@ const App = (props) => {
74
75
  margin-top: 4px;
75
76
  `, loading: isLoading, onClick: onLogin }, "\u767B\u5F55")));
76
77
  };
77
- export default App;
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
- import { Slider, SliderCodeToken } from 'beer-assembly/SliderCode';
3
- declare type AuthStyleProps = {
2
+ import { Slider, SliderCodeToken } from '../slider/SliderCode';
3
+ export declare type AuthStyle01Props = {
4
4
  /**
5
5
  * 主颜色.
6
6
  */
@@ -67,5 +67,4 @@ declare type AuthStyleProps = {
67
67
  */
68
68
  login?: (userInfo: any) => void;
69
69
  };
70
- declare const App: FC<AuthStyleProps>;
71
- export default App;
70
+ export declare const AuthStyle01: FC<AuthStyle01Props>;
@@ -1,10 +1,10 @@
1
1
  import React, { useState } from 'react';
2
2
  import { Alert, ConfigProvider, Tabs, theme } from 'antd';
3
3
  import { css } from '@emotion/css';
4
- import AuthPassword from './AuthPassword';
4
+ import { AuthPassword } from './AuthPassword';
5
5
  import ImageBackground from '../images/assets_background_01.png';
6
6
  import { Session } from './session';
7
- const App = (props) => {
7
+ export const AuthStyle01 = (props) => {
8
8
  const { token } = theme.useToken();
9
9
  const [errorMessage, setErrorMessage] = useState('');
10
10
  const onConfirmLogin = async (code, slider, params) => {
@@ -89,8 +89,8 @@ const App = (props) => {
89
89
  min-height: 200px;
90
90
  ` },
91
91
  errorMessage !== '' ? React.createElement(Alert, { style: {
92
- fontSize: '12px',
93
- marginBottom: '12px',
92
+ fontSize: token.fontSize - 1,
93
+ marginBottom: 12,
94
94
  color: '#fa2c19',
95
95
  padding: '6px 10px',
96
96
  fontWeight: '500'
@@ -117,4 +117,3 @@ const App = (props) => {
117
117
  }
118
118
  `, dangerouslySetInnerHTML: { __html: props?.copyright || '' } }))));
119
119
  };
120
- export default App;
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
- import { Slider, SliderCodeToken } from 'beer-assembly/SliderCode';
3
- declare type AuthStyleProps = {
2
+ import { Slider, SliderCodeToken } from '../slider/SliderCode';
3
+ export declare type AuthStyle02Props = {
4
4
  /**
5
5
  * 主颜色.
6
6
  */
@@ -63,5 +63,4 @@ declare type AuthStyleProps = {
63
63
  */
64
64
  login?: (userInfo: any) => void;
65
65
  };
66
- declare const App: FC<AuthStyleProps>;
67
- export default App;
66
+ export declare const AuthStyle02: FC<AuthStyle02Props>;
@@ -3,8 +3,8 @@ import { Alert, ConfigProvider, Tabs, theme } from 'antd';
3
3
  import { css } from '@emotion/css';
4
4
  import ImageBackground from '../images/assets_background_01.png';
5
5
  import { Session } from './session';
6
- import AuthPassword from './AuthPassword';
7
- const App = (props) => {
6
+ import { AuthPassword } from './AuthPassword';
7
+ export const AuthStyle02 = (props) => {
8
8
  const { token } = theme.useToken();
9
9
  const [errorMessage, setErrorMessage] = useState('');
10
10
  const onConfirmLogin = async (code, slider, params) => {
@@ -82,8 +82,8 @@ const App = (props) => {
82
82
  min-height: 200px;
83
83
  ` },
84
84
  errorMessage !== '' ? React.createElement(Alert, { style: {
85
- fontSize: '12px',
86
- marginBottom: '12px',
85
+ fontSize: token.fontSize - 1,
86
+ marginBottom: 12,
87
87
  color: '#fa2c19',
88
88
  padding: '6px 10px',
89
89
  fontWeight: '500'
@@ -110,4 +110,3 @@ const App = (props) => {
110
110
  }
111
111
  `, dangerouslySetInnerHTML: { __html: props?.copyright || '' } }))));
112
112
  };
113
- export default App;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- declare type AuthThirdPartyAuthProps = {
2
+ export declare type AuthThirdPartyAuthProps = {
3
3
  /**
4
4
  * Logo
5
5
  */
@@ -27,5 +27,4 @@ declare type AuthThirdPartyAuthProps = {
27
27
  };
28
28
  onConfirm?: () => void;
29
29
  };
30
- declare const App: FC<AuthThirdPartyAuthProps>;
31
- export default App;
30
+ export declare const AuthThirdPartyAuth: FC<AuthThirdPartyAuthProps>;
@@ -3,7 +3,7 @@ import { css } from '@emotion/css';
3
3
  import { Button, ConfigProvider, theme } from 'antd';
4
4
  import ImageBackground from '../images/assets_background_01.png';
5
5
  import ImageAvatar from './avatar.png';
6
- const App = (props) => {
6
+ export const AuthThirdPartyAuth = (props) => {
7
7
  const { token } = theme.useToken();
8
8
  return React.createElement("div", { className: css `
9
9
  width: 100%;
@@ -93,4 +93,3 @@ const App = (props) => {
93
93
  } }, "\u5728\u6D4F\u89C8\u5668\u6253\u5F00"),
94
94
  "\u4EE5\u514D\u767B\u5F55\uFF0C\u65B9\u4FBF\u5FEB\u6377\u5730\u8BBF\u95EE\u6211\u4EEC\u7684\u670D\u52A1\u3002") : undefined)));
95
95
  };
96
- export default App;
@@ -1,8 +1,10 @@
1
1
  import type { MessageInstance } from 'antd/es/message/interface';
2
2
  import type { HookAPI } from 'antd/es/modal/useModal';
3
- declare const ParentContext: import("react").Context<{
3
+ /**
4
+ * React 父子容器.
5
+ */
6
+ export declare const ParentContext: import("react").Context<{
4
7
  messageApi: MessageInstance | undefined;
5
8
  modal: HookAPI | undefined;
6
9
  active: () => void;
7
10
  }>;
8
- export default ParentContext;
@@ -1,9 +1,11 @@
1
1
  import { createContext } from 'react';
2
- const ParentContext = createContext({
2
+ /**
3
+ * React 父子容器.
4
+ */
5
+ export const ParentContext = createContext({
3
6
  messageApi: undefined,
4
7
  modal: undefined,
5
8
  active: () => {
6
9
  console.log('parent context');
7
10
  }
8
11
  });
9
- export default ParentContext;
@@ -1,4 +1,6 @@
1
- declare const PermissionContext: import("react").Context<{
1
+ /**
2
+ * React 权限.
3
+ */
4
+ export declare const PermissionContext: import("react").Context<{
2
5
  isPermission: (domain: string, permission: string) => boolean;
3
6
  }>;
4
- export default PermissionContext;
@@ -1,5 +1,8 @@
1
1
  import { createContext } from 'react';
2
- const PermissionContext = createContext({
2
+ /**
3
+ * React 权限.
4
+ */
5
+ export const PermissionContext = createContext({
3
6
  isPermission: (domain, permission) => {
4
7
  console.log('parent context' + domain);
5
8
  console.log('parent context' + permission);
@@ -9,4 +12,3 @@ const PermissionContext = createContext({
9
12
  return true;
10
13
  }
11
14
  });
12
- export default PermissionContext;
@@ -0,0 +1,12 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="28" height="23" fill="none" viewBox="0 0 28 23" x="150" y="130"
2
+ data-name="spacearea" data-svg-id="ea31b1f100">
3
+ <path fill-rule="evenodd" clip-rule="evenodd"
4
+ d="M2.25 22.5A2.25 2.25 0 0 1 0 20.25V2.583A2.25 2.25 0 0 1 2.25.333h7.083l2.334 2.334H25.75A2.25 2.25 0 0 1 28 4.917V20.25a2.25 2.25 0 0 1-2.25 2.25H2.25z"
5
+ fill="url(#g)"/>
6
+ <defs>
7
+ <linearGradient id="g" x1="-13.917" y1="11.351" x2="7.53" y2="38.443" gradientUnits="userSpaceOnUse">
8
+ <stop stop-color="#6BBEFE"/>
9
+ <stop offset=".999" stop-color="#59ABFE"/>
10
+ </linearGradient>
11
+ </defs>
12
+ </svg>
@@ -0,0 +1,43 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="130" height="80">
2
+ <defs>
3
+ <linearGradient x1="52.348%" y1="74.611%" x2="52.348%" y2="-17.635%" id="a">
4
+ <stop stop-color="#DEDEDE" stop-opacity="0" offset="0%"/>
5
+ <stop stop-color="#A9A9A9" stop-opacity=".3" offset="100%"/>
6
+ </linearGradient>
7
+ <linearGradient x1="44.79%" y1="100%" x2="44.79%" y2="0%" id="b">
8
+ <stop stop-color="#FFF" stop-opacity="0" offset="0%"/>
9
+ <stop stop-color="#96A1C5" stop-opacity=".373" offset="100%"/>
10
+ </linearGradient>
11
+ <linearGradient x1="50%" y1="100%" x2="50%" y2="-19.675%" id="c">
12
+ <stop stop-color="#FFF" stop-opacity="0" offset="0%"/>
13
+ <stop stop-color="#919191" stop-opacity=".15" offset="100%"/>
14
+ </linearGradient>
15
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="44.95%" id="d">
16
+ <stop stop-color="#5389F5" offset="0%"/>
17
+ <stop stop-color="#416FDC" offset="100%"/>
18
+ </linearGradient>
19
+ <linearGradient x1="63.345%" y1="100%" x2="63.345%" y2="-5.316%" id="e">
20
+ <stop stop-color="#DCE9FF" offset="0%"/>
21
+ <stop stop-color="#B6CFFF" offset="100%"/>
22
+ </linearGradient>
23
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="f">
24
+ <stop stop-color="#7CA5F7" offset="0%"/>
25
+ <stop stop-color="#C4D6FC" offset="100%"/>
26
+ </linearGradient>
27
+ </defs>
28
+ <g transform="translate(-1.866 .364)" fill="none" fill-rule="evenodd">
29
+ <path d="M27.94 14.864c1.326-4.192 2.56-6.802 3.7-7.831 3.157-2.848 7.522-1.298 8.45-1.076 3.26.782 2.2-4.364 4.997-5.41 1.864-.697 3.397.155 4.6 2.556C50.752.863 52.375-.163 54.556.02c3.272.277 4.417 11.328 8.913 8.909 4.497-2.42 10.01-2.973 12.365.623.509.778.704-.429 4.166-4.55C83.462.88 86.914-.936 93.996 1.464c3.22 1.09 5.868 4.045 7.947 8.864 0 6.878 5.06 10.95 15.178 12.213 15.179 1.895 3.397 18.214-15.178 22.993-18.576 4.78-61.343 7.36-84.551-4.716C1.92 32.769 5.436 24.117 27.939 14.864z"
30
+ fill="url(#a)" opacity=".8"/>
31
+ <ellipse fill="url(#b)" cx="66" cy="69.166" rx="27.987" ry="6.478"/>
32
+ <path d="M113.25 77.249c-21.043 5.278-92.87-.759-100.515-3.516-3.721-1.343-7.075-3.868-10.061-7.576a2.822 2.822 0 0 1 2.198-4.593h125.514c2.605 6.938-3.107 12.166-17.136 15.685z"
33
+ fill="url(#c)" opacity=".675"/>
34
+ <g fill-rule="nonzero">
35
+ <path d="M43.396 12.098L33.825.906a2.434 2.434 0 0 0-1.837-.86h-20.58c-.706 0-1.377.324-1.837.86L0 12.098v6.144h43.396v-6.144z"
36
+ fill="url(#d)" transform="translate(44.08 39.707)"/>
37
+ <path d="M40.684 18.468L32.307 8.72a2.136 2.136 0 0 0-1.622-.725H12.711c-.617 0-1.22.256-1.622.725l-8.377 9.748v5.354h37.972v-5.354z"
38
+ fill="url(#e)" transform="translate(44.08 39.707)"/>
39
+ <path d="M43.396 25.283c0 .853-.384 1.62-.99 2.134l-.123.1a2.758 2.758 0 0 1-1.67.56H2.784c-.342 0-.669-.062-.971-.176l-.15-.06A2.802 2.802 0 0 1 0 25.282V12.165h10.529c1.163 0 2.1.957 2.1 2.118v.015c0 1.162.948 2.099 2.111 2.099h13.916a2.113 2.113 0 0 0 2.111-2.107c0-1.166.938-2.125 2.1-2.125h10.53z"
40
+ fill="url(#f)" transform="translate(44.08 39.707)"/>
41
+ </g>
42
+ </g>
43
+ </svg>
Binary file