@byteluck-fe/model-driven-core 2.5.0-beta.9 → 2.5.3
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/api-doc-index.js +4 -4
- package/dist/esm/common/BaseControl/designer.js +241 -121
- package/dist/esm/common/BaseControl/index.js +7 -7
- package/dist/esm/common/BaseControl/property.js +77 -60
- package/dist/esm/common/BaseControl/runtime.js +45 -24
- package/dist/esm/common/ColumnControl/designer.js +41 -27
- package/dist/esm/common/ColumnControl/index.js +6 -6
- package/dist/esm/common/ColumnControl/property.js +122 -74
- package/dist/esm/common/ColumnControl/runtime.js +41 -27
- package/dist/esm/common/ControlArray.js +21 -21
- package/dist/esm/common/FormControl/designer.js +47 -32
- package/dist/esm/common/FormControl/index.js +6 -6
- package/dist/esm/common/FormControl/property.js +181 -116
- package/dist/esm/common/FormControl/runtime.js +42 -27
- package/dist/esm/common/LayoutControl/designer.js +205 -77
- package/dist/esm/common/LayoutControl/index.js +6 -6
- package/dist/esm/common/LayoutControl/property.js +25 -25
- package/dist/esm/common/LayoutControl/runtime.js +44 -29
- package/dist/esm/common/ListControl/designer.js +199 -74
- package/dist/esm/common/ListControl/index.js +6 -6
- package/dist/esm/common/ListControl/property.js +41 -27
- package/dist/esm/common/ListControl/runtime.js +47 -32
- package/dist/esm/common/SearchViewControl/designer.js +41 -27
- package/dist/esm/common/SearchViewControl/index.js +6 -6
- package/dist/esm/common/SearchViewControl/property.js +40 -26
- package/dist/esm/common/SearchViewControl/runtime.js +41 -27
- package/dist/esm/common/Validator.js +5 -5
- package/dist/esm/common/WrapControl/designer.js +41 -27
- package/dist/esm/common/WrapControl/index.js +6 -6
- package/dist/esm/common/WrapControl/property.js +25 -25
- package/dist/esm/common/WrapControl/runtime.js +41 -27
- package/dist/esm/common/controlHooksEmitter.js +1 -1
- package/dist/esm/common/index.js +12 -12
- package/dist/esm/common/initLinkOperationRules.js +6 -6
- package/dist/esm/common/initOptionAndDataSourceRules.js +82 -82
- package/dist/esm/framework/RegisterControls.js +31 -19
- package/dist/esm/framework/index.js +825 -405
- package/dist/esm/index.js +3 -3
- package/dist/index.umd.js +1 -1
- package/dist/types/common/Validator.d.ts +1 -1
- package/dist/types/common/controlHooksEmitter.d.ts +1 -1
- package/dist/types/framework/index.d.ts +2 -1
- package/dist/types/type.d.ts +23 -23
- 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,33 +39,33 @@ 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
44
|
function _instanceof(left, right) {
|
|
32
45
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
33
|
-
return right[Symbol.hasInstance](left);
|
|
46
|
+
return !!right[Symbol.hasInstance](left);
|
|
34
47
|
} else {
|
|
35
48
|
return left instanceof right;
|
|
36
49
|
}
|
|
37
50
|
}
|
|
38
|
-
function
|
|
39
|
-
if (call && (
|
|
51
|
+
function _possible_constructor_return(self, call) {
|
|
52
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
40
53
|
return call;
|
|
41
54
|
}
|
|
42
|
-
return
|
|
55
|
+
return _assert_this_initialized(self);
|
|
43
56
|
}
|
|
44
|
-
function
|
|
45
|
-
|
|
57
|
+
function _set_prototype_of(o, p) {
|
|
58
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
46
59
|
o.__proto__ = p;
|
|
47
60
|
return o;
|
|
48
61
|
};
|
|
49
|
-
return
|
|
62
|
+
return _set_prototype_of(o, p);
|
|
50
63
|
}
|
|
51
|
-
|
|
64
|
+
function _type_of(obj) {
|
|
52
65
|
"@swc/helpers - typeof";
|
|
53
66
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
54
|
-
}
|
|
55
|
-
function
|
|
67
|
+
}
|
|
68
|
+
function _is_native_reflect_construct() {
|
|
56
69
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
57
70
|
if (Reflect.construct.sham) return false;
|
|
58
71
|
if (typeof Proxy === "function") return true;
|
|
@@ -63,101 +76,101 @@ function _isNativeReflectConstruct() {
|
|
|
63
76
|
return false;
|
|
64
77
|
}
|
|
65
78
|
}
|
|
66
|
-
function
|
|
67
|
-
var hasNativeReflectConstruct =
|
|
79
|
+
function _create_super(Derived) {
|
|
80
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
68
81
|
return function _createSuperInternal() {
|
|
69
|
-
var Super =
|
|
82
|
+
var Super = _get_prototype_of(Derived), result;
|
|
70
83
|
if (hasNativeReflectConstruct) {
|
|
71
|
-
var NewTarget =
|
|
84
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
72
85
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
73
86
|
} else {
|
|
74
87
|
result = Super.apply(this, arguments);
|
|
75
88
|
}
|
|
76
|
-
return
|
|
89
|
+
return _possible_constructor_return(this, result);
|
|
77
90
|
};
|
|
78
91
|
}
|
|
79
|
-
import { RulesMessage, JSONCopy } from
|
|
80
|
-
import { Property, PropertyRules, PropertyRuntimeRules } from
|
|
81
|
-
import { initOptionAndDataSourceRules } from
|
|
82
|
-
import { DataBind } from
|
|
83
|
-
var BaseControlPropertyRules = /*#__PURE__*/ function(
|
|
92
|
+
import { RulesMessage, JSONCopy } from "@byteluck-fe/model-driven-shared";
|
|
93
|
+
import { Property, PropertyRules, PropertyRuntimeRules } from "../BaseControl";
|
|
94
|
+
import { initOptionAndDataSourceRules } from "../initOptionAndDataSourceRules";
|
|
95
|
+
import { DataBind } from "../../framework";
|
|
96
|
+
var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
84
97
|
"use strict";
|
|
85
|
-
_inherits(BaseControlPropertyRules,
|
|
86
|
-
var _super =
|
|
98
|
+
_inherits(BaseControlPropertyRules, PropertyRules);
|
|
99
|
+
var _super = _create_super(BaseControlPropertyRules);
|
|
87
100
|
function BaseControlPropertyRules(props) {
|
|
88
|
-
|
|
101
|
+
_class_call_check(this, BaseControlPropertyRules);
|
|
89
102
|
var _this;
|
|
90
103
|
_this = _super.call(this, props);
|
|
91
|
-
_this
|
|
92
|
-
_this
|
|
93
|
-
type:
|
|
104
|
+
_define_property(_assert_this_initialized(_this), "dataBind", {});
|
|
105
|
+
_define_property(_assert_this_initialized(_this), "caption", {
|
|
106
|
+
type: "string",
|
|
94
107
|
required: true,
|
|
95
|
-
message: RulesMessage.getMessage(
|
|
96
|
-
};
|
|
97
|
-
_this
|
|
98
|
-
type:
|
|
99
|
-
};
|
|
100
|
-
_this
|
|
101
|
-
type:
|
|
108
|
+
message: RulesMessage.getMessage("pleaseEnterCaption")
|
|
109
|
+
});
|
|
110
|
+
_define_property(_assert_this_initialized(_this), "isHideCaption", {
|
|
111
|
+
type: "boolean"
|
|
112
|
+
});
|
|
113
|
+
_define_property(_assert_this_initialized(_this), "labelPosition", {
|
|
114
|
+
type: "enum",
|
|
102
115
|
enum: [
|
|
103
|
-
|
|
104
|
-
|
|
116
|
+
"top",
|
|
117
|
+
"left"
|
|
105
118
|
]
|
|
106
|
-
};
|
|
119
|
+
});
|
|
107
120
|
// 去掉placeholder必填校验
|
|
108
121
|
// public placeholder: RuleItem = {
|
|
109
122
|
// required: true,
|
|
110
123
|
// type: 'string',
|
|
111
124
|
// message: RulesMessage.getMessage('pleaseEnterPlaceholder'),
|
|
112
125
|
// }
|
|
113
|
-
_this
|
|
114
|
-
type:
|
|
126
|
+
_define_property(_assert_this_initialized(_this), "defaultState", {
|
|
127
|
+
type: "enum",
|
|
115
128
|
enum: [
|
|
116
|
-
|
|
117
|
-
|
|
129
|
+
"default",
|
|
130
|
+
"readonly"
|
|
118
131
|
]
|
|
119
|
-
};
|
|
120
|
-
_this
|
|
121
|
-
type:
|
|
122
|
-
};
|
|
123
|
-
_this
|
|
124
|
-
type:
|
|
132
|
+
});
|
|
133
|
+
_define_property(_assert_this_initialized(_this), "required", {
|
|
134
|
+
type: "boolean"
|
|
135
|
+
});
|
|
136
|
+
_define_property(_assert_this_initialized(_this), "captionTip", {
|
|
137
|
+
type: "string",
|
|
125
138
|
required: false,
|
|
126
|
-
message: RulesMessage.getMessage(
|
|
127
|
-
};
|
|
139
|
+
message: RulesMessage.getMessage("pleaseEnterCaptionTip")
|
|
140
|
+
});
|
|
128
141
|
// 初始化dataBind的校验规则
|
|
129
142
|
var validateFields = {
|
|
130
143
|
fieldCode: {
|
|
131
|
-
type:
|
|
144
|
+
type: "string",
|
|
132
145
|
required: true,
|
|
133
|
-
message: RulesMessage.getMessage(
|
|
146
|
+
message: RulesMessage.getMessage("pleaseEnterFieldCode")
|
|
134
147
|
},
|
|
135
148
|
dataCode: {
|
|
136
|
-
type:
|
|
149
|
+
type: "string",
|
|
137
150
|
required: true,
|
|
138
|
-
message: RulesMessage.getMessage(
|
|
151
|
+
message: RulesMessage.getMessage("pleaseEnterFieldCode")
|
|
139
152
|
}
|
|
140
153
|
};
|
|
141
154
|
if (_instanceof(props.dataBind, DataBind)) {
|
|
142
155
|
_this.dataBind = {
|
|
143
|
-
type:
|
|
156
|
+
type: "object",
|
|
144
157
|
required: true,
|
|
145
158
|
fields: JSONCopy(validateFields),
|
|
146
|
-
message: RulesMessage.getMessage(
|
|
159
|
+
message: RulesMessage.getMessage("pleaseEnterFieldCode")
|
|
147
160
|
};
|
|
148
161
|
} else {
|
|
149
162
|
var dataBind = {
|
|
150
|
-
type:
|
|
163
|
+
type: "object",
|
|
151
164
|
required: true,
|
|
152
165
|
fields: {},
|
|
153
|
-
message: RulesMessage.getMessage(
|
|
166
|
+
message: RulesMessage.getMessage("pleaseEnterFieldCode")
|
|
154
167
|
};
|
|
155
168
|
Object.keys(props.dataBind).forEach(function(key) {
|
|
156
169
|
dataBind.fields[key] = {
|
|
157
|
-
type:
|
|
170
|
+
type: "object",
|
|
158
171
|
required: true,
|
|
159
172
|
fields: JSONCopy(validateFields),
|
|
160
|
-
message: RulesMessage.getMessage(
|
|
173
|
+
message: RulesMessage.getMessage("pleaseEnterFieldCode")
|
|
161
174
|
};
|
|
162
175
|
});
|
|
163
176
|
_this.dataBind = dataBind;
|
|
@@ -169,18 +182,18 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules1) {
|
|
|
169
182
|
}
|
|
170
183
|
return BaseControlPropertyRules;
|
|
171
184
|
}(PropertyRules);
|
|
172
|
-
var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(
|
|
185
|
+
var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRules) {
|
|
173
186
|
"use strict";
|
|
174
|
-
_inherits(BaseControlPropertyRuntimeRules,
|
|
175
|
-
var _super =
|
|
187
|
+
_inherits(BaseControlPropertyRuntimeRules, PropertyRuntimeRules);
|
|
188
|
+
var _super = _create_super(BaseControlPropertyRuntimeRules);
|
|
176
189
|
function BaseControlPropertyRuntimeRules(props) {
|
|
177
|
-
|
|
190
|
+
_class_call_check(this, BaseControlPropertyRuntimeRules);
|
|
178
191
|
var _this;
|
|
179
192
|
_this = _super.call(this, props);
|
|
180
193
|
_this.push({
|
|
181
|
-
type:
|
|
194
|
+
type: "string",
|
|
182
195
|
required: props.isHide ? false : props.required,
|
|
183
|
-
message: props.requiredMessage !==
|
|
196
|
+
message: props.requiredMessage !== "" ? props.requiredMessage : RulesMessage.getMessage("runtimeRequired", {
|
|
184
197
|
caption: props.caption
|
|
185
198
|
})
|
|
186
199
|
});
|
|
@@ -188,74 +201,126 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
|
|
|
188
201
|
}
|
|
189
202
|
return BaseControlPropertyRuntimeRules;
|
|
190
203
|
}(PropertyRuntimeRules);
|
|
191
|
-
|
|
204
|
+
/**
|
|
192
205
|
* 表单控件公共属性
|
|
193
206
|
* @public
|
|
194
|
-
*/ /*#__PURE__*/ function(
|
|
207
|
+
*/ var BaseControlProperty = /*#__PURE__*/ function(Property) {
|
|
195
208
|
"use strict";
|
|
196
|
-
_inherits(BaseControlProperty,
|
|
197
|
-
var _super =
|
|
209
|
+
_inherits(BaseControlProperty, Property);
|
|
210
|
+
var _super = _create_super(BaseControlProperty);
|
|
198
211
|
function BaseControlProperty(props) {
|
|
199
|
-
|
|
212
|
+
_class_call_check(this, BaseControlProperty);
|
|
200
213
|
var _this;
|
|
201
214
|
_this = _super.call(this, props);
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
215
|
+
/**
|
|
216
|
+
* 标题
|
|
217
|
+
* @defaultValue ''
|
|
218
|
+
* @public
|
|
219
|
+
*/ _define_property(_assert_this_initialized(_this), "caption", void 0);
|
|
220
|
+
/**
|
|
221
|
+
* 隐藏标题
|
|
222
|
+
* @defaultValue false
|
|
223
|
+
* @public
|
|
224
|
+
*/ _define_property(_assert_this_initialized(_this), "isHideCaption", void 0);
|
|
225
|
+
/**
|
|
226
|
+
* 显示气泡提示
|
|
227
|
+
* @defaultValue false
|
|
228
|
+
* @public
|
|
229
|
+
*/ _define_property(_assert_this_initialized(_this), "isShowCaptionTip", void 0);
|
|
230
|
+
/**
|
|
231
|
+
* 气泡提示语
|
|
232
|
+
* @defaultValue ''
|
|
233
|
+
* @public
|
|
234
|
+
*/ _define_property(_assert_this_initialized(_this), "captionTip", void 0);
|
|
235
|
+
/**
|
|
236
|
+
* 标题布局
|
|
237
|
+
* @defaultValue ''
|
|
238
|
+
* @public
|
|
239
|
+
*/ _define_property(_assert_this_initialized(_this), "labelPosition", void 0);
|
|
240
|
+
/**
|
|
241
|
+
* 绑定数据项
|
|
242
|
+
* @public
|
|
243
|
+
*/ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
|
|
244
|
+
/**
|
|
245
|
+
* 默认值
|
|
246
|
+
* @public
|
|
247
|
+
*/ _define_property(_assert_this_initialized(_this), "defaultValue", void 0);
|
|
248
|
+
/**
|
|
249
|
+
* 提示文字
|
|
250
|
+
* @defaultValue ''
|
|
251
|
+
* @public
|
|
252
|
+
*/ _define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
253
|
+
/**
|
|
254
|
+
* 默认状态
|
|
255
|
+
* @defaultValue 'default'
|
|
256
|
+
* @public
|
|
257
|
+
*/ _define_property(_assert_this_initialized(_this), "defaultState", void 0);
|
|
258
|
+
/**
|
|
259
|
+
* 必填
|
|
260
|
+
* @defaultValue false
|
|
261
|
+
* @public
|
|
262
|
+
*/ _define_property(_assert_this_initialized(_this), "required", void 0);
|
|
263
|
+
/**
|
|
264
|
+
* 必填提示文案
|
|
265
|
+
* @defaultValue ''
|
|
266
|
+
*/ _define_property(_assert_this_initialized(_this), "requiredMessage", void 0);
|
|
267
|
+
var _props_caption;
|
|
268
|
+
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : "";
|
|
269
|
+
var _props_isHideCaption;
|
|
270
|
+
_this.isHideCaption = (_props_isHideCaption = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _props_isHideCaption !== void 0 ? _props_isHideCaption : false;
|
|
271
|
+
var _props_isShowCaptionTip;
|
|
272
|
+
_this.isShowCaptionTip = (_props_isShowCaptionTip = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _props_isShowCaptionTip !== void 0 ? _props_isShowCaptionTip : false;
|
|
273
|
+
var _props_captionTip;
|
|
274
|
+
_this.captionTip = (_props_captionTip = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip : "";
|
|
275
|
+
var _props_defaultState;
|
|
276
|
+
_this.defaultState = (_props_defaultState = props === null || props === void 0 ? void 0 : props.defaultState) !== null && _props_defaultState !== void 0 ? _props_defaultState : "default";
|
|
277
|
+
var _props_labelPosition;
|
|
278
|
+
_this.labelPosition = (_props_labelPosition = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : "top";
|
|
279
|
+
var _props_placeholder;
|
|
280
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : "";
|
|
281
|
+
var _props_required;
|
|
282
|
+
_this.required = (_props_required = props === null || props === void 0 ? void 0 : props.required) !== null && _props_required !== void 0 ? _props_required : false;
|
|
283
|
+
var _props_requiredMessage;
|
|
284
|
+
_this.requiredMessage = (_props_requiredMessage = props === null || props === void 0 ? void 0 : props.requiredMessage) !== null && _props_requiredMessage !== void 0 ? _props_requiredMessage : "";
|
|
220
285
|
//form 组件优先初始化DataBind
|
|
221
286
|
_this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
|
|
222
|
-
var
|
|
223
|
-
_this.defaultValue = (
|
|
287
|
+
var _props_defaultValue;
|
|
288
|
+
_this.defaultValue = (_props_defaultValue = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "";
|
|
224
289
|
return _this;
|
|
225
290
|
}
|
|
226
291
|
return BaseControlProperty;
|
|
227
292
|
}(Property);
|
|
228
|
-
BaseControlProperty
|
|
229
|
-
BaseControlProperty
|
|
293
|
+
_define_property(BaseControlProperty, "Rules", BaseControlPropertyRules);
|
|
294
|
+
_define_property(BaseControlProperty, "RuntimeRules", BaseControlPropertyRuntimeRules);
|
|
230
295
|
var OptionAndDataSourcePropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
|
|
231
296
|
"use strict";
|
|
232
297
|
_inherits(OptionAndDataSourcePropertyRules, BaseControlPropertyRules);
|
|
233
|
-
var _super =
|
|
298
|
+
var _super = _create_super(OptionAndDataSourcePropertyRules);
|
|
234
299
|
function OptionAndDataSourcePropertyRules(props) {
|
|
235
|
-
|
|
300
|
+
_class_call_check(this, OptionAndDataSourcePropertyRules);
|
|
236
301
|
var _this;
|
|
237
302
|
_this = _super.call(this, props);
|
|
238
|
-
_this
|
|
239
|
-
type:
|
|
303
|
+
_define_property(_assert_this_initialized(_this), "optionConfig", {
|
|
304
|
+
type: "enum",
|
|
240
305
|
enum: [
|
|
241
|
-
|
|
242
|
-
|
|
306
|
+
"custom",
|
|
307
|
+
"datasource"
|
|
243
308
|
],
|
|
244
|
-
message: RulesMessage.getMessage(
|
|
245
|
-
};
|
|
246
|
-
_this
|
|
309
|
+
message: RulesMessage.getMessage("PleaseSelectTheCorrectOptionSettings")
|
|
310
|
+
});
|
|
311
|
+
_define_property(_assert_this_initialized(_this), "options", [
|
|
247
312
|
{
|
|
248
|
-
type:
|
|
249
|
-
message: RulesMessage.getMessage(
|
|
250
|
-
}
|
|
251
|
-
];
|
|
252
|
-
_this
|
|
313
|
+
type: "array",
|
|
314
|
+
message: RulesMessage.getMessage("isNotArray")
|
|
315
|
+
}
|
|
316
|
+
]);
|
|
317
|
+
_define_property(_assert_this_initialized(_this), "datasourceBind", [
|
|
253
318
|
{
|
|
254
|
-
type:
|
|
255
|
-
message: RulesMessage.getMessage(
|
|
256
|
-
}
|
|
257
|
-
];
|
|
258
|
-
initOptionAndDataSourceRules.call(
|
|
319
|
+
type: "object",
|
|
320
|
+
message: RulesMessage.getMessage("isNotObject")
|
|
321
|
+
}
|
|
322
|
+
]);
|
|
323
|
+
initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
|
|
259
324
|
return _this;
|
|
260
325
|
}
|
|
261
326
|
return OptionAndDataSourcePropertyRules;
|
|
@@ -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,30 +69,32 @@ 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
|
-
import { RuntimeControl } from
|
|
73
|
-
import BaseControlProperty from
|
|
74
|
-
var FormControl = /*#__PURE__*/ function(
|
|
85
|
+
import { RuntimeControl } from "../BaseControl";
|
|
86
|
+
import BaseControlProperty from "./property";
|
|
87
|
+
var FormControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
75
88
|
"use strict";
|
|
76
|
-
_inherits(FormControl,
|
|
77
|
-
var _super =
|
|
89
|
+
_inherits(FormControl, RuntimeControl);
|
|
90
|
+
var _super = _create_super(FormControl);
|
|
78
91
|
function FormControl(props) {
|
|
79
|
-
|
|
92
|
+
_class_call_check(this, FormControl);
|
|
80
93
|
var _this;
|
|
81
94
|
_this = _super.call(this, props);
|
|
82
|
-
_this
|
|
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);
|
|
83
98
|
_this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
84
99
|
return _this;
|
|
85
100
|
}
|