@byteluck-fe/model-driven-driven 2.22.2-beta.8 → 2.22.3-beta.11

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/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # Driven
2
- 设计态引擎
3
-
4
- Builder.ts // 兼容旧版Designer,提供页面初始化
5
- constants.ts // 常量
6
- Designer.ts // 旧版designer的实现
7
- designerUtils.ts // 工具函数
8
- Driven.ts // 引擎
9
- EventLogic.ts // 事件管理
10
- index.ts
11
- Plugin.ts // 插件
12
- Store.ts // 仓库
13
- utils.ts // 工具
1
+ # Driven
2
+ 设计态引擎
3
+
4
+ Builder.ts // 兼容旧版Designer,提供页面初始化
5
+ constants.ts // 常量
6
+ Designer.ts // 旧版designer的实现
7
+ designerUtils.ts // 工具函数
8
+ Driven.ts // 引擎
9
+ EventLogic.ts // 事件管理
10
+ index.ts
11
+ Plugin.ts // 插件
12
+ Store.ts // 仓库
13
+ utils.ts // 工具
@@ -30,8 +30,9 @@ function _define_property(obj, key, value) {
30
30
  }
31
31
  return obj;
32
32
  }
33
+ import { getLocaleText } from '@byteluck-fe/locale-message';
33
34
  import Designer from './Designer';
34
- import { CONTROL_TYPE, RulesMessage } from '@byteluck-fe/model-driven-shared';
35
+ import { CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
35
36
  export var Builder = /*#__PURE__*/ function() {
36
37
  "use strict";
37
38
  function Builder() {
@@ -105,7 +106,7 @@ export var Builder = /*#__PURE__*/ function() {
105
106
  rules: [
106
107
  {
107
108
  id: 'default',
108
- name: RulesMessage.getMessage('approvedDocuments'),
109
+ name: getLocaleText('CMD.approvedDocuments', null, '审批通过单据'),
109
110
  color: 'theme',
110
111
  filters: [
111
112
  {
@@ -114,7 +115,7 @@ export var Builder = /*#__PURE__*/ function() {
114
115
  leftVariableBo: {
115
116
  type: 'varchar',
116
117
  value: 'process_status',
117
- name: RulesMessage.getMessage('processStatus')
118
+ name: getLocaleText('CMD.processStatus', null, '流程状态')
118
119
  },
119
120
  checked: false,
120
121
  describe: 'ruleLine',
@@ -41,6 +41,10 @@ function _async_to_generator(fn) {
41
41
  });
42
42
  };
43
43
  }
44
+ function _call_super(_this, derived, args) {
45
+ derived = _get_prototype_of(derived);
46
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
47
+ }
44
48
  function _class_call_check(instance, Constructor) {
45
49
  if (!(instance instanceof Constructor)) {
46
50
  throw new TypeError("Cannot call a class as a function");
@@ -134,31 +138,15 @@ function _unsupported_iterable_to_array(o, minLen) {
134
138
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
135
139
  }
136
140
  function _is_native_reflect_construct() {
137
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
138
- if (Reflect.construct.sham) return false;
139
- if (typeof Proxy === "function") return true;
140
141
  try {
141
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
142
- return true;
143
- } catch (e) {
144
- return false;
145
- }
146
- }
147
- function _create_super(Derived) {
148
- var hasNativeReflectConstruct = _is_native_reflect_construct();
149
- return function _createSuperInternal() {
150
- var Super = _get_prototype_of(Derived), result;
151
- if (hasNativeReflectConstruct) {
152
- var NewTarget = _get_prototype_of(this).constructor;
153
- result = Reflect.construct(Super, arguments, NewTarget);
154
- } else {
155
- result = Super.apply(this, arguments);
156
- }
157
- return _possible_constructor_return(this, result);
158
- };
142
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
143
+ } catch (_) {}
144
+ return (_is_native_reflect_construct = function() {
145
+ return !!result;
146
+ })();
159
147
  }
160
148
  function _ts_generator(thisArg, body) {
161
- var f, y, t, g, _ = {
149
+ var f, y, t, _ = {
162
150
  label: 0,
163
151
  sent: function() {
164
152
  if (t[0] & 1) throw t[1];
@@ -166,12 +154,8 @@ function _ts_generator(thisArg, body) {
166
154
  },
167
155
  trys: [],
168
156
  ops: []
169
- };
170
- return g = {
171
- next: verb(0),
172
- "throw": verb(1),
173
- "return": verb(2)
174
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
157
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
158
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
175
159
  return this;
176
160
  }), g;
177
161
  function verb(n) {
@@ -184,7 +168,7 @@ function _ts_generator(thisArg, body) {
184
168
  }
185
169
  function step(op) {
186
170
  if (f) throw new TypeError("Generator is already executing.");
187
- while(_)try {
171
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
188
172
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
189
173
  if (y = 0, t) op = [
190
174
  op[0] & 2,
@@ -259,16 +243,12 @@ import { toSchema, getModelBindInfoList, checkSchema } from './utils';
259
243
  var Designer = /*#__PURE__*/ function _target(RegisterControls) {
260
244
  "use strict";
261
245
  _inherits(Designer, RegisterControls);
262
- var _super = _create_super(Designer);
263
246
  function Designer() {
264
247
  _class_call_check(this, Designer);
265
248
  var _this;
266
- _this = _super.call(this, 'Designer');
267
- _define_property(_assert_this_initialized(_this), "toolbox", []);
268
- _define_property(_assert_this_initialized(_this), "services", {});
269
- _define_property(_assert_this_initialized(_this), "eventLogic", new EventLogic());
270
- _define_property(_assert_this_initialized(_this), "fieldTypes", FieldTypes);
271
- _define_property(_assert_this_initialized(_this), "controlSettingMap", new Map());
249
+ _this = _call_super(this, Designer, [
250
+ 'Designer'
251
+ ]), _define_property(_this, "toolbox", []), _define_property(_this, "services", {}), _define_property(_this, "eventLogic", new EventLogic()), _define_property(_this, "fieldTypes", FieldTypes), _define_property(_this, "controlSettingMap", new Map());
272
252
  (_instanceof(this, Designer) ? this.constructor : void 0).staticControls.forEach(function(control) {
273
253
  var _$Designer = control.Designer, Setting = control.Setting;
274
254
  _this.controlSettingMap.set(_$Designer.controlType, Setting);
@@ -279,6 +259,7 @@ var Designer = /*#__PURE__*/ function _target(RegisterControls) {
279
259
  {
280
260
  key: "registerControl",
281
261
  value: function registerControl(control) {
262
+ ;
282
263
  this.constructor.register(control, 'Designer');
283
264
  var DesignerClass = control.Designer, Setting = control.Setting;
284
265
  this.register(DesignerClass);
@@ -15,6 +15,10 @@ function _assert_this_initialized(self) {
15
15
  }
16
16
  return self;
17
17
  }
18
+ function _call_super(_this, derived, args) {
19
+ derived = _get_prototype_of(derived);
20
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
21
+ }
18
22
  function _class_call_check(instance, Constructor) {
19
23
  if (!(instance instanceof Constructor)) {
20
24
  throw new TypeError("Cannot call a class as a function");
@@ -169,28 +173,12 @@ function _unsupported_iterable_to_array(o, minLen) {
169
173
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
170
174
  }
171
175
  function _is_native_reflect_construct() {
172
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
173
- if (Reflect.construct.sham) return false;
174
- if (typeof Proxy === "function") return true;
175
176
  try {
176
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
177
- return true;
178
- } catch (e) {
179
- return false;
180
- }
181
- }
182
- function _create_super(Derived) {
183
- var hasNativeReflectConstruct = _is_native_reflect_construct();
184
- return function _createSuperInternal() {
185
- var Super = _get_prototype_of(Derived), result;
186
- if (hasNativeReflectConstruct) {
187
- var NewTarget = _get_prototype_of(this).constructor;
188
- result = Reflect.construct(Super, arguments, NewTarget);
189
- } else {
190
- result = Super.apply(this, arguments);
191
- }
192
- return _possible_constructor_return(this, result);
193
- };
177
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
178
+ } catch (_) {}
179
+ return (_is_native_reflect_construct = function() {
180
+ return !!result;
181
+ })();
194
182
  }
195
183
  import { CONTROL_BASE_TYPE, error, genNonDuplicateId, isArray, isBuiltInControls, isObject, isString, updateValueFromKeys, warn, Watcher } from '@byteluck-fe/model-driven-shared';
196
184
  import { findInstanceDataScopeParent, Store } from './Store';
@@ -198,48 +186,33 @@ import { Designer } from './Designer';
198
186
  import EventLogic from './EventLogic';
199
187
  import { checkSchema, generatePermissions, getModelBindInfoList, toSchema } from './utils';
200
188
  import { Group, initSettings, Tab } from '@byteluck-fe/model-driven-settings';
201
- import { RulesMessage, DEFAULT_LOCALE } from '@byteluck-fe/model-driven-shared';
189
+ import { DEFAULT_LOCALE } from '@byteluck-fe/model-driven-shared';
202
190
  // 当前正在注册的插件名称
203
191
  var applyingPluginName = '';
204
- /**
205
- * 设计器驱动
192
+ /**
193
+ * 设计器驱动
206
194
  * */ var Driven = /*#__PURE__*/ function(Watcher) {
207
195
  "use strict";
208
196
  _inherits(Driven, Watcher);
209
- var _super = _create_super(Driven);
210
197
  function Driven(options) {
211
198
  _class_call_check(this, Driven);
212
199
  var _this;
213
- _this = _super.call(this);
214
- _define_property(_assert_this_initialized(_this), "mode", void 0);
215
- _define_property(_assert_this_initialized(_this), "isMounted", false);
216
- _define_property(_assert_this_initialized(_this), "id", genNonDuplicateId(8));
217
- /**
218
- * 控件可选的事件
219
- * */ _define_property(_assert_this_initialized(_this), "eventLogic", void 0);
220
- /**
221
- * 处理数据存储,存放模型等
222
- * */ _define_property(_assert_this_initialized(_this), "store", void 0);
223
- /**
224
- * 额外参数存储
225
- */ _define_property(_assert_this_initialized(_this), "externalParams", void 0);
226
- /**
227
- * 处理instance,和schema存储
228
- * */ _define_property(_assert_this_initialized(_this), "designer", void 0);
229
- /**
230
- * 插件数组
231
- * */ _define_property(_assert_this_initialized(_this), "__plugins", void 0);
232
- _define_property(_assert_this_initialized(_this), "__pluginsApplied", false);
233
- _define_property(_assert_this_initialized(_this), "$options", void 0);
234
- // TODO 拿到schema
235
- _define_property(_assert_this_initialized(_this), "getSchema", toSchema);
236
- // TODO 拿到model_bind_info_list
237
- _define_property(_assert_this_initialized(_this), "getModelBindInfoList", getModelBindInfoList);
238
- // TODO 拿到permission_controls
239
- _define_property(_assert_this_initialized(_this), "generatePermissions", generatePermissions);
200
+ _this = _call_super(this, Driven), _define_property(_this, "mode", void 0), _define_property(_this, "isMounted", false), _define_property(_this, "id", genNonDuplicateId(8)), /**
201
+ * 控件可选的事件
202
+ * */ _define_property(_this, "eventLogic", void 0), /**
203
+ * 处理数据存储,存放模型等
204
+ * */ _define_property(_this, "store", void 0), /**
205
+ * 额外参数存储
206
+ */ _define_property(_this, "externalParams", void 0), /**
207
+ * 处理instance,和schema存储
208
+ * */ _define_property(_this, "designer", void 0), /**
209
+ * 插件数组
210
+ * */ _define_property(_this, "__plugins", void 0), _define_property(_this, "__pluginsApplied", false), _define_property(_this, "$options", void 0), // TODO 拿到schema
211
+ _define_property(_this, "getSchema", toSchema), // TODO 拿到model_bind_info_list
212
+ _define_property(_this, "getModelBindInfoList", getModelBindInfoList), // TODO 拿到permission_controls
213
+ _define_property(_this, "generatePermissions", generatePermissions);
240
214
  _this.$options = Object.freeze(options);
241
215
  var _this_$options = _this.$options, _this_$options_autoMount = _this_$options.autoMount, autoMount = _this_$options_autoMount === void 0 ? false : _this_$options_autoMount, tmp = _this_$options.Designer, DesignerClass = tmp === void 0 ? Designer : tmp, schema = _this_$options.schema, _this_$options_mode = _this_$options.mode, mode = _this_$options_mode === void 0 ? 'form' : _this_$options_mode, tmp1 = _this_$options.store, storeOptions = tmp1 === void 0 ? {} : tmp1, messagesI18n = _this_$options.messagesI18n, _this_$options_language = _this_$options.language, language = _this_$options_language === void 0 ? DEFAULT_LOCALE : _this_$options_language;
242
- RulesMessage.setLocale(language, messagesI18n);
243
216
  _this.eventLogic = new EventLogic();
244
217
  _this.designer = new DesignerClass();
245
218
  _this.store = new Store(_object_spread({
@@ -501,10 +474,10 @@ var applyingPluginName = '';
501
474
  if (instance === null) return;
502
475
  var _instance = this.getInstance(instance);
503
476
  if (!_instance) return;
504
- /*
505
- 移动之后,拿到控件新的位置,并触发事件, 如果是新增的控件的话,就没有原始位置和父级,
506
- 事件是否区分move和add
507
- move是从主表移动到子表或子表移动到主表才触发,还是所有移动都触发
477
+ /*
478
+ 移动之后,拿到控件新的位置,并触发事件, 如果是新增的控件的话,就没有原始位置和父级,
479
+ 事件是否区分move和add
480
+ move是从主表移动到子表或子表移动到主表才触发,还是所有移动都触发
508
481
  */ var oldDataScopeParent = this.store.movingInstanceOldDataScopeParent;
509
482
  var newDataScopeParent = findInstanceDataScopeParent(_instance);
510
483
  var oldParent = this.store.movingInstanceOldParent;
@@ -629,8 +602,8 @@ var applyingPluginName = '';
629
602
  },
630
603
  {
631
604
  key: "removeInstance",
632
- value: /**
633
- * 删除控件
605
+ value: /**
606
+ * 删除控件
634
607
  * */ function removeInstance(instance) {
635
608
  // 删除实例,并触发事件 removed
636
609
  var parent = instance.parent;
@@ -669,8 +642,8 @@ var applyingPluginName = '';
669
642
  },
670
643
  {
671
644
  key: "updateInstanceType",
672
- value: /**
673
- * 修改控件类型
645
+ value: /**
646
+ * 修改控件类型
674
647
  * */ function updateInstanceType(instance, type) {
675
648
  var schema = instance.toSchema();
676
649
  var newInstance = this.createInstance(type, {
@@ -728,16 +701,16 @@ var applyingPluginName = '';
728
701
  },
729
702
  {
730
703
  key: "assertInstance",
731
- value: /**
732
- * 判断控件的类型,返回当前控件的正确类型
704
+ value: /**
705
+ * 判断控件的类型,返回当前控件的正确类型
733
706
  * */ function assertInstance(instance, types) {
734
707
  return isString(types) ? instance.type === types : types.includes(instance.type);
735
708
  }
736
709
  },
737
710
  {
738
711
  key: "getInstanceInListControl",
739
- value: /**
740
- * 控件在列表控件内,如明细子表或列表控件
712
+ value: /**
713
+ * 控件在列表控件内,如明细子表或列表控件
741
714
  * */ function getInstanceInListControl(instance) {
742
715
  var _instance = instance;
743
716
  while(_instance){
@@ -808,7 +781,7 @@ var applyingPluginName = '';
808
781
  ]);
809
782
  return Driven;
810
783
  }(Watcher);
811
- /**
812
- * 控件事件定义
784
+ /**
785
+ * 控件事件定义
813
786
  * */ _define_property(Driven, "EventLogic", EventLogic);
814
787
  export { Driven };
package/dist/esm/Store.js CHANGED
@@ -96,42 +96,42 @@ export var Store = /*#__PURE__*/ function() {
96
96
  "use strict";
97
97
  function Store(options) {
98
98
  _class_call_check(this, Store);
99
- /**
100
- * 页面控件实例树
99
+ /**
100
+ * 页面控件实例树
101
101
  * */ _define_property(this, "instance", void 0);
102
- /**
103
- * 拍平的控件数组
102
+ /**
103
+ * 拍平的控件数组
104
104
  * */ _define_property(this, "flatInstances", void 0);
105
- /**
106
- * 控件id组成的map
105
+ /**
106
+ * 控件id组成的map
107
107
  * */ _define_property(this, "instanceIdMap", void 0);
108
- /**
109
- * dataCode和fieldCode组成的map
110
- * {
111
- * [主表dataCode]: {
112
- * [fieldCode]: 控件
113
- * },
114
- * [子表dataCode]: {
115
- * [fieldCode]: 控件
116
- * }
117
- * }
108
+ /**
109
+ * dataCode和fieldCode组成的map
110
+ * {
111
+ * [主表dataCode]: {
112
+ * [fieldCode]: 控件
113
+ * },
114
+ * [子表dataCode]: {
115
+ * [fieldCode]: 控件
116
+ * }
117
+ * }
118
118
  * */ _define_property(this, "dataFieldCodeMap", void 0);
119
- /**
120
- * 当前选中的控件
119
+ /**
120
+ * 当前选中的控件
121
121
  * */ _define_property(this, "selected", null);
122
- /**
123
- * 当前选中的数据作用域控件
122
+ /**
123
+ * 当前选中的数据作用域控件
124
124
  * */ _define_property(this, "selectedInstanceDataScopeParent", null);
125
125
  _define_property(this, "selectedDataScopeFlatInstances", []);
126
- /**
127
- * 当前选中控件的setting
126
+ /**
127
+ * 当前选中控件的setting
128
128
  * */ _define_property(this, "selectedInstanceSetting", []);
129
129
  _define_property(this, "selectedInstanceSettingItems", []);
130
- /**
131
- * 当前选中控件的数据模型
130
+ /**
131
+ * 当前选中控件的数据模型
132
132
  * */ _define_property(this, "selectedFieldItem", null);
133
- /**
134
- * 扩展字段,比如appId,dataCode等
133
+ /**
134
+ * 扩展字段,比如appId,dataCode等
135
135
  * */ _define_property(this, "external", {});
136
136
  _define_property(this, "movingInstance", null);
137
137
  _define_property(this, "movingInstanceOldParent", null);
@@ -147,8 +147,8 @@ export var Store = /*#__PURE__*/ function() {
147
147
  _create_class(Store, [
148
148
  {
149
149
  key: "selectedRules",
150
- get: /**
151
- * 当前选中控件的rules
150
+ get: /**
151
+ * 当前选中控件的rules
152
152
  * */ function get() {
153
153
  if (!this.selected) {
154
154
  return null;
@@ -158,8 +158,8 @@ export var Store = /*#__PURE__*/ function() {
158
158
  },
159
159
  {
160
160
  key: "selectedAntdRules",
161
- get: /**
162
- * 当前选中控件的antd rules
161
+ get: /**
162
+ * 当前选中控件的antd rules
163
163
  * */ function get() {
164
164
  var rules = this.selectedRules;
165
165
  if (!rules) {
@@ -294,9 +294,11 @@ function setInstanceInDataFieldCodeMap(instance, dataFieldCodeMap) {
294
294
  if (isDataBind(dataBind)) {
295
295
  setDataFieldCodeMap(dataFieldCodeMap, dataBind, instance);
296
296
  } else {
297
- Object.values(dataBind).forEach(function(subDataBind) {
298
- setDataFieldCodeMap(dataFieldCodeMap, subDataBind, instance);
299
- });
297
+ if (dataBind) {
298
+ Object.values(dataBind).forEach(function(subDataBind) {
299
+ setDataFieldCodeMap(dataFieldCodeMap, subDataBind, instance);
300
+ });
301
+ }
300
302
  }
301
303
  }
302
304
  }
@@ -1,4 +1,5 @@
1
- import { CONTROL_TYPE, FieldTypes, RulesMessage } from '@byteluck-fe/model-driven-shared';
1
+ import { getLocaleText } from '@byteluck-fe/locale-message';
2
+ import { CONTROL_TYPE, FieldTypes } from '@byteluck-fe/model-driven-shared';
2
3
  // 使用ObjectDataBind 的控件
3
4
  export var objectDataBindControlTypes = [
4
5
  CONTROL_TYPE.AMOUNT,
@@ -7,27 +8,27 @@ export var objectDataBindControlTypes = [
7
8
  ];
8
9
  export var objectDataBindKeyToFieldType = {
9
10
  amount: {
10
- caption: RulesMessage.getMessage('amount'),
11
+ caption: getLocaleText('CMD.amount', null, '金额'),
11
12
  fieldType: FieldTypes.DECIMAL
12
13
  },
13
14
  currency: {
14
- caption: RulesMessage.getMessage('currency'),
15
+ caption: getLocaleText('CMD.currency', null, '币种'),
15
16
  fieldType: FieldTypes.VARCHAR
16
17
  },
17
18
  result: {
18
- caption: RulesMessage.getMessage('result'),
19
+ caption: getLocaleText('CMD.result', null, '结果'),
19
20
  fieldType: FieldTypes.DECIMAL
20
21
  },
21
22
  unit: {
22
- caption: RulesMessage.getMessage('unit'),
23
+ caption: getLocaleText('CMD.unit', null, '单位'),
23
24
  fieldType: FieldTypes.VARCHAR
24
25
  },
25
26
  min: {
26
- caption: RulesMessage.getMessage('startTime'),
27
+ caption: getLocaleText('CMD.startTime', null, '开始时间'),
27
28
  fieldType: FieldTypes.TIMESTAMP
28
29
  },
29
30
  max: {
30
- caption: RulesMessage.getMessage('endTime'),
31
+ caption: getLocaleText('CMD.endTime', null, '结束时间'),
31
32
  fieldType: FieldTypes.TIMESTAMP
32
33
  }
33
34
  };
package/dist/esm/utils.js CHANGED
@@ -86,7 +86,7 @@ function _unsupported_iterable_to_array(o, minLen) {
86
86
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
87
87
  }
88
88
  function _ts_generator(thisArg, body) {
89
- var f, y, t, g, _ = {
89
+ var f, y, t, _ = {
90
90
  label: 0,
91
91
  sent: function() {
92
92
  if (t[0] & 1) throw t[1];
@@ -94,12 +94,8 @@ function _ts_generator(thisArg, body) {
94
94
  },
95
95
  trys: [],
96
96
  ops: []
97
- };
98
- return g = {
99
- next: verb(0),
100
- "throw": verb(1),
101
- "return": verb(2)
102
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
97
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
98
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
103
99
  return this;
104
100
  }), g;
105
101
  function verb(n) {
@@ -112,7 +108,7 @@ function _ts_generator(thisArg, body) {
112
108
  }
113
109
  function step(op) {
114
110
  if (f) throw new TypeError("Generator is already executing.");
115
- while(_)try {
111
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
116
112
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
117
113
  if (y = 0, t) op = [
118
114
  op[0] & 2,
@@ -183,8 +179,9 @@ function _ts_generator(thisArg, body) {
183
179
  import { loopFormControl } from './designerUtils';
184
180
  import { CONTROL_BASE_TYPE, CONTROL_TYPE, // FieldTypes,
185
181
  // FieldTypeToColumnType,
186
- isArray, RulesMessage } from '@byteluck-fe/model-driven-shared';
182
+ isArray } from '@byteluck-fe/model-driven-shared';
187
183
  import { objectDataBindControlTypes } from './constants';
184
+ import { getLocaleText } from '@byteluck-fe/locale-message';
188
185
  export function getMasterFormControls(controls) {
189
186
  var formctls = [];
190
187
  // @ts-ignore
@@ -196,9 +193,9 @@ export function getMasterFormControls(controls) {
196
193
  });
197
194
  return formctls;
198
195
  }
199
- /**
200
- * @description 给modelBindInfoList中填充fieldCode和dataCode
201
- * @description 我们生成fieldCode的规则是:DataBind的控件,取`field_${id}`,ObjectDataBind的控件,取`field_${id}_${key}`, key指的是ObjectDataBind.keys()
196
+ /**
197
+ * @description 给modelBindInfoList中填充fieldCode和dataCode
198
+ * @description 我们生成fieldCode的规则是:DataBind的控件,取`field_${id}`,ObjectDataBind的控件,取`field_${id}_${key}`, key指的是ObjectDataBind.keys()
202
199
  * */ export function fillModelBindInfoListFieldCode(modelBindInfoList) {
203
200
  var dataCode = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
204
201
  if (!modelBindInfoList || !Array.isArray(modelBindInfoList)) return [];
@@ -216,6 +213,7 @@ export function getMasterFormControls(controls) {
216
213
  dataBind.dataCode = dataCode;
217
214
  });
218
215
  } else {
216
+ ;
219
217
  item.dataBind.fieldCode = fieldCodeBeforeAddPrefix(item.controlId);
220
218
  item.dataBind.dataCode = dataCode;
221
219
  }
@@ -249,10 +247,7 @@ function getModelBindInfoList(controls) {
249
247
  return controls.toDataBindModel();
250
248
  }
251
249
  function checkSchema(controls, messages, ignore) {
252
- return _checkSchema.apply(this, arguments);
253
- }
254
- function _checkSchema() {
255
- _checkSchema = _async_to_generator(function(controls, messages, ignore) {
250
+ return _async_to_generator(function() {
256
251
  var result;
257
252
  return _ts_generator(this, function(_state) {
258
253
  switch(_state.label){
@@ -287,8 +282,7 @@ function _checkSchema() {
287
282
  ];
288
283
  }
289
284
  });
290
- });
291
- return _checkSchema.apply(this, arguments);
285
+ })();
292
286
  }
293
287
  // 不可以被权限控制的控件
294
288
  var PermissionExcludeControlTypes = [
@@ -322,15 +316,15 @@ var cannotEditControlTypes = [
322
316
  var LIST_OPERATION_BUTTON_PERMISSIONS_MAPS = {
323
317
  check: {
324
318
  id: 'listPageCheckBtnId',
325
- caption: RulesMessage.getMessage('view')
319
+ caption: getLocaleText('CMD.view', null, '查看')
326
320
  },
327
321
  edit: {
328
322
  id: 'listPageEditBtnId',
329
- caption: RulesMessage.getMessage('edit')
323
+ caption: getLocaleText('CMD.edit', null, '编辑')
330
324
  },
331
325
  delete: {
332
326
  id: 'listPageDeleteBtnId',
333
- caption: RulesMessage.getMessage('delete')
327
+ caption: getLocaleText('CMD.delete', null, '删除')
334
328
  }
335
329
  };
336
330
  // 生成权限字段