@byteluck-fe/model-driven-shared 2.2.6 → 2.2.7-beta.1
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/dist/esm/EventLogic.js +46 -10
- package/dist/esm/RulesMessage.js +53 -15
- package/dist/esm/calc.js +31 -0
- package/dist/esm/entity/Department.js +20 -0
- package/dist/esm/entity/User.js +74 -0
- package/dist/esm/watcher.js +199 -156
- package/dist/index.umd.js +1 -1
- package/dist/types/EventLogic.d.ts +301 -289
- package/dist/types/RulesMessage.d.ts +14 -14
- 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 +232 -232
- package/dist/types/genNonDuplicateId.d.ts +1 -1
- package/dist/types/index.d.ts +13 -13
- package/dist/types/locales/index.d.ts +204 -204
- 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 +34 -34
- package/dist/types/watcher.d.ts +14 -14
- package/package.json +2 -2
package/dist/esm/EventLogic.js
CHANGED
|
@@ -3,6 +3,33 @@ function _classCallCheck(instance, Constructor) {
|
|
|
3
3
|
throw new TypeError("Cannot call a class as a function");
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
|
+
function _defineProperties(target, props) {
|
|
7
|
+
for(var i = 0; i < props.length; i++){
|
|
8
|
+
var descriptor = props[i];
|
|
9
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
10
|
+
descriptor.configurable = true;
|
|
11
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
12
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
16
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
17
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
18
|
+
return Constructor;
|
|
19
|
+
}
|
|
20
|
+
function _defineProperty(obj, key, value) {
|
|
21
|
+
if (key in obj) {
|
|
22
|
+
Object.defineProperty(obj, key, {
|
|
23
|
+
value: value,
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true
|
|
27
|
+
});
|
|
28
|
+
} else {
|
|
29
|
+
obj[key] = value;
|
|
30
|
+
}
|
|
31
|
+
return obj;
|
|
32
|
+
}
|
|
6
33
|
// type InnerEventCode = 'click' | 'click-finish' | 'change'
|
|
7
34
|
var eventMap = [
|
|
8
35
|
{
|
|
@@ -45,6 +72,11 @@ var eventMap = [
|
|
|
45
72
|
name: "列表数据删除时",
|
|
46
73
|
code: "list-delete"
|
|
47
74
|
},
|
|
75
|
+
{
|
|
76
|
+
key: "on_list_before_insert",
|
|
77
|
+
name: "列表数据插入前",
|
|
78
|
+
code: "list-before-insert"
|
|
79
|
+
},
|
|
48
80
|
{
|
|
49
81
|
key: "on_input",
|
|
50
82
|
name: "用户输入时",
|
|
@@ -121,15 +153,19 @@ export var EventLogic = /*#__PURE__*/ function() {
|
|
|
121
153
|
function EventLogic() {
|
|
122
154
|
_classCallCheck(this, EventLogic);
|
|
123
155
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
keys
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
156
|
+
_createClass(EventLogic, [
|
|
157
|
+
{
|
|
158
|
+
key: "getEventsFromKeys",
|
|
159
|
+
value: function getEventsFromKeys(keys) {
|
|
160
|
+
var eventKeys = typeof keys === "string" ? [
|
|
161
|
+
keys
|
|
162
|
+
] : keys;
|
|
163
|
+
return EventLogic.events.filter(function(item) {
|
|
164
|
+
return eventKeys.includes(item.key);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
]);
|
|
133
169
|
return EventLogic;
|
|
134
170
|
}();
|
|
135
|
-
EventLogic
|
|
171
|
+
_defineProperty(EventLogic, "events", eventMap);
|
package/dist/esm/RulesMessage.js
CHANGED
|
@@ -3,6 +3,33 @@ function _classCallCheck(instance, Constructor) {
|
|
|
3
3
|
throw new TypeError("Cannot call a class as a function");
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
|
+
function _defineProperties(target, props) {
|
|
7
|
+
for(var i = 0; i < props.length; i++){
|
|
8
|
+
var descriptor = props[i];
|
|
9
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
10
|
+
descriptor.configurable = true;
|
|
11
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
12
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
16
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
17
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
18
|
+
return Constructor;
|
|
19
|
+
}
|
|
20
|
+
function _defineProperty(obj, key, value) {
|
|
21
|
+
if (key in obj) {
|
|
22
|
+
Object.defineProperty(obj, key, {
|
|
23
|
+
value: value,
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true
|
|
27
|
+
});
|
|
28
|
+
} else {
|
|
29
|
+
obj[key] = value;
|
|
30
|
+
}
|
|
31
|
+
return obj;
|
|
32
|
+
}
|
|
6
33
|
import OkI18n from "ok-i18n";
|
|
7
34
|
import messages from "./locales";
|
|
8
35
|
import { DEFAULT_LOCALE } from "./constant";
|
|
@@ -11,20 +38,31 @@ export var RulesMessage = /*#__PURE__*/ function() {
|
|
|
11
38
|
function RulesMessage() {
|
|
12
39
|
_classCallCheck(this, RulesMessage);
|
|
13
40
|
}
|
|
14
|
-
RulesMessage
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
41
|
+
_createClass(RulesMessage, null, [
|
|
42
|
+
{
|
|
43
|
+
key: "getMessage",
|
|
44
|
+
value: function getMessage(messageKey) {
|
|
45
|
+
var variable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
46
|
+
return this.$i18n.$t(messageKey, "", variable);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
key: "resetI18n",
|
|
51
|
+
value: function resetI18n() {
|
|
52
|
+
var locale = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_LOCALE;
|
|
53
|
+
return new OkI18n({
|
|
54
|
+
locale: locale,
|
|
55
|
+
messages: messages
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: "setLocale",
|
|
61
|
+
value: function setLocale(locale) {
|
|
62
|
+
return this.$i18n.setLocale(locale);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]);
|
|
28
66
|
return RulesMessage;
|
|
29
67
|
}();
|
|
30
|
-
RulesMessage
|
|
68
|
+
_defineProperty(RulesMessage, "$i18n", RulesMessage.resetI18n());
|
package/dist/esm/calc.js
CHANGED
|
@@ -3,6 +3,19 @@ function _classCallCheck(instance, Constructor) {
|
|
|
3
3
|
throw new TypeError("Cannot call a class as a function");
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
|
+
function _defineProperty(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else {
|
|
15
|
+
obj[key] = value;
|
|
16
|
+
}
|
|
17
|
+
return obj;
|
|
18
|
+
}
|
|
6
19
|
export var CALC_TOKEN_TYPE;
|
|
7
20
|
(function(CALC_TOKEN_TYPE) {
|
|
8
21
|
CALC_TOKEN_TYPE[/**
|
|
@@ -45,6 +58,24 @@ export var CALC_AGGREGATE_TYPE;
|
|
|
45
58
|
export var CalcScriptEchoItem = function CalcScriptEchoItem(props) {
|
|
46
59
|
"use strict";
|
|
47
60
|
_classCallCheck(this, CalcScriptEchoItem);
|
|
61
|
+
/**
|
|
62
|
+
* 变量名称或者公式符号或者数值
|
|
63
|
+
* */ _defineProperty(this, "name", void 0);
|
|
64
|
+
/**
|
|
65
|
+
* 如果是变量的话,id为控件id
|
|
66
|
+
* */ _defineProperty(this, "id", void 0);
|
|
67
|
+
/**
|
|
68
|
+
* 当前值的类型
|
|
69
|
+
* */ _defineProperty(this, "type", void 0);
|
|
70
|
+
/**
|
|
71
|
+
* 绑定的是明细子表变量时,必须有subTableId
|
|
72
|
+
* */ _defineProperty(this, "subTableId", void 0);
|
|
73
|
+
/**
|
|
74
|
+
* 绑定的是明细子表内变量时,必须有subTableName
|
|
75
|
+
* */ _defineProperty(this, "subTableName", void 0);
|
|
76
|
+
/**
|
|
77
|
+
* 绑定的是其它明细子表内变量时,必须有aggregateType
|
|
78
|
+
* */ _defineProperty(this, "aggregateType", void 0);
|
|
48
79
|
var _props_name;
|
|
49
80
|
this.name = (_props_name = props === null || props === void 0 ? void 0 : props.name) !== null && _props_name !== void 0 ? _props_name : "";
|
|
50
81
|
var _props_id;
|
|
@@ -6,7 +6,27 @@
|
|
|
6
6
|
throw new TypeError("Cannot call a class as a function");
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
+
function _defineProperty(obj, key, value) {
|
|
10
|
+
if (key in obj) {
|
|
11
|
+
Object.defineProperty(obj, key, {
|
|
12
|
+
value: value,
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
obj[key] = value;
|
|
19
|
+
}
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
9
22
|
export var DepartmentEntity = function DepartmentEntity() {
|
|
10
23
|
"use strict";
|
|
11
24
|
_classCallCheck(this, DepartmentEntity);
|
|
25
|
+
_defineProperty(this, "department_en_name", void 0);
|
|
26
|
+
/**
|
|
27
|
+
* 部门编号
|
|
28
|
+
*/ _defineProperty(this, "department_id", void 0);
|
|
29
|
+
/**
|
|
30
|
+
* 部门名称
|
|
31
|
+
*/ _defineProperty(this, "department_name", void 0);
|
|
12
32
|
};
|
package/dist/esm/entity/User.js
CHANGED
|
@@ -6,7 +6,81 @@
|
|
|
6
6
|
throw new TypeError("Cannot call a class as a function");
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
+
function _defineProperty(obj, key, value) {
|
|
10
|
+
if (key in obj) {
|
|
11
|
+
Object.defineProperty(obj, key, {
|
|
12
|
+
value: value,
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
obj[key] = value;
|
|
19
|
+
}
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
9
22
|
export var UserEntity = function UserEntity() {
|
|
10
23
|
"use strict";
|
|
11
24
|
_classCallCheck(this, UserEntity);
|
|
25
|
+
_defineProperty(this, "avatar_big", void 0);
|
|
26
|
+
_defineProperty(this, "avatar_small", void 0);
|
|
27
|
+
/**
|
|
28
|
+
* 员工头像地址
|
|
29
|
+
*/ _defineProperty(this, "avatar_url", void 0);
|
|
30
|
+
/**
|
|
31
|
+
* 归属部门英文名称
|
|
32
|
+
*/ _defineProperty(this, "belong_dept_en_name", void 0);
|
|
33
|
+
_defineProperty(this, "belong_dept_id_list", void 0);
|
|
34
|
+
/**
|
|
35
|
+
* 归属部门ID
|
|
36
|
+
*/ _defineProperty(this, "belong_dept_ids", void 0);
|
|
37
|
+
/**
|
|
38
|
+
* 归属部门名称
|
|
39
|
+
*/ _defineProperty(this, "belong_dept_name", void 0);
|
|
40
|
+
/**
|
|
41
|
+
* 当前语言版本
|
|
42
|
+
*/ _defineProperty(this, "cookie_language_enum", void 0);
|
|
43
|
+
/**
|
|
44
|
+
* 部门id
|
|
45
|
+
*/ _defineProperty(this, "department_id", void 0);
|
|
46
|
+
/**
|
|
47
|
+
* 部门名称
|
|
48
|
+
*/ _defineProperty(this, "department_name", void 0);
|
|
49
|
+
/**
|
|
50
|
+
* 员工邮箱
|
|
51
|
+
*/ _defineProperty(this, "email", void 0);
|
|
52
|
+
/**
|
|
53
|
+
* 工号
|
|
54
|
+
*/ _defineProperty(this, "employee_card", void 0);
|
|
55
|
+
/**
|
|
56
|
+
* 英文名
|
|
57
|
+
*/ _defineProperty(this, "employee_en_name", void 0);
|
|
58
|
+
/**
|
|
59
|
+
* 员工编号
|
|
60
|
+
*/ _defineProperty(this, "employee_id", void 0);
|
|
61
|
+
/**
|
|
62
|
+
* 员工姓名
|
|
63
|
+
*/ _defineProperty(this, "employee_name", void 0);
|
|
64
|
+
_defineProperty(this, "external_user", void 0);
|
|
65
|
+
/**
|
|
66
|
+
* 性别
|
|
67
|
+
*/ _defineProperty(this, "gender", void 0);
|
|
68
|
+
_defineProperty(this, "is_show_chat_group", void 0);
|
|
69
|
+
/**
|
|
70
|
+
* 负责部门英文名称
|
|
71
|
+
*/ _defineProperty(this, "manage_dept_en_name", void 0);
|
|
72
|
+
/**
|
|
73
|
+
* 负责部门ID
|
|
74
|
+
*/ _defineProperty(this, "manage_dept_ids", void 0);
|
|
75
|
+
/**
|
|
76
|
+
* 负责部门名称
|
|
77
|
+
*/ _defineProperty(this, "manage_dept_name", void 0);
|
|
78
|
+
_defineProperty(this, "msg_relation_type", void 0);
|
|
79
|
+
/**
|
|
80
|
+
* 职级
|
|
81
|
+
*/ _defineProperty(this, "sequence", void 0);
|
|
82
|
+
/**
|
|
83
|
+
* 固定电话
|
|
84
|
+
*/ _defineProperty(this, "telephone", void 0);
|
|
85
|
+
_defineProperty(this, "tenant_id", void 0);
|
|
12
86
|
};
|