@byteluck-fe/model-driven-core 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.
Files changed (69) hide show
  1. package/README.md +69 -69
  2. package/dist/esm/common/BaseControl/designer.js +25 -30
  3. package/dist/esm/common/BaseControl/property.js +25 -38
  4. package/dist/esm/common/ColumnControl/designer.js +13 -27
  5. package/dist/esm/common/ColumnControl/property.js +56 -81
  6. package/dist/esm/common/ColumnControl/runtime.js +13 -27
  7. package/dist/esm/common/FormControl/designer.js +12 -25
  8. package/dist/esm/common/FormControl/property.js +90 -117
  9. package/dist/esm/common/FormControl/runtime.js +12 -26
  10. package/dist/esm/common/LayoutControl/designer.js +19 -39
  11. package/dist/esm/common/LayoutControl/property.js +12 -23
  12. package/dist/esm/common/LayoutControl/runtime.js +13 -27
  13. package/dist/esm/common/ListControl/designer.js +19 -36
  14. package/dist/esm/common/ListControl/property.js +14 -31
  15. package/dist/esm/common/ListControl/runtime.js +14 -28
  16. package/dist/esm/common/SearchViewControl/designer.js +12 -25
  17. package/dist/esm/common/SearchViewControl/property.js +12 -24
  18. package/dist/esm/common/SearchViewControl/runtime.js +12 -25
  19. package/dist/esm/common/Validator.js +5 -4
  20. package/dist/esm/common/WrapControl/designer.js +12 -25
  21. package/dist/esm/common/WrapControl/property.js +12 -23
  22. package/dist/esm/common/WrapControl/runtime.js +12 -25
  23. package/dist/esm/common/initLinkOperationRules.js +2 -2
  24. package/dist/esm/common/initOptionAndDataSourceRules.js +31 -30
  25. package/dist/esm/framework/RegisterControls.js +1 -0
  26. package/dist/esm/framework/index.js +424 -444
  27. package/dist/index.umd.js +1 -45
  28. package/dist/types/api-doc-index.d.ts +4 -4
  29. package/dist/types/common/BaseControl/designer.d.ts +71 -71
  30. package/dist/types/common/BaseControl/index.d.ts +13 -13
  31. package/dist/types/common/BaseControl/property.d.ts +44 -44
  32. package/dist/types/common/BaseControl/runtime.d.ts +23 -23
  33. package/dist/types/common/BaseControl/types.d.ts +35 -35
  34. package/dist/types/common/ColumnControl/designer.d.ts +20 -20
  35. package/dist/types/common/ColumnControl/index.d.ts +12 -12
  36. package/dist/types/common/ColumnControl/property.d.ts +74 -74
  37. package/dist/types/common/ColumnControl/runtime.d.ts +11 -11
  38. package/dist/types/common/ControlArray.d.ts +9 -9
  39. package/dist/types/common/FormControl/designer.d.ts +13 -13
  40. package/dist/types/common/FormControl/index.d.ts +12 -12
  41. package/dist/types/common/FormControl/property.d.ts +100 -100
  42. package/dist/types/common/FormControl/runtime.d.ts +11 -11
  43. package/dist/types/common/LayoutControl/designer.d.ts +21 -21
  44. package/dist/types/common/LayoutControl/index.d.ts +12 -12
  45. package/dist/types/common/LayoutControl/property.d.ts +6 -6
  46. package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
  47. package/dist/types/common/ListControl/designer.d.ts +16 -16
  48. package/dist/types/common/ListControl/index.d.ts +12 -12
  49. package/dist/types/common/ListControl/property.d.ts +18 -18
  50. package/dist/types/common/ListControl/runtime.d.ts +12 -12
  51. package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
  52. package/dist/types/common/SearchViewControl/index.d.ts +12 -12
  53. package/dist/types/common/SearchViewControl/property.d.ts +8 -8
  54. package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
  55. package/dist/types/common/Validator.d.ts +15 -15
  56. package/dist/types/common/WrapControl/designer.d.ts +11 -11
  57. package/dist/types/common/WrapControl/index.d.ts +12 -12
  58. package/dist/types/common/WrapControl/property.d.ts +6 -6
  59. package/dist/types/common/WrapControl/runtime.d.ts +11 -11
  60. package/dist/types/common/controlHooksEmitter.d.ts +4 -4
  61. package/dist/types/common/index.d.ts +12 -12
  62. package/dist/types/common/initLinkOperationRules.d.ts +6 -6
  63. package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
  64. package/dist/types/framework/RegisterControls.d.ts +37 -37
  65. package/dist/types/framework/index.d.ts +925 -923
  66. package/dist/types/framework/isDataBind.d.ts +2 -2
  67. package/dist/types/index.d.ts +4 -4
  68. package/dist/types/type.d.ts +91 -91
  69. package/package.json +3 -3
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,28 +63,12 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { defineControlArrayToProperty } from '../ControlArray';
86
74
  import { RuntimeControl } from '../BaseControl';
@@ -88,16 +76,14 @@ import ColumnControlProperty from './property';
88
76
  var ColumnControl = /*#__PURE__*/ function(RuntimeControl) {
89
77
  "use strict";
90
78
  _inherits(ColumnControl, RuntimeControl);
91
- var _super = _create_super(ColumnControl);
92
79
  function ColumnControl(props) {
93
80
  _class_call_check(this, ColumnControl);
94
81
  var _this;
95
- _this = _super.call(this, props);
96
- _define_property(_assert_this_initialized(_this), "controlType", 'column');
97
- _define_property(_assert_this_initialized(_this), "props", void 0);
98
- _define_property(_assert_this_initialized(_this), "children", void 0);
82
+ _this = _call_super(this, ColumnControl, [
83
+ props
84
+ ]), _define_property(_this, "controlType", 'column'), _define_property(_this, "props", void 0), _define_property(_this, "children", void 0);
99
85
  _this.props = new ColumnControlProperty(props === null || props === void 0 ? void 0 : props.props);
100
- defineControlArrayToProperty(_assert_this_initialized(_this), 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Runtime');
86
+ defineControlArrayToProperty(_this, 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Runtime');
101
87
  return _this;
102
88
  }
103
89
  return ColumnControl;
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,41 +63,24 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { DesignerControl } from '../BaseControl';
86
74
  import BaseControlProperty from './property';
87
75
  var FormControl = /*#__PURE__*/ function(DesignerControl) {
88
76
  "use strict";
89
77
  _inherits(FormControl, DesignerControl);
90
- var _super = _create_super(FormControl);
91
78
  function FormControl(props) {
92
79
  _class_call_check(this, FormControl);
93
80
  var _this;
94
- _this = _super.call(this, props);
95
- _define_property(_assert_this_initialized(_this), "controlType", 'form');
96
- _define_property(_assert_this_initialized(_this), "props", void 0);
81
+ _this = _call_super(this, FormControl, [
82
+ props
83
+ ]), _define_property(_this, "controlType", 'form'), _define_property(_this, "props", void 0);
97
84
  _this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
98
85
  return _this;
99
86
  }
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,90 +63,69 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
71
72
  }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
84
- }
85
- import { RulesMessage, JSONCopy } from '@byteluck-fe/model-driven-shared';
73
+ import { JSONCopy } from '@byteluck-fe/model-driven-shared';
86
74
  import { Property, PropertyRules, PropertyRuntimeRules } from '../BaseControl';
87
75
  import { initOptionAndDataSourceRules } from '../initOptionAndDataSourceRules';
88
76
  import { DataBind } from '../../framework';
89
77
  import { isDataBind } from '../../framework/isDataBind';
78
+ import { getLocaleText } from '@byteluck-fe/locale-message';
90
79
  var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
91
80
  "use strict";
92
81
  _inherits(BaseControlPropertyRules, PropertyRules);
93
- var _super = _create_super(BaseControlPropertyRules);
94
82
  function BaseControlPropertyRules(props) {
95
83
  _class_call_check(this, BaseControlPropertyRules);
96
84
  var _this;
97
- _this = _super.call(this, props);
98
- _define_property(_assert_this_initialized(_this), "dataBind", {});
99
- _define_property(_assert_this_initialized(_this), "caption", {
85
+ _this = _call_super(this, BaseControlPropertyRules, [
86
+ props
87
+ ]), _define_property(_this, "dataBind", {}), _define_property(_this, "caption", {
100
88
  type: 'string',
101
89
  required: true,
102
- message: RulesMessage.getMessage('pleaseEnterCaption')
103
- });
104
- _define_property(_assert_this_initialized(_this), "isHideCaption", {
90
+ message: getLocaleText('CMD.pleaseEnterCaption', null, '请输入标题')
91
+ }), _define_property(_this, "isHideCaption", {
105
92
  type: 'boolean'
106
- });
107
- _define_property(_assert_this_initialized(_this), "labelPosition", {
93
+ }), _define_property(_this, "labelPosition", {
108
94
  type: 'enum',
109
95
  enum: [
110
96
  'top',
111
97
  'left'
112
98
  ]
113
- });
114
- // 去掉placeholder必填校验
99
+ }), // 去掉placeholder必填校验
115
100
  // public placeholder: RuleItem = {
116
101
  // required: true,
117
102
  // type: 'string',
118
- // message: RulesMessage.getMessage('pleaseEnterPlaceholder'),
103
+ // message: getLocaleText('CMD.pleaseEnterPlaceholder',null,'请输入提示文字'),
119
104
  // }
120
- _define_property(_assert_this_initialized(_this), "defaultState", {
105
+ _define_property(_this, "defaultState", {
121
106
  type: 'enum',
122
107
  enum: [
123
108
  'default',
124
109
  'readonly'
125
110
  ]
126
- });
127
- _define_property(_assert_this_initialized(_this), "required", {
111
+ }), _define_property(_this, "required", {
128
112
  type: 'boolean'
129
- });
130
- _define_property(_assert_this_initialized(_this), "captionTip", {
113
+ }), _define_property(_this, "captionTip", {
131
114
  type: 'string',
132
115
  required: false,
133
- message: RulesMessage.getMessage('pleaseEnterCaptionTip')
116
+ message: getLocaleText('CMD.pleaseEnterCaptionTip', null, '请输入气泡提示语')
134
117
  });
135
118
  // 初始化dataBind的校验规则
136
119
  var validateFields = {
137
120
  fieldCode: {
138
121
  type: 'string',
139
122
  required: true,
140
- message: RulesMessage.getMessage('pleaseEnterFieldCode')
123
+ message: getLocaleText('CMD.pleaseEnterFieldCode', null, '请绑定数据项')
141
124
  },
142
125
  dataCode: {
143
126
  type: 'string',
144
127
  required: true,
145
- message: RulesMessage.getMessage('pleaseEnterFieldCode')
128
+ message: getLocaleText('CMD.pleaseEnterFieldCode', null, '请绑定数据项')
146
129
  }
147
130
  };
148
131
  // if (props.dataBind instanceof DataBind) {
@@ -151,21 +134,22 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
151
134
  type: 'object',
152
135
  required: true,
153
136
  fields: JSONCopy(validateFields),
154
- message: RulesMessage.getMessage('pleaseEnterFieldCode')
137
+ message: getLocaleText('CMD.pleaseEnterFieldCode', null, '请绑定数据项')
155
138
  };
156
139
  } else {
157
140
  var dataBind = {
158
141
  type: 'object',
159
142
  required: true,
160
143
  fields: {},
161
- message: RulesMessage.getMessage('pleaseEnterFieldCode')
144
+ message: getLocaleText('CMD.pleaseEnterFieldCode', null, '请绑定数据项')
162
145
  };
163
146
  Object.keys(props.dataBind).forEach(function(key) {
147
+ ;
164
148
  dataBind.fields[key] = {
165
149
  type: 'object',
166
150
  required: true,
167
151
  fields: JSONCopy(validateFields),
168
- message: RulesMessage.getMessage('pleaseEnterFieldCode')
152
+ message: getLocaleText('CMD.pleaseEnterFieldCode', null, '请绑定数据项')
169
153
  };
170
154
  });
171
155
  _this.dataBind = dataBind;
@@ -180,88 +164,79 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
180
164
  var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRules) {
181
165
  "use strict";
182
166
  _inherits(BaseControlPropertyRuntimeRules, PropertyRuntimeRules);
183
- var _super = _create_super(BaseControlPropertyRuntimeRules);
184
167
  function BaseControlPropertyRuntimeRules(props) {
185
168
  _class_call_check(this, BaseControlPropertyRuntimeRules);
186
169
  var _this;
187
- _this = _super.call(this, props);
170
+ _this = _call_super(this, BaseControlPropertyRuntimeRules, [
171
+ props
172
+ ]);
188
173
  var isRequired = props.isHide ? false : props.required;
189
174
  if (isRequired) {
190
175
  _this.push({
191
176
  type: 'string',
192
177
  required: isRequired,
193
- message: props.requiredMessage !== '' ? props.requiredMessage : RulesMessage.getMessage('runtimeRequired', {
178
+ message: props.requiredMessage !== '' ? props.requiredMessage : getLocaleText('CMD.runtimeRequired', {
194
179
  caption: props.caption
195
- })
180
+ }, '{caption}必填')
196
181
  });
197
182
  }
198
183
  return _this;
199
184
  }
200
185
  return BaseControlPropertyRuntimeRules;
201
186
  }(PropertyRuntimeRules);
202
- /**
203
- * 表单控件公共属性
204
- * @public
187
+ /**
188
+ * 表单控件公共属性
189
+ * @public
205
190
  */ var BaseControlProperty = /*#__PURE__*/ function(Property) {
206
191
  "use strict";
207
192
  _inherits(BaseControlProperty, Property);
208
- var _super = _create_super(BaseControlProperty);
209
193
  function BaseControlProperty(props) {
210
194
  _class_call_check(this, BaseControlProperty);
211
195
  var _this;
212
- _this = _super.call(this, props);
213
- /**
214
- * 标题
215
- * @defaultValue ''
216
- * @public
217
- */ _define_property(_assert_this_initialized(_this), "caption", void 0);
218
- /**
219
- * 隐藏标题
220
- * @defaultValue false
221
- * @public
222
- */ _define_property(_assert_this_initialized(_this), "isHideCaption", void 0);
223
- /**
224
- * 显示气泡提示
225
- * @defaultValue false
226
- * @public
227
- */ _define_property(_assert_this_initialized(_this), "isShowCaptionTip", void 0);
228
- /**
229
- * 气泡提示语
230
- * @defaultValue ''
231
- * @public
232
- */ _define_property(_assert_this_initialized(_this), "captionTip", void 0);
233
- /**
234
- * 标题布局
235
- * @defaultValue ''
236
- * @public
237
- */ _define_property(_assert_this_initialized(_this), "labelPosition", void 0);
238
- /**
239
- * 绑定数据项
240
- * @public
241
- */ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
242
- /**
243
- * 默认值
244
- * @public
245
- */ _define_property(_assert_this_initialized(_this), "defaultValue", void 0);
246
- /**
247
- * 提示文字
248
- * @defaultValue ''
249
- * @public
250
- */ _define_property(_assert_this_initialized(_this), "placeholder", void 0);
251
- /**
252
- * 默认状态
253
- * @defaultValue 'default'
254
- * @public
255
- */ _define_property(_assert_this_initialized(_this), "defaultState", void 0);
256
- /**
257
- * 必填
258
- * @defaultValue false
259
- * @public
260
- */ _define_property(_assert_this_initialized(_this), "required", void 0);
261
- /**
262
- * 必填提示文案
263
- * @defaultValue ''
264
- */ _define_property(_assert_this_initialized(_this), "requiredMessage", void 0);
196
+ _this = _call_super(this, BaseControlProperty, [
197
+ props
198
+ ]), /**
199
+ * 标题
200
+ * @defaultValue ''
201
+ * @public
202
+ */ _define_property(_this, "caption", void 0), /**
203
+ * 隐藏标题
204
+ * @defaultValue false
205
+ * @public
206
+ */ _define_property(_this, "isHideCaption", void 0), /**
207
+ * 显示气泡提示
208
+ * @defaultValue false
209
+ * @public
210
+ */ _define_property(_this, "isShowCaptionTip", void 0), /**
211
+ * 气泡提示语
212
+ * @defaultValue ''
213
+ * @public
214
+ */ _define_property(_this, "captionTip", void 0), /**
215
+ * 标题布局
216
+ * @defaultValue ''
217
+ * @public
218
+ */ _define_property(_this, "labelPosition", void 0), /**
219
+ * 绑定数据项
220
+ * @public
221
+ */ _define_property(_this, "dataBind", void 0), /**
222
+ * 默认值
223
+ * @public
224
+ */ _define_property(_this, "defaultValue", void 0), /**
225
+ * 提示文字
226
+ * @defaultValue ''
227
+ * @public
228
+ */ _define_property(_this, "placeholder", void 0), /**
229
+ * 默认状态
230
+ * @defaultValue 'default'
231
+ * @public
232
+ */ _define_property(_this, "defaultState", void 0), /**
233
+ * 必填
234
+ * @defaultValue false
235
+ * @public
236
+ */ _define_property(_this, "required", void 0), /**
237
+ * 必填提示文案
238
+ * @defaultValue ''
239
+ */ _define_property(_this, "requiredMessage", void 0);
265
240
  var _props_caption;
266
241
  _this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : '';
267
242
  var _props_isHideCaption;
@@ -293,32 +268,30 @@ _define_property(BaseControlProperty, "RuntimeRules", BaseControlPropertyRuntime
293
268
  var OptionAndDataSourcePropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
294
269
  "use strict";
295
270
  _inherits(OptionAndDataSourcePropertyRules, BaseControlPropertyRules);
296
- var _super = _create_super(OptionAndDataSourcePropertyRules);
297
271
  function OptionAndDataSourcePropertyRules(props) {
298
272
  _class_call_check(this, OptionAndDataSourcePropertyRules);
299
273
  var _this;
300
- _this = _super.call(this, props);
301
- _define_property(_assert_this_initialized(_this), "optionConfig", {
274
+ _this = _call_super(this, OptionAndDataSourcePropertyRules, [
275
+ props
276
+ ]), _define_property(_this, "optionConfig", {
302
277
  type: 'enum',
303
278
  enum: [
304
279
  'custom',
305
280
  'datasource'
306
281
  ],
307
- message: RulesMessage.getMessage('PleaseSelectTheCorrectOptionSettings')
308
- });
309
- _define_property(_assert_this_initialized(_this), "options", [
282
+ message: getLocaleText('CMD.PleaseSelectTheCorrectOptionSettings', null, '请选择正确的选项设置')
283
+ }), _define_property(_this, "options", [
310
284
  {
311
285
  type: 'array',
312
- message: RulesMessage.getMessage('isNotArray')
286
+ message: getLocaleText('CMD.isNotArray', null, '请输入一个数组')
313
287
  }
314
- ]);
315
- _define_property(_assert_this_initialized(_this), "datasourceBind", [
288
+ ]), _define_property(_this, "datasourceBind", [
316
289
  {
317
290
  type: 'object',
318
- message: RulesMessage.getMessage('isNotObject')
291
+ message: getLocaleText('CMD.isNotObject', null, '请输入一个对象')
319
292
  }
320
293
  ]);
321
- initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
294
+ initOptionAndDataSourceRules.call(_this, props);
322
295
  return _this;
323
296
  }
324
297
  return OptionAndDataSourcePropertyRules;
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,42 +63,24 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
73
  import { RuntimeControl } from '../BaseControl';
86
74
  import BaseControlProperty from './property';
87
75
  var FormControl = /*#__PURE__*/ function(RuntimeControl) {
88
76
  "use strict";
89
77
  _inherits(FormControl, RuntimeControl);
90
- var _super = _create_super(FormControl);
91
78
  function FormControl(props) {
92
79
  _class_call_check(this, FormControl);
93
80
  var _this;
94
- _this = _super.call(this, props);
95
- _define_property(_assert_this_initialized(_this), "controlType", 'form');
96
- _define_property(_assert_this_initialized(_this), "props", void 0);
97
- _define_property(_assert_this_initialized(_this), "value", void 0);
81
+ _this = _call_super(this, FormControl, [
82
+ props
83
+ ]), _define_property(_this, "controlType", 'form'), _define_property(_this, "props", void 0), _define_property(_this, "value", void 0);
98
84
  _this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
99
85
  return _this;
100
86
  }
@@ -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");
@@ -196,31 +200,15 @@ function _unsupported_iterable_to_array(o, minLen) {
196
200
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
197
201
  }
198
202
  function _is_native_reflect_construct() {
199
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
200
- if (Reflect.construct.sham) return false;
201
- if (typeof Proxy === "function") return true;
202
203
  try {
203
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
204
- return true;
205
- } catch (e) {
206
- return false;
207
- }
208
- }
209
- function _create_super(Derived) {
210
- var hasNativeReflectConstruct = _is_native_reflect_construct();
211
- return function _createSuperInternal() {
212
- var Super = _get_prototype_of(Derived), result;
213
- if (hasNativeReflectConstruct) {
214
- var NewTarget = _get_prototype_of(this).constructor;
215
- result = Reflect.construct(Super, arguments, NewTarget);
216
- } else {
217
- result = Super.apply(this, arguments);
218
- }
219
- return _possible_constructor_return(this, result);
220
- };
204
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
205
+ } catch (_) {}
206
+ return (_is_native_reflect_construct = function() {
207
+ return !!result;
208
+ })();
221
209
  }
222
210
  function _ts_generator(thisArg, body) {
223
- var f, y, t, g, _ = {
211
+ var f, y, t, _ = {
224
212
  label: 0,
225
213
  sent: function() {
226
214
  if (t[0] & 1) throw t[1];
@@ -228,12 +216,8 @@ function _ts_generator(thisArg, body) {
228
216
  },
229
217
  trys: [],
230
218
  ops: []
231
- };
232
- return g = {
233
- next: verb(0),
234
- "throw": verb(1),
235
- "return": verb(2)
236
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
219
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
220
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
237
221
  return this;
238
222
  }), g;
239
223
  function verb(n) {
@@ -246,7 +230,7 @@ function _ts_generator(thisArg, body) {
246
230
  }
247
231
  function step(op) {
248
232
  if (f) throw new TypeError("Generator is already executing.");
249
- while(_)try {
233
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
250
234
  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;
251
235
  if (y = 0, t) op = [
252
236
  op[0] & 2,
@@ -323,19 +307,15 @@ var CHILDREN_MAX_LENGTH = 10000;
323
307
  var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
324
308
  "use strict";
325
309
  _inherits(LayoutControl, DesignerControl);
326
- var _super = _create_super(LayoutControl);
327
310
  function LayoutControl(props) {
328
311
  _class_call_check(this, LayoutControl);
329
312
  var _this;
330
- _this = _super.call(this, props);
331
- _define_property(_assert_this_initialized(_this), "controlType", 'layout');
332
- _define_property(_assert_this_initialized(_this), "children", void 0);
333
- _define_property(_assert_this_initialized(_this), "excludes", void 0);
334
- _define_property(_assert_this_initialized(_this), "childrenMaxLength", void 0);
335
- _define_property(_assert_this_initialized(_this), "props", void 0);
313
+ _this = _call_super(this, LayoutControl, [
314
+ props
315
+ ]), _define_property(_this, "controlType", 'layout'), _define_property(_this, "children", void 0), _define_property(_this, "excludes", void 0), _define_property(_this, "childrenMaxLength", void 0), _define_property(_this, "props", void 0);
336
316
  var _ref = _instanceof(this, LayoutControl) ? this.constructor : void 0, excludes = _ref.excludes, childrenMaxLength = _ref.childrenMaxLength;
337
317
  _this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
338
- defineControlArrayToProperty(_assert_this_initialized(_this), 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Designer');
318
+ defineControlArrayToProperty(_this, 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Designer');
339
319
  _this.excludes = JSONCopy(excludes);
340
320
  _this.childrenMaxLength = childrenMaxLength;
341
321
  return _this;
@@ -376,7 +356,7 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
376
356
  _state.sent();
377
357
  return [
378
358
  4,
379
- Promise.all(_this1.children.map(function(child) {
359
+ Promise.all(this.children.map(function(child) {
380
360
  return child.validate(messages, ignore);
381
361
  }))
382
362
  ];
@@ -388,7 +368,7 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
388
368
  ];
389
369
  }
390
370
  });
391
- })();
371
+ }).call(this);
392
372
  }
393
373
  },
394
374
  {