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