@byteluck-fe/model-driven-core 4.34.0-lx3 → 4.36.0-lx1

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 (50) hide show
  1. package/README.md +69 -69
  2. package/dist/esm/common/BaseControl/designer.js +12 -13
  3. package/dist/esm/common/BaseControl/property.js +11 -11
  4. package/dist/esm/common/BaseControl/runtime.js +1 -2
  5. package/dist/esm/common/ColumnControl/property.js +28 -28
  6. package/dist/esm/common/FormControl/property.js +56 -56
  7. package/dist/esm/framework/index.js +13 -0
  8. package/dist/index.umd.js +1 -1
  9. package/dist/types/api-doc-index.d.ts +4 -4
  10. package/dist/types/common/BaseControl/designer.d.ts +63 -63
  11. package/dist/types/common/BaseControl/index.d.ts +13 -13
  12. package/dist/types/common/BaseControl/property.d.ts +38 -38
  13. package/dist/types/common/BaseControl/runtime.d.ts +23 -23
  14. package/dist/types/common/BaseControl/types.d.ts +35 -35
  15. package/dist/types/common/ColumnControl/designer.d.ts +20 -20
  16. package/dist/types/common/ColumnControl/index.d.ts +12 -12
  17. package/dist/types/common/ColumnControl/property.d.ts +74 -74
  18. package/dist/types/common/ColumnControl/runtime.d.ts +11 -11
  19. package/dist/types/common/ControlArray.d.ts +9 -9
  20. package/dist/types/common/FormControl/designer.d.ts +13 -13
  21. package/dist/types/common/FormControl/index.d.ts +12 -12
  22. package/dist/types/common/FormControl/property.d.ts +118 -118
  23. package/dist/types/common/FormControl/runtime.d.ts +11 -11
  24. package/dist/types/common/LayoutControl/designer.d.ts +21 -21
  25. package/dist/types/common/LayoutControl/index.d.ts +12 -12
  26. package/dist/types/common/LayoutControl/property.d.ts +6 -6
  27. package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
  28. package/dist/types/common/ListControl/designer.d.ts +16 -16
  29. package/dist/types/common/ListControl/index.d.ts +12 -12
  30. package/dist/types/common/ListControl/property.d.ts +18 -18
  31. package/dist/types/common/ListControl/runtime.d.ts +12 -12
  32. package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
  33. package/dist/types/common/SearchViewControl/index.d.ts +12 -12
  34. package/dist/types/common/SearchViewControl/property.d.ts +8 -8
  35. package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
  36. package/dist/types/common/Validator.d.ts +15 -15
  37. package/dist/types/common/WrapControl/designer.d.ts +11 -11
  38. package/dist/types/common/WrapControl/index.d.ts +12 -12
  39. package/dist/types/common/WrapControl/property.d.ts +6 -6
  40. package/dist/types/common/WrapControl/runtime.d.ts +11 -11
  41. package/dist/types/common/controlHooksEmitter.d.ts +4 -4
  42. package/dist/types/common/index.d.ts +12 -12
  43. package/dist/types/common/initLinkOperationRules.d.ts +6 -6
  44. package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
  45. package/dist/types/framework/RegisterControls.d.ts +37 -37
  46. package/dist/types/framework/index.d.ts +898 -886
  47. package/dist/types/framework/isDataBind.d.ts +2 -2
  48. package/dist/types/index.d.ts +4 -4
  49. package/dist/types/type.d.ts +91 -91
  50. package/package.json +2 -2
@@ -1,13 +1,13 @@
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';
13
- export * from './types';
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';
13
+ export * from './types';
@@ -1,38 +1,38 @@
1
- import { RuleItem } from '../Validator';
2
- import { BaseStyle } from '../../framework';
3
- import { MODE } from 'type';
4
- declare class PropertyRules {
5
- [field: string]: RuleItem | RuleItem[];
6
- isHide: RuleItem;
7
- constructor(props: Property);
8
- }
9
- declare class PropertyRuntimeRules extends Array<RuleItem> {
10
- readonly [index: number]: RuleItem;
11
- constructor(props: Property);
12
- }
13
- /**
14
- * 全局属性
15
- * @public
16
- */
17
- declare class Property {
18
- static mode: MODE;
19
- static readonly Rules: typeof PropertyRules;
20
- static readonly RuntimeRules: typeof PropertyRuntimeRules;
21
- /**
22
- * 是否隐藏
23
- * @public
24
- * @defaultValue false
25
- */
26
- isHide: boolean;
27
- className?: string[];
28
- style: BaseStyle;
29
- /**
30
- * 标题
31
- * @public
32
- * @defaultValue ''
33
- */
34
- caption: string;
35
- constructor(props?: Partial<Property>, caption?: string);
36
- }
37
- export default Property;
38
- export { Property, PropertyRules, PropertyRuntimeRules };
1
+ import { RuleItem } from '../Validator';
2
+ import { BaseStyle } from '../../framework';
3
+ import { MODE } from 'type';
4
+ declare class PropertyRules {
5
+ [field: string]: RuleItem | RuleItem[];
6
+ isHide: RuleItem;
7
+ constructor(props: Property);
8
+ }
9
+ declare class PropertyRuntimeRules extends Array<RuleItem> {
10
+ readonly [index: number]: RuleItem;
11
+ constructor(props: Property);
12
+ }
13
+ /**
14
+ * 全局属性
15
+ * @public
16
+ */
17
+ declare class Property {
18
+ static mode: MODE;
19
+ static readonly Rules: typeof PropertyRules;
20
+ static readonly RuntimeRules: typeof PropertyRuntimeRules;
21
+ /**
22
+ * 是否隐藏
23
+ * @public
24
+ * @defaultValue false
25
+ */
26
+ isHide: boolean;
27
+ className?: string[];
28
+ style: BaseStyle;
29
+ /**
30
+ * 标题
31
+ * @public
32
+ * @defaultValue ''
33
+ */
34
+ caption: string;
35
+ constructor(props?: Partial<Property>, caption?: string);
36
+ }
37
+ export default Property;
38
+ export { Property, PropertyRules, PropertyRuntimeRules };
@@ -1,23 +1,23 @@
1
- import Property, { PropertyRuntimeRules } from './property';
2
- import { CustomEventItem, FieldTypes } from '@byteluck-fe/model-driven-shared';
3
- import { ControlsKeys, BaseControlSchema, BaseControlTypes, MODE } from '../../type';
4
- import { PAGE_STATUS } from '../../framework';
5
- declare class Control {
6
- static mode: MODE;
7
- static readonly controlType: string;
8
- static readonly controlFieldType: FieldTypes;
9
- static readonly __is_control__ = true;
10
- static readonly controlCustomEvents: CustomEventItem[];
11
- readonly id: string;
12
- readonly type: string;
13
- readonly controlType: BaseControlTypes;
14
- readonly props: Property;
15
- readonly fieldType: FieldTypes;
16
- readonly customEvents: CustomEventItem[];
17
- pageStatus: PAGE_STATUS;
18
- parent: Control | null;
19
- constructor(props?: Partial<BaseControlSchema<ControlsKeys, Property>>);
20
- get rules(): PropertyRuntimeRules;
21
- }
22
- export default Control;
23
- 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, MODE } from '../../type';
4
+ import { PAGE_STATUS } from '../../framework';
5
+ declare class Control {
6
+ static mode: MODE;
7
+ static readonly controlType: string;
8
+ static readonly controlFieldType: FieldTypes;
9
+ static readonly __is_control__ = true;
10
+ static readonly controlCustomEvents: CustomEventItem[];
11
+ readonly id: string;
12
+ readonly type: string;
13
+ readonly controlType: BaseControlTypes;
14
+ readonly props: Property;
15
+ readonly fieldType: FieldTypes;
16
+ readonly customEvents: CustomEventItem[];
17
+ pageStatus: PAGE_STATUS;
18
+ parent: Control | null;
19
+ constructor(props?: Partial<BaseControlSchema<ControlsKeys, Property>>);
20
+ get rules(): PropertyRuntimeRules;
21
+ }
22
+ export default Control;
23
+ 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,20 +1,20 @@
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
- children: DesignerControl[];
8
- constructor(props?: Partial<ColumnControlSchema<ColumnControlsKeys>>);
9
- toSchema(): {
10
- children: import("../../type").BaseControlSchema<never, import("../BaseControl/property").default>[];
11
- id: string;
12
- type: never;
13
- props: import("../BaseControl/property").default;
14
- controlType: import("../../type").BaseControlTypes;
15
- fieldType?: import("@byteluck-fe/model-driven-shared/dist/types").FieldTypes | undefined;
16
- pageStatus?: import("../..").PAGE_STATUS | undefined;
17
- };
18
- }
19
- export default ColumnControl;
20
- 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
+ children: DesignerControl[];
8
+ constructor(props?: Partial<ColumnControlSchema<ColumnControlsKeys>>);
9
+ toSchema(): {
10
+ children: import("../../type").BaseControlSchema<never, import("../BaseControl/property").default>[];
11
+ id: string;
12
+ type: never;
13
+ props: import("../BaseControl/property").default;
14
+ controlType: import("../../type").BaseControlTypes;
15
+ fieldType?: import("@byteluck-fe/model-driven-shared/dist/types").FieldTypes | undefined;
16
+ pageStatus?: import("../..").PAGE_STATUS | undefined;
17
+ };
18
+ }
19
+ export default ColumnControl;
20
+ 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,74 +1,74 @@
1
- import { Property, PropertyRules, RuntimeControl } 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' | 'center';
51
- /**
52
- * @internal
53
- */
54
- colSpan?: string;
55
- /**
56
- * 自动高度
57
- * @defaultValue false
58
- */
59
- autoHeight: boolean;
60
- children: RuntimeControl[];
61
- constructor(props?: Partial<ColumnControlProperty>);
62
- }
63
- declare class ColumnOptionAndDataSourcePropertyRules extends ColumnControlPropertyRules {
64
- optionConfig: RuleItem;
65
- options: RuleItem[];
66
- datasourceBind: RuleItem[];
67
- constructor(props: ColumnControlProperty & {
68
- optionConfig: 'datasource' | 'custom' | 'none';
69
- datasourceBind: DataSourceBind;
70
- options: OptionSetting[];
71
- });
72
- }
73
- export default ColumnControlProperty;
74
- export { ColumnControlProperty, ColumnControlPropertyRules, ColumnOptionAndDataSourcePropertyRules, };
1
+ import { Property, PropertyRules, RuntimeControl } 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' | 'center';
51
+ /**
52
+ * @internal
53
+ */
54
+ colSpan?: string;
55
+ /**
56
+ * 自动高度
57
+ * @defaultValue false
58
+ */
59
+ autoHeight: boolean;
60
+ children: RuntimeControl[];
61
+ constructor(props?: Partial<ColumnControlProperty>);
62
+ }
63
+ declare class ColumnOptionAndDataSourcePropertyRules extends ColumnControlPropertyRules {
64
+ optionConfig: RuleItem;
65
+ options: RuleItem[];
66
+ datasourceBind: RuleItem[];
67
+ constructor(props: ColumnControlProperty & {
68
+ optionConfig: 'datasource' | 'custom' | 'none';
69
+ datasourceBind: DataSourceBind;
70
+ options: OptionSetting[];
71
+ });
72
+ }
73
+ export default ColumnControlProperty;
74
+ export { ColumnControlProperty, ColumnControlPropertyRules, ColumnOptionAndDataSourcePropertyRules, };
@@ -1,11 +1,11 @@
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
- children: RuntimeControl[];
8
- constructor(props?: Partial<ColumnControlSchema<ColumnControlsKeys>>);
9
- }
10
- export default ColumnControl;
11
- 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
+ children: RuntimeControl[];
8
+ constructor(props?: Partial<ColumnControlSchema<ColumnControlsKeys>>);
9
+ }
10
+ export default ColumnControl;
11
+ export { ColumnControl as RuntimeColumnControl };
@@ -1,9 +1,9 @@
1
- import { MODE } from '../type';
2
- export declare function setPropertyDontEnum<T extends object>(obj: T, property: string): void;
3
- export declare function defineParent<T extends object>(control: T & {
4
- parent: any;
5
- }, parent: T | null, mode?: MODE): void;
6
- export declare function defineArrayParent<T extends object & {
7
- parent: any;
8
- }>(controls: T[], parent: T | null, mode?: MODE): void;
9
- export declare function defineControlArrayToProperty<T>(obj: object, property: string, initialValue?: T[], parent?: object, mode?: MODE): void;
1
+ import { MODE } from '../type';
2
+ export declare function setPropertyDontEnum<T extends object>(obj: T, property: string): void;
3
+ export declare function defineParent<T extends object>(control: T & {
4
+ parent: any;
5
+ }, parent: T | null, mode?: MODE): void;
6
+ export declare function defineArrayParent<T extends object & {
7
+ parent: any;
8
+ }>(controls: T[], parent: T | null, mode?: MODE): void;
9
+ export declare function defineControlArrayToProperty<T>(obj: object, property: string, initialValue?: T[], parent?: object, mode?: MODE): 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';