@byteluck-fe/model-driven-core 2.0.1 → 2.0.9

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.
@@ -1,6 +1,6 @@
1
1
  function _arrayLikeToArray(arr, len) {
2
2
  if (len == null || len > arr.length) len = arr.length;
3
- for(var i1 = 0, arr2 = new Array(len); i1 < len; i1++)arr2[i1] = arr[i1];
3
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4
4
  return arr2;
5
5
  }
6
6
  function _arrayWithHoles(arr) {
@@ -44,8 +44,8 @@ function _classCallCheck(instance, Constructor) {
44
44
  }
45
45
  }
46
46
  function _defineProperties(target, props) {
47
- for(var i1 = 0; i1 < props.length; i1++){
48
- var descriptor = props[i1];
47
+ for(var i = 0; i < props.length; i++){
48
+ var descriptor = props[i];
49
49
  descriptor.enumerable = descriptor.enumerable || false;
50
50
  descriptor.configurable = true;
51
51
  if ("value" in descriptor) descriptor.writable = true;
@@ -87,8 +87,8 @@ function _nonIterableSpread() {
87
87
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
88
88
  }
89
89
  function _objectSpread(target) {
90
- for(var i1 = 1; i1 < arguments.length; i1++){
91
- var source = arguments[i1] != null ? arguments[i1] : {};
90
+ for(var i = 1; i < arguments.length; i++){
91
+ var source = arguments[i] != null ? arguments[i] : {};
92
92
  var ownKeys = Object.keys(source);
93
93
  if (typeof Object.getOwnPropertySymbols === "function") {
94
94
  ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
@@ -102,7 +102,7 @@ function _objectSpread(target) {
102
102
  return target;
103
103
  }
104
104
  function _toArray(arr) {
105
- return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
105
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
106
106
  }
107
107
  function _toConsumableArray(arr) {
108
108
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
@@ -115,7 +115,101 @@ function _unsupportedIterableToArray(o, minLen) {
115
115
  if (n === "Map" || n === "Set") return Array.from(n);
116
116
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
117
117
  }
118
- import regeneratorRuntime from "regenerator-runtime";
118
+ var __generator = this && this.__generator || function(thisArg, body) {
119
+ var f, y, t, g, _ = {
120
+ label: 0,
121
+ sent: function() {
122
+ if (t[0] & 1) throw t[1];
123
+ return t[1];
124
+ },
125
+ trys: [],
126
+ ops: []
127
+ };
128
+ return g = {
129
+ next: verb(0),
130
+ "throw": verb(1),
131
+ "return": verb(2)
132
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
133
+ return this;
134
+ }), g;
135
+ function verb(n) {
136
+ return function(v) {
137
+ return step([
138
+ n,
139
+ v
140
+ ]);
141
+ };
142
+ }
143
+ function step(op) {
144
+ if (f) throw new TypeError("Generator is already executing.");
145
+ while(_)try {
146
+ 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;
147
+ if (y = 0, t) op = [
148
+ op[0] & 2,
149
+ t.value
150
+ ];
151
+ switch(op[0]){
152
+ case 0:
153
+ case 1:
154
+ t = op;
155
+ break;
156
+ case 4:
157
+ _.label++;
158
+ return {
159
+ value: op[1],
160
+ done: false
161
+ };
162
+ case 5:
163
+ _.label++;
164
+ y = op[1];
165
+ op = [
166
+ 0
167
+ ];
168
+ continue;
169
+ case 7:
170
+ op = _.ops.pop();
171
+ _.trys.pop();
172
+ continue;
173
+ default:
174
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
175
+ _ = 0;
176
+ continue;
177
+ }
178
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
179
+ _.label = op[1];
180
+ break;
181
+ }
182
+ if (op[0] === 6 && _.label < t[1]) {
183
+ _.label = t[1];
184
+ t = op;
185
+ break;
186
+ }
187
+ if (t && _.label < t[2]) {
188
+ _.label = t[2];
189
+ _.ops.push(op);
190
+ break;
191
+ }
192
+ if (t[2]) _.ops.pop();
193
+ _.trys.pop();
194
+ continue;
195
+ }
196
+ op = body.call(thisArg, _);
197
+ } catch (e) {
198
+ op = [
199
+ 6,
200
+ e
201
+ ];
202
+ y = 0;
203
+ } finally{
204
+ f = t = 0;
205
+ }
206
+ if (op[0] & 5) throw op[1];
207
+ return {
208
+ value: op[0] ? op[1] : void 0,
209
+ done: true
210
+ };
211
+ }
212
+ };
119
213
  import Property from "./property";
120
214
  import { genNonDuplicateId, JSONCopy, referenceError, updateValueFromKeys } from "@byteluck-fe/model-driven-shared";
121
215
  import { createValidator } from "../Validator";
@@ -132,22 +226,22 @@ var Control = /*#__PURE__*/ function _target() {
132
226
  this.updateSetting = updateSetting;
133
227
  this.removeSetting = removeSetting;
134
228
  this._callControlHooks("preInstance", props);
135
- 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;
229
+ 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;
136
230
  if (!(controlName && controlIcon && controlType)) {
137
231
  referenceError("The ".concat(name, " controlName,controlIcon,controlType is not define"));
138
232
  }
139
- var ref1;
140
- this.id = (ref1 = props === null || props === void 0 ? void 0 : props.id) !== null && ref1 !== void 0 ? ref1 : genNonDuplicateId(10);
233
+ var _props_id;
234
+ this.id = (_props_id = props === null || props === void 0 ? void 0 : props.id) !== null && _props_id !== void 0 ? _props_id : genNonDuplicateId(10);
141
235
  this.name = controlName;
142
236
  this.icon = controlIcon;
143
- var ref2;
144
- this.type = (ref2 = props === null || props === void 0 ? void 0 : props.type) !== null && ref2 !== void 0 ? ref2 : controlType;
237
+ var _props_type;
238
+ this.type = (_props_type = props === null || props === void 0 ? void 0 : props.type) !== null && _props_type !== void 0 ? _props_type : controlType;
145
239
  this.props = new Property(props === null || props === void 0 ? void 0 : props.props, (_instanceof(this, Control) ? this.constructor : void 0).controlName);
146
- var ref3;
147
- this.controlType = (ref3 = props === null || props === void 0 ? void 0 : props.controlType) !== null && ref3 !== void 0 ? ref3 : "base";
240
+ var _props_controlType;
241
+ this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : "base";
148
242
  this.setting = JSONCopy(setting);
149
- var ref4;
150
- this.fieldType = (ref4 = props === null || props === void 0 ? void 0 : props.fieldType) !== null && ref4 !== void 0 ? ref4 : controlFieldType;
243
+ var _props_fieldType;
244
+ this.fieldType = (_props_fieldType = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
151
245
  this.eventKeys = JSONCopy(controlEventKeys);
152
246
  this.customEvents = JSONCopy(controlCustomEvents);
153
247
  Promise.resolve().then(function() {
@@ -182,37 +276,41 @@ var Control = /*#__PURE__*/ function _target() {
182
276
  };
183
277
  _proto.preValidate = function preValidate() {
184
278
  var _this = this;
185
- return _asyncToGenerator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
279
+ return _asyncToGenerator(function() {
186
280
  var rules, results, result;
187
- return regeneratorRuntime.wrap(function _callee$(_ctx) {
188
- while(1)switch(_ctx.prev = _ctx.next){
281
+ return __generator(this, function(_state) {
282
+ switch(_state.label){
189
283
  case 0:
190
284
  rules = _objectSpread({}, _this.rules);
191
- _ctx.next = 3;
192
- return _this._callControlHooks("preValidate", rules);
193
- case 3:
194
- results = _ctx.sent;
285
+ return [
286
+ 4,
287
+ _this._callControlHooks("preValidate", rules)
288
+ ];
289
+ case 1:
290
+ results = _state.sent();
195
291
  result = results[results.length - 1];
196
- return _ctx.abrupt("return", result === false ? undefined : result);
197
- case 6:
198
- case "end":
199
- return _ctx.stop();
292
+ return [
293
+ 2,
294
+ result === false ? undefined : result
295
+ ];
200
296
  }
201
- }, _callee);
202
- }))();
297
+ });
298
+ })();
203
299
  };
204
300
  // property校验
205
301
  _proto.validate = function validate(messages, ignore) {
206
302
  var _this = this;
207
- return _asyncToGenerator(/*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
208
- var result, rules, validator;
209
- return regeneratorRuntime.wrap(function _callee$(_ctx) {
210
- while(1)switch(_ctx.prev = _ctx.next){
303
+ return _asyncToGenerator(function() {
304
+ var result, rules, validator, err;
305
+ return __generator(this, function(_state) {
306
+ switch(_state.label){
211
307
  case 0:
212
- _ctx.next = 2;
213
- return _this.preValidate();
214
- case 2:
215
- result = _ctx.sent;
308
+ return [
309
+ 4,
310
+ _this.preValidate()
311
+ ];
312
+ case 1:
313
+ result = _state.sent();
216
314
  rules = result !== undefined ? result : _objectSpread({}, _this.rules);
217
315
  if (Array.isArray(ignore)) {
218
316
  ignore.forEach(function(key) {
@@ -222,36 +320,44 @@ var Control = /*#__PURE__*/ function _target() {
222
320
  });
223
321
  }
224
322
  validator = createValidator(rules, messages);
225
- _ctx.prev = 6;
226
- _ctx.next = 9;
227
- return validator.validate(_this.props);
228
- case 9:
229
- return _ctx.abrupt("return", true);
230
- case 12:
231
- _ctx.prev = 12;
232
- _ctx.t0 = _ctx["catch"](6);
233
- if (!_ctx.t0.control) {
234
- _ctx.t0.control = _this;
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;
235
345
  }
236
- throw _ctx.t0;
237
- case 16:
238
- case "end":
239
- return _ctx.stop();
346
+ throw err;
347
+ case 5:
348
+ return [
349
+ 2
350
+ ];
240
351
  }
241
- }, _callee, null, [
242
- [
243
- 6,
244
- 12
245
- ]
246
- ]);
247
- }))();
352
+ });
353
+ })();
248
354
  };
249
355
  _proto.toDataBindModel = function toDataBindModel() {
250
356
  var parentId = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
251
357
  var fieldType = this.fieldType;
252
358
  var controlId = this.id;
253
359
  var type = this.type;
254
- var _props = this.props, dataBind = _props.dataBind, datasourceBind = _props.datasourceBind, optionConfig = _props.optionConfig, caption = _props.caption, required = _props.required, maxLength = _props.maxLength, options = _props.options, encrypted = _props.encrypted, encryptedMode = _props.encryptedMode;
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;
255
361
  if (!fieldType && !dataBind && !datasourceBind) return;
256
362
  var dataBindModelType = {
257
363
  parentId: parentId,
@@ -306,8 +412,8 @@ var Control = /*#__PURE__*/ function _target() {
306
412
  Control.updateBasicControl = function updateBasicControl(key, setting) {
307
413
  if (key !== "setting") return;
308
414
  if (setting.add) {
309
- var _setting;
310
- (_setting = this.setting).push.apply(_setting, _toConsumableArray(setting.add));
415
+ var _this_setting;
416
+ (_this_setting = this.setting).push.apply(_this_setting, _toConsumableArray(setting.add));
311
417
  }
312
418
  if (setting.remove) {
313
419
  this.removeSettingItem(setting.remove);
@@ -363,13 +469,13 @@ export { Control as DesignerControl };
363
469
  });
364
470
  // 移除对应选项
365
471
  if (settingIndex !== -1) {
366
- var ref, ref1;
367
- isHasItem ? _this.setting[settingIndex].showItems = (ref = _this.setting[settingIndex].showItems) === null || ref === void 0 ? void 0 : ref.filter(function(item) {
472
+ var _this_setting_settingIndex_showItems, _this_setting_settingIndex_showItems1;
473
+ isHasItem ? _this.setting[settingIndex].showItems = (_this_setting_settingIndex_showItems = _this.setting[settingIndex].showItems) === null || _this_setting_settingIndex_showItems === void 0 ? void 0 : _this_setting_settingIndex_showItems.filter(function(item) {
368
474
  return !deleteKey.hideItems.includes(item);
369
475
  }) : _this.setting.splice(settingIndex, 1);
370
476
  // 子项长度为0,自动移除当前设置项
371
477
  isHasItem && // @ts-ignore
372
- !((ref1 = _this.setting[settingIndex].showItems) === null || ref1 === void 0 ? void 0 : ref1.length) && // @ts-ignore
478
+ !((_this_setting_settingIndex_showItems1 = _this.setting[settingIndex].showItems) === null || _this_setting_settingIndex_showItems1 === void 0 ? void 0 : _this_setting_settingIndex_showItems1.length) && // @ts-ignore
373
479
  _this.setting.splice(settingIndex, 1);
374
480
  }
375
481
  });
@@ -395,13 +501,13 @@ export { Control as DesignerControl };
395
501
  if (typeof value === "boolean") {
396
502
  settingItem.visible = value;
397
503
  } else if (typeof value === "object") {
398
- var _type;
399
- var type = (_type = value.type) !== null && _type !== void 0 ? _type : "replace";
504
+ var _value_type;
505
+ var type = (_value_type = value.type) !== null && _value_type !== void 0 ? _value_type : "replace";
400
506
  if (type === "replace") {
401
507
  settingItem.showItems = value.showItems;
402
508
  } else {
403
- var _showItems;
404
- (_showItems = settingItem.showItems).push.apply(_showItems, _toConsumableArray(value.showItems));
509
+ var _settingItem_showItems;
510
+ (_settingItem_showItems = settingItem.showItems).push.apply(_settingItem_showItems, _toConsumableArray(value.showItems));
405
511
  }
406
512
  }
407
513
  }
@@ -148,11 +148,11 @@ var Property = function Property(props) {
148
148
  "use strict";
149
149
  var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
150
150
  _classCallCheck(this, Property);
151
- var ref;
152
- this.isHide = (ref = props === null || props === void 0 ? void 0 : props.isHide) !== null && ref !== void 0 ? ref : false;
151
+ var _props_isHide;
152
+ this.isHide = (_props_isHide = props === null || props === void 0 ? void 0 : props.isHide) !== null && _props_isHide !== void 0 ? _props_isHide : false;
153
153
  this.style = new BaseStyle(props === null || props === void 0 ? void 0 : props.style);
154
- var ref1;
155
- this.caption = (ref1 = props === null || props === void 0 ? void 0 : props.caption) !== null && ref1 !== void 0 ? ref1 : caption;
154
+ var _props_caption;
155
+ this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : caption;
156
156
  };
157
157
  Property.Rules = PropertyRules;
158
158
  Property.RuntimeRules = PropertyRuntimeRules;
@@ -33,22 +33,22 @@ var Control = /*#__PURE__*/ function _target() {
33
33
  _classCallCheck(this, Control);
34
34
  this.customEvents = [];
35
35
  this.parent = null;
36
- var ref = _instanceof(this, Control) ? this.constructor : void 0, controlType = ref.controlType, controlFieldType = ref.controlFieldType, name = ref.name, controlCustomEvents = ref.controlCustomEvents;
36
+ var _ref = _instanceof(this, Control) ? this.constructor : void 0, controlType = _ref.controlType, controlFieldType = _ref.controlFieldType, name = _ref.name, controlCustomEvents = _ref.controlCustomEvents;
37
37
  if (!controlType) {
38
38
  referenceError("The ".concat(name, " controlType is not define"));
39
39
  }
40
- var ref1;
41
- this.id = (ref1 = props === null || props === void 0 ? void 0 : props.id) !== null && ref1 !== void 0 ? ref1 : genNonDuplicateId(10);
42
- var ref2;
43
- this.type = (ref2 = props === null || props === void 0 ? void 0 : props.type) !== null && ref2 !== void 0 ? ref2 : controlType;
40
+ var _props_id;
41
+ this.id = (_props_id = props === null || props === void 0 ? void 0 : props.id) !== null && _props_id !== void 0 ? _props_id : genNonDuplicateId(10);
42
+ var _props_type;
43
+ this.type = (_props_type = props === null || props === void 0 ? void 0 : props.type) !== null && _props_type !== void 0 ? _props_type : controlType;
44
44
  this.props = new Property(props === null || props === void 0 ? void 0 : props.props);
45
45
  this.customEvents = controlCustomEvents;
46
- var ref3;
47
- this.controlType = (ref3 = props === null || props === void 0 ? void 0 : props.controlType) !== null && ref3 !== void 0 ? ref3 : "base";
48
- var ref4;
49
- this.fieldType = (ref4 = props === null || props === void 0 ? void 0 : props.fieldType) !== null && ref4 !== void 0 ? ref4 : controlFieldType;
50
- var ref5;
51
- this.pageStatus = (ref5 = props === null || props === void 0 ? void 0 : props.pageStatus) !== null && ref5 !== void 0 ? ref5 : PAGE_STATUS.UNKNOWN;
46
+ var _props_controlType;
47
+ this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : "base";
48
+ var _props_fieldType;
49
+ this.fieldType = (_props_fieldType = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
50
+ var _props_pageStatus;
51
+ this.pageStatus = (_props_pageStatus = props === null || props === void 0 ? void 0 : props.pageStatus) !== null && _props_pageStatus !== void 0 ? _props_pageStatus : PAGE_STATUS.UNKNOWN;
52
52
  }
53
53
  _createClass(Control, [
54
54
  {
@@ -104,17 +104,17 @@ var ColumnControlProperty = /*#__PURE__*/ function(Property) {
104
104
  _classCallCheck(this, ColumnControlProperty);
105
105
  var _this;
106
106
  _this = _super.call(this, props);
107
- var ref;
108
- _this.width = (ref = props === null || props === void 0 ? void 0 : props.width) !== null && ref !== void 0 ? ref : 150;
107
+ var _props_width;
108
+ _this.width = (_props_width = props === null || props === void 0 ? void 0 : props.width) !== null && _props_width !== void 0 ? _props_width : 150;
109
109
  _this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) || "auto";
110
- var ref1;
111
- _this.caption = (ref1 = props === null || props === void 0 ? void 0 : props.caption) !== null && ref1 !== void 0 ? ref1 : "";
112
- var ref2;
113
- _this.fixed = (ref2 = props === null || props === void 0 ? void 0 : props.fixed) !== null && ref2 !== void 0 ? ref2 : "none";
110
+ var _props_caption;
111
+ _this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
112
+ var _props_fixed;
113
+ _this.fixed = (_props_fixed = props === null || props === void 0 ? void 0 : props.fixed) !== null && _props_fixed !== void 0 ? _props_fixed : "none";
114
114
  _this.autoWidth = new AutoWidth(props === null || props === void 0 ? void 0 : props.autoWidth);
115
115
  _this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
116
- var ref3;
117
- _this.sort = (ref3 = props === null || props === void 0 ? void 0 : props.sort) !== null && ref3 !== void 0 ? ref3 : true;
116
+ var _props_sort;
117
+ _this.sort = (_props_sort = props === null || props === void 0 ? void 0 : props.sort) !== null && _props_sort !== void 0 ? _props_sort : true;
118
118
  _this.align = props === null || props === void 0 ? void 0 : props.align;
119
119
  _this.colSpan = props === null || props === void 0 ? void 0 : props.colSpan;
120
120
  return _this;
@@ -143,13 +143,13 @@ var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnContro
143
143
  {
144
144
  type: "array",
145
145
  message: RulesMessage.getMessage("isNotArray")
146
- },
146
+ }
147
147
  ];
148
148
  _this.datasourceBind = [
149
149
  {
150
150
  type: "object",
151
151
  message: RulesMessage.getMessage("isNotObject")
152
- },
152
+ }
153
153
  ];
154
154
  initOptionAndDataSourceRules.call(_assertThisInitialized(_this), props);
155
155
  return _this;
@@ -25,9 +25,9 @@ function _unsupportedIterableToArray(o, minLen) {
25
25
  }
26
26
  import { isArray, isPlainObject } from "@byteluck-fe/model-driven-shared";
27
27
  export function setPropertyDontEnum(obj, property) {
28
- var ref;
28
+ var _Object_getOwnPropertyDescriptors_property;
29
29
  // 如果没有被设置过不允许枚举的话,说明是第一次被设置,需要设置属性不允许枚举
30
- if ((ref = Object.getOwnPropertyDescriptors(obj)[property]) === null || ref === void 0 ? void 0 : ref.enumerable) {
30
+ if ((_Object_getOwnPropertyDescriptors_property = Object.getOwnPropertyDescriptors(obj)[property]) === null || _Object_getOwnPropertyDescriptors_property === void 0 ? void 0 : _Object_getOwnPropertyDescriptors_property.enumerable) {
31
31
  Object.defineProperty(obj, property, {
32
32
  enumerable: false
33
33
  });
@@ -45,8 +45,8 @@ export function defineArrayParent(controls, parent) {
45
45
  }
46
46
  var targetKey = Symbol("targetKey");
47
47
  function getTargetValue(value) {
48
- var _targetKey;
49
- return (_targetKey = value[targetKey]) !== null && _targetKey !== void 0 ? _targetKey : value;
48
+ var _value_targetKey;
49
+ return (_value_targetKey = value[targetKey]) !== null && _value_targetKey !== void 0 ? _value_targetKey : value;
50
50
  }
51
51
  function proxyState(target, parent) {
52
52
  defineArrayParent(target, parent);
@@ -88,7 +88,7 @@ var FormControl = /*#__PURE__*/ function(DesignerControl) {
88
88
  FormControl.controlEventKeys = [
89
89
  "on_change",
90
90
  "on_focus",
91
- "on_blur",
91
+ "on_blur"
92
92
  ];
93
93
  export default FormControl;
94
94
  export { FormControl as DesignerFormControl };
@@ -197,28 +197,28 @@ var BaseControlProperty = /*#__PURE__*/ function(Property) {
197
197
  _classCallCheck(this, BaseControlProperty);
198
198
  var _this;
199
199
  _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 : "";
200
+ var _props_caption;
201
+ _this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
202
+ var _props_isHideCaption;
203
+ _this.isHideCaption = (_props_isHideCaption = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _props_isHideCaption !== void 0 ? _props_isHideCaption : false;
204
+ var _props_isShowCaptionTip;
205
+ _this.isShowCaptionTip = (_props_isShowCaptionTip = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _props_isShowCaptionTip !== void 0 ? _props_isShowCaptionTip : false;
206
+ var _props_captionTip;
207
+ _this.captionTip = (_props_captionTip = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip : "";
208
+ var _props_defaultState;
209
+ _this.defaultState = (_props_defaultState = props === null || props === void 0 ? void 0 : props.defaultState) !== null && _props_defaultState !== void 0 ? _props_defaultState : "default";
210
+ var _props_labelPosition;
211
+ _this.labelPosition = (_props_labelPosition = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : "top";
212
+ var _props_placeholder;
213
+ _this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
214
+ var _props_required;
215
+ _this.required = (_props_required = props === null || props === void 0 ? void 0 : props.required) !== null && _props_required !== void 0 ? _props_required : false;
216
+ var _props_requiredMessage;
217
+ _this.requiredMessage = (_props_requiredMessage = props === null || props === void 0 ? void 0 : props.requiredMessage) !== null && _props_requiredMessage !== void 0 ? _props_requiredMessage : "";
218
218
  //form 组件优先初始化DataBind
219
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 : "";
220
+ var _props_defaultValue;
221
+ _this.defaultValue = (_props_defaultValue = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "";
222
222
  return _this;
223
223
  }
224
224
  return BaseControlProperty;
@@ -245,13 +245,13 @@ var OptionAndDataSourcePropertyRules = /*#__PURE__*/ function(BaseControlPropert
245
245
  {
246
246
  type: "array",
247
247
  message: RulesMessage.getMessage("isNotArray")
248
- },
248
+ }
249
249
  ];
250
250
  _this.datasourceBind = [
251
251
  {
252
252
  type: "object",
253
253
  message: RulesMessage.getMessage("isNotObject")
254
- },
254
+ }
255
255
  ];
256
256
  initOptionAndDataSourceRules.call(_assertThisInitialized(_this), props);
257
257
  return _this;