@byteluck-fe/model-driven-core 2.7.0-beta → 2.8.0-alpha.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 (31) hide show
  1. package/dist/esm/common/BaseControl/designer.js +8 -7
  2. package/dist/esm/common/BaseControl/property.js +3 -4
  3. package/dist/esm/common/BaseControl/runtime.js +6 -7
  4. package/dist/esm/common/ColumnControl/designer.js +1 -2
  5. package/dist/esm/common/ColumnControl/property.js +10 -11
  6. package/dist/esm/common/ColumnControl/runtime.js +1 -2
  7. package/dist/esm/common/FormControl/designer.js +1 -2
  8. package/dist/esm/common/FormControl/property.js +14 -20
  9. package/dist/esm/common/FormControl/runtime.js +1 -2
  10. package/dist/esm/common/LayoutControl/designer.js +2 -3
  11. package/dist/esm/common/LayoutControl/runtime.js +2 -3
  12. package/dist/esm/common/ListControl/designer.js +11 -3
  13. package/dist/esm/common/ListControl/property.js +14 -2
  14. package/dist/esm/common/ListControl/runtime.js +2 -3
  15. package/dist/esm/common/SearchViewControl/designer.js +1 -2
  16. package/dist/esm/common/SearchViewControl/property.js +1 -2
  17. package/dist/esm/common/SearchViewControl/runtime.js +1 -2
  18. package/dist/esm/common/WrapControl/designer.js +1 -2
  19. package/dist/esm/common/WrapControl/runtime.js +1 -2
  20. package/dist/esm/framework/RegisterControls.js +22 -6
  21. package/dist/esm/framework/index.js +186 -196
  22. package/dist/esm/framework/isDataBind.js +7 -0
  23. package/dist/esm/index.js +1 -0
  24. package/dist/index.umd.js +1 -1
  25. package/dist/types/common/ColumnControl/property.d.ts +1 -1
  26. package/dist/types/common/ListControl/property.d.ts +5 -0
  27. package/dist/types/framework/index.d.ts +32 -2
  28. package/dist/types/framework/isDataBind.d.ts +2 -0
  29. package/dist/types/index.d.ts +1 -0
  30. package/dist/types/type.d.ts +1 -1
  31. package/package.json +3 -3
@@ -219,7 +219,6 @@ var Control = /*#__PURE__*/ function _target() {
219
219
  function Control(props) {
220
220
  var _this = this;
221
221
  _class_call_check(this, Control);
222
- var _props, _props1, _props2, _props3, _props4;
223
222
  _define_property(this, "id", void 0 // 唯一标识符
224
223
  );
225
224
  _define_property(this, "name", void 0);
@@ -240,17 +239,17 @@ var Control = /*#__PURE__*/ function _target() {
240
239
  referenceError("The ".concat(name, " controlName,controlIcon,controlType is not define"));
241
240
  }
242
241
  var _props_id;
243
- this.id = (_props_id = (_props = props) === null || _props === void 0 ? void 0 : _props.id) !== null && _props_id !== void 0 ? _props_id : genNonDuplicateId(10);
242
+ this.id = (_props_id = props === null || props === void 0 ? void 0 : props.id) !== null && _props_id !== void 0 ? _props_id : genNonDuplicateId(10);
244
243
  this.name = controlName;
245
244
  this.icon = controlIcon;
246
245
  var _props_type;
247
- this.type = (_props_type = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.type) !== null && _props_type !== void 0 ? _props_type : controlType;
248
- this.props = new Property((_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.props, (_instanceof(this, Control) ? this.constructor : void 0).controlName);
246
+ this.type = (_props_type = props === null || props === void 0 ? void 0 : props.type) !== null && _props_type !== void 0 ? _props_type : controlType;
247
+ this.props = new Property(props === null || props === void 0 ? void 0 : props.props, (_instanceof(this, Control) ? this.constructor : void 0).controlName);
249
248
  var _props_controlType;
250
- this.controlType = (_props_controlType = (_props3 = props) === null || _props3 === void 0 ? void 0 : _props3.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : "base";
249
+ this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : "base";
251
250
  this.setting = JSONCopy(setting);
252
251
  var _props_fieldType;
253
- this.fieldType = (_props_fieldType = (_props4 = props) === null || _props4 === void 0 ? void 0 : _props4.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
252
+ this.fieldType = (_props_fieldType = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
254
253
  this.eventKeys = JSONCopy(controlEventKeys);
255
254
  this.customEvents = JSONCopy(controlCustomEvents);
256
255
  Promise.resolve().then(function() {
@@ -502,10 +501,12 @@ export { Control as DesignerControl };
502
501
  keys
503
502
  ];
504
503
  deleteKeys.forEach(function(deleteKey) {
504
+ var _this_setting;
505
505
  // 是否存在子项
506
506
  var isHasItem = typeof deleteKey !== "string";
507
+ // 判断setting是否是自定义控件setting项
507
508
  // @ts-ignore
508
- var settingIndex = _this.setting.findIndex(function(option) {
509
+ var settingIndex = (_this_setting = _this.setting) === null || _this_setting === void 0 ? void 0 : _this_setting.findIndex(function(option) {
509
510
  return option.key === (isHasItem ? deleteKey.key : deleteKey);
510
511
  });
511
512
  // 移除对应选项
@@ -153,7 +153,6 @@ var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
153
153
  "use strict";
154
154
  var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
155
155
  _class_call_check(this, Property);
156
- var _props, _props1, _props2;
157
156
  /**
158
157
  * 是否隐藏
159
158
  * @public
@@ -167,10 +166,10 @@ var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
167
166
  * @defaultValue ''
168
167
  */ _define_property(this, "caption", void 0);
169
168
  var _props_isHide;
170
- this.isHide = (_props_isHide = (_props = props) === null || _props === void 0 ? void 0 : _props.isHide) !== null && _props_isHide !== void 0 ? _props_isHide : false;
171
- this.style = new BaseStyle((_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.style);
169
+ this.isHide = (_props_isHide = props === null || props === void 0 ? void 0 : props.isHide) !== null && _props_isHide !== void 0 ? _props_isHide : false;
170
+ this.style = new BaseStyle(props === null || props === void 0 ? void 0 : props.style);
172
171
  var _props_caption;
173
- this.caption = (_props_caption = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.caption) !== null && _props_caption !== void 0 ? _props_caption : caption;
172
+ this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : caption;
174
173
  };
175
174
  _define_property(Property, "Rules", PropertyRules);
176
175
  _define_property(Property, "RuntimeRules", PropertyRuntimeRules);
@@ -44,7 +44,6 @@ var Control = /*#__PURE__*/ function _target() {
44
44
  "use strict";
45
45
  function Control(props) {
46
46
  _class_call_check(this, Control);
47
- var _props, _props1, _props2, _props3, _props4, _props5;
48
47
  _define_property(this, "id", void 0 // 唯一标识符
49
48
  );
50
49
  _define_property(this, "type", void 0);
@@ -59,17 +58,17 @@ var Control = /*#__PURE__*/ function _target() {
59
58
  referenceError("The ".concat(name, " controlType is not define"));
60
59
  }
61
60
  var _props_id;
62
- this.id = (_props_id = (_props = props) === null || _props === void 0 ? void 0 : _props.id) !== null && _props_id !== void 0 ? _props_id : genNonDuplicateId(10);
61
+ this.id = (_props_id = props === null || props === void 0 ? void 0 : props.id) !== null && _props_id !== void 0 ? _props_id : genNonDuplicateId(10);
63
62
  var _props_type;
64
- this.type = (_props_type = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.type) !== null && _props_type !== void 0 ? _props_type : controlType;
65
- this.props = new Property((_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.props);
63
+ this.type = (_props_type = props === null || props === void 0 ? void 0 : props.type) !== null && _props_type !== void 0 ? _props_type : controlType;
64
+ this.props = new Property(props === null || props === void 0 ? void 0 : props.props);
66
65
  this.customEvents = controlCustomEvents;
67
66
  var _props_controlType;
68
- this.controlType = (_props_controlType = (_props3 = props) === null || _props3 === void 0 ? void 0 : _props3.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : "base";
67
+ this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : "base";
69
68
  var _props_fieldType;
70
- this.fieldType = (_props_fieldType = (_props4 = props) === null || _props4 === void 0 ? void 0 : _props4.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
69
+ this.fieldType = (_props_fieldType = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
71
70
  var _props_pageStatus;
72
- this.pageStatus = (_props_pageStatus = (_props5 = props) === null || _props5 === void 0 ? void 0 : _props5.pageStatus) !== null && _props_pageStatus !== void 0 ? _props_pageStatus : PAGE_STATUS.UNKNOWN;
71
+ this.pageStatus = (_props_pageStatus = props === null || props === void 0 ? void 0 : props.pageStatus) !== null && _props_pageStatus !== void 0 ? _props_pageStatus : PAGE_STATUS.UNKNOWN;
73
72
  }
74
73
  _create_class(Control, [
75
74
  {
@@ -91,11 +91,10 @@ var ColumnControl = /*#__PURE__*/ function(DesignerControl) {
91
91
  function ColumnControl(props) {
92
92
  _class_call_check(this, ColumnControl);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "controlType", "column");
97
96
  _define_property(_assert_this_initialized(_this), "props", void 0);
98
- _this.props = new ColumnControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
97
+ _this.props = new ColumnControlProperty(props === null || props === void 0 ? void 0 : props.props);
99
98
  return _this;
100
99
  }
101
100
  return ColumnControl;
@@ -119,7 +119,6 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
119
119
  function ColumnControlProperty(props) {
120
120
  _class_call_check(this, ColumnControlProperty);
121
121
  var _this;
122
- var _props, _props1, _props2, _props3, _props4, _props5, _props6, _props7, _props8, _props9;
123
122
  _this = _super.call(this, props);
124
123
  /**
125
124
  * 宽度类型
@@ -157,20 +156,20 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
157
156
  * @defaultValue false
158
157
  */ _define_property(_assert_this_initialized(_this), "autoHeight", void 0);
159
158
  var _props_width;
160
- _this.width = (_props_width = (_props = props) === null || _props === void 0 ? void 0 : _props.width) !== null && _props_width !== void 0 ? _props_width : 150;
161
- _this.widthType = ((_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.widthType) || "auto";
159
+ _this.width = (_props_width = props === null || props === void 0 ? void 0 : props.width) !== null && _props_width !== void 0 ? _props_width : 150;
160
+ _this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) || "auto";
162
161
  var _props_caption;
163
- _this.caption = (_props_caption = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
162
+ _this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
164
163
  var _props_fixed;
165
- _this.fixed = (_props_fixed = (_props3 = props) === null || _props3 === void 0 ? void 0 : _props3.fixed) !== null && _props_fixed !== void 0 ? _props_fixed : "none";
166
- _this.autoWidth = new AutoWidth((_props4 = props) === null || _props4 === void 0 ? void 0 : _props4.autoWidth);
167
- _this.dataBind = new DataBind((_props5 = props) === null || _props5 === void 0 ? void 0 : _props5.dataBind);
164
+ _this.fixed = (_props_fixed = props === null || props === void 0 ? void 0 : props.fixed) !== null && _props_fixed !== void 0 ? _props_fixed : "none";
165
+ _this.autoWidth = new AutoWidth(props === null || props === void 0 ? void 0 : props.autoWidth);
166
+ _this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
168
167
  var _props_sort;
169
- _this.sort = (_props_sort = (_props6 = props) === null || _props6 === void 0 ? void 0 : _props6.sort) !== null && _props_sort !== void 0 ? _props_sort : true;
170
- _this.align = (_props7 = props) === null || _props7 === void 0 ? void 0 : _props7.align;
171
- _this.colSpan = (_props8 = props) === null || _props8 === void 0 ? void 0 : _props8.colSpan;
168
+ _this.sort = (_props_sort = props === null || props === void 0 ? void 0 : props.sort) !== null && _props_sort !== void 0 ? _props_sort : true;
169
+ _this.align = props === null || props === void 0 ? void 0 : props.align;
170
+ _this.colSpan = props === null || props === void 0 ? void 0 : props.colSpan;
172
171
  var _props_autoHeight;
173
- _this.autoHeight = (_props_autoHeight = (_props9 = props) === null || _props9 === void 0 ? void 0 : _props9.autoHeight) !== null && _props_autoHeight !== void 0 ? _props_autoHeight : false;
172
+ _this.autoHeight = (_props_autoHeight = props === null || props === void 0 ? void 0 : props.autoHeight) !== null && _props_autoHeight !== void 0 ? _props_autoHeight : false;
174
173
  return _this;
175
174
  }
176
175
  return ColumnControlProperty;
@@ -91,11 +91,10 @@ var ColumnControl = /*#__PURE__*/ function(RuntimeControl) {
91
91
  function ColumnControl(props) {
92
92
  _class_call_check(this, ColumnControl);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "controlType", "column");
97
96
  _define_property(_assert_this_initialized(_this), "props", void 0);
98
- _this.props = new ColumnControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
97
+ _this.props = new ColumnControlProperty(props === null || props === void 0 ? void 0 : props.props);
99
98
  return _this;
100
99
  }
101
100
  return ColumnControl;
@@ -91,11 +91,10 @@ var FormControl = /*#__PURE__*/ function(DesignerControl) {
91
91
  function FormControl(props) {
92
92
  _class_call_check(this, FormControl);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "controlType", "form");
97
96
  _define_property(_assert_this_initialized(_this), "props", void 0);
98
- _this.props = new BaseControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
97
+ _this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
99
98
  return _this;
100
99
  }
101
100
  return FormControl;
@@ -41,13 +41,6 @@ function _inherits(subClass, superClass) {
41
41
  });
42
42
  if (superClass) _set_prototype_of(subClass, superClass);
43
43
  }
44
- function _instanceof(left, right) {
45
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
46
- return !!right[Symbol.hasInstance](left);
47
- } else {
48
- return left instanceof right;
49
- }
50
- }
51
44
  function _possible_constructor_return(self, call) {
52
45
  if (call && (_type_of(call) === "object" || typeof call === "function")) {
53
46
  return call;
@@ -93,6 +86,7 @@ import { RulesMessage, JSONCopy } from "@byteluck-fe/model-driven-shared";
93
86
  import { Property, PropertyRules, PropertyRuntimeRules } from "../BaseControl";
94
87
  import { initOptionAndDataSourceRules } from "../initOptionAndDataSourceRules";
95
88
  import { DataBind } from "../../framework";
89
+ import { isDataBind } from "../../framework/isDataBind";
96
90
  var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
97
91
  "use strict";
98
92
  _inherits(BaseControlPropertyRules, PropertyRules);
@@ -151,7 +145,8 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
151
145
  message: RulesMessage.getMessage("pleaseEnterFieldCode")
152
146
  }
153
147
  };
154
- if (_instanceof(props.dataBind, DataBind)) {
148
+ // if (props.dataBind instanceof DataBind) {
149
+ if (isDataBind(props.dataBind)) {
155
150
  _this.dataBind = {
156
151
  type: "object",
157
152
  required: true,
@@ -211,7 +206,6 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
211
206
  function BaseControlProperty(props) {
212
207
  _class_call_check(this, BaseControlProperty);
213
208
  var _this;
214
- var _props, _props1, _props2, _props3, _props4, _props5, _props6, _props7, _props8, _props9, _props10;
215
209
  _this = _super.call(this, props);
216
210
  /**
217
211
  * 标题
@@ -266,27 +260,27 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
266
260
  * @defaultValue ''
267
261
  */ _define_property(_assert_this_initialized(_this), "requiredMessage", void 0);
268
262
  var _props_caption;
269
- _this.caption = (_props_caption = (_props = props) === null || _props === void 0 ? void 0 : _props.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
263
+ _this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
270
264
  var _props_isHideCaption;
271
- _this.isHideCaption = (_props_isHideCaption = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.isHideCaption) !== null && _props_isHideCaption !== void 0 ? _props_isHideCaption : false;
265
+ _this.isHideCaption = (_props_isHideCaption = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _props_isHideCaption !== void 0 ? _props_isHideCaption : false;
272
266
  var _props_isShowCaptionTip;
273
- _this.isShowCaptionTip = (_props_isShowCaptionTip = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.isShowCaptionTip) !== null && _props_isShowCaptionTip !== void 0 ? _props_isShowCaptionTip : false;
267
+ _this.isShowCaptionTip = (_props_isShowCaptionTip = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _props_isShowCaptionTip !== void 0 ? _props_isShowCaptionTip : false;
274
268
  var _props_captionTip;
275
- _this.captionTip = (_props_captionTip = (_props3 = props) === null || _props3 === void 0 ? void 0 : _props3.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip : "";
269
+ _this.captionTip = (_props_captionTip = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip : "";
276
270
  var _props_defaultState;
277
- _this.defaultState = (_props_defaultState = (_props4 = props) === null || _props4 === void 0 ? void 0 : _props4.defaultState) !== null && _props_defaultState !== void 0 ? _props_defaultState : "default";
271
+ _this.defaultState = (_props_defaultState = props === null || props === void 0 ? void 0 : props.defaultState) !== null && _props_defaultState !== void 0 ? _props_defaultState : "default";
278
272
  var _props_labelPosition;
279
- _this.labelPosition = (_props_labelPosition = (_props5 = props) === null || _props5 === void 0 ? void 0 : _props5.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : "top";
273
+ _this.labelPosition = (_props_labelPosition = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : "top";
280
274
  var _props_placeholder;
281
- _this.placeholder = (_props_placeholder = (_props6 = props) === null || _props6 === void 0 ? void 0 : _props6.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
275
+ _this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
282
276
  var _props_required;
283
- _this.required = (_props_required = (_props7 = props) === null || _props7 === void 0 ? void 0 : _props7.required) !== null && _props_required !== void 0 ? _props_required : false;
277
+ _this.required = (_props_required = props === null || props === void 0 ? void 0 : props.required) !== null && _props_required !== void 0 ? _props_required : false;
284
278
  var _props_requiredMessage;
285
- _this.requiredMessage = (_props_requiredMessage = (_props8 = props) === null || _props8 === void 0 ? void 0 : _props8.requiredMessage) !== null && _props_requiredMessage !== void 0 ? _props_requiredMessage : "";
279
+ _this.requiredMessage = (_props_requiredMessage = props === null || props === void 0 ? void 0 : props.requiredMessage) !== null && _props_requiredMessage !== void 0 ? _props_requiredMessage : "";
286
280
  //form 组件优先初始化DataBind
287
- _this.dataBind = new DataBind((_props9 = props) === null || _props9 === void 0 ? void 0 : _props9.dataBind);
281
+ _this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
288
282
  var _props_defaultValue;
289
- _this.defaultValue = (_props_defaultValue = (_props10 = props) === null || _props10 === void 0 ? void 0 : _props10.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "";
283
+ _this.defaultValue = (_props_defaultValue = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "";
290
284
  return _this;
291
285
  }
292
286
  return BaseControlProperty;
@@ -91,12 +91,11 @@ var FormControl = /*#__PURE__*/ function(RuntimeControl) {
91
91
  function FormControl(props) {
92
92
  _class_call_check(this, FormControl);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "controlType", "form");
97
96
  _define_property(_assert_this_initialized(_this), "props", void 0);
98
97
  _define_property(_assert_this_initialized(_this), "value", void 0);
99
- _this.props = new BaseControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
98
+ _this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
100
99
  return _this;
101
100
  }
102
101
  return FormControl;
@@ -327,7 +327,6 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
327
327
  function LayoutControl(props) {
328
328
  _class_call_check(this, LayoutControl);
329
329
  var _this;
330
- var _props, _props1;
331
330
  _this = _super.call(this, props);
332
331
  _define_property(_assert_this_initialized(_this), "controlType", "layout");
333
332
  _define_property(_assert_this_initialized(_this), "children", void 0);
@@ -335,8 +334,8 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
335
334
  _define_property(_assert_this_initialized(_this), "childrenMaxLength", void 0);
336
335
  _define_property(_assert_this_initialized(_this), "props", void 0);
337
336
  var _ref = _instanceof(this, LayoutControl) ? this.constructor : void 0, excludes = _ref.excludes, childrenMaxLength = _ref.childrenMaxLength;
338
- _this.props = new LayoutControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
339
- defineControlArrayToProperty(_assert_this_initialized(_this), "children", (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.children);
337
+ _this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
338
+ defineControlArrayToProperty(_assert_this_initialized(_this), "children", props === null || props === void 0 ? void 0 : props.children);
340
339
  _this.excludes = JSONCopy(excludes);
341
340
  _this.childrenMaxLength = childrenMaxLength;
342
341
  return _this;
@@ -92,13 +92,12 @@ var LayoutControl = /*#__PURE__*/ function(RuntimeControl) {
92
92
  function LayoutControl(props) {
93
93
  _class_call_check(this, LayoutControl);
94
94
  var _this;
95
- var _props, _props1;
96
95
  _this = _super.call(this, props);
97
96
  _define_property(_assert_this_initialized(_this), "controlType", "layout");
98
97
  _define_property(_assert_this_initialized(_this), "children", void 0);
99
98
  _define_property(_assert_this_initialized(_this), "props", void 0);
100
- _this.props = new LayoutControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
101
- defineControlArrayToProperty(_assert_this_initialized(_this), "children", (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.children);
99
+ _this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
100
+ defineControlArrayToProperty(_assert_this_initialized(_this), "children", props === null || props === void 0 ? void 0 : props.children);
102
101
  return _this;
103
102
  }
104
103
  return LayoutControl;
@@ -317,11 +317,10 @@ var ListControl = /*#__PURE__*/ function(DesignerControl) {
317
317
  function ListControl(props) {
318
318
  _class_call_check(this, ListControl);
319
319
  var _this;
320
- var _props;
321
320
  _this = _super.call(this, props);
322
321
  _define_property(_assert_this_initialized(_this), "controlType", "list");
323
322
  _define_property(_assert_this_initialized(_this), "props", void 0);
324
- _this.props = new ListControlProperty(_assert_this_initialized(_this), (_props = props) === null || _props === void 0 ? void 0 : _props.props);
323
+ _this.props = new ListControlProperty(_assert_this_initialized(_this), props === null || props === void 0 ? void 0 : props.props);
325
324
  return _this;
326
325
  }
327
326
  _create_class(ListControl, [
@@ -383,13 +382,22 @@ var ListControl = /*#__PURE__*/ function(DesignerControl) {
383
382
  {
384
383
  key: "toSchema",
385
384
  value: function toSchema() {
385
+ var _this_props_footers, _this_props;
386
386
  var superSchema = _get(_get_prototype_of(ListControl.prototype), "toSchema", this).call(this);
387
387
  var headers = this.props.headers.map(function(item) {
388
388
  return item.toSchema();
389
389
  });
390
+ var footers = (_this_props = this.props) === null || _this_props === void 0 ? void 0 : (_this_props_footers = _this_props.footers) === null || _this_props_footers === void 0 ? void 0 : _this_props_footers.map(function(item) {
391
+ if (item) {
392
+ return item.toSchema();
393
+ } else {
394
+ return undefined;
395
+ }
396
+ });
390
397
  return _object_spread_props(_object_spread({}, superSchema), {
391
398
  props: _object_spread_props(_object_spread({}, this.props), {
392
- headers: headers
399
+ headers: headers,
400
+ footers: footers
393
401
  })
394
402
  });
395
403
  }
@@ -91,10 +91,22 @@ var ListControlProperty = /*#__PURE__*/ function(Property) {
91
91
  function ListControlProperty(parent, props) {
92
92
  _class_call_check(this, ListControlProperty);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "headers", void 0);
97
- defineControlArrayToProperty(_assert_this_initialized(_this), "headers", (_props = props) === null || _props === void 0 ? void 0 : _props.headers, parent);
96
+ _define_property(_assert_this_initialized(_this), "footers", void 0);
97
+ _define_property(_assert_this_initialized(_this), "pageIndex", void 0);
98
+ _define_property(_assert_this_initialized(_this), "pageSize", void 0);
99
+ _define_property(_assert_this_initialized(_this), "pageSizeOptions", void 0);
100
+ defineControlArrayToProperty(_assert_this_initialized(_this), "headers", props === null || props === void 0 ? void 0 : props.headers, parent);
101
+ defineControlArrayToProperty(_assert_this_initialized(_this), "footers", props === null || props === void 0 ? void 0 : props.footers, parent);
102
+ var _props_pageIndex;
103
+ _this.pageIndex = (_props_pageIndex = props === null || props === void 0 ? void 0 : props.pageIndex) !== null && _props_pageIndex !== void 0 ? _props_pageIndex : 1;
104
+ var _props_pageSize;
105
+ _this.pageSize = (_props_pageSize = props === null || props === void 0 ? void 0 : props.pageSize) !== null && _props_pageSize !== void 0 ? _props_pageSize : 20;
106
+ var _props_pageSizeOptions;
107
+ _this.pageSizeOptions = (_props_pageSizeOptions = props === null || props === void 0 ? void 0 : props.pageSizeOptions) !== null && _props_pageSizeOptions !== void 0 ? _props_pageSizeOptions : [
108
+ 20
109
+ ];
98
110
  return _this;
99
111
  }
100
112
  return ListControlProperty;
@@ -106,13 +106,12 @@ var ListControl = /*#__PURE__*/ function(RuntimeControl) {
106
106
  function ListControl(props) {
107
107
  _class_call_check(this, ListControl);
108
108
  var _this;
109
- var _props, _props1;
110
109
  _this = _super.call(this, props);
111
110
  _define_property(_assert_this_initialized(_this), "controlType", "list");
112
111
  _define_property(_assert_this_initialized(_this), "children", void 0);
113
112
  _define_property(_assert_this_initialized(_this), "props", void 0);
114
- _this.props = new ListControlProperty(_assert_this_initialized(_this), (_props = props) === null || _props === void 0 ? void 0 : _props.props);
115
- defineControlArrayToProperty(_assert_this_initialized(_this), "children", (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.children);
113
+ _this.props = new ListControlProperty(_assert_this_initialized(_this), props === null || props === void 0 ? void 0 : props.props);
114
+ defineControlArrayToProperty(_assert_this_initialized(_this), "children", props === null || props === void 0 ? void 0 : props.children);
116
115
  return _this;
117
116
  }
118
117
  _create_class(ListControl, [
@@ -91,11 +91,10 @@ var SearchControl = /*#__PURE__*/ function(DesignerLayoutControl) {
91
91
  function SearchControl(props) {
92
92
  _class_call_check(this, SearchControl);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "controlType", "search");
97
96
  _define_property(_assert_this_initialized(_this), "props", void 0);
98
- _this.props = new SearchControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
97
+ _this.props = new SearchControlProperty(props === null || props === void 0 ? void 0 : props.props);
99
98
  return _this;
100
99
  }
101
100
  return SearchControl;
@@ -91,10 +91,9 @@ var SearchControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
91
91
  function SearchControlProperty(props) {
92
92
  _class_call_check(this, SearchControlProperty);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "dataBind", void 0);
97
- _this.dataBind = new DataBind((_props = props) === null || _props === void 0 ? void 0 : _props.dataBind);
96
+ _this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
98
97
  return _this;
99
98
  }
100
99
  return SearchControlProperty;
@@ -91,11 +91,10 @@ var SearchControl = /*#__PURE__*/ function(RuntimeLayoutControl) {
91
91
  function SearchControl(props) {
92
92
  _class_call_check(this, SearchControl);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "controlType", "search");
97
96
  _define_property(_assert_this_initialized(_this), "props", void 0);
98
- _this.props = new SearchControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
97
+ _this.props = new SearchControlProperty(props === null || props === void 0 ? void 0 : props.props);
99
98
  return _this;
100
99
  }
101
100
  return SearchControl;
@@ -91,11 +91,10 @@ var WrapControl = /*#__PURE__*/ function(DesignerLayoutControl) {
91
91
  function WrapControl(props) {
92
92
  _class_call_check(this, WrapControl);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "controlType", "wrap");
97
96
  _define_property(_assert_this_initialized(_this), "props", void 0);
98
- _this.props = new WrapControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
97
+ _this.props = new WrapControlProperty(props === null || props === void 0 ? void 0 : props.props);
99
98
  return _this;
100
99
  }
101
100
  return WrapControl;
@@ -91,11 +91,10 @@ var WrapControl = /*#__PURE__*/ function(RuntimeLayoutControl) {
91
91
  function WrapControl(props) {
92
92
  _class_call_check(this, WrapControl);
93
93
  var _this;
94
- var _props;
95
94
  _this = _super.call(this, props);
96
95
  _define_property(_assert_this_initialized(_this), "controlType", "wrap");
97
96
  _define_property(_assert_this_initialized(_this), "props", void 0);
98
- _this.props = new WrapControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
97
+ _this.props = new WrapControlProperty(props === null || props === void 0 ? void 0 : props.props);
99
98
  return _this;
100
99
  }
101
100
  return WrapControl;
@@ -129,13 +129,29 @@ export var RegisterControls = /*#__PURE__*/ function() {
129
129
  return _this.createControl(item, beforeCreateInstance);
130
130
  });
131
131
  }
132
- // @ts-ignore
133
- if (this.isListControl(schema) && schema.props.headers) {
132
+ if (this.isListControl(schema)) {
134
133
  // @ts-ignore
135
- schema.props.headers = schema.props.headers.map(function(item) {
136
- return(// @ts-ignore
137
- _this.createControl(item, beforeCreateInstance));
138
- });
134
+ var props = schema.props;
135
+ if (props.headers) {
136
+ // @ts-ignore
137
+ props.headers = props.headers.map(function(item) {
138
+ return(// @ts-ignore
139
+ _this.createControl(item, beforeCreateInstance));
140
+ });
141
+ }
142
+ // list类型的控件,允许存在footer
143
+ if (props.footers) {
144
+ // @ts-ignore
145
+ props.footers = props.footers.map(function(item) {
146
+ var newctl;
147
+ // footers 允许有空存在
148
+ if (item) {
149
+ // @ts-ignore
150
+ newctl = _this.createControl(item, beforeCreateInstance);
151
+ }
152
+ return newctl;
153
+ });
154
+ }
139
155
  }
140
156
  // @ts-ignore
141
157
  var Constructor = this.getControlFormType(schema.type);