@byteluck-fe/model-driven-core 2.2.6 → 2.2.7-beta.1

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 (61) hide show
  1. package/dist/esm/common/BaseControl/designer.js +228 -189
  2. package/dist/esm/common/BaseControl/property.js +21 -4
  3. package/dist/esm/common/BaseControl/runtime.js +26 -5
  4. package/dist/esm/common/ColumnControl/designer.js +15 -1
  5. package/dist/esm/common/ColumnControl/property.js +34 -11
  6. package/dist/esm/common/ColumnControl/runtime.js +15 -1
  7. package/dist/esm/common/FormControl/designer.js +18 -3
  8. package/dist/esm/common/FormControl/property.js +45 -21
  9. package/dist/esm/common/FormControl/runtime.js +16 -1
  10. package/dist/esm/common/LayoutControl/designer.js +104 -70
  11. package/dist/esm/common/LayoutControl/runtime.js +16 -1
  12. package/dist/esm/common/ListControl/designer.js +86 -61
  13. package/dist/esm/common/ListControl/property.js +14 -0
  14. package/dist/esm/common/ListControl/runtime.js +16 -1
  15. package/dist/esm/common/SearchViewControl/designer.js +15 -1
  16. package/dist/esm/common/SearchViewControl/property.js +14 -0
  17. package/dist/esm/common/SearchViewControl/runtime.js +15 -1
  18. package/dist/esm/common/WrapControl/designer.js +15 -1
  19. package/dist/esm/common/WrapControl/runtime.js +15 -1
  20. package/dist/esm/framework/RegisterControls.js +197 -128
  21. package/dist/esm/framework/index.js +175 -3
  22. package/dist/index.umd.js +1 -1
  23. package/dist/types/common/BaseControl/designer.d.ts +62 -62
  24. package/dist/types/common/BaseControl/index.d.ts +13 -13
  25. package/dist/types/common/BaseControl/property.d.ts +22 -22
  26. package/dist/types/common/BaseControl/runtime.d.ts +22 -22
  27. package/dist/types/common/BaseControl/types.d.ts +35 -35
  28. package/dist/types/common/ColumnControl/designer.d.ts +10 -10
  29. package/dist/types/common/ColumnControl/index.d.ts +12 -12
  30. package/dist/types/common/ColumnControl/property.d.ts +34 -34
  31. package/dist/types/common/ColumnControl/runtime.d.ts +10 -10
  32. package/dist/types/common/ControlArray.d.ts +8 -8
  33. package/dist/types/common/FormControl/designer.d.ts +13 -13
  34. package/dist/types/common/FormControl/index.d.ts +12 -12
  35. package/dist/types/common/FormControl/property.d.ts +44 -44
  36. package/dist/types/common/FormControl/runtime.d.ts +11 -11
  37. package/dist/types/common/LayoutControl/designer.d.ts +21 -21
  38. package/dist/types/common/LayoutControl/index.d.ts +12 -12
  39. package/dist/types/common/LayoutControl/property.d.ts +6 -6
  40. package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
  41. package/dist/types/common/ListControl/designer.d.ts +16 -16
  42. package/dist/types/common/ListControl/index.d.ts +12 -12
  43. package/dist/types/common/ListControl/property.d.ts +12 -12
  44. package/dist/types/common/ListControl/runtime.d.ts +12 -12
  45. package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
  46. package/dist/types/common/SearchViewControl/index.d.ts +12 -12
  47. package/dist/types/common/SearchViewControl/property.d.ts +8 -8
  48. package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
  49. package/dist/types/common/Validator.d.ts +15 -15
  50. package/dist/types/common/WrapControl/designer.d.ts +11 -11
  51. package/dist/types/common/WrapControl/index.d.ts +12 -12
  52. package/dist/types/common/WrapControl/property.d.ts +6 -6
  53. package/dist/types/common/WrapControl/runtime.d.ts +11 -11
  54. package/dist/types/common/controlHooksEmitter.d.ts +4 -4
  55. package/dist/types/common/index.d.ts +11 -11
  56. package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
  57. package/dist/types/framework/RegisterControls.d.ts +33 -33
  58. package/dist/types/framework/index.d.ts +358 -358
  59. package/dist/types/index.d.ts +3 -3
  60. package/dist/types/type.d.ts +91 -91
  61. package/package.json +3 -3
@@ -219,12 +219,20 @@ var Control = /*#__PURE__*/ function _target() {
219
219
  function Control(props) {
220
220
  var _this = this;
221
221
  _classCallCheck(this, Control);
222
- this.setting = [];
223
- this.eventKeys = [];
224
- this.customEvents = [];
225
- this.parent = null;
226
- this.updateSetting = updateSetting;
227
- this.removeSetting = removeSetting;
222
+ _defineProperty(this, "id", void 0 // 唯一标识符
223
+ );
224
+ _defineProperty(this, "name", void 0);
225
+ _defineProperty(this, "icon", void 0);
226
+ _defineProperty(this, "type", void 0);
227
+ _defineProperty(this, "controlType", void 0);
228
+ _defineProperty(this, "props", void 0);
229
+ _defineProperty(this, "setting", []);
230
+ _defineProperty(this, "fieldType", void 0);
231
+ _defineProperty(this, "eventKeys", []);
232
+ _defineProperty(this, "customEvents", []);
233
+ _defineProperty(this, "parent", null);
234
+ _defineProperty(this, "updateSetting", updateSetting);
235
+ _defineProperty(this, "removeSetting", removeSetting);
228
236
  this._callControlHooks("preInstance", props);
229
237
  var _ref = _instanceof(this, Control) ? this.constructor : void 0, controlName = _ref.controlName, controlIcon = _ref.controlIcon, controlType = _ref.controlType, controlFieldType = _ref.controlFieldType, controlEventKeys = _ref.controlEventKeys, controlCustomEvents = _ref.controlCustomEvents, name = _ref.name, setting = _ref.setting;
230
238
  if (!(controlName && controlIcon && controlType)) {
@@ -248,180 +256,6 @@ var Control = /*#__PURE__*/ function _target() {
248
256
  _this._callControlHooks("postInstance", props);
249
257
  });
250
258
  }
251
- var _proto = Control.prototype;
252
- _proto._callControlHooks = function _callControlHooks() {
253
- for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
254
- args[_key] = arguments[_key];
255
- }
256
- var _controlHooksEmitter;
257
- var _args = _toArray(args), key = _args[0], arg = _args.slice(1);
258
- return (_controlHooksEmitter = controlHooksEmitter).emit.apply(_controlHooksEmitter, [
259
- key,
260
- this
261
- ].concat(_toConsumableArray(arg)));
262
- };
263
- _proto.preUpdate = function preUpdate(key, value) {
264
- // 在修改props之前
265
- this._callControlHooks("preUpdateProps", key, value);
266
- };
267
- _proto.postUpdate = function postUpdate(key, value) {
268
- // 在修改props之后
269
- this._callControlHooks("postUpdateProps", key, value);
270
- };
271
- // 修改实例上的props,key可以是caption,caption.zh...
272
- _proto.updateProps = function updateProps(key, value) {
273
- this.preUpdate(key, value);
274
- updateValueFromKeys(this.props, key, value);
275
- this.postUpdate(key, value);
276
- };
277
- _proto.preValidate = function preValidate() {
278
- var _this = this;
279
- return _asyncToGenerator(function() {
280
- var rules, results, result;
281
- return __generator(this, function(_state) {
282
- switch(_state.label){
283
- case 0:
284
- rules = _objectSpread({}, _this.rules);
285
- return [
286
- 4,
287
- _this._callControlHooks("preValidate", rules)
288
- ];
289
- case 1:
290
- results = _state.sent();
291
- result = results[results.length - 1];
292
- return [
293
- 2,
294
- result === false ? undefined : result
295
- ];
296
- }
297
- });
298
- })();
299
- };
300
- // property校验
301
- _proto.validate = function validate(messages, ignore) {
302
- var _this = this;
303
- return _asyncToGenerator(function() {
304
- var result, rules, validator, err;
305
- return __generator(this, function(_state) {
306
- switch(_state.label){
307
- case 0:
308
- return [
309
- 4,
310
- _this.preValidate()
311
- ];
312
- case 1:
313
- result = _state.sent();
314
- rules = result !== undefined ? result : _objectSpread({}, _this.rules);
315
- if (Array.isArray(ignore)) {
316
- ignore.forEach(function(key) {
317
- if (rules.hasOwnProperty(key)) {
318
- delete rules[key];
319
- }
320
- });
321
- }
322
- validator = createValidator(rules, messages);
323
- _state.label = 2;
324
- case 2:
325
- _state.trys.push([
326
- 2,
327
- 4,
328
- ,
329
- 5
330
- ]);
331
- return [
332
- 4,
333
- validator.validate(_this.props)
334
- ];
335
- case 3:
336
- _state.sent();
337
- return [
338
- 2,
339
- true
340
- ];
341
- case 4:
342
- err = _state.sent();
343
- if (!err.control) {
344
- err.control = _this;
345
- }
346
- throw err;
347
- case 5:
348
- return [
349
- 2
350
- ];
351
- }
352
- });
353
- })();
354
- };
355
- _proto.toDataBindModel = function toDataBindModel() {
356
- var parentId = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
357
- var fieldType = this.fieldType;
358
- var controlId = this.id;
359
- var type = this.type;
360
- var _this_props = this.props, dataBind = _this_props.dataBind, datasourceBind = _this_props.datasourceBind, optionConfig = _this_props.optionConfig, caption = _this_props.caption, required = _this_props.required, maxLength = _this_props.maxLength, options = _this_props.options, encrypted = _this_props.encrypted, encryptedMode = _this_props.encryptedMode;
361
- if (!fieldType && !dataBind && !datasourceBind) return;
362
- var dataBindModelType = {
363
- parentId: parentId,
364
- fieldType: fieldType,
365
- controlId: controlId,
366
- caption: caption,
367
- type: type,
368
- props: {}
369
- };
370
- if (dataBind) {
371
- dataBindModelType.dataBind = dataBind;
372
- }
373
- switch(optionConfig){
374
- case "datasource":
375
- case undefined:
376
- if (datasourceBind) {
377
- dataBindModelType.datasourceBind = datasourceBind;
378
- }
379
- break;
380
- case "custom":
381
- dataBindModelType.props.options = options;
382
- break;
383
- }
384
- if (required !== undefined) {
385
- dataBindModelType.required = required;
386
- }
387
- if (maxLength !== undefined) {
388
- dataBindModelType.maxLength = maxLength;
389
- }
390
- if (encrypted !== undefined) {
391
- dataBindModelType.encrypted = encrypted;
392
- }
393
- if (encryptedMode !== undefined) {
394
- dataBindModelType.encryptedMode = encryptedMode;
395
- }
396
- return dataBindModelType;
397
- };
398
- _proto.preToSchema = function preToSchema() {
399
- // 在处理Schema之前,预留的钩子函数,允许在toSchema之前处理一些数据
400
- this._callControlHooks("preToSchema", this);
401
- };
402
- _proto.toSchema = function toSchema() {
403
- this.preToSchema();
404
- return {
405
- id: this.id,
406
- type: this.type,
407
- props: JSONCopy(this.props),
408
- fieldType: this.fieldType,
409
- controlType: this.controlType
410
- };
411
- };
412
- Control.updateBasicControl = function updateBasicControl(key, setting) {
413
- if (key !== "setting") return;
414
- if (setting.add) {
415
- var _this_setting;
416
- (_this_setting = this.setting).push.apply(_this_setting, _toConsumableArray(setting.add));
417
- }
418
- if (setting.remove) {
419
- this.removeSettingItem(setting.remove);
420
- }
421
- if (setting.update) {
422
- // this.updateSettingItem(setting.update, false)
423
- }
424
- };
425
259
  _createClass(Control, [
426
260
  {
427
261
  key: "rules",
@@ -432,23 +266,228 @@ var Control = /*#__PURE__*/ function _target() {
432
266
  }
433
267
  return {};
434
268
  }
269
+ },
270
+ {
271
+ key: "_callControlHooks",
272
+ value: function _callControlHooks() {
273
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
274
+ args[_key] = arguments[_key];
275
+ }
276
+ var _controlHooksEmitter;
277
+ var _args = _toArray(args), key = _args[0], arg = _args.slice(1);
278
+ return (_controlHooksEmitter = controlHooksEmitter).emit.apply(_controlHooksEmitter, [
279
+ key,
280
+ this
281
+ ].concat(_toConsumableArray(arg)));
282
+ }
283
+ },
284
+ {
285
+ key: "preUpdate",
286
+ value: function preUpdate(key, value) {
287
+ // 在修改props之前
288
+ this._callControlHooks("preUpdateProps", key, value);
289
+ }
290
+ },
291
+ {
292
+ key: "postUpdate",
293
+ value: function postUpdate(key, value) {
294
+ // 在修改props之后
295
+ this._callControlHooks("postUpdateProps", key, value);
296
+ }
297
+ },
298
+ {
299
+ key: "updateProps",
300
+ value: // 修改实例上的props,key可以是caption,caption.zh...
301
+ function updateProps(key, value) {
302
+ this.preUpdate(key, value);
303
+ updateValueFromKeys(this.props, key, value);
304
+ this.postUpdate(key, value);
305
+ }
306
+ },
307
+ {
308
+ key: "preValidate",
309
+ value: function preValidate() {
310
+ var _this = this;
311
+ return _asyncToGenerator(function() {
312
+ var rules, results, result;
313
+ return __generator(this, function(_state) {
314
+ switch(_state.label){
315
+ case 0:
316
+ rules = _objectSpread({}, _this.rules);
317
+ return [
318
+ 4,
319
+ _this._callControlHooks("preValidate", rules)
320
+ ];
321
+ case 1:
322
+ results = _state.sent();
323
+ result = results[results.length - 1];
324
+ return [
325
+ 2,
326
+ result === false ? undefined : result
327
+ ];
328
+ }
329
+ });
330
+ })();
331
+ }
332
+ },
333
+ {
334
+ key: "validate",
335
+ value: // property校验
336
+ function validate(messages, ignore) {
337
+ var _this = this;
338
+ return _asyncToGenerator(function() {
339
+ var result, rules, validator, err;
340
+ return __generator(this, function(_state) {
341
+ switch(_state.label){
342
+ case 0:
343
+ return [
344
+ 4,
345
+ _this.preValidate()
346
+ ];
347
+ case 1:
348
+ result = _state.sent();
349
+ rules = result !== undefined ? result : _objectSpread({}, _this.rules);
350
+ if (Array.isArray(ignore)) {
351
+ ignore.forEach(function(key) {
352
+ if (rules.hasOwnProperty(key)) {
353
+ delete rules[key];
354
+ }
355
+ });
356
+ }
357
+ validator = createValidator(rules, messages);
358
+ _state.label = 2;
359
+ case 2:
360
+ _state.trys.push([
361
+ 2,
362
+ 4,
363
+ ,
364
+ 5
365
+ ]);
366
+ return [
367
+ 4,
368
+ validator.validate(_this.props)
369
+ ];
370
+ case 3:
371
+ _state.sent();
372
+ return [
373
+ 2,
374
+ true
375
+ ];
376
+ case 4:
377
+ err = _state.sent();
378
+ if (!err.control) {
379
+ err.control = _this;
380
+ }
381
+ throw err;
382
+ case 5:
383
+ return [
384
+ 2
385
+ ];
386
+ }
387
+ });
388
+ })();
389
+ }
390
+ },
391
+ {
392
+ key: "toDataBindModel",
393
+ value: function toDataBindModel() {
394
+ var parentId = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
395
+ var fieldType = this.fieldType;
396
+ var controlId = this.id;
397
+ var type = this.type;
398
+ var _this_props = this.props, dataBind = _this_props.dataBind, datasourceBind = _this_props.datasourceBind, optionConfig = _this_props.optionConfig, caption = _this_props.caption, required = _this_props.required, maxLength = _this_props.maxLength, options = _this_props.options, encrypted = _this_props.encrypted, encryptedMode = _this_props.encryptedMode;
399
+ if (!fieldType && !dataBind && !datasourceBind) return;
400
+ var dataBindModelType = {
401
+ parentId: parentId,
402
+ fieldType: fieldType,
403
+ controlId: controlId,
404
+ caption: caption,
405
+ type: type,
406
+ props: {}
407
+ };
408
+ if (dataBind) {
409
+ dataBindModelType.dataBind = dataBind;
410
+ }
411
+ switch(optionConfig){
412
+ case "datasource":
413
+ case undefined:
414
+ if (datasourceBind) {
415
+ dataBindModelType.datasourceBind = datasourceBind;
416
+ }
417
+ break;
418
+ case "custom":
419
+ dataBindModelType.props.options = options;
420
+ break;
421
+ }
422
+ if (required !== undefined) {
423
+ dataBindModelType.required = required;
424
+ }
425
+ if (maxLength !== undefined) {
426
+ dataBindModelType.maxLength = maxLength;
427
+ }
428
+ if (encrypted !== undefined) {
429
+ dataBindModelType.encrypted = encrypted;
430
+ }
431
+ if (encryptedMode !== undefined) {
432
+ dataBindModelType.encryptedMode = encryptedMode;
433
+ }
434
+ return dataBindModelType;
435
+ }
436
+ },
437
+ {
438
+ key: "preToSchema",
439
+ value: function preToSchema() {
440
+ // 在处理Schema之前,预留的钩子函数,允许在toSchema之前处理一些数据
441
+ this._callControlHooks("preToSchema", this);
442
+ }
443
+ },
444
+ {
445
+ key: "toSchema",
446
+ value: function toSchema() {
447
+ this.preToSchema();
448
+ return {
449
+ id: this.id,
450
+ type: this.type,
451
+ props: JSONCopy(this.props),
452
+ fieldType: this.fieldType,
453
+ controlType: this.controlType
454
+ };
455
+ }
456
+ }
457
+ ], [
458
+ {
459
+ key: "updateBasicControl",
460
+ value: function updateBasicControl(key, setting) {
461
+ if (key !== "setting") return;
462
+ if (setting.add) {
463
+ var _this_setting;
464
+ (_this_setting = this.setting).push.apply(_this_setting, _toConsumableArray(setting.add));
465
+ }
466
+ if (setting.remove) {
467
+ this.removeSettingItem(setting.remove);
468
+ }
469
+ if (setting.update) {
470
+ // this.updateSettingItem(setting.update, false)
471
+ }
472
+ }
435
473
  }
436
474
  ]);
437
475
  return Control;
438
476
  }();
439
- Control.controlName = "控件";
440
- Control.controlIcon = "icon";
441
- Control.controlType = "control";
477
+ _defineProperty(Control, "controlName", "控件");
478
+ _defineProperty(Control, "controlIcon", "icon");
479
+ _defineProperty(Control, "controlType", "control");
480
+ _defineProperty(Control, "controlFieldType", void 0);
442
481
  // 控件可以触发的事件key
443
- Control.controlEventKeys = [];
444
- Control.controlCustomEvents = [];
482
+ _defineProperty(Control, "controlEventKeys", []);
483
+ _defineProperty(Control, "controlCustomEvents", []);
445
484
  // setting应该是全量的设置项,外部控制,在初始化的时候会deepCopy一份
446
- Control.setting = [];
447
- Control.__is_control__ = true;
485
+ _defineProperty(Control, "setting", []);
486
+ _defineProperty(Control, "__is_control__", true);
448
487
  // 删除指定的settingItem
449
- Control.removeSettingItem = removeSetting;
488
+ _defineProperty(Control, "removeSettingItem", removeSetting);
450
489
  // 修改指定的settingItem的visible
451
- Control.updateSettingItem = updateSetting;
490
+ _defineProperty(Control, "updateSettingItem", updateSetting);
452
491
  export default Control;
453
492
  export { Control as DesignerControl };
454
493
  /**
@@ -37,6 +37,19 @@ function _construct(Parent, args, Class) {
37
37
  }
38
38
  return _construct.apply(null, arguments);
39
39
  }
40
+ function _defineProperty(obj, key, value) {
41
+ if (key in obj) {
42
+ Object.defineProperty(obj, key, {
43
+ value: value,
44
+ enumerable: true,
45
+ configurable: true,
46
+ writable: true
47
+ });
48
+ } else {
49
+ obj[key] = value;
50
+ }
51
+ return obj;
52
+ }
40
53
  function _getPrototypeOf(o) {
41
54
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
42
55
  return o.__proto__ || Object.getPrototypeOf(o);
@@ -130,9 +143,9 @@ import { BaseStyle } from "../../framework";
130
143
  var PropertyRules = function PropertyRules(props) {
131
144
  "use strict";
132
145
  _classCallCheck(this, PropertyRules);
133
- this.isHide = {
146
+ _defineProperty(this, "isHide", {
134
147
  type: "boolean"
135
- };
148
+ });
136
149
  };
137
150
  var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
138
151
  "use strict";
@@ -148,13 +161,17 @@ var Property = function Property(props) {
148
161
  "use strict";
149
162
  var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
150
163
  _classCallCheck(this, Property);
164
+ _defineProperty(this, "isHide", void 0);
165
+ _defineProperty(this, "className", void 0);
166
+ _defineProperty(this, "style", void 0);
167
+ _defineProperty(this, "caption", void 0);
151
168
  var _props_isHide;
152
169
  this.isHide = (_props_isHide = props === null || props === void 0 ? void 0 : props.isHide) !== null && _props_isHide !== void 0 ? _props_isHide : false;
153
170
  this.style = new BaseStyle(props === null || props === void 0 ? void 0 : props.style);
154
171
  var _props_caption;
155
172
  this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : caption;
156
173
  };
157
- Property.Rules = PropertyRules;
158
- Property.RuntimeRules = PropertyRuntimeRules;
174
+ _defineProperty(Property, "Rules", PropertyRules);
175
+ _defineProperty(Property, "RuntimeRules", PropertyRuntimeRules);
159
176
  export default Property;
160
177
  export { Property, PropertyRules, PropertyRuntimeRules };
@@ -17,6 +17,19 @@ function _createClass(Constructor, protoProps, staticProps) {
17
17
  if (staticProps) _defineProperties(Constructor, staticProps);
18
18
  return Constructor;
19
19
  }
20
+ function _defineProperty(obj, key, value) {
21
+ if (key in obj) {
22
+ Object.defineProperty(obj, key, {
23
+ value: value,
24
+ enumerable: true,
25
+ configurable: true,
26
+ writable: true
27
+ });
28
+ } else {
29
+ obj[key] = value;
30
+ }
31
+ return obj;
32
+ }
20
33
  function _instanceof(left, right) {
21
34
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
22
35
  return !!right[Symbol.hasInstance](left);
@@ -31,8 +44,15 @@ var Control = /*#__PURE__*/ function _target() {
31
44
  "use strict";
32
45
  function Control(props) {
33
46
  _classCallCheck(this, Control);
34
- this.customEvents = [];
35
- this.parent = null;
47
+ _defineProperty(this, "id", void 0 // 唯一标识符
48
+ );
49
+ _defineProperty(this, "type", void 0);
50
+ _defineProperty(this, "controlType", void 0);
51
+ _defineProperty(this, "props", void 0);
52
+ _defineProperty(this, "fieldType", void 0);
53
+ _defineProperty(this, "customEvents", []);
54
+ _defineProperty(this, "pageStatus", void 0);
55
+ _defineProperty(this, "parent", null);
36
56
  var _ref = _instanceof(this, Control) ? this.constructor : void 0, controlType = _ref.controlType, controlFieldType = _ref.controlFieldType, name = _ref.name, controlCustomEvents = _ref.controlCustomEvents;
37
57
  if (!controlType) {
38
58
  referenceError("The ".concat(name, " controlType is not define"));
@@ -65,8 +85,9 @@ var Control = /*#__PURE__*/ function _target() {
65
85
  ]);
66
86
  return Control;
67
87
  }();
68
- Control.controlType = "control";
69
- Control.__is_control__ = true;
70
- Control.controlCustomEvents = [];
88
+ _defineProperty(Control, "controlType", "control");
89
+ _defineProperty(Control, "controlFieldType", void 0);
90
+ _defineProperty(Control, "__is_control__", true);
91
+ _defineProperty(Control, "controlCustomEvents", []);
71
92
  export default Control;
72
93
  export { Control as RuntimeControl };
@@ -9,6 +9,19 @@ function _classCallCheck(instance, Constructor) {
9
9
  throw new TypeError("Cannot call a class as a function");
10
10
  }
11
11
  }
12
+ function _defineProperty(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
+ }
12
25
  function _getPrototypeOf(o) {
13
26
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
14
27
  return o.__proto__ || Object.getPrototypeOf(o);
@@ -79,7 +92,8 @@ var ColumnControl = /*#__PURE__*/ function(DesignerControl) {
79
92
  _classCallCheck(this, ColumnControl);
80
93
  var _this;
81
94
  _this = _super.call(this, props);
82
- _this.controlType = "column";
95
+ _defineProperty(_assertThisInitialized(_this), "controlType", "column");
96
+ _defineProperty(_assertThisInitialized(_this), "props", void 0);
83
97
  _this.props = new ColumnControlProperty(props === null || props === void 0 ? void 0 : props.props);
84
98
  return _this;
85
99
  }
@@ -9,6 +9,19 @@ function _classCallCheck(instance, Constructor) {
9
9
  throw new TypeError("Cannot call a class as a function");
10
10
  }
11
11
  }
12
+ function _defineProperty(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
+ }
12
25
  function _getPrototypeOf(o) {
13
26
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
14
27
  return o.__proto__ || Object.getPrototypeOf(o);
@@ -81,16 +94,16 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
81
94
  _classCallCheck(this, ColumnControlPropertyRules);
82
95
  var _this;
83
96
  _this = _super.call(this, props);
84
- _this.caption = {
97
+ _defineProperty(_assertThisInitialized(_this), "caption", {
85
98
  type: "string",
86
99
  required: true,
87
100
  message: RulesMessage.getMessage("pleaseEnterCaption")
88
- };
89
- _this.width = {
101
+ });
102
+ _defineProperty(_assertThisInitialized(_this), "width", {
90
103
  type: "number",
91
104
  required: false,
92
105
  message: RulesMessage.getMessage("pleaseEnterColumnWidth")
93
- };
106
+ });
94
107
  _this.width.required = props.widthType === "px";
95
108
  return _this;
96
109
  }
@@ -104,6 +117,16 @@ var ColumnControlProperty = /*#__PURE__*/ function(Property) {
104
117
  _classCallCheck(this, ColumnControlProperty);
105
118
  var _this;
106
119
  _this = _super.call(this, props);
120
+ _defineProperty(_assertThisInitialized(_this), "widthType", void 0);
121
+ _defineProperty(_assertThisInitialized(_this), "width", void 0);
122
+ _defineProperty(_assertThisInitialized(_this), "caption", void 0);
123
+ _defineProperty(_assertThisInitialized(_this), "dataBind", void 0);
124
+ _defineProperty(_assertThisInitialized(_this), "autoWidth", void 0);
125
+ _defineProperty(_assertThisInitialized(_this), "fixed", void 0);
126
+ _defineProperty(_assertThisInitialized(_this), "sort", void 0);
127
+ _defineProperty(_assertThisInitialized(_this), "align", void 0);
128
+ _defineProperty(_assertThisInitialized(_this), "colSpan", void 0);
129
+ _defineProperty(_assertThisInitialized(_this), "autoHeight", void 0);
107
130
  var _props_width;
108
131
  _this.width = (_props_width = props === null || props === void 0 ? void 0 : props.width) !== null && _props_width !== void 0 ? _props_width : 150;
109
132
  _this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) || "auto";
@@ -123,7 +146,7 @@ var ColumnControlProperty = /*#__PURE__*/ function(Property) {
123
146
  }
124
147
  return ColumnControlProperty;
125
148
  }(Property);
126
- ColumnControlProperty.Rules = ColumnControlPropertyRules;
149
+ _defineProperty(ColumnControlProperty, "Rules", ColumnControlPropertyRules);
127
150
  var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnControlPropertyRules) {
128
151
  "use strict";
129
152
  _inherits(ColumnOptionAndDataSourcePropertyRules, ColumnControlPropertyRules);
@@ -132,7 +155,7 @@ var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnContro
132
155
  _classCallCheck(this, ColumnOptionAndDataSourcePropertyRules);
133
156
  var _this;
134
157
  _this = _super.call(this, props);
135
- _this.optionConfig = {
158
+ _defineProperty(_assertThisInitialized(_this), "optionConfig", {
136
159
  type: "enum",
137
160
  enum: [
138
161
  "custom",
@@ -140,19 +163,19 @@ var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnContro
140
163
  "none"
141
164
  ],
142
165
  message: RulesMessage.getMessage("PleaseSelectTheCorrectOptionSettings")
143
- };
144
- _this.options = [
166
+ });
167
+ _defineProperty(_assertThisInitialized(_this), "options", [
145
168
  {
146
169
  type: "array",
147
170
  message: RulesMessage.getMessage("isNotArray")
148
171
  }
149
- ];
150
- _this.datasourceBind = [
172
+ ]);
173
+ _defineProperty(_assertThisInitialized(_this), "datasourceBind", [
151
174
  {
152
175
  type: "object",
153
176
  message: RulesMessage.getMessage("isNotObject")
154
177
  }
155
- ];
178
+ ]);
156
179
  initOptionAndDataSourceRules.call(_assertThisInitialized(_this), props);
157
180
  return _this;
158
181
  }