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

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