@byteluck-fe/model-driven-core 7.0.0-1-beta9 → 7.0.0-props.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 +17 -12
- package/dist/esm/common/BaseControl/property.js +7 -20
- package/dist/esm/common/BaseControl/runtime.js +7 -11
- package/dist/esm/common/ColumnControl/property.js +7 -36
- package/dist/esm/common/FormControl/property.js +15 -80
- package/dist/esm/common/LayoutControl/designer.js +12 -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 +237 -351
- package/dist/index.umd.js +1 -1
- package/dist/types/common/BaseControl/property.d.ts +17 -7
- package/dist/types/common/ColumnControl/designer.d.ts +4 -4
- package/dist/types/common/ColumnControl/property.d.ts +21 -8
- package/dist/types/common/FormControl/property.d.ts +25 -9
- package/dist/types/common/LayoutControl/property.d.ts +5 -3
- package/dist/types/common/ListControl/property.d.ts +12 -3
- package/dist/types/common/SearchViewControl/property.d.ts +6 -3
- package/dist/types/common/WrapControl/property.d.ts +5 -3
- package/dist/types/framework/index.d.ts +29 -27
- package/package.json +3 -3
|
@@ -11,13 +11,9 @@ 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
|
|
@@ -38,7 +34,21 @@ declare class Property {
|
|
|
38
34
|
* @defaultValue ''
|
|
39
35
|
*/
|
|
40
36
|
defaultState: 'readonly' | 'default';
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 属性实现
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
declare class Property implements PropertyInterface {
|
|
43
|
+
static mode: MODE;
|
|
44
|
+
static readonly Rules: typeof PropertyRules;
|
|
45
|
+
static readonly RuntimeRules: typeof PropertyRuntimeRules;
|
|
46
|
+
isHide: boolean;
|
|
47
|
+
className?: string[];
|
|
48
|
+
style: BaseStyle;
|
|
49
|
+
caption: string;
|
|
50
|
+
defaultState: 'readonly' | 'default';
|
|
41
51
|
constructor(props?: Partial<Property>, caption?: string);
|
|
42
52
|
}
|
|
43
53
|
export default Property;
|
|
44
|
-
export { Property, PropertyRules, PropertyRuntimeRules };
|
|
54
|
+
export { Property, PropertyInterface, PropertyRules, PropertyRuntimeRules };
|
|
@@ -7,13 +7,13 @@ declare class ColumnControl extends DesignerControl {
|
|
|
7
7
|
children: DesignerControl[];
|
|
8
8
|
constructor(props?: Partial<ColumnControlSchema<ColumnControlsKeys>>);
|
|
9
9
|
toSchema(): {
|
|
10
|
-
children: import("../../type").BaseControlSchema<never, import("../BaseControl").
|
|
10
|
+
children: import("../../type").BaseControlSchema<never, import("../BaseControl/property").default>[];
|
|
11
11
|
id: string;
|
|
12
12
|
type: never;
|
|
13
|
-
props: import("../BaseControl").
|
|
13
|
+
props: import("../BaseControl/property").default;
|
|
14
14
|
controlType: import("../../type").BaseControlTypes;
|
|
15
|
-
fieldType?: import("@byteluck-fe/model-driven-shared").FieldTypes;
|
|
16
|
-
pageStatus?: import("../..").PAGE_STATUS;
|
|
15
|
+
fieldType?: import("@byteluck-fe/model-driven-shared/dist/types").FieldTypes | undefined;
|
|
16
|
+
pageStatus?: import("../..").PAGE_STATUS | undefined;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
export default ColumnControl;
|
|
@@ -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'
|
|
@@ -58,6 +53,24 @@ declare class ColumnControlProperty extends Property {
|
|
|
58
53
|
*/
|
|
59
54
|
autoHeight: boolean;
|
|
60
55
|
children: RuntimeControl[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 列基本属性
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
declare class ColumnControlProperty extends Property implements ColumnControlPropertyInterface {
|
|
62
|
+
static readonly Rules: typeof ColumnControlPropertyRules;
|
|
63
|
+
widthType: 'px' | 'auto' | 'percent';
|
|
64
|
+
width: number;
|
|
65
|
+
caption: string;
|
|
66
|
+
dataBind: DataBind;
|
|
67
|
+
autoWidth: AutoWidth;
|
|
68
|
+
fixed: 'left' | 'right' | 'none';
|
|
69
|
+
sort: boolean;
|
|
70
|
+
align?: 'left' | 'right' | 'center';
|
|
71
|
+
colSpan?: string;
|
|
72
|
+
autoHeight: boolean;
|
|
73
|
+
children: RuntimeControl[];
|
|
61
74
|
constructor(props?: Partial<ColumnControlProperty>);
|
|
62
75
|
}
|
|
63
76
|
declare class ColumnOptionAndDataSourcePropertyRules extends ColumnControlPropertyRules {
|
|
@@ -71,4 +84,4 @@ declare class ColumnOptionAndDataSourcePropertyRules extends ColumnControlProper
|
|
|
71
84
|
});
|
|
72
85
|
}
|
|
73
86
|
export default ColumnControlProperty;
|
|
74
|
-
export { ColumnControlProperty, ColumnControlPropertyRules, ColumnOptionAndDataSourcePropertyRules, };
|
|
87
|
+
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,13 +14,7 @@ declare class BaseControlPropertyRules extends PropertyRules {
|
|
|
14
14
|
declare class BaseControlPropertyRuntimeRules extends PropertyRuntimeRules {
|
|
15
15
|
constructor(props: BaseControlProperty);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
* 表单控件公共属性
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
declare class BaseControlProperty extends Property {
|
|
22
|
-
static readonly Rules: typeof BaseControlPropertyRules;
|
|
23
|
-
static readonly RuntimeRules: typeof BaseControlPropertyRuntimeRules;
|
|
17
|
+
interface BaseControlPropertyInterface extends PropertyInterface {
|
|
24
18
|
/**
|
|
25
19
|
* 标题
|
|
26
20
|
* @defaultValue ''
|
|
@@ -102,6 +96,28 @@ declare class BaseControlProperty extends Property {
|
|
|
102
96
|
* @defaultValue ''
|
|
103
97
|
*/
|
|
104
98
|
requiredMessage: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* 表单控件公共属性
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
declare class BaseControlProperty extends Property implements BaseControlPropertyInterface {
|
|
105
|
+
static readonly Rules: typeof BaseControlPropertyRules;
|
|
106
|
+
static readonly RuntimeRules: typeof BaseControlPropertyRuntimeRules;
|
|
107
|
+
caption: string;
|
|
108
|
+
captionSize: string;
|
|
109
|
+
captionColor: string;
|
|
110
|
+
isCaptionItalic: boolean;
|
|
111
|
+
isHideCaption: boolean;
|
|
112
|
+
isShowCaptionTip: boolean;
|
|
113
|
+
captionTip: string;
|
|
114
|
+
labelPosition: 'top' | 'left';
|
|
115
|
+
dataBind: DataBind | ObjectDataBind;
|
|
116
|
+
defaultValue: string | number | string[] | number[] | unknown;
|
|
117
|
+
placeholder: string;
|
|
118
|
+
defaultState: 'default' | 'readonly';
|
|
119
|
+
required: boolean;
|
|
120
|
+
requiredMessage: string;
|
|
105
121
|
constructor(props?: Partial<BaseControlProperty>);
|
|
106
122
|
}
|
|
107
123
|
declare class OptionAndDataSourcePropertyRules extends BaseControlPropertyRules {
|
|
@@ -115,4 +131,4 @@ declare class OptionAndDataSourcePropertyRules extends BaseControlPropertyRules
|
|
|
115
131
|
});
|
|
116
132
|
}
|
|
117
133
|
export default BaseControlProperty;
|
|
118
|
-
export { BaseControlProperty, BaseControlPropertyRules, BaseControlPropertyRuntimeRules, OptionAndDataSourcePropertyRules, };
|
|
134
|
+
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,17 @@
|
|
|
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
|
+
headers: Control[];
|
|
8
|
+
footers?: Control[];
|
|
9
|
+
pageIndex: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
pageSizeOptions: number[];
|
|
12
|
+
totalCount: number;
|
|
13
|
+
}
|
|
14
|
+
declare class ListControlProperty<Mode extends MODE | 'Schema', Control extends object = ControlType<Mode>> extends Property implements ListControlPropertyInterface<Mode, Control> {
|
|
6
15
|
headers: Control[];
|
|
7
16
|
footers?: Control[];
|
|
8
17
|
pageIndex: number;
|
|
@@ -15,4 +24,4 @@ declare class ListControlProperty<Mode extends MODE | 'Schema', Control extends
|
|
|
15
24
|
}>, mode?: MODE);
|
|
16
25
|
}
|
|
17
26
|
export default ListControlProperty;
|
|
18
|
-
export { ListControlProperty };
|
|
27
|
+
export { ListControlProperty, ListControlPropertyInterface };
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { LayoutControlProperty } from '../LayoutControl';
|
|
1
|
+
import { LayoutControlProperty, LayoutControlPropertyInterface } from '../LayoutControl';
|
|
2
2
|
import { DataBind } from '../../framework';
|
|
3
|
-
|
|
3
|
+
interface SearchControlPropertyInterface extends LayoutControlPropertyInterface {
|
|
4
|
+
dataBind: DataBind;
|
|
5
|
+
}
|
|
6
|
+
declare class SearchControlProperty extends LayoutControlProperty implements SearchControlPropertyInterface {
|
|
4
7
|
dataBind: DataBind;
|
|
5
8
|
constructor(props?: Partial<SearchControlProperty>);
|
|
6
9
|
}
|
|
7
10
|
export default SearchControlProperty;
|
|
8
|
-
export { SearchControlProperty };
|
|
11
|
+
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 {
|
|
@@ -734,32 +734,32 @@ export declare class CalcValue {
|
|
|
734
734
|
constructor(props?: Partial<CalcValue>);
|
|
735
735
|
}
|
|
736
736
|
export declare enum AMOUNT_TYPE {
|
|
737
|
-
CNY = "CNY"
|
|
738
|
-
USD = "USD"
|
|
739
|
-
JPY = "JPY"
|
|
740
|
-
EUR = "EUR"
|
|
741
|
-
INR = "INR"
|
|
742
|
-
IDR = "IDR"
|
|
743
|
-
BRL = "BRL"
|
|
744
|
-
AED = "AED"
|
|
745
|
-
AUD = "AUD"
|
|
746
|
-
CAD = "CAD"
|
|
747
|
-
EGP = "EGP"
|
|
748
|
-
GBP = "GBP"
|
|
749
|
-
ZAR = "ZAR"
|
|
750
|
-
KRW = "KRW"
|
|
751
|
-
MAD = "MAD"
|
|
752
|
-
MXN = "MXN"
|
|
753
|
-
MYR = "MYR"
|
|
754
|
-
PHP = "PHP"
|
|
755
|
-
PLN = "PLN"
|
|
756
|
-
RUB = "RUB"
|
|
757
|
-
SGD = "SGD"
|
|
758
|
-
THB = "THB"
|
|
759
|
-
TRY = "TRY"
|
|
760
|
-
TWD = "TWD"
|
|
761
|
-
VND = "VND"
|
|
762
|
-
HKD = "HKD"
|
|
737
|
+
CNY = "CNY",
|
|
738
|
+
USD = "USD",
|
|
739
|
+
JPY = "JPY",
|
|
740
|
+
EUR = "EUR",
|
|
741
|
+
INR = "INR",
|
|
742
|
+
IDR = "IDR",
|
|
743
|
+
BRL = "BRL",
|
|
744
|
+
AED = "AED",
|
|
745
|
+
AUD = "AUD",
|
|
746
|
+
CAD = "CAD",
|
|
747
|
+
EGP = "EGP",
|
|
748
|
+
GBP = "GBP",
|
|
749
|
+
ZAR = "ZAR",
|
|
750
|
+
KRW = "KRW",
|
|
751
|
+
MAD = "MAD",
|
|
752
|
+
MXN = "MXN",
|
|
753
|
+
MYR = "MYR",
|
|
754
|
+
PHP = "PHP",
|
|
755
|
+
PLN = "PLN",
|
|
756
|
+
RUB = "RUB",
|
|
757
|
+
SGD = "SGD",
|
|
758
|
+
THB = "THB",
|
|
759
|
+
TRY = "TRY",
|
|
760
|
+
TWD = "TWD",
|
|
761
|
+
VND = "VND",
|
|
762
|
+
HKD = "HKD",
|
|
763
763
|
IEP = "IEP"
|
|
764
764
|
}
|
|
765
765
|
/**
|
|
@@ -811,6 +811,7 @@ export declare enum COMMON_SETTING_TYPE {
|
|
|
811
811
|
CAPTION_SIZE = "captionSize",
|
|
812
812
|
CAPTION_COLOR = "captionColor",
|
|
813
813
|
IS_CAPTION_ITALIC = "isCaptionItalic",
|
|
814
|
+
CAPTION_FONT_WEIGHT = "captionFontWeight",
|
|
814
815
|
SHOW_TABLE_INDEX = "showTableIndex"
|
|
815
816
|
}
|
|
816
817
|
export declare enum PAGE_STATUS {
|
|
@@ -959,6 +960,7 @@ export declare class ListTreeData {
|
|
|
959
960
|
groupFields: {
|
|
960
961
|
field: string;
|
|
961
962
|
orderType: 'desc' | 'asc';
|
|
963
|
+
columnType: string;
|
|
962
964
|
}[];
|
|
963
965
|
groupHeaderName: any;
|
|
964
966
|
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-
|
|
3
|
+
"version": "7.0.0-props.10",
|
|
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-
|
|
29
|
+
"@byteluck-fe/model-driven-shared": "7.0.0-props.10",
|
|
30
30
|
"async-validator": "3.5.1",
|
|
31
31
|
"tslib": "^2.1.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "57a18bcb85857454a22df86d45d2512022f467c6"
|
|
34
34
|
}
|