@byteluck-fe/model-driven-core 2.23.0-beta.12 → 2.23.0-beta.14
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/README.md +69 -69
- package/dist/esm/common/BaseControl/designer.js +11 -11
- package/dist/esm/common/BaseControl/property.js +38 -25
- package/dist/esm/common/ColumnControl/designer.js +27 -13
- package/dist/esm/common/ColumnControl/property.js +75 -50
- package/dist/esm/common/ColumnControl/runtime.js +27 -13
- package/dist/esm/common/FormControl/designer.js +25 -12
- package/dist/esm/common/FormControl/property.js +103 -75
- package/dist/esm/common/FormControl/runtime.js +26 -12
- package/dist/esm/common/LayoutControl/designer.js +29 -13
- package/dist/esm/common/LayoutControl/property.js +23 -12
- package/dist/esm/common/LayoutControl/runtime.js +27 -13
- package/dist/esm/common/ListControl/designer.js +26 -13
- package/dist/esm/common/ListControl/property.js +31 -14
- package/dist/esm/common/ListControl/runtime.js +28 -14
- package/dist/esm/common/SearchViewControl/designer.js +25 -12
- package/dist/esm/common/SearchViewControl/property.js +24 -12
- package/dist/esm/common/SearchViewControl/runtime.js +25 -12
- package/dist/esm/common/WrapControl/designer.js +25 -12
- package/dist/esm/common/WrapControl/property.js +23 -12
- package/dist/esm/common/WrapControl/runtime.js +25 -12
- package/dist/esm/framework/RegisterControls.js +0 -1
- package/dist/esm/framework/index.js +437 -404
- package/dist/index.umd.js +1 -1
- package/dist/types/api-doc-index.d.ts +4 -4
- package/dist/types/common/BaseControl/designer.d.ts +71 -71
- package/dist/types/common/BaseControl/index.d.ts +13 -13
- package/dist/types/common/BaseControl/property.d.ts +44 -44
- package/dist/types/common/BaseControl/runtime.d.ts +23 -23
- package/dist/types/common/BaseControl/types.d.ts +35 -35
- package/dist/types/common/ColumnControl/designer.d.ts +20 -20
- package/dist/types/common/ColumnControl/index.d.ts +12 -12
- package/dist/types/common/ColumnControl/property.d.ts +74 -74
- package/dist/types/common/ColumnControl/runtime.d.ts +11 -11
- package/dist/types/common/ControlArray.d.ts +9 -9
- package/dist/types/common/FormControl/designer.d.ts +13 -13
- package/dist/types/common/FormControl/index.d.ts +12 -12
- package/dist/types/common/FormControl/property.d.ts +100 -100
- package/dist/types/common/FormControl/runtime.d.ts +11 -11
- package/dist/types/common/LayoutControl/designer.d.ts +21 -21
- package/dist/types/common/LayoutControl/index.d.ts +12 -12
- package/dist/types/common/LayoutControl/property.d.ts +6 -6
- package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
- package/dist/types/common/ListControl/designer.d.ts +16 -16
- package/dist/types/common/ListControl/index.d.ts +12 -12
- package/dist/types/common/ListControl/property.d.ts +18 -18
- package/dist/types/common/ListControl/runtime.d.ts +12 -12
- package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
- package/dist/types/common/SearchViewControl/index.d.ts +12 -12
- package/dist/types/common/SearchViewControl/property.d.ts +8 -8
- package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
- package/dist/types/common/Validator.d.ts +15 -15
- package/dist/types/common/WrapControl/designer.d.ts +11 -11
- package/dist/types/common/WrapControl/index.d.ts +12 -12
- package/dist/types/common/WrapControl/property.d.ts +6 -6
- package/dist/types/common/WrapControl/runtime.d.ts +11 -11
- package/dist/types/common/controlHooksEmitter.d.ts +4 -4
- package/dist/types/common/index.d.ts +12 -12
- package/dist/types/common/initLinkOperationRules.d.ts +6 -6
- package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
- package/dist/types/framework/RegisterControls.d.ts +37 -37
- package/dist/types/framework/index.d.ts +925 -923
- package/dist/types/framework/isDataBind.d.ts +2 -2
- package/dist/types/index.d.ts +4 -4
- package/dist/types/type.d.ts +91 -91
- package/package.json +3 -3
|
@@ -4,10 +4,6 @@ function _assert_this_initialized(self) {
|
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function _call_super(_this, derived, args) {
|
|
8
|
-
derived = _get_prototype_of(derived);
|
|
9
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
-
}
|
|
11
7
|
function _class_call_check(instance, Constructor) {
|
|
12
8
|
if (!(instance instanceof Constructor)) {
|
|
13
9
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -63,12 +59,28 @@ function _type_of(obj) {
|
|
|
63
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
64
60
|
}
|
|
65
61
|
function _is_native_reflect_construct() {
|
|
62
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
63
|
+
if (Reflect.construct.sham) return false;
|
|
64
|
+
if (typeof Proxy === "function") return true;
|
|
66
65
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return
|
|
71
|
-
}
|
|
66
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
67
|
+
return true;
|
|
68
|
+
} catch (e) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
74
|
+
return function _createSuperInternal() {
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
76
|
+
if (hasNativeReflectConstruct) {
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
78
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
79
|
+
} else {
|
|
80
|
+
result = Super.apply(this, arguments);
|
|
81
|
+
}
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
83
|
+
};
|
|
72
84
|
}
|
|
73
85
|
import { JSONCopy } from '@byteluck-fe/model-driven-shared';
|
|
74
86
|
import { Property, PropertyRules, PropertyRuntimeRules } from '../BaseControl';
|
|
@@ -79,38 +91,44 @@ import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
|
79
91
|
var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
80
92
|
"use strict";
|
|
81
93
|
_inherits(BaseControlPropertyRules, PropertyRules);
|
|
94
|
+
var _super = _create_super(BaseControlPropertyRules);
|
|
82
95
|
function BaseControlPropertyRules(props) {
|
|
83
96
|
_class_call_check(this, BaseControlPropertyRules);
|
|
84
97
|
var _this;
|
|
85
|
-
_this =
|
|
86
|
-
|
|
87
|
-
|
|
98
|
+
_this = _super.call(this, props);
|
|
99
|
+
_define_property(_assert_this_initialized(_this), "dataBind", {});
|
|
100
|
+
_define_property(_assert_this_initialized(_this), "caption", {
|
|
88
101
|
type: 'string',
|
|
89
102
|
required: true,
|
|
90
103
|
message: getLocaleText('CMD.pleaseEnterCaption', null, '请输入标题')
|
|
91
|
-
})
|
|
104
|
+
});
|
|
105
|
+
_define_property(_assert_this_initialized(_this), "isHideCaption", {
|
|
92
106
|
type: 'boolean'
|
|
93
|
-
})
|
|
107
|
+
});
|
|
108
|
+
_define_property(_assert_this_initialized(_this), "labelPosition", {
|
|
94
109
|
type: 'enum',
|
|
95
110
|
enum: [
|
|
96
111
|
'top',
|
|
97
112
|
'left'
|
|
98
113
|
]
|
|
99
|
-
})
|
|
114
|
+
});
|
|
115
|
+
// 去掉placeholder必填校验
|
|
100
116
|
// public placeholder: RuleItem = {
|
|
101
117
|
// required: true,
|
|
102
118
|
// type: 'string',
|
|
103
119
|
// message: getLocaleText('CMD.pleaseEnterPlaceholder',null,'请输入提示文字'),
|
|
104
120
|
// }
|
|
105
|
-
_define_property(_this, "defaultState", {
|
|
121
|
+
_define_property(_assert_this_initialized(_this), "defaultState", {
|
|
106
122
|
type: 'enum',
|
|
107
123
|
enum: [
|
|
108
124
|
'default',
|
|
109
125
|
'readonly'
|
|
110
126
|
]
|
|
111
|
-
})
|
|
127
|
+
});
|
|
128
|
+
_define_property(_assert_this_initialized(_this), "required", {
|
|
112
129
|
type: 'boolean'
|
|
113
|
-
})
|
|
130
|
+
});
|
|
131
|
+
_define_property(_assert_this_initialized(_this), "captionTip", {
|
|
114
132
|
type: 'string',
|
|
115
133
|
required: false,
|
|
116
134
|
message: getLocaleText('CMD.pleaseEnterCaptionTip', null, '请输入气泡提示语')
|
|
@@ -144,7 +162,6 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
144
162
|
message: getLocaleText('CMD.pleaseEnterFieldCode', null, '请绑定数据项')
|
|
145
163
|
};
|
|
146
164
|
Object.keys(props.dataBind).forEach(function(key) {
|
|
147
|
-
;
|
|
148
165
|
dataBind.fields[key] = {
|
|
149
166
|
type: 'object',
|
|
150
167
|
required: true,
|
|
@@ -164,12 +181,11 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
164
181
|
var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRules) {
|
|
165
182
|
"use strict";
|
|
166
183
|
_inherits(BaseControlPropertyRuntimeRules, PropertyRuntimeRules);
|
|
184
|
+
var _super = _create_super(BaseControlPropertyRuntimeRules);
|
|
167
185
|
function BaseControlPropertyRuntimeRules(props) {
|
|
168
186
|
_class_call_check(this, BaseControlPropertyRuntimeRules);
|
|
169
187
|
var _this;
|
|
170
|
-
_this =
|
|
171
|
-
props
|
|
172
|
-
]);
|
|
188
|
+
_this = _super.call(this, props);
|
|
173
189
|
var isRequired = props.isHide ? false : props.required;
|
|
174
190
|
if (isRequired) {
|
|
175
191
|
_this.push({
|
|
@@ -184,59 +200,69 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
|
|
|
184
200
|
}
|
|
185
201
|
return BaseControlPropertyRuntimeRules;
|
|
186
202
|
}(PropertyRuntimeRules);
|
|
187
|
-
/**
|
|
188
|
-
* 表单控件公共属性
|
|
189
|
-
* @public
|
|
203
|
+
/**
|
|
204
|
+
* 表单控件公共属性
|
|
205
|
+
* @public
|
|
190
206
|
*/ var BaseControlProperty = /*#__PURE__*/ function(Property) {
|
|
191
207
|
"use strict";
|
|
192
208
|
_inherits(BaseControlProperty, Property);
|
|
209
|
+
var _super = _create_super(BaseControlProperty);
|
|
193
210
|
function BaseControlProperty(props) {
|
|
194
211
|
_class_call_check(this, BaseControlProperty);
|
|
195
212
|
var _this;
|
|
196
|
-
_this =
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
*
|
|
200
|
-
* @
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
* 隐藏标题
|
|
204
|
-
* @defaultValue false
|
|
205
|
-
* @public
|
|
206
|
-
*/ _define_property(_this, "isHideCaption", void 0)
|
|
207
|
-
|
|
208
|
-
*
|
|
209
|
-
* @
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
*
|
|
214
|
-
|
|
215
|
-
*
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
*
|
|
220
|
-
* @public
|
|
221
|
-
*/ _define_property(_this, "
|
|
222
|
-
|
|
223
|
-
*
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
*
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
*
|
|
232
|
-
|
|
233
|
-
*
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
*
|
|
238
|
-
* @
|
|
239
|
-
*/ _define_property(_this, "
|
|
213
|
+
_this = _super.call(this, props);
|
|
214
|
+
/**
|
|
215
|
+
* 标题
|
|
216
|
+
* @defaultValue ''
|
|
217
|
+
* @public
|
|
218
|
+
*/ _define_property(_assert_this_initialized(_this), "caption", void 0);
|
|
219
|
+
/**
|
|
220
|
+
* 隐藏标题
|
|
221
|
+
* @defaultValue false
|
|
222
|
+
* @public
|
|
223
|
+
*/ _define_property(_assert_this_initialized(_this), "isHideCaption", void 0);
|
|
224
|
+
/**
|
|
225
|
+
* 显示气泡提示
|
|
226
|
+
* @defaultValue false
|
|
227
|
+
* @public
|
|
228
|
+
*/ _define_property(_assert_this_initialized(_this), "isShowCaptionTip", void 0);
|
|
229
|
+
/**
|
|
230
|
+
* 气泡提示语
|
|
231
|
+
* @defaultValue ''
|
|
232
|
+
* @public
|
|
233
|
+
*/ _define_property(_assert_this_initialized(_this), "captionTip", void 0);
|
|
234
|
+
/**
|
|
235
|
+
* 标题布局
|
|
236
|
+
* @defaultValue ''
|
|
237
|
+
* @public
|
|
238
|
+
*/ _define_property(_assert_this_initialized(_this), "labelPosition", void 0);
|
|
239
|
+
/**
|
|
240
|
+
* 绑定数据项
|
|
241
|
+
* @public
|
|
242
|
+
*/ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
|
|
243
|
+
/**
|
|
244
|
+
* 默认值
|
|
245
|
+
* @public
|
|
246
|
+
*/ _define_property(_assert_this_initialized(_this), "defaultValue", void 0);
|
|
247
|
+
/**
|
|
248
|
+
* 提示文字
|
|
249
|
+
* @defaultValue ''
|
|
250
|
+
* @public
|
|
251
|
+
*/ _define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
252
|
+
/**
|
|
253
|
+
* 默认状态
|
|
254
|
+
* @defaultValue 'default'
|
|
255
|
+
* @public
|
|
256
|
+
*/ _define_property(_assert_this_initialized(_this), "defaultState", void 0);
|
|
257
|
+
/**
|
|
258
|
+
* 必填
|
|
259
|
+
* @defaultValue false
|
|
260
|
+
* @public
|
|
261
|
+
*/ _define_property(_assert_this_initialized(_this), "required", void 0);
|
|
262
|
+
/**
|
|
263
|
+
* 必填提示文案
|
|
264
|
+
* @defaultValue ''
|
|
265
|
+
*/ _define_property(_assert_this_initialized(_this), "requiredMessage", void 0);
|
|
240
266
|
var _props_caption;
|
|
241
267
|
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : '';
|
|
242
268
|
var _props_isHideCaption;
|
|
@@ -268,30 +294,32 @@ _define_property(BaseControlProperty, "RuntimeRules", BaseControlPropertyRuntime
|
|
|
268
294
|
var OptionAndDataSourcePropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
|
|
269
295
|
"use strict";
|
|
270
296
|
_inherits(OptionAndDataSourcePropertyRules, BaseControlPropertyRules);
|
|
297
|
+
var _super = _create_super(OptionAndDataSourcePropertyRules);
|
|
271
298
|
function OptionAndDataSourcePropertyRules(props) {
|
|
272
299
|
_class_call_check(this, OptionAndDataSourcePropertyRules);
|
|
273
300
|
var _this;
|
|
274
|
-
_this =
|
|
275
|
-
|
|
276
|
-
]), _define_property(_this, "optionConfig", {
|
|
301
|
+
_this = _super.call(this, props);
|
|
302
|
+
_define_property(_assert_this_initialized(_this), "optionConfig", {
|
|
277
303
|
type: 'enum',
|
|
278
304
|
enum: [
|
|
279
305
|
'custom',
|
|
280
306
|
'datasource'
|
|
281
307
|
],
|
|
282
308
|
message: getLocaleText('CMD.PleaseSelectTheCorrectOptionSettings', null, '请选择正确的选项设置')
|
|
283
|
-
})
|
|
309
|
+
});
|
|
310
|
+
_define_property(_assert_this_initialized(_this), "options", [
|
|
284
311
|
{
|
|
285
312
|
type: 'array',
|
|
286
313
|
message: getLocaleText('CMD.isNotArray', null, '请输入一个数组')
|
|
287
314
|
}
|
|
288
|
-
])
|
|
315
|
+
]);
|
|
316
|
+
_define_property(_assert_this_initialized(_this), "datasourceBind", [
|
|
289
317
|
{
|
|
290
318
|
type: 'object',
|
|
291
319
|
message: getLocaleText('CMD.isNotObject', null, '请输入一个对象')
|
|
292
320
|
}
|
|
293
321
|
]);
|
|
294
|
-
initOptionAndDataSourceRules.call(_this, props);
|
|
322
|
+
initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
|
|
295
323
|
return _this;
|
|
296
324
|
}
|
|
297
325
|
return OptionAndDataSourcePropertyRules;
|
|
@@ -4,10 +4,6 @@ function _assert_this_initialized(self) {
|
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function _call_super(_this, derived, args) {
|
|
8
|
-
derived = _get_prototype_of(derived);
|
|
9
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
-
}
|
|
11
7
|
function _class_call_check(instance, Constructor) {
|
|
12
8
|
if (!(instance instanceof Constructor)) {
|
|
13
9
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -63,24 +59,42 @@ function _type_of(obj) {
|
|
|
63
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
64
60
|
}
|
|
65
61
|
function _is_native_reflect_construct() {
|
|
62
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
63
|
+
if (Reflect.construct.sham) return false;
|
|
64
|
+
if (typeof Proxy === "function") return true;
|
|
66
65
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return
|
|
71
|
-
}
|
|
66
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
67
|
+
return true;
|
|
68
|
+
} catch (e) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
74
|
+
return function _createSuperInternal() {
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
76
|
+
if (hasNativeReflectConstruct) {
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
78
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
79
|
+
} else {
|
|
80
|
+
result = Super.apply(this, arguments);
|
|
81
|
+
}
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
83
|
+
};
|
|
72
84
|
}
|
|
73
85
|
import { RuntimeControl } from '../BaseControl';
|
|
74
86
|
import BaseControlProperty from './property';
|
|
75
87
|
var FormControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
76
88
|
"use strict";
|
|
77
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
|
-
_this =
|
|
82
|
-
|
|
83
|
-
|
|
94
|
+
_this = _super.call(this, props);
|
|
95
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'form');
|
|
96
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
97
|
+
_define_property(_assert_this_initialized(_this), "value", void 0);
|
|
84
98
|
_this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
85
99
|
return _this;
|
|
86
100
|
}
|
|
@@ -41,10 +41,6 @@ function _async_to_generator(fn) {
|
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
function _call_super(_this, derived, args) {
|
|
45
|
-
derived = _get_prototype_of(derived);
|
|
46
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
47
|
-
}
|
|
48
44
|
function _class_call_check(instance, Constructor) {
|
|
49
45
|
if (!(instance instanceof Constructor)) {
|
|
50
46
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -200,12 +196,28 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
200
196
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
201
197
|
}
|
|
202
198
|
function _is_native_reflect_construct() {
|
|
199
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
200
|
+
if (Reflect.construct.sham) return false;
|
|
201
|
+
if (typeof Proxy === "function") return true;
|
|
203
202
|
try {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
return
|
|
208
|
-
}
|
|
203
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
204
|
+
return true;
|
|
205
|
+
} catch (e) {
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function _create_super(Derived) {
|
|
210
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
211
|
+
return function _createSuperInternal() {
|
|
212
|
+
var Super = _get_prototype_of(Derived), result;
|
|
213
|
+
if (hasNativeReflectConstruct) {
|
|
214
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
215
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
216
|
+
} else {
|
|
217
|
+
result = Super.apply(this, arguments);
|
|
218
|
+
}
|
|
219
|
+
return _possible_constructor_return(this, result);
|
|
220
|
+
};
|
|
209
221
|
}
|
|
210
222
|
function _ts_generator(thisArg, body) {
|
|
211
223
|
var f, y, t, g, _ = {
|
|
@@ -311,15 +323,19 @@ var CHILDREN_MAX_LENGTH = 10000;
|
|
|
311
323
|
var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
312
324
|
"use strict";
|
|
313
325
|
_inherits(LayoutControl, DesignerControl);
|
|
326
|
+
var _super = _create_super(LayoutControl);
|
|
314
327
|
function LayoutControl(props) {
|
|
315
328
|
_class_call_check(this, LayoutControl);
|
|
316
329
|
var _this;
|
|
317
|
-
_this =
|
|
318
|
-
|
|
319
|
-
|
|
330
|
+
_this = _super.call(this, props);
|
|
331
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'layout');
|
|
332
|
+
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
333
|
+
_define_property(_assert_this_initialized(_this), "excludes", void 0);
|
|
334
|
+
_define_property(_assert_this_initialized(_this), "childrenMaxLength", void 0);
|
|
335
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
320
336
|
var _ref = _instanceof(this, LayoutControl) ? this.constructor : void 0, excludes = _ref.excludes, childrenMaxLength = _ref.childrenMaxLength;
|
|
321
337
|
_this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
322
|
-
defineControlArrayToProperty(_this, 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Designer');
|
|
338
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Designer');
|
|
323
339
|
_this.excludes = JSONCopy(excludes);
|
|
324
340
|
_this.childrenMaxLength = childrenMaxLength;
|
|
325
341
|
return _this;
|
|
@@ -4,10 +4,6 @@ function _assert_this_initialized(self) {
|
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function _call_super(_this, derived, args) {
|
|
8
|
-
derived = _get_prototype_of(derived);
|
|
9
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
-
}
|
|
11
7
|
function _class_call_check(instance, Constructor) {
|
|
12
8
|
if (!(instance instanceof Constructor)) {
|
|
13
9
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -50,22 +46,37 @@ function _type_of(obj) {
|
|
|
50
46
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
51
47
|
}
|
|
52
48
|
function _is_native_reflect_construct() {
|
|
49
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
50
|
+
if (Reflect.construct.sham) return false;
|
|
51
|
+
if (typeof Proxy === "function") return true;
|
|
53
52
|
try {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return
|
|
58
|
-
}
|
|
53
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
54
|
+
return true;
|
|
55
|
+
} catch (e) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function _create_super(Derived) {
|
|
60
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
61
|
+
return function _createSuperInternal() {
|
|
62
|
+
var Super = _get_prototype_of(Derived), result;
|
|
63
|
+
if (hasNativeReflectConstruct) {
|
|
64
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
65
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
66
|
+
} else {
|
|
67
|
+
result = Super.apply(this, arguments);
|
|
68
|
+
}
|
|
69
|
+
return _possible_constructor_return(this, result);
|
|
70
|
+
};
|
|
59
71
|
}
|
|
60
72
|
import { Property } from '../BaseControl';
|
|
61
73
|
var LayoutControlProperty = /*#__PURE__*/ function(Property) {
|
|
62
74
|
"use strict";
|
|
63
75
|
_inherits(LayoutControlProperty, Property);
|
|
76
|
+
var _super = _create_super(LayoutControlProperty);
|
|
64
77
|
function LayoutControlProperty(props) {
|
|
65
78
|
_class_call_check(this, LayoutControlProperty);
|
|
66
|
-
return
|
|
67
|
-
props
|
|
68
|
-
]);
|
|
79
|
+
return _super.call(this, props);
|
|
69
80
|
}
|
|
70
81
|
return LayoutControlProperty;
|
|
71
82
|
}(Property);
|
|
@@ -4,10 +4,6 @@ function _assert_this_initialized(self) {
|
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function _call_super(_this, derived, args) {
|
|
8
|
-
derived = _get_prototype_of(derived);
|
|
9
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
-
}
|
|
11
7
|
function _class_call_check(instance, Constructor) {
|
|
12
8
|
if (!(instance instanceof Constructor)) {
|
|
13
9
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -63,12 +59,28 @@ function _type_of(obj) {
|
|
|
63
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
64
60
|
}
|
|
65
61
|
function _is_native_reflect_construct() {
|
|
62
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
63
|
+
if (Reflect.construct.sham) return false;
|
|
64
|
+
if (typeof Proxy === "function") return true;
|
|
66
65
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return
|
|
71
|
-
}
|
|
66
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
67
|
+
return true;
|
|
68
|
+
} catch (e) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
74
|
+
return function _createSuperInternal() {
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
76
|
+
if (hasNativeReflectConstruct) {
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
78
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
79
|
+
} else {
|
|
80
|
+
result = Super.apply(this, arguments);
|
|
81
|
+
}
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
83
|
+
};
|
|
72
84
|
}
|
|
73
85
|
import { RuntimeControl } from '../BaseControl';
|
|
74
86
|
import LayoutControlProperty from './property';
|
|
@@ -76,14 +88,16 @@ import { defineControlArrayToProperty } from '../ControlArray';
|
|
|
76
88
|
var LayoutControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
77
89
|
"use strict";
|
|
78
90
|
_inherits(LayoutControl, RuntimeControl);
|
|
91
|
+
var _super = _create_super(LayoutControl);
|
|
79
92
|
function LayoutControl(props) {
|
|
80
93
|
_class_call_check(this, LayoutControl);
|
|
81
94
|
var _this;
|
|
82
|
-
_this =
|
|
83
|
-
|
|
84
|
-
|
|
95
|
+
_this = _super.call(this, props);
|
|
96
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'layout');
|
|
97
|
+
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
98
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
85
99
|
_this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
86
|
-
defineControlArrayToProperty(_this, 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Runtime');
|
|
100
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Runtime');
|
|
87
101
|
return _this;
|
|
88
102
|
}
|
|
89
103
|
return LayoutControl;
|
|
@@ -41,10 +41,6 @@ function _async_to_generator(fn) {
|
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
function _call_super(_this, derived, args) {
|
|
45
|
-
derived = _get_prototype_of(derived);
|
|
46
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
47
|
-
}
|
|
48
44
|
function _class_call_check(instance, Constructor) {
|
|
49
45
|
if (!(instance instanceof Constructor)) {
|
|
50
46
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -193,12 +189,28 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
193
189
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
194
190
|
}
|
|
195
191
|
function _is_native_reflect_construct() {
|
|
192
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
193
|
+
if (Reflect.construct.sham) return false;
|
|
194
|
+
if (typeof Proxy === "function") return true;
|
|
196
195
|
try {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return
|
|
201
|
-
}
|
|
196
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
197
|
+
return true;
|
|
198
|
+
} catch (e) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function _create_super(Derived) {
|
|
203
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
204
|
+
return function _createSuperInternal() {
|
|
205
|
+
var Super = _get_prototype_of(Derived), result;
|
|
206
|
+
if (hasNativeReflectConstruct) {
|
|
207
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
208
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
209
|
+
} else {
|
|
210
|
+
result = Super.apply(this, arguments);
|
|
211
|
+
}
|
|
212
|
+
return _possible_constructor_return(this, result);
|
|
213
|
+
};
|
|
202
214
|
}
|
|
203
215
|
function _ts_generator(thisArg, body) {
|
|
204
216
|
var f, y, t, g, _ = {
|
|
@@ -301,13 +313,14 @@ import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
|
|
301
313
|
var ListControl = /*#__PURE__*/ function(DesignerControl) {
|
|
302
314
|
"use strict";
|
|
303
315
|
_inherits(ListControl, DesignerControl);
|
|
316
|
+
var _super = _create_super(ListControl);
|
|
304
317
|
function ListControl(props) {
|
|
305
318
|
_class_call_check(this, ListControl);
|
|
306
319
|
var _this;
|
|
307
|
-
_this =
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
_this.props = new ListControlProperty(_this, props === null || props === void 0 ? void 0 : props.props, 'Designer');
|
|
320
|
+
_this = _super.call(this, props);
|
|
321
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'list');
|
|
322
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
323
|
+
_this.props = new ListControlProperty(_assert_this_initialized(_this), props === null || props === void 0 ? void 0 : props.props, 'Designer');
|
|
311
324
|
return _this;
|
|
312
325
|
}
|
|
313
326
|
_create_class(ListControl, [
|