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

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 (82) hide show
  1. package/README.md +69 -69
  2. package/dist/esm/api-doc-index.js +4 -4
  3. package/dist/esm/common/BaseControl/designer.js +39 -35
  4. package/dist/esm/common/BaseControl/index.js +7 -7
  5. package/dist/esm/common/BaseControl/property.js +24 -37
  6. package/dist/esm/common/BaseControl/runtime.js +6 -6
  7. package/dist/esm/common/ColumnControl/designer.js +105 -27
  8. package/dist/esm/common/ColumnControl/index.js +6 -6
  9. package/dist/esm/common/ColumnControl/property.js +71 -95
  10. package/dist/esm/common/ColumnControl/runtime.js +16 -27
  11. package/dist/esm/common/ControlArray.js +5 -5
  12. package/dist/esm/common/FormControl/designer.js +17 -30
  13. package/dist/esm/common/FormControl/index.js +6 -6
  14. package/dist/esm/common/FormControl/property.js +119 -147
  15. package/dist/esm/common/FormControl/runtime.js +14 -28
  16. package/dist/esm/common/LayoutControl/designer.js +17 -33
  17. package/dist/esm/common/LayoutControl/index.js +6 -6
  18. package/dist/esm/common/LayoutControl/property.js +13 -24
  19. package/dist/esm/common/LayoutControl/runtime.js +16 -30
  20. package/dist/esm/common/ListControl/designer.js +16 -29
  21. package/dist/esm/common/ListControl/index.js +6 -6
  22. package/dist/esm/common/ListControl/property.js +16 -33
  23. package/dist/esm/common/ListControl/runtime.js +17 -31
  24. package/dist/esm/common/SearchViewControl/designer.js +14 -27
  25. package/dist/esm/common/SearchViewControl/index.js +6 -6
  26. package/dist/esm/common/SearchViewControl/property.js +14 -26
  27. package/dist/esm/common/SearchViewControl/runtime.js +14 -27
  28. package/dist/esm/common/Validator.js +5 -5
  29. package/dist/esm/common/WrapControl/designer.js +14 -27
  30. package/dist/esm/common/WrapControl/index.js +6 -6
  31. package/dist/esm/common/WrapControl/property.js +13 -24
  32. package/dist/esm/common/WrapControl/runtime.js +14 -27
  33. package/dist/esm/common/controlHooksEmitter.js +1 -1
  34. package/dist/esm/common/index.js +12 -12
  35. package/dist/esm/common/initLinkOperationRules.js +5 -5
  36. package/dist/esm/common/initOptionAndDataSourceRules.js +74 -74
  37. package/dist/esm/framework/RegisterControls.js +9 -8
  38. package/dist/esm/framework/index.js +144 -174
  39. package/dist/esm/index.js +4 -4
  40. package/dist/index.umd.js +1 -1
  41. package/dist/types/api-doc-index.d.ts +4 -4
  42. package/dist/types/common/BaseControl/designer.d.ts +63 -63
  43. package/dist/types/common/BaseControl/index.d.ts +13 -13
  44. package/dist/types/common/BaseControl/property.d.ts +38 -38
  45. package/dist/types/common/BaseControl/runtime.d.ts +23 -23
  46. package/dist/types/common/BaseControl/types.d.ts +35 -35
  47. package/dist/types/common/ColumnControl/designer.d.ts +20 -10
  48. package/dist/types/common/ColumnControl/index.d.ts +12 -12
  49. package/dist/types/common/ColumnControl/property.d.ts +74 -73
  50. package/dist/types/common/ColumnControl/runtime.d.ts +11 -10
  51. package/dist/types/common/ControlArray.d.ts +9 -9
  52. package/dist/types/common/FormControl/designer.d.ts +13 -13
  53. package/dist/types/common/FormControl/index.d.ts +12 -12
  54. package/dist/types/common/FormControl/property.d.ts +100 -100
  55. package/dist/types/common/FormControl/runtime.d.ts +11 -11
  56. package/dist/types/common/LayoutControl/designer.d.ts +21 -21
  57. package/dist/types/common/LayoutControl/index.d.ts +12 -12
  58. package/dist/types/common/LayoutControl/property.d.ts +6 -6
  59. package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
  60. package/dist/types/common/ListControl/designer.d.ts +16 -16
  61. package/dist/types/common/ListControl/index.d.ts +12 -12
  62. package/dist/types/common/ListControl/property.d.ts +18 -18
  63. package/dist/types/common/ListControl/runtime.d.ts +12 -12
  64. package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
  65. package/dist/types/common/SearchViewControl/index.d.ts +12 -12
  66. package/dist/types/common/SearchViewControl/property.d.ts +8 -8
  67. package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
  68. package/dist/types/common/Validator.d.ts +15 -15
  69. package/dist/types/common/WrapControl/designer.d.ts +11 -11
  70. package/dist/types/common/WrapControl/index.d.ts +12 -12
  71. package/dist/types/common/WrapControl/property.d.ts +6 -6
  72. package/dist/types/common/WrapControl/runtime.d.ts +11 -11
  73. package/dist/types/common/controlHooksEmitter.d.ts +4 -4
  74. package/dist/types/common/index.d.ts +12 -12
  75. package/dist/types/common/initLinkOperationRules.d.ts +6 -6
  76. package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
  77. package/dist/types/framework/RegisterControls.d.ts +37 -37
  78. package/dist/types/framework/index.d.ts +881 -880
  79. package/dist/types/framework/isDataBind.d.ts +2 -2
  80. package/dist/types/index.d.ts +4 -4
  81. package/dist/types/type.d.ts +91 -91
  82. package/package.json +3 -3
@@ -1,11 +1,11 @@
1
- import WrapControlProperty from './property';
2
- import { WrapControlsKeys, WrapControlSchema } from '../../type';
3
- import { RuntimeLayoutControl } from '../LayoutControl';
4
- import { RuntimeControl } from '../BaseControl';
5
- declare class WrapControl<T extends RuntimeControl = RuntimeControl> extends RuntimeLayoutControl<T> {
6
- readonly controlType = "wrap";
7
- readonly props: WrapControlProperty;
8
- constructor(props?: Partial<WrapControlSchema<WrapControlsKeys, WrapControlProperty, RuntimeControl>>);
9
- }
10
- export default WrapControl;
11
- export { WrapControl as RuntimeWrapControl };
1
+ import WrapControlProperty from './property';
2
+ import { WrapControlsKeys, WrapControlSchema } from '../../type';
3
+ import { RuntimeLayoutControl } from '../LayoutControl';
4
+ import { RuntimeControl } from '../BaseControl';
5
+ declare class WrapControl<T extends RuntimeControl = RuntimeControl> extends RuntimeLayoutControl<T> {
6
+ readonly controlType = "wrap";
7
+ readonly props: WrapControlProperty;
8
+ constructor(props?: Partial<WrapControlSchema<WrapControlsKeys, WrapControlProperty, RuntimeControl>>);
9
+ }
10
+ export default WrapControl;
11
+ export { WrapControl as RuntimeWrapControl };
@@ -1,4 +1,4 @@
1
- import { Watcher } from '@byteluck-fe/model-driven-shared';
2
- type EmitterKeys = 'preInstance' | 'postInstance' | 'preUpdateProps' | 'postUpdateProps' | 'preValidate' | 'preToSchema';
3
- declare const controlHooksEmitter: Watcher<EmitterKeys>;
4
- export { controlHooksEmitter };
1
+ import { Watcher } from '@byteluck-fe/model-driven-shared';
2
+ type EmitterKeys = 'preInstance' | 'postInstance' | 'preUpdateProps' | 'postUpdateProps' | 'preValidate' | 'preToSchema';
3
+ declare const controlHooksEmitter: Watcher<EmitterKeys>;
4
+ export { controlHooksEmitter };
@@ -1,12 +1,12 @@
1
- export * from './BaseControl';
2
- export * from './FormControl';
3
- export * from './LayoutControl';
4
- export * from './ListControl';
5
- export * from './ColumnControl';
6
- export * from './SearchViewControl';
7
- export * from './WrapControl';
8
- export * from './Validator';
9
- export * from './ControlArray';
10
- export * from './initOptionAndDataSourceRules';
11
- export * from './initLinkOperationRules';
12
- export * from './controlHooksEmitter';
1
+ export * from './BaseControl';
2
+ export * from './FormControl';
3
+ export * from './LayoutControl';
4
+ export * from './ListControl';
5
+ export * from './ColumnControl';
6
+ export * from './SearchViewControl';
7
+ export * from './WrapControl';
8
+ export * from './Validator';
9
+ export * from './ControlArray';
10
+ export * from './initOptionAndDataSourceRules';
11
+ export * from './initLinkOperationRules';
12
+ export * from './controlHooksEmitter';
@@ -1,6 +1,6 @@
1
- import { PropertyRules } from './BaseControl';
2
- import { LinkOperationOption } from '../framework';
3
- export declare function initLinkOperationRules(this: PropertyRules, props: {
4
- linkOperationOption?: LinkOperationOption;
5
- showLinkOperation?: boolean;
6
- }): void;
1
+ import { PropertyRules } from './BaseControl';
2
+ import { LinkOperationOption } from '../framework';
3
+ export declare function initLinkOperationRules(this: PropertyRules, props: {
4
+ linkOperationOption?: LinkOperationOption;
5
+ showLinkOperation?: boolean;
6
+ }): void;
@@ -1,10 +1,10 @@
1
- import { PropertyRules } from './BaseControl';
2
- import { CustomAttribute, DataSourceBind, OptionSetting, SuperDataSourceBind } from '../framework';
3
- export declare function initOptionAndDataSourceRules(this: PropertyRules, props: {
4
- optionConfig?: 'datasource' | 'custom' | 'none';
5
- datasourceBind?: DataSourceBind;
6
- options?: OptionSetting[];
7
- }): void;
8
- export declare function initSuperDataSourceRules(this: PropertyRules, props: {
9
- datasourceBind: SuperDataSourceBind;
10
- }, attributes: CustomAttribute[], messageInDataSetting?: boolean): void;
1
+ import { PropertyRules } from './BaseControl';
2
+ import { CustomAttribute, DataSourceBind, OptionSetting, SuperDataSourceBind } from '../framework';
3
+ export declare function initOptionAndDataSourceRules(this: PropertyRules, props: {
4
+ optionConfig?: 'datasource' | 'custom' | 'none';
5
+ datasourceBind?: DataSourceBind;
6
+ options?: OptionSetting[];
7
+ }): void;
8
+ export declare function initSuperDataSourceRules(this: PropertyRules, props: {
9
+ datasourceBind: SuperDataSourceBind;
10
+ }, attributes: CustomAttribute[], messageInDataSetting?: boolean): void;
@@ -1,37 +1,37 @@
1
- import { ControlExport, ControlsConstructor, ControlsInstance, DeepPartial, FormControlSchema, ControlsKeys, MODE, Schema, ListControlSchema, LayoutControlSchema, ColumnControlSchema } from '../type';
2
- export interface BeforeCreateInstance {
3
- (schema: any): void;
4
- (schema: any): any;
5
- }
6
- export declare class RegisterControls<Mode extends MODE> {
7
- static readonly staticControlsRuntimeRules: Map<any, any>;
8
- static readonly staticControls: ControlExport[];
9
- static readonly staticRegisteredTypes: Set<string>;
10
- static readonly staticRegisteredConfigs: Map<string, Record<string, unknown>>;
11
- static staticGetRules(controlType: string, props: any): any[];
12
- registeredControlTypes: Set<string>;
13
- controlConfigMap: Map<string, Readonly<Record<string, unknown>>>;
14
- protected _controls: ControlsConstructor<ControlsKeys, Mode>[];
15
- private _type;
16
- constructor(type: Mode);
17
- registerControlConfig(type: string, config: Record<string, unknown>): this;
18
- getControlConfig(type: string): Readonly<Record<string, unknown>> | undefined;
19
- static register(control: ControlExport, mode: MODE): typeof RegisterControls;
20
- getControls(): ControlsConstructor<ControlsKeys, Mode>[];
21
- register(control: ControlsConstructor<ControlsKeys, Mode>): this;
22
- isLayoutControl(schema: Schema<any>): schema is LayoutControlSchema<any>;
23
- isFormControl(schema: Schema<any>): schema is FormControlSchema<any>;
24
- isListControl(schema: Schema<any>): schema is ListControlSchema<any>;
25
- isColumnControl(schema: Schema<any>): schema is ColumnControlSchema<any>;
26
- createControl<T extends ControlsKeys>(schema: (Schema<ControlsKeys> & {
27
- type: T;
28
- })[], beforeCreateInstance?: BeforeCreateInstance): ControlsInstance<T, Mode>[];
29
- createControl<T extends ControlsKeys>(schema: Schema<T> & {
30
- type: T;
31
- }, beforeCreateInstance?: BeforeCreateInstance): ControlsInstance<T, Mode>;
32
- resetInstanceParent(schema: Schema<ControlsKeys> | Schema<ControlsKeys>[], parentControl: any): any;
33
- private _setParentPrototypeToSchema;
34
- createControlInstance<T extends ControlsKeys>(type: T, initSchema?: DeepPartial<Schema<T>>): ControlsInstance<T, Mode> | undefined;
35
- getControlFormType<T extends ControlsKeys>(type: T): ControlsConstructor<T, Mode> | undefined;
36
- private _initControls;
37
- }
1
+ import { ControlExport, ControlsConstructor, ControlsInstance, DeepPartial, FormControlSchema, ControlsKeys, MODE, Schema, ListControlSchema, LayoutControlSchema, ColumnControlSchema } from '../type';
2
+ export interface BeforeCreateInstance {
3
+ (schema: any): void;
4
+ (schema: any): any;
5
+ }
6
+ export declare class RegisterControls<Mode extends MODE> {
7
+ static readonly staticControlsRuntimeRules: Map<any, any>;
8
+ static readonly staticControls: ControlExport[];
9
+ static readonly staticRegisteredTypes: Set<string>;
10
+ static readonly staticRegisteredConfigs: Map<string, Record<string, unknown>>;
11
+ static staticGetRules(controlType: string, props: any): any[];
12
+ registeredControlTypes: Set<string>;
13
+ controlConfigMap: Map<string, Readonly<Record<string, unknown>>>;
14
+ protected _controls: ControlsConstructor<ControlsKeys, Mode>[];
15
+ private _type;
16
+ constructor(type: Mode);
17
+ registerControlConfig(type: string, config: Record<string, unknown>): this;
18
+ getControlConfig(type: string): Readonly<Record<string, unknown>> | undefined;
19
+ static register(control: ControlExport, mode: MODE): typeof RegisterControls;
20
+ getControls(): ControlsConstructor<ControlsKeys, Mode>[];
21
+ register(control: ControlsConstructor<ControlsKeys, Mode>): this;
22
+ isLayoutControl(schema: Schema<any>): schema is LayoutControlSchema<any>;
23
+ isFormControl(schema: Schema<any>): schema is FormControlSchema<any>;
24
+ isListControl(schema: Schema<any>): schema is ListControlSchema<any>;
25
+ isColumnControl(schema: Schema<any>): schema is ColumnControlSchema<any>;
26
+ createControl<T extends ControlsKeys>(schema: (Schema<ControlsKeys> & {
27
+ type: T;
28
+ })[], beforeCreateInstance?: BeforeCreateInstance): ControlsInstance<T, Mode>[];
29
+ createControl<T extends ControlsKeys>(schema: Schema<T> & {
30
+ type: T;
31
+ }, beforeCreateInstance?: BeforeCreateInstance): ControlsInstance<T, Mode>;
32
+ resetInstanceParent(schema: Schema<ControlsKeys> | Schema<ControlsKeys>[], parentControl: any): any;
33
+ private _setParentPrototypeToSchema;
34
+ createControlInstance<T extends ControlsKeys>(type: T, initSchema?: DeepPartial<Schema<T>>): ControlsInstance<T, Mode> | undefined;
35
+ getControlFormType<T extends ControlsKeys>(type: T): ControlsConstructor<T, Mode> | undefined;
36
+ private _initControls;
37
+ }