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