@byteluck-fe/model-driven-core 2.22.1-beta.0 → 2.22.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 +28 -24
- package/dist/esm/common/BaseControl/index.js +7 -7
- package/dist/esm/common/BaseControl/property.js +3 -3
- package/dist/esm/common/BaseControl/runtime.js +6 -6
- package/dist/esm/common/ColumnControl/designer.js +5 -5
- package/dist/esm/common/ColumnControl/index.js +6 -6
- package/dist/esm/common/ColumnControl/property.js +21 -21
- package/dist/esm/common/ColumnControl/runtime.js +5 -5
- package/dist/esm/common/ControlArray.js +5 -5
- package/dist/esm/common/FormControl/designer.js +6 -6
- package/dist/esm/common/FormControl/index.js +6 -6
- package/dist/esm/common/FormControl/property.js +44 -44
- package/dist/esm/common/FormControl/runtime.js +3 -3
- package/dist/esm/common/LayoutControl/designer.js +6 -6
- package/dist/esm/common/LayoutControl/index.js +6 -6
- package/dist/esm/common/LayoutControl/property.js +1 -1
- package/dist/esm/common/LayoutControl/runtime.js +5 -5
- package/dist/esm/common/ListControl/designer.js +5 -5
- package/dist/esm/common/ListControl/index.js +6 -6
- package/dist/esm/common/ListControl/property.js +4 -4
- package/dist/esm/common/ListControl/runtime.js +6 -6
- package/dist/esm/common/SearchViewControl/designer.js +3 -3
- package/dist/esm/common/SearchViewControl/index.js +6 -6
- package/dist/esm/common/SearchViewControl/property.js +2 -2
- package/dist/esm/common/SearchViewControl/runtime.js +3 -3
- package/dist/esm/common/Validator.js +5 -5
- package/dist/esm/common/WrapControl/designer.js +3 -3
- package/dist/esm/common/WrapControl/index.js +6 -6
- package/dist/esm/common/WrapControl/property.js +1 -1
- package/dist/esm/common/WrapControl/runtime.js +3 -3
- package/dist/esm/common/controlHooksEmitter.js +1 -1
- package/dist/esm/common/index.js +12 -12
- package/dist/esm/common/initLinkOperationRules.js +5 -5
- package/dist/esm/common/initOptionAndDataSourceRules.js +74 -74
- package/dist/esm/framework/RegisterControls.js +8 -8
- package/dist/esm/framework/index.js +96 -96
- package/dist/esm/index.js +4 -4
- package/dist/index.umd.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { default as BaseControlProperty } from
|
|
3
|
-
export { default as ColumnControlProperty } from
|
|
4
|
-
export { default as FormControlProperty } from
|
|
1
|
+
export * from './framework/index';
|
|
2
|
+
export { default as BaseControlProperty } from './common/BaseControl/property';
|
|
3
|
+
export { default as ColumnControlProperty } from './common/ColumnControl/property';
|
|
4
|
+
export { default as FormControlProperty } from './common/FormControl/property';
|
|
@@ -107,6 +107,10 @@ function _to_array(arr) {
|
|
|
107
107
|
function _to_consumable_array(arr) {
|
|
108
108
|
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
109
109
|
}
|
|
110
|
+
function _type_of(obj) {
|
|
111
|
+
"@swc/helpers - typeof";
|
|
112
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
113
|
+
}
|
|
110
114
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
111
115
|
if (!o) return;
|
|
112
116
|
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
@@ -210,10 +214,10 @@ function _ts_generator(thisArg, body) {
|
|
|
210
214
|
};
|
|
211
215
|
}
|
|
212
216
|
}
|
|
213
|
-
import Property from
|
|
214
|
-
import { genNonDuplicateId, JSONCopy, referenceError, updateValueFromKeys } from
|
|
215
|
-
import { createValidator } from
|
|
216
|
-
import { controlHooksEmitter } from
|
|
217
|
+
import Property from './property';
|
|
218
|
+
import { genNonDuplicateId, JSONCopy, referenceError, updateValueFromKeys } from '@byteluck-fe/model-driven-shared';
|
|
219
|
+
import { createValidator } from '../Validator';
|
|
220
|
+
import { controlHooksEmitter } from '../controlHooksEmitter';
|
|
217
221
|
var Control = /*#__PURE__*/ function _target() {
|
|
218
222
|
"use strict";
|
|
219
223
|
function Control(props) {
|
|
@@ -235,7 +239,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
235
239
|
_define_property(this, "slotPosition", void 0);
|
|
236
240
|
_define_property(this, "updateSetting", updateSetting);
|
|
237
241
|
_define_property(this, "removeSetting", removeSetting);
|
|
238
|
-
this._callControlHooks(
|
|
242
|
+
this._callControlHooks('preInstance', props);
|
|
239
243
|
var _ref = _instanceof(this, Control) ? this.constructor : void 0, controlName = _ref.controlName, controlIcon = _ref.controlIcon, controlType = _ref.controlType, controlFieldType = _ref.controlFieldType, controlEventKeys = _ref.controlEventKeys, controlCustomEvents = _ref.controlCustomEvents, name = _ref.name, setting = _ref.setting, slots = _ref.slots, slotPosition = _ref.slotPosition;
|
|
240
244
|
if (!(controlName && controlIcon && controlType)) {
|
|
241
245
|
referenceError("The ".concat(name, " controlName,controlIcon,controlType is not define"));
|
|
@@ -248,7 +252,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
248
252
|
this.type = (_props_type = props === null || props === void 0 ? void 0 : props.type) !== null && _props_type !== void 0 ? _props_type : controlType;
|
|
249
253
|
this.props = new Property(props === null || props === void 0 ? void 0 : props.props, (_instanceof(this, Control) ? this.constructor : void 0).controlName);
|
|
250
254
|
var _props_controlType;
|
|
251
|
-
this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType :
|
|
255
|
+
this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : 'base';
|
|
252
256
|
this.setting = JSONCopy(setting);
|
|
253
257
|
var _props_fieldType;
|
|
254
258
|
this.fieldType = (_props_fieldType = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
|
|
@@ -257,7 +261,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
257
261
|
this.slots = JSONCopy(slots);
|
|
258
262
|
this.slotPosition = JSONCopy(slotPosition);
|
|
259
263
|
Promise.resolve().then(function() {
|
|
260
|
-
_this._callControlHooks(
|
|
264
|
+
_this._callControlHooks('postInstance', props);
|
|
261
265
|
});
|
|
262
266
|
}
|
|
263
267
|
_create_class(Control, [
|
|
@@ -289,14 +293,14 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
289
293
|
key: "preUpdate",
|
|
290
294
|
value: function preUpdate(key, value) {
|
|
291
295
|
// 在修改props之前
|
|
292
|
-
this._callControlHooks(
|
|
296
|
+
this._callControlHooks('preUpdateProps', key, value);
|
|
293
297
|
}
|
|
294
298
|
},
|
|
295
299
|
{
|
|
296
300
|
key: "postUpdate",
|
|
297
301
|
value: function postUpdate(key, value) {
|
|
298
302
|
// 在修改props之后
|
|
299
|
-
this._callControlHooks(
|
|
303
|
+
this._callControlHooks('postUpdateProps', key, value);
|
|
300
304
|
}
|
|
301
305
|
},
|
|
302
306
|
{
|
|
@@ -321,7 +325,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
321
325
|
rules = _object_spread({}, _this.rules);
|
|
322
326
|
return [
|
|
323
327
|
4,
|
|
324
|
-
_this._callControlHooks(
|
|
328
|
+
_this._callControlHooks('preValidate', rules)
|
|
325
329
|
];
|
|
326
330
|
case 1:
|
|
327
331
|
results = _state.sent();
|
|
@@ -414,13 +418,13 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
414
418
|
dataBindModelType.dataBind = dataBind;
|
|
415
419
|
}
|
|
416
420
|
switch(optionConfig){
|
|
417
|
-
case
|
|
421
|
+
case 'datasource':
|
|
418
422
|
case undefined:
|
|
419
423
|
if (datasourceBind) {
|
|
420
424
|
dataBindModelType.datasourceBind = datasourceBind;
|
|
421
425
|
}
|
|
422
426
|
break;
|
|
423
|
-
case
|
|
427
|
+
case 'custom':
|
|
424
428
|
dataBindModelType.props.options = options;
|
|
425
429
|
break;
|
|
426
430
|
}
|
|
@@ -443,7 +447,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
443
447
|
key: "preToSchema",
|
|
444
448
|
value: function preToSchema() {
|
|
445
449
|
// 在处理Schema之前,预留的钩子函数,允许在toSchema之前处理一些数据
|
|
446
|
-
this._callControlHooks(
|
|
450
|
+
this._callControlHooks('preToSchema', this);
|
|
447
451
|
}
|
|
448
452
|
},
|
|
449
453
|
{
|
|
@@ -463,7 +467,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
463
467
|
{
|
|
464
468
|
key: "updateBasicControl",
|
|
465
469
|
value: function updateBasicControl(key, setting) {
|
|
466
|
-
if (key !==
|
|
470
|
+
if (key !== 'setting') return;
|
|
467
471
|
if (setting.add) {
|
|
468
472
|
var _this_setting;
|
|
469
473
|
(_this_setting = this.setting).push.apply(_this_setting, _to_consumable_array(setting.add));
|
|
@@ -479,12 +483,12 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
479
483
|
]);
|
|
480
484
|
return Control;
|
|
481
485
|
}();
|
|
482
|
-
_define_property(Control, "mode",
|
|
486
|
+
_define_property(Control, "mode", 'Designer');
|
|
483
487
|
_define_property(Control, "slots", void 0);
|
|
484
488
|
_define_property(Control, "slotPosition", void 0);
|
|
485
|
-
_define_property(Control, "controlName",
|
|
486
|
-
_define_property(Control, "controlIcon",
|
|
487
|
-
_define_property(Control, "controlType",
|
|
489
|
+
_define_property(Control, "controlName", '控件');
|
|
490
|
+
_define_property(Control, "controlIcon", 'icon');
|
|
491
|
+
_define_property(Control, "controlType", 'control');
|
|
488
492
|
_define_property(Control, "controlFieldType", void 0);
|
|
489
493
|
// 控件可以触发的事件key
|
|
490
494
|
_define_property(Control, "controlEventKeys", []);
|
|
@@ -510,7 +514,7 @@ export { Control as DesignerControl };
|
|
|
510
514
|
deleteKeys.forEach(function(deleteKey) {
|
|
511
515
|
var _this_setting;
|
|
512
516
|
// 是否存在子项
|
|
513
|
-
var isHasItem = typeof deleteKey !==
|
|
517
|
+
var isHasItem = typeof deleteKey !== 'string';
|
|
514
518
|
// 判断setting是否是自定义控件setting项
|
|
515
519
|
// @ts-ignore
|
|
516
520
|
var settingIndex = (_this_setting = _this.setting) === null || _this_setting === void 0 ? void 0 : _this_setting.findIndex(function(option) {
|
|
@@ -538,7 +542,7 @@ export { Control as DesignerControl };
|
|
|
538
542
|
* @param value.type 默认是replace替换,可以更改为push新增
|
|
539
543
|
* */ function updateSetting(settingKey, value) {
|
|
540
544
|
var _this = this;
|
|
541
|
-
var keys = typeof settingKey ===
|
|
545
|
+
var keys = typeof settingKey === 'string' ? [
|
|
542
546
|
settingKey
|
|
543
547
|
] : settingKey;
|
|
544
548
|
keys.forEach(function(key) {
|
|
@@ -547,12 +551,12 @@ export { Control as DesignerControl };
|
|
|
547
551
|
return item.key === key;
|
|
548
552
|
});
|
|
549
553
|
if (settingItem) {
|
|
550
|
-
if (typeof value ===
|
|
554
|
+
if (typeof value === 'boolean') {
|
|
551
555
|
settingItem.visible = value;
|
|
552
|
-
} else if (typeof value === "
|
|
556
|
+
} else if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === 'object') {
|
|
553
557
|
var _value_type;
|
|
554
|
-
var type = (_value_type = value.type) !== null && _value_type !== void 0 ? _value_type :
|
|
555
|
-
if (type ===
|
|
558
|
+
var type = (_value_type = value.type) !== null && _value_type !== void 0 ? _value_type : 'replace';
|
|
559
|
+
if (type === 'replace') {
|
|
556
560
|
settingItem.showItems = value.showItems;
|
|
557
561
|
} else {
|
|
558
562
|
var _settingItem_showItems;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import Designer from
|
|
2
|
-
import Runtime from
|
|
3
|
-
import Property from
|
|
1
|
+
import Designer from './designer';
|
|
2
|
+
import Runtime from './runtime';
|
|
3
|
+
import Property from './property';
|
|
4
4
|
export default {
|
|
5
5
|
Designer: Designer,
|
|
6
6
|
Runtime: Runtime,
|
|
7
7
|
Property: Property
|
|
8
8
|
};
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
9
|
+
export * from './designer';
|
|
10
|
+
export * from './runtime';
|
|
11
|
+
export * from './property';
|
|
12
|
+
export * from './types';
|
|
@@ -128,12 +128,12 @@ function _create_super(Derived) {
|
|
|
128
128
|
return _possible_constructor_return(this, result);
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
import { BaseStyle } from
|
|
131
|
+
import { BaseStyle } from '../../framework';
|
|
132
132
|
var PropertyRules = function PropertyRules(props) {
|
|
133
133
|
"use strict";
|
|
134
134
|
_class_call_check(this, PropertyRules);
|
|
135
135
|
_define_property(this, "isHide", {
|
|
136
|
-
type:
|
|
136
|
+
type: 'boolean'
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
139
|
var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
|
|
@@ -151,7 +151,7 @@ var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
|
|
|
151
151
|
* @public
|
|
152
152
|
*/ var Property = function Property(props) {
|
|
153
153
|
"use strict";
|
|
154
|
-
var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
154
|
+
var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
|
155
155
|
_class_call_check(this, Property);
|
|
156
156
|
/**
|
|
157
157
|
* 是否隐藏
|
|
@@ -37,9 +37,9 @@ function _instanceof(left, right) {
|
|
|
37
37
|
return left instanceof right;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
import Property from
|
|
41
|
-
import { genNonDuplicateId, referenceError } from
|
|
42
|
-
import { PAGE_STATUS } from
|
|
40
|
+
import Property from './property';
|
|
41
|
+
import { genNonDuplicateId, referenceError } from '@byteluck-fe/model-driven-shared';
|
|
42
|
+
import { PAGE_STATUS } from '../../framework';
|
|
43
43
|
var Control = /*#__PURE__*/ function _target() {
|
|
44
44
|
"use strict";
|
|
45
45
|
function Control(props) {
|
|
@@ -64,7 +64,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
64
64
|
this.props = new Property(props === null || props === void 0 ? void 0 : props.props);
|
|
65
65
|
this.customEvents = controlCustomEvents;
|
|
66
66
|
var _props_controlType;
|
|
67
|
-
this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType :
|
|
67
|
+
this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : 'base';
|
|
68
68
|
var _props_fieldType;
|
|
69
69
|
this.fieldType = (_props_fieldType = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
|
|
70
70
|
var _props_pageStatus;
|
|
@@ -85,8 +85,8 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
85
85
|
]);
|
|
86
86
|
return Control;
|
|
87
87
|
}();
|
|
88
|
-
_define_property(Control, "mode",
|
|
89
|
-
_define_property(Control, "controlType",
|
|
88
|
+
_define_property(Control, "mode", 'Runtime');
|
|
89
|
+
_define_property(Control, "controlType", 'control');
|
|
90
90
|
_define_property(Control, "controlFieldType", void 0);
|
|
91
91
|
_define_property(Control, "__is_control__", true);
|
|
92
92
|
_define_property(Control, "controlCustomEvents", []);
|
|
@@ -158,9 +158,9 @@ function _create_super(Derived) {
|
|
|
158
158
|
return _possible_constructor_return(this, result);
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
import { defineControlArrayToProperty } from
|
|
162
|
-
import { DesignerControl } from
|
|
163
|
-
import ColumnControlProperty from
|
|
161
|
+
import { defineControlArrayToProperty } from '../ControlArray';
|
|
162
|
+
import { DesignerControl } from '../BaseControl';
|
|
163
|
+
import ColumnControlProperty from './property';
|
|
164
164
|
var ColumnControl = /*#__PURE__*/ function(DesignerControl) {
|
|
165
165
|
"use strict";
|
|
166
166
|
_inherits(ColumnControl, DesignerControl);
|
|
@@ -169,11 +169,11 @@ var ColumnControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
169
169
|
_class_call_check(this, ColumnControl);
|
|
170
170
|
var _this;
|
|
171
171
|
_this = _super.call(this, props);
|
|
172
|
-
_define_property(_assert_this_initialized(_this), "controlType",
|
|
172
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'column');
|
|
173
173
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
174
174
|
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
175
175
|
_this.props = new ColumnControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
176
|
-
defineControlArrayToProperty(_assert_this_initialized(_this),
|
|
176
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Designer');
|
|
177
177
|
return _this;
|
|
178
178
|
}
|
|
179
179
|
_create_class(ColumnControl, [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Designer from
|
|
2
|
-
import Runtime from
|
|
3
|
-
import Property from
|
|
1
|
+
import Designer from './designer';
|
|
2
|
+
import Runtime from './runtime';
|
|
3
|
+
import Property from './property';
|
|
4
4
|
export default {
|
|
5
5
|
Designer: Designer,
|
|
6
6
|
Runtime: Runtime,
|
|
7
7
|
Property: Property
|
|
8
8
|
};
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
9
|
+
export * from './designer';
|
|
10
|
+
export * from './runtime';
|
|
11
|
+
export * from './property';
|
|
@@ -82,10 +82,10 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { Property, PropertyRules } from
|
|
86
|
-
import { RulesMessage } from
|
|
87
|
-
import { initOptionAndDataSourceRules } from
|
|
88
|
-
import { DataBind, AutoWidth } from
|
|
85
|
+
import { Property, PropertyRules } from '../BaseControl';
|
|
86
|
+
import { RulesMessage } from '@byteluck-fe/model-driven-shared';
|
|
87
|
+
import { initOptionAndDataSourceRules } from '../initOptionAndDataSourceRules';
|
|
88
|
+
import { DataBind, AutoWidth } from '../../framework';
|
|
89
89
|
var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
90
90
|
"use strict";
|
|
91
91
|
_inherits(ColumnControlPropertyRules, PropertyRules);
|
|
@@ -95,16 +95,16 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
95
95
|
var _this;
|
|
96
96
|
_this = _super.call(this, props);
|
|
97
97
|
_define_property(_assert_this_initialized(_this), "caption", {
|
|
98
|
-
type:
|
|
98
|
+
type: 'string',
|
|
99
99
|
required: true,
|
|
100
|
-
message: RulesMessage.getMessage(
|
|
100
|
+
message: RulesMessage.getMessage('pleaseEnterCaption')
|
|
101
101
|
});
|
|
102
102
|
_define_property(_assert_this_initialized(_this), "width", {
|
|
103
|
-
type:
|
|
103
|
+
type: 'number',
|
|
104
104
|
required: false,
|
|
105
|
-
message: RulesMessage.getMessage(
|
|
105
|
+
message: RulesMessage.getMessage('pleaseEnterColumnWidth')
|
|
106
106
|
});
|
|
107
|
-
_this.width.required = props.widthType ===
|
|
107
|
+
_this.width.required = props.widthType === 'px';
|
|
108
108
|
return _this;
|
|
109
109
|
}
|
|
110
110
|
return ColumnControlPropertyRules;
|
|
@@ -158,11 +158,11 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
158
158
|
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
159
159
|
var _props_width;
|
|
160
160
|
_this.width = (_props_width = props === null || props === void 0 ? void 0 : props.width) !== null && _props_width !== void 0 ? _props_width : 150;
|
|
161
|
-
_this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) ||
|
|
161
|
+
_this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) || 'auto';
|
|
162
162
|
var _props_caption;
|
|
163
|
-
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption :
|
|
163
|
+
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : '';
|
|
164
164
|
var _props_fixed;
|
|
165
|
-
_this.fixed = (_props_fixed = props === null || props === void 0 ? void 0 : props.fixed) !== null && _props_fixed !== void 0 ? _props_fixed :
|
|
165
|
+
_this.fixed = (_props_fixed = props === null || props === void 0 ? void 0 : props.fixed) !== null && _props_fixed !== void 0 ? _props_fixed : 'none';
|
|
166
166
|
_this.autoWidth = new AutoWidth(props === null || props === void 0 ? void 0 : props.autoWidth);
|
|
167
167
|
_this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
|
|
168
168
|
var _props_sort;
|
|
@@ -185,24 +185,24 @@ var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnContro
|
|
|
185
185
|
var _this;
|
|
186
186
|
_this = _super.call(this, props);
|
|
187
187
|
_define_property(_assert_this_initialized(_this), "optionConfig", {
|
|
188
|
-
type:
|
|
188
|
+
type: 'enum',
|
|
189
189
|
enum: [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
'custom',
|
|
191
|
+
'datasource',
|
|
192
|
+
'none'
|
|
193
193
|
],
|
|
194
|
-
message: RulesMessage.getMessage(
|
|
194
|
+
message: RulesMessage.getMessage('PleaseSelectTheCorrectOptionSettings')
|
|
195
195
|
});
|
|
196
196
|
_define_property(_assert_this_initialized(_this), "options", [
|
|
197
197
|
{
|
|
198
|
-
type:
|
|
199
|
-
message: RulesMessage.getMessage(
|
|
198
|
+
type: 'array',
|
|
199
|
+
message: RulesMessage.getMessage('isNotArray')
|
|
200
200
|
}
|
|
201
201
|
]);
|
|
202
202
|
_define_property(_assert_this_initialized(_this), "datasourceBind", [
|
|
203
203
|
{
|
|
204
|
-
type:
|
|
205
|
-
message: RulesMessage.getMessage(
|
|
204
|
+
type: 'object',
|
|
205
|
+
message: RulesMessage.getMessage('isNotObject')
|
|
206
206
|
}
|
|
207
207
|
]);
|
|
208
208
|
initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
|
|
@@ -82,9 +82,9 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { defineControlArrayToProperty } from
|
|
86
|
-
import { RuntimeControl } from
|
|
87
|
-
import ColumnControlProperty from
|
|
85
|
+
import { defineControlArrayToProperty } from '../ControlArray';
|
|
86
|
+
import { RuntimeControl } from '../BaseControl';
|
|
87
|
+
import ColumnControlProperty from './property';
|
|
88
88
|
var ColumnControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
89
89
|
"use strict";
|
|
90
90
|
_inherits(ColumnControl, RuntimeControl);
|
|
@@ -93,11 +93,11 @@ var ColumnControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
|
93
93
|
_class_call_check(this, ColumnControl);
|
|
94
94
|
var _this;
|
|
95
95
|
_this = _super.call(this, props);
|
|
96
|
-
_define_property(_assert_this_initialized(_this), "controlType",
|
|
96
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'column');
|
|
97
97
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
98
98
|
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
99
99
|
_this.props = new ColumnControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
100
|
-
defineControlArrayToProperty(_assert_this_initialized(_this),
|
|
100
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Runtime');
|
|
101
101
|
return _this;
|
|
102
102
|
}
|
|
103
103
|
return ColumnControl;
|
|
@@ -23,7 +23,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
23
23
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
24
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
25
25
|
}
|
|
26
|
-
import { isArray, isPlainObject } from
|
|
26
|
+
import { isArray, isPlainObject } from '@byteluck-fe/model-driven-shared';
|
|
27
27
|
export function setPropertyDontEnum(obj, property) {
|
|
28
28
|
var _Object_getOwnPropertyDescriptors_property;
|
|
29
29
|
//如果没有被设置过不允许枚举的话,说明是第一次被设置,需要设置属性不允许枚举
|
|
@@ -34,10 +34,10 @@ export function setPropertyDontEnum(obj, property) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
export function defineParent(control, parent, mode) {
|
|
37
|
-
if (mode !==
|
|
37
|
+
if (mode !== 'Runtime') {
|
|
38
38
|
control.parent = parent;
|
|
39
39
|
// 如果没有被设置过不允许枚举的话,说明是第一次被代理,需要设置parent属性不允许枚举
|
|
40
|
-
setPropertyDontEnum(control,
|
|
40
|
+
setPropertyDontEnum(control, 'parent');
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
export function defineArrayParent(controls, parent, mode) {
|
|
@@ -45,7 +45,7 @@ export function defineArrayParent(controls, parent, mode) {
|
|
|
45
45
|
defineParent(item, parent, mode);
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
var targetKey = Symbol(
|
|
48
|
+
var targetKey = Symbol('targetKey');
|
|
49
49
|
function getTargetValue(value) {
|
|
50
50
|
var _value_targetKey;
|
|
51
51
|
return (_value_targetKey = value[targetKey]) !== null && _value_targetKey !== void 0 ? _value_targetKey : value;
|
|
@@ -72,7 +72,7 @@ function proxyState(target, parent, mode) {
|
|
|
72
72
|
}
|
|
73
73
|
var _Reflect;
|
|
74
74
|
// 更改长度为当前长度,代表没变,直接返回true,否则在safari 13.x版本的严格模式会引起页面崩溃
|
|
75
|
-
if (isArray(target) && property ===
|
|
75
|
+
if (isArray(target) && property === 'length' && value === target.length) {
|
|
76
76
|
return true;
|
|
77
77
|
}
|
|
78
78
|
var result = (_Reflect = Reflect).set.apply(_Reflect, [
|
|
@@ -82,8 +82,8 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { DesignerControl } from
|
|
86
|
-
import BaseControlProperty from
|
|
85
|
+
import { DesignerControl } from '../BaseControl';
|
|
86
|
+
import BaseControlProperty from './property';
|
|
87
87
|
var FormControl = /*#__PURE__*/ function(DesignerControl) {
|
|
88
88
|
"use strict";
|
|
89
89
|
_inherits(FormControl, DesignerControl);
|
|
@@ -92,7 +92,7 @@ var FormControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
92
92
|
_class_call_check(this, FormControl);
|
|
93
93
|
var _this;
|
|
94
94
|
_this = _super.call(this, props);
|
|
95
|
-
_define_property(_assert_this_initialized(_this), "controlType",
|
|
95
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'form');
|
|
96
96
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
97
97
|
_this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
98
98
|
return _this;
|
|
@@ -100,9 +100,9 @@ var FormControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
100
100
|
return FormControl;
|
|
101
101
|
}(DesignerControl);
|
|
102
102
|
_define_property(FormControl, "controlEventKeys", [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
'on_change',
|
|
104
|
+
'on_focus',
|
|
105
|
+
'on_blur'
|
|
106
106
|
]);
|
|
107
107
|
_define_property(FormControl, "controlCustomAttributes", void 0);
|
|
108
108
|
export default FormControl;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Designer from
|
|
2
|
-
import Runtime from
|
|
3
|
-
import Property from
|
|
1
|
+
import Designer from './designer';
|
|
2
|
+
import Runtime from './runtime';
|
|
3
|
+
import Property from './property';
|
|
4
4
|
export default {
|
|
5
5
|
Designer: Designer,
|
|
6
6
|
Runtime: Runtime,
|
|
7
7
|
Property: Property
|
|
8
8
|
};
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
9
|
+
export * from './designer';
|
|
10
|
+
export * from './runtime';
|
|
11
|
+
export * from './property';
|