@byteluck-fe/model-driven-core 2.22.2-beta.6 → 2.22.2-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -69
- package/dist/esm/common/BaseControl/designer.js +11 -11
- package/dist/esm/common/BaseControl/property.js +15 -15
- package/dist/esm/common/ColumnControl/property.js +28 -28
- package/dist/esm/common/FormControl/property.js +44 -44
- package/dist/esm/framework/index.js +364 -364
- package/dist/index.umd.js +27 -27
- package/dist/types/api-doc-index.d.ts +4 -4
- package/dist/types/common/BaseControl/designer.d.ts +71 -71
- package/dist/types/common/BaseControl/index.d.ts +13 -13
- package/dist/types/common/BaseControl/property.d.ts +44 -44
- package/dist/types/common/BaseControl/runtime.d.ts +23 -23
- package/dist/types/common/BaseControl/types.d.ts +35 -35
- package/dist/types/common/ColumnControl/designer.d.ts +20 -20
- package/dist/types/common/ColumnControl/index.d.ts +12 -12
- package/dist/types/common/ColumnControl/property.d.ts +74 -74
- package/dist/types/common/ColumnControl/runtime.d.ts +11 -11
- package/dist/types/common/ControlArray.d.ts +9 -9
- package/dist/types/common/FormControl/designer.d.ts +13 -13
- package/dist/types/common/FormControl/index.d.ts +12 -12
- package/dist/types/common/FormControl/property.d.ts +100 -100
- package/dist/types/common/FormControl/runtime.d.ts +11 -11
- package/dist/types/common/LayoutControl/designer.d.ts +21 -21
- package/dist/types/common/LayoutControl/index.d.ts +12 -12
- package/dist/types/common/LayoutControl/property.d.ts +6 -6
- package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
- package/dist/types/common/ListControl/designer.d.ts +16 -16
- package/dist/types/common/ListControl/index.d.ts +12 -12
- package/dist/types/common/ListControl/property.d.ts +18 -18
- package/dist/types/common/ListControl/runtime.d.ts +12 -12
- package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
- package/dist/types/common/SearchViewControl/index.d.ts +12 -12
- package/dist/types/common/SearchViewControl/property.d.ts +8 -8
- package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
- package/dist/types/common/Validator.d.ts +15 -15
- package/dist/types/common/WrapControl/designer.d.ts +11 -11
- package/dist/types/common/WrapControl/index.d.ts +12 -12
- package/dist/types/common/WrapControl/property.d.ts +6 -6
- package/dist/types/common/WrapControl/runtime.d.ts +11 -11
- package/dist/types/common/controlHooksEmitter.d.ts +4 -4
- package/dist/types/common/index.d.ts +12 -12
- package/dist/types/common/initLinkOperationRules.d.ts +6 -6
- package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
- package/dist/types/framework/RegisterControls.d.ts +37 -37
- package/dist/types/framework/index.d.ts +923 -923
- package/dist/types/framework/isDataBind.d.ts +2 -2
- package/dist/types/index.d.ts +4 -4
- package/dist/types/type.d.ts +91 -91
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
# Core
|
|
2
|
-
引擎控件核心定义
|
|
3
|
-
|
|
4
|
-
定义了控件的基类和一些工具类的实现
|
|
5
|
-
|
|
6
|
-
```
|
|
7
|
-
│ index.ts // 入口文件
|
|
8
|
-
│ type.ts // 类型
|
|
9
|
-
│
|
|
10
|
-
├─common // 基础类
|
|
11
|
-
│ │ ControlArray.ts // 控件数组,管理设计态和运行态的children和headers数组
|
|
12
|
-
│ │ controlHooksEmitter.ts // 旧版设计态的控件事件发布,暂时不可废弃
|
|
13
|
-
│ │ index.ts
|
|
14
|
-
│ │ initOptionAndDataSourceRules.ts // 关联数据源和自定义选项的校验规则
|
|
15
|
-
│ │ Validator.ts // 校验
|
|
16
|
-
│ │
|
|
17
|
-
│ ├─BaseControl // 基础控件
|
|
18
|
-
│ │ designer.ts
|
|
19
|
-
│ │ index.ts
|
|
20
|
-
│ │ property.ts
|
|
21
|
-
│ │ runtime.ts
|
|
22
|
-
│ │ types.ts
|
|
23
|
-
│ │
|
|
24
|
-
│ ├─ColumnControl // 列控件
|
|
25
|
-
│ │ designer.ts
|
|
26
|
-
│ │ index.ts
|
|
27
|
-
│ │ property.ts
|
|
28
|
-
│ │ runtime.ts
|
|
29
|
-
│ │ types.ts
|
|
30
|
-
│ │
|
|
31
|
-
│ ├─FormControl // 表单控件
|
|
32
|
-
│ │ designer.ts
|
|
33
|
-
│ │ index.ts
|
|
34
|
-
│ │ property.ts
|
|
35
|
-
│ │ runtime.ts
|
|
36
|
-
│ │ types.ts
|
|
37
|
-
│ │
|
|
38
|
-
│ ├─LayoutControl // 布局控件
|
|
39
|
-
│ │ designer.ts
|
|
40
|
-
│ │ index.ts
|
|
41
|
-
│ │ property.ts
|
|
42
|
-
│ │ runtime.ts
|
|
43
|
-
│ │ types.ts
|
|
44
|
-
│ │
|
|
45
|
-
│ ├─ListControl // 列表控件
|
|
46
|
-
│ │ designer.ts
|
|
47
|
-
│ │ index.ts
|
|
48
|
-
│ │ property.ts
|
|
49
|
-
│ │ runtime.ts
|
|
50
|
-
│ │ types.ts
|
|
51
|
-
│ │
|
|
52
|
-
│ ├─SearchViewControl // 查询容器控件
|
|
53
|
-
│ │ designer.ts
|
|
54
|
-
│ │ index.ts
|
|
55
|
-
│ │ property.ts
|
|
56
|
-
│ │ runtime.ts
|
|
57
|
-
│ │ types.ts
|
|
58
|
-
│ │
|
|
59
|
-
│ └─WrapControl // 容器控件
|
|
60
|
-
│ designer.ts
|
|
61
|
-
│ index.ts
|
|
62
|
-
│ property.ts
|
|
63
|
-
│ runtime.ts
|
|
64
|
-
│ types.ts
|
|
65
|
-
│
|
|
66
|
-
└─framework // 工具类
|
|
67
|
-
index.ts // 很多工具类
|
|
68
|
-
RegisterControls.ts // 注册和管理控件类,被Runtime和Designer继承
|
|
69
|
-
```
|
|
1
|
+
# Core
|
|
2
|
+
引擎控件核心定义
|
|
3
|
+
|
|
4
|
+
定义了控件的基类和一些工具类的实现
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
│ index.ts // 入口文件
|
|
8
|
+
│ type.ts // 类型
|
|
9
|
+
│
|
|
10
|
+
├─common // 基础类
|
|
11
|
+
│ │ ControlArray.ts // 控件数组,管理设计态和运行态的children和headers数组
|
|
12
|
+
│ │ controlHooksEmitter.ts // 旧版设计态的控件事件发布,暂时不可废弃
|
|
13
|
+
│ │ index.ts
|
|
14
|
+
│ │ initOptionAndDataSourceRules.ts // 关联数据源和自定义选项的校验规则
|
|
15
|
+
│ │ Validator.ts // 校验
|
|
16
|
+
│ │
|
|
17
|
+
│ ├─BaseControl // 基础控件
|
|
18
|
+
│ │ designer.ts
|
|
19
|
+
│ │ index.ts
|
|
20
|
+
│ │ property.ts
|
|
21
|
+
│ │ runtime.ts
|
|
22
|
+
│ │ types.ts
|
|
23
|
+
│ │
|
|
24
|
+
│ ├─ColumnControl // 列控件
|
|
25
|
+
│ │ designer.ts
|
|
26
|
+
│ │ index.ts
|
|
27
|
+
│ │ property.ts
|
|
28
|
+
│ │ runtime.ts
|
|
29
|
+
│ │ types.ts
|
|
30
|
+
│ │
|
|
31
|
+
│ ├─FormControl // 表单控件
|
|
32
|
+
│ │ designer.ts
|
|
33
|
+
│ │ index.ts
|
|
34
|
+
│ │ property.ts
|
|
35
|
+
│ │ runtime.ts
|
|
36
|
+
│ │ types.ts
|
|
37
|
+
│ │
|
|
38
|
+
│ ├─LayoutControl // 布局控件
|
|
39
|
+
│ │ designer.ts
|
|
40
|
+
│ │ index.ts
|
|
41
|
+
│ │ property.ts
|
|
42
|
+
│ │ runtime.ts
|
|
43
|
+
│ │ types.ts
|
|
44
|
+
│ │
|
|
45
|
+
│ ├─ListControl // 列表控件
|
|
46
|
+
│ │ designer.ts
|
|
47
|
+
│ │ index.ts
|
|
48
|
+
│ │ property.ts
|
|
49
|
+
│ │ runtime.ts
|
|
50
|
+
│ │ types.ts
|
|
51
|
+
│ │
|
|
52
|
+
│ ├─SearchViewControl // 查询容器控件
|
|
53
|
+
│ │ designer.ts
|
|
54
|
+
│ │ index.ts
|
|
55
|
+
│ │ property.ts
|
|
56
|
+
│ │ runtime.ts
|
|
57
|
+
│ │ types.ts
|
|
58
|
+
│ │
|
|
59
|
+
│ └─WrapControl // 容器控件
|
|
60
|
+
│ designer.ts
|
|
61
|
+
│ index.ts
|
|
62
|
+
│ property.ts
|
|
63
|
+
│ runtime.ts
|
|
64
|
+
│ types.ts
|
|
65
|
+
│
|
|
66
|
+
└─framework // 工具类
|
|
67
|
+
index.ts // 很多工具类
|
|
68
|
+
RegisterControls.ts // 注册和管理控件类,被Runtime和Designer继承
|
|
69
|
+
```
|
|
@@ -502,10 +502,10 @@ _define_property(Control, "removeSettingItem", removeSetting);
|
|
|
502
502
|
_define_property(Control, "updateSettingItem", updateSetting);
|
|
503
503
|
export default Control;
|
|
504
504
|
export { Control as DesignerControl };
|
|
505
|
-
/**
|
|
506
|
-
* @function 删除控件或者实例上的setting的方法
|
|
507
|
-
* @description 其中的this可能是DesignerControl的类,也可以是实例
|
|
508
|
-
* @param keys 需要删除的key或key组成的数组
|
|
505
|
+
/**
|
|
506
|
+
* @function 删除控件或者实例上的setting的方法
|
|
507
|
+
* @description 其中的this可能是DesignerControl的类,也可以是实例
|
|
508
|
+
* @param keys 需要删除的key或key组成的数组
|
|
509
509
|
* */ function removeSetting(keys) {
|
|
510
510
|
var _this = this;
|
|
511
511
|
var deleteKeys = Array.isArray(keys) ? keys : [
|
|
@@ -533,13 +533,13 @@ export { Control as DesignerControl };
|
|
|
533
533
|
}
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
|
-
/**
|
|
537
|
-
* @function 修改控件或者实例上的setting的方法
|
|
538
|
-
* @description 其中的this可能是DesignerControl的类,也可以是实例
|
|
539
|
-
* @param settingKey 需要修改的key或者key组成的数组
|
|
540
|
-
* @param value 修改之后的visible值
|
|
541
|
-
* @param value.showItems 需要添加或替换的showItems
|
|
542
|
-
* @param value.type 默认是replace替换,可以更改为push新增
|
|
536
|
+
/**
|
|
537
|
+
* @function 修改控件或者实例上的setting的方法
|
|
538
|
+
* @description 其中的this可能是DesignerControl的类,也可以是实例
|
|
539
|
+
* @param settingKey 需要修改的key或者key组成的数组
|
|
540
|
+
* @param value 修改之后的visible值
|
|
541
|
+
* @param value.showItems 需要添加或替换的showItems
|
|
542
|
+
* @param value.type 默认是replace替换,可以更改为push新增
|
|
543
543
|
* */ function updateSetting(settingKey, value) {
|
|
544
544
|
var _this = this;
|
|
545
545
|
var keys = typeof settingKey === 'string' ? [
|
|
@@ -146,29 +146,29 @@ var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
|
|
|
146
146
|
}
|
|
147
147
|
return PropertyRuntimeRules;
|
|
148
148
|
}(_wrap_native_super(Array));
|
|
149
|
-
/**
|
|
150
|
-
* 全局属性
|
|
151
|
-
* @public
|
|
149
|
+
/**
|
|
150
|
+
* 全局属性
|
|
151
|
+
* @public
|
|
152
152
|
*/ var Property = function Property(props) {
|
|
153
153
|
"use strict";
|
|
154
154
|
var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
|
155
155
|
_class_call_check(this, Property);
|
|
156
|
-
/**
|
|
157
|
-
* 是否隐藏
|
|
158
|
-
* @public
|
|
159
|
-
* @defaultValue false
|
|
156
|
+
/**
|
|
157
|
+
* 是否隐藏
|
|
158
|
+
* @public
|
|
159
|
+
* @defaultValue false
|
|
160
160
|
*/ _define_property(this, "isHide", void 0);
|
|
161
161
|
_define_property(this, "className", void 0);
|
|
162
162
|
_define_property(this, "style", void 0);
|
|
163
|
-
/**
|
|
164
|
-
* 标题
|
|
165
|
-
* @public
|
|
166
|
-
* @defaultValue ''
|
|
163
|
+
/**
|
|
164
|
+
* 标题
|
|
165
|
+
* @public
|
|
166
|
+
* @defaultValue ''
|
|
167
167
|
*/ _define_property(this, "caption", void 0);
|
|
168
|
-
/**
|
|
169
|
-
* 标题
|
|
170
|
-
* @public
|
|
171
|
-
* @defaultValue ''
|
|
168
|
+
/**
|
|
169
|
+
* 标题
|
|
170
|
+
* @public
|
|
171
|
+
* @defaultValue ''
|
|
172
172
|
*/ _define_property(this, "defaultState", void 0);
|
|
173
173
|
var _props_isHide;
|
|
174
174
|
this.isHide = (_props_isHide = props === null || props === void 0 ? void 0 : props.isHide) !== null && _props_isHide !== void 0 ? _props_isHide : false;
|
|
@@ -109,9 +109,9 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
109
109
|
}
|
|
110
110
|
return ColumnControlPropertyRules;
|
|
111
111
|
}(PropertyRules);
|
|
112
|
-
/**
|
|
113
|
-
* 列基本属性
|
|
114
|
-
* @public
|
|
112
|
+
/**
|
|
113
|
+
* 列基本属性
|
|
114
|
+
* @public
|
|
115
115
|
*/ var ColumnControlProperty = /*#__PURE__*/ function(Property) {
|
|
116
116
|
"use strict";
|
|
117
117
|
_inherits(ColumnControlProperty, Property);
|
|
@@ -120,40 +120,40 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
120
120
|
_class_call_check(this, ColumnControlProperty);
|
|
121
121
|
var _this;
|
|
122
122
|
_this = _super.call(this, props);
|
|
123
|
-
/**
|
|
124
|
-
* 宽度类型
|
|
125
|
-
* @defaultValue 'auto'
|
|
123
|
+
/**
|
|
124
|
+
* 宽度类型
|
|
125
|
+
* @defaultValue 'auto'
|
|
126
126
|
*/ _define_property(_assert_this_initialized(_this), "widthType", void 0);
|
|
127
|
-
/**
|
|
128
|
-
* 宽度
|
|
129
|
-
* @defaultValue 150
|
|
127
|
+
/**
|
|
128
|
+
* 宽度
|
|
129
|
+
* @defaultValue 150
|
|
130
130
|
*/ _define_property(_assert_this_initialized(_this), "width", void 0);
|
|
131
|
-
/**
|
|
132
|
-
* 标题
|
|
131
|
+
/**
|
|
132
|
+
* 标题
|
|
133
133
|
*/ _define_property(_assert_this_initialized(_this), "caption", void 0);
|
|
134
|
-
/**
|
|
135
|
-
* 绑定数据项
|
|
134
|
+
/**
|
|
135
|
+
* 绑定数据项
|
|
136
136
|
*/ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
|
|
137
|
-
/**
|
|
138
|
-
* 自适应页面宽度
|
|
137
|
+
/**
|
|
138
|
+
* 自适应页面宽度
|
|
139
139
|
*/ _define_property(_assert_this_initialized(_this), "autoWidth", void 0);
|
|
140
|
-
/**
|
|
141
|
-
* 冻结
|
|
142
|
-
* @defaultValue 'none'
|
|
140
|
+
/**
|
|
141
|
+
* 冻结
|
|
142
|
+
* @defaultValue 'none'
|
|
143
143
|
*/ _define_property(_assert_this_initialized(_this), "fixed", void 0);
|
|
144
|
-
/**
|
|
145
|
-
* 表头排序
|
|
146
|
-
* @defaultValue true
|
|
144
|
+
/**
|
|
145
|
+
* 表头排序
|
|
146
|
+
* @defaultValue true
|
|
147
147
|
*/ _define_property(_assert_this_initialized(_this), "sort", void 0);
|
|
148
|
-
/**
|
|
149
|
-
* 对齐
|
|
148
|
+
/**
|
|
149
|
+
* 对齐
|
|
150
150
|
*/ _define_property(_assert_this_initialized(_this), "align", void 0);
|
|
151
|
-
/**
|
|
152
|
-
* @internal
|
|
151
|
+
/**
|
|
152
|
+
* @internal
|
|
153
153
|
*/ _define_property(_assert_this_initialized(_this), "colSpan", void 0);
|
|
154
|
-
/**
|
|
155
|
-
* 自动高度
|
|
156
|
-
* @defaultValue false
|
|
154
|
+
/**
|
|
155
|
+
* 自动高度
|
|
156
|
+
* @defaultValue false
|
|
157
157
|
*/ _define_property(_assert_this_initialized(_this), "autoHeight", void 0);
|
|
158
158
|
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
159
159
|
var _props_width;
|
|
@@ -199,9 +199,9 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
|
|
|
199
199
|
}
|
|
200
200
|
return BaseControlPropertyRuntimeRules;
|
|
201
201
|
}(PropertyRuntimeRules);
|
|
202
|
-
/**
|
|
203
|
-
* 表单控件公共属性
|
|
204
|
-
* @public
|
|
202
|
+
/**
|
|
203
|
+
* 表单控件公共属性
|
|
204
|
+
* @public
|
|
205
205
|
*/ var BaseControlProperty = /*#__PURE__*/ function(Property) {
|
|
206
206
|
"use strict";
|
|
207
207
|
_inherits(BaseControlProperty, Property);
|
|
@@ -210,57 +210,57 @@ var BaseControlPropertyRuntimeRules = /*#__PURE__*/ function(PropertyRuntimeRule
|
|
|
210
210
|
_class_call_check(this, BaseControlProperty);
|
|
211
211
|
var _this;
|
|
212
212
|
_this = _super.call(this, props);
|
|
213
|
-
/**
|
|
214
|
-
* 标题
|
|
215
|
-
* @defaultValue ''
|
|
216
|
-
* @public
|
|
213
|
+
/**
|
|
214
|
+
* 标题
|
|
215
|
+
* @defaultValue ''
|
|
216
|
+
* @public
|
|
217
217
|
*/ _define_property(_assert_this_initialized(_this), "caption", void 0);
|
|
218
|
-
/**
|
|
219
|
-
* 隐藏标题
|
|
220
|
-
* @defaultValue false
|
|
221
|
-
* @public
|
|
218
|
+
/**
|
|
219
|
+
* 隐藏标题
|
|
220
|
+
* @defaultValue false
|
|
221
|
+
* @public
|
|
222
222
|
*/ _define_property(_assert_this_initialized(_this), "isHideCaption", void 0);
|
|
223
|
-
/**
|
|
224
|
-
* 显示气泡提示
|
|
225
|
-
* @defaultValue false
|
|
226
|
-
* @public
|
|
223
|
+
/**
|
|
224
|
+
* 显示气泡提示
|
|
225
|
+
* @defaultValue false
|
|
226
|
+
* @public
|
|
227
227
|
*/ _define_property(_assert_this_initialized(_this), "isShowCaptionTip", void 0);
|
|
228
|
-
/**
|
|
229
|
-
* 气泡提示语
|
|
230
|
-
* @defaultValue ''
|
|
231
|
-
* @public
|
|
228
|
+
/**
|
|
229
|
+
* 气泡提示语
|
|
230
|
+
* @defaultValue ''
|
|
231
|
+
* @public
|
|
232
232
|
*/ _define_property(_assert_this_initialized(_this), "captionTip", void 0);
|
|
233
|
-
/**
|
|
234
|
-
* 标题布局
|
|
235
|
-
* @defaultValue ''
|
|
236
|
-
* @public
|
|
233
|
+
/**
|
|
234
|
+
* 标题布局
|
|
235
|
+
* @defaultValue ''
|
|
236
|
+
* @public
|
|
237
237
|
*/ _define_property(_assert_this_initialized(_this), "labelPosition", void 0);
|
|
238
|
-
/**
|
|
239
|
-
* 绑定数据项
|
|
240
|
-
* @public
|
|
238
|
+
/**
|
|
239
|
+
* 绑定数据项
|
|
240
|
+
* @public
|
|
241
241
|
*/ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
|
|
242
|
-
/**
|
|
243
|
-
* 默认值
|
|
244
|
-
* @public
|
|
242
|
+
/**
|
|
243
|
+
* 默认值
|
|
244
|
+
* @public
|
|
245
245
|
*/ _define_property(_assert_this_initialized(_this), "defaultValue", void 0);
|
|
246
|
-
/**
|
|
247
|
-
* 提示文字
|
|
248
|
-
* @defaultValue ''
|
|
249
|
-
* @public
|
|
246
|
+
/**
|
|
247
|
+
* 提示文字
|
|
248
|
+
* @defaultValue ''
|
|
249
|
+
* @public
|
|
250
250
|
*/ _define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
251
|
-
/**
|
|
252
|
-
* 默认状态
|
|
253
|
-
* @defaultValue 'default'
|
|
254
|
-
* @public
|
|
251
|
+
/**
|
|
252
|
+
* 默认状态
|
|
253
|
+
* @defaultValue 'default'
|
|
254
|
+
* @public
|
|
255
255
|
*/ _define_property(_assert_this_initialized(_this), "defaultState", void 0);
|
|
256
|
-
/**
|
|
257
|
-
* 必填
|
|
258
|
-
* @defaultValue false
|
|
259
|
-
* @public
|
|
256
|
+
/**
|
|
257
|
+
* 必填
|
|
258
|
+
* @defaultValue false
|
|
259
|
+
* @public
|
|
260
260
|
*/ _define_property(_assert_this_initialized(_this), "required", void 0);
|
|
261
|
-
/**
|
|
262
|
-
* 必填提示文案
|
|
263
|
-
* @defaultValue ''
|
|
261
|
+
/**
|
|
262
|
+
* 必填提示文案
|
|
263
|
+
* @defaultValue ''
|
|
264
264
|
*/ _define_property(_assert_this_initialized(_this), "requiredMessage", void 0);
|
|
265
265
|
var _props_caption;
|
|
266
266
|
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : '';
|