@tmagic/editor 1.1.6 → 1.2.0-beta.10
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 +191 -8
- package/dist/tmagic-editor.mjs +2104 -1027
- package/dist/tmagic-editor.mjs.map +1 -1
- package/dist/tmagic-editor.umd.js +2136 -1053
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/package.json +11 -10
- package/src/Editor.vue +27 -12
- package/src/components/ContentMenu.vue +4 -4
- package/src/components/Icon.vue +7 -5
- package/src/{layouts → components}/Layout.vue +15 -5
- package/src/components/ScrollBar.vue +1 -1
- package/src/components/ScrollViewer.vue +10 -1
- package/src/components/ToolButton.vue +30 -15
- package/src/fields/Code.vue +5 -2
- package/src/fields/CodeLink.vue +20 -12
- package/src/fields/CodeSelect.vue +131 -0
- package/src/fields/UISelect.vue +9 -8
- package/src/index.ts +7 -2
- package/src/layouts/AddPageBox.vue +13 -20
- package/src/layouts/CodeEditor.vue +106 -120
- package/src/layouts/Framework.vue +62 -40
- package/src/layouts/NavMenu.vue +1 -1
- package/src/layouts/PropsPanel.vue +5 -10
- package/src/layouts/Resizer.vue +1 -1
- package/src/layouts/sidebar/ComponentListPanel.vue +15 -13
- package/src/layouts/sidebar/LayerMenu.vue +89 -92
- package/src/layouts/sidebar/LayerPanel.vue +273 -178
- package/src/layouts/sidebar/Sidebar.vue +129 -37
- package/src/layouts/sidebar/code-block/CodeBlockEditor.vue +169 -0
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +267 -0
- package/src/layouts/workspace/Breadcrumb.vue +32 -0
- package/src/layouts/workspace/PageBar.vue +12 -11
- package/src/layouts/workspace/PageBarScrollContainer.vue +1 -1
- package/src/layouts/workspace/Stage.vue +15 -7
- package/src/layouts/workspace/ViewerMenu.vue +8 -7
- package/src/layouts/workspace/Workspace.vue +10 -3
- package/src/services/codeBlock.ts +415 -0
- package/src/services/editor.ts +35 -5
- package/src/theme/breadcrumb.scss +6 -0
- package/src/theme/code-block.scss +184 -0
- package/src/theme/component-list-panel.scss +3 -7
- package/src/theme/index.scss +1 -13
- package/src/theme/layer-panel.scss +7 -2
- package/src/theme/layout.scss +5 -0
- package/src/theme/theme.scss +16 -0
- package/src/type.ts +88 -1
- package/src/utils/props.ts +9 -3
- package/src/utils/scroll-viewer.ts +18 -2
- package/src/utils/stage.ts +7 -0
- package/types/Editor.vue.d.ts +2 -2
- package/types/components/ContentMenu.vue.d.ts +1 -3
- package/types/components/Icon.vue.d.ts +1 -3
- package/types/{layouts → components}/Layout.vue.d.ts +0 -0
- package/types/components/ScrollBar.vue.d.ts +1 -3
- package/types/components/ScrollViewer.vue.d.ts +45 -1
- package/types/components/ToolButton.vue.d.ts +1 -3
- package/types/fields/Code.vue.d.ts +9 -3
- package/types/fields/CodeLink.vue.d.ts +5 -3
- package/types/fields/CodeSelect.vue.d.ts +94 -0
- package/types/fields/UISelect.vue.d.ts +1 -3
- package/types/index.d.ts +4 -0
- package/types/layouts/AddPageBox.vue.d.ts +43 -3
- package/types/layouts/CodeEditor.vue.d.ts +158 -45
- package/types/layouts/NavMenu.vue.d.ts +1 -3
- package/types/layouts/sidebar/LayerMenu.vue.d.ts +31 -63
- package/types/layouts/sidebar/LayerPanel.vue.d.ts +38 -1074
- package/types/layouts/sidebar/Sidebar.vue.d.ts +119 -17
- package/types/layouts/sidebar/code-block/CodeBlockEditor.vue.d.ts +50 -0
- package/types/layouts/sidebar/code-block/CodeBlockList.vue.d.ts +73 -0
- package/types/layouts/workspace/Breadcrumb.vue.d.ts +44 -0
- package/types/layouts/workspace/Stage.vue.d.ts +23 -7
- package/types/layouts/workspace/ViewerMenu.vue.d.ts +6 -3
- package/types/layouts/workspace/Workspace.vue.d.ts +23 -5
- package/types/services/codeBlock.d.ts +155 -0
- package/types/services/editor.d.ts +12 -1
- package/types/services/props.d.ts +12 -0
- package/types/services/ui.d.ts +1 -1
- package/types/type.d.ts +78 -1
- package/types/utils/props.d.ts +12 -0
- package/types/utils/scroll-viewer.d.ts +5 -0
- package/src/layouts/sidebar/TabPane.vue +0 -99
- package/types/layouts/sidebar/TabPane.vue.d.ts +0 -14
|
@@ -1,26 +1,128 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MenuButton, MenuComponent } from '../../type';
|
|
2
2
|
import { SideBarData } from '../../type';
|
|
3
|
-
declare const _default:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
declare const _default: {
|
|
4
|
+
new (...args: any[]): {
|
|
5
|
+
$: import("vue").ComponentInternalInstance;
|
|
6
|
+
$data: {};
|
|
7
|
+
$props: Partial<{
|
|
8
|
+
data: SideBarData;
|
|
9
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
data?: SideBarData | undefined;
|
|
11
|
+
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
12
|
+
}>, {
|
|
13
|
+
data: () => {
|
|
14
|
+
type: string;
|
|
15
|
+
status: string;
|
|
16
|
+
items: string[];
|
|
17
|
+
};
|
|
18
|
+
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "data">;
|
|
19
|
+
$attrs: {
|
|
20
|
+
[x: string]: unknown;
|
|
10
21
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
$refs: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
$slots: Readonly<{
|
|
26
|
+
[name: string]: import("vue").Slot | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
29
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
30
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
31
|
+
$el: any;
|
|
32
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
33
|
+
data?: SideBarData | undefined;
|
|
34
|
+
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
35
|
+
}>, {
|
|
36
|
+
data: () => {
|
|
37
|
+
type: string;
|
|
38
|
+
status: string;
|
|
39
|
+
items: string[];
|
|
40
|
+
};
|
|
41
|
+
}>>>, {
|
|
42
|
+
activeTabName: import("vue").Ref<string>;
|
|
43
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
44
|
+
data: SideBarData;
|
|
45
|
+
}> & {
|
|
46
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
47
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
48
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
49
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
50
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
51
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
52
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
53
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
54
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
55
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
56
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
57
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
58
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
59
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
60
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
61
|
+
};
|
|
62
|
+
$forceUpdate: () => void;
|
|
63
|
+
$nextTick: typeof import("vue").nextTick;
|
|
64
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
65
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
66
|
+
data?: SideBarData | undefined;
|
|
67
|
+
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
68
|
+
}>, {
|
|
69
|
+
data: () => {
|
|
18
70
|
type: string;
|
|
19
71
|
status: string;
|
|
20
72
|
items: string[];
|
|
21
73
|
};
|
|
74
|
+
}>>> & import("vue").ShallowUnwrapRef<{
|
|
75
|
+
activeTabName: import("vue").Ref<string>;
|
|
76
|
+
}> & {} & import("vue").ComponentCustomProperties;
|
|
77
|
+
__isFragment?: undefined;
|
|
78
|
+
__isTeleport?: undefined;
|
|
79
|
+
__isSuspense?: undefined;
|
|
80
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
81
|
+
data?: SideBarData | undefined;
|
|
82
|
+
layerContentMenu: (MenuButton | MenuComponent)[];
|
|
83
|
+
}>, {
|
|
84
|
+
data: () => {
|
|
85
|
+
type: string;
|
|
86
|
+
status: string;
|
|
87
|
+
items: string[];
|
|
22
88
|
};
|
|
23
|
-
}
|
|
89
|
+
}>>>, {
|
|
90
|
+
activeTabName: import("vue").Ref<string>;
|
|
91
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
24
92
|
data: SideBarData;
|
|
25
|
-
}
|
|
93
|
+
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
94
|
+
$slots: {
|
|
95
|
+
'component-list-panel-header': (_: {}) => any;
|
|
96
|
+
'component-list-item': (_: {
|
|
97
|
+
component: any;
|
|
98
|
+
}) => any;
|
|
99
|
+
'layer-panel-header': (_: {}) => any;
|
|
100
|
+
'code-block-panel-header': (_: {}) => any;
|
|
101
|
+
'code-block-panel-tool': (_: {
|
|
102
|
+
id: any;
|
|
103
|
+
data: any;
|
|
104
|
+
}) => any;
|
|
105
|
+
'code-block-edit-panel-header': (_: {
|
|
106
|
+
id: any;
|
|
107
|
+
}) => any;
|
|
108
|
+
'layer-node-content': (_: {
|
|
109
|
+
data: any;
|
|
110
|
+
node: any;
|
|
111
|
+
}) => any;
|
|
112
|
+
};
|
|
113
|
+
});
|
|
26
114
|
export default _default;
|
|
115
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
116
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
117
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
118
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
119
|
+
} : {
|
|
120
|
+
type: import('vue').PropType<T[K]>;
|
|
121
|
+
required: true;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
125
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
126
|
+
default: D[K];
|
|
127
|
+
} : P[K];
|
|
128
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
new (...args: any[]): {
|
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
6
|
+
$attrs: {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
$refs: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
$slots: Readonly<{
|
|
13
|
+
[name: string]: import("vue").Slot | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
16
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
17
|
+
$emit: ((event: string, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
18
|
+
$el: any;
|
|
19
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {}> & {
|
|
20
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
21
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
22
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
23
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
24
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
25
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
26
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
27
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
28
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
33
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
34
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
35
|
+
};
|
|
36
|
+
$forceUpdate: () => void;
|
|
37
|
+
$nextTick: typeof import("vue").nextTick;
|
|
38
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
39
|
+
} & Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
40
|
+
__isFragment?: undefined;
|
|
41
|
+
__isTeleport?: undefined;
|
|
42
|
+
__isSuspense?: undefined;
|
|
43
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
44
|
+
$slots: {
|
|
45
|
+
'code-block-edit-panel-header': (_: {
|
|
46
|
+
id: string;
|
|
47
|
+
}) => any;
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CodeDeleteErrorType } from '../../../type';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
new (...args: any[]): {
|
|
4
|
+
$: import("vue").ComponentInternalInstance;
|
|
5
|
+
$data: {};
|
|
6
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
customError?: ((id: string, errorType: CodeDeleteErrorType) => any) | undefined;
|
|
8
|
+
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
9
|
+
$attrs: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
$refs: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
$slots: Readonly<{
|
|
16
|
+
[name: string]: import("vue").Slot | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
19
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
20
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
21
|
+
$el: any;
|
|
22
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
23
|
+
customError?: ((id: string, errorType: CodeDeleteErrorType) => any) | undefined;
|
|
24
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & {
|
|
25
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
26
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
27
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
28
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
33
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
34
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
35
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
36
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
37
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
38
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
39
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
40
|
+
};
|
|
41
|
+
$forceUpdate: () => void;
|
|
42
|
+
$nextTick: typeof import("vue").nextTick;
|
|
43
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
44
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
45
|
+
customError?: ((id: string, errorType: CodeDeleteErrorType) => any) | undefined;
|
|
46
|
+
}>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
47
|
+
__isFragment?: undefined;
|
|
48
|
+
__isTeleport?: undefined;
|
|
49
|
+
__isSuspense?: undefined;
|
|
50
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
51
|
+
customError?: ((id: string, errorType: CodeDeleteErrorType) => any) | undefined;
|
|
52
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
53
|
+
$slots: {
|
|
54
|
+
'code-block-panel-header': (_: {}) => any;
|
|
55
|
+
'code-block-panel-tool': (_: {
|
|
56
|
+
id: any;
|
|
57
|
+
data: any;
|
|
58
|
+
}) => any;
|
|
59
|
+
'code-block-edit-panel-header': (_: {
|
|
60
|
+
id: string;
|
|
61
|
+
}) => any;
|
|
62
|
+
};
|
|
63
|
+
});
|
|
64
|
+
export default _default;
|
|
65
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
66
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
67
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
68
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
69
|
+
} : {
|
|
70
|
+
type: import('vue').PropType<T[K]>;
|
|
71
|
+
required: true;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
new (...args: any[]): {
|
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
6
|
+
$attrs: {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
$refs: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
$slots: Readonly<{
|
|
13
|
+
[name: string]: import("vue").Slot | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
16
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
17
|
+
$emit: ((event: string, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
18
|
+
$el: any;
|
|
19
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {}> & {
|
|
20
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
21
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
22
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
23
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
24
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
25
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
26
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
27
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
28
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
29
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
30
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
31
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
32
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
33
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
34
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
|
|
35
|
+
};
|
|
36
|
+
$forceUpdate: () => void;
|
|
37
|
+
$nextTick: typeof import("vue").nextTick;
|
|
38
|
+
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
39
|
+
} & Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
40
|
+
__isFragment?: undefined;
|
|
41
|
+
__isTeleport?: undefined;
|
|
42
|
+
__isSuspense?: undefined;
|
|
43
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
44
|
+
export default _default;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { MenuButton, MenuComponent } from '../../type';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
new (...args: any[]): {
|
|
3
4
|
$: import("vue").ComponentInternalInstance;
|
|
4
5
|
$data: {};
|
|
5
|
-
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
8
|
+
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
6
9
|
$attrs: {
|
|
7
10
|
[x: string]: unknown;
|
|
8
11
|
};
|
|
@@ -14,9 +17,11 @@ declare const _default: {
|
|
|
14
17
|
}>;
|
|
15
18
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
16
19
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
17
|
-
$emit: (
|
|
20
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
18
21
|
$el: any;
|
|
19
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
23
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
24
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & {
|
|
20
25
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
21
26
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
22
27
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -36,11 +41,22 @@ declare const _default: {
|
|
|
36
41
|
$forceUpdate: () => void;
|
|
37
42
|
$nextTick: typeof import("vue").nextTick;
|
|
38
43
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
39
|
-
} & Readonly<import("vue").ExtractPropTypes<
|
|
44
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
45
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
46
|
+
}>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
40
47
|
__isFragment?: undefined;
|
|
41
48
|
__isTeleport?: undefined;
|
|
42
49
|
__isSuspense?: undefined;
|
|
43
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
-
|
|
45
|
-
});
|
|
50
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
51
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
52
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
46
53
|
export default _default;
|
|
54
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
55
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
56
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
57
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
58
|
+
} : {
|
|
59
|
+
type: import('vue').PropType<T[K]>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MenuButton, MenuComponent } from '../../type';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
new (...args: any[]): {
|
|
3
4
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -6,6 +7,7 @@ declare const _default: {
|
|
|
6
7
|
isMultiSelect: boolean;
|
|
7
8
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
8
9
|
isMultiSelect?: boolean | undefined;
|
|
10
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
9
11
|
}>, {
|
|
10
12
|
isMultiSelect: boolean;
|
|
11
13
|
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "isMultiSelect">;
|
|
@@ -24,6 +26,7 @@ declare const _default: {
|
|
|
24
26
|
$el: any;
|
|
25
27
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
26
28
|
isMultiSelect?: boolean | undefined;
|
|
29
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
27
30
|
}>, {
|
|
28
31
|
isMultiSelect: boolean;
|
|
29
32
|
}>>>, {
|
|
@@ -52,6 +55,7 @@ declare const _default: {
|
|
|
52
55
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
53
56
|
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
54
57
|
isMultiSelect?: boolean | undefined;
|
|
58
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
55
59
|
}>, {
|
|
56
60
|
isMultiSelect: boolean;
|
|
57
61
|
}>>> & import("vue").ShallowUnwrapRef<{
|
|
@@ -62,15 +66,14 @@ declare const _default: {
|
|
|
62
66
|
__isSuspense?: undefined;
|
|
63
67
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
64
68
|
isMultiSelect?: boolean | undefined;
|
|
69
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
65
70
|
}>, {
|
|
66
71
|
isMultiSelect: boolean;
|
|
67
72
|
}>>>, {
|
|
68
73
|
show: (e: MouseEvent) => Promise<void>;
|
|
69
74
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {
|
|
70
75
|
isMultiSelect: boolean;
|
|
71
|
-
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps
|
|
72
|
-
$slots: {};
|
|
73
|
-
});
|
|
76
|
+
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
74
77
|
export default _default;
|
|
75
78
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
76
79
|
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { MPage } from '@tmagic/schema';
|
|
2
|
+
import type { MenuButton, MenuComponent } from '../../type';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
new (...args: any[]): {
|
|
4
5
|
$: import("vue").ComponentInternalInstance;
|
|
5
6
|
$data: {};
|
|
6
|
-
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
9
|
+
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
7
10
|
$attrs: {
|
|
8
11
|
[x: string]: unknown;
|
|
9
12
|
};
|
|
@@ -15,9 +18,11 @@ declare const _default: {
|
|
|
15
18
|
}>;
|
|
16
19
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
17
20
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
|
|
18
|
-
$emit: (
|
|
21
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
19
22
|
$el: any;
|
|
20
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
24
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
25
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & {
|
|
21
26
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
22
27
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
23
28
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -37,11 +42,15 @@ declare const _default: {
|
|
|
37
42
|
$forceUpdate: () => void;
|
|
38
43
|
$nextTick: typeof import("vue").nextTick;
|
|
39
44
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
40
|
-
} & Readonly<import("vue").ExtractPropTypes<
|
|
45
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
46
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
47
|
+
}>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
|
|
41
48
|
__isFragment?: undefined;
|
|
42
49
|
__isTeleport?: undefined;
|
|
43
50
|
__isSuspense?: undefined;
|
|
44
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
52
|
+
stageContentMenu: (MenuButton | MenuComponent)[];
|
|
53
|
+
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
45
54
|
$slots: {
|
|
46
55
|
stage: (_: {}) => any;
|
|
47
56
|
'workspace-content': (_: {}) => any;
|
|
@@ -54,3 +63,12 @@ declare const _default: {
|
|
|
54
63
|
};
|
|
55
64
|
});
|
|
56
65
|
export default _default;
|
|
66
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
67
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
68
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
69
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
70
|
+
} : {
|
|
71
|
+
type: import('vue').PropType<T[K]>;
|
|
72
|
+
required: true;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Id, MNode } from '@tmagic/schema';
|
|
2
|
+
import type { CodeBlockContent, CodeBlockDSL } from '../type';
|
|
3
|
+
import { CodeEditorMode, CodeSelectOp } from '../type';
|
|
4
|
+
import BaseService from './BaseService';
|
|
5
|
+
declare class CodeBlock extends BaseService {
|
|
6
|
+
private state;
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* 设置活动的代码块dsl数据源
|
|
10
|
+
* @param {CodeBlockDSL} codeDsl 代码DSL
|
|
11
|
+
* @returns {void}
|
|
12
|
+
*/
|
|
13
|
+
setCodeDsl(codeDsl: CodeBlockDSL): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* 获取活动的代码块dsl数据源(默认从dsl中的codeBlocks字段读取)
|
|
16
|
+
* @param {boolean} forceRefresh 是否强制从活动dsl拉取刷新
|
|
17
|
+
* @returns {CodeBlockDSL | null}
|
|
18
|
+
*/
|
|
19
|
+
getCodeDsl(forceRefresh?: boolean): Promise<CodeBlockDSL | null>;
|
|
20
|
+
/**
|
|
21
|
+
* 根据代码块id获取代码块内容
|
|
22
|
+
* @param {string} id 代码块id
|
|
23
|
+
* @returns {CodeBlockContent | null}
|
|
24
|
+
*/
|
|
25
|
+
getCodeContentById(id: string): Promise<CodeBlockContent | null>;
|
|
26
|
+
/**
|
|
27
|
+
* 设置代码块ID和代码内容到源dsl
|
|
28
|
+
* @param {string} id 代码块id
|
|
29
|
+
* @param {CodeBlockContent} codeConfig 代码块内容配置信息
|
|
30
|
+
* @returns {void}
|
|
31
|
+
*/
|
|
32
|
+
setCodeDslById(id: string, codeConfig: CodeBlockContent): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* 根据代码块id数组获取代码dsl
|
|
35
|
+
* @param {string[]} ids 代码块id数组
|
|
36
|
+
* @returns {CodeBlockDSL}
|
|
37
|
+
*/
|
|
38
|
+
getCodeDslByIds(ids: string[]): Promise<CodeBlockDSL>;
|
|
39
|
+
/**
|
|
40
|
+
* 设置代码编辑面板展示状态
|
|
41
|
+
* @param {boolean} status 是否展示代码编辑面板
|
|
42
|
+
* @returns {void}
|
|
43
|
+
*/
|
|
44
|
+
setCodeEditorShowStatus(status: boolean): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* 获取代码编辑面板展示状态
|
|
47
|
+
* @returns {boolean} 是否展示代码编辑面板
|
|
48
|
+
*/
|
|
49
|
+
getCodeEditorShowStatus(): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* 设置代码编辑面板展示状态及展示内容
|
|
52
|
+
* @param {boolean} status 是否展示代码编辑面板
|
|
53
|
+
* @param {string} id 代码块id
|
|
54
|
+
* @returns {void}
|
|
55
|
+
*/
|
|
56
|
+
setCodeEditorContent(status: boolean, id: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* 获取当前选中的代码块内容
|
|
59
|
+
* @returns {CodeBlockContent | null}
|
|
60
|
+
*/
|
|
61
|
+
getCurrentDsl(): Promise<CodeBlockContent | null>;
|
|
62
|
+
/**
|
|
63
|
+
* 获取编辑状态
|
|
64
|
+
* @returns {boolean} 是否可编辑
|
|
65
|
+
*/
|
|
66
|
+
getEditStatus(): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* 设置编辑状态
|
|
69
|
+
* @param {boolean} 是否可编辑
|
|
70
|
+
* @returns {void}
|
|
71
|
+
*/
|
|
72
|
+
setEditStatus(status: boolean): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* 设置当前选中的代码块ID
|
|
75
|
+
* @param {string} id 代码块id
|
|
76
|
+
* @returns {void}
|
|
77
|
+
*/
|
|
78
|
+
setId(id: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* 获取当前选中的代码块ID
|
|
81
|
+
* @returns {string} id 代码块id
|
|
82
|
+
*/
|
|
83
|
+
getId(): string;
|
|
84
|
+
/**
|
|
85
|
+
* 获取当前模式
|
|
86
|
+
* @returns {CodeEditorMode}
|
|
87
|
+
*/
|
|
88
|
+
getMode(): CodeEditorMode;
|
|
89
|
+
/**
|
|
90
|
+
* 设置当前模式
|
|
91
|
+
* @param {CodeEditorMode} mode 模式
|
|
92
|
+
* @returns {void}
|
|
93
|
+
*/
|
|
94
|
+
setMode(mode: CodeEditorMode): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* 设置当前选中组件已关联绑定的代码块id数组
|
|
97
|
+
* @param {string[]} ids 代码块id数组
|
|
98
|
+
* @returns {void}
|
|
99
|
+
*/
|
|
100
|
+
setCombineIds(ids: string[]): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* 获取当前选中组件已关联绑定的代码块id数组
|
|
103
|
+
* @returns {string[]}
|
|
104
|
+
*/
|
|
105
|
+
getCombineIds(): string[];
|
|
106
|
+
/**
|
|
107
|
+
* 设置绑定关系
|
|
108
|
+
* @param {Id} 组件id
|
|
109
|
+
* @param {string[]} diffCodeIds 代码块id数组
|
|
110
|
+
* @param {CodeSelectOp} opFlag 操作类型
|
|
111
|
+
* @param {string} hook 代码块挂载hook名称
|
|
112
|
+
* @returns {void}
|
|
113
|
+
*/
|
|
114
|
+
setCombineRelation(compId: Id, diffCodeIds: string[], opFlag: CodeSelectOp, hook: string): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* 获取不可删除列表
|
|
117
|
+
* @returns {string[]}
|
|
118
|
+
*/
|
|
119
|
+
getUndeletableList(): string[];
|
|
120
|
+
/**
|
|
121
|
+
* 设置不可删除列表:为业务逻辑预留的不可删除的代码块列表,由业务逻辑维护(如代码块上线后不可删除)
|
|
122
|
+
* @param {string[]} codeIds 代码块id数组
|
|
123
|
+
* @returns {void}
|
|
124
|
+
*/
|
|
125
|
+
setUndeleteableList(codeIds: string[]): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* 在dsl数据源中删除指定id的代码块
|
|
128
|
+
* @param {string[]} codeIds 需要删除的代码块id数组
|
|
129
|
+
* @returns {CodeBlockDSL} 删除后的code dsl
|
|
130
|
+
*/
|
|
131
|
+
deleteCodeDslByIds(codeIds: string[]): Promise<CodeBlockDSL>;
|
|
132
|
+
/**
|
|
133
|
+
* 生成代码块唯一id
|
|
134
|
+
* @returns {string} 代码块唯一id
|
|
135
|
+
*/
|
|
136
|
+
getUniqueId(): Promise<string>;
|
|
137
|
+
/**
|
|
138
|
+
* 一对一解除绑定关系 功能隐藏,暂时注释
|
|
139
|
+
* @param {string} compId 组件id
|
|
140
|
+
* @param {string} codeId 代码块id
|
|
141
|
+
* @param {string[]} codeHooks 代码块挂载hook名称
|
|
142
|
+
* @returns {boolean} 结果
|
|
143
|
+
*/
|
|
144
|
+
/**
|
|
145
|
+
* 通过组件id解除绑定关系(删除组件)
|
|
146
|
+
* @param {MNode} compId 组件节点
|
|
147
|
+
* @returns void
|
|
148
|
+
*/
|
|
149
|
+
deleteCompsInRelation(node: MNode): Promise<void>;
|
|
150
|
+
destroy(): void;
|
|
151
|
+
private recurseNodes;
|
|
152
|
+
}
|
|
153
|
+
export declare type CodeBlockService = CodeBlock;
|
|
154
|
+
declare const _default: CodeBlock;
|
|
155
|
+
export default _default;
|