ehr-form-engine 1.0.0-beta.2 → 1.0.0-beta.21

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 (43) hide show
  1. package/README.md +32 -2
  2. package/dist/index.cjs.js +4 -30
  3. package/dist/index.es.js +32188 -34119
  4. package/dist/src/components/ConfigProvider/index.d.ts +4 -0
  5. package/dist/src/components/ConfigProvider/index.vue.d.ts +24 -0
  6. package/dist/src/components/Core/index.vue.d.ts +32 -3
  7. package/dist/src/components/Dependency/Operator/index.vue.d.ts +2 -2
  8. package/dist/src/components/Dependency/types/emits.d.ts +1 -1
  9. package/dist/src/components/Designer/index.vue.d.ts +4 -1
  10. package/dist/src/components/Panel/ContainerProperty/index.vue.d.ts +2 -3
  11. package/dist/src/components/Panel/Designer/index.vue.d.ts +37 -5
  12. package/dist/src/components/Panel/FieldProperty/index.vue.d.ts +2 -3
  13. package/dist/src/components/Panel/TableProperty/index.vue.d.ts +2 -3
  14. package/dist/src/components/Panel/UploadProperty/index.vue.d.ts +2 -3
  15. package/dist/src/components/Panel/types/designer.d.ts +9 -0
  16. package/dist/src/components/Panel/types/emits.d.ts +6 -5
  17. package/dist/src/components/Panel/types/index.d.ts +1 -0
  18. package/dist/src/components/Panel/types/props.d.ts +3 -3
  19. package/dist/src/components/Render/Core/index.d.ts +3 -0
  20. package/dist/src/components/Render/Core/index.vue.d.ts +50 -0
  21. package/dist/src/components/Render/Form/index.vue.d.ts +24 -3
  22. package/dist/src/components/Render/MobileTable/index.d.ts +3 -0
  23. package/dist/src/components/Render/MobileTable/index.vue.d.ts +28 -0
  24. package/dist/src/components/Render/Table/index.vue.d.ts +4 -1
  25. package/dist/src/components/Render/Upload/index.vue.d.ts +34 -1
  26. package/dist/src/components/Render/Uploads/index.vue.d.ts +2 -0
  27. package/dist/src/components/Render/index.d.ts +2 -0
  28. package/dist/src/components/Render/types/props.d.ts +7 -5
  29. package/dist/src/components/Render/types/types.d.ts +35 -0
  30. package/dist/src/components/index.d.ts +9 -3
  31. package/dist/src/composables/index.d.ts +2 -0
  32. package/dist/src/composables/useConfig.d.ts +37 -0
  33. package/dist/src/composables/useDesigner.d.ts +38 -0
  34. package/dist/src/data/common/dataMap.d.ts +1 -0
  35. package/dist/src/data/components/componentMap.d.ts +1 -0
  36. package/dist/src/styles/css.d.ts +4 -0
  37. package/dist/src/types/config.d.ts +129 -0
  38. package/dist/src/types/types.d.ts +6 -2
  39. package/dist/src/utils/device.d.ts +12 -0
  40. package/dist/src/utils/index.d.ts +1 -0
  41. package/dist/style.css +1 -1
  42. package/package.json +33 -21
  43. package/dist/src/components/utils/sleep.d.ts +0 -1
@@ -0,0 +1,4 @@
1
+ import { default as HrFormEngineConfigProvider } from './index.vue';
2
+
3
+ export { HrFormEngineConfigProvider };
4
+ export default HrFormEngineConfigProvider;
@@ -0,0 +1,24 @@
1
+ import { HrFormEngineConfig } from '../../types/config';
2
+
3
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ config?: HrFormEngineConfig | undefined;
5
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
+ config?: HrFormEngineConfig | undefined;
7
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
8
+ default?(_: {}): any;
9
+ }>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToRuntimeProps<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -1,11 +1,40 @@
1
1
  import { JsonSchemaType } from '../../types';
2
2
 
3
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{}, {
3
+ interface ResumeDesignerProps {
4
+ /** 表单 JSON Schema 数据 */
5
+ jsonSchema?: JsonSchemaType[];
6
+ }
7
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ResumeDesignerProps>, {
8
+ jsonSchema: () => never[];
9
+ }>>, {
4
10
  exportJsonSchema: () => JsonSchemaType[];
5
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
6
- "toolbar-custom-actions"?(_: {}): any;
11
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ResumeDesignerProps>, {
12
+ jsonSchema: () => never[];
13
+ }>>> & Readonly<{}>, {
14
+ jsonSchema: JsonSchemaType[];
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, Readonly<{
16
+ 'toolbar-custom-actions': Record<string, never>;
17
+ }> & {
18
+ 'toolbar-custom-actions': Record<string, never>;
7
19
  }>;
8
20
  export default _default;
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToRuntimeProps<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
30
+ type __VLS_WithDefaults<P, D> = {
31
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
32
+ default: D[K];
33
+ }> : P[K];
34
+ };
35
+ type __VLS_Prettify<T> = {
36
+ [K in keyof T]: T[K];
37
+ } & {};
9
38
  type __VLS_WithTemplateSlots<T, S> = T & {
10
39
  new (): {
11
40
  $slots: S;
@@ -1,9 +1,9 @@
1
1
  import { DependencyOperatorProps } from '../types';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DependencyOperatorProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
- operateChange: (value: "AND" | "OR") => void;
4
+ eventOnOperateChange: (value: "AND" | "OR") => void;
5
5
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DependencyOperatorProps>>> & Readonly<{
6
- onOperateChange?: ((value: "AND" | "OR") => any) | undefined;
6
+ onEventOnOperateChange?: ((value: "AND" | "OR") => any) | undefined;
7
7
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
8
  export default _default;
9
9
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -10,5 +10,5 @@ export interface DependencyListEmits {
10
10
  (e: 'eventOnDelete', index: number): void;
11
11
  }
12
12
  export interface DependencyOperatorEmits {
13
- (e: 'operateChange', value: 'AND' | 'OR'): void;
13
+ (e: 'eventOnOperateChange', value: 'AND' | 'OR'): void;
14
14
  }
@@ -3,7 +3,10 @@ import { TemplateDesignerProps } from './types';
3
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TemplateDesignerProps>, {
4
4
  designerMode: boolean;
5
5
  jsonSchema: () => never[];
6
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TemplateDesignerProps>, {
6
+ }>>, {
7
+ exportJsonSchema: () => string;
8
+ getDesigner: () => import('../../composables').DesignerInstance;
9
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TemplateDesignerProps>, {
7
10
  designerMode: boolean;
8
11
  jsonSchema: () => never[];
9
12
  }>>> & Readonly<{}>, {
@@ -1,11 +1,10 @@
1
- import { ContainerSchemaType } from '../../../types';
2
1
  import { ContainerPanelProps } from '../types';
3
2
 
4
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ContainerPanelProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
- update: (item: ContainerSchemaType) => void;
4
+ update: (item: import('../../../types').JsonSchemaType) => void;
6
5
  eventOnLayoutChange: (id: string, span: string | number) => void;
7
6
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ContainerPanelProps>>> & Readonly<{
8
- onUpdate?: ((item: ContainerSchemaType) => any) | undefined;
7
+ onUpdate?: ((item: import('../../../types').JsonSchemaType) => any) | undefined;
9
8
  onEventOnLayoutChange?: ((id: string, span: string | number) => any) | undefined;
10
9
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
11
10
  export default _default;
@@ -1,14 +1,38 @@
1
+ import { ContainerSchemaType, FieldSchemaType, ItemTypeTag, JsonSchemaType, TableSchemaType, UploadSchemaType } from '../../../types';
1
2
  import { DesignerPanelProps } from '../types';
2
3
 
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DesignerPanelProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DesignerPanelProps>, {
5
+ jsonSchema: () => never[];
6
+ selectedContainerSchema: null;
7
+ selectedFieldSchema: null;
8
+ selectedTableSchema: null;
9
+ selectedUploadSchema: null;
10
+ selectedType: undefined;
11
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
12
  eventResetSelected: () => void;
5
13
  eventOnLayoutChange: (id: string, span: string | number) => void;
6
- update: (item: import('../..').JsonSchemaType) => void;
7
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<DesignerPanelProps>>> & Readonly<{
8
- onUpdate?: ((item: import('../..').JsonSchemaType) => any) | undefined;
14
+ update: (item: JsonSchemaType) => void;
15
+ "event-on-select": (id: string | undefined, type: ItemTypeTag) => void;
16
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DesignerPanelProps>, {
17
+ jsonSchema: () => never[];
18
+ selectedContainerSchema: null;
19
+ selectedFieldSchema: null;
20
+ selectedTableSchema: null;
21
+ selectedUploadSchema: null;
22
+ selectedType: undefined;
23
+ }>>> & Readonly<{
24
+ onUpdate?: ((item: JsonSchemaType) => any) | undefined;
9
25
  onEventOnLayoutChange?: ((id: string, span: string | number) => any) | undefined;
10
26
  onEventResetSelected?: (() => any) | undefined;
11
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
27
+ "onEvent-on-select"?: ((id: string | undefined, type: ItemTypeTag) => any) | undefined;
28
+ }>, {
29
+ jsonSchema: ContainerSchemaType[];
30
+ selectedContainerSchema: ContainerSchemaType | null;
31
+ selectedFieldSchema: FieldSchemaType | null;
32
+ selectedTableSchema: TableSchemaType | null;
33
+ selectedType: ItemTypeTag | undefined;
34
+ selectedUploadSchema: UploadSchemaType | null;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
36
  export default _default;
13
37
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
38
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -19,3 +43,11 @@ type __VLS_TypePropsToRuntimeProps<T> = {
19
43
  required: true;
20
44
  };
21
45
  };
46
+ type __VLS_WithDefaults<P, D> = {
47
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
48
+ default: D[K];
49
+ }> : P[K];
50
+ };
51
+ type __VLS_Prettify<T> = {
52
+ [K in keyof T]: T[K];
53
+ } & {};
@@ -1,10 +1,9 @@
1
- import { FieldSchemaType } from '../../../types';
2
1
  import { FieldPanelProps } from '../types';
3
2
 
4
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FieldPanelProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
- update: (item: FieldSchemaType) => void;
4
+ update: (item: import('../../../types').JsonSchemaType) => void;
6
5
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FieldPanelProps>>> & Readonly<{
7
- onUpdate?: ((item: FieldSchemaType) => any) | undefined;
6
+ onUpdate?: ((item: import('../../../types').JsonSchemaType) => any) | undefined;
8
7
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
9
8
  export default _default;
10
9
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,10 +1,9 @@
1
- import { TableSchemaType } from '../../../types';
2
1
  import { TablePanelProps } from '../types';
3
2
 
4
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TablePanelProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
- update: (item: TableSchemaType) => void;
4
+ update: (item: import('../../../types').JsonSchemaType) => void;
6
5
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TablePanelProps>>> & Readonly<{
7
- onUpdate?: ((item: TableSchemaType) => any) | undefined;
6
+ onUpdate?: ((item: import('../../../types').JsonSchemaType) => any) | undefined;
8
7
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
9
8
  export default _default;
10
9
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,10 +1,9 @@
1
- import { UploadSchemaType } from '../../../types';
2
1
  import { UploadPanelProps } from '../types';
3
2
 
4
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<UploadPanelProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
- update: (item: UploadSchemaType) => void;
4
+ update: (item: import('../../../types').JsonSchemaType) => void;
6
5
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<UploadPanelProps>>> & Readonly<{
7
- onUpdate?: ((item: UploadSchemaType) => any) | undefined;
6
+ onUpdate?: ((item: import('../../../types').JsonSchemaType) => any) | undefined;
8
7
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
9
8
  export default _default;
10
9
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -0,0 +1,9 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { useDesigner } from '../../../composables';
3
+
4
+ export type DesignerInstance = ReturnType<typeof useDesigner>;
5
+ /**
6
+ * 设计器注入键
7
+ * 用于在 TemplateDesignerEngine 和子组件间传递设计器实例
8
+ */
9
+ export declare const DESIGNER_INJECTION_KEY: InjectionKey<DesignerInstance>;
@@ -1,20 +1,21 @@
1
- import { FieldSchemaType, UploadSchemaType, ContainerSchemaType, TableSchemaType, JsonSchemaType } from '../../../types';
1
+ import { ItemTypeTag, JsonSchemaType } from '../../../types';
2
2
 
3
3
  export interface FieldPanelEmits {
4
- (e: 'update', item: FieldSchemaType): void;
4
+ (e: 'update', item: JsonSchemaType): void;
5
5
  }
6
6
  export interface UploadPanelEmits {
7
- (e: 'update', item: UploadSchemaType): void;
7
+ (e: 'update', item: JsonSchemaType): void;
8
8
  }
9
9
  export interface ContainerPanelEmits {
10
- (e: 'update', item: ContainerSchemaType): void;
10
+ (e: 'update', item: JsonSchemaType): void;
11
11
  (e: 'eventOnLayoutChange', id: string, span: number | string): void;
12
12
  }
13
13
  export interface TablePanelEmits {
14
- (e: 'update', item: TableSchemaType): void;
14
+ (e: 'update', item: JsonSchemaType): void;
15
15
  }
16
16
  export interface DesignerPanelEmits {
17
17
  (e: 'eventResetSelected'): void;
18
18
  (e: 'eventOnLayoutChange', id: string, span: number | string): void;
19
19
  (e: 'update', item: JsonSchemaType): void;
20
+ (e: 'event-on-select', id: string | undefined, type: ItemTypeTag): void;
20
21
  }
@@ -1,2 +1,3 @@
1
+ export * from './designer';
1
2
  export * from './emits';
2
3
  export * from './props';
@@ -1,18 +1,18 @@
1
1
  import { ContainerSchemaType, FieldSchemaType, ItemTypeTag, TableSchemaType, UploadSchemaType } from '../../../types';
2
2
 
3
3
  export interface FieldPanelProps {
4
- dragItems: Array<ContainerSchemaType>;
4
+ dragItems?: Array<ContainerSchemaType>;
5
5
  selectedSchema: FieldSchemaType;
6
6
  }
7
7
  export interface UploadPanelProps {
8
- dragItems: Array<ContainerSchemaType>;
8
+ dragItems?: Array<ContainerSchemaType>;
9
9
  selectedSchema: UploadSchemaType;
10
10
  }
11
11
  export interface ContainerPanelProps {
12
12
  element: ContainerSchemaType | null;
13
13
  }
14
14
  export interface TablePanelProps {
15
- dragItems: Array<ContainerSchemaType>;
15
+ dragItems?: Array<ContainerSchemaType>;
16
16
  selectedSchema: TableSchemaType;
17
17
  }
18
18
  export interface DesignerPanelProps {
@@ -0,0 +1,3 @@
1
+ import { default as RenderEngine } from './index.vue';
2
+
3
+ export default RenderEngine;
@@ -0,0 +1,50 @@
1
+ import { FormRenderInstance, TableRenderInstance, UploadsRenderInstance, RenderEngineProps } from '../types';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<RenderEngineProps>, {}>>, {
4
+ validateAll: (containerId?: string | undefined) => Promise<{
5
+ success: boolean;
6
+ errors: Record<string, unknown>;
7
+ segmentId: string;
8
+ segmentType: string;
9
+ }>;
10
+ getComponentData: (containerId?: string | undefined) => {
11
+ form: Record<string, Record<string, any> | undefined>;
12
+ table: Record<string, any[] | undefined>;
13
+ upload: Record<string, any[] | undefined>;
14
+ } | {
15
+ form: Record<string, any> | undefined;
16
+ table: any[] | undefined;
17
+ upload: any[] | undefined;
18
+ };
19
+ componentRefs: import('vue').Ref<{
20
+ form: Record<string, FormRenderInstance | undefined>;
21
+ table: Record<string, TableRenderInstance | undefined>;
22
+ upload: Record<string, UploadsRenderInstance | undefined>;
23
+ }, {
24
+ form: Record<string, FormRenderInstance | undefined>;
25
+ table: Record<string, TableRenderInstance | undefined>;
26
+ upload: Record<string, UploadsRenderInstance | undefined>;
27
+ } | {
28
+ form: Record<string, FormRenderInstance | undefined>;
29
+ table: Record<string, TableRenderInstance | undefined>;
30
+ upload: Record<string, UploadsRenderInstance | undefined>;
31
+ }>;
32
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<RenderEngineProps>, {}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
33
+ export default _default;
34
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
35
+ type __VLS_TypePropsToRuntimeProps<T> = {
36
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
37
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
38
+ } : {
39
+ type: import('vue').PropType<T[K]>;
40
+ required: true;
41
+ };
42
+ };
43
+ type __VLS_WithDefaults<P, D> = {
44
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
45
+ default: D[K];
46
+ }> : P[K];
47
+ };
48
+ type __VLS_Prettify<T> = {
49
+ [K in keyof T]: T[K];
50
+ } & {};
@@ -1,19 +1,32 @@
1
1
  import { FormRenderProps } from '../types';
2
2
 
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FormRenderProps>>, {
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FormRenderProps>, {
4
+ formLayout: string;
5
+ labelWidth: number;
6
+ colSpan: number;
7
+ }>>, {
4
8
  validate: () => Promise<{
5
9
  [key: string]: any;
6
10
  }> | undefined;
7
11
  resetFields: () => void | undefined;
12
+ getData: () => Record<string, any>;
8
13
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
14
  submit: (data: Record<string, any>) => void;
10
15
  onValueChange: (fieldId: string, value: any) => void;
11
16
  reset: () => void;
12
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FormRenderProps>>> & Readonly<{
17
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FormRenderProps>, {
18
+ formLayout: string;
19
+ labelWidth: number;
20
+ colSpan: number;
21
+ }>>> & Readonly<{
13
22
  onReset?: (() => any) | undefined;
14
23
  onSubmit?: ((data: Record<string, any>) => any) | undefined;
15
24
  onOnValueChange?: ((fieldId: string, value: any) => any) | undefined;
16
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
25
+ }>, {
26
+ colSpan: number;
27
+ formLayout: "inline" | "vertical" | "horizontal";
28
+ labelWidth: number;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
17
30
  export default _default;
18
31
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
32
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -24,3 +37,11 @@ type __VLS_TypePropsToRuntimeProps<T> = {
24
37
  required: true;
25
38
  };
26
39
  };
40
+ type __VLS_WithDefaults<P, D> = {
41
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
42
+ default: D[K];
43
+ }> : P[K];
44
+ };
45
+ type __VLS_Prettify<T> = {
46
+ [K in keyof T]: T[K];
47
+ } & {};
@@ -0,0 +1,3 @@
1
+ import { default as MobileTableRender } from './index.vue';
2
+
3
+ export default MobileTableRender;
@@ -0,0 +1,28 @@
1
+ import { ColumnSchemaType, DynamicRowVO, TableSchemaType } from '../../../types';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ editMode: boolean;
5
+ innerDrawerMode: false | undefined;
6
+ readonlyMode: boolean;
7
+ tableColumns: Array<ColumnSchemaType>;
8
+ tableSchema: null | TableSchemaType;
9
+ }>>, {
10
+ validate: () => Promise<void>;
11
+ getData: () => DynamicRowVO<ColumnSchemaType[]>[];
12
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
13
+ editMode: boolean;
14
+ innerDrawerMode: false | undefined;
15
+ readonlyMode: boolean;
16
+ tableColumns: Array<ColumnSchemaType>;
17
+ tableSchema: null | TableSchemaType;
18
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
+ export default _default;
20
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
21
+ type __VLS_TypePropsToRuntimeProps<T> = {
22
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
23
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
24
+ } : {
25
+ type: import('vue').PropType<T[K]>;
26
+ required: true;
27
+ };
28
+ };
@@ -1,6 +1,9 @@
1
1
  import { TableRenderProps } from '../types';
2
2
 
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TableRenderProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TableRenderProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TableRenderProps>>, {
4
+ validate: () => Promise<void>;
5
+ getData: () => any;
6
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<TableRenderProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
4
7
  export default _default;
5
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
6
9
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -2,8 +2,41 @@ import { UploadSchemaType } from '../../../types';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
4
  uploadSchema: UploadSchemaType;
5
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
5
+ /**
6
+ * 上传 API 地址
7
+ * 优先级最高,覆盖全局配置
8
+ */
9
+ uploadApiUrl?: string | undefined;
10
+ /**
11
+ * 上传成功后图片宽度
12
+ * 优先级最高,覆盖 schema.pixel.width 和全局配置
13
+ */
14
+ imageWidth?: number | undefined;
15
+ /**
16
+ * 上传成功后图片高度
17
+ * 优先级最高,覆盖 schema.pixel.height 和全局配置
18
+ */
19
+ imageHeight?: number | undefined;
20
+ }>>, {
21
+ validate: () => Promise<void>;
22
+ getData: () => (string | undefined)[];
23
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
24
  uploadSchema: UploadSchemaType;
25
+ /**
26
+ * 上传 API 地址
27
+ * 优先级最高,覆盖全局配置
28
+ */
29
+ uploadApiUrl?: string | undefined;
30
+ /**
31
+ * 上传成功后图片宽度
32
+ * 优先级最高,覆盖 schema.pixel.width 和全局配置
33
+ */
34
+ imageWidth?: number | undefined;
35
+ /**
36
+ * 上传成功后图片高度
37
+ * 优先级最高,覆盖 schema.pixel.height 和全局配置
38
+ */
39
+ imageHeight?: number | undefined;
7
40
  }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
41
  export default _default;
9
42
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -2,8 +2,10 @@ import { UploadSchemaType } from '../../../types';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
4
  jsonSchema: Array<UploadSchemaType>;
5
+ uploadApiUrl?: string | undefined;
5
6
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
7
  jsonSchema: Array<UploadSchemaType>;
8
+ uploadApiUrl?: string | undefined;
7
9
  }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
10
  export default _default;
9
11
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -4,4 +4,6 @@ export { default as FormItemRender } from './FormItem';
4
4
  export { default as FormRender } from './Form';
5
5
  export { default as UploadRender } from './Upload';
6
6
  export { default as UploadsRender } from './Uploads';
7
+ export { default as RenderEngine } from './Core';
8
+ export { default as MobileTableRender } from './MobileTable';
7
9
  export * from './types';
@@ -1,4 +1,4 @@
1
- import { ColumnSchemaType, FieldSchemaType, TableSchemaType } from '../../../types';
1
+ import { ColumnSchemaType, FieldSchemaType, TableSchemaType, JsonSchemaType } from '../../../types';
2
2
 
3
3
  export interface TableFormProps {
4
4
  colSpan: number | string;
@@ -22,9 +22,11 @@ export interface FormItemRenderProps {
22
22
  item: FieldSchemaType;
23
23
  }
24
24
  export interface FormRenderProps {
25
- colSpan: number | string;
25
+ colSpan?: number;
26
26
  formLayout?: 'horizontal' | 'inline' | 'vertical';
27
- formTitle: string;
28
- jsonSchema: Array<FieldSchemaType>;
29
- labelWidth: number;
27
+ jsonSchema: JsonSchemaType;
28
+ labelWidth?: number;
29
+ }
30
+ export interface RenderEngineProps {
31
+ jsonSchema: JsonSchemaType[];
30
32
  }
@@ -10,3 +10,38 @@ export type TableFormInstance = {
10
10
  validate: () => Promise<void>;
11
11
  resetFields: () => void;
12
12
  } | null;
13
+ export interface FormRenderInstance {
14
+ validate: () => Promise<void>;
15
+ resetFields: () => void;
16
+ getData: () => Record<string, any>;
17
+ }
18
+ export interface TableRenderInstance {
19
+ validate: () => Promise<void>;
20
+ getData: () => any[];
21
+ }
22
+ export interface UploadsRenderInstance {
23
+ validate: () => Promise<void>;
24
+ getData: () => any[];
25
+ }
26
+ export interface RenderEngineInstance {
27
+ validateAll: (containerId?: string) => Promise<{
28
+ errors: Record<string, Error | string | unknown>;
29
+ segmentId: string;
30
+ segmentType: 'form' | 'table' | 'upload';
31
+ success: boolean;
32
+ }>;
33
+ getComponentData: (containerId?: string) => {
34
+ form: Record<string, any> | undefined;
35
+ table: any[] | undefined;
36
+ upload: any[] | undefined;
37
+ } | {
38
+ form: Record<string, Record<string, any> | undefined>;
39
+ table: Record<string, any[] | undefined>;
40
+ upload: Record<string, any[] | undefined>;
41
+ };
42
+ componentRefs: {
43
+ form: Record<string, FormRenderInstance | undefined>;
44
+ table: Record<string, TableRenderInstance | undefined>;
45
+ upload: Record<string, undefined | UploadsRenderInstance>;
46
+ };
47
+ }
@@ -10,17 +10,17 @@ import { DragContainerItem, DragContainerList, DragContainerDesigner } from './D
10
10
  import { CodeSandBoxDrawer, DesignerEngineDrawer, TemplateEngineDrawer } from './Drawer';
11
11
  import { default as ResumeDesigner } from './Core';
12
12
  import { InputProps, InputNumberProps, CascaderProps, DatePickerProps, InputPasswordProps, RadioGroupProps, RangePickerProps, RateProps, SelectProps, SwitchProps, TextareaProps, TimePickerProps, TimeRangePickerProps, UploadDraggerProps, UploadProps } from './ComponentProps';
13
- import { TableFormRender, TableRender, FormRender, FormItemRender, UploadRender, UploadsRender } from './Render';
13
+ import { TableFormRender, TableRender, MobileTableRender, FormRender, FormItemRender, UploadRender, UploadsRender, RenderEngine } from './Render';
14
14
  import { DesignerFormPanel, DesignerTablePanel, DesignerUploadPanel, DesignerFormTemplate, DesignerTableTemplate, DesignerUploadTemplate, DesignerToolbar, TemplateDesignerEngine } from './Designer';
15
15
  import { DependencyItem, DependencyList, DependencyOperator } from './Dependency';
16
16
  import { DependencyModal, TableSettingModal } from './Modal';
17
17
  import { FieldPropertyPanel, UploadPropertyPanel, ContainerPropertyPanel, GlobalPropertyPanel, TablePropertyPanel, DesignerPanel } from './Panel';
18
18
  import { ColumnContainer, ColumnDesigner, ColumnProperty } from './Column';
19
19
  import { default as Toolbar } from './Toolbar';
20
- import { sleep } from './utils/sleep';
20
+ import { default as HrFormEngineConfigProvider } from './ConfigProvider';
21
21
 
22
22
  export { AutoScrollbar, GridSkeleton, TableSkeleton, LeftRightSkeleton, MixinIcon, MyInput, // 公共组件
23
- TagInput, ValueInput, TableFormRender, TableRender, FormRender, FormItemRender, UploadRender, UploadsRender, DeleteButton, DragDropButton, MoveDownButton, MoveBottomButton, CollapseButton, MoveTopButton, MoveUpButton, ToggleVisibleButton, FormDraggableContainer, UploadDraggableContainer, TableDraggableContainer, NestedDraggableContainer, InputProps, InputNumberProps, CascaderProps, DatePickerProps, InputPasswordProps, RadioGroupProps, RangePickerProps, RateProps, SelectProps, SwitchProps, TextareaProps, TimePickerProps, TimeRangePickerProps, UploadDraggerProps, UploadProps, DragContainerItem, DragContainerList, DragContainerDesigner, DependencyItem, DependencyList, DependencyOperator, DependencyModal, TableSettingModal, FieldPropertyPanel, UploadPropertyPanel, ContainerPropertyPanel, GlobalPropertyPanel, TablePropertyPanel, DesignerPanel, ColumnContainer, ColumnDesigner, ColumnProperty, CodeSandBoxDrawer, DesignerEngineDrawer, TemplateEngineDrawer, DesignerFormPanel, DesignerTablePanel, DesignerUploadPanel, DesignerFormTemplate, DesignerTableTemplate, DesignerUploadTemplate, DesignerToolbar, TemplateDesignerEngine, Toolbar, ResumeDesigner, sleep, };
23
+ TagInput, ValueInput, TableFormRender, TableRender, MobileTableRender, FormRender, FormItemRender, UploadRender, UploadsRender, RenderEngine, DeleteButton, DragDropButton, MoveDownButton, MoveBottomButton, CollapseButton, MoveTopButton, MoveUpButton, ToggleVisibleButton, FormDraggableContainer, UploadDraggableContainer, TableDraggableContainer, NestedDraggableContainer, InputProps, InputNumberProps, CascaderProps, DatePickerProps, InputPasswordProps, RadioGroupProps, RangePickerProps, RateProps, SelectProps, SwitchProps, TextareaProps, TimePickerProps, TimeRangePickerProps, UploadDraggerProps, UploadProps, DragContainerItem, DragContainerList, DragContainerDesigner, DependencyItem, DependencyList, DependencyOperator, DependencyModal, TableSettingModal, FieldPropertyPanel, UploadPropertyPanel, ContainerPropertyPanel, GlobalPropertyPanel, TablePropertyPanel, DesignerPanel, ColumnContainer, ColumnDesigner, ColumnProperty, CodeSandBoxDrawer, DesignerEngineDrawer, TemplateEngineDrawer, DesignerFormPanel, DesignerTablePanel, DesignerUploadPanel, DesignerFormTemplate, DesignerTableTemplate, DesignerUploadTemplate, DesignerToolbar, TemplateDesignerEngine, Toolbar, ResumeDesigner, HrFormEngineConfigProvider, };
24
24
  export * from './Button';
25
25
  export * from './Icon';
26
26
  export * from './Input';
@@ -37,6 +37,12 @@ export * from './Toolbar';
37
37
  export * from './Core';
38
38
  export * from '../data';
39
39
  export * from '../types';
40
+ export * from '../utils';
41
+ export { useConfig, useUploadConfig, useTableConfig, useDesignerConfig, useValidationConfig, useUploadDimensions, } from '../composables/useConfig';
42
+ export { useDesigner } from '../composables';
43
+ export { DESIGNER_INJECTION_KEY } from './Panel/types';
44
+ export type { HrFormEngineConfig, UploadGlobalConfig, TableGlobalConfig, DesignerGlobalConfig, ValidationGlobalConfig, } from '../types/config';
45
+ export { DEFAULT_CONFIG, HR_FORM_ENGINE_CONFIG_KEY } from '../types/config';
40
46
  declare const _default: {
41
47
  install(app: App): void;
42
48
  };
@@ -0,0 +1,2 @@
1
+ export * from './useConfig';
2
+ export * from './useDesigner';