@byteluck-fe/model-driven-core 2.5.0-alpha.9 → 2.5.0-beta.1

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.
Files changed (63) hide show
  1. package/dist/esm/common/BaseControl/designer.js +189 -228
  2. package/dist/esm/common/BaseControl/property.js +8 -22
  3. package/dist/esm/common/BaseControl/runtime.js +5 -26
  4. package/dist/esm/common/ColumnControl/designer.js +1 -15
  5. package/dist/esm/common/ColumnControl/property.js +11 -59
  6. package/dist/esm/common/ColumnControl/runtime.js +1 -15
  7. package/dist/esm/common/FormControl/designer.js +3 -18
  8. package/dist/esm/common/FormControl/property.js +25 -88
  9. package/dist/esm/common/FormControl/runtime.js +1 -16
  10. package/dist/esm/common/LayoutControl/designer.js +70 -104
  11. package/dist/esm/common/LayoutControl/runtime.js +1 -16
  12. package/dist/esm/common/ListControl/designer.js +61 -86
  13. package/dist/esm/common/ListControl/property.js +0 -14
  14. package/dist/esm/common/ListControl/runtime.js +1 -16
  15. package/dist/esm/common/SearchViewControl/designer.js +1 -15
  16. package/dist/esm/common/SearchViewControl/property.js +0 -14
  17. package/dist/esm/common/SearchViewControl/runtime.js +1 -15
  18. package/dist/esm/common/WrapControl/designer.js +1 -15
  19. package/dist/esm/common/WrapControl/runtime.js +1 -15
  20. package/dist/esm/framework/RegisterControls.js +128 -197
  21. package/dist/esm/framework/index.js +101 -312
  22. package/dist/index.umd.js +1 -1
  23. package/dist/types/api-doc-index.d.ts +4 -4
  24. package/dist/types/common/BaseControl/designer.d.ts +62 -62
  25. package/dist/types/common/BaseControl/index.d.ts +13 -13
  26. package/dist/types/common/BaseControl/property.d.ts +36 -22
  27. package/dist/types/common/BaseControl/runtime.d.ts +22 -22
  28. package/dist/types/common/BaseControl/types.d.ts +35 -35
  29. package/dist/types/common/ColumnControl/designer.d.ts +10 -10
  30. package/dist/types/common/ColumnControl/index.d.ts +12 -12
  31. package/dist/types/common/ColumnControl/property.d.ts +73 -73
  32. package/dist/types/common/ColumnControl/runtime.d.ts +10 -10
  33. package/dist/types/common/ControlArray.d.ts +8 -8
  34. package/dist/types/common/FormControl/designer.d.ts +13 -13
  35. package/dist/types/common/FormControl/index.d.ts +12 -12
  36. package/dist/types/common/FormControl/property.d.ts +100 -96
  37. package/dist/types/common/FormControl/runtime.d.ts +11 -11
  38. package/dist/types/common/LayoutControl/designer.d.ts +21 -21
  39. package/dist/types/common/LayoutControl/index.d.ts +12 -12
  40. package/dist/types/common/LayoutControl/property.d.ts +6 -6
  41. package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
  42. package/dist/types/common/ListControl/designer.d.ts +16 -16
  43. package/dist/types/common/ListControl/index.d.ts +12 -12
  44. package/dist/types/common/ListControl/property.d.ts +12 -12
  45. package/dist/types/common/ListControl/runtime.d.ts +12 -12
  46. package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
  47. package/dist/types/common/SearchViewControl/index.d.ts +12 -12
  48. package/dist/types/common/SearchViewControl/property.d.ts +8 -8
  49. package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
  50. package/dist/types/common/Validator.d.ts +15 -15
  51. package/dist/types/common/WrapControl/designer.d.ts +11 -11
  52. package/dist/types/common/WrapControl/index.d.ts +12 -12
  53. package/dist/types/common/WrapControl/property.d.ts +6 -6
  54. package/dist/types/common/WrapControl/runtime.d.ts +11 -11
  55. package/dist/types/common/controlHooksEmitter.d.ts +4 -4
  56. package/dist/types/common/index.d.ts +12 -12
  57. package/dist/types/common/initLinkOperationRules.d.ts +6 -6
  58. package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
  59. package/dist/types/framework/RegisterControls.d.ts +33 -33
  60. package/dist/types/framework/index.d.ts +812 -574
  61. package/dist/types/index.d.ts +3 -3
  62. package/dist/types/type.d.ts +91 -91
  63. package/package.json +3 -3
@@ -1,22 +1,36 @@
1
- import { RuleItem } from '../Validator';
2
- import { BaseStyle } from '../../framework';
3
- declare class PropertyRules {
4
- [field: string]: RuleItem | RuleItem[];
5
- isHide: RuleItem;
6
- constructor(props: Property);
7
- }
8
- declare class PropertyRuntimeRules extends Array<RuleItem> {
9
- readonly [index: number]: RuleItem;
10
- constructor(props: Property);
11
- }
12
- declare class Property {
13
- static readonly Rules: typeof PropertyRules;
14
- static readonly RuntimeRules: typeof PropertyRuntimeRules;
15
- isHide: boolean;
16
- className?: string[];
17
- style: BaseStyle;
18
- caption: string;
19
- constructor(props?: Partial<Property>, caption?: string);
20
- }
21
- export default Property;
22
- export { Property, PropertyRules, PropertyRuntimeRules };
1
+ import { RuleItem } from '../Validator';
2
+ import { BaseStyle } from '../../framework';
3
+ declare class PropertyRules {
4
+ [field: string]: RuleItem | RuleItem[];
5
+ isHide: RuleItem;
6
+ constructor(props: Property);
7
+ }
8
+ declare class PropertyRuntimeRules extends Array<RuleItem> {
9
+ readonly [index: number]: RuleItem;
10
+ constructor(props: Property);
11
+ }
12
+ /**
13
+ * 全局属性
14
+ * @public
15
+ */
16
+ declare class Property {
17
+ static readonly Rules: typeof PropertyRules;
18
+ static readonly RuntimeRules: typeof PropertyRuntimeRules;
19
+ /**
20
+ * 是否隐藏
21
+ * @public
22
+ * @defaultValue false
23
+ */
24
+ isHide: boolean;
25
+ className?: string[];
26
+ style: BaseStyle;
27
+ /**
28
+ * 标题
29
+ * @public
30
+ * @defaultValue ''
31
+ */
32
+ caption: string;
33
+ constructor(props?: Partial<Property>, caption?: string);
34
+ }
35
+ export default Property;
36
+ export { Property, PropertyRules, PropertyRuntimeRules };
@@ -1,22 +1,22 @@
1
- import Property, { PropertyRuntimeRules } from './property';
2
- import { CustomEventItem, FieldTypes } from '@byteluck-fe/model-driven-shared';
3
- import { ControlsKeys, BaseControlSchema, BaseControlTypes } from '../../type';
4
- import { PAGE_STATUS } from '../../framework';
5
- declare class Control {
6
- static readonly controlType: string;
7
- static readonly controlFieldType: FieldTypes;
8
- static readonly __is_control__ = true;
9
- static readonly controlCustomEvents: CustomEventItem[];
10
- readonly id: string;
11
- readonly type: string;
12
- readonly controlType: BaseControlTypes;
13
- readonly props: Property;
14
- readonly fieldType: FieldTypes;
15
- readonly customEvents: CustomEventItem[];
16
- pageStatus: PAGE_STATUS;
17
- parent: Control | null;
18
- constructor(props?: Partial<BaseControlSchema<ControlsKeys, Property>>);
19
- get rules(): PropertyRuntimeRules;
20
- }
21
- export default Control;
22
- export { Control as RuntimeControl };
1
+ import Property, { PropertyRuntimeRules } from './property';
2
+ import { CustomEventItem, FieldTypes } from '@byteluck-fe/model-driven-shared';
3
+ import { ControlsKeys, BaseControlSchema, BaseControlTypes } from '../../type';
4
+ import { PAGE_STATUS } from '../../framework';
5
+ declare class Control {
6
+ static readonly controlType: string;
7
+ static readonly controlFieldType: FieldTypes;
8
+ static readonly __is_control__ = true;
9
+ static readonly controlCustomEvents: CustomEventItem[];
10
+ readonly id: string;
11
+ readonly type: string;
12
+ readonly controlType: BaseControlTypes;
13
+ readonly props: Property;
14
+ readonly fieldType: FieldTypes;
15
+ readonly customEvents: CustomEventItem[];
16
+ pageStatus: PAGE_STATUS;
17
+ parent: Control | null;
18
+ constructor(props?: Partial<BaseControlSchema<ControlsKeys, Property>>);
19
+ get rules(): PropertyRuntimeRules;
20
+ }
21
+ export default Control;
22
+ export { Control as RuntimeControl };
@@ -1,35 +1,35 @@
1
- import { FieldTypes } from '@byteluck-fe/model-driven-shared';
2
- import { COMMON_SETTING_TYPE, DataBind, DataSourceBind, ObjectDataBind } from '../../framework';
3
- export declare interface SettingOption {
4
- key: string;
5
- visible: boolean;
6
- showItems?: Array<COMMON_SETTING_TYPE>;
7
- }
8
- export declare interface HideOptions {
9
- key: string;
10
- hideItems: Array<COMMON_SETTING_TYPE>;
11
- }
12
- export declare interface ModelType {
13
- key: string;
14
- type: FieldTypes;
15
- required?: boolean;
16
- length?: number;
17
- listKey?: string;
18
- controlId?: string;
19
- }
20
- export declare interface DataBindModelType {
21
- controlId: string;
22
- caption: string;
23
- type: string;
24
- fieldType: FieldTypes;
25
- parentId: null | string;
26
- dataBind?: DataBind | ObjectDataBind;
27
- required?: boolean;
28
- maxLength?: number;
29
- datasourceBind?: DataSourceBind;
30
- props: {
31
- [key: string]: unknown;
32
- };
33
- encrypted?: boolean;
34
- encryptedMode?: string;
35
- }
1
+ import { FieldTypes } from '@byteluck-fe/model-driven-shared';
2
+ import { COMMON_SETTING_TYPE, DataBind, DataSourceBind, ObjectDataBind } from '../../framework';
3
+ export declare interface SettingOption {
4
+ key: string;
5
+ visible: boolean;
6
+ showItems?: Array<COMMON_SETTING_TYPE>;
7
+ }
8
+ export declare interface HideOptions {
9
+ key: string;
10
+ hideItems: Array<COMMON_SETTING_TYPE>;
11
+ }
12
+ export declare interface ModelType {
13
+ key: string;
14
+ type: FieldTypes;
15
+ required?: boolean;
16
+ length?: number;
17
+ listKey?: string;
18
+ controlId?: string;
19
+ }
20
+ export declare interface DataBindModelType {
21
+ controlId: string;
22
+ caption: string;
23
+ type: string;
24
+ fieldType: FieldTypes;
25
+ parentId: null | string;
26
+ dataBind?: DataBind | ObjectDataBind;
27
+ required?: boolean;
28
+ maxLength?: number;
29
+ datasourceBind?: DataSourceBind;
30
+ props: {
31
+ [key: string]: unknown;
32
+ };
33
+ encrypted?: boolean;
34
+ encryptedMode?: string;
35
+ }
@@ -1,10 +1,10 @@
1
- import { DesignerControl } from '../BaseControl';
2
- import ColumnControlProperty from './property';
3
- import { ColumnControlsKeys, ColumnControlSchema } from '../../type';
4
- declare class ColumnControl extends DesignerControl {
5
- readonly controlType = "column";
6
- readonly props: ColumnControlProperty;
7
- constructor(props?: Partial<ColumnControlSchema<ColumnControlsKeys>>);
8
- }
9
- export default ColumnControl;
10
- export { ColumnControl as DesignerColumnControl };
1
+ import { DesignerControl } from '../BaseControl';
2
+ import ColumnControlProperty from './property';
3
+ import { ColumnControlsKeys, ColumnControlSchema } from '../../type';
4
+ declare class ColumnControl extends DesignerControl {
5
+ readonly controlType = "column";
6
+ readonly props: ColumnControlProperty;
7
+ constructor(props?: Partial<ColumnControlSchema<ColumnControlsKeys>>);
8
+ }
9
+ export default ColumnControl;
10
+ export { ColumnControl as DesignerColumnControl };
@@ -1,12 +1,12 @@
1
- import Designer from './designer';
2
- import Runtime from './runtime';
3
- import Property from './property';
4
- declare const _default: {
5
- Designer: typeof Designer;
6
- Runtime: typeof Runtime;
7
- Property: typeof Property;
8
- };
9
- export default _default;
10
- export * from './designer';
11
- export * from './runtime';
12
- export * from './property';
1
+ import Designer from './designer';
2
+ import Runtime from './runtime';
3
+ import Property from './property';
4
+ declare const _default: {
5
+ Designer: typeof Designer;
6
+ Runtime: typeof Runtime;
7
+ Property: typeof Property;
8
+ };
9
+ export default _default;
10
+ export * from './designer';
11
+ export * from './runtime';
12
+ export * from './property';
@@ -1,73 +1,73 @@
1
- import { Property, PropertyRules } from '../BaseControl';
2
- import { RuleItem } from 'async-validator';
3
- import { DataBind, DataSourceBind, OptionSetting, AutoWidth } from '../../framework';
4
- declare class ColumnControlPropertyRules extends PropertyRules {
5
- caption: RuleItem;
6
- width: RuleItem;
7
- constructor(props: ColumnControlProperty);
8
- }
9
- /**
10
- * 列基本属性
11
- * @public
12
- */
13
- declare class ColumnControlProperty extends Property {
14
- static readonly Rules: typeof ColumnControlPropertyRules;
15
- /**
16
- * 宽度类型
17
- * @defaultValue 'auto'
18
- */
19
- widthType: 'px' | 'auto' | 'percent';
20
- /**
21
- * 宽度
22
- * @defaultValue 150
23
- */
24
- width: number;
25
- /**
26
- * 标题
27
- */
28
- caption: string;
29
- /**
30
- * 绑定数据项
31
- */
32
- dataBind: DataBind;
33
- /**
34
- * 自适应页面宽度
35
- */
36
- autoWidth: AutoWidth;
37
- /**
38
- * 冻结
39
- * @defaultValue 'none'
40
- */
41
- fixed: 'left' | 'right' | 'none';
42
- /**
43
- * 表头排序
44
- * @defaultValue true
45
- */
46
- sort: boolean;
47
- /**
48
- * 对齐
49
- */
50
- align?: 'left' | 'right';
51
- /**
52
- * @internal
53
- */
54
- colSpan?: string;
55
- /**
56
- * 自动高度
57
- * @defaultValue false
58
- */
59
- autoHeight: boolean;
60
- constructor(props?: Partial<ColumnControlProperty>);
61
- }
62
- declare class ColumnOptionAndDataSourcePropertyRules extends ColumnControlPropertyRules {
63
- optionConfig: RuleItem;
64
- options: RuleItem[];
65
- datasourceBind: RuleItem[];
66
- constructor(props: ColumnControlProperty & {
67
- optionConfig: 'datasource' | 'custom' | 'none';
68
- datasourceBind: DataSourceBind;
69
- options: OptionSetting[];
70
- });
71
- }
72
- export default ColumnControlProperty;
73
- export { ColumnControlProperty, ColumnControlPropertyRules, ColumnOptionAndDataSourcePropertyRules, };
1
+ import { Property, PropertyRules } from '../BaseControl';
2
+ import { RuleItem } from 'async-validator';
3
+ import { DataBind, DataSourceBind, OptionSetting, AutoWidth } from '../../framework';
4
+ declare class ColumnControlPropertyRules extends PropertyRules {
5
+ caption: RuleItem;
6
+ width: RuleItem;
7
+ constructor(props: ColumnControlProperty);
8
+ }
9
+ /**
10
+ * 列基本属性
11
+ * @public
12
+ */
13
+ declare class ColumnControlProperty extends Property {
14
+ static readonly Rules: typeof ColumnControlPropertyRules;
15
+ /**
16
+ * 宽度类型
17
+ * @defaultValue 'auto'
18
+ */
19
+ widthType: 'px' | 'auto' | 'percent';
20
+ /**
21
+ * 宽度
22
+ * @defaultValue 150
23
+ */
24
+ width: number;
25
+ /**
26
+ * 标题
27
+ */
28
+ caption: string;
29
+ /**
30
+ * 绑定数据项
31
+ */
32
+ dataBind: DataBind;
33
+ /**
34
+ * 自适应页面宽度
35
+ */
36
+ autoWidth: AutoWidth;
37
+ /**
38
+ * 冻结
39
+ * @defaultValue 'none'
40
+ */
41
+ fixed: 'left' | 'right' | 'none';
42
+ /**
43
+ * 表头排序
44
+ * @defaultValue true
45
+ */
46
+ sort: boolean;
47
+ /**
48
+ * 对齐
49
+ */
50
+ align?: 'left' | 'right';
51
+ /**
52
+ * @internal
53
+ */
54
+ colSpan?: string;
55
+ /**
56
+ * 自动高度
57
+ * @defaultValue false
58
+ */
59
+ autoHeight: boolean;
60
+ constructor(props?: Partial<ColumnControlProperty>);
61
+ }
62
+ declare class ColumnOptionAndDataSourcePropertyRules extends ColumnControlPropertyRules {
63
+ optionConfig: RuleItem;
64
+ options: RuleItem[];
65
+ datasourceBind: RuleItem[];
66
+ constructor(props: ColumnControlProperty & {
67
+ optionConfig: 'datasource' | 'custom' | 'none';
68
+ datasourceBind: DataSourceBind;
69
+ options: OptionSetting[];
70
+ });
71
+ }
72
+ export default ColumnControlProperty;
73
+ export { ColumnControlProperty, ColumnControlPropertyRules, ColumnOptionAndDataSourcePropertyRules, };
@@ -1,10 +1,10 @@
1
- import { RuntimeControl } from '../BaseControl';
2
- import ColumnControlProperty from './property';
3
- import { ColumnControlsKeys, ColumnControlSchema } from '../../type';
4
- declare class ColumnControl extends RuntimeControl {
5
- readonly controlType = "column";
6
- readonly props: ColumnControlProperty;
7
- constructor(props?: Partial<ColumnControlSchema<ColumnControlsKeys>>);
8
- }
9
- export default ColumnControl;
10
- export { ColumnControl as RuntimeColumnControl };
1
+ import { RuntimeControl } from '../BaseControl';
2
+ import ColumnControlProperty from './property';
3
+ import { ColumnControlsKeys, ColumnControlSchema } from '../../type';
4
+ declare class ColumnControl extends RuntimeControl {
5
+ readonly controlType = "column";
6
+ readonly props: ColumnControlProperty;
7
+ constructor(props?: Partial<ColumnControlSchema<ColumnControlsKeys>>);
8
+ }
9
+ export default ColumnControl;
10
+ export { ColumnControl as RuntimeColumnControl };
@@ -1,8 +1,8 @@
1
- export declare function setPropertyDontEnum<T extends object>(obj: T, property: string): void;
2
- export declare function defineParent<T extends object>(control: T & {
3
- parent: any;
4
- }, parent: T | null): void;
5
- export declare function defineArrayParent<T extends object & {
6
- parent: any;
7
- }>(controls: T[], parent: T | null): void;
8
- export declare function defineControlArrayToProperty<T>(obj: object, property: string, initialValue?: T[], parent?: object): void;
1
+ export declare function setPropertyDontEnum<T extends object>(obj: T, property: string): void;
2
+ export declare function defineParent<T extends object>(control: T & {
3
+ parent: any;
4
+ }, parent: T | null): void;
5
+ export declare function defineArrayParent<T extends object & {
6
+ parent: any;
7
+ }>(controls: T[], parent: T | null): void;
8
+ export declare function defineControlArrayToProperty<T>(obj: object, property: string, initialValue?: T[], parent?: object): void;
@@ -1,13 +1,13 @@
1
- import { DesignerControl } from '../BaseControl';
2
- import BaseControlProperty from './property';
3
- import { FormControlsKeys, FormControlSchema } from '../../type';
4
- import { CustomAttribute } from '../../framework';
5
- declare class FormControl extends DesignerControl {
6
- static readonly controlEventKeys: string[];
7
- static controlCustomAttributes?: CustomAttribute[];
8
- readonly controlType = "form";
9
- readonly props: BaseControlProperty;
10
- constructor(props?: Partial<FormControlSchema<FormControlsKeys>>);
11
- }
12
- export default FormControl;
13
- export { FormControl as DesignerFormControl };
1
+ import { DesignerControl } from '../BaseControl';
2
+ import BaseControlProperty from './property';
3
+ import { FormControlsKeys, FormControlSchema } from '../../type';
4
+ import { CustomAttribute } from '../../framework';
5
+ declare class FormControl extends DesignerControl {
6
+ static readonly controlEventKeys: string[];
7
+ static controlCustomAttributes?: CustomAttribute[];
8
+ readonly controlType = "form";
9
+ readonly props: BaseControlProperty;
10
+ constructor(props?: Partial<FormControlSchema<FormControlsKeys>>);
11
+ }
12
+ export default FormControl;
13
+ export { FormControl as DesignerFormControl };
@@ -1,12 +1,12 @@
1
- import Designer from './designer';
2
- import Runtime from './runtime';
3
- import Property from './property';
4
- declare const _default: {
5
- Designer: typeof Designer;
6
- Runtime: typeof Runtime;
7
- Property: typeof Property;
8
- };
9
- export default _default;
10
- export * from './designer';
11
- export * from './runtime';
12
- export * from './property';
1
+ import Designer from './designer';
2
+ import Runtime from './runtime';
3
+ import Property from './property';
4
+ declare const _default: {
5
+ Designer: typeof Designer;
6
+ Runtime: typeof Runtime;
7
+ Property: typeof Property;
8
+ };
9
+ export default _default;
10
+ export * from './designer';
11
+ export * from './runtime';
12
+ export * from './property';
@@ -1,96 +1,100 @@
1
- import { Property, PropertyRules, PropertyRuntimeRules } from '../BaseControl';
2
- import { RuleItem } from '../Validator';
3
- import { DataBind, DataSourceBind, ObjectDataBind, OptionSetting } from '../../framework';
4
- declare class BaseControlPropertyRules extends PropertyRules {
5
- dataBind: RuleItem;
6
- caption: RuleItem;
7
- isHideCaption: RuleItem;
8
- labelPosition: RuleItem;
9
- defaultState: RuleItem;
10
- required: RuleItem;
11
- captionTip: RuleItem;
12
- constructor(props: BaseControlProperty);
13
- }
14
- declare class BaseControlPropertyRuntimeRules extends PropertyRuntimeRules {
15
- constructor(props: BaseControlProperty);
16
- }
17
- declare class BaseControlProperty extends Property {
18
- static readonly Rules: typeof BaseControlPropertyRules;
19
- static readonly RuntimeRules: typeof BaseControlPropertyRuntimeRules;
20
- /**
21
- * 标题
22
- * @defaultValue ''
23
- * @public
24
- */
25
- caption: string;
26
- /**
27
- * 隐藏标题
28
- * @defaultValue false
29
- * @public
30
- */
31
- isHideCaption: boolean;
32
- /**
33
- * 显示气泡提示
34
- * @defaultValue false
35
- * @public
36
- */
37
- isShowCaptionTip: boolean;
38
- /**
39
- * 气泡提示语
40
- * @defaultValue ''
41
- * @public
42
- */
43
- captionTip: string;
44
- /**
45
- * 标题布局
46
- * @defaultValue ''
47
- * @public
48
- */
49
- labelPosition: 'top' | 'left';
50
- /**
51
- * 绑定数据项
52
- * @public
53
- */
54
- dataBind: DataBind | ObjectDataBind;
55
- /**
56
- * 默认值
57
- * @public
58
- */
59
- defaultValue: string | number | string[] | number[] | unknown;
60
- /**
61
- * 提示文字
62
- * @defaultValue ''
63
- * @public
64
- */
65
- placeholder: string;
66
- /**
67
- * 默认状态
68
- * @defaultValue 'default'
69
- * @public
70
- */
71
- defaultState: 'default' | 'readonly';
72
- /**
73
- * 必填
74
- * @defaultValue false
75
- * @public
76
- */
77
- required: boolean;
78
- /**
79
- * 必填提示文案
80
- * @defaultValue ''
81
- */
82
- requiredMessage: string;
83
- constructor(props?: Partial<BaseControlProperty>);
84
- }
85
- declare class OptionAndDataSourcePropertyRules extends BaseControlPropertyRules {
86
- optionConfig: RuleItem;
87
- options: RuleItem[];
88
- datasourceBind: RuleItem[];
89
- constructor(props: BaseControlProperty & {
90
- optionConfig?: 'custom' | 'datasource';
91
- datasourceBind?: DataSourceBind;
92
- options?: OptionSetting[];
93
- });
94
- }
95
- export default BaseControlProperty;
96
- export { BaseControlProperty, BaseControlPropertyRules, BaseControlPropertyRuntimeRules, OptionAndDataSourcePropertyRules, };
1
+ import { Property, PropertyRules, PropertyRuntimeRules } from '../BaseControl';
2
+ import { RuleItem } from '../Validator';
3
+ import { DataBind, DataSourceBind, ObjectDataBind, OptionSetting } from '../../framework';
4
+ declare class BaseControlPropertyRules extends PropertyRules {
5
+ dataBind: RuleItem;
6
+ caption: RuleItem;
7
+ isHideCaption: RuleItem;
8
+ labelPosition: RuleItem;
9
+ defaultState: RuleItem;
10
+ required: RuleItem;
11
+ captionTip: RuleItem;
12
+ constructor(props: BaseControlProperty);
13
+ }
14
+ declare class BaseControlPropertyRuntimeRules extends PropertyRuntimeRules {
15
+ constructor(props: BaseControlProperty);
16
+ }
17
+ /**
18
+ * 表单控件公共属性
19
+ * @public
20
+ */
21
+ declare class BaseControlProperty extends Property {
22
+ static readonly Rules: typeof BaseControlPropertyRules;
23
+ static readonly RuntimeRules: typeof BaseControlPropertyRuntimeRules;
24
+ /**
25
+ * 标题
26
+ * @defaultValue ''
27
+ * @public
28
+ */
29
+ caption: string;
30
+ /**
31
+ * 隐藏标题
32
+ * @defaultValue false
33
+ * @public
34
+ */
35
+ isHideCaption: boolean;
36
+ /**
37
+ * 显示气泡提示
38
+ * @defaultValue false
39
+ * @public
40
+ */
41
+ isShowCaptionTip: boolean;
42
+ /**
43
+ * 气泡提示语
44
+ * @defaultValue ''
45
+ * @public
46
+ */
47
+ captionTip: string;
48
+ /**
49
+ * 标题布局
50
+ * @defaultValue ''
51
+ * @public
52
+ */
53
+ labelPosition: 'top' | 'left';
54
+ /**
55
+ * 绑定数据项
56
+ * @public
57
+ */
58
+ dataBind: DataBind | ObjectDataBind;
59
+ /**
60
+ * 默认值
61
+ * @public
62
+ */
63
+ defaultValue: string | number | string[] | number[] | unknown;
64
+ /**
65
+ * 提示文字
66
+ * @defaultValue ''
67
+ * @public
68
+ */
69
+ placeholder: string;
70
+ /**
71
+ * 默认状态
72
+ * @defaultValue 'default'
73
+ * @public
74
+ */
75
+ defaultState: 'default' | 'readonly';
76
+ /**
77
+ * 必填
78
+ * @defaultValue false
79
+ * @public
80
+ */
81
+ required: boolean;
82
+ /**
83
+ * 必填提示文案
84
+ * @defaultValue ''
85
+ */
86
+ requiredMessage: string;
87
+ constructor(props?: Partial<BaseControlProperty>);
88
+ }
89
+ declare class OptionAndDataSourcePropertyRules extends BaseControlPropertyRules {
90
+ optionConfig: RuleItem;
91
+ options: RuleItem[];
92
+ datasourceBind: RuleItem[];
93
+ constructor(props: BaseControlProperty & {
94
+ optionConfig?: 'custom' | 'datasource';
95
+ datasourceBind?: DataSourceBind;
96
+ options?: OptionSetting[];
97
+ });
98
+ }
99
+ export default BaseControlProperty;
100
+ export { BaseControlProperty, BaseControlPropertyRules, BaseControlPropertyRuntimeRules, OptionAndDataSourcePropertyRules, };