@byteluck-fe/model-driven-core 7.0.0-props.10 → 7.0.0-props.15
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 +12 -17
- package/dist/esm/common/BaseControl/property.js +4 -3
- package/dist/esm/common/BaseControl/runtime.js +11 -7
- package/dist/esm/common/ColumnControl/property.js +10 -6
- package/dist/esm/common/FormControl/property.js +26 -14
- package/dist/esm/common/LayoutControl/designer.js +4 -12
- package/dist/esm/common/ListControl/designer.js +4 -12
- package/dist/esm/common/ListControl/property.js +8 -5
- package/dist/esm/framework/index.js +351 -236
- package/dist/index.umd.js +1 -1
- package/package.json +3 -3
|
@@ -128,17 +128,9 @@ function _ts_generator(thisArg, body) {
|
|
|
128
128
|
},
|
|
129
129
|
trys: [],
|
|
130
130
|
ops: []
|
|
131
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype)
|
|
132
|
-
return
|
|
133
|
-
|
|
134
|
-
}), d(g, "throw", {
|
|
135
|
-
value: verb(1)
|
|
136
|
-
}), d(g, "return", {
|
|
137
|
-
value: verb(2)
|
|
138
|
-
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
139
|
-
value: function() {
|
|
140
|
-
return this;
|
|
141
|
-
}
|
|
131
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
132
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
133
|
+
return this;
|
|
142
134
|
}), g;
|
|
143
135
|
function verb(n) {
|
|
144
136
|
return function(v) {
|
|
@@ -228,7 +220,6 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
228
220
|
function Control(props) {
|
|
229
221
|
var _this = this;
|
|
230
222
|
_class_call_check(this, Control);
|
|
231
|
-
var _ref, _ref1, _ref2, _ref3;
|
|
232
223
|
_define_property(this, "id", void 0); // 唯一标识符
|
|
233
224
|
_define_property(this, "name", void 0);
|
|
234
225
|
_define_property(this, "icon", void 0);
|
|
@@ -245,18 +236,22 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
245
236
|
_define_property(this, "updateSetting", updateSetting);
|
|
246
237
|
_define_property(this, "removeSetting", removeSetting);
|
|
247
238
|
this._callControlHooks('preInstance', props);
|
|
248
|
-
var
|
|
239
|
+
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;
|
|
249
240
|
if (!(controlName && controlIcon && controlType)) {
|
|
250
241
|
referenceError("The ".concat(name, " controlName,controlIcon,controlType is not define"));
|
|
251
242
|
}
|
|
252
|
-
|
|
243
|
+
var _props_id;
|
|
244
|
+
this.id = (_props_id = props === null || props === void 0 ? void 0 : props.id) !== null && _props_id !== void 0 ? _props_id : genNonDuplicateId(10);
|
|
253
245
|
this.name = controlName;
|
|
254
246
|
this.icon = controlIcon;
|
|
255
|
-
|
|
247
|
+
var _props_type;
|
|
248
|
+
this.type = (_props_type = props === null || props === void 0 ? void 0 : props.type) !== null && _props_type !== void 0 ? _props_type : controlType;
|
|
256
249
|
this.props = new Property(props === null || props === void 0 ? void 0 : props.props, (_instanceof(this, Control) ? this.constructor : void 0).controlName);
|
|
257
|
-
|
|
250
|
+
var _props_controlType;
|
|
251
|
+
this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : 'base';
|
|
258
252
|
this.setting = JSONCopy(setting);
|
|
259
|
-
|
|
253
|
+
var _props_fieldType;
|
|
254
|
+
this.fieldType = (_props_fieldType = props === null || props === void 0 ? void 0 : props.fieldType) !== null && _props_fieldType !== void 0 ? _props_fieldType : controlFieldType;
|
|
260
255
|
this.eventKeys = JSONCopy(controlEventKeys);
|
|
261
256
|
this.customEvents = JSONCopy(controlCustomEvents);
|
|
262
257
|
this.slots = JSONCopy(slots);
|
|
@@ -140,15 +140,16 @@ var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
|
|
|
140
140
|
"use strict";
|
|
141
141
|
var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
|
142
142
|
_class_call_check(this, Property);
|
|
143
|
-
var _ref, _ref1;
|
|
144
143
|
_define_property(this, "isHide", void 0);
|
|
145
144
|
_define_property(this, "className", void 0);
|
|
146
145
|
_define_property(this, "style", void 0);
|
|
147
146
|
_define_property(this, "caption", void 0);
|
|
148
147
|
_define_property(this, "defaultState", void 0);
|
|
149
|
-
|
|
148
|
+
var _props_isHide;
|
|
149
|
+
this.isHide = (_props_isHide = props === null || props === void 0 ? void 0 : props.isHide) !== null && _props_isHide !== void 0 ? _props_isHide : false;
|
|
150
150
|
this.style = new BaseStyle(props === null || props === void 0 ? void 0 : props.style);
|
|
151
|
-
|
|
151
|
+
var _props_caption;
|
|
152
|
+
this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : caption;
|
|
152
153
|
};
|
|
153
154
|
_define_property(Property, "mode", void 0);
|
|
154
155
|
_define_property(Property, "Rules", PropertyRules);
|
|
@@ -44,7 +44,6 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
44
44
|
"use strict";
|
|
45
45
|
function Control(props) {
|
|
46
46
|
_class_call_check(this, Control);
|
|
47
|
-
var _ref, _ref1, _ref2, _ref3, _ref4;
|
|
48
47
|
_define_property(this, "id", void 0); // 唯一标识符
|
|
49
48
|
_define_property(this, "type", void 0);
|
|
50
49
|
_define_property(this, "controlType", void 0);
|
|
@@ -53,17 +52,22 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
53
52
|
_define_property(this, "customEvents", []);
|
|
54
53
|
_define_property(this, "pageStatus", void 0);
|
|
55
54
|
_define_property(this, "parent", null);
|
|
56
|
-
var
|
|
55
|
+
var _ref = _instanceof(this, Control) ? this.constructor : void 0, controlType = _ref.controlType, controlFieldType = _ref.controlFieldType, name = _ref.name, controlCustomEvents = _ref.controlCustomEvents;
|
|
57
56
|
if (!controlType) {
|
|
58
57
|
referenceError("The ".concat(name, " controlType is not define"));
|
|
59
58
|
}
|
|
60
|
-
|
|
61
|
-
this.
|
|
59
|
+
var _props_id;
|
|
60
|
+
this.id = (_props_id = props === null || props === void 0 ? void 0 : props.id) !== null && _props_id !== void 0 ? _props_id : genNonDuplicateId(10);
|
|
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;
|
|
62
63
|
this.props = new Property(props === null || props === void 0 ? void 0 : props.props);
|
|
63
64
|
this.customEvents = controlCustomEvents;
|
|
64
|
-
|
|
65
|
-
this.
|
|
66
|
-
|
|
65
|
+
var _props_controlType;
|
|
66
|
+
this.controlType = (_props_controlType = props === null || props === void 0 ? void 0 : props.controlType) !== null && _props_controlType !== void 0 ? _props_controlType : 'base';
|
|
67
|
+
var _props_fieldType;
|
|
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;
|
|
67
71
|
}
|
|
68
72
|
_create_class(Control, [
|
|
69
73
|
{
|
|
@@ -105,20 +105,24 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
105
105
|
function ColumnControlProperty(props) {
|
|
106
106
|
_class_call_check(this, ColumnControlProperty);
|
|
107
107
|
var _this;
|
|
108
|
-
var _ref, _ref1, _ref2, _ref3, _ref4;
|
|
109
108
|
_this = _call_super(this, ColumnControlProperty, [
|
|
110
109
|
props
|
|
111
110
|
]), _define_property(_this, "widthType", void 0), _define_property(_this, "width", void 0), _define_property(_this, "caption", void 0), _define_property(_this, "dataBind", void 0), _define_property(_this, "autoWidth", void 0), _define_property(_this, "fixed", void 0), _define_property(_this, "sort", void 0), _define_property(_this, "align", void 0), _define_property(_this, "colSpan", void 0), _define_property(_this, "autoHeight", void 0), _define_property(_this, "children", void 0);
|
|
112
|
-
|
|
111
|
+
var _props_width;
|
|
112
|
+
_this.width = (_props_width = props === null || props === void 0 ? void 0 : props.width) !== null && _props_width !== void 0 ? _props_width : 150;
|
|
113
113
|
_this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) || 'auto';
|
|
114
|
-
|
|
115
|
-
_this.
|
|
114
|
+
var _props_caption;
|
|
115
|
+
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : '';
|
|
116
|
+
var _props_fixed;
|
|
117
|
+
_this.fixed = (_props_fixed = props === null || props === void 0 ? void 0 : props.fixed) !== null && _props_fixed !== void 0 ? _props_fixed : 'none';
|
|
116
118
|
_this.autoWidth = new AutoWidth(props === null || props === void 0 ? void 0 : props.autoWidth);
|
|
117
119
|
_this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
|
|
118
|
-
|
|
120
|
+
var _props_sort;
|
|
121
|
+
_this.sort = (_props_sort = props === null || props === void 0 ? void 0 : props.sort) !== null && _props_sort !== void 0 ? _props_sort : true;
|
|
119
122
|
_this.align = props === null || props === void 0 ? void 0 : props.align;
|
|
120
123
|
_this.colSpan = props === null || props === void 0 ? void 0 : props.colSpan;
|
|
121
|
-
|
|
124
|
+
var _props_autoHeight;
|
|
125
|
+
_this.autoHeight = (_props_autoHeight = props === null || props === void 0 ? void 0 : props.autoHeight) !== null && _props_autoHeight !== void 0 ? _props_autoHeight : false;
|
|
122
126
|
return _this;
|
|
123
127
|
}
|
|
124
128
|
return ColumnControlProperty;
|
|
@@ -193,25 +193,37 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
|
|
|
193
193
|
function BaseControlProperty(props) {
|
|
194
194
|
_class_call_check(this, BaseControlProperty);
|
|
195
195
|
var _this;
|
|
196
|
-
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12;
|
|
197
196
|
_this = _call_super(this, BaseControlProperty, [
|
|
198
197
|
props
|
|
199
198
|
]), _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, "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);
|
|
200
|
-
|
|
201
|
-
_this.
|
|
202
|
-
|
|
203
|
-
_this.
|
|
204
|
-
|
|
205
|
-
_this.
|
|
206
|
-
|
|
207
|
-
_this.
|
|
208
|
-
|
|
209
|
-
_this.
|
|
210
|
-
|
|
211
|
-
_this.
|
|
199
|
+
var _props_caption;
|
|
200
|
+
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : '';
|
|
201
|
+
var _props_captionSize;
|
|
202
|
+
_this.captionSize = (_props_captionSize = props === null || props === void 0 ? void 0 : props.captionSize) !== null && _props_captionSize !== void 0 ? _props_captionSize : '';
|
|
203
|
+
var _props_captionColor;
|
|
204
|
+
_this.captionColor = (_props_captionColor = props === null || props === void 0 ? void 0 : props.captionColor) !== null && _props_captionColor !== void 0 ? _props_captionColor : '';
|
|
205
|
+
var _props_isCaptionItalic;
|
|
206
|
+
_this.isCaptionItalic = (_props_isCaptionItalic = props === null || props === void 0 ? void 0 : props.isCaptionItalic) !== null && _props_isCaptionItalic !== void 0 ? _props_isCaptionItalic : false;
|
|
207
|
+
var _props_isHideCaption;
|
|
208
|
+
_this.isHideCaption = (_props_isHideCaption = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _props_isHideCaption !== void 0 ? _props_isHideCaption : false;
|
|
209
|
+
var _props_isShowCaptionTip;
|
|
210
|
+
_this.isShowCaptionTip = (_props_isShowCaptionTip = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _props_isShowCaptionTip !== void 0 ? _props_isShowCaptionTip : false;
|
|
211
|
+
var _props_captionTip;
|
|
212
|
+
_this.captionTip = (_props_captionTip = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip : '';
|
|
213
|
+
var _props_defaultState;
|
|
214
|
+
_this.defaultState = (_props_defaultState = props === null || props === void 0 ? void 0 : props.defaultState) !== null && _props_defaultState !== void 0 ? _props_defaultState : 'default';
|
|
215
|
+
var _props_labelPosition;
|
|
216
|
+
_this.labelPosition = (_props_labelPosition = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : 'top';
|
|
217
|
+
var _props_placeholder;
|
|
218
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : '';
|
|
219
|
+
var _props_required;
|
|
220
|
+
_this.required = (_props_required = props === null || props === void 0 ? void 0 : props.required) !== null && _props_required !== void 0 ? _props_required : false;
|
|
221
|
+
var _props_requiredMessage;
|
|
222
|
+
_this.requiredMessage = (_props_requiredMessage = props === null || props === void 0 ? void 0 : props.requiredMessage) !== null && _props_requiredMessage !== void 0 ? _props_requiredMessage : '';
|
|
212
223
|
//form 组件优先初始化DataBind
|
|
213
224
|
_this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
|
|
214
|
-
|
|
225
|
+
var _props_defaultValue;
|
|
226
|
+
_this.defaultValue = (_props_defaultValue = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : '';
|
|
215
227
|
return _this;
|
|
216
228
|
}
|
|
217
229
|
return BaseControlProperty;
|
|
@@ -216,17 +216,9 @@ function _ts_generator(thisArg, body) {
|
|
|
216
216
|
},
|
|
217
217
|
trys: [],
|
|
218
218
|
ops: []
|
|
219
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype)
|
|
220
|
-
return
|
|
221
|
-
|
|
222
|
-
}), d(g, "throw", {
|
|
223
|
-
value: verb(1)
|
|
224
|
-
}), d(g, "return", {
|
|
225
|
-
value: verb(2)
|
|
226
|
-
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
227
|
-
value: function() {
|
|
228
|
-
return this;
|
|
229
|
-
}
|
|
219
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
220
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
221
|
+
return this;
|
|
230
222
|
}), g;
|
|
231
223
|
function verb(n) {
|
|
232
224
|
return function(v) {
|
|
@@ -349,7 +341,7 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
349
341
|
key: "validate",
|
|
350
342
|
value: function validate(messages, ignore) {
|
|
351
343
|
var _this = this;
|
|
352
|
-
var _this1 = this, _superprop_get_validate = function
|
|
344
|
+
var _this1 = this, _superprop_get_validate = function() {
|
|
353
345
|
return _get(_get_prototype_of(LayoutControl.prototype), "validate", _this);
|
|
354
346
|
};
|
|
355
347
|
return _async_to_generator(function() {
|
|
@@ -209,17 +209,9 @@ 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
|
-
|
|
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
|
-
}
|
|
212
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
213
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
214
|
+
return this;
|
|
223
215
|
}), g;
|
|
224
216
|
function verb(n) {
|
|
225
217
|
return function(v) {
|
|
@@ -319,7 +311,7 @@ var ListControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
319
311
|
key: "validate",
|
|
320
312
|
value: function validate(messages, ignore) {
|
|
321
313
|
var _this = this;
|
|
322
|
-
var _this1 = this, _superprop_get_validate = function
|
|
314
|
+
var _this1 = this, _superprop_get_validate = function() {
|
|
323
315
|
return _get(_get_prototype_of(ListControl.prototype), "validate", _this);
|
|
324
316
|
};
|
|
325
317
|
return _async_to_generator(function() {
|
|
@@ -78,18 +78,21 @@ var ListControlProperty = /*#__PURE__*/ function(Property) {
|
|
|
78
78
|
function ListControlProperty(parent, props, mode) {
|
|
79
79
|
_class_call_check(this, ListControlProperty);
|
|
80
80
|
var _this;
|
|
81
|
-
var _ref, _ref1, _ref2, _ref3;
|
|
82
81
|
_this = _call_super(this, ListControlProperty, [
|
|
83
82
|
props
|
|
84
83
|
]), _define_property(_this, "headers", void 0), _define_property(_this, "footers", void 0), _define_property(_this, "pageIndex", void 0), _define_property(_this, "pageSize", void 0), _define_property(_this, "pageSizeOptions", void 0), _define_property(_this, "totalCount", void 0);
|
|
85
84
|
defineControlArrayToProperty(_this, 'headers', props === null || props === void 0 ? void 0 : props.headers, parent, mode);
|
|
86
85
|
defineControlArrayToProperty(_this, 'footers', props === null || props === void 0 ? void 0 : props.footers, parent);
|
|
87
|
-
|
|
88
|
-
_this.
|
|
89
|
-
|
|
86
|
+
var _props_pageIndex;
|
|
87
|
+
_this.pageIndex = (_props_pageIndex = props === null || props === void 0 ? void 0 : props.pageIndex) !== null && _props_pageIndex !== void 0 ? _props_pageIndex : 1;
|
|
88
|
+
var _props_pageSize;
|
|
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 : [
|
|
90
92
|
20
|
|
91
93
|
];
|
|
92
|
-
|
|
94
|
+
var _props_totalCount;
|
|
95
|
+
_this.totalCount = (_props_totalCount = props === null || props === void 0 ? void 0 : props.totalCount) !== null && _props_totalCount !== void 0 ? _props_totalCount : 0;
|
|
93
96
|
return _this;
|
|
94
97
|
}
|
|
95
98
|
return ListControlProperty;
|