@byteluck-fe/model-driven-core 6.2.0-1-beta.13 → 6.2.0-1-beta.16

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 (49) 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 +15 -15
  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 +380 -380
  8. package/dist/types/api-doc-index.d.ts +4 -4
  9. package/dist/types/common/BaseControl/designer.d.ts +71 -71
  10. package/dist/types/common/BaseControl/index.d.ts +13 -13
  11. package/dist/types/common/BaseControl/property.d.ts +44 -44
  12. package/dist/types/common/BaseControl/runtime.d.ts +23 -23
  13. package/dist/types/common/BaseControl/types.d.ts +35 -35
  14. package/dist/types/common/ColumnControl/designer.d.ts +20 -20
  15. package/dist/types/common/ColumnControl/index.d.ts +12 -12
  16. package/dist/types/common/ColumnControl/property.d.ts +74 -74
  17. package/dist/types/common/ColumnControl/runtime.d.ts +11 -11
  18. package/dist/types/common/ControlArray.d.ts +9 -9
  19. package/dist/types/common/FormControl/designer.d.ts +13 -13
  20. package/dist/types/common/FormControl/index.d.ts +12 -12
  21. package/dist/types/common/FormControl/property.d.ts +118 -118
  22. package/dist/types/common/FormControl/runtime.d.ts +11 -11
  23. package/dist/types/common/LayoutControl/designer.d.ts +21 -21
  24. package/dist/types/common/LayoutControl/index.d.ts +12 -12
  25. package/dist/types/common/LayoutControl/property.d.ts +6 -6
  26. package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
  27. package/dist/types/common/ListControl/designer.d.ts +16 -16
  28. package/dist/types/common/ListControl/index.d.ts +12 -12
  29. package/dist/types/common/ListControl/property.d.ts +18 -18
  30. package/dist/types/common/ListControl/runtime.d.ts +12 -12
  31. package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
  32. package/dist/types/common/SearchViewControl/index.d.ts +12 -12
  33. package/dist/types/common/SearchViewControl/property.d.ts +8 -8
  34. package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
  35. package/dist/types/common/Validator.d.ts +15 -15
  36. package/dist/types/common/WrapControl/designer.d.ts +11 -11
  37. package/dist/types/common/WrapControl/index.d.ts +12 -12
  38. package/dist/types/common/WrapControl/property.d.ts +6 -6
  39. package/dist/types/common/WrapControl/runtime.d.ts +11 -11
  40. package/dist/types/common/controlHooksEmitter.d.ts +4 -4
  41. package/dist/types/common/index.d.ts +12 -12
  42. package/dist/types/common/initLinkOperationRules.d.ts +6 -6
  43. package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
  44. package/dist/types/framework/RegisterControls.d.ts +37 -37
  45. package/dist/types/framework/index.d.ts +948 -948
  46. package/dist/types/framework/isDataBind.d.ts +2 -2
  47. package/dist/types/index.d.ts +4 -4
  48. package/dist/types/type.d.ts +91 -91
  49. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
- import { DataBind, ObjectDataBind } from 'framework';
2
- export declare function isDataBind(dataBind: DataBind | ObjectDataBind): boolean;
1
+ import { DataBind, ObjectDataBind } from 'framework';
2
+ export declare function isDataBind(dataBind: DataBind | ObjectDataBind): boolean;
@@ -1,4 +1,4 @@
1
- export * from './common';
2
- export * from './framework';
3
- export * from './type';
4
- export * from './framework/isDataBind';
1
+ export * from './common';
2
+ export * from './framework';
3
+ export * from './type';
4
+ export * from './framework/isDataBind';
@@ -1,91 +1,91 @@
1
- import { BaseControlProperty, LayoutControlProperty, Property, DesignerControl, RuntimeControl, ListControlProperty, ColumnControlProperty, SearchControlProperty } from './common';
2
- import { PAGE_STATUS } from './framework';
3
- import { FieldTypes } from '@byteluck-fe/model-driven-shared';
4
- import { WrapControlProperty } from './common/WrapControl';
5
- export type SchemaUpgradeFunction = (schemaJSON: any, newVersion: string, oldVersion: string, payload?: any) => any;
6
- export interface ExportedControl {
7
- Property: typeof Property;
8
- Designer: typeof DesignerControl;
9
- Runtime: typeof RuntimeControl;
10
- Views?: {
11
- Desktop: any;
12
- Mobile: any;
13
- Designer: any;
14
- Settings: any;
15
- };
16
- Setting?: any[];
17
- upgrade?: SchemaUpgradeFunction;
18
- }
19
- export interface BaseControls {
20
- }
21
- export interface FormControls {
22
- }
23
- export interface LayoutControls {
24
- }
25
- export interface ListControls {
26
- }
27
- export interface ColumnControls {
28
- }
29
- export interface SearchControls {
30
- }
31
- export interface WrapControls {
32
- }
33
- export interface Controls extends BaseControls, FormControls, LayoutControls, ListControls, ColumnControls, SearchControls, WrapControls {
34
- }
35
- export type GetKeys<T extends string> = T extends never ? string : T;
36
- export type MODE = 'Designer' | 'Runtime';
37
- export type BaseControlsKeys = GetKeys<keyof BaseControls>;
38
- export type FormControlsKeys = GetKeys<keyof FormControls>;
39
- export type LayoutControlsKeys = GetKeys<keyof LayoutControls>;
40
- export type ListControlsKeys = GetKeys<keyof ListControls>;
41
- export type ColumnControlsKeys = GetKeys<keyof ColumnControls>;
42
- export type SearchControlsKeys = GetKeys<keyof SearchControls>;
43
- export type WrapControlsKeys = GetKeys<keyof WrapControls>;
44
- export type ControlsKeys = GetKeys<keyof Controls>;
45
- export type ControlExport = ExportedControl;
46
- export type ControlDesigner<T extends ControlsKeys> = Controls[T]['Designer'];
47
- export type ControlDesignerInstance<T extends ControlsKeys> = InstanceType<ControlDesigner<T>>;
48
- export type ControlRuntime<T extends ControlsKeys> = Controls[T]['Runtime'];
49
- export type ControlRuntimeInstance<T extends ControlsKeys> = InstanceType<ControlRuntime<T>>;
50
- export type ControlProperty<T extends ControlsKeys> = Controls[T]['Property'];
51
- export type ControlPropertyInstance<T extends ControlsKeys> = InstanceType<ControlProperty<T>>;
52
- export type ControlsConstructor<T extends ControlsKeys, P extends MODE> = Controls[T][P];
53
- export type ControlsInstance<T extends ControlsKeys, P extends MODE> = InstanceType<ControlsConstructor<T, P>>;
54
- export type BaseControlTypes = 'layout' | 'form' | 'base' | 'list' | 'column' | 'search' | 'wrap';
55
- export interface BaseControlSchema<K extends ControlsKeys, T extends Property> {
56
- id: string;
57
- type: K;
58
- props: T;
59
- controlType: BaseControlTypes;
60
- fieldType?: FieldTypes;
61
- pageStatus?: PAGE_STATUS;
62
- }
63
- export interface FormControlSchema<K extends FormControlsKeys, T extends BaseControlProperty = ControlPropertyInstance<K> extends BaseControlProperty ? ControlPropertyInstance<K> : BaseControlProperty> extends BaseControlSchema<K, T> {
64
- controlType: 'form';
65
- }
66
- export interface LayoutControlSchema<K extends LayoutControlsKeys, T extends LayoutControlProperty = LayoutControlProperty, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> extends BaseControlSchema<K, T> {
67
- controlType: 'layout';
68
- children: R[];
69
- }
70
- export interface ListControlSchema<K extends ListControlsKeys, T extends ListControlProperty<any> = ListControlProperty<any>, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> extends BaseControlSchema<K, T> {
71
- controlType: 'list';
72
- children?: R[];
73
- }
74
- export interface CustomControlSchemaExtends<K extends ColumnControlsKeys, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> {
75
- children: K extends 'custom-column' ? R[] : never;
76
- }
77
- export interface ColumnControlSchema<K extends ColumnControlsKeys, T extends ColumnControlProperty = ColumnControlProperty> extends BaseControlSchema<K, T>, CustomControlSchemaExtends<K> {
78
- controlType: 'column';
79
- }
80
- export interface SearchControlSchema<K extends SearchControlsKeys, T extends SearchControlProperty = SearchControlProperty, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> extends BaseControlSchema<K, T> {
81
- controlType: 'search';
82
- children: R[];
83
- }
84
- export interface WrapControlSchema<K extends WrapControlsKeys, T extends WrapControlProperty = WrapControlProperty, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> extends BaseControlSchema<K, T> {
85
- controlType: 'wrap';
86
- children: R[];
87
- }
88
- export type Schema<K extends ControlsKeys, T extends Property = InstanceType<Controls[K]['Property']>> = K extends FormControlsKeys ? FormControlSchema<K, T extends BaseControlProperty ? T : BaseControlProperty> : K extends LayoutControlsKeys ? LayoutControlSchema<K, T extends LayoutControlProperty ? T : LayoutControlProperty> : K extends ListControlsKeys ? ListControlSchema<K, T extends ListControlProperty<any> ? T : ListControlProperty<any>> : K extends ColumnControlsKeys ? ColumnControlSchema<K, T extends ColumnControlProperty ? T : ColumnControlProperty> : K extends SearchControlsKeys ? SearchControlSchema<K, T extends SearchControlProperty ? T : SearchControlProperty> : K extends WrapControlsKeys ? WrapControlSchema<K, T extends WrapControlProperty ? T : WrapControlProperty> : K extends BaseControlsKeys ? BaseControlSchema<K, T extends Property ? T : Property> : BaseControlSchema<K, T extends Property ? T : Property>;
89
- export type DeepPartial<T> = {
90
- [P in keyof T]?: DeepPartial<T[P]>;
91
- };
1
+ import { BaseControlProperty, LayoutControlProperty, Property, DesignerControl, RuntimeControl, ListControlProperty, ColumnControlProperty, SearchControlProperty } from './common';
2
+ import { PAGE_STATUS } from './framework';
3
+ import { FieldTypes } from '@byteluck-fe/model-driven-shared';
4
+ import { WrapControlProperty } from './common/WrapControl';
5
+ export type SchemaUpgradeFunction = (schemaJSON: any, newVersion: string, oldVersion: string, payload?: any) => any;
6
+ export interface ExportedControl {
7
+ Property: typeof Property;
8
+ Designer: typeof DesignerControl;
9
+ Runtime: typeof RuntimeControl;
10
+ Views?: {
11
+ Desktop: any;
12
+ Mobile: any;
13
+ Designer: any;
14
+ Settings: any;
15
+ };
16
+ Setting?: any[];
17
+ upgrade?: SchemaUpgradeFunction;
18
+ }
19
+ export interface BaseControls {
20
+ }
21
+ export interface FormControls {
22
+ }
23
+ export interface LayoutControls {
24
+ }
25
+ export interface ListControls {
26
+ }
27
+ export interface ColumnControls {
28
+ }
29
+ export interface SearchControls {
30
+ }
31
+ export interface WrapControls {
32
+ }
33
+ export interface Controls extends BaseControls, FormControls, LayoutControls, ListControls, ColumnControls, SearchControls, WrapControls {
34
+ }
35
+ export type GetKeys<T extends string> = T extends never ? string : T;
36
+ export type MODE = 'Designer' | 'Runtime';
37
+ export type BaseControlsKeys = GetKeys<keyof BaseControls>;
38
+ export type FormControlsKeys = GetKeys<keyof FormControls>;
39
+ export type LayoutControlsKeys = GetKeys<keyof LayoutControls>;
40
+ export type ListControlsKeys = GetKeys<keyof ListControls>;
41
+ export type ColumnControlsKeys = GetKeys<keyof ColumnControls>;
42
+ export type SearchControlsKeys = GetKeys<keyof SearchControls>;
43
+ export type WrapControlsKeys = GetKeys<keyof WrapControls>;
44
+ export type ControlsKeys = GetKeys<keyof Controls>;
45
+ export type ControlExport = ExportedControl;
46
+ export type ControlDesigner<T extends ControlsKeys> = Controls[T]['Designer'];
47
+ export type ControlDesignerInstance<T extends ControlsKeys> = InstanceType<ControlDesigner<T>>;
48
+ export type ControlRuntime<T extends ControlsKeys> = Controls[T]['Runtime'];
49
+ export type ControlRuntimeInstance<T extends ControlsKeys> = InstanceType<ControlRuntime<T>>;
50
+ export type ControlProperty<T extends ControlsKeys> = Controls[T]['Property'];
51
+ export type ControlPropertyInstance<T extends ControlsKeys> = InstanceType<ControlProperty<T>>;
52
+ export type ControlsConstructor<T extends ControlsKeys, P extends MODE> = Controls[T][P];
53
+ export type ControlsInstance<T extends ControlsKeys, P extends MODE> = InstanceType<ControlsConstructor<T, P>>;
54
+ export type BaseControlTypes = 'layout' | 'form' | 'base' | 'list' | 'column' | 'search' | 'wrap';
55
+ export interface BaseControlSchema<K extends ControlsKeys, T extends Property> {
56
+ id: string;
57
+ type: K;
58
+ props: T;
59
+ controlType: BaseControlTypes;
60
+ fieldType?: FieldTypes;
61
+ pageStatus?: PAGE_STATUS;
62
+ }
63
+ export interface FormControlSchema<K extends FormControlsKeys, T extends BaseControlProperty = ControlPropertyInstance<K> extends BaseControlProperty ? ControlPropertyInstance<K> : BaseControlProperty> extends BaseControlSchema<K, T> {
64
+ controlType: 'form';
65
+ }
66
+ export interface LayoutControlSchema<K extends LayoutControlsKeys, T extends LayoutControlProperty = LayoutControlProperty, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> extends BaseControlSchema<K, T> {
67
+ controlType: 'layout';
68
+ children: R[];
69
+ }
70
+ export interface ListControlSchema<K extends ListControlsKeys, T extends ListControlProperty<any> = ListControlProperty<any>, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> extends BaseControlSchema<K, T> {
71
+ controlType: 'list';
72
+ children?: R[];
73
+ }
74
+ export interface CustomControlSchemaExtends<K extends ColumnControlsKeys, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> {
75
+ children: K extends 'custom-column' ? R[] : never;
76
+ }
77
+ export interface ColumnControlSchema<K extends ColumnControlsKeys, T extends ColumnControlProperty = ColumnControlProperty> extends BaseControlSchema<K, T>, CustomControlSchemaExtends<K> {
78
+ controlType: 'column';
79
+ }
80
+ export interface SearchControlSchema<K extends SearchControlsKeys, T extends SearchControlProperty = SearchControlProperty, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> extends BaseControlSchema<K, T> {
81
+ controlType: 'search';
82
+ children: R[];
83
+ }
84
+ export interface WrapControlSchema<K extends WrapControlsKeys, T extends WrapControlProperty = WrapControlProperty, R extends RuntimeControl | DesignerControl | BaseControlSchema<ControlsKeys, Property> = BaseControlSchema<ControlsKeys, Property>> extends BaseControlSchema<K, T> {
85
+ controlType: 'wrap';
86
+ children: R[];
87
+ }
88
+ export type Schema<K extends ControlsKeys, T extends Property = InstanceType<Controls[K]['Property']>> = K extends FormControlsKeys ? FormControlSchema<K, T extends BaseControlProperty ? T : BaseControlProperty> : K extends LayoutControlsKeys ? LayoutControlSchema<K, T extends LayoutControlProperty ? T : LayoutControlProperty> : K extends ListControlsKeys ? ListControlSchema<K, T extends ListControlProperty<any> ? T : ListControlProperty<any>> : K extends ColumnControlsKeys ? ColumnControlSchema<K, T extends ColumnControlProperty ? T : ColumnControlProperty> : K extends SearchControlsKeys ? SearchControlSchema<K, T extends SearchControlProperty ? T : SearchControlProperty> : K extends WrapControlsKeys ? WrapControlSchema<K, T extends WrapControlProperty ? T : WrapControlProperty> : K extends BaseControlsKeys ? BaseControlSchema<K, T extends Property ? T : Property> : BaseControlSchema<K, T extends Property ? T : Property>;
89
+ export type DeepPartial<T> = {
90
+ [P in keyof T]?: DeepPartial<T[P]>;
91
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-core",
3
- "version": "6.2.0-1-beta.13",
3
+ "version": "6.2.0-1-beta.16",
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": "6.2.0-1-beta.13",
29
+ "@byteluck-fe/model-driven-shared": "6.2.0-1-beta.16",
30
30
  "async-validator": "3.5.1",
31
31
  "tslib": "^2.1.0"
32
32
  },
33
- "gitHead": "fff7ebca5d1be0759f5a5c595a110fc6c03e3b6b"
33
+ "gitHead": "a4d63b9e8aa0b9ee8117df58f920f7d4f6db2542"
34
34
  }