beer-assembly-biz 1.1.1-alpha.1 → 1.1.1-alpha.11

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 (126) hide show
  1. package/AppLayout.d.ts +8 -8
  2. package/AppLayout.js +7 -8
  3. package/UserModals.js +2 -2
  4. package/auth/AuthPassword.d.ts +4 -4
  5. package/auth/AuthPassword.js +23 -11
  6. package/auth/AuthStyle01.d.ts +15 -6
  7. package/auth/AuthStyle01.js +4 -4
  8. package/auth/AuthStyle02.d.ts +15 -6
  9. package/auth/AuthStyle02.js +4 -4
  10. package/fonts/harmony/HarmonyOS_Medium.a.woff2 +0 -0
  11. package/fonts/harmony/HarmonyOS_Medium.a0.woff2 +0 -0
  12. package/fonts/harmony/HarmonyOS_Medium.a1.woff2 +0 -0
  13. package/fonts/harmony/HarmonyOS_Medium.aa.woff2 +0 -0
  14. package/fonts/harmony/HarmonyOS_Medium.ab.woff2 +0 -0
  15. package/fonts/harmony/HarmonyOS_Medium.ac.woff2 +0 -0
  16. package/fonts/harmony/HarmonyOS_Medium.ad.woff2 +0 -0
  17. package/fonts/harmony/HarmonyOS_Medium.ae.woff2 +0 -0
  18. package/fonts/harmony/HarmonyOS_Medium.af.woff2 +0 -0
  19. package/fonts/harmony/HarmonyOS_Medium.ag.woff2 +0 -0
  20. package/fonts/harmony/HarmonyOS_Medium.ah.woff2 +0 -0
  21. package/fonts/harmony/HarmonyOS_Medium.ai.woff2 +0 -0
  22. package/fonts/harmony/HarmonyOS_Medium.aj.woff2 +0 -0
  23. package/fonts/harmony/HarmonyOS_Medium.ak.woff2 +0 -0
  24. package/fonts/harmony/HarmonyOS_Medium.al.woff2 +0 -0
  25. package/fonts/harmony/HarmonyOS_Medium.am.woff2 +0 -0
  26. package/fonts/harmony/HarmonyOS_Medium.an.woff2 +0 -0
  27. package/fonts/harmony/HarmonyOS_Medium.ao.woff2 +0 -0
  28. package/fonts/harmony/HarmonyOS_Medium.ap.woff2 +0 -0
  29. package/fonts/harmony/HarmonyOS_Medium.aq.woff2 +0 -0
  30. package/fonts/harmony/HarmonyOS_Medium.ar.woff2 +0 -0
  31. package/fonts/harmony/HarmonyOS_Medium.as.woff2 +0 -0
  32. package/fonts/harmony/HarmonyOS_Medium.at.woff2 +0 -0
  33. package/fonts/harmony/HarmonyOS_Medium.au.woff2 +0 -0
  34. package/fonts/harmony/HarmonyOS_Medium.av.woff2 +0 -0
  35. package/fonts/harmony/HarmonyOS_Medium.aw.woff2 +0 -0
  36. package/fonts/harmony/HarmonyOS_Medium.ax.woff2 +0 -0
  37. package/fonts/harmony/HarmonyOS_Medium.ay.woff2 +0 -0
  38. package/fonts/harmony/HarmonyOS_Medium.az.woff2 +0 -0
  39. package/fonts/harmony/HarmonyOS_Medium.b.woff2 +0 -0
  40. package/fonts/harmony/HarmonyOS_Medium.c.woff2 +0 -0
  41. package/fonts/harmony/HarmonyOS_Medium.d.woff2 +0 -0
  42. package/fonts/harmony/HarmonyOS_Medium.e.woff2 +0 -0
  43. package/fonts/harmony/HarmonyOS_Medium.f.woff2 +0 -0
  44. package/fonts/harmony/HarmonyOS_Medium.g.woff2 +0 -0
  45. package/fonts/harmony/HarmonyOS_Medium.h.woff2 +0 -0
  46. package/fonts/harmony/HarmonyOS_Medium.i.woff2 +0 -0
  47. package/fonts/harmony/HarmonyOS_Medium.j.woff2 +0 -0
  48. package/fonts/harmony/HarmonyOS_Medium.k.woff2 +0 -0
  49. package/fonts/harmony/HarmonyOS_Medium.l.woff2 +0 -0
  50. package/fonts/harmony/HarmonyOS_Medium.m.woff2 +0 -0
  51. package/fonts/harmony/HarmonyOS_Medium.n.woff2 +0 -0
  52. package/fonts/harmony/HarmonyOS_Medium.o.woff2 +0 -0
  53. package/fonts/harmony/HarmonyOS_Medium.p.woff2 +0 -0
  54. package/fonts/harmony/HarmonyOS_Medium.q.woff2 +0 -0
  55. package/fonts/harmony/HarmonyOS_Medium.r.woff2 +0 -0
  56. package/fonts/harmony/HarmonyOS_Medium.s.woff2 +0 -0
  57. package/fonts/harmony/HarmonyOS_Medium.t.woff2 +0 -0
  58. package/fonts/harmony/HarmonyOS_Medium.u.woff2 +0 -0
  59. package/fonts/harmony/HarmonyOS_Medium.v.woff2 +0 -0
  60. package/fonts/harmony/HarmonyOS_Medium.w.woff2 +0 -0
  61. package/fonts/harmony/HarmonyOS_Medium.x.woff2 +0 -0
  62. package/fonts/harmony/HarmonyOS_Medium.y.woff2 +0 -0
  63. package/fonts/harmony/HarmonyOS_Medium.z.woff2 +0 -0
  64. package/fonts/harmony/HarmonyOS_Regular.a.woff2 +0 -0
  65. package/fonts/harmony/HarmonyOS_Regular.a0.woff2 +0 -0
  66. package/fonts/harmony/HarmonyOS_Regular.a1.woff2 +0 -0
  67. package/fonts/harmony/HarmonyOS_Regular.aa.woff2 +0 -0
  68. package/fonts/harmony/HarmonyOS_Regular.ab.woff2 +0 -0
  69. package/fonts/harmony/HarmonyOS_Regular.ac.woff2 +0 -0
  70. package/fonts/harmony/HarmonyOS_Regular.ad.woff2 +0 -0
  71. package/fonts/harmony/HarmonyOS_Regular.ae.woff2 +0 -0
  72. package/fonts/harmony/HarmonyOS_Regular.af.woff2 +0 -0
  73. package/fonts/harmony/HarmonyOS_Regular.ag.woff2 +0 -0
  74. package/fonts/harmony/HarmonyOS_Regular.ah.woff2 +0 -0
  75. package/fonts/harmony/HarmonyOS_Regular.ai.woff2 +0 -0
  76. package/fonts/harmony/HarmonyOS_Regular.aj.woff2 +0 -0
  77. package/fonts/harmony/HarmonyOS_Regular.ak.woff2 +0 -0
  78. package/fonts/harmony/HarmonyOS_Regular.al.woff2 +0 -0
  79. package/fonts/harmony/HarmonyOS_Regular.am.woff2 +0 -0
  80. package/fonts/harmony/HarmonyOS_Regular.an.woff2 +0 -0
  81. package/fonts/harmony/HarmonyOS_Regular.ao.woff2 +0 -0
  82. package/fonts/harmony/HarmonyOS_Regular.ap.woff2 +0 -0
  83. package/fonts/harmony/HarmonyOS_Regular.aq.woff2 +0 -0
  84. package/fonts/harmony/HarmonyOS_Regular.ar.woff2 +0 -0
  85. package/fonts/harmony/HarmonyOS_Regular.as.woff2 +0 -0
  86. package/fonts/harmony/HarmonyOS_Regular.at.woff2 +0 -0
  87. package/fonts/harmony/HarmonyOS_Regular.au.woff2 +0 -0
  88. package/fonts/harmony/HarmonyOS_Regular.av.woff2 +0 -0
  89. package/fonts/harmony/HarmonyOS_Regular.aw.woff2 +0 -0
  90. package/fonts/harmony/HarmonyOS_Regular.ax.woff2 +0 -0
  91. package/fonts/harmony/HarmonyOS_Regular.ay.woff2 +0 -0
  92. package/fonts/harmony/HarmonyOS_Regular.az.woff2 +0 -0
  93. package/fonts/harmony/HarmonyOS_Regular.b.woff2 +0 -0
  94. package/fonts/harmony/HarmonyOS_Regular.c.woff2 +0 -0
  95. package/fonts/harmony/HarmonyOS_Regular.d.woff2 +0 -0
  96. package/fonts/harmony/HarmonyOS_Regular.e.woff2 +0 -0
  97. package/fonts/harmony/HarmonyOS_Regular.f.woff2 +0 -0
  98. package/fonts/harmony/HarmonyOS_Regular.g.woff2 +0 -0
  99. package/fonts/harmony/HarmonyOS_Regular.h.woff2 +0 -0
  100. package/fonts/harmony/HarmonyOS_Regular.i.woff2 +0 -0
  101. package/fonts/harmony/HarmonyOS_Regular.j.woff2 +0 -0
  102. package/fonts/harmony/HarmonyOS_Regular.k.woff2 +0 -0
  103. package/fonts/harmony/HarmonyOS_Regular.l.woff2 +0 -0
  104. package/fonts/harmony/HarmonyOS_Regular.m.woff2 +0 -0
  105. package/fonts/harmony/HarmonyOS_Regular.n.woff2 +0 -0
  106. package/fonts/harmony/HarmonyOS_Regular.o.woff2 +0 -0
  107. package/fonts/harmony/HarmonyOS_Regular.p.woff2 +0 -0
  108. package/fonts/harmony/HarmonyOS_Regular.q.woff2 +0 -0
  109. package/fonts/harmony/HarmonyOS_Regular.r.woff2 +0 -0
  110. package/fonts/harmony/HarmonyOS_Regular.s.woff2 +0 -0
  111. package/fonts/harmony/HarmonyOS_Regular.t.woff2 +0 -0
  112. package/fonts/harmony/HarmonyOS_Regular.u.woff2 +0 -0
  113. package/fonts/harmony/HarmonyOS_Regular.v.woff2 +0 -0
  114. package/fonts/harmony/HarmonyOS_Regular.w.woff2 +0 -0
  115. package/fonts/harmony/HarmonyOS_Regular.x.woff2 +0 -0
  116. package/fonts/harmony/HarmonyOS_Regular.y.woff2 +0 -0
  117. package/fonts/harmony/HarmonyOS_Regular.z.woff2 +0 -0
  118. package/fonts/harmony/medium.css +485 -0
  119. package/fonts/harmony/regular.css +485 -0
  120. package/images/assets_background_01.png +0 -0
  121. package/images/avatar.png +0 -0
  122. package/images/layout_01.png +0 -0
  123. package/images/layout_02.png +0 -0
  124. package/images/layout_03.png +0 -0
  125. package/package.json +2 -2
  126. package/fonts/harmony/harmony.txt +0 -0
package/AppLayout.d.ts CHANGED
@@ -3,7 +3,7 @@ import { MenuDataItem } from '@ant-design/pro-components';
3
3
  /**
4
4
  * 应用属性
5
5
  */
6
- declare type App = {
6
+ export declare type App = {
7
7
  /**
8
8
  * Key
9
9
  */
@@ -36,7 +36,7 @@ declare type App = {
36
36
  /**
37
37
  * 用户信息实体.
38
38
  */
39
- declare type UserInfo = {
39
+ export declare type UserInfo = {
40
40
  /**
41
41
  * 用户ID.
42
42
  */
@@ -57,7 +57,7 @@ declare type UserInfo = {
57
57
  /**
58
58
  * 布局属性
59
59
  */
60
- declare type LayoutProps = {
60
+ export declare type LayoutProps = {
61
61
  /**
62
62
  * App
63
63
  */
@@ -69,7 +69,7 @@ declare type LayoutProps = {
69
69
  /**
70
70
  * 布局内容
71
71
  */
72
- children: ReactNode;
72
+ children?: ReactNode;
73
73
  /**
74
74
  * 路径
75
75
  */
@@ -82,14 +82,14 @@ declare type LayoutProps = {
82
82
  * 左侧: Logo样式
83
83
  */
84
84
  logo?: {
85
- /**
86
- * 高度
87
- */
88
- height: number;
89
85
  /**
90
86
  * Logo 路径
91
87
  */
92
88
  path: string;
89
+ /**
90
+ * 高度
91
+ */
92
+ height?: number;
93
93
  };
94
94
  /**
95
95
  * 右侧: 用户下拉选菜单
package/AppLayout.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { css } from '@emotion/css';
3
- import { ProConfigProvider, ProLayout } from '@ant-design/pro-components';
3
+ import { ProLayout } from '@ant-design/pro-components';
4
4
  import { Dropdown, message, Typography } from 'antd';
5
5
  import { Session } from 'beer-network/session';
6
6
  import dayjs from 'dayjs';
@@ -109,7 +109,7 @@ const Component = (props) => {
109
109
  sessionStorage.setItem('SESSION', JSON.stringify(userInfo));
110
110
  });
111
111
  }, [props?.requestUser]);
112
- return React.createElement(ProConfigProvider, { hashed: false },
112
+ return React.createElement(React.Fragment, null,
113
113
  contextHolder,
114
114
  React.createElement(ProLayout, { className: css `
115
115
  .ant-pro-sider-logo {
@@ -259,7 +259,7 @@ const Component = (props) => {
259
259
  align-items: center;
260
260
 
261
261
  & > img {
262
- height: ${props?.logo?.height || 22}px;
262
+ height: ${props?.logo?.height || 28}px;
263
263
  display: block;
264
264
  margin: 0 6px;
265
265
  }
@@ -299,14 +299,13 @@ const Component = (props) => {
299
299
  {
300
300
  type: 'divider'
301
301
  },
302
- ...(props?.userMenus || []),
303
- {
304
- type: 'divider'
305
- },
302
+ ...((props?.userMenus || [])?.length > 0 ? [...(props?.userMenus || []), {
303
+ type: 'divider'
304
+ }] : []),
306
305
  {
307
306
  key: 'EXIT',
308
307
  danger: true,
309
- label: React.createElement("div", { onClick: onLogout }, "\u9000\u51FA\u767B\u5F55")
308
+ label: React.createElement("div", { style: { width: '100%' }, onClick: onLogout }, "\u9000\u51FA\u767B\u5F55")
310
309
  }
311
310
  ]
312
311
  } }, dom));
package/UserModals.js CHANGED
@@ -11,7 +11,7 @@ export class UserModals {
11
11
  return false;
12
12
  }
13
13
  if (callbackRef.current) {
14
- if (await callbackRef.current?.(form.getFieldsValue())) {
14
+ if (await callbackRef.current?.(form.getFieldValue('password'))) {
15
15
  setIsOpenModal(false);
16
16
  }
17
17
  }
@@ -34,6 +34,6 @@ export class UserModals {
34
34
  required: true,
35
35
  message: '请输入密码'
36
36
  }] },
37
- React.createElement(Input.Password, { placeholder: "\u65B0\u5BC6\u7801" })))))];
37
+ React.createElement(Input.Password, { placeholder: "\u65B0\u5BC6\u7801", autoComplete: "off" })))))];
38
38
  }
39
39
  }
@@ -4,22 +4,22 @@ export declare type AuthPasswordProps = {
4
4
  /**
5
5
  * HTML 协议.
6
6
  */
7
- protocol: string;
7
+ protocol?: string;
8
8
  /**
9
9
  * 请求滑块验证码.
10
10
  */
11
- requestSlider: () => Promise<Slider>;
11
+ requestSlider?: () => Promise<Slider>;
12
12
  /**
13
13
  * 滑块验证码样式.
14
14
  */
15
- sliderToken: SliderCodeToken;
15
+ sliderToken?: SliderCodeToken;
16
16
  /**
17
17
  * 登录请求
18
18
  * @param code 代码
19
19
  * @param slider 滑块
20
20
  * @param params 参数
21
21
  */
22
- requestLogin?: (code: string, slider: Slider, params: {
22
+ requestLogin?: (code: string | undefined, slider: Slider | undefined, params: {
23
23
  username: string;
24
24
  password: string;
25
25
  }) => Promise<boolean>;
@@ -23,7 +23,25 @@ const App = (props) => {
23
23
  props?.onErrorMessage?.('请输入密码信息');
24
24
  return false;
25
25
  }
26
+ // 启动Loading
26
27
  setIsLoading(true);
28
+ // 如果不需要滑块验证; 直接登录
29
+ if (props?.requestSlider === undefined) {
30
+ await onConfirmLogin();
31
+ }
32
+ return true;
33
+ };
34
+ const onConfirmLogin = async (code, slider) => {
35
+ const params = form.getFieldsValue();
36
+ const func = props?.requestLogin;
37
+ if (func !== undefined) {
38
+ const result = await func(code, slider, params);
39
+ if (!result) {
40
+ return false;
41
+ }
42
+ }
43
+ // 如果处理成功, 关闭Loading
44
+ setIsLoading(false);
27
45
  return true;
28
46
  };
29
47
  return React.createElement(Form, { form: form },
@@ -37,22 +55,16 @@ const App = (props) => {
37
55
  } },
38
56
  React.createElement("span", { dangerouslySetInnerHTML: { __html: props?.protocol } }))),
39
57
  React.createElement(Form.Item, null,
40
- React.createElement(Dropdown, { placement: "top", arrow: true, destroyPopupOnHide: true, dropdownRender: () => React.createElement(React.Fragment, null,
58
+ props?.requestSlider !== undefined ? React.createElement(Dropdown, { placement: "top", arrow: true, destroyPopupOnHide: true, dropdownRender: () => React.createElement(React.Fragment, null,
41
59
  React.createElement("div", { style: {
42
60
  width: '250px',
43
61
  display: 'block',
44
62
  marginLeft: '35px'
45
63
  } },
46
- React.createElement(SliderCode, { request: props?.requestSlider, onReceipt: async (code, slider) => {
47
- const params = form.getFieldsValue();
48
- const result = (await props?.requestLogin?.(code, slider, params)) || true;
49
- // 如果处理成功, 关闭Loading
50
- if (result) {
51
- setIsLoading(false);
52
- }
53
- return result;
54
- }, token: props?.sliderToken }))), trigger: ['click'], open: isLoading },
55
- React.createElement("div", null)),
64
+ React.createElement(SliderCode, { request: props?.requestSlider || (async () => {
65
+ return {};
66
+ }), onReceipt: onConfirmLogin, token: props?.sliderToken }))), trigger: ['click'], open: isLoading },
67
+ React.createElement("div", null)) : undefined,
56
68
  React.createElement(Button, { type: "primary", className: css `
57
69
  width: 100%;
58
70
  height: 38px;
@@ -8,7 +8,16 @@ declare type AuthStyleProps = {
8
8
  /**
9
9
  * Logo 图片.
10
10
  */
11
- logo: string;
11
+ logo: {
12
+ /**
13
+ * 路径
14
+ */
15
+ path: string;
16
+ /**
17
+ * 高度
18
+ */
19
+ height?: number;
20
+ };
12
21
  /**
13
22
  * 侧边栏图片
14
23
  */
@@ -16,23 +25,23 @@ declare type AuthStyleProps = {
16
25
  /**
17
26
  * 描述.
18
27
  */
19
- description: string;
28
+ description?: string;
20
29
  /**
21
30
  * HTML 协议.
22
31
  */
23
- protocol: string;
32
+ protocol?: string;
24
33
  /**
25
34
  * HTML 关于.
26
35
  */
27
- copyright: string;
36
+ copyright?: string;
28
37
  /**
29
38
  * 请求滑块验证码.
30
39
  */
31
- requestSlider: () => Promise<Slider>;
40
+ requestSlider?: () => Promise<Slider>;
32
41
  /**
33
42
  * 滑块验证码样式.
34
43
  */
35
- sliderToken: SliderCodeToken;
44
+ sliderToken?: SliderCodeToken;
36
45
  /**
37
46
  * 登录对象.
38
47
  * @param params 参数
@@ -11,8 +11,8 @@ const App = (props) => {
11
11
  const result = await props?.systemLogin?.({
12
12
  account: params.username.trim(),
13
13
  password: params.password.trim(),
14
- authCode: slider.authCode,
15
- code
14
+ authCode: slider?.authCode || '',
15
+ code: code || ''
16
16
  });
17
17
  if (result === undefined) {
18
18
  setErrorMessage('登录失败,授权没有配置!');
@@ -66,10 +66,10 @@ const App = (props) => {
66
66
  padding: 30px 40px 0 40px;
67
67
  ` },
68
68
  React.createElement("img", { className: css `
69
- height: 42px;
69
+ height: ${props?.logo?.height || 42}px;
70
70
  margin: 0 auto 0 auto;
71
71
  display: block;
72
- `, src: props?.logo, alt: "" }),
72
+ `, src: props?.logo?.path, alt: "" }),
73
73
  React.createElement("p", { className: css `
74
74
  font-size: 13px;
75
75
  margin: 6px auto 10px auto;
@@ -8,27 +8,36 @@ declare type AuthStyleProps = {
8
8
  /**
9
9
  * Logo 图片.
10
10
  */
11
- logo: string;
11
+ logo: {
12
+ /**
13
+ * 路径
14
+ */
15
+ path: string;
16
+ /**
17
+ * 高度
18
+ */
19
+ height?: number;
20
+ };
12
21
  /**
13
22
  * 描述.
14
23
  */
15
- description: string;
24
+ description?: string;
16
25
  /**
17
26
  * HTML 协议.
18
27
  */
19
- protocol: string;
28
+ protocol?: string;
20
29
  /**
21
30
  * HTML 关于.
22
31
  */
23
- copyright: string;
32
+ copyright?: string;
24
33
  /**
25
34
  * 请求滑块验证码.
26
35
  */
27
- requestSlider: () => Promise<Slider>;
36
+ requestSlider?: () => Promise<Slider>;
28
37
  /**
29
38
  * 滑块验证码样式.
30
39
  */
31
- sliderToken: SliderCodeToken;
40
+ sliderToken?: SliderCodeToken;
32
41
  /**
33
42
  * 登录对象.
34
43
  * @param params 参数
@@ -11,8 +11,8 @@ const App = (props) => {
11
11
  const result = await props?.systemLogin?.({
12
12
  account: params.username.trim(),
13
13
  password: params.password.trim(),
14
- authCode: slider.authCode,
15
- code
14
+ authCode: slider?.authCode || '',
15
+ code: code || ''
16
16
  });
17
17
  if (result === undefined) {
18
18
  setErrorMessage('登录失败,授权没有配置!');
@@ -59,10 +59,10 @@ const App = (props) => {
59
59
  padding: 30px 40px 0 40px;
60
60
  ` },
61
61
  React.createElement("img", { className: css `
62
- height: 42px;
62
+ height: ${props?.logo?.height || 42}px;
63
63
  margin: 0 auto 0 auto;
64
64
  display: block;
65
- `, src: props.logo, alt: "" }),
65
+ `, src: props?.logo?.path, alt: "" }),
66
66
  React.createElement("p", { className: css `
67
67
  font-size: 13px;
68
68
  margin: 6px auto 10px auto;