@byteluck-fe/model-driven-shared 2.3.1 → 2.3.13

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