@byteluck-fe/model-driven-core 7.0.0-props.1 → 7.0.0-props.101
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 +18 -12
- package/dist/esm/common/BaseControl/property.js +7 -20
- package/dist/esm/common/BaseControl/runtime.js +8 -11
- package/dist/esm/common/ColumnControl/property.js +7 -36
- package/dist/esm/common/FormControl/property.js +17 -80
- package/dist/esm/common/LayoutControl/designer.js +13 -4
- package/dist/esm/common/ListControl/designer.js +12 -4
- package/dist/esm/common/ListControl/property.js +5 -8
- package/dist/esm/framework/index.js +248 -351
- package/dist/index.umd.js +1 -1
- package/dist/types/common/BaseControl/property.d.ts +28 -9
- package/dist/types/common/BaseControl/types.d.ts +4 -0
- package/dist/types/common/ColumnControl/property.d.ts +24 -8
- package/dist/types/common/FormControl/property.d.ts +19 -72
- package/dist/types/common/LayoutControl/property.d.ts +5 -3
- package/dist/types/common/ListControl/property.d.ts +30 -3
- package/dist/types/common/SearchViewControl/property.d.ts +9 -3
- package/dist/types/common/WrapControl/property.d.ts +5 -3
- package/dist/types/framework/index.d.ts +13 -1
- package/package.json +3 -3
|
@@ -11,20 +11,26 @@ declare class PropertyRuntimeRules extends Array<RuleItem> {
|
|
|
11
11
|
constructor(props: Property);
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
14
|
+
* 属性定义
|
|
16
15
|
*/
|
|
17
|
-
|
|
18
|
-
static mode: MODE;
|
|
19
|
-
static readonly Rules: typeof PropertyRules;
|
|
20
|
-
static readonly RuntimeRules: typeof PropertyRuntimeRules;
|
|
16
|
+
interface PropertyInterface {
|
|
21
17
|
/**
|
|
22
18
|
* 是否隐藏
|
|
23
19
|
* @public
|
|
24
20
|
* @defaultValue false
|
|
25
21
|
*/
|
|
26
22
|
isHide: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* 类名
|
|
25
|
+
* @public
|
|
26
|
+
* @noSchema
|
|
27
|
+
*/
|
|
27
28
|
className?: string[];
|
|
29
|
+
/**
|
|
30
|
+
* 样式
|
|
31
|
+
* @public
|
|
32
|
+
* @noSchema
|
|
33
|
+
*/
|
|
28
34
|
style: BaseStyle;
|
|
29
35
|
/**
|
|
30
36
|
* 标题
|
|
@@ -33,12 +39,25 @@ declare class Property {
|
|
|
33
39
|
*/
|
|
34
40
|
caption: string;
|
|
35
41
|
/**
|
|
36
|
-
*
|
|
42
|
+
* 默认状态
|
|
37
43
|
* @public
|
|
38
|
-
* @defaultValue ''
|
|
39
44
|
*/
|
|
40
45
|
defaultState: 'readonly' | 'default';
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 属性实现
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
declare class Property implements PropertyInterface {
|
|
52
|
+
static mode: MODE;
|
|
53
|
+
static readonly Rules: typeof PropertyRules;
|
|
54
|
+
static readonly RuntimeRules: typeof PropertyRuntimeRules;
|
|
55
|
+
isHide: boolean;
|
|
56
|
+
className?: string[];
|
|
57
|
+
style: BaseStyle;
|
|
58
|
+
caption: string;
|
|
59
|
+
defaultState: 'readonly' | 'default';
|
|
41
60
|
constructor(props?: Partial<Property>, caption?: string);
|
|
42
61
|
}
|
|
43
62
|
export default Property;
|
|
44
|
-
export { Property, PropertyRules, PropertyRuntimeRules };
|
|
63
|
+
export { Property, PropertyInterface, PropertyRules, PropertyRuntimeRules };
|
|
@@ -12,6 +12,10 @@ export declare interface SettingOption {
|
|
|
12
12
|
label?: string;
|
|
13
13
|
name?: string;
|
|
14
14
|
tip?: string;
|
|
15
|
+
children?: SettingOption[];
|
|
16
|
+
layout?: 'horizontal' | 'vertical';
|
|
17
|
+
min?: number;
|
|
18
|
+
max?: number;
|
|
15
19
|
}
|
|
16
20
|
export declare interface HideOptions {
|
|
17
21
|
key: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Property, PropertyRules, RuntimeControl } from '../BaseControl';
|
|
1
|
+
import { Property, PropertyInterface, PropertyRules, RuntimeControl } from '../BaseControl';
|
|
2
2
|
import { RuleItem } from 'async-validator';
|
|
3
3
|
import { DataBind, DataSourceBind, OptionSetting, AutoWidth } from '../../framework';
|
|
4
4
|
declare class ColumnControlPropertyRules extends PropertyRules {
|
|
@@ -6,12 +6,7 @@ declare class ColumnControlPropertyRules extends PropertyRules {
|
|
|
6
6
|
width: RuleItem;
|
|
7
7
|
constructor(props: ColumnControlProperty);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
* 列基本属性
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
declare class ColumnControlProperty extends Property {
|
|
14
|
-
static readonly Rules: typeof ColumnControlPropertyRules;
|
|
9
|
+
interface ColumnControlPropertyInterface extends PropertyInterface {
|
|
15
10
|
/**
|
|
16
11
|
* 宽度类型
|
|
17
12
|
* @defaultValue 'auto'
|
|
@@ -57,6 +52,27 @@ declare class ColumnControlProperty extends Property {
|
|
|
57
52
|
* @defaultValue false
|
|
58
53
|
*/
|
|
59
54
|
autoHeight: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* 子控件
|
|
57
|
+
*/
|
|
58
|
+
children: RuntimeControl[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 列基本属性
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
declare class ColumnControlProperty extends Property implements ColumnControlPropertyInterface {
|
|
65
|
+
static readonly Rules: typeof ColumnControlPropertyRules;
|
|
66
|
+
widthType: 'px' | 'auto' | 'percent';
|
|
67
|
+
width: number;
|
|
68
|
+
caption: string;
|
|
69
|
+
dataBind: DataBind;
|
|
70
|
+
autoWidth: AutoWidth;
|
|
71
|
+
fixed: 'left' | 'right' | 'none';
|
|
72
|
+
sort: boolean;
|
|
73
|
+
align?: 'left' | 'right' | 'center';
|
|
74
|
+
colSpan?: string;
|
|
75
|
+
autoHeight: boolean;
|
|
60
76
|
children: RuntimeControl[];
|
|
61
77
|
constructor(props?: Partial<ColumnControlProperty>);
|
|
62
78
|
}
|
|
@@ -71,4 +87,4 @@ declare class ColumnOptionAndDataSourcePropertyRules extends ColumnControlProper
|
|
|
71
87
|
});
|
|
72
88
|
}
|
|
73
89
|
export default ColumnControlProperty;
|
|
74
|
-
export { ColumnControlProperty, ColumnControlPropertyRules, ColumnOptionAndDataSourcePropertyRules, };
|
|
90
|
+
export { ColumnControlProperty, ColumnControlPropertyInterface, ColumnControlPropertyRules, ColumnOptionAndDataSourcePropertyRules, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Property, PropertyRules, PropertyRuntimeRules } from '../BaseControl';
|
|
1
|
+
import { Property, PropertyInterface, PropertyRules, PropertyRuntimeRules } from '../BaseControl';
|
|
2
2
|
import { RuleItem } from '../Validator';
|
|
3
3
|
import { DataBind, DataSourceBind, ObjectDataBind, OptionSetting } from '../../framework';
|
|
4
4
|
declare class BaseControlPropertyRules extends PropertyRules {
|
|
@@ -14,7 +14,7 @@ declare class BaseControlPropertyRules extends PropertyRules {
|
|
|
14
14
|
declare class BaseControlPropertyRuntimeRules extends PropertyRuntimeRules {
|
|
15
15
|
constructor(props: BaseControlProperty);
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
interface BaseControlPropertyInterface extends PropertyInterface {
|
|
18
18
|
/**
|
|
19
19
|
* 标题
|
|
20
20
|
* @defaultValue ''
|
|
@@ -39,6 +39,18 @@ type BaseControlPropertyTypes = {
|
|
|
39
39
|
* @public
|
|
40
40
|
*/
|
|
41
41
|
isCaptionItalic: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 标题字重;取值:normal:常规;bold:粗体;lighter:更细;
|
|
44
|
+
* @defaultValue 'normal'
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
captionFontWeight: 'normal' | 'bold' | 'lighter';
|
|
48
|
+
/**
|
|
49
|
+
* 样式类
|
|
50
|
+
* @defaultValue []
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
className: string[];
|
|
42
54
|
/**
|
|
43
55
|
* 隐藏标题
|
|
44
56
|
* @defaultValue false
|
|
@@ -96,94 +108,29 @@ type BaseControlPropertyTypes = {
|
|
|
96
108
|
* @defaultValue ''
|
|
97
109
|
*/
|
|
98
110
|
requiredMessage: string;
|
|
99
|
-
}
|
|
111
|
+
}
|
|
100
112
|
/**
|
|
101
113
|
* 表单控件公共属性
|
|
102
114
|
* @public
|
|
103
115
|
*/
|
|
104
|
-
declare class BaseControlProperty extends Property implements
|
|
116
|
+
declare class BaseControlProperty extends Property implements BaseControlPropertyInterface {
|
|
105
117
|
static readonly Rules: typeof BaseControlPropertyRules;
|
|
106
118
|
static readonly RuntimeRules: typeof BaseControlPropertyRuntimeRules;
|
|
107
|
-
/**
|
|
108
|
-
* 标题
|
|
109
|
-
* @defaultValue ''
|
|
110
|
-
* @public
|
|
111
|
-
*/
|
|
112
119
|
caption: string;
|
|
113
|
-
/**
|
|
114
|
-
* 标题大小
|
|
115
|
-
* @defaultValue ''
|
|
116
|
-
* @public
|
|
117
|
-
*/
|
|
118
120
|
captionSize: string;
|
|
119
|
-
/**
|
|
120
|
-
* 标题颜色
|
|
121
|
-
* @defaultValue ''
|
|
122
|
-
* @public
|
|
123
|
-
*/
|
|
124
121
|
captionColor: string;
|
|
125
|
-
/**
|
|
126
|
-
* 标题斜体
|
|
127
|
-
* @defaultValue false
|
|
128
|
-
* @public
|
|
129
|
-
*/
|
|
130
122
|
isCaptionItalic: boolean;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
* @defaultValue false
|
|
134
|
-
* @public
|
|
135
|
-
*/
|
|
123
|
+
captionFontWeight: 'normal' | 'bold' | 'lighter';
|
|
124
|
+
className: string[];
|
|
136
125
|
isHideCaption: boolean;
|
|
137
|
-
/**
|
|
138
|
-
* 显示气泡提示
|
|
139
|
-
* @defaultValue false
|
|
140
|
-
* @public
|
|
141
|
-
*/
|
|
142
126
|
isShowCaptionTip: boolean;
|
|
143
|
-
/**
|
|
144
|
-
* 气泡提示语
|
|
145
|
-
* @defaultValue ''
|
|
146
|
-
* @public
|
|
147
|
-
*/
|
|
148
127
|
captionTip: string;
|
|
149
|
-
/**
|
|
150
|
-
* 标题布局
|
|
151
|
-
* @defaultValue ''
|
|
152
|
-
* @public
|
|
153
|
-
*/
|
|
154
128
|
labelPosition: 'top' | 'left';
|
|
155
|
-
/**
|
|
156
|
-
* 绑定数据项
|
|
157
|
-
* @public
|
|
158
|
-
*/
|
|
159
129
|
dataBind: DataBind | ObjectDataBind;
|
|
160
|
-
/**
|
|
161
|
-
* 默认值
|
|
162
|
-
* @public
|
|
163
|
-
*/
|
|
164
130
|
defaultValue: string | number | string[] | number[] | unknown;
|
|
165
|
-
/**
|
|
166
|
-
* 提示文字
|
|
167
|
-
* @defaultValue ''
|
|
168
|
-
* @public
|
|
169
|
-
*/
|
|
170
131
|
placeholder: string;
|
|
171
|
-
/**
|
|
172
|
-
* 默认状态
|
|
173
|
-
* @defaultValue 'default'
|
|
174
|
-
* @public
|
|
175
|
-
*/
|
|
176
132
|
defaultState: 'default' | 'readonly';
|
|
177
|
-
/**
|
|
178
|
-
* 必填
|
|
179
|
-
* @defaultValue false
|
|
180
|
-
* @public
|
|
181
|
-
*/
|
|
182
133
|
required: boolean;
|
|
183
|
-
/**
|
|
184
|
-
* 必填提示文案
|
|
185
|
-
* @defaultValue ''
|
|
186
|
-
*/
|
|
187
134
|
requiredMessage: string;
|
|
188
135
|
constructor(props?: Partial<BaseControlProperty>);
|
|
189
136
|
}
|
|
@@ -198,4 +145,4 @@ declare class OptionAndDataSourcePropertyRules extends BaseControlPropertyRules
|
|
|
198
145
|
});
|
|
199
146
|
}
|
|
200
147
|
export default BaseControlProperty;
|
|
201
|
-
export { BaseControlProperty,
|
|
148
|
+
export { BaseControlProperty, BaseControlPropertyInterface, BaseControlPropertyRules, BaseControlPropertyRuntimeRules, OptionAndDataSourcePropertyRules, };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Property } from '../BaseControl';
|
|
2
|
-
|
|
1
|
+
import { Property, PropertyInterface } from '../BaseControl';
|
|
2
|
+
interface LayoutControlPropertyInterface extends PropertyInterface {
|
|
3
|
+
}
|
|
4
|
+
declare class LayoutControlProperty extends Property implements LayoutControlPropertyInterface {
|
|
3
5
|
constructor(props?: Partial<LayoutControlProperty>);
|
|
4
6
|
}
|
|
5
7
|
export default LayoutControlProperty;
|
|
6
|
-
export { LayoutControlProperty };
|
|
8
|
+
export { LayoutControlProperty, LayoutControlPropertyInterface };
|
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
import { DesignerControl, Property, RuntimeControl } from '../BaseControl';
|
|
1
|
+
import { DesignerControl, Property, PropertyInterface, RuntimeControl } from '../BaseControl';
|
|
2
2
|
import { ControlsKeys, BaseControlSchema, MODE } from '../../type';
|
|
3
3
|
import { DesignerListControl } from './designer';
|
|
4
4
|
import { RuntimeListControl } from './runtime';
|
|
5
|
-
|
|
5
|
+
type ControlType<Mode extends MODE | 'Schema'> = Mode extends 'Runtime' ? RuntimeControl : Mode extends 'Designer' ? DesignerControl : BaseControlSchema<ControlsKeys, any>;
|
|
6
|
+
interface ListControlPropertyInterface<Mode extends MODE | 'Schema', Control extends object = ControlType<Mode>> extends PropertyInterface {
|
|
7
|
+
/**
|
|
8
|
+
* 表头控件
|
|
9
|
+
*/
|
|
10
|
+
headers: Control[];
|
|
11
|
+
/**
|
|
12
|
+
* 表尾控件
|
|
13
|
+
*/
|
|
14
|
+
footers?: Control[];
|
|
15
|
+
/**
|
|
16
|
+
* 当前页码
|
|
17
|
+
*/
|
|
18
|
+
pageIndex: number;
|
|
19
|
+
/**
|
|
20
|
+
* 每页条数
|
|
21
|
+
*/
|
|
22
|
+
pageSize: number;
|
|
23
|
+
/**
|
|
24
|
+
* 每页条数选项
|
|
25
|
+
*/
|
|
26
|
+
pageSizeOptions: number[];
|
|
27
|
+
/**
|
|
28
|
+
* 总条数
|
|
29
|
+
*/
|
|
30
|
+
totalCount: number;
|
|
31
|
+
}
|
|
32
|
+
declare class ListControlProperty<Mode extends MODE | 'Schema', Control extends object = ControlType<Mode>> extends Property implements ListControlPropertyInterface<Mode, Control> {
|
|
6
33
|
headers: Control[];
|
|
7
34
|
footers?: Control[];
|
|
8
35
|
pageIndex: number;
|
|
@@ -15,4 +42,4 @@ declare class ListControlProperty<Mode extends MODE | 'Schema', Control extends
|
|
|
15
42
|
}>, mode?: MODE);
|
|
16
43
|
}
|
|
17
44
|
export default ListControlProperty;
|
|
18
|
-
export { ListControlProperty };
|
|
45
|
+
export { ListControlProperty, ListControlPropertyInterface };
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { LayoutControlProperty } from '../LayoutControl';
|
|
1
|
+
import { LayoutControlProperty, LayoutControlPropertyInterface } from '../LayoutControl';
|
|
2
2
|
import { DataBind } from '../../framework';
|
|
3
|
-
|
|
3
|
+
interface SearchControlPropertyInterface extends LayoutControlPropertyInterface {
|
|
4
|
+
/**
|
|
5
|
+
* 绑定数据项
|
|
6
|
+
*/
|
|
7
|
+
dataBind: DataBind;
|
|
8
|
+
}
|
|
9
|
+
declare class SearchControlProperty extends LayoutControlProperty implements SearchControlPropertyInterface {
|
|
4
10
|
dataBind: DataBind;
|
|
5
11
|
constructor(props?: Partial<SearchControlProperty>);
|
|
6
12
|
}
|
|
7
13
|
export default SearchControlProperty;
|
|
8
|
-
export { SearchControlProperty };
|
|
14
|
+
export { SearchControlProperty, SearchControlPropertyInterface };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { LayoutControlProperty } from '../LayoutControl';
|
|
2
|
-
|
|
1
|
+
import { LayoutControlProperty, LayoutControlPropertyInterface } from '../LayoutControl';
|
|
2
|
+
interface WrapControlPropertyInterface extends LayoutControlPropertyInterface {
|
|
3
|
+
}
|
|
4
|
+
declare class WrapControlProperty extends LayoutControlProperty implements WrapControlPropertyInterface {
|
|
3
5
|
constructor(props?: Partial<WrapControlProperty>);
|
|
4
6
|
}
|
|
5
7
|
export default WrapControlProperty;
|
|
6
|
-
export { WrapControlProperty };
|
|
8
|
+
export { WrapControlProperty, WrapControlPropertyInterface };
|
|
@@ -574,7 +574,7 @@ export declare class OptionSetting {
|
|
|
574
574
|
* @defaultValue
|
|
575
575
|
* @public
|
|
576
576
|
*/
|
|
577
|
-
color
|
|
577
|
+
color?: string;
|
|
578
578
|
constructor(props?: Partial<OptionSetting>);
|
|
579
579
|
}
|
|
580
580
|
export declare class ImageOptionSetting extends OptionSetting {
|
|
@@ -669,6 +669,16 @@ export declare class RangeDateValue {
|
|
|
669
669
|
* @public
|
|
670
670
|
*/
|
|
671
671
|
export declare class AddressValue {
|
|
672
|
+
/**
|
|
673
|
+
* 国家编码
|
|
674
|
+
* @defaultValue ''
|
|
675
|
+
*/
|
|
676
|
+
country?: string;
|
|
677
|
+
/**
|
|
678
|
+
* 国家显示文字
|
|
679
|
+
* @defaultValue ''
|
|
680
|
+
*/
|
|
681
|
+
countryDisplay?: string;
|
|
672
682
|
/**
|
|
673
683
|
* 市编码
|
|
674
684
|
* @defaultValue ''
|
|
@@ -811,6 +821,7 @@ export declare enum COMMON_SETTING_TYPE {
|
|
|
811
821
|
CAPTION_SIZE = "captionSize",
|
|
812
822
|
CAPTION_COLOR = "captionColor",
|
|
813
823
|
IS_CAPTION_ITALIC = "isCaptionItalic",
|
|
824
|
+
CAPTION_FONT_WEIGHT = "captionFontWeight",
|
|
814
825
|
SHOW_TABLE_INDEX = "showTableIndex"
|
|
815
826
|
}
|
|
816
827
|
export declare enum PAGE_STATUS {
|
|
@@ -959,6 +970,7 @@ export declare class ListTreeData {
|
|
|
959
970
|
groupFields: {
|
|
960
971
|
field: string;
|
|
961
972
|
orderType: 'desc' | 'asc';
|
|
973
|
+
columnType: string;
|
|
962
974
|
}[];
|
|
963
975
|
groupHeaderName: any;
|
|
964
976
|
showFooterStatistics: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteluck-fe/model-driven-core",
|
|
3
|
-
"version": "7.0.0-props.
|
|
3
|
+
"version": "7.0.0-props.101",
|
|
4
4
|
"description": "model engine core",
|
|
5
5
|
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"postpublish": "node ../../scripts/postpublish.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@byteluck-fe/model-driven-shared": "7.0.0-props.
|
|
29
|
+
"@byteluck-fe/model-driven-shared": "7.0.0-props.101",
|
|
30
30
|
"async-validator": "3.5.1",
|
|
31
31
|
"tslib": "^2.1.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "e9c876a5f0429d763f3608b9ca325073d96c404c"
|
|
34
34
|
}
|