@byteluck-fe/model-driven-core 2.7.0-alpha.2 → 2.7.0-alpha.21
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.
- package/dist/esm/common/BaseControl/designer.js +259 -220
- package/dist/esm/common/BaseControl/property.js +68 -53
- package/dist/esm/common/BaseControl/runtime.js +37 -15
- package/dist/esm/common/ColumnControl/designer.js +39 -24
- package/dist/esm/common/ColumnControl/property.js +97 -48
- package/dist/esm/common/ColumnControl/runtime.js +39 -24
- package/dist/esm/common/ControlArray.js +12 -12
- package/dist/esm/common/FormControl/designer.js +42 -26
- package/dist/esm/common/FormControl/property.js +130 -69
- package/dist/esm/common/FormControl/runtime.js +40 -24
- package/dist/esm/common/LayoutControl/designer.js +151 -116
- package/dist/esm/common/LayoutControl/property.js +22 -22
- package/dist/esm/common/LayoutControl/runtime.js +41 -25
- package/dist/esm/common/ListControl/designer.js +141 -106
- package/dist/esm/common/ListControl/property.js +40 -23
- package/dist/esm/common/ListControl/runtime.js +43 -27
- package/dist/esm/common/SearchViewControl/designer.js +39 -24
- package/dist/esm/common/SearchViewControl/property.js +38 -23
- package/dist/esm/common/SearchViewControl/runtime.js +39 -24
- package/dist/esm/common/WrapControl/designer.js +39 -24
- package/dist/esm/common/WrapControl/property.js +22 -22
- package/dist/esm/common/WrapControl/runtime.js +39 -24
- package/dist/esm/framework/RegisterControls.js +215 -130
- package/dist/esm/framework/index.js +714 -248
- package/dist/esm/framework/isDataBind.js +8 -0
- package/dist/esm/index.js +1 -0
- package/dist/index.umd.js +1 -1
- package/dist/types/common/ColumnControl/property.d.ts +1 -1
- package/dist/types/common/ListControl/property.d.ts +2 -0
- package/dist/types/framework/index.d.ts +3 -2
- package/dist/types/framework/isDataBind.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
2
|
if (self === void 0) {
|
|
3
3
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function _class_call_check(instance, Constructor) {
|
|
8
8
|
if (!(instance instanceof Constructor)) {
|
|
9
9
|
throw new TypeError("Cannot call a class as a function");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
function _get_prototype_of(o) {
|
|
26
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
15
28
|
};
|
|
16
|
-
return
|
|
29
|
+
return _get_prototype_of(o);
|
|
17
30
|
}
|
|
18
31
|
function _inherits(subClass, superClass) {
|
|
19
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
26
39
|
configurable: true
|
|
27
40
|
}
|
|
28
41
|
});
|
|
29
|
-
if (superClass)
|
|
42
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
30
43
|
}
|
|
31
|
-
function
|
|
32
|
-
if (call && (
|
|
44
|
+
function _possible_constructor_return(self, call) {
|
|
45
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
33
46
|
return call;
|
|
34
47
|
}
|
|
35
|
-
return
|
|
48
|
+
return _assert_this_initialized(self);
|
|
36
49
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
50
|
+
function _set_prototype_of(o, p) {
|
|
51
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
39
52
|
o.__proto__ = p;
|
|
40
53
|
return o;
|
|
41
54
|
};
|
|
42
|
-
return
|
|
55
|
+
return _set_prototype_of(o, p);
|
|
43
56
|
}
|
|
44
|
-
|
|
57
|
+
function _type_of(obj) {
|
|
45
58
|
"@swc/helpers - typeof";
|
|
46
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
47
|
-
}
|
|
48
|
-
function
|
|
60
|
+
}
|
|
61
|
+
function _is_native_reflect_construct() {
|
|
49
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
50
63
|
if (Reflect.construct.sham) return false;
|
|
51
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -56,17 +69,17 @@ function _isNativeReflectConstruct() {
|
|
|
56
69
|
return false;
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
|
-
function
|
|
60
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
61
74
|
return function _createSuperInternal() {
|
|
62
|
-
var Super =
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
63
76
|
if (hasNativeReflectConstruct) {
|
|
64
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
65
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
66
79
|
} else {
|
|
67
80
|
result = Super.apply(this, arguments);
|
|
68
81
|
}
|
|
69
|
-
return
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
70
83
|
};
|
|
71
84
|
}
|
|
72
85
|
import { Property, PropertyRules } from "../BaseControl";
|
|
@@ -76,21 +89,21 @@ import { DataBind, AutoWidth } from "../../framework";
|
|
|
76
89
|
var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
77
90
|
"use strict";
|
|
78
91
|
_inherits(ColumnControlPropertyRules, PropertyRules);
|
|
79
|
-
var _super =
|
|
92
|
+
var _super = _create_super(ColumnControlPropertyRules);
|
|
80
93
|
function ColumnControlPropertyRules(props) {
|
|
81
|
-
|
|
94
|
+
_class_call_check(this, ColumnControlPropertyRules);
|
|
82
95
|
var _this;
|
|
83
96
|
_this = _super.call(this, props);
|
|
84
|
-
_this
|
|
97
|
+
_define_property(_assert_this_initialized(_this), "caption", {
|
|
85
98
|
type: "string",
|
|
86
99
|
required: true,
|
|
87
100
|
message: RulesMessage.getMessage("pleaseEnterCaption")
|
|
88
|
-
};
|
|
89
|
-
_this
|
|
101
|
+
});
|
|
102
|
+
_define_property(_assert_this_initialized(_this), "width", {
|
|
90
103
|
type: "number",
|
|
91
104
|
required: false,
|
|
92
105
|
message: RulesMessage.getMessage("pleaseEnterColumnWidth")
|
|
93
|
-
};
|
|
106
|
+
});
|
|
94
107
|
_this.width.required = props.widthType === "px";
|
|
95
108
|
return _this;
|
|
96
109
|
}
|
|
@@ -102,40 +115,76 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
102
115
|
*/ var ColumnControlProperty = /*#__PURE__*/ function(Property) {
|
|
103
116
|
"use strict";
|
|
104
117
|
_inherits(ColumnControlProperty, Property);
|
|
105
|
-
var _super =
|
|
118
|
+
var _super = _create_super(ColumnControlProperty);
|
|
106
119
|
function ColumnControlProperty(props) {
|
|
107
|
-
|
|
120
|
+
_class_call_check(this, ColumnControlProperty);
|
|
108
121
|
var _this;
|
|
122
|
+
var _props, _props1, _props2, _props3, _props4, _props5, _props6, _props7, _props8, _props9;
|
|
109
123
|
_this = _super.call(this, props);
|
|
124
|
+
/**
|
|
125
|
+
* 宽度类型
|
|
126
|
+
* @defaultValue 'auto'
|
|
127
|
+
*/ _define_property(_assert_this_initialized(_this), "widthType", void 0);
|
|
128
|
+
/**
|
|
129
|
+
* 宽度
|
|
130
|
+
* @defaultValue 150
|
|
131
|
+
*/ _define_property(_assert_this_initialized(_this), "width", void 0);
|
|
132
|
+
/**
|
|
133
|
+
* 标题
|
|
134
|
+
*/ _define_property(_assert_this_initialized(_this), "caption", void 0);
|
|
135
|
+
/**
|
|
136
|
+
* 绑定数据项
|
|
137
|
+
*/ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
|
|
138
|
+
/**
|
|
139
|
+
* 自适应页面宽度
|
|
140
|
+
*/ _define_property(_assert_this_initialized(_this), "autoWidth", void 0);
|
|
141
|
+
/**
|
|
142
|
+
* 冻结
|
|
143
|
+
* @defaultValue 'none'
|
|
144
|
+
*/ _define_property(_assert_this_initialized(_this), "fixed", void 0);
|
|
145
|
+
/**
|
|
146
|
+
* 表头排序
|
|
147
|
+
* @defaultValue true
|
|
148
|
+
*/ _define_property(_assert_this_initialized(_this), "sort", void 0);
|
|
149
|
+
/**
|
|
150
|
+
* 对齐
|
|
151
|
+
*/ _define_property(_assert_this_initialized(_this), "align", void 0);
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
*/ _define_property(_assert_this_initialized(_this), "colSpan", void 0);
|
|
155
|
+
/**
|
|
156
|
+
* 自动高度
|
|
157
|
+
* @defaultValue false
|
|
158
|
+
*/ _define_property(_assert_this_initialized(_this), "autoHeight", void 0);
|
|
110
159
|
var _props_width;
|
|
111
|
-
_this.width = (_props_width = props === null ||
|
|
112
|
-
_this.widthType = (props === null ||
|
|
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";
|
|
113
162
|
var _props_caption;
|
|
114
|
-
_this.caption = (_props_caption = props === null ||
|
|
163
|
+
_this.caption = (_props_caption = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
|
|
115
164
|
var _props_fixed;
|
|
116
|
-
_this.fixed = (_props_fixed = props === null ||
|
|
117
|
-
_this.autoWidth = new AutoWidth(props === null ||
|
|
118
|
-
_this.dataBind = new DataBind(props === null ||
|
|
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);
|
|
119
168
|
var _props_sort;
|
|
120
|
-
_this.sort = (_props_sort = props === null ||
|
|
121
|
-
_this.align = props === null ||
|
|
122
|
-
_this.colSpan = props === null ||
|
|
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;
|
|
123
172
|
var _props_autoHeight;
|
|
124
|
-
_this.autoHeight = (_props_autoHeight = props === null ||
|
|
173
|
+
_this.autoHeight = (_props_autoHeight = (_props9 = props) === null || _props9 === void 0 ? void 0 : _props9.autoHeight) !== null && _props_autoHeight !== void 0 ? _props_autoHeight : false;
|
|
125
174
|
return _this;
|
|
126
175
|
}
|
|
127
176
|
return ColumnControlProperty;
|
|
128
177
|
}(Property);
|
|
129
|
-
ColumnControlProperty
|
|
178
|
+
_define_property(ColumnControlProperty, "Rules", ColumnControlPropertyRules);
|
|
130
179
|
var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnControlPropertyRules) {
|
|
131
180
|
"use strict";
|
|
132
181
|
_inherits(ColumnOptionAndDataSourcePropertyRules, ColumnControlPropertyRules);
|
|
133
|
-
var _super =
|
|
182
|
+
var _super = _create_super(ColumnOptionAndDataSourcePropertyRules);
|
|
134
183
|
function ColumnOptionAndDataSourcePropertyRules(props) {
|
|
135
|
-
|
|
184
|
+
_class_call_check(this, ColumnOptionAndDataSourcePropertyRules);
|
|
136
185
|
var _this;
|
|
137
186
|
_this = _super.call(this, props);
|
|
138
|
-
_this
|
|
187
|
+
_define_property(_assert_this_initialized(_this), "optionConfig", {
|
|
139
188
|
type: "enum",
|
|
140
189
|
enum: [
|
|
141
190
|
"custom",
|
|
@@ -143,20 +192,20 @@ var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnContro
|
|
|
143
192
|
"none"
|
|
144
193
|
],
|
|
145
194
|
message: RulesMessage.getMessage("PleaseSelectTheCorrectOptionSettings")
|
|
146
|
-
};
|
|
147
|
-
_this
|
|
195
|
+
});
|
|
196
|
+
_define_property(_assert_this_initialized(_this), "options", [
|
|
148
197
|
{
|
|
149
198
|
type: "array",
|
|
150
199
|
message: RulesMessage.getMessage("isNotArray")
|
|
151
200
|
}
|
|
152
|
-
];
|
|
153
|
-
_this
|
|
201
|
+
]);
|
|
202
|
+
_define_property(_assert_this_initialized(_this), "datasourceBind", [
|
|
154
203
|
{
|
|
155
204
|
type: "object",
|
|
156
205
|
message: RulesMessage.getMessage("isNotObject")
|
|
157
206
|
}
|
|
158
|
-
];
|
|
159
|
-
initOptionAndDataSourceRules.call(
|
|
207
|
+
]);
|
|
208
|
+
initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
|
|
160
209
|
return _this;
|
|
161
210
|
}
|
|
162
211
|
return ColumnOptionAndDataSourcePropertyRules;
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
2
|
if (self === void 0) {
|
|
3
3
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function _class_call_check(instance, Constructor) {
|
|
8
8
|
if (!(instance instanceof Constructor)) {
|
|
9
9
|
throw new TypeError("Cannot call a class as a function");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
function _get_prototype_of(o) {
|
|
26
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
15
28
|
};
|
|
16
|
-
return
|
|
29
|
+
return _get_prototype_of(o);
|
|
17
30
|
}
|
|
18
31
|
function _inherits(subClass, superClass) {
|
|
19
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
26
39
|
configurable: true
|
|
27
40
|
}
|
|
28
41
|
});
|
|
29
|
-
if (superClass)
|
|
42
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
30
43
|
}
|
|
31
|
-
function
|
|
32
|
-
if (call && (
|
|
44
|
+
function _possible_constructor_return(self, call) {
|
|
45
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
33
46
|
return call;
|
|
34
47
|
}
|
|
35
|
-
return
|
|
48
|
+
return _assert_this_initialized(self);
|
|
36
49
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
50
|
+
function _set_prototype_of(o, p) {
|
|
51
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
39
52
|
o.__proto__ = p;
|
|
40
53
|
return o;
|
|
41
54
|
};
|
|
42
|
-
return
|
|
55
|
+
return _set_prototype_of(o, p);
|
|
43
56
|
}
|
|
44
|
-
|
|
57
|
+
function _type_of(obj) {
|
|
45
58
|
"@swc/helpers - typeof";
|
|
46
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
47
|
-
}
|
|
48
|
-
function
|
|
60
|
+
}
|
|
61
|
+
function _is_native_reflect_construct() {
|
|
49
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
50
63
|
if (Reflect.construct.sham) return false;
|
|
51
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -56,17 +69,17 @@ function _isNativeReflectConstruct() {
|
|
|
56
69
|
return false;
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
|
-
function
|
|
60
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
61
74
|
return function _createSuperInternal() {
|
|
62
|
-
var Super =
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
63
76
|
if (hasNativeReflectConstruct) {
|
|
64
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
65
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
66
79
|
} else {
|
|
67
80
|
result = Super.apply(this, arguments);
|
|
68
81
|
}
|
|
69
|
-
return
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
70
83
|
};
|
|
71
84
|
}
|
|
72
85
|
import { RuntimeControl } from "../BaseControl";
|
|
@@ -74,13 +87,15 @@ import ColumnControlProperty from "./property";
|
|
|
74
87
|
var ColumnControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
75
88
|
"use strict";
|
|
76
89
|
_inherits(ColumnControl, RuntimeControl);
|
|
77
|
-
var _super =
|
|
90
|
+
var _super = _create_super(ColumnControl);
|
|
78
91
|
function ColumnControl(props) {
|
|
79
|
-
|
|
92
|
+
_class_call_check(this, ColumnControl);
|
|
80
93
|
var _this;
|
|
94
|
+
var _props;
|
|
81
95
|
_this = _super.call(this, props);
|
|
82
|
-
_this
|
|
83
|
-
_this
|
|
96
|
+
_define_property(_assert_this_initialized(_this), "controlType", "column");
|
|
97
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
98
|
+
_this.props = new ColumnControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
|
|
84
99
|
return _this;
|
|
85
100
|
}
|
|
86
101
|
return ColumnControl;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
3
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
4
|
return arr2;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
if (Array.isArray(arr)) return
|
|
6
|
+
function _array_without_holes(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function _iterable_to_array(iter) {
|
|
10
10
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function _non_iterable_spread() {
|
|
13
13
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
15
|
+
function _to_consumable_array(arr) {
|
|
16
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
19
19
|
if (!o) return;
|
|
20
|
-
if (typeof o === "string") return
|
|
20
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
21
21
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
22
22
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
23
23
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
24
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
25
25
|
}
|
|
26
26
|
import { isArray, isPlainObject } from "@byteluck-fe/model-driven-shared";
|
|
27
27
|
export function setPropertyDontEnum(obj, property) {
|
|
@@ -62,7 +62,7 @@ function proxyState(target, parent) {
|
|
|
62
62
|
return (_Reflect = Reflect).get.apply(_Reflect, [
|
|
63
63
|
t,
|
|
64
64
|
p
|
|
65
|
-
].concat(
|
|
65
|
+
].concat(_to_consumable_array(args)));
|
|
66
66
|
},
|
|
67
67
|
set: function set(t, property, value) {
|
|
68
68
|
for(var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++){
|
|
@@ -77,7 +77,7 @@ function proxyState(target, parent) {
|
|
|
77
77
|
t,
|
|
78
78
|
property,
|
|
79
79
|
value
|
|
80
|
-
].concat(
|
|
80
|
+
].concat(_to_consumable_array(args)));
|
|
81
81
|
if (isPlainObject(value)) {
|
|
82
82
|
defineParent(value, parent);
|
|
83
83
|
}
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
2
|
if (self === void 0) {
|
|
3
3
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function _class_call_check(instance, Constructor) {
|
|
8
8
|
if (!(instance instanceof Constructor)) {
|
|
9
9
|
throw new TypeError("Cannot call a class as a function");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
function _get_prototype_of(o) {
|
|
26
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
15
28
|
};
|
|
16
|
-
return
|
|
29
|
+
return _get_prototype_of(o);
|
|
17
30
|
}
|
|
18
31
|
function _inherits(subClass, superClass) {
|
|
19
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
26
39
|
configurable: true
|
|
27
40
|
}
|
|
28
41
|
});
|
|
29
|
-
if (superClass)
|
|
42
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
30
43
|
}
|
|
31
|
-
function
|
|
32
|
-
if (call && (
|
|
44
|
+
function _possible_constructor_return(self, call) {
|
|
45
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
33
46
|
return call;
|
|
34
47
|
}
|
|
35
|
-
return
|
|
48
|
+
return _assert_this_initialized(self);
|
|
36
49
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
50
|
+
function _set_prototype_of(o, p) {
|
|
51
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
39
52
|
o.__proto__ = p;
|
|
40
53
|
return o;
|
|
41
54
|
};
|
|
42
|
-
return
|
|
55
|
+
return _set_prototype_of(o, p);
|
|
43
56
|
}
|
|
44
|
-
|
|
57
|
+
function _type_of(obj) {
|
|
45
58
|
"@swc/helpers - typeof";
|
|
46
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
47
|
-
}
|
|
48
|
-
function
|
|
60
|
+
}
|
|
61
|
+
function _is_native_reflect_construct() {
|
|
49
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
50
63
|
if (Reflect.construct.sham) return false;
|
|
51
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -56,17 +69,17 @@ function _isNativeReflectConstruct() {
|
|
|
56
69
|
return false;
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
|
-
function
|
|
60
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
61
74
|
return function _createSuperInternal() {
|
|
62
|
-
var Super =
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
63
76
|
if (hasNativeReflectConstruct) {
|
|
64
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
65
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
66
79
|
} else {
|
|
67
80
|
result = Super.apply(this, arguments);
|
|
68
81
|
}
|
|
69
|
-
return
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
70
83
|
};
|
|
71
84
|
}
|
|
72
85
|
import { DesignerControl } from "../BaseControl";
|
|
@@ -74,21 +87,24 @@ import BaseControlProperty from "./property";
|
|
|
74
87
|
var FormControl = /*#__PURE__*/ function(DesignerControl) {
|
|
75
88
|
"use strict";
|
|
76
89
|
_inherits(FormControl, DesignerControl);
|
|
77
|
-
var _super =
|
|
90
|
+
var _super = _create_super(FormControl);
|
|
78
91
|
function FormControl(props) {
|
|
79
|
-
|
|
92
|
+
_class_call_check(this, FormControl);
|
|
80
93
|
var _this;
|
|
94
|
+
var _props;
|
|
81
95
|
_this = _super.call(this, props);
|
|
82
|
-
_this
|
|
83
|
-
_this
|
|
96
|
+
_define_property(_assert_this_initialized(_this), "controlType", "form");
|
|
97
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
98
|
+
_this.props = new BaseControlProperty((_props = props) === null || _props === void 0 ? void 0 : _props.props);
|
|
84
99
|
return _this;
|
|
85
100
|
}
|
|
86
101
|
return FormControl;
|
|
87
102
|
}(DesignerControl);
|
|
88
|
-
FormControl
|
|
103
|
+
_define_property(FormControl, "controlEventKeys", [
|
|
89
104
|
"on_change",
|
|
90
105
|
"on_focus",
|
|
91
106
|
"on_blur"
|
|
92
|
-
];
|
|
107
|
+
]);
|
|
108
|
+
_define_property(FormControl, "controlCustomAttributes", void 0);
|
|
93
109
|
export default FormControl;
|
|
94
110
|
export { FormControl as DesignerFormControl };
|