@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
|
@@ -82,11 +82,11 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { RulesMessage, JSONCopy } from
|
|
86
|
-
import { Property, PropertyRules, PropertyRuntimeRules } from
|
|
87
|
-
import { initOptionAndDataSourceRules } from
|
|
88
|
-
import { DataBind } from
|
|
89
|
-
import { isDataBind } from
|
|
85
|
+
import { RulesMessage, JSONCopy } from '@byteluck-fe/model-driven-shared';
|
|
86
|
+
import { Property, PropertyRules, PropertyRuntimeRules } from '../BaseControl';
|
|
87
|
+
import { initOptionAndDataSourceRules } from '../initOptionAndDataSourceRules';
|
|
88
|
+
import { DataBind } from '../../framework';
|
|
89
|
+
import { isDataBind } from '../../framework/isDataBind';
|
|
90
90
|
var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
91
91
|
"use strict";
|
|
92
92
|
_inherits(BaseControlPropertyRules, PropertyRules);
|
|
@@ -97,18 +97,18 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
97
97
|
_this = _super.call(this, props);
|
|
98
98
|
_define_property(_assert_this_initialized(_this), "dataBind", {});
|
|
99
99
|
_define_property(_assert_this_initialized(_this), "caption", {
|
|
100
|
-
type:
|
|
100
|
+
type: 'string',
|
|
101
101
|
required: true,
|
|
102
|
-
message: RulesMessage.getMessage(
|
|
102
|
+
message: RulesMessage.getMessage('pleaseEnterCaption')
|
|
103
103
|
});
|
|
104
104
|
_define_property(_assert_this_initialized(_this), "isHideCaption", {
|
|
105
|
-
type:
|
|
105
|
+
type: 'boolean'
|
|
106
106
|
});
|
|
107
107
|
_define_property(_assert_this_initialized(_this), "labelPosition", {
|
|
108
|
-
type:
|
|
108
|
+
type: 'enum',
|
|
109
109
|
enum: [
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
'top',
|
|
111
|
+
'left'
|
|
112
112
|
]
|
|
113
113
|
});
|
|
114
114
|
// 去掉placeholder必填校验
|
|
@@ -118,54 +118,54 @@ var BaseControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
118
118
|
// message: RulesMessage.getMessage('pleaseEnterPlaceholder'),
|
|
119
119
|
// }
|
|
120
120
|
_define_property(_assert_this_initialized(_this), "defaultState", {
|
|
121
|
-
type:
|
|
121
|
+
type: 'enum',
|
|
122
122
|
enum: [
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
'default',
|
|
124
|
+
'readonly'
|
|
125
125
|
]
|
|
126
126
|
});
|
|
127
127
|
_define_property(_assert_this_initialized(_this), "required", {
|
|
128
|
-
type:
|
|
128
|
+
type: 'boolean'
|
|
129
129
|
});
|
|
130
130
|
_define_property(_assert_this_initialized(_this), "captionTip", {
|
|
131
|
-
type:
|
|
131
|
+
type: 'string',
|
|
132
132
|
required: false,
|
|
133
|
-
message: RulesMessage.getMessage(
|
|
133
|
+
message: RulesMessage.getMessage('pleaseEnterCaptionTip')
|
|
134
134
|
});
|
|
135
135
|
// 初始化dataBind的校验规则
|
|
136
136
|
var validateFields = {
|
|
137
137
|
fieldCode: {
|
|
138
|
-
type:
|
|
138
|
+
type: 'string',
|
|
139
139
|
required: true,
|
|
140
|
-
message: RulesMessage.getMessage(
|
|
140
|
+
message: RulesMessage.getMessage('pleaseEnterFieldCode')
|
|
141
141
|
},
|
|
142
142
|
dataCode: {
|
|
143
|
-
type:
|
|
143
|
+
type: 'string',
|
|
144
144
|
required: true,
|
|
145
|
-
message: RulesMessage.getMessage(
|
|
145
|
+
message: RulesMessage.getMessage('pleaseEnterFieldCode')
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
// if (props.dataBind instanceof DataBind) {
|
|
149
149
|
if (isDataBind(props.dataBind)) {
|
|
150
150
|
_this.dataBind = {
|
|
151
|
-
type:
|
|
151
|
+
type: 'object',
|
|
152
152
|
required: true,
|
|
153
153
|
fields: JSONCopy(validateFields),
|
|
154
|
-
message: RulesMessage.getMessage(
|
|
154
|
+
message: RulesMessage.getMessage('pleaseEnterFieldCode')
|
|
155
155
|
};
|
|
156
156
|
} else {
|
|
157
157
|
var dataBind = {
|
|
158
|
-
type:
|
|
158
|
+
type: 'object',
|
|
159
159
|
required: true,
|
|
160
160
|
fields: {},
|
|
161
|
-
message: RulesMessage.getMessage(
|
|
161
|
+
message: RulesMessage.getMessage('pleaseEnterFieldCode')
|
|
162
162
|
};
|
|
163
163
|
Object.keys(props.dataBind).forEach(function(key) {
|
|
164
164
|
dataBind.fields[key] = {
|
|
165
|
-
type:
|
|
165
|
+
type: 'object',
|
|
166
166
|
required: true,
|
|
167
167
|
fields: JSONCopy(validateFields),
|
|
168
|
-
message: RulesMessage.getMessage(
|
|
168
|
+
message: RulesMessage.getMessage('pleaseEnterFieldCode')
|
|
169
169
|
};
|
|
170
170
|
});
|
|
171
171
|
_this.dataBind = dataBind;
|
|
@@ -188,9 +188,9 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
|
|
|
188
188
|
var isRequired = props.isHide ? false : props.required;
|
|
189
189
|
if (isRequired) {
|
|
190
190
|
_this.push({
|
|
191
|
-
type:
|
|
191
|
+
type: 'string',
|
|
192
192
|
required: isRequired,
|
|
193
|
-
message: props.requiredMessage !==
|
|
193
|
+
message: props.requiredMessage !== '' ? props.requiredMessage : RulesMessage.getMessage('runtimeRequired', {
|
|
194
194
|
caption: props.caption
|
|
195
195
|
})
|
|
196
196
|
});
|
|
@@ -263,27 +263,27 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
|
|
|
263
263
|
* @defaultValue ''
|
|
264
264
|
*/ _define_property(_assert_this_initialized(_this), "requiredMessage", void 0);
|
|
265
265
|
var _props_caption;
|
|
266
|
-
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption :
|
|
266
|
+
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : '';
|
|
267
267
|
var _props_isHideCaption;
|
|
268
268
|
_this.isHideCaption = (_props_isHideCaption = props === null || props === void 0 ? void 0 : props.isHideCaption) !== null && _props_isHideCaption !== void 0 ? _props_isHideCaption : false;
|
|
269
269
|
var _props_isShowCaptionTip;
|
|
270
270
|
_this.isShowCaptionTip = (_props_isShowCaptionTip = props === null || props === void 0 ? void 0 : props.isShowCaptionTip) !== null && _props_isShowCaptionTip !== void 0 ? _props_isShowCaptionTip : false;
|
|
271
271
|
var _props_captionTip;
|
|
272
|
-
_this.captionTip = (_props_captionTip = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip :
|
|
272
|
+
_this.captionTip = (_props_captionTip = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip : '';
|
|
273
273
|
var _props_defaultState;
|
|
274
|
-
_this.defaultState = (_props_defaultState = props === null || props === void 0 ? void 0 : props.defaultState) !== null && _props_defaultState !== void 0 ? _props_defaultState :
|
|
274
|
+
_this.defaultState = (_props_defaultState = props === null || props === void 0 ? void 0 : props.defaultState) !== null && _props_defaultState !== void 0 ? _props_defaultState : 'default';
|
|
275
275
|
var _props_labelPosition;
|
|
276
|
-
_this.labelPosition = (_props_labelPosition = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition :
|
|
276
|
+
_this.labelPosition = (_props_labelPosition = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : 'top';
|
|
277
277
|
var _props_placeholder;
|
|
278
|
-
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder :
|
|
278
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : '';
|
|
279
279
|
var _props_required;
|
|
280
280
|
_this.required = (_props_required = props === null || props === void 0 ? void 0 : props.required) !== null && _props_required !== void 0 ? _props_required : false;
|
|
281
281
|
var _props_requiredMessage;
|
|
282
|
-
_this.requiredMessage = (_props_requiredMessage = props === null || props === void 0 ? void 0 : props.requiredMessage) !== null && _props_requiredMessage !== void 0 ? _props_requiredMessage :
|
|
282
|
+
_this.requiredMessage = (_props_requiredMessage = props === null || props === void 0 ? void 0 : props.requiredMessage) !== null && _props_requiredMessage !== void 0 ? _props_requiredMessage : '';
|
|
283
283
|
//form 组件优先初始化DataBind
|
|
284
284
|
_this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
|
|
285
285
|
var _props_defaultValue;
|
|
286
|
-
_this.defaultValue = (_props_defaultValue = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue :
|
|
286
|
+
_this.defaultValue = (_props_defaultValue = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : '';
|
|
287
287
|
return _this;
|
|
288
288
|
}
|
|
289
289
|
return BaseControlProperty;
|
|
@@ -299,23 +299,23 @@ var OptionAndDataSourcePropertyRules = /*#__PURE__*/ function(BaseControlPropert
|
|
|
299
299
|
var _this;
|
|
300
300
|
_this = _super.call(this, props);
|
|
301
301
|
_define_property(_assert_this_initialized(_this), "optionConfig", {
|
|
302
|
-
type:
|
|
302
|
+
type: 'enum',
|
|
303
303
|
enum: [
|
|
304
|
-
|
|
305
|
-
|
|
304
|
+
'custom',
|
|
305
|
+
'datasource'
|
|
306
306
|
],
|
|
307
|
-
message: RulesMessage.getMessage(
|
|
307
|
+
message: RulesMessage.getMessage('PleaseSelectTheCorrectOptionSettings')
|
|
308
308
|
});
|
|
309
309
|
_define_property(_assert_this_initialized(_this), "options", [
|
|
310
310
|
{
|
|
311
|
-
type:
|
|
312
|
-
message: RulesMessage.getMessage(
|
|
311
|
+
type: 'array',
|
|
312
|
+
message: RulesMessage.getMessage('isNotArray')
|
|
313
313
|
}
|
|
314
314
|
]);
|
|
315
315
|
_define_property(_assert_this_initialized(_this), "datasourceBind", [
|
|
316
316
|
{
|
|
317
|
-
type:
|
|
318
|
-
message: RulesMessage.getMessage(
|
|
317
|
+
type: 'object',
|
|
318
|
+
message: RulesMessage.getMessage('isNotObject')
|
|
319
319
|
}
|
|
320
320
|
]);
|
|
321
321
|
initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
|
|
@@ -82,8 +82,8 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { RuntimeControl } from
|
|
86
|
-
import BaseControlProperty from
|
|
85
|
+
import { RuntimeControl } from '../BaseControl';
|
|
86
|
+
import BaseControlProperty from './property';
|
|
87
87
|
var FormControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
88
88
|
"use strict";
|
|
89
89
|
_inherits(FormControl, RuntimeControl);
|
|
@@ -92,7 +92,7 @@ var FormControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
|
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
|
_define_property(_assert_this_initialized(_this), "value", void 0);
|
|
98
98
|
_this.props = new BaseControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
@@ -314,10 +314,10 @@ function _ts_generator(thisArg, body) {
|
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
import { JSONCopy } from
|
|
318
|
-
import { DesignerControl } from
|
|
319
|
-
import LayoutControlProperty from
|
|
320
|
-
import { defineControlArrayToProperty } from
|
|
317
|
+
import { JSONCopy } from '@byteluck-fe/model-driven-shared';
|
|
318
|
+
import { DesignerControl } from '../BaseControl';
|
|
319
|
+
import LayoutControlProperty from './property';
|
|
320
|
+
import { defineControlArrayToProperty } from '../ControlArray';
|
|
321
321
|
// 最大可拖入数量
|
|
322
322
|
var CHILDREN_MAX_LENGTH = 10000;
|
|
323
323
|
var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
@@ -328,14 +328,14 @@ var LayoutControl = /*#__PURE__*/ function _target(DesignerControl) {
|
|
|
328
328
|
_class_call_check(this, LayoutControl);
|
|
329
329
|
var _this;
|
|
330
330
|
_this = _super.call(this, props);
|
|
331
|
-
_define_property(_assert_this_initialized(_this), "controlType",
|
|
331
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'layout');
|
|
332
332
|
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
333
333
|
_define_property(_assert_this_initialized(_this), "excludes", void 0);
|
|
334
334
|
_define_property(_assert_this_initialized(_this), "childrenMaxLength", void 0);
|
|
335
335
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
336
336
|
var _ref = _instanceof(this, LayoutControl) ? this.constructor : void 0, excludes = _ref.excludes, childrenMaxLength = _ref.childrenMaxLength;
|
|
337
337
|
_this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
338
|
-
defineControlArrayToProperty(_assert_this_initialized(_this),
|
|
338
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Designer');
|
|
339
339
|
_this.excludes = JSONCopy(excludes);
|
|
340
340
|
_this.childrenMaxLength = childrenMaxLength;
|
|
341
341
|
return _this;
|
|
@@ -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';
|
|
@@ -69,7 +69,7 @@ function _create_super(Derived) {
|
|
|
69
69
|
return _possible_constructor_return(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import { Property } from
|
|
72
|
+
import { Property } from '../BaseControl';
|
|
73
73
|
var LayoutControlProperty = /*#__PURE__*/ function(Property) {
|
|
74
74
|
"use strict";
|
|
75
75
|
_inherits(LayoutControlProperty, Property);
|
|
@@ -82,9 +82,9 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { RuntimeControl } from
|
|
86
|
-
import LayoutControlProperty from
|
|
87
|
-
import { defineControlArrayToProperty } from
|
|
85
|
+
import { RuntimeControl } from '../BaseControl';
|
|
86
|
+
import LayoutControlProperty from './property';
|
|
87
|
+
import { defineControlArrayToProperty } from '../ControlArray';
|
|
88
88
|
var LayoutControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
89
89
|
"use strict";
|
|
90
90
|
_inherits(LayoutControl, RuntimeControl);
|
|
@@ -93,11 +93,11 @@ var LayoutControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
|
93
93
|
_class_call_check(this, LayoutControl);
|
|
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", 'layout');
|
|
97
97
|
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
98
98
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
99
99
|
_this.props = new LayoutControlProperty(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 LayoutControl;
|
|
@@ -307,9 +307,9 @@ function _ts_generator(thisArg, body) {
|
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
import { DesignerControl } from
|
|
311
|
-
import ListControlProperty from
|
|
312
|
-
import { FieldTypes } from
|
|
310
|
+
import { DesignerControl } from '../BaseControl';
|
|
311
|
+
import ListControlProperty from './property';
|
|
312
|
+
import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
|
313
313
|
var ListControl = /*#__PURE__*/ function(DesignerControl) {
|
|
314
314
|
"use strict";
|
|
315
315
|
_inherits(ListControl, DesignerControl);
|
|
@@ -318,9 +318,9 @@ var ListControl = /*#__PURE__*/ function(DesignerControl) {
|
|
|
318
318
|
_class_call_check(this, ListControl);
|
|
319
319
|
var _this;
|
|
320
320
|
_this = _super.call(this, props);
|
|
321
|
-
_define_property(_assert_this_initialized(_this), "controlType",
|
|
321
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'list');
|
|
322
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,
|
|
323
|
+
_this.props = new ListControlProperty(_assert_this_initialized(_this), props === null || props === void 0 ? void 0 : props.props, 'Designer');
|
|
324
324
|
return _this;
|
|
325
325
|
}
|
|
326
326
|
_create_class(ListControl, [
|
|
@@ -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,8 +82,8 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { Property } from
|
|
86
|
-
import { defineControlArrayToProperty } from
|
|
85
|
+
import { Property } from '../BaseControl';
|
|
86
|
+
import { defineControlArrayToProperty } from '../ControlArray';
|
|
87
87
|
var ListControlProperty = /*#__PURE__*/ function(Property) {
|
|
88
88
|
"use strict";
|
|
89
89
|
_inherits(ListControlProperty, Property);
|
|
@@ -98,8 +98,8 @@ var ListControlProperty = /*#__PURE__*/ function(Property) {
|
|
|
98
98
|
_define_property(_assert_this_initialized(_this), "pageSize", void 0);
|
|
99
99
|
_define_property(_assert_this_initialized(_this), "pageSizeOptions", void 0);
|
|
100
100
|
_define_property(_assert_this_initialized(_this), "totalCount", void 0);
|
|
101
|
-
defineControlArrayToProperty(_assert_this_initialized(_this),
|
|
102
|
-
defineControlArrayToProperty(_assert_this_initialized(_this),
|
|
101
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), 'headers', props === null || props === void 0 ? void 0 : props.headers, parent, mode);
|
|
102
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), 'footers', props === null || props === void 0 ? void 0 : props.footers, parent);
|
|
103
103
|
var _props_pageIndex;
|
|
104
104
|
_this.pageIndex = (_props_pageIndex = props === null || props === void 0 ? void 0 : props.pageIndex) !== null && _props_pageIndex !== void 0 ? _props_pageIndex : 1;
|
|
105
105
|
var _props_pageSize;
|
|
@@ -96,9 +96,9 @@ function _create_super(Derived) {
|
|
|
96
96
|
return _possible_constructor_return(this, result);
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
import { RuntimeControl } from
|
|
100
|
-
import ListControlProperty from
|
|
101
|
-
import { defineControlArrayToProperty } from
|
|
99
|
+
import { RuntimeControl } from '../BaseControl';
|
|
100
|
+
import ListControlProperty from './property';
|
|
101
|
+
import { defineControlArrayToProperty } from '../ControlArray';
|
|
102
102
|
var ListControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
103
103
|
"use strict";
|
|
104
104
|
_inherits(ListControl, RuntimeControl);
|
|
@@ -107,11 +107,11 @@ var ListControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
|
107
107
|
_class_call_check(this, ListControl);
|
|
108
108
|
var _this;
|
|
109
109
|
_this = _super.call(this, props);
|
|
110
|
-
_define_property(_assert_this_initialized(_this), "controlType",
|
|
110
|
+
_define_property(_assert_this_initialized(_this), "controlType", 'list');
|
|
111
111
|
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
112
112
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
113
|
-
_this.props = new ListControlProperty(_assert_this_initialized(_this), props === null || props === void 0 ? void 0 : props.props,
|
|
114
|
-
defineControlArrayToProperty(_assert_this_initialized(_this),
|
|
113
|
+
_this.props = new ListControlProperty(_assert_this_initialized(_this), props === null || props === void 0 ? void 0 : props.props, 'Runtime');
|
|
114
|
+
defineControlArrayToProperty(_assert_this_initialized(_this), 'children', props === null || props === void 0 ? void 0 : props.children, undefined, 'Runtime');
|
|
115
115
|
return _this;
|
|
116
116
|
}
|
|
117
117
|
_create_class(ListControl, [
|
|
@@ -82,8 +82,8 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import SearchControlProperty from
|
|
86
|
-
import { DesignerLayoutControl } from
|
|
85
|
+
import SearchControlProperty from './property';
|
|
86
|
+
import { DesignerLayoutControl } from '../LayoutControl';
|
|
87
87
|
var SearchControl = /*#__PURE__*/ function(DesignerLayoutControl) {
|
|
88
88
|
"use strict";
|
|
89
89
|
_inherits(SearchControl, DesignerLayoutControl);
|
|
@@ -92,7 +92,7 @@ var SearchControl = /*#__PURE__*/ function(DesignerLayoutControl) {
|
|
|
92
92
|
_class_call_check(this, SearchControl);
|
|
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", 'search');
|
|
96
96
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
97
97
|
_this.props = new SearchControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
98
98
|
return _this;
|
|
@@ -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,8 +82,8 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { LayoutControlProperty } from
|
|
86
|
-
import { DataBind } from
|
|
85
|
+
import { LayoutControlProperty } from '../LayoutControl';
|
|
86
|
+
import { DataBind } from '../../framework';
|
|
87
87
|
var SearchControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
|
|
88
88
|
"use strict";
|
|
89
89
|
_inherits(SearchControlProperty, LayoutControlProperty);
|
|
@@ -82,8 +82,8 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import SearchControlProperty from
|
|
86
|
-
import { RuntimeLayoutControl } from
|
|
85
|
+
import SearchControlProperty from './property';
|
|
86
|
+
import { RuntimeLayoutControl } from '../LayoutControl';
|
|
87
87
|
var SearchControl = /*#__PURE__*/ function(RuntimeLayoutControl) {
|
|
88
88
|
"use strict";
|
|
89
89
|
_inherits(SearchControl, RuntimeLayoutControl);
|
|
@@ -92,7 +92,7 @@ var SearchControl = /*#__PURE__*/ function(RuntimeLayoutControl) {
|
|
|
92
92
|
_class_call_check(this, SearchControl);
|
|
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", 'search');
|
|
96
96
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
97
97
|
_this.props = new SearchControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
98
98
|
return _this;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Schema from
|
|
1
|
+
import Schema from 'async-validator';
|
|
2
2
|
var messages = {
|
|
3
|
-
required:
|
|
4
|
-
maxLength:
|
|
5
|
-
minLength:
|
|
3
|
+
required: '%s 必填',
|
|
4
|
+
maxLength: '%s 超出最大长度限制',
|
|
5
|
+
minLength: '%s 小于最小长度限制',
|
|
6
6
|
string: {
|
|
7
|
-
range:
|
|
7
|
+
range: '%s 不在指定长度内'
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
function createValidator(rules) {
|
|
@@ -82,8 +82,8 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import WrapControlProperty from
|
|
86
|
-
import { DesignerLayoutControl } from
|
|
85
|
+
import WrapControlProperty from './property';
|
|
86
|
+
import { DesignerLayoutControl } from '../LayoutControl';
|
|
87
87
|
var WrapControl = /*#__PURE__*/ function(DesignerLayoutControl) {
|
|
88
88
|
"use strict";
|
|
89
89
|
_inherits(WrapControl, DesignerLayoutControl);
|
|
@@ -92,7 +92,7 @@ var WrapControl = /*#__PURE__*/ function(DesignerLayoutControl) {
|
|
|
92
92
|
_class_call_check(this, WrapControl);
|
|
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", 'wrap');
|
|
96
96
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
97
97
|
_this.props = new WrapControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
98
98
|
return _this;
|
|
@@ -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';
|
|
@@ -69,7 +69,7 @@ function _create_super(Derived) {
|
|
|
69
69
|
return _possible_constructor_return(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import { LayoutControlProperty } from
|
|
72
|
+
import { LayoutControlProperty } from '../LayoutControl';
|
|
73
73
|
var WrapControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
|
|
74
74
|
"use strict";
|
|
75
75
|
_inherits(WrapControlProperty, LayoutControlProperty);
|
|
@@ -82,8 +82,8 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import WrapControlProperty from
|
|
86
|
-
import { RuntimeLayoutControl } from
|
|
85
|
+
import WrapControlProperty from './property';
|
|
86
|
+
import { RuntimeLayoutControl } from '../LayoutControl';
|
|
87
87
|
var WrapControl = /*#__PURE__*/ function(RuntimeLayoutControl) {
|
|
88
88
|
"use strict";
|
|
89
89
|
_inherits(WrapControl, RuntimeLayoutControl);
|
|
@@ -92,7 +92,7 @@ var WrapControl = /*#__PURE__*/ function(RuntimeLayoutControl) {
|
|
|
92
92
|
_class_call_check(this, WrapControl);
|
|
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", 'wrap');
|
|
96
96
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
97
97
|
_this.props = new WrapControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
98
98
|
return _this;
|
package/dist/esm/common/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
1
|
+
export * from './BaseControl';
|
|
2
|
+
export * from './FormControl';
|
|
3
|
+
export * from './LayoutControl';
|
|
4
|
+
export * from './ListControl';
|
|
5
|
+
export * from './ColumnControl';
|
|
6
|
+
export * from './SearchViewControl';
|
|
7
|
+
export * from './WrapControl';
|
|
8
|
+
export * from './Validator';
|
|
9
|
+
export * from './ControlArray';
|
|
10
|
+
export * from './initOptionAndDataSourceRules';
|
|
11
|
+
export * from './initLinkOperationRules';
|
|
12
|
+
export * from './controlHooksEmitter';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { RulesMessage } from
|
|
1
|
+
import { RulesMessage } from '@byteluck-fe/model-driven-shared';
|
|
2
2
|
export function initLinkOperationRules(props) {
|
|
3
|
-
if (props.hasOwnProperty(
|
|
3
|
+
if (props.hasOwnProperty('linkOperationOption') && props.hasOwnProperty('showLinkOperation') && props.showLinkOperation) {
|
|
4
4
|
this.linkOperationOption = [
|
|
5
5
|
{
|
|
6
|
-
type:
|
|
6
|
+
type: 'object',
|
|
7
7
|
fields: {
|
|
8
8
|
formKey: {
|
|
9
|
-
type:
|
|
9
|
+
type: 'string',
|
|
10
10
|
required: true,
|
|
11
|
-
message: RulesMessage.getMessage(
|
|
11
|
+
message: RulesMessage.getMessage('pleaseEnterForm')
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|