@byteluck-fe/model-driven-core 2.8.2-beta.1 → 2.8.2-beta.13

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 +39 -35
  4. package/dist/esm/common/BaseControl/index.js +7 -7
  5. package/dist/esm/common/BaseControl/property.js +24 -37
  6. package/dist/esm/common/BaseControl/runtime.js +6 -6
  7. package/dist/esm/common/ColumnControl/designer.js +105 -27
  8. package/dist/esm/common/ColumnControl/index.js +6 -6
  9. package/dist/esm/common/ColumnControl/property.js +71 -95
  10. package/dist/esm/common/ColumnControl/runtime.js +16 -27
  11. package/dist/esm/common/ControlArray.js +5 -5
  12. package/dist/esm/common/FormControl/designer.js +17 -30
  13. package/dist/esm/common/FormControl/index.js +6 -6
  14. package/dist/esm/common/FormControl/property.js +119 -147
  15. package/dist/esm/common/FormControl/runtime.js +14 -28
  16. package/dist/esm/common/LayoutControl/designer.js +17 -33
  17. package/dist/esm/common/LayoutControl/index.js +6 -6
  18. package/dist/esm/common/LayoutControl/property.js +13 -24
  19. package/dist/esm/common/LayoutControl/runtime.js +16 -30
  20. package/dist/esm/common/ListControl/designer.js +16 -29
  21. package/dist/esm/common/ListControl/index.js +6 -6
  22. package/dist/esm/common/ListControl/property.js +16 -33
  23. package/dist/esm/common/ListControl/runtime.js +17 -31
  24. package/dist/esm/common/SearchViewControl/designer.js +14 -27
  25. package/dist/esm/common/SearchViewControl/index.js +6 -6
  26. package/dist/esm/common/SearchViewControl/property.js +14 -26
  27. package/dist/esm/common/SearchViewControl/runtime.js +14 -27
  28. package/dist/esm/common/Validator.js +5 -5
  29. package/dist/esm/common/WrapControl/designer.js +14 -27
  30. package/dist/esm/common/WrapControl/index.js +6 -6
  31. package/dist/esm/common/WrapControl/property.js +13 -24
  32. package/dist/esm/common/WrapControl/runtime.js +14 -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 +5 -5
  36. package/dist/esm/common/initOptionAndDataSourceRules.js +74 -74
  37. package/dist/esm/framework/RegisterControls.js +9 -8
  38. package/dist/esm/framework/index.js +144 -174
  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 +63 -63
  43. package/dist/types/common/BaseControl/index.d.ts +13 -13
  44. package/dist/types/common/BaseControl/property.d.ts +38 -38
  45. package/dist/types/common/BaseControl/runtime.d.ts +23 -23
  46. package/dist/types/common/BaseControl/types.d.ts +35 -35
  47. package/dist/types/common/ColumnControl/designer.d.ts +20 -10
  48. package/dist/types/common/ColumnControl/index.d.ts +12 -12
  49. package/dist/types/common/ColumnControl/property.d.ts +74 -73
  50. package/dist/types/common/ColumnControl/runtime.d.ts +11 -10
  51. package/dist/types/common/ControlArray.d.ts +9 -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 +18 -18
  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 +37 -37
  78. package/dist/types/framework/index.d.ts +881 -880
  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
@@ -4,11 +4,29 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
10
14
  }
11
15
  }
16
+ function _defineProperties(target, props) {
17
+ for(var i = 0; i < props.length; i++){
18
+ var descriptor = props[i];
19
+ descriptor.enumerable = descriptor.enumerable || false;
20
+ descriptor.configurable = true;
21
+ if ("value" in descriptor) descriptor.writable = true;
22
+ Object.defineProperty(target, descriptor.key, descriptor);
23
+ }
24
+ }
25
+ function _create_class(Constructor, protoProps, staticProps) {
26
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
+ if (staticProps) _defineProperties(Constructor, staticProps);
28
+ return Constructor;
29
+ }
12
30
  function _define_property(obj, key, value) {
13
31
  if (key in obj) {
14
32
  Object.defineProperty(obj, key, {
@@ -22,6 +40,22 @@ function _define_property(obj, key, value) {
22
40
  }
23
41
  return obj;
24
42
  }
43
+ function _get(target, property, receiver) {
44
+ if (typeof Reflect !== "undefined" && Reflect.get) {
45
+ _get = Reflect.get;
46
+ } else {
47
+ _get = function get(target, property, receiver) {
48
+ var base = _super_prop_base(target, property);
49
+ if (!base) return;
50
+ var desc = Object.getOwnPropertyDescriptor(base, property);
51
+ if (desc.get) {
52
+ return desc.get.call(receiver || target);
53
+ }
54
+ return desc.value;
55
+ };
56
+ }
57
+ return _get(target, property, receiver || target);
58
+ }
25
59
  function _get_prototype_of(o) {
26
60
  _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
27
61
  return o.__proto__ || Object.getPrototypeOf(o);
@@ -41,6 +75,45 @@ function _inherits(subClass, superClass) {
41
75
  });
42
76
  if (superClass) _set_prototype_of(subClass, superClass);
43
77
  }
78
+ function _object_spread(target) {
79
+ for(var i = 1; i < arguments.length; i++){
80
+ var source = arguments[i] != null ? arguments[i] : {};
81
+ var ownKeys = Object.keys(source);
82
+ if (typeof Object.getOwnPropertySymbols === "function") {
83
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
84
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
85
+ }));
86
+ }
87
+ ownKeys.forEach(function(key) {
88
+ _define_property(target, key, source[key]);
89
+ });
90
+ }
91
+ return target;
92
+ }
93
+ function ownKeys(object, enumerableOnly) {
94
+ var keys = Object.keys(object);
95
+ if (Object.getOwnPropertySymbols) {
96
+ var symbols = Object.getOwnPropertySymbols(object);
97
+ if (enumerableOnly) {
98
+ symbols = symbols.filter(function(sym) {
99
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
100
+ });
101
+ }
102
+ keys.push.apply(keys, symbols);
103
+ }
104
+ return keys;
105
+ }
106
+ function _object_spread_props(target, source) {
107
+ source = source != null ? source : {};
108
+ if (Object.getOwnPropertyDescriptors) {
109
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
110
+ } else {
111
+ ownKeys(Object(source)).forEach(function(key) {
112
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
113
+ });
114
+ }
115
+ return target;
116
+ }
44
117
  function _possible_constructor_return(self, call) {
45
118
  if (call && (_type_of(call) === "object" || typeof call === "function")) {
46
119
  return call;
@@ -54,49 +127,54 @@ function _set_prototype_of(o, p) {
54
127
  };
55
128
  return _set_prototype_of(o, p);
56
129
  }
130
+ function _super_prop_base(object, property) {
131
+ while(!Object.prototype.hasOwnProperty.call(object, property)){
132
+ object = _get_prototype_of(object);
133
+ if (object === null) break;
134
+ }
135
+ return object;
136
+ }
57
137
  function _type_of(obj) {
58
138
  "@swc/helpers - typeof";
59
139
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
140
  }
61
141
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
142
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
143
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
144
+ } catch (_) {}
145
+ return (_is_native_reflect_construct = function() {
146
+ return !!result;
147
+ })();
84
148
  }
85
- import { DesignerControl } from "../BaseControl";
86
- import ColumnControlProperty from "./property";
149
+ import { defineControlArrayToProperty } from '../ControlArray';
150
+ import { DesignerControl } from '../BaseControl';
151
+ import ColumnControlProperty from './property';
87
152
  var ColumnControl = /*#__PURE__*/ function(DesignerControl) {
88
153
  "use strict";
89
154
  _inherits(ColumnControl, DesignerControl);
90
- var _super = _create_super(ColumnControl);
91
155
  function ColumnControl(props) {
92
156
  _class_call_check(this, ColumnControl);
93
157
  var _this;
94
- _this = _super.call(this, props);
95
- _define_property(_assert_this_initialized(_this), "controlType", "column");
96
- _define_property(_assert_this_initialized(_this), "props", void 0);
158
+ _this = _call_super(this, ColumnControl, [
159
+ props
160
+ ]), _define_property(_this, "controlType", 'column'), _define_property(_this, "props", void 0), _define_property(_this, "children", void 0);
97
161
  _this.props = new ColumnControlProperty(props === null || props === void 0 ? void 0 : props.props);
162
+ defineControlArrayToProperty(_this, 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Designer');
98
163
  return _this;
99
164
  }
165
+ _create_class(ColumnControl, [
166
+ {
167
+ key: "toSchema",
168
+ value: function toSchema() {
169
+ var superSchema = _get(_get_prototype_of(ColumnControl.prototype), "toSchema", this).call(this);
170
+ return _object_spread_props(_object_spread({}, superSchema), {
171
+ children: this.children ? this.children.map(function(item) {
172
+ return item.toSchema();
173
+ }) : []
174
+ });
175
+ }
176
+ }
177
+ ]);
100
178
  return ColumnControl;
101
179
  }(DesignerControl);
102
180
  export default ColumnControl;
@@ -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';
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,109 +63,83 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
- import { Property, PropertyRules } from "../BaseControl";
86
- import { RulesMessage } from "@byteluck-fe/model-driven-shared";
87
- import { initOptionAndDataSourceRules } from "../initOptionAndDataSourceRules";
88
- import { DataBind, AutoWidth } from "../../framework";
73
+ import { Property, PropertyRules } from '../BaseControl';
74
+ import { RulesMessage } from '@byteluck-fe/model-driven-shared';
75
+ import { initOptionAndDataSourceRules } from '../initOptionAndDataSourceRules';
76
+ import { DataBind, AutoWidth } from '../../framework';
89
77
  var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
90
78
  "use strict";
91
79
  _inherits(ColumnControlPropertyRules, PropertyRules);
92
- var _super = _create_super(ColumnControlPropertyRules);
93
80
  function ColumnControlPropertyRules(props) {
94
81
  _class_call_check(this, ColumnControlPropertyRules);
95
82
  var _this;
96
- _this = _super.call(this, props);
97
- _define_property(_assert_this_initialized(_this), "caption", {
98
- type: "string",
83
+ _this = _call_super(this, ColumnControlPropertyRules, [
84
+ props
85
+ ]), _define_property(_this, "caption", {
86
+ type: 'string',
99
87
  required: true,
100
- message: RulesMessage.getMessage("pleaseEnterCaption")
101
- });
102
- _define_property(_assert_this_initialized(_this), "width", {
103
- type: "number",
88
+ message: RulesMessage.getMessage('pleaseEnterCaption')
89
+ }), _define_property(_this, "width", {
90
+ type: 'number',
104
91
  required: false,
105
- message: RulesMessage.getMessage("pleaseEnterColumnWidth")
92
+ message: RulesMessage.getMessage('pleaseEnterColumnWidth')
106
93
  });
107
- _this.width.required = props.widthType === "px";
94
+ _this.width.required = props.widthType === 'px';
108
95
  return _this;
109
96
  }
110
97
  return ColumnControlPropertyRules;
111
98
  }(PropertyRules);
112
- /**
113
- * 列基本属性
114
- * @public
99
+ /**
100
+ * 列基本属性
101
+ * @public
115
102
  */ var ColumnControlProperty = /*#__PURE__*/ function(Property) {
116
103
  "use strict";
117
104
  _inherits(ColumnControlProperty, Property);
118
- var _super = _create_super(ColumnControlProperty);
119
105
  function ColumnControlProperty(props) {
120
106
  _class_call_check(this, ColumnControlProperty);
121
107
  var _this;
122
- _this = _super.call(this, props);
123
- /**
124
- * 宽度类型
125
- * @defaultValue 'auto'
126
- */ _define_property(_assert_this_initialized(_this), "widthType", void 0);
127
- /**
128
- * 宽度
129
- * @defaultValue 150
130
- */ _define_property(_assert_this_initialized(_this), "width", void 0);
131
- /**
132
- * 标题
133
- */ _define_property(_assert_this_initialized(_this), "caption", void 0);
134
- /**
135
- * 绑定数据项
136
- */ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
137
- /**
138
- * 自适应页面宽度
139
- */ _define_property(_assert_this_initialized(_this), "autoWidth", void 0);
140
- /**
141
- * 冻结
142
- * @defaultValue 'none'
143
- */ _define_property(_assert_this_initialized(_this), "fixed", void 0);
144
- /**
145
- * 表头排序
146
- * @defaultValue true
147
- */ _define_property(_assert_this_initialized(_this), "sort", void 0);
148
- /**
149
- * 对齐
150
- */ _define_property(_assert_this_initialized(_this), "align", void 0);
151
- /**
152
- * @internal
153
- */ _define_property(_assert_this_initialized(_this), "colSpan", void 0);
154
- /**
155
- * 自动高度
156
- * @defaultValue false
157
- */ _define_property(_assert_this_initialized(_this), "autoHeight", void 0);
108
+ _this = _call_super(this, ColumnControlProperty, [
109
+ props
110
+ ]), /**
111
+ * 宽度类型
112
+ * @defaultValue 'auto'
113
+ */ _define_property(_this, "widthType", void 0), /**
114
+ * 宽度
115
+ * @defaultValue 150
116
+ */ _define_property(_this, "width", void 0), /**
117
+ * 标题
118
+ */ _define_property(_this, "caption", void 0), /**
119
+ * 绑定数据项
120
+ */ _define_property(_this, "dataBind", void 0), /**
121
+ * 自适应页面宽度
122
+ */ _define_property(_this, "autoWidth", void 0), /**
123
+ * 冻结
124
+ * @defaultValue 'none'
125
+ */ _define_property(_this, "fixed", void 0), /**
126
+ * 表头排序
127
+ * @defaultValue true
128
+ */ _define_property(_this, "sort", void 0), /**
129
+ * 对齐
130
+ */ _define_property(_this, "align", void 0), /**
131
+ * @internal
132
+ */ _define_property(_this, "colSpan", void 0), /**
133
+ * 自动高度
134
+ * @defaultValue false
135
+ */ _define_property(_this, "autoHeight", void 0), _define_property(_this, "children", void 0);
158
136
  var _props_width;
159
137
  _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";
138
+ _this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) || 'auto';
161
139
  var _props_caption;
162
- _this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
140
+ _this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : '';
163
141
  var _props_fixed;
164
- _this.fixed = (_props_fixed = props === null || props === void 0 ? void 0 : props.fixed) !== null && _props_fixed !== void 0 ? _props_fixed : "none";
142
+ _this.fixed = (_props_fixed = props === null || props === void 0 ? void 0 : props.fixed) !== null && _props_fixed !== void 0 ? _props_fixed : 'none';
165
143
  _this.autoWidth = new AutoWidth(props === null || props === void 0 ? void 0 : props.autoWidth);
166
144
  _this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
167
145
  var _props_sort;
@@ -178,33 +156,31 @@ _define_property(ColumnControlProperty, "Rules", ColumnControlPropertyRules);
178
156
  var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnControlPropertyRules) {
179
157
  "use strict";
180
158
  _inherits(ColumnOptionAndDataSourcePropertyRules, ColumnControlPropertyRules);
181
- var _super = _create_super(ColumnOptionAndDataSourcePropertyRules);
182
159
  function ColumnOptionAndDataSourcePropertyRules(props) {
183
160
  _class_call_check(this, ColumnOptionAndDataSourcePropertyRules);
184
161
  var _this;
185
- _this = _super.call(this, props);
186
- _define_property(_assert_this_initialized(_this), "optionConfig", {
187
- type: "enum",
162
+ _this = _call_super(this, ColumnOptionAndDataSourcePropertyRules, [
163
+ props
164
+ ]), _define_property(_this, "optionConfig", {
165
+ type: 'enum',
188
166
  enum: [
189
- "custom",
190
- "datasource",
191
- "none"
167
+ 'custom',
168
+ 'datasource',
169
+ 'none'
192
170
  ],
193
- message: RulesMessage.getMessage("PleaseSelectTheCorrectOptionSettings")
194
- });
195
- _define_property(_assert_this_initialized(_this), "options", [
171
+ message: RulesMessage.getMessage('PleaseSelectTheCorrectOptionSettings')
172
+ }), _define_property(_this, "options", [
196
173
  {
197
- type: "array",
198
- message: RulesMessage.getMessage("isNotArray")
174
+ type: 'array',
175
+ message: RulesMessage.getMessage('isNotArray')
199
176
  }
200
- ]);
201
- _define_property(_assert_this_initialized(_this), "datasourceBind", [
177
+ ]), _define_property(_this, "datasourceBind", [
202
178
  {
203
- type: "object",
204
- message: RulesMessage.getMessage("isNotObject")
179
+ type: 'object',
180
+ message: RulesMessage.getMessage('isNotObject')
205
181
  }
206
182
  ]);
207
- initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
183
+ initOptionAndDataSourceRules.call(_this, props);
208
184
  return _this;
209
185
  }
210
186
  return ColumnOptionAndDataSourcePropertyRules;
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,42 +63,27 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
- import { RuntimeControl } from "../BaseControl";
86
- import ColumnControlProperty from "./property";
73
+ import { defineControlArrayToProperty } from '../ControlArray';
74
+ import { RuntimeControl } from '../BaseControl';
75
+ import ColumnControlProperty from './property';
87
76
  var ColumnControl = /*#__PURE__*/ function(RuntimeControl) {
88
77
  "use strict";
89
78
  _inherits(ColumnControl, RuntimeControl);
90
- var _super = _create_super(ColumnControl);
91
79
  function ColumnControl(props) {
92
80
  _class_call_check(this, ColumnControl);
93
81
  var _this;
94
- _this = _super.call(this, props);
95
- _define_property(_assert_this_initialized(_this), "controlType", "column");
96
- _define_property(_assert_this_initialized(_this), "props", void 0);
82
+ _this = _call_super(this, ColumnControl, [
83
+ props
84
+ ]), _define_property(_this, "controlType", 'column'), _define_property(_this, "props", void 0), _define_property(_this, "children", void 0);
97
85
  _this.props = new ColumnControlProperty(props === null || props === void 0 ? void 0 : props.props);
86
+ defineControlArrayToProperty(_this, 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Runtime');
98
87
  return _this;
99
88
  }
100
89
  return ColumnControl;
@@ -23,7 +23,7 @@ function _unsupported_iterable_to_array(o, minLen) {
23
23
  if (n === "Map" || n === "Set") return Array.from(n);
24
24
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
25
25
  }
26
- import { isArray, isPlainObject } from "@byteluck-fe/model-driven-shared";
26
+ import { isArray, isPlainObject } from '@byteluck-fe/model-driven-shared';
27
27
  export function setPropertyDontEnum(obj, property) {
28
28
  var _Object_getOwnPropertyDescriptors_property;
29
29
  //如果没有被设置过不允许枚举的话,说明是第一次被设置,需要设置属性不允许枚举
@@ -34,10 +34,10 @@ export function setPropertyDontEnum(obj, property) {
34
34
  }
35
35
  }
36
36
  export function defineParent(control, parent, mode) {
37
- if (mode !== "Runtime") {
37
+ if (mode !== 'Runtime') {
38
38
  control.parent = parent;
39
39
  // 如果没有被设置过不允许枚举的话,说明是第一次被代理,需要设置parent属性不允许枚举
40
- setPropertyDontEnum(control, "parent");
40
+ setPropertyDontEnum(control, 'parent');
41
41
  }
42
42
  }
43
43
  export function defineArrayParent(controls, parent, mode) {
@@ -45,7 +45,7 @@ export function defineArrayParent(controls, parent, mode) {
45
45
  defineParent(item, parent, mode);
46
46
  });
47
47
  }
48
- var targetKey = Symbol("targetKey");
48
+ var targetKey = Symbol('targetKey');
49
49
  function getTargetValue(value) {
50
50
  var _value_targetKey;
51
51
  return (_value_targetKey = value[targetKey]) !== null && _value_targetKey !== void 0 ? _value_targetKey : value;
@@ -72,7 +72,7 @@ function proxyState(target, parent, mode) {
72
72
  }
73
73
  var _Reflect;
74
74
  // 更改长度为当前长度,代表没变,直接返回true,否则在safari 13.x版本的严格模式会引起页面崩溃
75
- if (isArray(target) && property === "length" && value === target.length) {
75
+ if (isArray(target) && property === 'length' && value === target.length) {
76
76
  return true;
77
77
  }
78
78
  var result = (_Reflect = Reflect).set.apply(_Reflect, [
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -59,50 +63,33 @@ function _type_of(obj) {
59
63
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
60
64
  }
61
65
  function _is_native_reflect_construct() {
62
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
63
- if (Reflect.construct.sham) return false;
64
- if (typeof Proxy === "function") return true;
65
66
  try {
66
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
67
- return true;
68
- } catch (e) {
69
- return false;
70
- }
71
- }
72
- function _create_super(Derived) {
73
- var hasNativeReflectConstruct = _is_native_reflect_construct();
74
- return function _createSuperInternal() {
75
- var Super = _get_prototype_of(Derived), result;
76
- if (hasNativeReflectConstruct) {
77
- var NewTarget = _get_prototype_of(this).constructor;
78
- result = Reflect.construct(Super, arguments, NewTarget);
79
- } else {
80
- result = Super.apply(this, arguments);
81
- }
82
- return _possible_constructor_return(this, result);
83
- };
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
84
72
  }
85
- import { DesignerControl } from "../BaseControl";
86
- import BaseControlProperty from "./property";
73
+ import { DesignerControl } from '../BaseControl';
74
+ import BaseControlProperty from './property';
87
75
  var FormControl = /*#__PURE__*/ function(DesignerControl) {
88
76
  "use strict";
89
77
  _inherits(FormControl, DesignerControl);
90
- var _super = _create_super(FormControl);
91
78
  function FormControl(props) {
92
79
  _class_call_check(this, FormControl);
93
80
  var _this;
94
- _this = _super.call(this, props);
95
- _define_property(_assert_this_initialized(_this), "controlType", "form");
96
- _define_property(_assert_this_initialized(_this), "props", void 0);
81
+ _this = _call_super(this, FormControl, [
82
+ props
83
+ ]), _define_property(_this, "controlType", 'form'), _define_property(_this, "props", void 0);
97
84
  _this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
98
85
  return _this;
99
86
  }
100
87
  return FormControl;
101
88
  }(DesignerControl);
102
89
  _define_property(FormControl, "controlEventKeys", [
103
- "on_change",
104
- "on_focus",
105
- "on_blur"
90
+ 'on_change',
91
+ 'on_focus',
92
+ 'on_blur'
106
93
  ]);
107
94
  _define_property(FormControl, "controlCustomAttributes", void 0);
108
95
  export default FormControl;
@@ -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';