@byteluck-fe/model-driven-core 7.0.0-1-beta9 → 7.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/common/BaseControl/designer.js +43 -12
- package/dist/esm/common/BaseControl/property.js +19 -10
- package/dist/esm/common/BaseControl/runtime.js +8 -11
- package/dist/esm/common/ColumnControl/property.js +13 -12
- package/dist/esm/common/FormControl/property.js +21 -81
- package/dist/esm/common/LayoutControl/designer.js +13 -4
- package/dist/esm/common/LayoutControl/property.js +4 -1
- package/dist/esm/common/ListControl/designer.js +12 -4
- package/dist/esm/common/ListControl/property.js +22 -10
- package/dist/esm/common/SearchViewControl/property.js +7 -2
- package/dist/esm/common/WrapControl/property.js +4 -1
- package/dist/esm/framework/index.js +443 -351
- package/dist/index.umd.js +1 -1
- package/dist/types/common/BaseControl/designer.d.ts +14 -0
- package/dist/types/common/BaseControl/property.d.ts +52 -5
- package/dist/types/common/BaseControl/types.d.ts +4 -0
- package/dist/types/common/ColumnControl/designer.d.ts +4 -4
- package/dist/types/common/ColumnControl/property.d.ts +61 -3
- package/dist/types/common/FormControl/property.d.ts +39 -9
- package/dist/types/common/LayoutControl/property.d.ts +9 -3
- package/dist/types/common/ListControl/property.d.ts +52 -3
- package/dist/types/common/SearchViewControl/property.d.ts +16 -3
- package/dist/types/common/WrapControl/property.d.ts +9 -3
- package/dist/types/framework/index.d.ts +229 -27
- package/package.json +3 -3
|
@@ -71,6 +71,7 @@ function _define_property(obj, key, value) {
|
|
|
71
71
|
return obj;
|
|
72
72
|
}
|
|
73
73
|
function _instanceof(left, right) {
|
|
74
|
+
"@swc/helpers - instanceof";
|
|
74
75
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
75
76
|
return !!right[Symbol.hasInstance](left);
|
|
76
77
|
} else {
|
|
@@ -128,9 +129,17 @@ function _ts_generator(thisArg, body) {
|
|
|
128
129
|
},
|
|
129
130
|
trys: [],
|
|
130
131
|
ops: []
|
|
131
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
132
|
-
return
|
|
133
|
-
|
|
132
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
133
|
+
return d(g, "next", {
|
|
134
|
+
value: verb(0)
|
|
135
|
+
}), d(g, "throw", {
|
|
136
|
+
value: verb(1)
|
|
137
|
+
}), d(g, "return", {
|
|
138
|
+
value: verb(2)
|
|
139
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
140
|
+
value: function() {
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
134
143
|
}), g;
|
|
135
144
|
function verb(n) {
|
|
136
145
|
return function(v) {
|
|
@@ -220,6 +229,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
220
229
|
function Control(props) {
|
|
221
230
|
var _this = this;
|
|
222
231
|
_class_call_check(this, Control);
|
|
232
|
+
var _ref, _ref1, _ref2, _ref3;
|
|
223
233
|
_define_property(this, "id", void 0); // 唯一标识符
|
|
224
234
|
_define_property(this, "name", void 0);
|
|
225
235
|
_define_property(this, "icon", void 0);
|
|
@@ -235,23 +245,20 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
235
245
|
_define_property(this, "slotPosition", void 0);
|
|
236
246
|
_define_property(this, "updateSetting", updateSetting);
|
|
237
247
|
_define_property(this, "removeSetting", removeSetting);
|
|
248
|
+
_define_property(this, "removeSettingByKeyAndName", removeSettingByKeyAndName);
|
|
238
249
|
this._callControlHooks('preInstance', props);
|
|
239
|
-
var
|
|
250
|
+
var _ref4 = _instanceof(this, Control) ? this.constructor : void 0, controlName = _ref4.controlName, controlIcon = _ref4.controlIcon, controlType = _ref4.controlType, controlFieldType = _ref4.controlFieldType, controlEventKeys = _ref4.controlEventKeys, controlCustomEvents = _ref4.controlCustomEvents, name = _ref4.name, setting = _ref4.setting, slots = _ref4.slots, slotPosition = _ref4.slotPosition;
|
|
240
251
|
if (!(controlName && controlIcon && controlType)) {
|
|
241
252
|
referenceError("The ".concat(name, " controlName,controlIcon,controlType is not define"));
|
|
242
253
|
}
|
|
243
|
-
|
|
244
|
-
this.id = (_props_id = props === null || props === void 0 ? void 0 : props.id) !== null && _props_id !== void 0 ? _props_id : genNonDuplicateId(10);
|
|
254
|
+
this.id = (_ref = props === null || props === void 0 ? void 0 : props.id) !== null && _ref !== void 0 ? _ref : genNonDuplicateId(10);
|
|
245
255
|
this.name = controlName;
|
|
246
256
|
this.icon = controlIcon;
|
|
247
|
-
|
|
248
|
-
this.type = (_props_type = props === null || props === void 0 ? void 0 : props.type) !== null && _props_type !== void 0 ? _props_type : controlType;
|
|
257
|
+
this.type = (_ref1 = props === null || props === void 0 ? void 0 : props.type) !== null && _ref1 !== void 0 ? _ref1 : controlType;
|
|
249
258
|
this.props = new Property(props === null || props === void 0 ? void 0 : props.props, (_instanceof(this, Control) ? this.constructor : void 0).controlName);
|
|
250
|
-
|
|
251
|
-
this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : 'base';
|
|
259
|
+
this.controlType = (_ref2 = props === null || props === void 0 ? void 0 : props.controlType) !== null && _ref2 !== void 0 ? _ref2 : 'base';
|
|
252
260
|
this.setting = JSONCopy(setting);
|
|
253
|
-
|
|
254
|
-
this.fieldType = (_props_fieldType = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
|
|
261
|
+
this.fieldType = (_ref3 = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _ref3 !== void 0 ? _ref3 : controlFieldType;
|
|
255
262
|
this.eventKeys = JSONCopy(controlEventKeys);
|
|
256
263
|
this.customEvents = JSONCopy(controlCustomEvents);
|
|
257
264
|
this.slots = JSONCopy(slots);
|
|
@@ -492,6 +499,10 @@ _define_property(Control, "setting", []);
|
|
|
492
499
|
_define_property(Control, "__is_control__", true);
|
|
493
500
|
// 删除指定的settingItem
|
|
494
501
|
_define_property(Control, "removeSettingItem", removeSetting);
|
|
502
|
+
// 根据key和name删除指定的settingItem
|
|
503
|
+
_define_property(Control, "removeSettingByKeyAndName", removeSettingByKeyAndName);
|
|
504
|
+
// 根据key和name删除指定的settingItem
|
|
505
|
+
_define_property(Control, "removeSettingItemByKeyAndName", removeSettingByKeyAndName);
|
|
495
506
|
// 修改指定的settingItem的visible
|
|
496
507
|
_define_property(Control, "updateSettingItem", updateSetting);
|
|
497
508
|
export default Control;
|
|
@@ -527,6 +538,26 @@ export { Control as DesignerControl };
|
|
|
527
538
|
}
|
|
528
539
|
});
|
|
529
540
|
}
|
|
541
|
+
function removeSettingByKeyAndName(keyOrOptions, name) {
|
|
542
|
+
var _this = this;
|
|
543
|
+
var deleteOptions = typeof keyOrOptions === 'string' ? [
|
|
544
|
+
{
|
|
545
|
+
key: keyOrOptions,
|
|
546
|
+
name: name
|
|
547
|
+
}
|
|
548
|
+
] : keyOrOptions;
|
|
549
|
+
deleteOptions.forEach(function(deleteOption) {
|
|
550
|
+
var _this_setting;
|
|
551
|
+
// @ts-ignore
|
|
552
|
+
var settingIndex = (_this_setting = _this.setting) === null || _this_setting === void 0 ? void 0 : _this_setting.findIndex(function(option) {
|
|
553
|
+
return option.key === deleteOption.key && option.name === deleteOption.name;
|
|
554
|
+
});
|
|
555
|
+
if (settingIndex !== -1) {
|
|
556
|
+
// @ts-ignore
|
|
557
|
+
_this.setting.splice(settingIndex, 1);
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
}
|
|
530
561
|
/**
|
|
531
562
|
* @function 修改控件或者实例上的setting的方法
|
|
532
563
|
* @description 其中的this可能是DesignerControl的类,也可以是实例
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* name: base_property
|
|
3
|
+
* description: 基础属性定义。提供控件通用的隐藏状态、类名、样式、标题和默认状态配置,是表单、布局、列表等属性模型的公共基类。
|
|
4
|
+
*/ function _assert_this_initialized(self) {
|
|
2
5
|
if (self === void 0) {
|
|
3
6
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
7
|
}
|
|
@@ -134,34 +137,40 @@ var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
|
|
|
134
137
|
return PropertyRuntimeRules;
|
|
135
138
|
}(_wrap_native_super(Array));
|
|
136
139
|
/**
|
|
137
|
-
*
|
|
140
|
+
* 属性实现
|
|
138
141
|
* @public
|
|
139
142
|
*/ var Property = function Property(props) {
|
|
140
143
|
"use strict";
|
|
141
144
|
var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
|
142
145
|
_class_call_check(this, Property);
|
|
146
|
+
var _ref, _ref1;
|
|
143
147
|
/**
|
|
144
148
|
* 是否隐藏
|
|
145
149
|
* @public
|
|
146
150
|
* @defaultValue false
|
|
147
151
|
*/ _define_property(this, "isHide", void 0);
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
/**
|
|
153
|
+
* 类名
|
|
154
|
+
* @public
|
|
155
|
+
* @noSchema
|
|
156
|
+
*/ _define_property(this, "className", void 0);
|
|
157
|
+
/**
|
|
158
|
+
* 样式
|
|
159
|
+
* @public
|
|
160
|
+
* @noSchema
|
|
161
|
+
*/ _define_property(this, "style", void 0);
|
|
150
162
|
/**
|
|
151
163
|
* 标题
|
|
152
164
|
* @public
|
|
153
165
|
* @defaultValue ''
|
|
154
166
|
*/ _define_property(this, "caption", void 0);
|
|
155
167
|
/**
|
|
156
|
-
*
|
|
168
|
+
* 默认状态
|
|
157
169
|
* @public
|
|
158
|
-
* @defaultValue ''
|
|
159
170
|
*/ _define_property(this, "defaultState", void 0);
|
|
160
|
-
|
|
161
|
-
this.isHide = (_props_isHide = props === null || props === void 0 ? void 0 : props.isHide) !== null && _props_isHide !== void 0 ? _props_isHide : false;
|
|
171
|
+
this.isHide = (_ref = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref !== void 0 ? _ref : false;
|
|
162
172
|
this.style = new BaseStyle(props === null || props === void 0 ? void 0 : props.style);
|
|
163
|
-
|
|
164
|
-
this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : caption;
|
|
173
|
+
this.caption = (_ref1 = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref1 !== void 0 ? _ref1 : caption;
|
|
165
174
|
};
|
|
166
175
|
_define_property(Property, "mode", void 0);
|
|
167
176
|
_define_property(Property, "Rules", PropertyRules);
|
|
@@ -31,6 +31,7 @@ function _define_property(obj, key, value) {
|
|
|
31
31
|
return obj;
|
|
32
32
|
}
|
|
33
33
|
function _instanceof(left, right) {
|
|
34
|
+
"@swc/helpers - instanceof";
|
|
34
35
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
35
36
|
return !!right[Symbol.hasInstance](left);
|
|
36
37
|
} else {
|
|
@@ -44,6 +45,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
44
45
|
"use strict";
|
|
45
46
|
function Control(props) {
|
|
46
47
|
_class_call_check(this, Control);
|
|
48
|
+
var _ref, _ref1, _ref2, _ref3, _ref4;
|
|
47
49
|
_define_property(this, "id", void 0); // 唯一标识符
|
|
48
50
|
_define_property(this, "type", void 0);
|
|
49
51
|
_define_property(this, "controlType", void 0);
|
|
@@ -52,22 +54,17 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
52
54
|
_define_property(this, "customEvents", []);
|
|
53
55
|
_define_property(this, "pageStatus", void 0);
|
|
54
56
|
_define_property(this, "parent", null);
|
|
55
|
-
var
|
|
57
|
+
var _ref5 = _instanceof(this, Control) ? this.constructor : void 0, controlType = _ref5.controlType, controlFieldType = _ref5.controlFieldType, name = _ref5.name, controlCustomEvents = _ref5.controlCustomEvents;
|
|
56
58
|
if (!controlType) {
|
|
57
59
|
referenceError("The ".concat(name, " controlType is not define"));
|
|
58
60
|
}
|
|
59
|
-
|
|
60
|
-
this.
|
|
61
|
-
var _props_type;
|
|
62
|
-
this.type = (_props_type = props === null || props === void 0 ? void 0 : props.type) !== null && _props_type !== void 0 ? _props_type : controlType;
|
|
61
|
+
this.id = (_ref = props === null || props === void 0 ? void 0 : props.id) !== null && _ref !== void 0 ? _ref : genNonDuplicateId(10);
|
|
62
|
+
this.type = (_ref1 = props === null || props === void 0 ? void 0 : props.type) !== null && _ref1 !== void 0 ? _ref1 : controlType;
|
|
63
63
|
this.props = new Property(props === null || props === void 0 ? void 0 : props.props);
|
|
64
64
|
this.customEvents = controlCustomEvents;
|
|
65
|
-
|
|
66
|
-
this.
|
|
67
|
-
|
|
68
|
-
this.fieldType = (_props_fieldType = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
|
|
69
|
-
var _props_pageStatus;
|
|
70
|
-
this.pageStatus = (_props_pageStatus = props === null || props === void 0 ? void 0 : props.pageStatus) !== null && _props_pageStatus !== void 0 ? _props_pageStatus : PAGE_STATUS.UNKNOWN;
|
|
65
|
+
this.controlType = (_ref2 = props === null || props === void 0 ? void 0 : props.controlType) !== null && _ref2 !== void 0 ? _ref2 : 'base';
|
|
66
|
+
this.fieldType = (_ref3 = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _ref3 !== void 0 ? _ref3 : controlFieldType;
|
|
67
|
+
this.pageStatus = (_ref4 = props === null || props === void 0 ? void 0 : props.pageStatus) !== null && _ref4 !== void 0 ? _ref4 : PAGE_STATUS.UNKNOWN;
|
|
71
68
|
}
|
|
72
69
|
_create_class(Control, [
|
|
73
70
|
{
|
|
@@ -70,7 +70,10 @@ function _is_native_reflect_construct() {
|
|
|
70
70
|
return !!result;
|
|
71
71
|
})();
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
/**
|
|
74
|
+
* name: base_column_control_property
|
|
75
|
+
* description: 列控件基础属性定义。提供列宽、标题、数据绑定、自适应宽度、冻结、排序、对齐、跨列、自动高度和子控件配置。
|
|
76
|
+
*/ import { Property, PropertyRules } from '../BaseControl';
|
|
74
77
|
import { initOptionAndDataSourceRules } from '../initOptionAndDataSourceRules';
|
|
75
78
|
import { DataBind, AutoWidth } from '../../framework';
|
|
76
79
|
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
@@ -105,6 +108,7 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
105
108
|
function ColumnControlProperty(props) {
|
|
106
109
|
_class_call_check(this, ColumnControlProperty);
|
|
107
110
|
var _this;
|
|
111
|
+
var _ref, _ref1, _ref2, _ref3, _ref4;
|
|
108
112
|
_this = _call_super(this, ColumnControlProperty, [
|
|
109
113
|
props
|
|
110
114
|
]), /**
|
|
@@ -132,22 +136,19 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
132
136
|
*/ _define_property(_this, "colSpan", void 0), /**
|
|
133
137
|
* 自动高度
|
|
134
138
|
* @defaultValue false
|
|
135
|
-
*/ _define_property(_this, "autoHeight", void 0),
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
*/ _define_property(_this, "autoHeight", void 0), /**
|
|
140
|
+
* 子控件
|
|
141
|
+
*/ _define_property(_this, "children", void 0);
|
|
142
|
+
_this.width = (_ref = props === null || props === void 0 ? void 0 : props.width) !== null && _ref !== void 0 ? _ref : 150;
|
|
138
143
|
_this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) || 'auto';
|
|
139
|
-
|
|
140
|
-
_this.
|
|
141
|
-
var _props_fixed;
|
|
142
|
-
_this.fixed = (_props_fixed = props === null || props === void 0 ? void 0 : props.fixed) !== null && _props_fixed !== void 0 ? _props_fixed : 'none';
|
|
144
|
+
_this.caption = (_ref1 = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref1 !== void 0 ? _ref1 : '';
|
|
145
|
+
_this.fixed = (_ref2 = props === null || props === void 0 ? void 0 : props.fixed) !== null && _ref2 !== void 0 ? _ref2 : 'none';
|
|
143
146
|
_this.autoWidth = new AutoWidth(props === null || props === void 0 ? void 0 : props.autoWidth);
|
|
144
147
|
_this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
|
|
145
|
-
|
|
146
|
-
_this.sort = (_props_sort = props === null || props === void 0 ? void 0 : props.sort) !== null && _props_sort !== void 0 ? _props_sort : true;
|
|
148
|
+
_this.sort = (_ref3 = props === null || props === void 0 ? void 0 : props.sort) !== null && _ref3 !== void 0 ? _ref3 : true;
|
|
147
149
|
_this.align = props === null || props === void 0 ? void 0 : props.align;
|
|
148
150
|
_this.colSpan = props === null || props === void 0 ? void 0 : props.colSpan;
|
|
149
|
-
|
|
150
|
-
_this.autoHeight = (_props_autoHeight = props === null || props === void 0 ? void 0 : props.autoHeight) !== null && _props_autoHeight !== void 0 ? _props_autoHeight : false;
|
|
151
|
+
_this.autoHeight = (_ref4 = props === null || props === void 0 ? void 0 : props.autoHeight) !== null && _ref4 !== void 0 ? _ref4 : false;
|
|
151
152
|
return _this;
|
|
152
153
|
}
|
|
153
154
|
return ColumnControlProperty;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* name: base_form_control_property
|
|
3
|
+
* description: 表单控件基础属性定义。提供字段绑定、标题展示、占位提示、默认值、必填校验、只读状态和气泡提示等表单通用配置。
|
|
4
|
+
*/ function _assert_this_initialized(self) {
|
|
2
5
|
if (self === void 0) {
|
|
3
6
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
7
|
}
|
|
@@ -193,90 +196,27 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
|
|
|
193
196
|
function BaseControlProperty(props) {
|
|
194
197
|
_class_call_check(this, BaseControlProperty);
|
|
195
198
|
var _this;
|
|
199
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14;
|
|
196
200
|
_this = _call_super(this, BaseControlProperty, [
|
|
197
201
|
props
|
|
198
|
-
]),
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
* @public
|
|
214
|
-
*/ _define_property(_this, "isCaptionItalic", void 0), /**
|
|
215
|
-
* 隐藏标题
|
|
216
|
-
* @defaultValue false
|
|
217
|
-
* @public
|
|
218
|
-
*/ _define_property(_this, "isHideCaption", void 0), /**
|
|
219
|
-
* 显示气泡提示
|
|
220
|
-
* @defaultValue false
|
|
221
|
-
* @public
|
|
222
|
-
*/ _define_property(_this, "isShowCaptionTip", void 0), /**
|
|
223
|
-
* 气泡提示语
|
|
224
|
-
* @defaultValue ''
|
|
225
|
-
* @public
|
|
226
|
-
*/ _define_property(_this, "captionTip", void 0), /**
|
|
227
|
-
* 标题布局
|
|
228
|
-
* @defaultValue ''
|
|
229
|
-
* @public
|
|
230
|
-
*/ _define_property(_this, "labelPosition", void 0), /**
|
|
231
|
-
* 绑定数据项
|
|
232
|
-
* @public
|
|
233
|
-
*/ _define_property(_this, "dataBind", void 0), /**
|
|
234
|
-
* 默认值
|
|
235
|
-
* @public
|
|
236
|
-
*/ _define_property(_this, "defaultValue", void 0), /**
|
|
237
|
-
* 提示文字
|
|
238
|
-
* @defaultValue ''
|
|
239
|
-
* @public
|
|
240
|
-
*/ _define_property(_this, "placeholder", void 0), /**
|
|
241
|
-
* 默认状态
|
|
242
|
-
* @defaultValue 'default'
|
|
243
|
-
* @public
|
|
244
|
-
*/ _define_property(_this, "defaultState", void 0), /**
|
|
245
|
-
* 必填
|
|
246
|
-
* @defaultValue false
|
|
247
|
-
* @public
|
|
248
|
-
*/ _define_property(_this, "required", void 0), /**
|
|
249
|
-
* 必填提示文案
|
|
250
|
-
* @defaultValue ''
|
|
251
|
-
*/ _define_property(_this, "requiredMessage", void 0);
|
|
252
|
-
var _props_caption;
|
|
253
|
-
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : '';
|
|
254
|
-
var _props_captionSize;
|
|
255
|
-
_this.captionSize = (_props_captionSize = props === null || props === void 0 ? void 0 : props.captionSize) !== null && _props_captionSize !== void 0 ? _props_captionSize : '';
|
|
256
|
-
var _props_captionColor;
|
|
257
|
-
_this.captionColor = (_props_captionColor = props === null || props === void 0 ? void 0 : props.captionColor) !== null && _props_captionColor !== void 0 ? _props_captionColor : '';
|
|
258
|
-
var _props_isCaptionItalic;
|
|
259
|
-
_this.isCaptionItalic = (_props_isCaptionItalic = props === null || props === void 0 ? void 0 : props.isCaptionItalic) !== null && _props_isCaptionItalic !== void 0 ? _props_isCaptionItalic : false;
|
|
260
|
-
var _props_isHideCaption;
|
|
261
|
-
_this.isHideCaption = (_props_isHideCaption = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _props_isHideCaption !== void 0 ? _props_isHideCaption : false;
|
|
262
|
-
var _props_isShowCaptionTip;
|
|
263
|
-
_this.isShowCaptionTip = (_props_isShowCaptionTip = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _props_isShowCaptionTip !== void 0 ? _props_isShowCaptionTip : false;
|
|
264
|
-
var _props_captionTip;
|
|
265
|
-
_this.captionTip = (_props_captionTip = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip : '';
|
|
266
|
-
var _props_defaultState;
|
|
267
|
-
_this.defaultState = (_props_defaultState = props === null || props === void 0 ? void 0 : props.defaultState) !== null && _props_defaultState !== void 0 ? _props_defaultState : 'default';
|
|
268
|
-
var _props_labelPosition;
|
|
269
|
-
_this.labelPosition = (_props_labelPosition = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : 'top';
|
|
270
|
-
var _props_placeholder;
|
|
271
|
-
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : '';
|
|
272
|
-
var _props_required;
|
|
273
|
-
_this.required = (_props_required = props === null || props === void 0 ? void 0 : props.required) !== null && _props_required !== void 0 ? _props_required : false;
|
|
274
|
-
var _props_requiredMessage;
|
|
275
|
-
_this.requiredMessage = (_props_requiredMessage = props === null || props === void 0 ? void 0 : props.requiredMessage) !== null && _props_requiredMessage !== void 0 ? _props_requiredMessage : '';
|
|
202
|
+
]), _define_property(_this, "caption", void 0), _define_property(_this, "captionSize", void 0), _define_property(_this, "captionColor", void 0), _define_property(_this, "isCaptionItalic", void 0), _define_property(_this, "captionFontWeight", void 0), _define_property(_this, "className", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "labelPosition", void 0), _define_property(_this, "dataBind", void 0), _define_property(_this, "defaultValue", void 0), _define_property(_this, "placeholder", void 0), _define_property(_this, "defaultState", void 0), _define_property(_this, "required", void 0), _define_property(_this, "requiredMessage", void 0);
|
|
203
|
+
_this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : '';
|
|
204
|
+
_this.captionSize = (_ref1 = props === null || props === void 0 ? void 0 : props.captionSize) !== null && _ref1 !== void 0 ? _ref1 : '';
|
|
205
|
+
_this.captionColor = (_ref2 = props === null || props === void 0 ? void 0 : props.captionColor) !== null && _ref2 !== void 0 ? _ref2 : '';
|
|
206
|
+
_this.isCaptionItalic = (_ref3 = props === null || props === void 0 ? void 0 : props.isCaptionItalic) !== null && _ref3 !== void 0 ? _ref3 : false;
|
|
207
|
+
_this.captionFontWeight = (_ref4 = props === null || props === void 0 ? void 0 : props.captionFontWeight) !== null && _ref4 !== void 0 ? _ref4 : 'normal';
|
|
208
|
+
_this.className = (_ref5 = props === null || props === void 0 ? void 0 : props.className) !== null && _ref5 !== void 0 ? _ref5 : [];
|
|
209
|
+
_this.isHideCaption = (_ref6 = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _ref6 !== void 0 ? _ref6 : false;
|
|
210
|
+
_this.isShowCaptionTip = (_ref7 = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _ref7 !== void 0 ? _ref7 : false;
|
|
211
|
+
_this.captionTip = (_ref8 = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _ref8 !== void 0 ? _ref8 : '';
|
|
212
|
+
_this.defaultState = (_ref9 = props === null || props === void 0 ? void 0 : props.defaultState) !== null && _ref9 !== void 0 ? _ref9 : 'default';
|
|
213
|
+
_this.labelPosition = (_ref10 = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _ref10 !== void 0 ? _ref10 : 'top';
|
|
214
|
+
_this.placeholder = (_ref11 = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _ref11 !== void 0 ? _ref11 : '';
|
|
215
|
+
_this.required = (_ref12 = props === null || props === void 0 ? void 0 : props.required) !== null && _ref12 !== void 0 ? _ref12 : false;
|
|
216
|
+
_this.requiredMessage = (_ref13 = props === null || props === void 0 ? void 0 : props.requiredMessage) !== null && _ref13 !== void 0 ? _ref13 : '';
|
|
276
217
|
//form 组件优先初始化DataBind
|
|
277
218
|
_this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
|
|
278
|
-
|
|
279
|
-
_this.defaultValue = (_props_defaultValue = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : '';
|
|
219
|
+
_this.defaultValue = (_ref14 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref14 !== void 0 ? _ref14 : '';
|
|
280
220
|
return _this;
|
|
281
221
|
}
|
|
282
222
|
return BaseControlProperty;
|
|
@@ -113,6 +113,7 @@ function _inherits(subClass, superClass) {
|
|
|
113
113
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
114
114
|
}
|
|
115
115
|
function _instanceof(left, right) {
|
|
116
|
+
"@swc/helpers - instanceof";
|
|
116
117
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
117
118
|
return !!right[Symbol.hasInstance](left);
|
|
118
119
|
} else {
|
|
@@ -216,9 +217,17 @@ function _ts_generator(thisArg, body) {
|
|
|
216
217
|
},
|
|
217
218
|
trys: [],
|
|
218
219
|
ops: []
|
|
219
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
220
|
-
return
|
|
221
|
-
|
|
220
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
221
|
+
return d(g, "next", {
|
|
222
|
+
value: verb(0)
|
|
223
|
+
}), d(g, "throw", {
|
|
224
|
+
value: verb(1)
|
|
225
|
+
}), d(g, "return", {
|
|
226
|
+
value: verb(2)
|
|
227
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
228
|
+
value: function() {
|
|
229
|
+
return this;
|
|
230
|
+
}
|
|
222
231
|
}), g;
|
|
223
232
|
function verb(n) {
|
|
224
233
|
return function(v) {
|
|
@@ -341,7 +350,7 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
341
350
|
key: "validate",
|
|
342
351
|
value: function validate(messages, ignore) {
|
|
343
352
|
var _this = this;
|
|
344
|
-
var _this1 = this, _superprop_get_validate = function() {
|
|
353
|
+
var _this1 = this, _superprop_get_validate = function _superprop_get_validate() {
|
|
345
354
|
return _get(_get_prototype_of(LayoutControl.prototype), "validate", _this);
|
|
346
355
|
};
|
|
347
356
|
return _async_to_generator(function() {
|
|
@@ -57,7 +57,10 @@ function _is_native_reflect_construct() {
|
|
|
57
57
|
return !!result;
|
|
58
58
|
})();
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* name: base_layout_control_property
|
|
62
|
+
* description: 布局控件基础属性定义。继承通用属性能力,为行、列、容器、页签等布局类控件提供统一的属性模型。
|
|
63
|
+
*/ import { Property } from '../BaseControl';
|
|
61
64
|
var LayoutControlProperty = /*#__PURE__*/ function(Property) {
|
|
62
65
|
"use strict";
|
|
63
66
|
_inherits(LayoutControlProperty, Property);
|
|
@@ -209,9 +209,17 @@ function _ts_generator(thisArg, body) {
|
|
|
209
209
|
},
|
|
210
210
|
trys: [],
|
|
211
211
|
ops: []
|
|
212
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
213
|
-
return
|
|
214
|
-
|
|
212
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
213
|
+
return d(g, "next", {
|
|
214
|
+
value: verb(0)
|
|
215
|
+
}), d(g, "throw", {
|
|
216
|
+
value: verb(1)
|
|
217
|
+
}), d(g, "return", {
|
|
218
|
+
value: verb(2)
|
|
219
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
220
|
+
value: function() {
|
|
221
|
+
return this;
|
|
222
|
+
}
|
|
215
223
|
}), g;
|
|
216
224
|
function verb(n) {
|
|
217
225
|
return function(v) {
|
|
@@ -311,7 +319,7 @@ var ListControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
311
319
|
key: "validate",
|
|
312
320
|
value: function validate(messages, ignore) {
|
|
313
321
|
var _this = this;
|
|
314
|
-
var _this1 = this, _superprop_get_validate = function() {
|
|
322
|
+
var _this1 = this, _superprop_get_validate = function _superprop_get_validate() {
|
|
315
323
|
return _get(_get_prototype_of(ListControl.prototype), "validate", _this);
|
|
316
324
|
};
|
|
317
325
|
return _async_to_generator(function() {
|
|
@@ -70,7 +70,10 @@ function _is_native_reflect_construct() {
|
|
|
70
70
|
return !!result;
|
|
71
71
|
})();
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
/**
|
|
74
|
+
* name: base_list_control_property
|
|
75
|
+
* description: 列表控件基础属性定义。提供表头、表尾、分页页码、每页条数、分页选项和总条数等列表通用配置。
|
|
76
|
+
*/ import { Property } from '../BaseControl';
|
|
74
77
|
import { defineControlArrayToProperty } from '../ControlArray';
|
|
75
78
|
var ListControlProperty = /*#__PURE__*/ function(Property) {
|
|
76
79
|
"use strict";
|
|
@@ -78,21 +81,30 @@ var ListControlProperty = /*#__PURE__*/ function(Property) {
|
|
|
78
81
|
function ListControlProperty(parent, props, mode) {
|
|
79
82
|
_class_call_check(this, ListControlProperty);
|
|
80
83
|
var _this;
|
|
84
|
+
var _ref, _ref1, _ref2, _ref3;
|
|
81
85
|
_this = _call_super(this, ListControlProperty, [
|
|
82
86
|
props
|
|
83
|
-
]),
|
|
87
|
+
]), /**
|
|
88
|
+
* 表头控件
|
|
89
|
+
*/ _define_property(_this, "headers", void 0), /**
|
|
90
|
+
* 表尾控件
|
|
91
|
+
*/ _define_property(_this, "footers", void 0), /**
|
|
92
|
+
* 当前页码
|
|
93
|
+
*/ _define_property(_this, "pageIndex", void 0), /**
|
|
94
|
+
* 每页条数
|
|
95
|
+
*/ _define_property(_this, "pageSize", void 0), /**
|
|
96
|
+
* 每页条数选项
|
|
97
|
+
*/ _define_property(_this, "pageSizeOptions", void 0), /**
|
|
98
|
+
* 总条数
|
|
99
|
+
*/ _define_property(_this, "totalCount", void 0);
|
|
84
100
|
defineControlArrayToProperty(_this, 'headers', props === null || props === void 0 ? void 0 : props.headers, parent, mode);
|
|
85
101
|
defineControlArrayToProperty(_this, 'footers', props === null || props === void 0 ? void 0 : props.footers, parent);
|
|
86
|
-
|
|
87
|
-
_this.
|
|
88
|
-
|
|
89
|
-
_this.pageSize = (_props_pageSize = props === null || props === void 0 ? void 0 : props.pageSize) !== null && _props_pageSize !== void 0 ? _props_pageSize : 20;
|
|
90
|
-
var _props_pageSizeOptions;
|
|
91
|
-
_this.pageSizeOptions = (_props_pageSizeOptions = props === null || props === void 0 ? void 0 : props.pageSizeOptions) !== null && _props_pageSizeOptions !== void 0 ? _props_pageSizeOptions : [
|
|
102
|
+
_this.pageIndex = (_ref = props === null || props === void 0 ? void 0 : props.pageIndex) !== null && _ref !== void 0 ? _ref : 1;
|
|
103
|
+
_this.pageSize = (_ref1 = props === null || props === void 0 ? void 0 : props.pageSize) !== null && _ref1 !== void 0 ? _ref1 : 20;
|
|
104
|
+
_this.pageSizeOptions = (_ref2 = props === null || props === void 0 ? void 0 : props.pageSizeOptions) !== null && _ref2 !== void 0 ? _ref2 : [
|
|
92
105
|
20
|
|
93
106
|
];
|
|
94
|
-
|
|
95
|
-
_this.totalCount = (_props_totalCount = props === null || props === void 0 ? void 0 : props.totalCount) !== null && _props_totalCount !== void 0 ? _props_totalCount : 0;
|
|
107
|
+
_this.totalCount = (_ref3 = props === null || props === void 0 ? void 0 : props.totalCount) !== null && _ref3 !== void 0 ? _ref3 : 0;
|
|
96
108
|
return _this;
|
|
97
109
|
}
|
|
98
110
|
return ListControlProperty;
|
|
@@ -70,7 +70,10 @@ function _is_native_reflect_construct() {
|
|
|
70
70
|
return !!result;
|
|
71
71
|
})();
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
/**
|
|
74
|
+
* name: base_search_control_property
|
|
75
|
+
* description: 查询控件基础属性定义。提供查询视图的数据项绑定配置,用于搜索区域控件与数据字段建立关联。
|
|
76
|
+
*/ import { LayoutControlProperty } from '../LayoutControl';
|
|
74
77
|
import { DataBind } from '../../framework';
|
|
75
78
|
var SearchControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
|
|
76
79
|
"use strict";
|
|
@@ -80,7 +83,9 @@ var SearchControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
|
|
|
80
83
|
var _this;
|
|
81
84
|
_this = _call_super(this, SearchControlProperty, [
|
|
82
85
|
props
|
|
83
|
-
]),
|
|
86
|
+
]), /**
|
|
87
|
+
* 绑定数据项
|
|
88
|
+
*/ _define_property(_this, "dataBind", void 0);
|
|
84
89
|
_this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
|
|
85
90
|
return _this;
|
|
86
91
|
}
|
|
@@ -57,7 +57,10 @@ function _is_native_reflect_construct() {
|
|
|
57
57
|
return !!result;
|
|
58
58
|
})();
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* name: base_wrap_control_property
|
|
62
|
+
* description: 包裹控件基础属性定义。继承布局属性能力,为外层包裹类控件提供统一的属性模型。
|
|
63
|
+
*/ import { LayoutControlProperty } from '../LayoutControl';
|
|
61
64
|
var WrapControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
|
|
62
65
|
"use strict";
|
|
63
66
|
_inherits(WrapControlProperty, LayoutControlProperty);
|