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

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