@byteluck-fe/model-driven-core 2.3.1 → 2.3.12-a
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 +58 -57
- package/dist/esm/common/BaseControl/property.js +55 -55
- package/dist/esm/common/BaseControl/runtime.js +17 -17
- package/dist/esm/common/ColumnControl/designer.js +25 -25
- package/dist/esm/common/ColumnControl/property.js +44 -44
- package/dist/esm/common/ColumnControl/runtime.js +25 -25
- package/dist/esm/common/ControlArray.js +13 -13
- package/dist/esm/common/FormControl/designer.js +27 -27
- package/dist/esm/common/FormControl/property.js +57 -55
- package/dist/esm/common/FormControl/runtime.js +26 -26
- package/dist/esm/common/LayoutControl/designer.js +61 -61
- package/dist/esm/common/LayoutControl/property.js +22 -22
- package/dist/esm/common/LayoutControl/runtime.js +27 -27
- package/dist/esm/common/ListControl/designer.js +58 -58
- package/dist/esm/common/ListControl/property.js +25 -25
- package/dist/esm/common/ListControl/runtime.js +30 -30
- package/dist/esm/common/SearchViewControl/designer.js +25 -25
- package/dist/esm/common/SearchViewControl/property.js +24 -24
- package/dist/esm/common/SearchViewControl/runtime.js +25 -25
- package/dist/esm/common/WrapControl/designer.js +25 -25
- package/dist/esm/common/WrapControl/property.js +22 -22
- package/dist/esm/common/WrapControl/runtime.js +25 -25
- package/dist/esm/framework/RegisterControls.js +12 -12
- package/dist/esm/framework/index.js +372 -223
- package/dist/index.umd.js +1 -1
- package/dist/types/common/BaseControl/property.d.ts +14 -0
- package/dist/types/common/FormControl/property.d.ts +4 -0
- package/dist/types/framework/index.d.ts +205 -0
- package/package.json +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
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
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
13
|
if (key in obj) {
|
|
14
14
|
Object.defineProperty(obj, key, {
|
|
15
15
|
value: value,
|
|
@@ -22,11 +22,11 @@ function _defineProperty(obj, key, value) {
|
|
|
22
22
|
}
|
|
23
23
|
return obj;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
25
|
+
function _get_prototype_of(o) {
|
|
26
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
27
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return _get_prototype_of(o);
|
|
30
30
|
}
|
|
31
31
|
function _inherits(subClass, superClass) {
|
|
32
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -39,7 +39,7 @@ function _inherits(subClass, superClass) {
|
|
|
39
39
|
configurable: true
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
if (superClass)
|
|
42
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
43
43
|
}
|
|
44
44
|
function _instanceof(left, right) {
|
|
45
45
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -48,24 +48,24 @@ function _instanceof(left, right) {
|
|
|
48
48
|
return left instanceof right;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
if (call && (
|
|
51
|
+
function _possible_constructor_return(self, call) {
|
|
52
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
53
53
|
return call;
|
|
54
54
|
}
|
|
55
|
-
return
|
|
55
|
+
return _assert_this_initialized(self);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
57
|
+
function _set_prototype_of(o, p) {
|
|
58
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
59
59
|
o.__proto__ = p;
|
|
60
60
|
return o;
|
|
61
61
|
};
|
|
62
|
-
return
|
|
62
|
+
return _set_prototype_of(o, p);
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
function _type_of(obj) {
|
|
65
65
|
"@swc/helpers - typeof";
|
|
66
66
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
67
|
-
}
|
|
68
|
-
function
|
|
67
|
+
}
|
|
68
|
+
function _is_native_reflect_construct() {
|
|
69
69
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
70
70
|
if (Reflect.construct.sham) return false;
|
|
71
71
|
if (typeof Proxy === "function") return true;
|
|
@@ -76,17 +76,17 @@ function _isNativeReflectConstruct() {
|
|
|
76
76
|
return false;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
var hasNativeReflectConstruct =
|
|
79
|
+
function _create_super(Derived) {
|
|
80
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
81
81
|
return function _createSuperInternal() {
|
|
82
|
-
var Super =
|
|
82
|
+
var Super = _get_prototype_of(Derived), result;
|
|
83
83
|
if (hasNativeReflectConstruct) {
|
|
84
|
-
var NewTarget =
|
|
84
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
85
85
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
86
86
|
} else {
|
|
87
87
|
result = Super.apply(this, arguments);
|
|
88
88
|
}
|
|
89
|
-
return
|
|
89
|
+
return _possible_constructor_return(this, result);
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
import { RulesMessage, JSONCopy } from "@byteluck-fe/model-driven-shared";
|
|
@@ -96,21 +96,21 @@ import { DataBind } from "../../framework";
|
|
|
96
96
|
var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
97
97
|
"use strict";
|
|
98
98
|
_inherits(BaseControlPropertyRules, PropertyRules);
|
|
99
|
-
var _super =
|
|
99
|
+
var _super = _create_super(BaseControlPropertyRules);
|
|
100
100
|
function BaseControlPropertyRules(props) {
|
|
101
|
-
|
|
101
|
+
_class_call_check(this, BaseControlPropertyRules);
|
|
102
102
|
var _this;
|
|
103
103
|
_this = _super.call(this, props);
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
_define_property(_assert_this_initialized(_this), "dataBind", {});
|
|
105
|
+
_define_property(_assert_this_initialized(_this), "caption", {
|
|
106
106
|
type: "string",
|
|
107
107
|
required: true,
|
|
108
108
|
message: RulesMessage.getMessage("pleaseEnterCaption")
|
|
109
109
|
});
|
|
110
|
-
|
|
110
|
+
_define_property(_assert_this_initialized(_this), "isHideCaption", {
|
|
111
111
|
type: "boolean"
|
|
112
112
|
});
|
|
113
|
-
|
|
113
|
+
_define_property(_assert_this_initialized(_this), "labelPosition", {
|
|
114
114
|
type: "enum",
|
|
115
115
|
enum: [
|
|
116
116
|
"top",
|
|
@@ -123,17 +123,17 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
123
123
|
// type: 'string',
|
|
124
124
|
// message: RulesMessage.getMessage('pleaseEnterPlaceholder'),
|
|
125
125
|
// }
|
|
126
|
-
|
|
126
|
+
_define_property(_assert_this_initialized(_this), "defaultState", {
|
|
127
127
|
type: "enum",
|
|
128
128
|
enum: [
|
|
129
129
|
"default",
|
|
130
130
|
"readonly"
|
|
131
131
|
]
|
|
132
132
|
});
|
|
133
|
-
|
|
133
|
+
_define_property(_assert_this_initialized(_this), "required", {
|
|
134
134
|
type: "boolean"
|
|
135
135
|
});
|
|
136
|
-
|
|
136
|
+
_define_property(_assert_this_initialized(_this), "captionTip", {
|
|
137
137
|
type: "string",
|
|
138
138
|
required: false,
|
|
139
139
|
message: RulesMessage.getMessage("pleaseEnterCaptionTip")
|
|
@@ -185,9 +185,9 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
185
185
|
var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRules) {
|
|
186
186
|
"use strict";
|
|
187
187
|
_inherits(BaseControlPropertyRuntimeRules, PropertyRuntimeRules);
|
|
188
|
-
var _super =
|
|
188
|
+
var _super = _create_super(BaseControlPropertyRuntimeRules);
|
|
189
189
|
function BaseControlPropertyRuntimeRules(props) {
|
|
190
|
-
|
|
190
|
+
_class_call_check(this, BaseControlPropertyRuntimeRules);
|
|
191
191
|
var _this;
|
|
192
192
|
_this = _super.call(this, props);
|
|
193
193
|
_this.push({
|
|
@@ -201,67 +201,69 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
|
|
|
201
201
|
}
|
|
202
202
|
return BaseControlPropertyRuntimeRules;
|
|
203
203
|
}(PropertyRuntimeRules);
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
/**
|
|
205
|
+
* 表单控件公共属性
|
|
206
|
+
* @public
|
|
207
|
+
*/ var BaseControlProperty = /*#__PURE__*/ function(Property) {
|
|
206
208
|
"use strict";
|
|
207
209
|
_inherits(BaseControlProperty, Property);
|
|
208
|
-
var _super =
|
|
210
|
+
var _super = _create_super(BaseControlProperty);
|
|
209
211
|
function BaseControlProperty(props) {
|
|
210
|
-
|
|
212
|
+
_class_call_check(this, BaseControlProperty);
|
|
211
213
|
var _this;
|
|
212
214
|
_this = _super.call(this, props);
|
|
213
215
|
/**
|
|
214
216
|
* 标题
|
|
215
217
|
* @defaultValue ''
|
|
216
218
|
* @public
|
|
217
|
-
*/
|
|
219
|
+
*/ _define_property(_assert_this_initialized(_this), "caption", void 0);
|
|
218
220
|
/**
|
|
219
221
|
* 隐藏标题
|
|
220
222
|
* @defaultValue false
|
|
221
223
|
* @public
|
|
222
|
-
*/
|
|
224
|
+
*/ _define_property(_assert_this_initialized(_this), "isHideCaption", void 0);
|
|
223
225
|
/**
|
|
224
226
|
* 显示气泡提示
|
|
225
227
|
* @defaultValue false
|
|
226
228
|
* @public
|
|
227
|
-
*/
|
|
229
|
+
*/ _define_property(_assert_this_initialized(_this), "isShowCaptionTip", void 0);
|
|
228
230
|
/**
|
|
229
231
|
* 气泡提示语
|
|
230
232
|
* @defaultValue ''
|
|
231
233
|
* @public
|
|
232
|
-
*/
|
|
234
|
+
*/ _define_property(_assert_this_initialized(_this), "captionTip", void 0);
|
|
233
235
|
/**
|
|
234
236
|
* 标题布局
|
|
235
237
|
* @defaultValue ''
|
|
236
238
|
* @public
|
|
237
|
-
*/
|
|
239
|
+
*/ _define_property(_assert_this_initialized(_this), "labelPosition", void 0);
|
|
238
240
|
/**
|
|
239
241
|
* 绑定数据项
|
|
240
242
|
* @public
|
|
241
|
-
*/
|
|
243
|
+
*/ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
|
|
242
244
|
/**
|
|
243
245
|
* 默认值
|
|
244
246
|
* @public
|
|
245
|
-
*/
|
|
247
|
+
*/ _define_property(_assert_this_initialized(_this), "defaultValue", void 0);
|
|
246
248
|
/**
|
|
247
249
|
* 提示文字
|
|
248
250
|
* @defaultValue ''
|
|
249
251
|
* @public
|
|
250
|
-
*/
|
|
252
|
+
*/ _define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
251
253
|
/**
|
|
252
254
|
* 默认状态
|
|
253
255
|
* @defaultValue 'default'
|
|
254
256
|
* @public
|
|
255
|
-
*/
|
|
257
|
+
*/ _define_property(_assert_this_initialized(_this), "defaultState", void 0);
|
|
256
258
|
/**
|
|
257
259
|
* 必填
|
|
258
260
|
* @defaultValue false
|
|
259
261
|
* @public
|
|
260
|
-
*/
|
|
262
|
+
*/ _define_property(_assert_this_initialized(_this), "required", void 0);
|
|
261
263
|
/**
|
|
262
264
|
* 必填提示文案
|
|
263
265
|
* @defaultValue ''
|
|
264
|
-
*/
|
|
266
|
+
*/ _define_property(_assert_this_initialized(_this), "requiredMessage", void 0);
|
|
265
267
|
var _props_caption;
|
|
266
268
|
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
|
|
267
269
|
var _props_isHideCaption;
|
|
@@ -288,17 +290,17 @@ var BaseControlProperty = /*#__PURE__*/ function(Property) {
|
|
|
288
290
|
}
|
|
289
291
|
return BaseControlProperty;
|
|
290
292
|
}(Property);
|
|
291
|
-
|
|
292
|
-
|
|
293
|
+
_define_property(BaseControlProperty, "Rules", BaseControlPropertyRules);
|
|
294
|
+
_define_property(BaseControlProperty, "RuntimeRules", BaseControlPropertyRuntimeRules);
|
|
293
295
|
var OptionAndDataSourcePropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
|
|
294
296
|
"use strict";
|
|
295
297
|
_inherits(OptionAndDataSourcePropertyRules, BaseControlPropertyRules);
|
|
296
|
-
var _super =
|
|
298
|
+
var _super = _create_super(OptionAndDataSourcePropertyRules);
|
|
297
299
|
function OptionAndDataSourcePropertyRules(props) {
|
|
298
|
-
|
|
300
|
+
_class_call_check(this, OptionAndDataSourcePropertyRules);
|
|
299
301
|
var _this;
|
|
300
302
|
_this = _super.call(this, props);
|
|
301
|
-
|
|
303
|
+
_define_property(_assert_this_initialized(_this), "optionConfig", {
|
|
302
304
|
type: "enum",
|
|
303
305
|
enum: [
|
|
304
306
|
"custom",
|
|
@@ -306,19 +308,19 @@ var OptionAndDataSourcePropertyRules = /*#__PURE__*/ function(BaseControlPropert
|
|
|
306
308
|
],
|
|
307
309
|
message: RulesMessage.getMessage("PleaseSelectTheCorrectOptionSettings")
|
|
308
310
|
});
|
|
309
|
-
|
|
311
|
+
_define_property(_assert_this_initialized(_this), "options", [
|
|
310
312
|
{
|
|
311
313
|
type: "array",
|
|
312
314
|
message: RulesMessage.getMessage("isNotArray")
|
|
313
315
|
}
|
|
314
316
|
]);
|
|
315
|
-
|
|
317
|
+
_define_property(_assert_this_initialized(_this), "datasourceBind", [
|
|
316
318
|
{
|
|
317
319
|
type: "object",
|
|
318
320
|
message: RulesMessage.getMessage("isNotObject")
|
|
319
321
|
}
|
|
320
322
|
]);
|
|
321
|
-
initOptionAndDataSourceRules.call(
|
|
323
|
+
initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
|
|
322
324
|
return _this;
|
|
323
325
|
}
|
|
324
326
|
return OptionAndDataSourcePropertyRules;
|
|
@@ -1,15 +1,15 @@
|
|
|
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
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
13
|
if (key in obj) {
|
|
14
14
|
Object.defineProperty(obj, key, {
|
|
15
15
|
value: value,
|
|
@@ -22,11 +22,11 @@ function _defineProperty(obj, key, value) {
|
|
|
22
22
|
}
|
|
23
23
|
return obj;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
25
|
+
function _get_prototype_of(o) {
|
|
26
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
27
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return _get_prototype_of(o);
|
|
30
30
|
}
|
|
31
31
|
function _inherits(subClass, superClass) {
|
|
32
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -39,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
39
39
|
configurable: true
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
if (superClass)
|
|
42
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
if (call && (
|
|
44
|
+
function _possible_constructor_return(self, call) {
|
|
45
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
46
46
|
return call;
|
|
47
47
|
}
|
|
48
|
-
return
|
|
48
|
+
return _assert_this_initialized(self);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
50
|
+
function _set_prototype_of(o, p) {
|
|
51
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
52
52
|
o.__proto__ = p;
|
|
53
53
|
return o;
|
|
54
54
|
};
|
|
55
|
-
return
|
|
55
|
+
return _set_prototype_of(o, p);
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
function _type_of(obj) {
|
|
58
58
|
"@swc/helpers - typeof";
|
|
59
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
60
|
-
}
|
|
61
|
-
function
|
|
60
|
+
}
|
|
61
|
+
function _is_native_reflect_construct() {
|
|
62
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
63
63
|
if (Reflect.construct.sham) return false;
|
|
64
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -69,17 +69,17 @@ function _isNativeReflectConstruct() {
|
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
74
74
|
return function _createSuperInternal() {
|
|
75
|
-
var Super =
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
76
76
|
if (hasNativeReflectConstruct) {
|
|
77
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
78
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
79
79
|
} else {
|
|
80
80
|
result = Super.apply(this, arguments);
|
|
81
81
|
}
|
|
82
|
-
return
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
import { RuntimeControl } from "../BaseControl";
|
|
@@ -87,14 +87,14 @@ import BaseControlProperty from "./property";
|
|
|
87
87
|
var FormControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
88
88
|
"use strict";
|
|
89
89
|
_inherits(FormControl, RuntimeControl);
|
|
90
|
-
var _super =
|
|
90
|
+
var _super = _create_super(FormControl);
|
|
91
91
|
function FormControl(props) {
|
|
92
|
-
|
|
92
|
+
_class_call_check(this, FormControl);
|
|
93
93
|
var _this;
|
|
94
94
|
_this = _super.call(this, props);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
_define_property(_assert_this_initialized(_this), "controlType", "form");
|
|
96
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
97
|
+
_define_property(_assert_this_initialized(_this), "value", void 0);
|
|
98
98
|
_this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
99
99
|
return _this;
|
|
100
100
|
}
|