@etsoo/materialui 1.2.79 → 1.2.80

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.
@@ -3,14 +3,23 @@ import { IActionResult, IUser } from "@etsoo/appscript";
3
3
  * Service user interface
4
4
  */
5
5
  export interface IServiceUser extends IUser {
6
+ /**
7
+ * Global user id
8
+ * 全局用户编号
9
+ */
10
+ readonly uid?: string;
11
+ /**
12
+ * Organization name
13
+ */
14
+ readonly organizationName: string;
6
15
  /**
7
16
  * Service device id
8
17
  */
9
- serviceDeviceId: string;
18
+ readonly serviceDeviceId: string;
10
19
  /**
11
20
  * Service passphrase encrypted
12
21
  */
13
- servicePassphrase: string;
22
+ readonly servicePassphrase: string;
14
23
  }
15
24
  /**
16
25
  * Service user login result
@@ -1,10 +1,16 @@
1
- import { IActionResult, IUser } from '@etsoo/appscript';
1
+ import { IActionResult, IUser } from "@etsoo/appscript";
2
2
  /**
3
3
  * SmartERP user interface
4
4
  */
5
5
  export interface ISmartERPUser extends IUser {
6
+ /**
7
+ * Global user id
8
+ * 全局用户编号
9
+ */
10
+ readonly uid?: string;
6
11
  /**
7
12
  * Service refresh token
13
+ * 服务刷新令牌
8
14
  */
9
15
  readonly serviceToken?: string;
10
16
  }
@@ -18,10 +18,11 @@ export function OperationMessageContainer(props) {
18
18
  React.useEffect(() => {
19
19
  const my = typeof handler === "function"
20
20
  ? handler
21
- : (_user, _isSelf, message) => {
21
+ : (_user, isSelf, message) => {
22
22
  const [types, callback, id] = handler;
23
23
  if (id == null || id === message.id) {
24
- if (!types.includes(message.operationType))
24
+ // Check types & isSelf
25
+ if (!isSelf || !types.includes(message.operationType))
25
26
  return;
26
27
  resetSeed();
27
28
  refs.current.seed = window.setTimeout(callback, timeout);
@@ -8,6 +8,11 @@ export type OperationMessageDto = {
8
8
  * 操作类型
9
9
  */
10
10
  operationType: string;
11
+ /**
12
+ * Device id
13
+ * 设备编号
14
+ */
15
+ deviceId: number;
11
16
  /**
12
17
  * Target object id
13
18
  * 目标对象编号
@@ -4,8 +4,8 @@ import { UserRole } from "@etsoo/appscript";
4
4
  */
5
5
  export type SignalRUser = {
6
6
  /**
7
- * Id
8
- * 编号
7
+ * Global id, not local system user id
8
+ * 全局用户编号,不是子系统用户编号
9
9
  */
10
10
  id: number;
11
11
  /**
@@ -22,7 +22,7 @@ export type SignalRUser = {
22
22
  * Device id
23
23
  * 设备编号
24
24
  */
25
- deviceId: number | number[];
25
+ deviceId: number;
26
26
  /**
27
27
  * Role
28
28
  * 角色
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.2.79",
3
+ "version": "1.2.80",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -50,13 +50,13 @@
50
50
  "@emotion/css": "^11.11.2",
51
51
  "@emotion/react": "^11.11.1",
52
52
  "@emotion/styled": "^11.11.0",
53
- "@etsoo/appscript": "^1.4.29",
53
+ "@etsoo/appscript": "^1.4.30",
54
54
  "@etsoo/notificationbase": "^1.1.25",
55
- "@etsoo/react": "^1.7.0",
55
+ "@etsoo/react": "^1.7.1",
56
56
  "@etsoo/shared": "^1.2.8",
57
57
  "@mui/icons-material": "^5.14.3",
58
58
  "@mui/material": "^5.14.4",
59
- "@mui/x-data-grid": "^6.11.0",
59
+ "@mui/x-data-grid": "^6.11.1",
60
60
  "@types/pica": "^9.0.1",
61
61
  "@types/pulltorefreshjs": "^0.1.5",
62
62
  "@types/react": "^18.2.20",
@@ -4,15 +4,26 @@ import { IActionResult, IUser } from "@etsoo/appscript";
4
4
  * Service user interface
5
5
  */
6
6
  export interface IServiceUser extends IUser {
7
+ /**
8
+ * Global user id
9
+ * 全局用户编号
10
+ */
11
+ readonly uid?: string;
12
+
13
+ /**
14
+ * Organization name
15
+ */
16
+ readonly organizationName: string;
17
+
7
18
  /**
8
19
  * Service device id
9
20
  */
10
- serviceDeviceId: string;
21
+ readonly serviceDeviceId: string;
11
22
 
12
23
  /**
13
24
  * Service passphrase encrypted
14
25
  */
15
- servicePassphrase: string;
26
+ readonly servicePassphrase: string;
16
27
  }
17
28
 
18
29
  /**
@@ -1,13 +1,20 @@
1
- import { IActionResult, IUser } from '@etsoo/appscript';
1
+ import { IActionResult, IUser } from "@etsoo/appscript";
2
2
 
3
3
  /**
4
4
  * SmartERP user interface
5
5
  */
6
6
  export interface ISmartERPUser extends IUser {
7
- /**
8
- * Service refresh token
9
- */
10
- readonly serviceToken?: string;
7
+ /**
8
+ * Global user id
9
+ * 全局用户编号
10
+ */
11
+ readonly uid?: string;
12
+
13
+ /**
14
+ * Service refresh token
15
+ * 服务刷新令牌
16
+ */
17
+ readonly serviceToken?: string;
11
18
  }
12
19
 
13
20
  /**
@@ -47,10 +47,11 @@ export function OperationMessageContainer(
47
47
  const my: OperationMessageHandler =
48
48
  typeof handler === "function"
49
49
  ? handler
50
- : (_user, _isSelf, message) => {
50
+ : (_user, isSelf, message) => {
51
51
  const [types, callback, id] = handler;
52
52
  if (id == null || id === message.id) {
53
- if (!types.includes(message.operationType)) return;
53
+ // Check types & isSelf
54
+ if (!isSelf || !types.includes(message.operationType)) return;
54
55
 
55
56
  resetSeed();
56
57
 
@@ -9,6 +9,12 @@ export type OperationMessageDto = {
9
9
  */
10
10
  operationType: string;
11
11
 
12
+ /**
13
+ * Device id
14
+ * 设备编号
15
+ */
16
+ deviceId: number;
17
+
12
18
  /**
13
19
  * Target object id
14
20
  * 目标对象编号
@@ -5,8 +5,8 @@ import { UserRole } from "@etsoo/appscript";
5
5
  */
6
6
  export type SignalRUser = {
7
7
  /**
8
- * Id
9
- * 编号
8
+ * Global id, not local system user id
9
+ * 全局用户编号,不是子系统用户编号
10
10
  */
11
11
  id: number;
12
12
 
@@ -26,7 +26,7 @@ export type SignalRUser = {
26
26
  * Device id
27
27
  * 设备编号
28
28
  */
29
- deviceId: number | number[];
29
+ deviceId: number;
30
30
 
31
31
  /**
32
32
  * Role