@tmagic/editor 1.4.4 → 1.4.6
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.
- package/dist/style.css +2 -2
- package/dist/tmagic-editor.js +2393 -2242
- package/dist/tmagic-editor.umd.cjs +2403 -2248
- package/package.json +27 -27
- package/src/editorProps.ts +5 -1
- package/src/fields/DataSourceFieldSelect.vue +3 -41
- package/src/fields/EventSelect.vue +30 -9
- package/src/hooks/use-code-block-edit.ts +0 -2
- package/src/hooks/use-stage.ts +1 -1
- package/src/index.ts +1 -0
- package/src/initService.ts +12 -2
- package/src/layouts/workspace/viewer/Stage.vue +7 -6
- package/src/services/codeBlock.ts +77 -9
- package/src/services/dataSource.ts +53 -4
- package/src/services/editor.ts +2 -2
- package/src/services/props.ts +10 -5
- package/src/services/stageOverlay.ts +1 -0
- package/src/type.ts +1 -0
- package/src/utils/content-menu.ts +7 -3
- package/src/utils/data-source/index.ts +39 -3
- package/src/utils/editor.ts +16 -7
- package/types/components/CodeBlockEditor.vue.d.ts +21 -34
- package/types/components/CodeParams.vue.d.ts +2 -2
- package/types/components/ContentMenu.vue.d.ts +1 -1
- package/types/components/FloatingBox.vue.d.ts +41 -38
- package/types/components/ScrollViewer.vue.d.ts +1 -1
- package/types/components/ToolButton.vue.d.ts +4 -4
- package/types/components/Tree.vue.d.ts +2 -2
- package/types/editorProps.d.ts +5 -1
- package/types/fields/CodeLink.vue.d.ts +2 -2
- package/types/fields/DataSourceFields.vue.d.ts +32 -78
- package/types/fields/DataSourceInput.vue.d.ts +2 -2
- package/types/fields/DataSourceMethods.vue.d.ts +2 -2
- package/types/fields/DataSourceMocks.vue.d.ts +31 -76
- package/types/fields/KeyValue.vue.d.ts +2 -2
- package/types/fields/UISelect.vue.d.ts +2 -2
- package/types/hooks/use-code-block-edit.d.ts +18 -6
- package/types/hooks/use-data-source-edit.d.ts +18 -6
- package/types/hooks/use-data-source-method.d.ts +18 -6
- package/types/index.d.ts +1 -0
- package/types/layouts/CodeEditor.vue.d.ts +1 -1
- package/types/layouts/PropsPanel.vue.d.ts +14 -14
- package/types/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts +20 -30
- package/types/layouts/sidebar/layer/LayerMenu.vue.d.ts +6 -6
- package/types/layouts/workspace/viewer/Stage.vue.d.ts +4 -4
- package/types/layouts/workspace/viewer/ViewerMenu.vue.d.ts +6 -6
- package/types/services/codeBlock.d.ts +22 -2
- package/types/services/dataSource.d.ts +13 -1
- package/types/services/ui.d.ts +1 -1
- package/types/type.d.ts +1 -0
- package/types/utils/data-source/index.d.ts +3 -2
- package/types/utils/editor.d.ts +2 -0
|
@@ -1,82 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type: import("vue").PropType<"small" | "large" | "default">;
|
|
13
|
-
};
|
|
14
|
-
model: {
|
|
15
|
-
type: import("vue").PropType<any>;
|
|
16
|
-
required: true;
|
|
17
|
-
};
|
|
18
|
-
disabled: {
|
|
19
|
-
type: import("vue").PropType<boolean>;
|
|
20
|
-
default: boolean;
|
|
21
|
-
};
|
|
22
|
-
config: {
|
|
23
|
-
type: import("vue").PropType<{
|
|
24
|
-
type: 'data-source-mocks';
|
|
25
|
-
}>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
initValues: {
|
|
29
|
-
type: import("vue").PropType<any>;
|
|
30
|
-
};
|
|
31
|
-
lastValues: {
|
|
32
|
-
type: import("vue").PropType<Record<string, any>>;
|
|
33
|
-
};
|
|
34
|
-
prop: {
|
|
35
|
-
type: import("vue").PropType<string>;
|
|
36
|
-
required: true;
|
|
37
|
-
};
|
|
38
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1
|
+
import { type FieldProps } from '@tmagic/form';
|
|
2
|
+
declare let __VLS_typeProps: FieldProps<{
|
|
3
|
+
type: 'data-source-mocks';
|
|
4
|
+
}>;
|
|
5
|
+
type __VLS_PublicProps = {
|
|
6
|
+
'width'?: number;
|
|
7
|
+
'visible'?: boolean;
|
|
8
|
+
} & typeof __VLS_typeProps;
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
12
|
"update:width": (width: number) => void;
|
|
40
13
|
"update:visible": (visible: boolean) => void;
|
|
41
14
|
change: (...args: any[]) => void;
|
|
42
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
name: {
|
|
46
|
-
type: import("vue").PropType<string>;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
values: {
|
|
50
|
-
type: import("vue").PropType<any>;
|
|
51
|
-
};
|
|
52
|
-
size: {
|
|
53
|
-
type: import("vue").PropType<"small" | "large" | "default">;
|
|
54
|
-
};
|
|
55
|
-
model: {
|
|
56
|
-
type: import("vue").PropType<any>;
|
|
57
|
-
required: true;
|
|
58
|
-
};
|
|
59
|
-
disabled: {
|
|
60
|
-
type: import("vue").PropType<boolean>;
|
|
61
|
-
default: boolean;
|
|
62
|
-
};
|
|
63
|
-
config: {
|
|
64
|
-
type: import("vue").PropType<{
|
|
65
|
-
type: 'data-source-mocks';
|
|
66
|
-
}>;
|
|
67
|
-
required: true;
|
|
68
|
-
};
|
|
69
|
-
initValues: {
|
|
70
|
-
type: import("vue").PropType<any>;
|
|
71
|
-
};
|
|
72
|
-
lastValues: {
|
|
73
|
-
type: import("vue").PropType<Record<string, any>>;
|
|
74
|
-
};
|
|
75
|
-
prop: {
|
|
76
|
-
type: import("vue").PropType<string>;
|
|
77
|
-
required: true;
|
|
78
|
-
};
|
|
79
|
-
}>> & {
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
}>>> & {
|
|
80
18
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
81
19
|
"onUpdate:width"?: ((width: number) => any) | undefined;
|
|
82
20
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
@@ -84,3 +22,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
22
|
disabled: boolean;
|
|
85
23
|
}, {}>;
|
|
86
24
|
export default _default;
|
|
25
|
+
type __VLS_WithDefaults<P, D> = {
|
|
26
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
27
|
+
default: D[K];
|
|
28
|
+
}> : P[K];
|
|
29
|
+
};
|
|
30
|
+
type __VLS_Prettify<T> = {
|
|
31
|
+
[K in keyof T]: T[K];
|
|
32
|
+
} & {};
|
|
33
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
34
|
+
type __VLS_TypePropsToOption<T> = {
|
|
35
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
36
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
37
|
+
} : {
|
|
38
|
+
type: import('vue').PropType<T[K]>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { FieldProps, FormItem } from '@tmagic/form';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<FieldProps<{
|
|
3
|
-
type:
|
|
3
|
+
type: "key-value";
|
|
4
4
|
advanced?: boolean | undefined;
|
|
5
5
|
} & FormItem>>, {
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
8
|
change: (value: Record<string, any>) => void;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<FieldProps<{
|
|
10
|
-
type:
|
|
10
|
+
type: "key-value";
|
|
11
11
|
advanced?: boolean | undefined;
|
|
12
12
|
} & FormItem>>, {
|
|
13
13
|
disabled: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FieldProps, FormItem } from '@tmagic/form';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<FieldProps<{
|
|
3
|
-
type:
|
|
3
|
+
type: "ui-select";
|
|
4
4
|
} & FormItem>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
5
|
change: (...args: any[]) => void;
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<FieldProps<{
|
|
7
|
-
type:
|
|
7
|
+
type: "ui-select";
|
|
8
8
|
} & FormItem>>>> & {
|
|
9
9
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
10
10
|
}, {}, {}>;
|
|
@@ -4,8 +4,12 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
|
|
|
4
4
|
codeId: import("vue").Ref<string | undefined>;
|
|
5
5
|
codeConfig: import("vue").Ref<CodeBlockContent | undefined>;
|
|
6
6
|
codeBlockEditor: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
-
width:
|
|
8
|
-
|
|
7
|
+
width: {
|
|
8
|
+
type: import("vue").PropType<number>;
|
|
9
|
+
};
|
|
10
|
+
visible: {
|
|
11
|
+
type: import("vue").PropType<boolean>;
|
|
12
|
+
};
|
|
9
13
|
content: {
|
|
10
14
|
type: import("vue").PropType<CodeBlockContent>;
|
|
11
15
|
required: true;
|
|
@@ -31,8 +35,12 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
|
|
|
31
35
|
"update:visible": (visible: boolean) => void;
|
|
32
36
|
submit: (values: CodeBlockContent) => void;
|
|
33
37
|
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
-
width:
|
|
35
|
-
|
|
38
|
+
width: {
|
|
39
|
+
type: import("vue").PropType<number>;
|
|
40
|
+
};
|
|
41
|
+
visible: {
|
|
42
|
+
type: import("vue").PropType<boolean>;
|
|
43
|
+
};
|
|
36
44
|
content: {
|
|
37
45
|
type: import("vue").PropType<CodeBlockContent>;
|
|
38
46
|
required: true;
|
|
@@ -58,8 +66,12 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
|
|
|
58
66
|
M: {};
|
|
59
67
|
Defaults: {};
|
|
60
68
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
61
|
-
width:
|
|
62
|
-
|
|
69
|
+
width: {
|
|
70
|
+
type: import("vue").PropType<number>;
|
|
71
|
+
};
|
|
72
|
+
visible: {
|
|
73
|
+
type: import("vue").PropType<boolean>;
|
|
74
|
+
};
|
|
63
75
|
content: {
|
|
64
76
|
type: import("vue").PropType<CodeBlockContent>;
|
|
65
77
|
required: true;
|
|
@@ -3,8 +3,12 @@ import type { DataSourceService } from '../services/dataSource';
|
|
|
3
3
|
export declare const useDataSourceEdit: (dataSourceService?: DataSourceService) => {
|
|
4
4
|
dialogTitle: import("vue").Ref<string>;
|
|
5
5
|
editDialog: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
-
visible:
|
|
7
|
-
|
|
6
|
+
visible: {
|
|
7
|
+
type: import("vue").PropType<boolean>;
|
|
8
|
+
};
|
|
9
|
+
width: {
|
|
10
|
+
type: import("vue").PropType<number>;
|
|
11
|
+
};
|
|
8
12
|
title: {
|
|
9
13
|
type: import("vue").PropType<string>;
|
|
10
14
|
};
|
|
@@ -28,8 +32,12 @@ export declare const useDataSourceEdit: (dataSourceService?: DataSourceService)
|
|
|
28
32
|
"update:visible": (visible: boolean) => void;
|
|
29
33
|
submit: (...args: any[]) => void;
|
|
30
34
|
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
-
visible:
|
|
32
|
-
|
|
35
|
+
visible: {
|
|
36
|
+
type: import("vue").PropType<boolean>;
|
|
37
|
+
};
|
|
38
|
+
width: {
|
|
39
|
+
type: import("vue").PropType<number>;
|
|
40
|
+
};
|
|
33
41
|
title: {
|
|
34
42
|
type: import("vue").PropType<string>;
|
|
35
43
|
};
|
|
@@ -53,8 +61,12 @@ export declare const useDataSourceEdit: (dataSourceService?: DataSourceService)
|
|
|
53
61
|
M: {};
|
|
54
62
|
Defaults: {};
|
|
55
63
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
56
|
-
visible:
|
|
57
|
-
|
|
64
|
+
visible: {
|
|
65
|
+
type: import("vue").PropType<boolean>;
|
|
66
|
+
};
|
|
67
|
+
width: {
|
|
68
|
+
type: import("vue").PropType<number>;
|
|
69
|
+
};
|
|
58
70
|
title: {
|
|
59
71
|
type: import("vue").PropType<string>;
|
|
60
72
|
};
|
|
@@ -2,8 +2,12 @@ import type { CodeBlockContent, DataSourceSchema } from '@tmagic/schema';
|
|
|
2
2
|
export declare const useDataSourceMethod: () => {
|
|
3
3
|
codeConfig: import("vue").Ref<CodeBlockContent | undefined>;
|
|
4
4
|
codeBlockEditor: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
5
|
-
width:
|
|
6
|
-
|
|
5
|
+
width: {
|
|
6
|
+
type: import("vue").PropType<number>;
|
|
7
|
+
};
|
|
8
|
+
visible: {
|
|
9
|
+
type: import("vue").PropType<boolean>;
|
|
10
|
+
};
|
|
7
11
|
content: {
|
|
8
12
|
type: import("vue").PropType<CodeBlockContent>;
|
|
9
13
|
required: true;
|
|
@@ -29,8 +33,12 @@ export declare const useDataSourceMethod: () => {
|
|
|
29
33
|
"update:visible": (visible: boolean) => void;
|
|
30
34
|
submit: (values: CodeBlockContent) => void;
|
|
31
35
|
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
-
width:
|
|
33
|
-
|
|
36
|
+
width: {
|
|
37
|
+
type: import("vue").PropType<number>;
|
|
38
|
+
};
|
|
39
|
+
visible: {
|
|
40
|
+
type: import("vue").PropType<boolean>;
|
|
41
|
+
};
|
|
34
42
|
content: {
|
|
35
43
|
type: import("vue").PropType<CodeBlockContent>;
|
|
36
44
|
required: true;
|
|
@@ -56,8 +64,12 @@ export declare const useDataSourceMethod: () => {
|
|
|
56
64
|
M: {};
|
|
57
65
|
Defaults: {};
|
|
58
66
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
-
width:
|
|
60
|
-
|
|
67
|
+
width: {
|
|
68
|
+
type: import("vue").PropType<number>;
|
|
69
|
+
};
|
|
70
|
+
visible: {
|
|
71
|
+
type: import("vue").PropType<boolean>;
|
|
72
|
+
};
|
|
61
73
|
content: {
|
|
62
74
|
type: import("vue").PropType<CodeBlockContent>;
|
|
63
75
|
required: true;
|
package/types/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export { default as LayoutContainer } from './components/SplitView.vue';
|
|
|
43
43
|
export { default as SplitView } from './components/SplitView.vue';
|
|
44
44
|
export { default as Resizer } from './components/Resizer.vue';
|
|
45
45
|
export { default as CodeBlockEditor } from './components/CodeBlockEditor.vue';
|
|
46
|
+
export { default as FloatingBox } from './components/FloatingBox.vue';
|
|
46
47
|
export { default as PageFragmentSelect } from './fields/PageFragmentSelect.vue';
|
|
47
48
|
declare const _default: {
|
|
48
49
|
install: (app: App, opt?: Partial<InstallOptions>) => void;
|
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
20
20
|
parse: boolean;
|
|
21
21
|
}>, {
|
|
22
22
|
values: import("vue").Ref<string>;
|
|
23
|
-
getEditor(): monaco.editor.
|
|
23
|
+
getEditor(): monaco.editor.IStandaloneCodeEditor | monaco.editor.IStandaloneDiffEditor | null;
|
|
24
24
|
getVsEditor(): monaco.editor.IStandaloneCodeEditor | null;
|
|
25
25
|
getVsDiffEditor(): monaco.editor.IStandaloneDiffEditor | null;
|
|
26
26
|
setEditorValue: (v: any, m: any) => void | undefined;
|
|
@@ -6,7 +6,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
6
6
|
}>, {
|
|
7
7
|
configForm: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
8
8
|
size: {
|
|
9
|
-
type: import("vue").PropType<"
|
|
9
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
10
10
|
};
|
|
11
11
|
popperClass: {
|
|
12
12
|
type: import("vue").PropType<string>;
|
|
@@ -28,14 +28,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
28
28
|
type: import("vue").PropType<string>;
|
|
29
29
|
default: string;
|
|
30
30
|
};
|
|
31
|
-
extendState: {
|
|
32
|
-
type: import("vue").PropType<(state: FormState) => Record<string, any> | Promise<Record<string, any>>>;
|
|
33
|
-
};
|
|
34
31
|
initValues: {
|
|
35
32
|
type: import("vue").PropType<Record<string, any>>;
|
|
36
33
|
required: true;
|
|
37
34
|
default: () => {};
|
|
38
35
|
};
|
|
36
|
+
extendState: {
|
|
37
|
+
type: import("vue").PropType<(state: FormState) => Record<string, any> | Promise<Record<string, any>>>;
|
|
38
|
+
};
|
|
39
39
|
lastValues: {
|
|
40
40
|
type: import("vue").PropType<Record<string, any>>;
|
|
41
41
|
default: () => {};
|
|
@@ -84,7 +84,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
84
84
|
"field-change": (...args: any[]) => void;
|
|
85
85
|
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
86
86
|
size: {
|
|
87
|
-
type: import("vue").PropType<"
|
|
87
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
88
88
|
};
|
|
89
89
|
popperClass: {
|
|
90
90
|
type: import("vue").PropType<string>;
|
|
@@ -106,14 +106,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
106
106
|
type: import("vue").PropType<string>;
|
|
107
107
|
default: string;
|
|
108
108
|
};
|
|
109
|
-
extendState: {
|
|
110
|
-
type: import("vue").PropType<(state: FormState) => Record<string, any> | Promise<Record<string, any>>>;
|
|
111
|
-
};
|
|
112
109
|
initValues: {
|
|
113
110
|
type: import("vue").PropType<Record<string, any>>;
|
|
114
111
|
required: true;
|
|
115
112
|
default: () => {};
|
|
116
113
|
};
|
|
114
|
+
extendState: {
|
|
115
|
+
type: import("vue").PropType<(state: FormState) => Record<string, any> | Promise<Record<string, any>>>;
|
|
116
|
+
};
|
|
117
117
|
lastValues: {
|
|
118
118
|
type: import("vue").PropType<Record<string, any>>;
|
|
119
119
|
default: () => {};
|
|
@@ -156,8 +156,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
156
156
|
parentValues: Record<string, any>;
|
|
157
157
|
labelWidth: string;
|
|
158
158
|
disabled: boolean;
|
|
159
|
-
height: string;
|
|
160
159
|
stepActive: string | number;
|
|
160
|
+
height: string;
|
|
161
161
|
inline: boolean;
|
|
162
162
|
labelPosition: string;
|
|
163
163
|
}, true, {}, {}, {
|
|
@@ -169,7 +169,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
169
169
|
Defaults: {};
|
|
170
170
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
171
171
|
size: {
|
|
172
|
-
type: import("vue").PropType<"
|
|
172
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
173
173
|
};
|
|
174
174
|
popperClass: {
|
|
175
175
|
type: import("vue").PropType<string>;
|
|
@@ -191,14 +191,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
191
191
|
type: import("vue").PropType<string>;
|
|
192
192
|
default: string;
|
|
193
193
|
};
|
|
194
|
-
extendState: {
|
|
195
|
-
type: import("vue").PropType<(state: FormState) => Record<string, any> | Promise<Record<string, any>>>;
|
|
196
|
-
};
|
|
197
194
|
initValues: {
|
|
198
195
|
type: import("vue").PropType<Record<string, any>>;
|
|
199
196
|
required: true;
|
|
200
197
|
default: () => {};
|
|
201
198
|
};
|
|
199
|
+
extendState: {
|
|
200
|
+
type: import("vue").PropType<(state: FormState) => Record<string, any> | Promise<Record<string, any>>>;
|
|
201
|
+
};
|
|
202
202
|
lastValues: {
|
|
203
203
|
type: import("vue").PropType<Record<string, any>>;
|
|
204
204
|
default: () => {};
|
|
@@ -249,8 +249,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
249
249
|
parentValues: Record<string, any>;
|
|
250
250
|
labelWidth: string;
|
|
251
251
|
disabled: boolean;
|
|
252
|
-
height: string;
|
|
253
252
|
stepActive: string | number;
|
|
253
|
+
height: string;
|
|
254
254
|
inline: boolean;
|
|
255
255
|
labelPosition: string;
|
|
256
256
|
}> | undefined>;
|
|
@@ -1,41 +1,31 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
disabled: {
|
|
12
|
-
type: import("vue").PropType<boolean>;
|
|
13
|
-
required: true;
|
|
14
|
-
};
|
|
15
|
-
}, {
|
|
1
|
+
declare let __VLS_typeProps: {
|
|
2
|
+
title?: string;
|
|
3
|
+
values: any;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_PublicProps = {
|
|
7
|
+
'visible'?: boolean;
|
|
8
|
+
'width'?: number;
|
|
9
|
+
} & typeof __VLS_typeProps;
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {
|
|
16
11
|
show(): void;
|
|
17
12
|
hide(): void;
|
|
18
13
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
14
|
"update:width": (width: number) => void;
|
|
20
15
|
"update:visible": (visible: boolean) => void;
|
|
21
16
|
submit: (...args: any[]) => void;
|
|
22
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
-
visible: import("vue").PropType<boolean>;
|
|
24
|
-
width: import("vue").PropType<number>;
|
|
25
|
-
title: {
|
|
26
|
-
type: import("vue").PropType<string>;
|
|
27
|
-
};
|
|
28
|
-
values: {
|
|
29
|
-
type: import("vue").PropType<any>;
|
|
30
|
-
required: true;
|
|
31
|
-
};
|
|
32
|
-
disabled: {
|
|
33
|
-
type: import("vue").PropType<boolean>;
|
|
34
|
-
required: true;
|
|
35
|
-
};
|
|
36
|
-
}>> & {
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
|
|
37
18
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
38
19
|
"onUpdate:width"?: ((width: number) => any) | undefined;
|
|
39
20
|
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
40
21
|
}, {}, {}>;
|
|
41
22
|
export default _default;
|
|
23
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
+
type __VLS_TypePropsToOption<T> = {
|
|
25
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
+
} : {
|
|
28
|
+
type: import('vue').PropType<T[K]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MenuButton, MenuComponent } from '../../../type';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
3
|
-
layerContentMenu: (
|
|
4
|
-
customContentMenu?: ((menus: (
|
|
3
|
+
layerContentMenu: (MenuComponent | MenuButton)[];
|
|
4
|
+
customContentMenu?: ((menus: (MenuComponent | MenuButton)[], type: string) => (MenuComponent | MenuButton)[]) | undefined;
|
|
5
5
|
}>, {
|
|
6
6
|
layerContentMenu: () => never[];
|
|
7
7
|
customContentMenu: (menus: (MenuComponent | MenuButton)[]) => (MenuComponent | MenuButton)[];
|
|
@@ -10,16 +10,16 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
10
10
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
11
|
"collapse-all": () => void;
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
13
|
-
layerContentMenu: (
|
|
14
|
-
customContentMenu?: ((menus: (
|
|
13
|
+
layerContentMenu: (MenuComponent | MenuButton)[];
|
|
14
|
+
customContentMenu?: ((menus: (MenuComponent | MenuButton)[], type: string) => (MenuComponent | MenuButton)[]) | undefined;
|
|
15
15
|
}>, {
|
|
16
16
|
layerContentMenu: () => never[];
|
|
17
17
|
customContentMenu: (menus: (MenuComponent | MenuButton)[]) => (MenuComponent | MenuButton)[];
|
|
18
18
|
}>>> & {
|
|
19
19
|
"onCollapse-all"?: (() => any) | undefined;
|
|
20
20
|
}, {
|
|
21
|
-
layerContentMenu: (
|
|
22
|
-
customContentMenu: (menus: (
|
|
21
|
+
layerContentMenu: (MenuComponent | MenuButton)[];
|
|
22
|
+
customContentMenu: (menus: (MenuComponent | MenuButton)[], type: string) => (MenuComponent | MenuButton)[];
|
|
23
23
|
}, {}>;
|
|
24
24
|
export default _default;
|
|
25
25
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type MenuButton, type MenuComponent } from '../../../type';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
3
|
-
stageContentMenu: (
|
|
3
|
+
stageContentMenu: (MenuComponent | MenuButton)[];
|
|
4
4
|
disabledStageOverlay?: boolean | undefined;
|
|
5
|
-
customContentMenu?: ((menus: (
|
|
5
|
+
customContentMenu?: ((menus: (MenuComponent | MenuButton)[], type: string) => (MenuComponent | MenuButton)[]) | undefined;
|
|
6
6
|
}>, {
|
|
7
7
|
disabledStageOverlay: boolean;
|
|
8
8
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
9
|
-
stageContentMenu: (
|
|
9
|
+
stageContentMenu: (MenuComponent | MenuButton)[];
|
|
10
10
|
disabledStageOverlay?: boolean | undefined;
|
|
11
|
-
customContentMenu?: ((menus: (
|
|
11
|
+
customContentMenu?: ((menus: (MenuComponent | MenuButton)[], type: string) => (MenuComponent | MenuButton)[]) | undefined;
|
|
12
12
|
}>, {
|
|
13
13
|
disabledStageOverlay: boolean;
|
|
14
14
|
}>>>, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MenuButton, MenuComponent } from '../../../type';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
3
3
|
isMultiSelect?: boolean | undefined;
|
|
4
|
-
stageContentMenu: (
|
|
5
|
-
customContentMenu?: ((menus: (
|
|
4
|
+
stageContentMenu: (MenuComponent | MenuButton)[];
|
|
5
|
+
customContentMenu?: ((menus: (MenuComponent | MenuButton)[], type: string) => (MenuComponent | MenuButton)[]) | undefined;
|
|
6
6
|
}>, {
|
|
7
7
|
isMultiSelect: boolean;
|
|
8
8
|
stageContentMenu: () => never[];
|
|
@@ -11,16 +11,16 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
11
11
|
show: (e: MouseEvent) => void;
|
|
12
12
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
13
13
|
isMultiSelect?: boolean | undefined;
|
|
14
|
-
stageContentMenu: (
|
|
15
|
-
customContentMenu?: ((menus: (
|
|
14
|
+
stageContentMenu: (MenuComponent | MenuButton)[];
|
|
15
|
+
customContentMenu?: ((menus: (MenuComponent | MenuButton)[], type: string) => (MenuComponent | MenuButton)[]) | undefined;
|
|
16
16
|
}>, {
|
|
17
17
|
isMultiSelect: boolean;
|
|
18
18
|
stageContentMenu: () => never[];
|
|
19
19
|
customContentMenu: (menus: (MenuComponent | MenuButton)[]) => (MenuComponent | MenuButton)[];
|
|
20
20
|
}>>>, {
|
|
21
|
-
|
|
22
|
-
customContentMenu: (menus: (MenuButton | MenuComponent)[], type: string) => (MenuButton | MenuComponent)[];
|
|
21
|
+
customContentMenu: (menus: (MenuComponent | MenuButton)[], type: string) => (MenuComponent | MenuButton)[];
|
|
23
22
|
isMultiSelect: boolean;
|
|
23
|
+
stageContentMenu: (MenuComponent | MenuButton)[];
|
|
24
24
|
}, {}>;
|
|
25
25
|
export default _default;
|
|
26
26
|
type __VLS_WithDefaults<P, D> = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Writable } from 'type-fest';
|
|
2
2
|
import type { ColumnConfig } from '@tmagic/form';
|
|
3
|
-
import type { CodeBlockContent, CodeBlockDSL, Id } from '@tmagic/schema';
|
|
3
|
+
import type { CodeBlockContent, CodeBlockDSL, Id, MNode } from '@tmagic/schema';
|
|
4
4
|
import type { AsyncHookPlugin } from '../type';
|
|
5
5
|
import BaseService from './BaseService';
|
|
6
6
|
declare const canUsePluginMethods: {
|
|
7
7
|
async: readonly ["setCodeDslById", "setEditStatus", "setCombineIds", "setUndeleteableList", "deleteCodeDslByIds"];
|
|
8
|
-
sync:
|
|
8
|
+
sync: string[];
|
|
9
9
|
};
|
|
10
10
|
type AsyncMethodName = Writable<(typeof canUsePluginMethods)['async']>;
|
|
11
11
|
declare class CodeBlock extends BaseService {
|
|
@@ -37,6 +37,15 @@ declare class CodeBlock extends BaseService {
|
|
|
37
37
|
* @returns {void}
|
|
38
38
|
*/
|
|
39
39
|
setCodeDslById(id: Id, codeConfig: Partial<CodeBlockContent>): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* 为了兼容历史原因
|
|
42
|
+
* 设置代码块ID和代码内容到源dsl
|
|
43
|
+
* @param {Id} id 代码块id
|
|
44
|
+
* @param {CodeBlockContent} codeConfig 代码块内容配置信息
|
|
45
|
+
* @param {boolean} force 是否强制写入,默认true
|
|
46
|
+
* @returns {void}
|
|
47
|
+
*/
|
|
48
|
+
setCodeDslByIdSync(id: Id, codeConfig: Partial<CodeBlockContent>, force?: boolean): void;
|
|
40
49
|
/**
|
|
41
50
|
* 根据代码块id数组获取代码dsl
|
|
42
51
|
* @param {string[]} ids 代码块id数组
|
|
@@ -100,6 +109,17 @@ declare class CodeBlock extends BaseService {
|
|
|
100
109
|
* @returns {Id} 代码块唯一id
|
|
101
110
|
*/
|
|
102
111
|
getUniqueId(): Promise<string>;
|
|
112
|
+
/**
|
|
113
|
+
* 复制时会带上组件关联的代码块
|
|
114
|
+
* @param config 组件节点配置
|
|
115
|
+
* @returns
|
|
116
|
+
*/
|
|
117
|
+
copyWithRelated(config: MNode | MNode[]): void;
|
|
118
|
+
/**
|
|
119
|
+
* 粘贴代码块
|
|
120
|
+
* @returns
|
|
121
|
+
*/
|
|
122
|
+
paste(): void;
|
|
103
123
|
resetState(): void;
|
|
104
124
|
destroy(): void;
|
|
105
125
|
usePlugin(options: AsyncHookPlugin<AsyncMethodName, CodeBlock>): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Writable } from 'type-fest';
|
|
2
2
|
import type { EventOption } from '@tmagic/core';
|
|
3
3
|
import type { FormConfig } from '@tmagic/form';
|
|
4
|
-
import type { DataSourceSchema } from '@tmagic/schema';
|
|
4
|
+
import type { DataSourceSchema, MNode } from '@tmagic/schema';
|
|
5
5
|
import type { DatasourceTypeOption, SyncHookPlugin } from '../type';
|
|
6
6
|
import BaseService from './BaseService';
|
|
7
7
|
interface State {
|
|
@@ -40,6 +40,7 @@ declare class DataSource extends BaseService {
|
|
|
40
40
|
fields: import("@tmagic/schema").DataSchema[];
|
|
41
41
|
methods: import("@tmagic/schema").CodeBlockContent[];
|
|
42
42
|
mocks?: import("@tmagic/schema").MockSchema[] | undefined;
|
|
43
|
+
events: import("@tmagic/schema").EventConfig[];
|
|
43
44
|
disabledInitInJsEngine?: string[] | undefined;
|
|
44
45
|
};
|
|
45
46
|
update(config: DataSourceSchema): DataSourceSchema;
|
|
@@ -49,6 +50,17 @@ declare class DataSource extends BaseService {
|
|
|
49
50
|
resetState(): void;
|
|
50
51
|
destroy(): void;
|
|
51
52
|
usePlugin(options: SyncHookPlugin<SyncMethodName, DataSource>): void;
|
|
53
|
+
/**
|
|
54
|
+
* 复制时会带上组件关联的数据源
|
|
55
|
+
* @param config 组件节点配置
|
|
56
|
+
* @returns
|
|
57
|
+
*/
|
|
58
|
+
copyWithRelated(config: MNode | MNode[]): void;
|
|
59
|
+
/**
|
|
60
|
+
* 粘贴数据源
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
paste(): void;
|
|
52
64
|
}
|
|
53
65
|
export type DataSourceService = DataSource;
|
|
54
66
|
declare const _default: DataSource;
|
package/types/services/ui.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare class Ui extends BaseService {
|
|
|
28
28
|
};
|
|
29
29
|
showGuides: boolean;
|
|
30
30
|
showRule: boolean;
|
|
31
|
-
propsPanelSize: "
|
|
31
|
+
propsPanelSize: "default" | "small" | "large";
|
|
32
32
|
showAddPageButton: boolean;
|
|
33
33
|
hideSlideBar: boolean;
|
|
34
34
|
sideBarItems: {
|