@byteluck-fe/model-driven-shared 2.7.0-alpha.0 → 2.7.0-alpha.4

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.
@@ -17,123 +17,136 @@ function _createClass(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
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
+ }
20
33
  // type InnerEventCode = 'click' | 'click-finish' | 'change'
21
34
  var eventMap = [
22
35
  {
23
- key: 'on_click',
24
- name: '点击时',
25
- code: 'click'
36
+ key: "on_click",
37
+ name: "点击时",
38
+ code: "click"
26
39
  },
27
40
  {
28
- key: 'on_click_finish',
29
- name: '执行完成时',
30
- code: 'click-finish'
41
+ key: "on_click_finish",
42
+ name: "执行完成时",
43
+ code: "click-finish"
31
44
  },
32
45
  {
33
- key: 'on_change',
34
- name: '值发生变化时',
35
- code: 'change'
46
+ key: "on_change",
47
+ name: "值发生变化时",
48
+ code: "change"
36
49
  },
37
50
  {
38
- key: 'on_search',
39
- name: '搜索时',
40
- code: 'search'
51
+ key: "on_search",
52
+ name: "搜索时",
53
+ code: "search"
41
54
  },
42
55
  {
43
- key: 'on_list_change',
44
- name: '列表数据变化时',
45
- code: 'list-change'
56
+ key: "on_list_change",
57
+ name: "列表数据变化时",
58
+ code: "list-change"
46
59
  },
47
60
  {
48
- key: 'on_list_search',
49
- name: '列表数据查询构建时',
50
- code: 'list-search'
61
+ key: "on_list_search",
62
+ name: "列表数据查询构建时",
63
+ code: "list-search"
51
64
  },
52
65
  {
53
- key: 'on_list_mounted',
54
- name: '列表数据返回时',
55
- code: 'list-mounted'
66
+ key: "on_list_mounted",
67
+ name: "列表数据返回时",
68
+ code: "list-mounted"
56
69
  },
57
70
  {
58
- key: 'on_list_delete',
59
- name: '列表数据删除时',
60
- code: 'list-delete'
71
+ key: "on_list_delete",
72
+ name: "列表数据删除时",
73
+ code: "list-delete"
61
74
  },
62
75
  {
63
- key: 'on_list_before_insert',
64
- name: '列表数据插入前',
65
- code: 'list-before-insert'
76
+ key: "on_list_before_insert",
77
+ name: "列表数据插入前",
78
+ code: "list-before-insert"
66
79
  },
67
80
  {
68
- key: 'on_input',
69
- name: '用户输入时',
70
- code: 'input'
81
+ key: "on_input",
82
+ name: "用户输入时",
83
+ code: "input"
71
84
  },
72
85
  {
73
- key: 'on_blur',
74
- name: '失去焦点时',
75
- code: 'blur'
86
+ key: "on_blur",
87
+ name: "失去焦点时",
88
+ code: "blur"
76
89
  },
77
90
  {
78
- key: 'on_focus',
79
- name: '获取焦点时',
80
- code: 'focus'
91
+ key: "on_focus",
92
+ name: "获取焦点时",
93
+ code: "focus"
81
94
  },
82
95
  {
83
- key: 'on_wps_open',
84
- name: '打开文件时',
85
- code: 'wps-open'
96
+ key: "on_wps_open",
97
+ name: "打开文件时",
98
+ code: "wps-open"
86
99
  },
87
100
  {
88
- key: 'on_wps_save',
89
- name: '保存文件时',
90
- code: 'wps-save'
101
+ key: "on_wps_save",
102
+ name: "保存文件时",
103
+ code: "wps-save"
91
104
  },
92
105
  {
93
- key: 'on_wps_rename',
94
- name: '重命名时',
95
- code: 'wps-rename'
106
+ key: "on_wps_rename",
107
+ name: "重命名时",
108
+ code: "wps-rename"
96
109
  },
97
110
  {
98
- key: 'on_list_actions',
99
- name: '点击操作按钮时',
100
- code: 'list-actions'
111
+ key: "on_list_actions",
112
+ name: "点击操作按钮时",
113
+ code: "list-actions"
101
114
  },
102
115
  {
103
- key: 'on_list_render_operation',
104
- name: '操作列渲染时',
105
- code: 'list-render-operation'
116
+ key: "on_list_render_operation",
117
+ name: "操作列渲染时",
118
+ code: "list-render-operation"
106
119
  },
107
120
  {
108
- key: 'on_list_rowclick',
109
- name: '行点击时',
110
- code: 'list-rowclick'
121
+ key: "on_list_rowclick",
122
+ name: "行点击时",
123
+ code: "list-rowclick"
111
124
  },
112
125
  {
113
- key: 'on_list_before_rowdelete',
114
- name: '行删除前',
115
- code: 'list-before-rowdelete'
126
+ key: "on_list_before_rowdelete",
127
+ name: "行删除前",
128
+ code: "list-before-rowdelete"
116
129
  },
117
130
  {
118
- key: 'on_list_before_import',
119
- name: '列表数据导入前',
120
- code: 'list-before-import'
131
+ key: "on_list_before_import",
132
+ name: "列表数据导入前",
133
+ code: "list-before-import"
121
134
  },
122
135
  {
123
- key: 'on_list_rows_checked',
124
- name: '行选中时',
125
- code: 'list-rows-checked'
136
+ key: "on_list_rows_checked",
137
+ name: "行选中时",
138
+ code: "list-rows-checked"
126
139
  },
127
140
  {
128
- key: 'on_change_tab',
129
- name: '标签页切换时',
130
- code: 'change-tab'
141
+ key: "on_change_tab",
142
+ name: "标签页切换时",
143
+ code: "change-tab"
131
144
  },
132
145
  {
133
- key: 'on_modal_ok',
134
- name: '弹窗确认时',
135
- code: 'modal-ok'
136
- },
146
+ key: "on_modal_ok",
147
+ name: "弹窗确认时",
148
+ code: "modal-ok"
149
+ }
137
150
  ];
138
151
  export var EventLogic = /*#__PURE__*/ function() {
139
152
  "use strict";
@@ -144,7 +157,7 @@ export var EventLogic = /*#__PURE__*/ function() {
144
157
  {
145
158
  key: "getEventsFromKeys",
146
159
  value: function getEventsFromKeys(keys) {
147
- var eventKeys = typeof keys === 'string' ? [
160
+ var eventKeys = typeof keys === "string" ? [
148
161
  keys
149
162
  ] : keys;
150
163
  return EventLogic.events.filter(function(item) {
@@ -155,4 +168,4 @@ export var EventLogic = /*#__PURE__*/ function() {
155
168
  ]);
156
169
  return EventLogic;
157
170
  }();
158
- EventLogic.events = eventMap;
171
+ _defineProperty(EventLogic, "events", eventMap);
@@ -17,9 +17,22 @@ function _createClass(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
- import OkI18n from 'ok-i18n';
21
- import messages from './locales';
22
- import { DEFAULT_LOCALE } from './constant';
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
+ }
33
+ import OkI18n from "ok-i18n";
34
+ import messages from "./locales";
35
+ import { DEFAULT_LOCALE } from "./constant";
23
36
  export var RulesMessage = /*#__PURE__*/ function() {
24
37
  "use strict";
25
38
  function RulesMessage() {
@@ -30,7 +43,7 @@ export var RulesMessage = /*#__PURE__*/ function() {
30
43
  key: "getMessage",
31
44
  value: function getMessage(messageKey) {
32
45
  var variable = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
33
- return this.$i18n.$t(messageKey, '', variable);
46
+ return this.$i18n.$t(messageKey, "", variable);
34
47
  }
35
48
  },
36
49
  {
@@ -52,4 +65,4 @@ export var RulesMessage = /*#__PURE__*/ function() {
52
65
  ]);
53
66
  return RulesMessage;
54
67
  }();
55
- RulesMessage.$i18n = RulesMessage.resetI18n();
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,16 +58,34 @@ export var CALC_AGGREGATE_TYPE;
45
58
  export var CalcScriptEchoItem = function CalcScriptEchoItem(props) {
46
59
  "use strict";
47
60
  _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;
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);
79
+ var _props_name;
80
+ this.name = (_props_name = props === null || props === void 0 ? void 0 : props.name) !== null && _props_name !== void 0 ? _props_name : "";
81
+ var _props_id;
82
+ this.id = (_props_id = props === null || props === void 0 ? void 0 : props.id) !== null && _props_id !== void 0 ? _props_id : "";
83
+ var _props_type;
84
+ this.type = (_props_type = props === null || props === void 0 ? void 0 : props.type) !== null && _props_type !== void 0 ? _props_type : CALC_TOKEN_TYPE.Number;
85
+ var _props_subTableId;
86
+ this.subTableId = (_props_subTableId = props === null || props === void 0 ? void 0 : props.subTableId) !== null && _props_subTableId !== void 0 ? _props_subTableId : undefined;
87
+ var _props_subTableId1;
88
+ this.subTableName = (_props_subTableId1 = props === null || props === void 0 ? void 0 : props.subTableId) !== null && _props_subTableId1 !== void 0 ? _props_subTableId1 : undefined;
89
+ var _props_aggregateType;
90
+ this.aggregateType = (_props_aggregateType = props === null || props === void 0 ? void 0 : props.aggregateType) !== null && _props_aggregateType !== void 0 ? _props_aggregateType : undefined;
60
91
  };
@@ -1,2 +1,2 @@
1
- export var DEFAULT_LOCALE = 'zh-CN';
1
+ export var DEFAULT_LOCALE = "zh-CN";
2
2
  export var noop = function() {};
@@ -1,12 +1,32 @@
1
- function _classCallCheck(instance, Constructor) {
1
+ /**
2
+ * @author qiyu
3
+ * @description 属性只是简单从接口拿过来,还未仔细考虑
4
+ */ function _classCallCheck(instance, Constructor) {
2
5
  if (!(instance instanceof Constructor)) {
3
6
  throw new TypeError("Cannot call a class as a function");
4
7
  }
5
8
  }
6
- /**
7
- * @author qiyu
8
- * @description 属性只是简单从接口拿过来,还未仔细考虑
9
- */ export var DepartmentEntity = function DepartmentEntity() {
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
+ }
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
  };
@@ -1,12 +1,86 @@
1
- function _classCallCheck(instance, Constructor) {
1
+ /**
2
+ * @author qiyu
3
+ * @description 属性只是简单从接口拿过来,还未仔细考虑
4
+ */ function _classCallCheck(instance, Constructor) {
2
5
  if (!(instance instanceof Constructor)) {
3
6
  throw new TypeError("Cannot call a class as a function");
4
7
  }
5
8
  }
6
- /**
7
- * @author qiyu
8
- * @description 属性只是简单从接口拿过来,还未仔细考虑
9
- */ export var UserEntity = function UserEntity() {
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
+ }
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
  };
@@ -1,2 +1,2 @@
1
- export * from './Department';
2
- export * from './User';
1
+ export * from "./Department";
2
+ export * from "./User";