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

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 +42 -0
  52. package/promises.js +128 -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
package/package.json CHANGED
@@ -1,39 +1,49 @@
1
1
  {
2
2
  "name": "beer-assembly-biz",
3
3
  "private": false,
4
- "version": "1.1.2-alpha.9",
4
+ "version": "1.1.3-alpha.2",
5
5
  "scripts": {
6
6
  "pub-w": "tsc && copy package.json .\\dist\\package.json && npm publish ./dist",
7
- "pub-m": "tsc && cp -a src/icon ./dist && cp -a src/fonts ./dist && cp -a src/images ./dist && cp package.json ./dist/package.json && npm publish ./dist"
7
+ "copy": "cp -a src/rich/AIEditor.css dist/rich/AIEditor.css && cp -a src/icon dist/icon && cp -a src/images dist/images",
8
+ "pub-m": "tsc && npm run copy && cp package.json ./dist/package.json && npm publish ./dist"
8
9
  },
9
10
  "dependencies": {
10
11
  "@ant-design/icons": "5.5.2",
11
12
  "@ant-design/pro-components": "2.8.4",
12
13
  "@emotion/css": "^11.11.2",
14
+ "aieditor": "^1.3.6",
13
15
  "antd": "5.23.2",
14
- "beer-network": "^1.1.1-alpha.17",
15
- "beer-assembly": "^1.1.2-alpha.2",
16
+ "beer-network": "1.2.1",
16
17
  "dayjs": "^1.11.13",
17
- "history": "^5.3.0",
18
- "lodash": "^4.17.21",
19
18
  "react": "^18.2.0",
20
19
  "react-dom": "^18.2.0",
21
20
  "react-router-dom": "^6.15.0"
22
21
  },
23
22
  "devDependencies": {
24
- "@babel/eslint-parser": "^7.22.15",
25
- "@types/lodash": "^4.17.1",
26
- "@types/react": "^18.2.46",
27
- "@types/react-dom": "^18.2.18",
28
- "@typescript-eslint/eslint-plugin": "^6.0.0",
29
- "@typescript-eslint/parser": "^6.0.0",
30
- "eslint": "^8.45.0",
23
+ "@babel/core": "^7.16.0",
24
+ "@svgr/webpack": "^5.5.0",
25
+ "@types/lodash": "^4.17.16",
26
+ "@types/node": "^16.18.101",
27
+ "@types/react": "^18.3.3",
28
+ "@types/react-dom": "^18.3.0",
29
+ "@types/webpack": "^5.28.5",
30
+ "@typescript-eslint/eslint-plugin": "^8.26.1",
31
+ "@typescript-eslint/parser": "^8.26.1",
32
+ "babel-loader": "^8.2.3",
33
+ "babel-plugin-named-asset-import": "^0.3.8",
34
+ "babel-preset-react-app": "^10.0.1",
35
+ "customize-cra": "^1.0.0",
36
+ "dotenv": "^16.4.7",
37
+ "eslint": "^8.3.0",
31
38
  "eslint-config-airbnb": "^19.0.4",
32
- "eslint-config-ali": "^14.0.2",
33
- "eslint-plugin-import": "^2.28.1",
34
- "eslint-plugin-react": "^7.33.2",
35
- "eslint-plugin-react-hooks": "^4.6.0",
36
- "eslint-plugin-react-refresh": "^0.4.3",
37
- "typescript": "^5.4.5"
39
+ "eslint-config-airbnb-base": "^15.0.0",
40
+ "eslint-plugin-import": "^2.29.1",
41
+ "eslint-plugin-react": "^7.37.4",
42
+ "less": "^4.2.2",
43
+ "less-loader": "^12.2.0",
44
+ "react-app-rewired": "^2.2.1",
45
+ "react-scripts": "^5.0.1",
46
+ "serve": "^14.2.4",
47
+ "typescript": "^5.7.3"
38
48
  }
39
49
  }
@@ -4,5 +4,7 @@ export declare type PermissionProps = {
4
4
  permission: string;
5
5
  children?: React.ReactNode | undefined;
6
6
  };
7
- export declare const Component: FC<PermissionProps>;
8
- export default Component;
7
+ /**
8
+ * 权限组件.
9
+ */
10
+ export declare const Permission: FC<PermissionProps>;
@@ -1,7 +1,9 @@
1
1
  import React, { useContext } from 'react';
2
- import PermissionContext from './content/PermissionContext';
3
- export const Component = (props) => {
2
+ import { PermissionContext } from '../content/PermissionContext';
3
+ /**
4
+ * 权限组件.
5
+ */
6
+ export const Permission = (props) => {
4
7
  const { isPermission } = useContext(PermissionContext);
5
8
  return React.createElement(React.Fragment, null, isPermission(props.domain, props.permission) ? props?.children : undefined);
6
9
  };
7
- export default Component;
package/promises.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ * 异步函数增强工具库.
3
+ */
1
4
  export declare class Promises {
2
5
  /**
3
6
  * 获取异步任务结果
@@ -5,3 +8,42 @@ export declare class Promises {
5
8
  */
6
9
  static result(promise: Promise<any>): Promise<boolean>;
7
10
  }
11
+ /**
12
+ * 异步任务管理工具.
13
+ */
14
+ export declare class Async {
15
+ private isRun;
16
+ /**
17
+ * 同时只有一个函数能运行.
18
+ * @param func
19
+ */
20
+ run<T>(func: () => Promise<T>): Promise<T | undefined>;
21
+ }
22
+ /**
23
+ * 简单的数值工具类.
24
+ */
25
+ export declare class NumberUtils {
26
+ static isNumeric(value: any): boolean;
27
+ static ifGeZeroNumeric(value: any, defaultValue?: any): any;
28
+ static number(value: any): string;
29
+ static format(value: number): string;
30
+ }
31
+ /**
32
+ * 级联选择工具类.
33
+ */
34
+ export declare class CascadeUtils {
35
+ static recursionFind(dataList: any[], parentId: string): string[];
36
+ }
37
+ /**
38
+ * 数组工具类.
39
+ */
40
+ export declare class ArrayUtils {
41
+ static flat(array?: any[], index?: number): any;
42
+ static toArray(value?: string | number): (string | number)[];
43
+ }
44
+ /**
45
+ * 后退导航工具类.
46
+ */
47
+ export declare class NavigateUtils {
48
+ static useBack(): () => void;
49
+ }
package/promises.js CHANGED
@@ -1,3 +1,10 @@
1
+ import { useLocation, useNavigate } from 'react-router-dom';
2
+ const pathPartition = (sessionStorage.getItem('DETAIL_PARTITION') || '') === ''
3
+ ? ['CREATE', 'EDIT', 'AUDIT', 'PREVIEW', 'DETAIL', 'READ', 'IN', 'INPUT', 'OUTPUT']
4
+ : JSON.parse(sessionStorage.getItem('DETAIL_PARTITION') || '[]');
5
+ /**
6
+ * 异步函数增强工具库.
7
+ */
1
8
  export class Promises {
2
9
  /**
3
10
  * 获取异步任务结果
@@ -10,3 +17,124 @@ export class Promises {
10
17
  });
11
18
  }
12
19
  }
20
+ /**
21
+ * 异步任务管理工具.
22
+ */
23
+ export class Async {
24
+ constructor() {
25
+ this.isRun = false;
26
+ }
27
+ /**
28
+ * 同时只有一个函数能运行.
29
+ * @param func
30
+ */
31
+ async run(func) {
32
+ try {
33
+ if (this.isRun) {
34
+ return undefined;
35
+ }
36
+ this.isRun = true;
37
+ return await func();
38
+ }
39
+ finally {
40
+ this.isRun = false;
41
+ }
42
+ }
43
+ }
44
+ /**
45
+ * 简单的数值工具类.
46
+ */
47
+ export class NumberUtils {
48
+ static isNumeric(value) {
49
+ if (typeof value === 'number') {
50
+ return !Number.isNaN(value);
51
+ }
52
+ if (typeof value === 'string' && value.trim() !== '') {
53
+ return !Number.isNaN(Number(value)) && !Number.isNaN(Number.parseFloat(value));
54
+ }
55
+ return false;
56
+ }
57
+ static ifGeZeroNumeric(value, defaultValue) {
58
+ return this.isNumeric(value) && Number(value) > 0 ? value : defaultValue;
59
+ }
60
+ static number(value) {
61
+ if (value === undefined || value === null || value === '') {
62
+ return '';
63
+ }
64
+ return Number(value)
65
+ .toFixed(2);
66
+ }
67
+ static format(value) {
68
+ return (Math.floor(value * 100) / 100).toFixed(2);
69
+ }
70
+ }
71
+ /**
72
+ * 级联选择工具类.
73
+ */
74
+ export class CascadeUtils {
75
+ static recursionFind(dataList, parentId) {
76
+ if (parentId === '0') {
77
+ return [];
78
+ }
79
+ if (dataList === undefined || dataList.length <= 0) {
80
+ return [];
81
+ }
82
+ for (const item of dataList) {
83
+ if (item.children === undefined || item.children.length <= 0) {
84
+ // 如果没有子集, 能匹配则匹配 不能则跳过循环
85
+ if (item.value === parentId) {
86
+ return [item.value];
87
+ }
88
+ continue;
89
+ }
90
+ else if (item.value === parentId) {
91
+ return [item.value];
92
+ }
93
+ const result = this.recursionFind(item.children, parentId);
94
+ if (result.length <= 0) {
95
+ continue;
96
+ }
97
+ return [item.value, ...result];
98
+ }
99
+ return [];
100
+ }
101
+ }
102
+ /**
103
+ * 数组工具类.
104
+ */
105
+ export class ArrayUtils {
106
+ static flat(array, index) {
107
+ const value = array?.[index || 0];
108
+ return (value === undefined || value === null) ? undefined : value;
109
+ }
110
+ static toArray(value) {
111
+ if (value === undefined || value === null) {
112
+ return [];
113
+ }
114
+ return [value];
115
+ }
116
+ }
117
+ /**
118
+ * 后退导航工具类.
119
+ */
120
+ export class NavigateUtils {
121
+ static useBack() {
122
+ const location = useLocation();
123
+ const navigate = useNavigate();
124
+ return () => {
125
+ let partition = pathPartition.find(path => {
126
+ return location.pathname.toUpperCase()
127
+ .indexOf(`/${path}/`) > -1;
128
+ });
129
+ // 无法确认是否是子页面 则后退一步
130
+ if (partition === undefined) {
131
+ navigate(-1);
132
+ return;
133
+ }
134
+ // 如果确认是子页面 则前进路由
135
+ partition = partition.toLowerCase();
136
+ const path = location.pathname.split(`/${partition}/`)[0];
137
+ navigate(path);
138
+ };
139
+ }
140
+ }