@byteluck-fe/model-driven-shared 6.2.0-1-beta.13 → 6.2.0-1-beta.16
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/README.md +29 -29
- package/dist/esm/calc.js +35 -35
- package/dist/esm/entity/Department.js +7 -7
- package/dist/esm/entity/User.js +39 -39
- package/dist/esm/enum.js +74 -75
- package/dist/esm/locales/en-US.json +158 -158
- package/dist/esm/locales/ja-JP.json +158 -158
- package/dist/esm/locales/zh-CN.json +241 -241
- package/dist/esm/updateValueFromKeys.js +6 -6
- package/dist/esm/utils.js +10 -10
- package/dist/index.umd.js +1 -1
- package/dist/types/EventLogic.d.ts +341 -341
- package/dist/types/RulesMessage.d.ts +13 -13
- package/dist/types/calc.d.ts +74 -74
- package/dist/types/constant.d.ts +2 -2
- package/dist/types/entity/Department.d.ts +15 -15
- package/dist/types/entity/User.d.ts +85 -85
- package/dist/types/entity/index.d.ts +2 -2
- package/dist/types/enum.d.ts +275 -276
- package/dist/types/genNonDuplicateId.d.ts +1 -1
- package/dist/types/index.d.ts +13 -13
- package/dist/types/locales/index.d.ts +560 -560
- package/dist/types/log.d.ts +5 -5
- package/dist/types/loopControls.d.ts +1 -1
- package/dist/types/updateValueFromKeys.d.ts +8 -8
- package/dist/types/utils.d.ts +53 -53
- package/dist/types/watcher.d.ts +14 -14
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import messages from './locales';
|
|
2
|
-
type Message = Partial<(typeof messages)['zhCN']>;
|
|
3
|
-
type Keys = 'caption' | 'placeholder' | 'max' | 'min';
|
|
4
|
-
type Variable = {
|
|
5
|
-
[key in Keys]?: string | number;
|
|
6
|
-
};
|
|
7
|
-
export declare class RulesMessage {
|
|
8
|
-
static $i18n: void;
|
|
9
|
-
static getMessage(messageKey: keyof Message, variable?: Variable): string;
|
|
10
|
-
static resetI18n(locale?: string): void;
|
|
11
|
-
static setLocale(locale: string, messagesI18n: any): void;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
1
|
+
import messages from './locales';
|
|
2
|
+
type Message = Partial<(typeof messages)['zhCN']>;
|
|
3
|
+
type Keys = 'caption' | 'placeholder' | 'max' | 'min';
|
|
4
|
+
type Variable = {
|
|
5
|
+
[key in Keys]?: string | number;
|
|
6
|
+
};
|
|
7
|
+
export declare class RulesMessage {
|
|
8
|
+
static $i18n: void;
|
|
9
|
+
static getMessage(messageKey: keyof Message, variable?: Variable): string;
|
|
10
|
+
static resetI18n(locale?: string): void;
|
|
11
|
+
static setLocale(locale: string, messagesI18n: any): void;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
package/dist/types/calc.d.ts
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
export declare enum CALC_TOKEN_TYPE {
|
|
2
|
-
/**
|
|
3
|
-
* 数值
|
|
4
|
-
* */
|
|
5
|
-
Number = "Number",
|
|
6
|
-
/**
|
|
7
|
-
* 公式符号
|
|
8
|
-
* */
|
|
9
|
-
Operator = "Operator",
|
|
10
|
-
/**
|
|
11
|
-
* 变量存在于主页面中
|
|
12
|
-
* */
|
|
13
|
-
VariableInMainTable = "VariableInMainTable",
|
|
14
|
-
/**
|
|
15
|
-
* 变量存在当前明细子表内
|
|
16
|
-
* 说明计算公式在明细子表的某一行,且依赖项也在同一行内
|
|
17
|
-
* */
|
|
18
|
-
VariableInCurrentSubTable = "VariableInCurrentSubTable",
|
|
19
|
-
/**
|
|
20
|
-
* 变量存在其它明细子表内
|
|
21
|
-
* 说明计算公式依赖于其它明细子表,计算公式可能在明细子表内,也可能不在
|
|
22
|
-
* */
|
|
23
|
-
VariableInOtherSubTable = "VariableInOtherSubTable",
|
|
24
|
-
/**
|
|
25
|
-
* 未定义的变量
|
|
26
|
-
* 当绑定的变量在schema中不存在时,会成为该项,在设计态会报错
|
|
27
|
-
* */
|
|
28
|
-
UndefinedVariable = "UndefinedVariable"
|
|
29
|
-
}
|
|
30
|
-
export declare enum CALC_AGGREGATE_TYPE {
|
|
31
|
-
/**
|
|
32
|
-
* 总和
|
|
33
|
-
* */
|
|
34
|
-
SUM = "SUM",
|
|
35
|
-
/**
|
|
36
|
-
* 平均值
|
|
37
|
-
* */
|
|
38
|
-
AVG = "AVG",
|
|
39
|
-
/**
|
|
40
|
-
* 最大值
|
|
41
|
-
* */
|
|
42
|
-
MAX = "MAX",
|
|
43
|
-
/**
|
|
44
|
-
* 最小值
|
|
45
|
-
* */
|
|
46
|
-
MIN = "MIN"
|
|
47
|
-
}
|
|
48
|
-
export declare class CalcScriptEchoItem {
|
|
49
|
-
/**
|
|
50
|
-
* 变量名称或者公式符号或者数值
|
|
51
|
-
* */
|
|
52
|
-
name: string;
|
|
53
|
-
/**
|
|
54
|
-
* 如果是变量的话,id为控件id
|
|
55
|
-
* */
|
|
56
|
-
id: string;
|
|
57
|
-
/**
|
|
58
|
-
* 当前值的类型
|
|
59
|
-
* */
|
|
60
|
-
type: CALC_TOKEN_TYPE;
|
|
61
|
-
/**
|
|
62
|
-
* 绑定的是明细子表变量时,必须有subTableId
|
|
63
|
-
* */
|
|
64
|
-
subTableId?: string;
|
|
65
|
-
/**
|
|
66
|
-
* 绑定的是明细子表内变量时,必须有subTableName
|
|
67
|
-
* */
|
|
68
|
-
subTableName?: string;
|
|
69
|
-
/**
|
|
70
|
-
* 绑定的是其它明细子表内变量时,必须有aggregateType
|
|
71
|
-
* */
|
|
72
|
-
aggregateType?: CALC_AGGREGATE_TYPE;
|
|
73
|
-
constructor(props: Partial<CalcScriptEchoItem>);
|
|
74
|
-
}
|
|
1
|
+
export declare enum CALC_TOKEN_TYPE {
|
|
2
|
+
/**
|
|
3
|
+
* 数值
|
|
4
|
+
* */
|
|
5
|
+
Number = "Number",
|
|
6
|
+
/**
|
|
7
|
+
* 公式符号
|
|
8
|
+
* */
|
|
9
|
+
Operator = "Operator",
|
|
10
|
+
/**
|
|
11
|
+
* 变量存在于主页面中
|
|
12
|
+
* */
|
|
13
|
+
VariableInMainTable = "VariableInMainTable",
|
|
14
|
+
/**
|
|
15
|
+
* 变量存在当前明细子表内
|
|
16
|
+
* 说明计算公式在明细子表的某一行,且依赖项也在同一行内
|
|
17
|
+
* */
|
|
18
|
+
VariableInCurrentSubTable = "VariableInCurrentSubTable",
|
|
19
|
+
/**
|
|
20
|
+
* 变量存在其它明细子表内
|
|
21
|
+
* 说明计算公式依赖于其它明细子表,计算公式可能在明细子表内,也可能不在
|
|
22
|
+
* */
|
|
23
|
+
VariableInOtherSubTable = "VariableInOtherSubTable",
|
|
24
|
+
/**
|
|
25
|
+
* 未定义的变量
|
|
26
|
+
* 当绑定的变量在schema中不存在时,会成为该项,在设计态会报错
|
|
27
|
+
* */
|
|
28
|
+
UndefinedVariable = "UndefinedVariable"
|
|
29
|
+
}
|
|
30
|
+
export declare enum CALC_AGGREGATE_TYPE {
|
|
31
|
+
/**
|
|
32
|
+
* 总和
|
|
33
|
+
* */
|
|
34
|
+
SUM = "SUM",
|
|
35
|
+
/**
|
|
36
|
+
* 平均值
|
|
37
|
+
* */
|
|
38
|
+
AVG = "AVG",
|
|
39
|
+
/**
|
|
40
|
+
* 最大值
|
|
41
|
+
* */
|
|
42
|
+
MAX = "MAX",
|
|
43
|
+
/**
|
|
44
|
+
* 最小值
|
|
45
|
+
* */
|
|
46
|
+
MIN = "MIN"
|
|
47
|
+
}
|
|
48
|
+
export declare class CalcScriptEchoItem {
|
|
49
|
+
/**
|
|
50
|
+
* 变量名称或者公式符号或者数值
|
|
51
|
+
* */
|
|
52
|
+
name: string;
|
|
53
|
+
/**
|
|
54
|
+
* 如果是变量的话,id为控件id
|
|
55
|
+
* */
|
|
56
|
+
id: string;
|
|
57
|
+
/**
|
|
58
|
+
* 当前值的类型
|
|
59
|
+
* */
|
|
60
|
+
type: CALC_TOKEN_TYPE;
|
|
61
|
+
/**
|
|
62
|
+
* 绑定的是明细子表变量时,必须有subTableId
|
|
63
|
+
* */
|
|
64
|
+
subTableId?: string;
|
|
65
|
+
/**
|
|
66
|
+
* 绑定的是明细子表内变量时,必须有subTableName
|
|
67
|
+
* */
|
|
68
|
+
subTableName?: string;
|
|
69
|
+
/**
|
|
70
|
+
* 绑定的是其它明细子表内变量时,必须有aggregateType
|
|
71
|
+
* */
|
|
72
|
+
aggregateType?: CALC_AGGREGATE_TYPE;
|
|
73
|
+
constructor(props: Partial<CalcScriptEchoItem>);
|
|
74
|
+
}
|
package/dist/types/constant.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DEFAULT_LOCALE: string;
|
|
2
|
-
export declare const noop: () => void;
|
|
1
|
+
export declare const DEFAULT_LOCALE: string;
|
|
2
|
+
export declare const noop: () => void;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author qiyu
|
|
3
|
-
* @description 属性只是简单从接口拿过来,还未仔细考虑
|
|
4
|
-
*/
|
|
5
|
-
export declare class DepartmentEntity {
|
|
6
|
-
'department_en_name'?: string;
|
|
7
|
-
/**
|
|
8
|
-
* 部门编号
|
|
9
|
-
*/
|
|
10
|
-
'department_id'?: string;
|
|
11
|
-
/**
|
|
12
|
-
* 部门名称
|
|
13
|
-
*/
|
|
14
|
-
'department_name'?: string;
|
|
15
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @author qiyu
|
|
3
|
+
* @description 属性只是简单从接口拿过来,还未仔细考虑
|
|
4
|
+
*/
|
|
5
|
+
export declare class DepartmentEntity {
|
|
6
|
+
'department_en_name'?: string;
|
|
7
|
+
/**
|
|
8
|
+
* 部门编号
|
|
9
|
+
*/
|
|
10
|
+
'department_id'?: string;
|
|
11
|
+
/**
|
|
12
|
+
* 部门名称
|
|
13
|
+
*/
|
|
14
|
+
'department_name'?: string;
|
|
15
|
+
}
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author qiyu
|
|
3
|
-
* @description 属性只是简单从接口拿过来,还未仔细考虑
|
|
4
|
-
*/
|
|
5
|
-
export declare class UserEntity {
|
|
6
|
-
'avatar_big'?: string;
|
|
7
|
-
'avatar_small'?: string;
|
|
8
|
-
/**
|
|
9
|
-
* 员工头像地址
|
|
10
|
-
*/
|
|
11
|
-
'avatar_url'?: string;
|
|
12
|
-
/**
|
|
13
|
-
* 归属部门英文名称
|
|
14
|
-
*/
|
|
15
|
-
'belong_dept_en_name'?: string;
|
|
16
|
-
'belong_dept_id_list'?: Array<string>;
|
|
17
|
-
/**
|
|
18
|
-
* 归属部门ID
|
|
19
|
-
*/
|
|
20
|
-
'belong_dept_ids'?: string;
|
|
21
|
-
/**
|
|
22
|
-
* 归属部门名称
|
|
23
|
-
*/
|
|
24
|
-
'belong_dept_name'?: string;
|
|
25
|
-
/**
|
|
26
|
-
* 当前语言版本
|
|
27
|
-
*/
|
|
28
|
-
'cookie_language_enum'?: 'ZH_CN' | 'EN_US' | 'JA_JP';
|
|
29
|
-
/**
|
|
30
|
-
* 部门id
|
|
31
|
-
*/
|
|
32
|
-
'department_id'?: string;
|
|
33
|
-
/**
|
|
34
|
-
* 部门名称
|
|
35
|
-
*/
|
|
36
|
-
'department_name'?: string;
|
|
37
|
-
/**
|
|
38
|
-
* 员工邮箱
|
|
39
|
-
*/
|
|
40
|
-
'email'?: string;
|
|
41
|
-
/**
|
|
42
|
-
* 工号
|
|
43
|
-
*/
|
|
44
|
-
'employee_card'?: string;
|
|
45
|
-
/**
|
|
46
|
-
* 英文名
|
|
47
|
-
*/
|
|
48
|
-
'employee_en_name'?: string;
|
|
49
|
-
/**
|
|
50
|
-
* 员工编号
|
|
51
|
-
*/
|
|
52
|
-
'employee_id'?: string;
|
|
53
|
-
/**
|
|
54
|
-
* 员工姓名
|
|
55
|
-
*/
|
|
56
|
-
'employee_name'?: string;
|
|
57
|
-
'external_user'?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* 性别
|
|
60
|
-
*/
|
|
61
|
-
'gender'?: number;
|
|
62
|
-
'is_show_chat_group'?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* 负责部门英文名称
|
|
65
|
-
*/
|
|
66
|
-
'manage_dept_en_name'?: string;
|
|
67
|
-
/**
|
|
68
|
-
* 负责部门ID
|
|
69
|
-
*/
|
|
70
|
-
'manage_dept_ids'?: string;
|
|
71
|
-
/**
|
|
72
|
-
* 负责部门名称
|
|
73
|
-
*/
|
|
74
|
-
'manage_dept_name'?: string;
|
|
75
|
-
'msg_relation_type'?: string;
|
|
76
|
-
/**
|
|
77
|
-
* 职级
|
|
78
|
-
*/
|
|
79
|
-
'sequence'?: string;
|
|
80
|
-
/**
|
|
81
|
-
* 固定电话
|
|
82
|
-
*/
|
|
83
|
-
'telephone'?: string;
|
|
84
|
-
'tenant_id'?: string;
|
|
85
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @author qiyu
|
|
3
|
+
* @description 属性只是简单从接口拿过来,还未仔细考虑
|
|
4
|
+
*/
|
|
5
|
+
export declare class UserEntity {
|
|
6
|
+
'avatar_big'?: string;
|
|
7
|
+
'avatar_small'?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 员工头像地址
|
|
10
|
+
*/
|
|
11
|
+
'avatar_url'?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 归属部门英文名称
|
|
14
|
+
*/
|
|
15
|
+
'belong_dept_en_name'?: string;
|
|
16
|
+
'belong_dept_id_list'?: Array<string>;
|
|
17
|
+
/**
|
|
18
|
+
* 归属部门ID
|
|
19
|
+
*/
|
|
20
|
+
'belong_dept_ids'?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 归属部门名称
|
|
23
|
+
*/
|
|
24
|
+
'belong_dept_name'?: string;
|
|
25
|
+
/**
|
|
26
|
+
* 当前语言版本
|
|
27
|
+
*/
|
|
28
|
+
'cookie_language_enum'?: 'ZH_CN' | 'EN_US' | 'JA_JP';
|
|
29
|
+
/**
|
|
30
|
+
* 部门id
|
|
31
|
+
*/
|
|
32
|
+
'department_id'?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 部门名称
|
|
35
|
+
*/
|
|
36
|
+
'department_name'?: string;
|
|
37
|
+
/**
|
|
38
|
+
* 员工邮箱
|
|
39
|
+
*/
|
|
40
|
+
'email'?: string;
|
|
41
|
+
/**
|
|
42
|
+
* 工号
|
|
43
|
+
*/
|
|
44
|
+
'employee_card'?: string;
|
|
45
|
+
/**
|
|
46
|
+
* 英文名
|
|
47
|
+
*/
|
|
48
|
+
'employee_en_name'?: string;
|
|
49
|
+
/**
|
|
50
|
+
* 员工编号
|
|
51
|
+
*/
|
|
52
|
+
'employee_id'?: string;
|
|
53
|
+
/**
|
|
54
|
+
* 员工姓名
|
|
55
|
+
*/
|
|
56
|
+
'employee_name'?: string;
|
|
57
|
+
'external_user'?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* 性别
|
|
60
|
+
*/
|
|
61
|
+
'gender'?: number;
|
|
62
|
+
'is_show_chat_group'?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* 负责部门英文名称
|
|
65
|
+
*/
|
|
66
|
+
'manage_dept_en_name'?: string;
|
|
67
|
+
/**
|
|
68
|
+
* 负责部门ID
|
|
69
|
+
*/
|
|
70
|
+
'manage_dept_ids'?: string;
|
|
71
|
+
/**
|
|
72
|
+
* 负责部门名称
|
|
73
|
+
*/
|
|
74
|
+
'manage_dept_name'?: string;
|
|
75
|
+
'msg_relation_type'?: string;
|
|
76
|
+
/**
|
|
77
|
+
* 职级
|
|
78
|
+
*/
|
|
79
|
+
'sequence'?: string;
|
|
80
|
+
/**
|
|
81
|
+
* 固定电话
|
|
82
|
+
*/
|
|
83
|
+
'telephone'?: string;
|
|
84
|
+
'tenant_id'?: string;
|
|
85
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './Department';
|
|
2
|
-
export * from './User';
|
|
1
|
+
export * from './Department';
|
|
2
|
+
export * from './User';
|