@byteluck-fe/model-driven-shared 1.3.0-beta.25 → 1.3.0-beta.28
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 +115 -0
- package/dist/esm/RulesMessage.js +30 -0
- package/dist/esm/calc.js +60 -0
- package/dist/esm/constant.js +2 -0
- package/dist/esm/entity/Department.js +12 -0
- package/dist/esm/entity/User.js +12 -0
- package/dist/esm/entity/index.js +2 -0
- package/dist/esm/enum.js +213 -0
- package/dist/esm/genNonDuplicateId.js +13 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/locales/en-US.json +63 -0
- package/dist/esm/locales/index.js +8 -0
- package/dist/esm/locales/ja-JP.json +63 -0
- package/dist/esm/locales/zh-CN.json +66 -0
- package/dist/esm/log.js +215 -0
- package/dist/esm/loopControls.js +23 -0
- package/dist/esm/updateValueFromKeys.js +31 -0
- package/dist/esm/utils.js +123 -0
- package/dist/esm/watcher.js +221 -0
- package/dist/types/EventLogic.d.ts +241 -0
- package/dist/types/RulesMessage.d.ts +14 -0
- package/dist/types/calc.d.ts +74 -0
- package/dist/types/constant.d.ts +2 -0
- package/dist/types/entity/Department.d.ts +15 -0
- package/dist/types/entity/User.d.ts +85 -0
- package/dist/types/entity/index.d.ts +2 -0
- package/dist/types/enum.d.ts +231 -0
- package/dist/types/genNonDuplicateId.d.ts +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/locales/index.d.ts +195 -0
- package/dist/types/log.d.ts +5 -0
- package/dist/types/loopControls.d.ts +1 -0
- package/dist/types/shared/src/EventLogic.d.ts +241 -0
- package/dist/types/shared/src/RulesMessage.d.ts +14 -0
- package/dist/types/shared/src/calc.d.ts +74 -0
- package/dist/types/shared/src/constant.d.ts +2 -0
- package/dist/types/shared/src/entity/Department.d.ts +15 -0
- package/dist/types/shared/src/entity/User.d.ts +85 -0
- package/dist/types/shared/src/entity/index.d.ts +2 -0
- package/dist/types/shared/src/enum.d.ts +231 -0
- package/dist/types/shared/src/genNonDuplicateId.d.ts +1 -0
- package/dist/types/shared/src/index.d.ts +13 -0
- package/dist/types/shared/src/locales/index.d.ts +195 -0
- package/dist/types/shared/src/log.d.ts +5 -0
- package/dist/types/shared/src/loopControls.d.ts +1 -0
- package/dist/types/shared/src/updateValueFromKeys.d.ts +8 -0
- package/dist/types/shared/src/utils.d.ts +34 -0
- package/dist/types/shared/src/watcher.d.ts +14 -0
- package/dist/types/updateValueFromKeys.d.ts +8 -0
- package/dist/types/utils.d.ts +34 -0
- package/dist/types/watcher.d.ts +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) {
|
|
2
|
+
if (!(instance instanceof Constructor)) {
|
|
3
|
+
throw new TypeError("Cannot call a class as a function");
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
// type InnerEventCode = 'click' | 'click-finish' | 'change'
|
|
7
|
+
var eventMap = [
|
|
8
|
+
{
|
|
9
|
+
key: "on_click",
|
|
10
|
+
name: "点击时",
|
|
11
|
+
code: "click"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
key: "on_click_finish",
|
|
15
|
+
name: "执行完成时",
|
|
16
|
+
code: "click-finish"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
key: "on_change",
|
|
20
|
+
name: "值发生变化时",
|
|
21
|
+
code: "change"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: "on_search",
|
|
25
|
+
name: "搜索时",
|
|
26
|
+
code: "search"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: "on_list_change",
|
|
30
|
+
name: "列表数据变化时",
|
|
31
|
+
code: "list-change"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: "on_list_search",
|
|
35
|
+
name: "列表数据查询构建时",
|
|
36
|
+
code: "list-search"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: "on_list_mounted",
|
|
40
|
+
name: "列表数据返回时",
|
|
41
|
+
code: "list-mounted"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: "on_list_delete",
|
|
45
|
+
name: "列表数据删除时",
|
|
46
|
+
code: "list-delete"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "on_input",
|
|
50
|
+
name: "用户输入时",
|
|
51
|
+
code: "input"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: "on_blur",
|
|
55
|
+
name: "失去焦点时",
|
|
56
|
+
code: "blur"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
key: "on_focus",
|
|
60
|
+
name: "获取焦点时",
|
|
61
|
+
code: "focus"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
key: "on_wps_open",
|
|
65
|
+
name: "打开文件时",
|
|
66
|
+
code: "wps-open"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
key: "on_wps_save",
|
|
70
|
+
name: "保存文件时",
|
|
71
|
+
code: "wps-save"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
key: "on_wps_rename",
|
|
75
|
+
name: "重命名时",
|
|
76
|
+
code: "wps-rename"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
key: "on_list_actions",
|
|
80
|
+
name: "点击操作按钮时",
|
|
81
|
+
code: "list-actions"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
key: "on_list_rowclick",
|
|
85
|
+
name: "行点击时",
|
|
86
|
+
code: "list-rowclick"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: "on_list_before_rowdelete",
|
|
90
|
+
name: "行删除前",
|
|
91
|
+
code: "list-before-rowdelete"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
key: "on_list_before_import",
|
|
95
|
+
name: "列表数据导入前",
|
|
96
|
+
code: "list-before-import"
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
export var EventLogic = /*#__PURE__*/ function() {
|
|
100
|
+
"use strict";
|
|
101
|
+
function EventLogic() {
|
|
102
|
+
_classCallCheck(this, EventLogic);
|
|
103
|
+
}
|
|
104
|
+
var _proto = EventLogic.prototype;
|
|
105
|
+
_proto.getEventsFromKeys = function getEventsFromKeys(keys) {
|
|
106
|
+
var eventKeys = typeof keys === "string" ? [
|
|
107
|
+
keys
|
|
108
|
+
] : keys;
|
|
109
|
+
return EventLogic.events.filter(function(item) {
|
|
110
|
+
return eventKeys.includes(item.key);
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
return EventLogic;
|
|
114
|
+
}();
|
|
115
|
+
EventLogic.events = eventMap;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) {
|
|
2
|
+
if (!(instance instanceof Constructor)) {
|
|
3
|
+
throw new TypeError("Cannot call a class as a function");
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
import OkI18n from "ok-i18n";
|
|
7
|
+
import messages from "./locales";
|
|
8
|
+
import { DEFAULT_LOCALE } from "./constant";
|
|
9
|
+
export var RulesMessage = /*#__PURE__*/ function() {
|
|
10
|
+
"use strict";
|
|
11
|
+
function RulesMessage() {
|
|
12
|
+
_classCallCheck(this, RulesMessage);
|
|
13
|
+
}
|
|
14
|
+
RulesMessage.getMessage = function getMessage(messageKey) {
|
|
15
|
+
var variable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
16
|
+
return this.$i18n.$t(messageKey, "", variable);
|
|
17
|
+
};
|
|
18
|
+
RulesMessage.resetI18n = function resetI18n() {
|
|
19
|
+
var locale = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_LOCALE;
|
|
20
|
+
return new OkI18n({
|
|
21
|
+
locale: locale,
|
|
22
|
+
messages: messages
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
RulesMessage.setLocale = function setLocale(locale) {
|
|
26
|
+
return this.$i18n.setLocale(locale);
|
|
27
|
+
};
|
|
28
|
+
return RulesMessage;
|
|
29
|
+
}();
|
|
30
|
+
RulesMessage.$i18n = RulesMessage.resetI18n();
|
package/dist/esm/calc.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) {
|
|
2
|
+
if (!(instance instanceof Constructor)) {
|
|
3
|
+
throw new TypeError("Cannot call a class as a function");
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
export var CALC_TOKEN_TYPE;
|
|
7
|
+
(function(CALC_TOKEN_TYPE) {
|
|
8
|
+
CALC_TOKEN_TYPE[/**
|
|
9
|
+
* 数值
|
|
10
|
+
* */ "Number"] = "Number";
|
|
11
|
+
CALC_TOKEN_TYPE[/**
|
|
12
|
+
* 公式符号
|
|
13
|
+
* */ "Operator"] = "Operator";
|
|
14
|
+
CALC_TOKEN_TYPE[/**
|
|
15
|
+
* 变量存在于主页面中
|
|
16
|
+
* */ "VariableInMainTable"] = "VariableInMainTable";
|
|
17
|
+
CALC_TOKEN_TYPE[/**
|
|
18
|
+
* 变量存在当前明细子表内
|
|
19
|
+
* 说明计算公式在明细子表的某一行,且依赖项也在同一行内
|
|
20
|
+
* */ "VariableInCurrentSubTable"] = "VariableInCurrentSubTable";
|
|
21
|
+
CALC_TOKEN_TYPE[/**
|
|
22
|
+
* 变量存在其它明细子表内
|
|
23
|
+
* 说明计算公式依赖于其它明细子表,计算公式可能在明细子表内,也可能不在
|
|
24
|
+
* */ "VariableInOtherSubTable"] = "VariableInOtherSubTable";
|
|
25
|
+
CALC_TOKEN_TYPE[/**
|
|
26
|
+
* 未定义的变量
|
|
27
|
+
* 当绑定的变量在schema中不存在时,会成为该项,在设计态会报错
|
|
28
|
+
* */ "UndefinedVariable"] = "UndefinedVariable";
|
|
29
|
+
})(CALC_TOKEN_TYPE || (CALC_TOKEN_TYPE = {}));
|
|
30
|
+
export var CALC_AGGREGATE_TYPE;
|
|
31
|
+
(function(CALC_AGGREGATE_TYPE) {
|
|
32
|
+
CALC_AGGREGATE_TYPE[/**
|
|
33
|
+
* 总和
|
|
34
|
+
* */ "SUM"] = "SUM";
|
|
35
|
+
CALC_AGGREGATE_TYPE[/**
|
|
36
|
+
* 平均值
|
|
37
|
+
* */ "AVG"] = "AVG";
|
|
38
|
+
CALC_AGGREGATE_TYPE[/**
|
|
39
|
+
* 最大值
|
|
40
|
+
* */ "MAX"] = "MAX";
|
|
41
|
+
CALC_AGGREGATE_TYPE[/**
|
|
42
|
+
* 最小值
|
|
43
|
+
* */ "MIN"] = "MIN";
|
|
44
|
+
})(CALC_AGGREGATE_TYPE || (CALC_AGGREGATE_TYPE = {}));
|
|
45
|
+
export var CalcScriptEchoItem = function CalcScriptEchoItem(props) {
|
|
46
|
+
"use strict";
|
|
47
|
+
_classCallCheck(this, CalcScriptEchoItem);
|
|
48
|
+
var ref;
|
|
49
|
+
this.name = (ref = props === null || props === void 0 ? void 0 : props.name) !== null && ref !== void 0 ? ref : "";
|
|
50
|
+
var ref1;
|
|
51
|
+
this.id = (ref1 = props === null || props === void 0 ? void 0 : props.id) !== null && ref1 !== void 0 ? ref1 : "";
|
|
52
|
+
var ref2;
|
|
53
|
+
this.type = (ref2 = props === null || props === void 0 ? void 0 : props.type) !== null && ref2 !== void 0 ? ref2 : CALC_TOKEN_TYPE.Number;
|
|
54
|
+
var ref3;
|
|
55
|
+
this.subTableId = (ref3 = props === null || props === void 0 ? void 0 : props.subTableId) !== null && ref3 !== void 0 ? ref3 : undefined;
|
|
56
|
+
var ref4;
|
|
57
|
+
this.subTableName = (ref4 = props === null || props === void 0 ? void 0 : props.subTableId) !== null && ref4 !== void 0 ? ref4 : undefined;
|
|
58
|
+
var ref5;
|
|
59
|
+
this.aggregateType = (ref5 = props === null || props === void 0 ? void 0 : props.aggregateType) !== null && ref5 !== void 0 ? ref5 : undefined;
|
|
60
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author qiyu
|
|
3
|
+
* @description 属性只是简单从接口拿过来,还未仔细考虑
|
|
4
|
+
*/ function _classCallCheck(instance, Constructor) {
|
|
5
|
+
if (!(instance instanceof Constructor)) {
|
|
6
|
+
throw new TypeError("Cannot call a class as a function");
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export var DepartmentEntity = function DepartmentEntity() {
|
|
10
|
+
"use strict";
|
|
11
|
+
_classCallCheck(this, DepartmentEntity);
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author qiyu
|
|
3
|
+
* @description 属性只是简单从接口拿过来,还未仔细考虑
|
|
4
|
+
*/ function _classCallCheck(instance, Constructor) {
|
|
5
|
+
if (!(instance instanceof Constructor)) {
|
|
6
|
+
throw new TypeError("Cannot call a class as a function");
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export var UserEntity = function UserEntity() {
|
|
10
|
+
"use strict";
|
|
11
|
+
_classCallCheck(this, UserEntity);
|
|
12
|
+
};
|
package/dist/esm/enum.js
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
export var CONTROL_BASE_TYPE;
|
|
15
|
+
(function(CONTROL_BASE_TYPE) {
|
|
16
|
+
CONTROL_BASE_TYPE["BASE"] = "base";
|
|
17
|
+
CONTROL_BASE_TYPE["FORM"] = "form";
|
|
18
|
+
CONTROL_BASE_TYPE["LAYOUT"] = "layout";
|
|
19
|
+
CONTROL_BASE_TYPE["WRAP"] = "wrap";
|
|
20
|
+
CONTROL_BASE_TYPE["COLUMN"] = "column";
|
|
21
|
+
CONTROL_BASE_TYPE["LIST"] = "list";
|
|
22
|
+
CONTROL_BASE_TYPE["SEARCH"] = "search";
|
|
23
|
+
})(CONTROL_BASE_TYPE || (CONTROL_BASE_TYPE = {}));
|
|
24
|
+
export var CONTROL_TYPE;
|
|
25
|
+
(function(CONTROL_TYPE) {
|
|
26
|
+
CONTROL_TYPE[// 基础控件
|
|
27
|
+
"TITLE"] = "title";
|
|
28
|
+
CONTROL_TYPE["LINK"] = "link";
|
|
29
|
+
CONTROL_TYPE["BUTTON"] = "button";
|
|
30
|
+
CONTROL_TYPE["DIVIDER"] = "divider";
|
|
31
|
+
CONTROL_TYPE["TEXT"] = "text";
|
|
32
|
+
CONTROL_TYPE["CREATE_FORM_LIST_BUTTON"] = "list-page-btn-create-form";
|
|
33
|
+
CONTROL_TYPE["BATCH_SUBMISSION_LIST_BUTTON"] = "list-page-btn-batch-submission";
|
|
34
|
+
CONTROL_TYPE["SUBMISSION_RECORD_LIST_BUTTON"] = "list-page-btn-submission-record";
|
|
35
|
+
CONTROL_TYPE["IMPORT_RECORD_LIST_BUTTON"] = "list-page-btn-import-record";
|
|
36
|
+
CONTROL_TYPE["EXPORT_RECORD_LIST_BUTTON"] = "list-page-btn-export-record";
|
|
37
|
+
CONTROL_TYPE["EXPORT_LIST_BUTTON"] = "list-page-btn-export-list";
|
|
38
|
+
CONTROL_TYPE["LIST_SELECT_BUTTON"] = "list-select-button";
|
|
39
|
+
CONTROL_TYPE["FORM_SELECT_BUTTON"] = "form-select-button";
|
|
40
|
+
CONTROL_TYPE["LIST_VIEW_SELECT"] = "list-view-select";
|
|
41
|
+
CONTROL_TYPE["TEXT_OCR_BUTTON"] = "text-ocr-button";
|
|
42
|
+
CONTROL_TYPE["INVOICE_CHECK_BUTTON"] = "invoice-check-button";
|
|
43
|
+
CONTROL_TYPE["LIST_PAGE_BTN_BATCH_PRINT"] = "list-page-btn-batch-print";
|
|
44
|
+
CONTROL_TYPE["LIST_PAGE_BTN_BATCH_PRINT_RECORD"] = "list-page-btn-batch-print-record";
|
|
45
|
+
CONTROL_TYPE[// 列头控件
|
|
46
|
+
"VARCHAR_COLUMN"] = "varchar-column";
|
|
47
|
+
CONTROL_TYPE["TEXT_COLUMN"] = "text-column";
|
|
48
|
+
CONTROL_TYPE["DECIMAL_COLUMN"] = "decimal-column";
|
|
49
|
+
CONTROL_TYPE["TIMESCOPE_COLUMN"] = "timescope-column";
|
|
50
|
+
CONTROL_TYPE["TIMESTAMP_COLUMN"] = "timestamp-column";
|
|
51
|
+
CONTROL_TYPE["ARRAY_COLUMN"] = "array-column";
|
|
52
|
+
CONTROL_TYPE["DEPARTMENT_COLUMN"] = "department-column";
|
|
53
|
+
CONTROL_TYPE["AUTO_NUMBER_COLUMN"] = "auto-number-column";
|
|
54
|
+
CONTROL_TYPE["FILE_COLUMN"] = "file-column";
|
|
55
|
+
CONTROL_TYPE["IMAGE_COLUMN"] = "image-column";
|
|
56
|
+
CONTROL_TYPE["PEOPLE_COLUMN"] = "people-column";
|
|
57
|
+
CONTROL_TYPE["LOCATION_COLUMN"] = "location-column";
|
|
58
|
+
CONTROL_TYPE["CUSTOM_COLUMN"] = "custom-column";
|
|
59
|
+
CONTROL_TYPE["ORDER_COLUMN"] = "order-column";
|
|
60
|
+
CONTROL_TYPE["OPERATION_COLUMN"] = "operation-column";
|
|
61
|
+
CONTROL_TYPE["EMPLOYEE_COLUMN"] = "employee-column";
|
|
62
|
+
CONTROL_TYPE[// 表单控件
|
|
63
|
+
"ADDRESS"] = "address";
|
|
64
|
+
CONTROL_TYPE["AMOUNT"] = "amount";
|
|
65
|
+
CONTROL_TYPE["ATTACHMENT"] = "attachment";
|
|
66
|
+
CONTROL_TYPE["AUTO_NUMBER"] = "auto-number";
|
|
67
|
+
CONTROL_TYPE["CALC"] = "calc";
|
|
68
|
+
CONTROL_TYPE["CHECKBOX"] = "checkbox";
|
|
69
|
+
CONTROL_TYPE["DATE_PICKER"] = "date-picker";
|
|
70
|
+
CONTROL_TYPE["DATE_RANGE"] = "date-range";
|
|
71
|
+
CONTROL_TYPE["DEPARTMENT"] = "department";
|
|
72
|
+
CONTROL_TYPE["EMPLOYEE"] = "employee";
|
|
73
|
+
CONTROL_TYPE["IMAGE"] = "image";
|
|
74
|
+
CONTROL_TYPE["INPUT"] = "input";
|
|
75
|
+
CONTROL_TYPE["NUMBER"] = "number";
|
|
76
|
+
CONTROL_TYPE["RADIO"] = "radio";
|
|
77
|
+
CONTROL_TYPE["RICH_TEXT"] = "rich-text";
|
|
78
|
+
CONTROL_TYPE["SCORE"] = "score";
|
|
79
|
+
CONTROL_TYPE["SEARCH_DATE_RANGE"] = "search-date-range";
|
|
80
|
+
CONTROL_TYPE["SEARCH_NUMBER_RANGE"] = "search-number-range";
|
|
81
|
+
CONTROL_TYPE["SEARCH_INPUT"] = "search-input";
|
|
82
|
+
CONTROL_TYPE["SELECT"] = "select";
|
|
83
|
+
CONTROL_TYPE["SELECT_MULTIPLE"] = "select-multiple";
|
|
84
|
+
CONTROL_TYPE["SELECT_RELATION"] = "select-relation";
|
|
85
|
+
CONTROL_TYPE["VUE_FORM_ITEM"] = "vue-form-item";
|
|
86
|
+
CONTROL_TYPE["TEXTAREA"] = "textarea";
|
|
87
|
+
CONTROL_TYPE["EMAIL"] = "email";
|
|
88
|
+
CONTROL_TYPE["FOOTER"] = "footer";
|
|
89
|
+
CONTROL_TYPE["HEADER"] = "header";
|
|
90
|
+
CONTROL_TYPE["ID_CARD"] = "id-card";
|
|
91
|
+
CONTROL_TYPE["MOBILE"] = "mobile";
|
|
92
|
+
CONTROL_TYPE["PHONE"] = "phone";
|
|
93
|
+
CONTROL_TYPE["RADIO_IMAGE"] = "radio-image";
|
|
94
|
+
CONTROL_TYPE["ELECTRONIC_SIGNATURE"] = "electronic-signature";
|
|
95
|
+
CONTROL_TYPE["WPS"] = "wps";
|
|
96
|
+
CONTROL_TYPE[// 布局控件
|
|
97
|
+
"CARD_GROUP"] = "card-group";
|
|
98
|
+
CONTROL_TYPE["COL"] = "col";
|
|
99
|
+
CONTROL_TYPE["GRID"] = "grid";
|
|
100
|
+
CONTROL_TYPE["GRID_ROW"] = "grid-row";
|
|
101
|
+
CONTROL_TYPE["GRID_TABLE_COLUMN"] = "grid-table-column";
|
|
102
|
+
CONTROL_TYPE["ROW"] = "row";
|
|
103
|
+
CONTROL_TYPE["TWO_COLUMNS"] = "two-columns";
|
|
104
|
+
CONTROL_TYPE["SUBTABLE_COLUMN"] = "subtable-column";
|
|
105
|
+
CONTROL_TYPE["SUBTABLE_ROW"] = "subtable-row";
|
|
106
|
+
CONTROL_TYPE["TAB"] = "tab";
|
|
107
|
+
CONTROL_TYPE["TAB_PANE"] = "tab-pane";
|
|
108
|
+
CONTROL_TYPE["TOOLBOX"] = "toolbox";
|
|
109
|
+
CONTROL_TYPE["DATA_VIEW"] = "data-view";
|
|
110
|
+
CONTROL_TYPE["LIST_VIEW"] = "list-view";
|
|
111
|
+
CONTROL_TYPE[// list控件
|
|
112
|
+
"SUBTABLE"] = "subtable";
|
|
113
|
+
CONTROL_TYPE["GRID_TABLE"] = "grid-table";
|
|
114
|
+
CONTROL_TYPE[// 查询区域控件
|
|
115
|
+
"SIMPLE_SEARCH"] = "simple-search";
|
|
116
|
+
CONTROL_TYPE["PAGINATION"] = "pagination";
|
|
117
|
+
CONTROL_TYPE["CHECKBOX_IMAGE"] = "checkbox-image";
|
|
118
|
+
CONTROL_TYPE["DASHBOARD"] = "dashboard";
|
|
119
|
+
CONTROL_TYPE["TREE"] = "tree";
|
|
120
|
+
CONTROL_TYPE["EMPLOYEE2"] = "employee2";
|
|
121
|
+
})(CONTROL_TYPE || (CONTROL_TYPE = {}));
|
|
122
|
+
export var FieldTypes;
|
|
123
|
+
(function(FieldTypes) {
|
|
124
|
+
FieldTypes[/**
|
|
125
|
+
* 短文本,string
|
|
126
|
+
* */ "VARCHAR"] = "varchar";
|
|
127
|
+
FieldTypes[/**
|
|
128
|
+
* 长文本, string
|
|
129
|
+
* */ "TEXT"] = "text";
|
|
130
|
+
FieldTypes[/**
|
|
131
|
+
* 数组, Array<string>
|
|
132
|
+
* */ "ARRAY"] = "array";
|
|
133
|
+
FieldTypes[/**
|
|
134
|
+
* 地址, AddressValue { city:string, district:string, province: string }
|
|
135
|
+
* */ "ADDRESS"] = "location";
|
|
136
|
+
FieldTypes[/**
|
|
137
|
+
* 数字, number
|
|
138
|
+
* */ "DECIMAL"] = "decimal";
|
|
139
|
+
FieldTypes[/**
|
|
140
|
+
* 数字区间, Array<number>
|
|
141
|
+
* */ "DECIMAL_RANGE"] = "decimal_range";
|
|
142
|
+
FieldTypes[/**
|
|
143
|
+
* 日期, 时间戳字符串 string
|
|
144
|
+
* */ "TIMESTAMP"] = "timestamp";
|
|
145
|
+
FieldTypes[/**
|
|
146
|
+
* 人员, Array<人员id string>
|
|
147
|
+
* */ "EMPLOYEES"] = "people";
|
|
148
|
+
FieldTypes[/**
|
|
149
|
+
* 部门, Array<部门id string>
|
|
150
|
+
* */ "DEPARTMENTS"] = "department";
|
|
151
|
+
FieldTypes[/**
|
|
152
|
+
* 金额, AmountValue { amount: number, currency: string }
|
|
153
|
+
* */ "MONEY"] = "money";
|
|
154
|
+
FieldTypes[/**
|
|
155
|
+
* 日期区间, DateRangeValue { max: string, min: string }
|
|
156
|
+
* */ "TIMESCOPE"] = "timescope";
|
|
157
|
+
FieldTypes[/**
|
|
158
|
+
* 附件, Array<附件id string>
|
|
159
|
+
* */ "FILE"] = "file";
|
|
160
|
+
FieldTypes[/**
|
|
161
|
+
* 图片, Array<图片id string>
|
|
162
|
+
* */ "IMAGE"] = "image";
|
|
163
|
+
FieldTypes[/**
|
|
164
|
+
* 自动编号, string
|
|
165
|
+
* */ "AUTO_NUMBER"] = "auto_number";
|
|
166
|
+
FieldTypes[/**
|
|
167
|
+
* 计算公式, CalcValue { result: number, unit: string }
|
|
168
|
+
* */ "CALC"] = "calc";
|
|
169
|
+
FieldTypes[/**
|
|
170
|
+
* 关联键, string
|
|
171
|
+
* */ "RELATION"] = "relation";
|
|
172
|
+
FieldTypes[/**
|
|
173
|
+
* 列表 Array<any>
|
|
174
|
+
* */ "LIST"] = "list";
|
|
175
|
+
FieldTypes[/**
|
|
176
|
+
* 关联字段
|
|
177
|
+
* */ "RELATION_FIELD"] = "relation-field";
|
|
178
|
+
FieldTypes[/**
|
|
179
|
+
* 引用字段
|
|
180
|
+
* */ "REFERENCE_FIELD"] = "reference-field";
|
|
181
|
+
FieldTypes[/**
|
|
182
|
+
* 计算公式字段
|
|
183
|
+
* */ "CALC_FIELD"] = "calc";
|
|
184
|
+
FieldTypes[/**
|
|
185
|
+
* JSON字段
|
|
186
|
+
* */ "JSON"] = "json";
|
|
187
|
+
FieldTypes[/**
|
|
188
|
+
* 整数类型
|
|
189
|
+
* */ "BIGINT"] = "bigint";
|
|
190
|
+
FieldTypes[/**
|
|
191
|
+
* 任意类型
|
|
192
|
+
* */ "ANY"] = "ANY";
|
|
193
|
+
FieldTypes[/**
|
|
194
|
+
* 加密字段
|
|
195
|
+
* */ "ENCRYPTED_FIELD"] = "encrypted_field";
|
|
196
|
+
})(FieldTypes || (FieldTypes = {}));
|
|
197
|
+
var _obj;
|
|
198
|
+
export var FieldTypeToColumnType = (_obj = {}, _defineProperty(_obj, FieldTypes.ARRAY, CONTROL_TYPE.ARRAY_COLUMN), _defineProperty(_obj, FieldTypes.AUTO_NUMBER, CONTROL_TYPE.AUTO_NUMBER_COLUMN), _defineProperty(_obj, FieldTypes.DECIMAL, CONTROL_TYPE.DECIMAL_COLUMN), _defineProperty(_obj, FieldTypes.DEPARTMENTS, CONTROL_TYPE.DEPARTMENT_COLUMN), _defineProperty(_obj, FieldTypes.FILE, CONTROL_TYPE.FILE_COLUMN), _defineProperty(_obj, FieldTypes.IMAGE, CONTROL_TYPE.IMAGE_COLUMN), _defineProperty(_obj, FieldTypes.ADDRESS, CONTROL_TYPE.LOCATION_COLUMN), _defineProperty(_obj, FieldTypes.EMPLOYEES, CONTROL_TYPE.EMPLOYEE_COLUMN), _defineProperty(_obj, FieldTypes.TEXT, CONTROL_TYPE.TEXT_COLUMN), _defineProperty(_obj, FieldTypes.TIMESCOPE, CONTROL_TYPE.TIMESCOPE_COLUMN), _defineProperty(_obj, FieldTypes.TIMESTAMP, CONTROL_TYPE.TIMESTAMP_COLUMN), _defineProperty(_obj, FieldTypes.VARCHAR, CONTROL_TYPE.VARCHAR_COLUMN), _defineProperty(_obj, FieldTypes.RELATION, CONTROL_TYPE.VARCHAR_COLUMN), _obj);
|
|
199
|
+
export var DateType;
|
|
200
|
+
(function(DateType) {
|
|
201
|
+
DateType[/**
|
|
202
|
+
* 年
|
|
203
|
+
* */ "YEAR"] = "year";
|
|
204
|
+
DateType[/**
|
|
205
|
+
* 年月
|
|
206
|
+
* */ "MONTH"] = "month";
|
|
207
|
+
DateType[/**
|
|
208
|
+
* 年月日
|
|
209
|
+
* */ "DATE"] = "date";
|
|
210
|
+
DateType[/**
|
|
211
|
+
* 年月日时分秒
|
|
212
|
+
* */ "DATETIME"] = "datetime";
|
|
213
|
+
})(DateType || (DateType = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var firstStr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2
|
+
var str = firstStr + "0123456789";
|
|
3
|
+
export function genNonDuplicateId() {
|
|
4
|
+
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 15;
|
|
5
|
+
var result = "";
|
|
6
|
+
for(var i = 0; i < n; i++){
|
|
7
|
+
// 第一位不能是数字
|
|
8
|
+
var randomStr = i === 0 ? firstStr : str;
|
|
9
|
+
var random = Math.random() * randomStr.length;
|
|
10
|
+
result += randomStr[parseInt(String(random), 10)];
|
|
11
|
+
}
|
|
12
|
+
return result;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./entity";
|
|
2
|
+
export * from "./locales";
|
|
3
|
+
export * from "./calc";
|
|
4
|
+
export * from "./constant";
|
|
5
|
+
export * from "./enum";
|
|
6
|
+
export * from "./genNonDuplicateId";
|
|
7
|
+
export * from "./log";
|
|
8
|
+
export * from "./loopControls";
|
|
9
|
+
export * from "./RulesMessage";
|
|
10
|
+
export * from "./updateValueFromKeys";
|
|
11
|
+
export * from "./utils";
|
|
12
|
+
export * from "./watcher";
|
|
13
|
+
export * from "./EventLogic";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"isNotNumber": "Please enter a number",
|
|
3
|
+
"isNotString": "Please enter a string",
|
|
4
|
+
"isNotObject": "Please enter an object",
|
|
5
|
+
"isNotArray": "Please enter an array",
|
|
6
|
+
"isNotBoolean": "Please enter a boolean",
|
|
7
|
+
"runtimeRequired": "{caption} Required",
|
|
8
|
+
"pleaseEnterCaption": "Please enter the title",
|
|
9
|
+
"pleaseEnterCaptionTip":"请输入气泡提示语",
|
|
10
|
+
"pleaseEnterPlaceholder": "Please enter the prompt text",
|
|
11
|
+
"pleaseEnterFieldCode": "Please bind data items",
|
|
12
|
+
"pleaseEnterForm": "Please bind the form",
|
|
13
|
+
"pleaseEnterList": "Please bind the list",
|
|
14
|
+
"pleaseEnterProcess": "Please bind the process",
|
|
15
|
+
"pleaseEnterLabel": "Please enter the displayed value",
|
|
16
|
+
"pleaseEnterValue": "Please enter the stored value",
|
|
17
|
+
"bizKeyNotBindFiled": "The document number is not bound to the data item",
|
|
18
|
+
"pleaseEnterNumberRange": "Please enter a value greater than or equal to {min} and less than or equal to {max}",
|
|
19
|
+
"pleaseEnterAValueGreaterThanMin": "Please enter a value greater than or equal to {min}",
|
|
20
|
+
"pleaseEnterAValueLessThanMax": "Please enter a value less than or equal to {max}",
|
|
21
|
+
"numberRangeSetError": "The value range is set incorrectly",
|
|
22
|
+
"stringRangeError": "Please enter a value longer than {min} and less than {max}",
|
|
23
|
+
"attachmentMaxSize": "The attachment size must be between 0MB and 1000MB",
|
|
24
|
+
"pleaseEnterTotalScoreSetting": "Please fill in the total score setting",
|
|
25
|
+
"theTotalScoreMustNotBeLessThan1": "The total score cannot be less than 1",
|
|
26
|
+
"scoreDefaultValueRange": "The default value must be between {min} and {max}",
|
|
27
|
+
"attachmentLimitError": "The number of attachments uploaded must be between {min} and {max}",
|
|
28
|
+
"PleaseReselectTheOptionalQuantity": "Please re-select the optional quantity",
|
|
29
|
+
"TheMaximumLengthIsGreaterThanTheMinimumLength": "The maximum length of the control must be greater than the minimum length",
|
|
30
|
+
"TheMinimumLengthIsGreaterThanTheMaximumLength": "The minimum length of the control must be less than the maximum length",
|
|
31
|
+
"PleaseSelectTheCorrectOptionSettings": "Please select the correct option setting",
|
|
32
|
+
"optionIdIsRepeat": "Option ID cannot be repeated",
|
|
33
|
+
"optionIsRequired": "Please enter at least one option",
|
|
34
|
+
"pleaseEnterDataCode": "Please bind the data source",
|
|
35
|
+
"pleaseEnterValueFieldCode": "Please bind the stored value",
|
|
36
|
+
"pleaseEnterSvcCode": "Please bind the service",
|
|
37
|
+
"pleaseBindAtLeastOneDisplayValue": "At least one display value must be bound",
|
|
38
|
+
"pleaseSelectProvince": "Please select a province",
|
|
39
|
+
"pleaseSelectCity": "Please select a city",
|
|
40
|
+
"pleaseSelectDistrict": "Please select a district",
|
|
41
|
+
"limitRowsCannotBeLessThan0": "The minimum number of lines to fill in cannot be less than 0",
|
|
42
|
+
"TheNumberOfRowsCannotBeLessThanMinRows": "The number of rows cannot be less than {min} rows",
|
|
43
|
+
"pleaseEnterColumnWidth": "Please enter the column width",
|
|
44
|
+
"pleaseSetTheLogicalRelationshipOfAllRuleConditions": "Please set the logical relationship of all rule conditions",
|
|
45
|
+
"pleaseCompleteAllRulesAndConditions": "Please complete all rules and conditions",
|
|
46
|
+
"pleaseSelectControl": "please select control",
|
|
47
|
+
"pleaseSelectDashboard": "请选择仪表盘",
|
|
48
|
+
"theViewNameCannotBeEmpty": "视图名称不能为空",
|
|
49
|
+
"pleaseSelectOcrType": "请选择识别类型",
|
|
50
|
+
"pleaseSelectAtLeastOneFieldToFillIn": "请至少选择一个字段进行填充",
|
|
51
|
+
"pleaseChooseAtLeastOne": "请至少选择一个",
|
|
52
|
+
"pleaseEnterButtonContent": "请输入按钮标题",
|
|
53
|
+
"pleaseEnterDataCodeInDataSetting": "请在数据设置中绑定业务模型",
|
|
54
|
+
"pleaseEnterValueFieldCodeInDataSetting": "请在数据设置中绑定存储值",
|
|
55
|
+
"pleaseEnterSvcCodeInDataSetting": "请在数据设置中绑定服务",
|
|
56
|
+
"pleaseBindAtLeastOneDisplayValueInDataSetting": "请在数据设置中至少绑定一个显示值",
|
|
57
|
+
"rootNodeIsRequiredInDataSetting": "请在数据设置中选择根节点",
|
|
58
|
+
"pleaseEnterMaxHeight": "请输入最大高度",
|
|
59
|
+
"pleaseEnter": "输入内容不能为空",
|
|
60
|
+
"pleaseEnterWatermark": "水印不能为空",
|
|
61
|
+
"pleaseEnterFileName": "文件名称不能为空",
|
|
62
|
+
"pleaseUploadAtLeastOnePrintTemplate": "请至少上传一个打印模版!"
|
|
63
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"isNotNumber": "数字を入力して下さい",
|
|
3
|
+
"isNotString": "文字列を入力して下さい",
|
|
4
|
+
"isNotObject": "対象物を入力して下さい",
|
|
5
|
+
"isNotArray": "数字組を入力して下さい",
|
|
6
|
+
"isNotBoolean": "ブールを入力して下さい",
|
|
7
|
+
"runtimeRequired": "{caption}必須",
|
|
8
|
+
"pleaseEnterCaption": "タイトルを入力して下さい",
|
|
9
|
+
"pleaseEnterCaptionTip":"请输入气泡提示语",
|
|
10
|
+
"pleaseEnterPlaceholder": "ヒントを入力して下さい",
|
|
11
|
+
"pleaseEnterFieldCode": "データをリンクして下さい",
|
|
12
|
+
"pleaseEnterForm": "シートをリンクして下さい",
|
|
13
|
+
"pleaseEnterList": "リストをリンクして下さい",
|
|
14
|
+
"pleaseEnterProcess": "フローをリンクして下さい",
|
|
15
|
+
"pleaseEnterLabel": "表示値を入力して下さい",
|
|
16
|
+
"pleaseEnterValue": "保存値を入力して下さい",
|
|
17
|
+
"bizKeyNotBindFiled": "シート番号がデータにリンクされていません。",
|
|
18
|
+
"pleaseEnterNumberRange": "{min}以上{max}以下の値を入力してください",
|
|
19
|
+
"pleaseEnterAValueGreaterThanMin": "{min}以上の値を入力してください",
|
|
20
|
+
"pleaseEnterAValueLessThanMax": "{max}未満の値を入力してください",
|
|
21
|
+
"numberRangeSetError": "数値範囲設定エラー",
|
|
22
|
+
"stringRangeError": "文字数{min}より大きく、{max}より小さい数値を入力して下さい",
|
|
23
|
+
"attachmentMaxSize": "添付ファイルは0MBから1000MBの間でお願いします。",
|
|
24
|
+
"pleaseEnterTotalScoreSetting": "トータル点数を設定して下さい",
|
|
25
|
+
"theTotalScoreMustNotBeLessThan1": "トータル点数は1以上でお願いします。",
|
|
26
|
+
"scoreDefaultValueRange": "基本設定値は{min}から{max}の間でお願いします。",
|
|
27
|
+
"attachmentLimitError": "アップデート件数は{min}から{max}の間でお願いします",
|
|
28
|
+
"PleaseReselectTheOptionalQuantity": "数量を再選択して下さい",
|
|
29
|
+
"TheMaximumLengthIsGreaterThanTheMinimumLength": "コンポーネントの最大値は最小値より大きく設定して下さい",
|
|
30
|
+
"TheMinimumLengthIsGreaterThanTheMaximumLength": "コンポーネントの最小値は最大値より大きく設定して下さい",
|
|
31
|
+
"PleaseSelectTheCorrectOptionSettings": "正確な設定値を選択して下さい",
|
|
32
|
+
"optionIdIsRepeat": "IDは重複しないようにお願いします",
|
|
33
|
+
"optionIsRequired": "最低1点を選ぶようにお願いします",
|
|
34
|
+
"pleaseEnterDataCode": "元データにリンクして下さい",
|
|
35
|
+
"pleaseEnterValueFieldCode": "保存値にリンクして下さい",
|
|
36
|
+
"pleaseEnterSvcCode": "サービスにリンクして下さい",
|
|
37
|
+
"pleaseBindAtLeastOneDisplayValue": "表示値をリンクし直しして下さい",
|
|
38
|
+
"pleaseSelectProvince": "省を選択して下さい",
|
|
39
|
+
"pleaseSelectCity": "市を選択して下さい",
|
|
40
|
+
"pleaseSelectDistrict": "区を選択して下さい",
|
|
41
|
+
"limitRowsCannotBeLessThan0": "最小値は0より大きく設定して下さい",
|
|
42
|
+
"TheNumberOfRowsCannotBeLessThanMinRows": "最低行数は{min}行でお願いします",
|
|
43
|
+
"pleaseEnterColumnWidth": "列幅を入力して下さい",
|
|
44
|
+
"pleaseSetTheLogicalRelationshipOfAllRuleConditions": "全ての条件のロジックを設定して下さい",
|
|
45
|
+
"pleaseCompleteAllRulesAndConditions": "全ての条件を完成させて下さい",
|
|
46
|
+
"pleaseSelectControl": "please select control",
|
|
47
|
+
"pleaseSelectDashboard": "请选择仪表盘",
|
|
48
|
+
"theViewNameCannotBeEmpty": "视图名称不能为空",
|
|
49
|
+
"pleaseSelectOcrType": "请选择识别类型",
|
|
50
|
+
"pleaseSelectAtLeastOneFieldToFillIn": "请至少选择一个字段进行填充",
|
|
51
|
+
"pleaseChooseAtLeastOne": "请至少选择一个",
|
|
52
|
+
"pleaseEnterButtonContent": "请输入按钮标题",
|
|
53
|
+
"pleaseEnterDataCodeInDataSetting": "请在数据设置中绑定业务模型",
|
|
54
|
+
"pleaseEnterValueFieldCodeInDataSetting": "请在数据设置中绑定存储值",
|
|
55
|
+
"pleaseEnterSvcCodeInDataSetting": "请在数据设置中绑定服务",
|
|
56
|
+
"pleaseBindAtLeastOneDisplayValueInDataSetting": "请在数据设置中至少绑定一个显示值",
|
|
57
|
+
"rootNodeIsRequiredInDataSetting": "请在数据设置中选择根节点",
|
|
58
|
+
"pleaseEnterMaxHeight": "请输入最大高度",
|
|
59
|
+
"pleaseEnter": "输入内容不能为空",
|
|
60
|
+
"pleaseEnterWatermark": "水印不能为空",
|
|
61
|
+
"pleaseEnterFileName": "文件名称不能为空",
|
|
62
|
+
"pleaseUploadAtLeastOnePrintTemplate": "请至少上传一个打印模版!"
|
|
63
|
+
}
|