@byteluck-fe/model-driven-core 2.7.0-alpha.28a → 2.7.0-alpha.31b

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 (83) hide show
  1. package/README.md +69 -69
  2. package/dist/esm/api-doc-index.js +4 -4
  3. package/dist/esm/common/BaseControl/designer.js +136 -257
  4. package/dist/esm/common/BaseControl/index.js +7 -7
  5. package/dist/esm/common/BaseControl/property.js +61 -80
  6. package/dist/esm/common/BaseControl/runtime.js +26 -48
  7. package/dist/esm/common/ColumnControl/designer.js +28 -43
  8. package/dist/esm/common/ColumnControl/index.js +6 -6
  9. package/dist/esm/common/ColumnControl/property.js +80 -129
  10. package/dist/esm/common/ColumnControl/runtime.js +28 -43
  11. package/dist/esm/common/ControlArray.js +21 -21
  12. package/dist/esm/common/FormControl/designer.js +33 -49
  13. package/dist/esm/common/FormControl/index.js +6 -6
  14. package/dist/esm/common/FormControl/property.js +119 -185
  15. package/dist/esm/common/FormControl/runtime.js +28 -44
  16. package/dist/esm/common/LayoutControl/designer.js +78 -207
  17. package/dist/esm/common/LayoutControl/index.js +6 -6
  18. package/dist/esm/common/LayoutControl/property.js +25 -25
  19. package/dist/esm/common/LayoutControl/runtime.js +30 -46
  20. package/dist/esm/common/ListControl/designer.js +76 -202
  21. package/dist/esm/common/ListControl/index.js +6 -6
  22. package/dist/esm/common/ListControl/property.js +28 -44
  23. package/dist/esm/common/ListControl/runtime.js +32 -48
  24. package/dist/esm/common/SearchViewControl/designer.js +28 -43
  25. package/dist/esm/common/SearchViewControl/index.js +6 -6
  26. package/dist/esm/common/SearchViewControl/property.js +27 -42
  27. package/dist/esm/common/SearchViewControl/runtime.js +28 -43
  28. package/dist/esm/common/Validator.js +5 -5
  29. package/dist/esm/common/WrapControl/designer.js +28 -43
  30. package/dist/esm/common/WrapControl/index.js +6 -6
  31. package/dist/esm/common/WrapControl/property.js +25 -25
  32. package/dist/esm/common/WrapControl/runtime.js +28 -43
  33. package/dist/esm/common/controlHooksEmitter.js +1 -1
  34. package/dist/esm/common/index.js +12 -12
  35. package/dist/esm/common/initLinkOperationRules.js +6 -6
  36. package/dist/esm/common/initOptionAndDataSourceRules.js +82 -82
  37. package/dist/esm/framework/RegisterControls.js +41 -37
  38. package/dist/esm/framework/index.js +515 -993
  39. package/dist/esm/framework/isDataBind.js +1 -2
  40. package/dist/esm/index.js +4 -4
  41. package/dist/index.umd.js +1 -1
  42. package/dist/types/api-doc-index.d.ts +4 -4
  43. package/dist/types/common/BaseControl/designer.d.ts +63 -63
  44. package/dist/types/common/BaseControl/index.d.ts +13 -13
  45. package/dist/types/common/BaseControl/property.d.ts +38 -38
  46. package/dist/types/common/BaseControl/runtime.d.ts +23 -23
  47. package/dist/types/common/BaseControl/types.d.ts +35 -35
  48. package/dist/types/common/ColumnControl/designer.d.ts +10 -10
  49. package/dist/types/common/ColumnControl/index.d.ts +12 -12
  50. package/dist/types/common/ColumnControl/property.d.ts +73 -73
  51. package/dist/types/common/ColumnControl/runtime.d.ts +10 -10
  52. package/dist/types/common/ControlArray.d.ts +9 -9
  53. package/dist/types/common/FormControl/designer.d.ts +13 -13
  54. package/dist/types/common/FormControl/index.d.ts +12 -12
  55. package/dist/types/common/FormControl/property.d.ts +100 -100
  56. package/dist/types/common/FormControl/runtime.d.ts +11 -11
  57. package/dist/types/common/LayoutControl/designer.d.ts +21 -21
  58. package/dist/types/common/LayoutControl/index.d.ts +12 -12
  59. package/dist/types/common/LayoutControl/property.d.ts +6 -6
  60. package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
  61. package/dist/types/common/ListControl/designer.d.ts +16 -16
  62. package/dist/types/common/ListControl/index.d.ts +12 -12
  63. package/dist/types/common/ListControl/property.d.ts +14 -14
  64. package/dist/types/common/ListControl/runtime.d.ts +12 -12
  65. package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
  66. package/dist/types/common/SearchViewControl/index.d.ts +12 -12
  67. package/dist/types/common/SearchViewControl/property.d.ts +8 -8
  68. package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
  69. package/dist/types/common/Validator.d.ts +15 -15
  70. package/dist/types/common/WrapControl/designer.d.ts +11 -11
  71. package/dist/types/common/WrapControl/index.d.ts +12 -12
  72. package/dist/types/common/WrapControl/property.d.ts +6 -6
  73. package/dist/types/common/WrapControl/runtime.d.ts +11 -11
  74. package/dist/types/common/controlHooksEmitter.d.ts +4 -4
  75. package/dist/types/common/index.d.ts +12 -12
  76. package/dist/types/common/initLinkOperationRules.d.ts +6 -6
  77. package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
  78. package/dist/types/framework/RegisterControls.d.ts +37 -36
  79. package/dist/types/framework/index.d.ts +844 -844
  80. package/dist/types/framework/isDataBind.d.ts +2 -2
  81. package/dist/types/index.d.ts +4 -4
  82. package/dist/types/type.d.ts +91 -91
  83. package/package.json +2 -2
@@ -1,11 +1,11 @@
1
- import Designer from "./designer";
2
- import Runtime from "./runtime";
3
- import Property from "./property";
1
+ import Designer from './designer';
2
+ import Runtime from './runtime';
3
+ import Property from './property';
4
4
  export default {
5
5
  Designer: Designer,
6
6
  Runtime: Runtime,
7
7
  Property: Property
8
8
  };
9
- export * from "./designer";
10
- export * from "./runtime";
11
- export * from "./property";
9
+ export * from './designer';
10
+ export * from './runtime';
11
+ export * from './property';
@@ -1,32 +1,19 @@
1
- function _assert_this_initialized(self) {
1
+ function _assertThisInitialized(self) {
2
2
  if (self === void 0) {
3
3
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
4
  }
5
5
  return self;
6
6
  }
7
- function _class_call_check(instance, Constructor) {
7
+ function _classCallCheck(instance, Constructor) {
8
8
  if (!(instance instanceof Constructor)) {
9
9
  throw new TypeError("Cannot call a class as a function");
10
10
  }
11
11
  }
12
- function _define_property(obj, key, value) {
13
- if (key in obj) {
14
- Object.defineProperty(obj, key, {
15
- value: value,
16
- enumerable: true,
17
- configurable: true,
18
- writable: true
19
- });
20
- } else {
21
- obj[key] = value;
22
- }
23
- return obj;
24
- }
25
- function _get_prototype_of(o) {
26
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
12
+ function _getPrototypeOf(o) {
13
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
27
14
  return o.__proto__ || Object.getPrototypeOf(o);
28
15
  };
29
- return _get_prototype_of(o);
16
+ return _getPrototypeOf(o);
30
17
  }
31
18
  function _inherits(subClass, superClass) {
32
19
  if (typeof superClass !== "function" && superClass !== null) {
@@ -39,26 +26,26 @@ function _inherits(subClass, superClass) {
39
26
  configurable: true
40
27
  }
41
28
  });
42
- if (superClass) _set_prototype_of(subClass, superClass);
29
+ if (superClass) _setPrototypeOf(subClass, superClass);
43
30
  }
44
- function _possible_constructor_return(self, call) {
45
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
31
+ function _possibleConstructorReturn(self, call) {
32
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
46
33
  return call;
47
34
  }
48
- return _assert_this_initialized(self);
35
+ return _assertThisInitialized(self);
49
36
  }
50
- function _set_prototype_of(o, p) {
51
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
37
+ function _setPrototypeOf(o, p) {
38
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
52
39
  o.__proto__ = p;
53
40
  return o;
54
41
  };
55
- return _set_prototype_of(o, p);
42
+ return _setPrototypeOf(o, p);
56
43
  }
57
- function _type_of(obj) {
44
+ var _typeof = function(obj) {
58
45
  "@swc/helpers - typeof";
59
46
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
- }
61
- function _is_native_reflect_construct() {
47
+ };
48
+ function _isNativeReflectConstruct() {
62
49
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
50
  if (Reflect.construct.sham) return false;
64
51
  if (typeof Proxy === "function") return true;
@@ -69,103 +56,103 @@ function _is_native_reflect_construct() {
69
56
  return false;
70
57
  }
71
58
  }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
59
+ function _createSuper(Derived) {
60
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
74
61
  return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
62
+ var Super = _getPrototypeOf(Derived), result;
76
63
  if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
64
+ var NewTarget = _getPrototypeOf(this).constructor;
78
65
  result = Reflect.construct(Super, arguments, NewTarget);
79
66
  } else {
80
67
  result = Super.apply(this, arguments);
81
68
  }
82
- return _possible_constructor_return(this, result);
69
+ return _possibleConstructorReturn(this, result);
83
70
  };
84
71
  }
85
- import { RulesMessage, JSONCopy } from "@byteluck-fe/model-driven-shared";
86
- import { Property, PropertyRules, PropertyRuntimeRules } from "../BaseControl";
87
- import { initOptionAndDataSourceRules } from "../initOptionAndDataSourceRules";
88
- import { DataBind } from "../../framework";
89
- import { isDataBind } from "../../framework/isDataBind";
90
- var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
72
+ import { RulesMessage, JSONCopy } from '@byteluck-fe/model-driven-shared';
73
+ import { Property, PropertyRules, PropertyRuntimeRules } from '../BaseControl';
74
+ import { initOptionAndDataSourceRules } from '../initOptionAndDataSourceRules';
75
+ import { DataBind } from '../../framework';
76
+ import { isDataBind } from '../../framework/isDataBind';
77
+ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules1) {
91
78
  "use strict";
92
- _inherits(BaseControlPropertyRules, PropertyRules);
93
- var _super = _create_super(BaseControlPropertyRules);
79
+ _inherits(BaseControlPropertyRules, PropertyRules1);
80
+ var _super = _createSuper(BaseControlPropertyRules);
94
81
  function BaseControlPropertyRules(props) {
95
- _class_call_check(this, BaseControlPropertyRules);
82
+ _classCallCheck(this, BaseControlPropertyRules);
96
83
  var _this;
97
84
  _this = _super.call(this, props);
98
- _define_property(_assert_this_initialized(_this), "dataBind", {});
99
- _define_property(_assert_this_initialized(_this), "caption", {
100
- type: "string",
85
+ _this.dataBind = {};
86
+ _this.caption = {
87
+ type: 'string',
101
88
  required: true,
102
- message: RulesMessage.getMessage("pleaseEnterCaption")
103
- });
104
- _define_property(_assert_this_initialized(_this), "isHideCaption", {
105
- type: "boolean"
106
- });
107
- _define_property(_assert_this_initialized(_this), "labelPosition", {
108
- type: "enum",
89
+ message: RulesMessage.getMessage('pleaseEnterCaption')
90
+ };
91
+ _this.isHideCaption = {
92
+ type: 'boolean'
93
+ };
94
+ _this.labelPosition = {
95
+ type: 'enum',
109
96
  enum: [
110
- "top",
111
- "left"
97
+ 'top',
98
+ 'left'
112
99
  ]
113
- });
100
+ };
114
101
  // 去掉placeholder必填校验
115
102
  // public placeholder: RuleItem = {
116
103
  // required: true,
117
104
  // type: 'string',
118
105
  // message: RulesMessage.getMessage('pleaseEnterPlaceholder'),
119
106
  // }
120
- _define_property(_assert_this_initialized(_this), "defaultState", {
121
- type: "enum",
107
+ _this.defaultState = {
108
+ type: 'enum',
122
109
  enum: [
123
- "default",
124
- "readonly"
110
+ 'default',
111
+ 'readonly'
125
112
  ]
126
- });
127
- _define_property(_assert_this_initialized(_this), "required", {
128
- type: "boolean"
129
- });
130
- _define_property(_assert_this_initialized(_this), "captionTip", {
131
- type: "string",
113
+ };
114
+ _this.required = {
115
+ type: 'boolean'
116
+ };
117
+ _this.captionTip = {
118
+ type: 'string',
132
119
  required: false,
133
- message: RulesMessage.getMessage("pleaseEnterCaptionTip")
134
- });
120
+ message: RulesMessage.getMessage('pleaseEnterCaptionTip')
121
+ };
135
122
  // 初始化dataBind的校验规则
136
123
  var validateFields = {
137
124
  fieldCode: {
138
- type: "string",
125
+ type: 'string',
139
126
  required: true,
140
- message: RulesMessage.getMessage("pleaseEnterFieldCode")
127
+ message: RulesMessage.getMessage('pleaseEnterFieldCode')
141
128
  },
142
129
  dataCode: {
143
- type: "string",
130
+ type: 'string',
144
131
  required: true,
145
- message: RulesMessage.getMessage("pleaseEnterFieldCode")
132
+ message: RulesMessage.getMessage('pleaseEnterFieldCode')
146
133
  }
147
134
  };
148
135
  // if (props.dataBind instanceof DataBind) {
149
136
  if (isDataBind(props.dataBind)) {
150
137
  _this.dataBind = {
151
- type: "object",
138
+ type: 'object',
152
139
  required: true,
153
140
  fields: JSONCopy(validateFields),
154
- message: RulesMessage.getMessage("pleaseEnterFieldCode")
141
+ message: RulesMessage.getMessage('pleaseEnterFieldCode')
155
142
  };
156
143
  } else {
157
144
  var dataBind = {
158
- type: "object",
145
+ type: 'object',
159
146
  required: true,
160
147
  fields: {},
161
- message: RulesMessage.getMessage("pleaseEnterFieldCode")
148
+ message: RulesMessage.getMessage('pleaseEnterFieldCode')
162
149
  };
163
150
  Object.keys(props.dataBind).forEach(function(key) {
164
151
  dataBind.fields[key] = {
165
- type: "object",
152
+ type: 'object',
166
153
  required: true,
167
154
  fields: JSONCopy(validateFields),
168
- message: RulesMessage.getMessage("pleaseEnterFieldCode")
155
+ message: RulesMessage.getMessage('pleaseEnterFieldCode')
169
156
  };
170
157
  });
171
158
  _this.dataBind = dataBind;
@@ -177,20 +164,20 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
177
164
  }
178
165
  return BaseControlPropertyRules;
179
166
  }(PropertyRules);
180
- var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRules) {
167
+ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRules1) {
181
168
  "use strict";
182
- _inherits(BaseControlPropertyRuntimeRules, PropertyRuntimeRules);
183
- var _super = _create_super(BaseControlPropertyRuntimeRules);
169
+ _inherits(BaseControlPropertyRuntimeRules, PropertyRuntimeRules1);
170
+ var _super = _createSuper(BaseControlPropertyRuntimeRules);
184
171
  function BaseControlPropertyRuntimeRules(props) {
185
- _class_call_check(this, BaseControlPropertyRuntimeRules);
172
+ _classCallCheck(this, BaseControlPropertyRuntimeRules);
186
173
  var _this;
187
174
  _this = _super.call(this, props);
188
175
  var isRequired = props.isHide ? false : props.required;
189
176
  if (isRequired) {
190
177
  _this.push({
191
- type: "string",
178
+ type: 'string',
192
179
  required: isRequired,
193
- message: props.requiredMessage !== "" ? props.requiredMessage : RulesMessage.getMessage("runtimeRequired", {
180
+ message: props.requiredMessage !== '' ? props.requiredMessage : RulesMessage.getMessage('runtimeRequired', {
194
181
  caption: props.caption
195
182
  })
196
183
  });
@@ -199,127 +186,74 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
199
186
  }
200
187
  return BaseControlPropertyRuntimeRules;
201
188
  }(PropertyRuntimeRules);
202
- /**
203
- * 表单控件公共属性
204
- * @public
205
- */ var BaseControlProperty = /*#__PURE__*/ function(Property) {
189
+ var BaseControlProperty = /**
190
+ * 表单控件公共属性
191
+ * @public
192
+ */ /*#__PURE__*/ function(Property1) {
206
193
  "use strict";
207
- _inherits(BaseControlProperty, Property);
208
- var _super = _create_super(BaseControlProperty);
194
+ _inherits(BaseControlProperty, Property1);
195
+ var _super = _createSuper(BaseControlProperty);
209
196
  function BaseControlProperty(props) {
210
- _class_call_check(this, BaseControlProperty);
197
+ _classCallCheck(this, BaseControlProperty);
211
198
  var _this;
212
- var _props, _props1, _props2, _props3, _props4, _props5, _props6, _props7, _props8, _props9, _props10;
213
199
  _this = _super.call(this, props);
214
- /**
215
- * 标题
216
- * @defaultValue ''
217
- * @public
218
- */ _define_property(_assert_this_initialized(_this), "caption", void 0);
219
- /**
220
- * 隐藏标题
221
- * @defaultValue false
222
- * @public
223
- */ _define_property(_assert_this_initialized(_this), "isHideCaption", void 0);
224
- /**
225
- * 显示气泡提示
226
- * @defaultValue false
227
- * @public
228
- */ _define_property(_assert_this_initialized(_this), "isShowCaptionTip", void 0);
229
- /**
230
- * 气泡提示语
231
- * @defaultValue ''
232
- * @public
233
- */ _define_property(_assert_this_initialized(_this), "captionTip", void 0);
234
- /**
235
- * 标题布局
236
- * @defaultValue ''
237
- * @public
238
- */ _define_property(_assert_this_initialized(_this), "labelPosition", void 0);
239
- /**
240
- * 绑定数据项
241
- * @public
242
- */ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
243
- /**
244
- * 默认值
245
- * @public
246
- */ _define_property(_assert_this_initialized(_this), "defaultValue", void 0);
247
- /**
248
- * 提示文字
249
- * @defaultValue ''
250
- * @public
251
- */ _define_property(_assert_this_initialized(_this), "placeholder", void 0);
252
- /**
253
- * 默认状态
254
- * @defaultValue 'default'
255
- * @public
256
- */ _define_property(_assert_this_initialized(_this), "defaultState", void 0);
257
- /**
258
- * 必填
259
- * @defaultValue false
260
- * @public
261
- */ _define_property(_assert_this_initialized(_this), "required", void 0);
262
- /**
263
- * 必填提示文案
264
- * @defaultValue ''
265
- */ _define_property(_assert_this_initialized(_this), "requiredMessage", void 0);
266
- var _props_caption;
267
- _this.caption = (_props_caption = (_props = props) === null || _props === void 0 ? void 0 : _props.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
268
- var _props_isHideCaption;
269
- _this.isHideCaption = (_props_isHideCaption = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.isHideCaption) !== null && _props_isHideCaption !== void 0 ? _props_isHideCaption : false;
270
- var _props_isShowCaptionTip;
271
- _this.isShowCaptionTip = (_props_isShowCaptionTip = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.isShowCaptionTip) !== null && _props_isShowCaptionTip !== void 0 ? _props_isShowCaptionTip : false;
272
- var _props_captionTip;
273
- _this.captionTip = (_props_captionTip = (_props3 = props) === null || _props3 === void 0 ? void 0 : _props3.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip : "";
274
- var _props_defaultState;
275
- _this.defaultState = (_props_defaultState = (_props4 = props) === null || _props4 === void 0 ? void 0 : _props4.defaultState) !== null && _props_defaultState !== void 0 ? _props_defaultState : "default";
276
- var _props_labelPosition;
277
- _this.labelPosition = (_props_labelPosition = (_props5 = props) === null || _props5 === void 0 ? void 0 : _props5.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : "top";
278
- var _props_placeholder;
279
- _this.placeholder = (_props_placeholder = (_props6 = props) === null || _props6 === void 0 ? void 0 : _props6.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
280
- var _props_required;
281
- _this.required = (_props_required = (_props7 = props) === null || _props7 === void 0 ? void 0 : _props7.required) !== null && _props_required !== void 0 ? _props_required : false;
282
- var _props_requiredMessage;
283
- _this.requiredMessage = (_props_requiredMessage = (_props8 = props) === null || _props8 === void 0 ? void 0 : _props8.requiredMessage) !== null && _props_requiredMessage !== void 0 ? _props_requiredMessage : "";
200
+ var ref;
201
+ _this.caption = (ref = props === null || props === void 0 ? void 0 : props.caption) !== null && ref !== void 0 ? ref : '';
202
+ var ref1;
203
+ _this.isHideCaption = (ref1 = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && ref1 !== void 0 ? ref1 : false;
204
+ var ref2;
205
+ _this.isShowCaptionTip = (ref2 = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && ref2 !== void 0 ? ref2 : false;
206
+ var ref3;
207
+ _this.captionTip = (ref3 = props === null || props === void 0 ? void 0 : props.captionTip) !== null && ref3 !== void 0 ? ref3 : '';
208
+ var ref4;
209
+ _this.defaultState = (ref4 = props === null || props === void 0 ? void 0 : props.defaultState) !== null && ref4 !== void 0 ? ref4 : 'default';
210
+ var ref5;
211
+ _this.labelPosition = (ref5 = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && ref5 !== void 0 ? ref5 : 'top';
212
+ var ref6;
213
+ _this.placeholder = (ref6 = props === null || props === void 0 ? void 0 : props.placeholder) !== null && ref6 !== void 0 ? ref6 : '';
214
+ var ref7;
215
+ _this.required = (ref7 = props === null || props === void 0 ? void 0 : props.required) !== null && ref7 !== void 0 ? ref7 : false;
216
+ var ref8;
217
+ _this.requiredMessage = (ref8 = props === null || props === void 0 ? void 0 : props.requiredMessage) !== null && ref8 !== void 0 ? ref8 : '';
284
218
  //form 组件优先初始化DataBind
285
- _this.dataBind = new DataBind((_props9 = props) === null || _props9 === void 0 ? void 0 : _props9.dataBind);
286
- var _props_defaultValue;
287
- _this.defaultValue = (_props_defaultValue = (_props10 = props) === null || _props10 === void 0 ? void 0 : _props10.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "";
219
+ _this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
220
+ var ref9;
221
+ _this.defaultValue = (ref9 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && ref9 !== void 0 ? ref9 : '';
288
222
  return _this;
289
223
  }
290
224
  return BaseControlProperty;
291
225
  }(Property);
292
- _define_property(BaseControlProperty, "Rules", BaseControlPropertyRules);
293
- _define_property(BaseControlProperty, "RuntimeRules", BaseControlPropertyRuntimeRules);
226
+ BaseControlProperty.Rules = BaseControlPropertyRules;
227
+ BaseControlProperty.RuntimeRules = BaseControlPropertyRuntimeRules;
294
228
  var OptionAndDataSourcePropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
295
229
  "use strict";
296
230
  _inherits(OptionAndDataSourcePropertyRules, BaseControlPropertyRules);
297
- var _super = _create_super(OptionAndDataSourcePropertyRules);
231
+ var _super = _createSuper(OptionAndDataSourcePropertyRules);
298
232
  function OptionAndDataSourcePropertyRules(props) {
299
- _class_call_check(this, OptionAndDataSourcePropertyRules);
233
+ _classCallCheck(this, OptionAndDataSourcePropertyRules);
300
234
  var _this;
301
235
  _this = _super.call(this, props);
302
- _define_property(_assert_this_initialized(_this), "optionConfig", {
303
- type: "enum",
236
+ _this.optionConfig = {
237
+ type: 'enum',
304
238
  enum: [
305
- "custom",
306
- "datasource"
239
+ 'custom',
240
+ 'datasource'
307
241
  ],
308
- message: RulesMessage.getMessage("PleaseSelectTheCorrectOptionSettings")
309
- });
310
- _define_property(_assert_this_initialized(_this), "options", [
242
+ message: RulesMessage.getMessage('PleaseSelectTheCorrectOptionSettings')
243
+ };
244
+ _this.options = [
311
245
  {
312
- type: "array",
313
- message: RulesMessage.getMessage("isNotArray")
314
- }
315
- ]);
316
- _define_property(_assert_this_initialized(_this), "datasourceBind", [
246
+ type: 'array',
247
+ message: RulesMessage.getMessage('isNotArray')
248
+ },
249
+ ];
250
+ _this.datasourceBind = [
317
251
  {
318
- type: "object",
319
- message: RulesMessage.getMessage("isNotObject")
320
- }
321
- ]);
322
- initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
252
+ type: 'object',
253
+ message: RulesMessage.getMessage('isNotObject')
254
+ },
255
+ ];
256
+ initOptionAndDataSourceRules.call(_assertThisInitialized(_this), props);
323
257
  return _this;
324
258
  }
325
259
  return OptionAndDataSourcePropertyRules;
@@ -1,32 +1,19 @@
1
- function _assert_this_initialized(self) {
1
+ function _assertThisInitialized(self) {
2
2
  if (self === void 0) {
3
3
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
4
  }
5
5
  return self;
6
6
  }
7
- function _class_call_check(instance, Constructor) {
7
+ function _classCallCheck(instance, Constructor) {
8
8
  if (!(instance instanceof Constructor)) {
9
9
  throw new TypeError("Cannot call a class as a function");
10
10
  }
11
11
  }
12
- function _define_property(obj, key, value) {
13
- if (key in obj) {
14
- Object.defineProperty(obj, key, {
15
- value: value,
16
- enumerable: true,
17
- configurable: true,
18
- writable: true
19
- });
20
- } else {
21
- obj[key] = value;
22
- }
23
- return obj;
24
- }
25
- function _get_prototype_of(o) {
26
- _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
12
+ function _getPrototypeOf(o) {
13
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
27
14
  return o.__proto__ || Object.getPrototypeOf(o);
28
15
  };
29
- return _get_prototype_of(o);
16
+ return _getPrototypeOf(o);
30
17
  }
31
18
  function _inherits(subClass, superClass) {
32
19
  if (typeof superClass !== "function" && superClass !== null) {
@@ -39,26 +26,26 @@ function _inherits(subClass, superClass) {
39
26
  configurable: true
40
27
  }
41
28
  });
42
- if (superClass) _set_prototype_of(subClass, superClass);
29
+ if (superClass) _setPrototypeOf(subClass, superClass);
43
30
  }
44
- function _possible_constructor_return(self, call) {
45
- if (call && (_type_of(call) === "object" || typeof call === "function")) {
31
+ function _possibleConstructorReturn(self, call) {
32
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
46
33
  return call;
47
34
  }
48
- return _assert_this_initialized(self);
35
+ return _assertThisInitialized(self);
49
36
  }
50
- function _set_prototype_of(o, p) {
51
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
37
+ function _setPrototypeOf(o, p) {
38
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
52
39
  o.__proto__ = p;
53
40
  return o;
54
41
  };
55
- return _set_prototype_of(o, p);
42
+ return _setPrototypeOf(o, p);
56
43
  }
57
- function _type_of(obj) {
44
+ var _typeof = function(obj) {
58
45
  "@swc/helpers - typeof";
59
46
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
- }
61
- function _is_native_reflect_construct() {
47
+ };
48
+ function _isNativeReflectConstruct() {
62
49
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
50
  if (Reflect.construct.sham) return false;
64
51
  if (typeof Proxy === "function") return true;
@@ -69,34 +56,31 @@ function _is_native_reflect_construct() {
69
56
  return false;
70
57
  }
71
58
  }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
59
+ function _createSuper(Derived) {
60
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
74
61
  return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
62
+ var Super = _getPrototypeOf(Derived), result;
76
63
  if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
64
+ var NewTarget = _getPrototypeOf(this).constructor;
78
65
  result = Reflect.construct(Super, arguments, NewTarget);
79
66
  } else {
80
67
  result = Super.apply(this, arguments);
81
68
  }
82
- return _possible_constructor_return(this, result);
69
+ return _possibleConstructorReturn(this, result);
83
70
  };
84
71
  }
85
- import { RuntimeControl } from "../BaseControl";
86
- import BaseControlProperty from "./property";
87
- var FormControl = /*#__PURE__*/ function(RuntimeControl) {
72
+ import { RuntimeControl } from '../BaseControl';
73
+ import BaseControlProperty from './property';
74
+ var FormControl = /*#__PURE__*/ function(RuntimeControl1) {
88
75
  "use strict";
89
- _inherits(FormControl, RuntimeControl);
90
- var _super = _create_super(FormControl);
76
+ _inherits(FormControl, RuntimeControl1);
77
+ var _super = _createSuper(FormControl);
91
78
  function FormControl(props) {
92
- _class_call_check(this, FormControl);
79
+ _classCallCheck(this, FormControl);
93
80
  var _this;
94
- var _props;
95
81
  _this = _super.call(this, props);
96
- _define_property(_assert_this_initialized(_this), "controlType", "form");
97
- _define_property(_assert_this_initialized(_this), "props", void 0);
98
- _define_property(_assert_this_initialized(_this), "value", void 0);
99
- _this.props = new BaseControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
82
+ _this.controlType = 'form';
83
+ _this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
100
84
  return _this;
101
85
  }
102
86
  return FormControl;