@tmagic/editor 1.4.0-beta.2 → 1.4.0
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 +8 -20
- package/dist/tmagic-editor.js +829 -742
- package/dist/tmagic-editor.umd.cjs +832 -745
- package/package.json +11 -11
- package/src/components/CodeBlockEditor.vue +50 -73
- package/src/components/FloatingBox.vue +24 -9
- package/src/fields/DataSourceFieldSelect.vue +2 -1
- package/src/fields/DataSourceFields.vue +55 -30
- package/src/fields/DataSourceInput.vue +6 -2
- package/src/fields/DataSourceMocks.vue +35 -17
- package/src/hooks/use-editor-content-height.ts +1 -1
- package/src/hooks/use-float-box.ts +14 -8
- package/src/hooks/use-next-float-box-position.ts +29 -0
- package/src/layouts/CodeEditor.vue +3 -6
- package/src/layouts/PropsPanel.vue +4 -2
- package/src/layouts/sidebar/Sidebar.vue +7 -10
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +1 -3
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +36 -22
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +1 -6
- package/src/layouts/workspace/viewer/StageOverlay.vue +3 -1
- package/src/theme/code-block.scss +0 -14
- package/src/theme/component-list-panel.scss +0 -1
- package/src/theme/icon.scss +7 -1
- package/src/theme/layer-panel.scss +0 -1
- package/src/theme/sidebar.scss +0 -7
- package/src/type.ts +0 -6
- package/types/components/CodeBlockEditor.vue.d.ts +0 -7
- package/types/fields/DataSourceFields.vue.d.ts +84 -28
- package/types/fields/DataSourceMocks.vue.d.ts +80 -28
- package/types/hooks/use-code-block-edit.d.ts +0 -9
- package/types/hooks/use-data-source-method.d.ts +0 -9
- package/types/hooks/use-next-float-box-position.d.ts +9 -0
- package/types/layouts/sidebar/code-block/CodeBlockListPanel.vue.d.ts +1 -3
- package/types/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts +34 -22
- package/types/layouts/sidebar/data-source/DataSourceListPanel.vue.d.ts +2 -15
- package/types/type.d.ts +0 -5
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref, ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { UiService } from '@editor/services/ui';
|
|
4
|
+
|
|
5
|
+
export const useNextFloatBoxPosition = (uiService?: UiService, parent?: Ref<HTMLDivElement | null>) => {
|
|
6
|
+
const boxPosition = ref({
|
|
7
|
+
left: 0,
|
|
8
|
+
top: 0,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const calcBoxPosition = () => {
|
|
12
|
+
const columnWidth = uiService?.get('columnWidth');
|
|
13
|
+
const navMenuRect = uiService?.get('navMenuRect');
|
|
14
|
+
let left = columnWidth?.left ?? 0;
|
|
15
|
+
if (parent?.value) {
|
|
16
|
+
const rect = parent?.value?.getBoundingClientRect();
|
|
17
|
+
left = (rect?.left ?? 0) + (rect?.width ?? 0);
|
|
18
|
+
}
|
|
19
|
+
boxPosition.value = {
|
|
20
|
+
left,
|
|
21
|
+
top: (navMenuRect?.top ?? 0) + (navMenuRect?.height ?? 0),
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
boxPosition,
|
|
27
|
+
calcBoxPosition,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -5,12 +5,8 @@
|
|
|
5
5
|
:class="`magic-code-editor-wrapper${fullScreen ? ' full-screen' : ''}`"
|
|
6
6
|
:style="!fullScreen && height ? `height: ${height}` : '100%'"
|
|
7
7
|
>
|
|
8
|
-
<TMagicButton
|
|
9
|
-
|
|
10
|
-
circle
|
|
11
|
-
size="small"
|
|
12
|
-
:icon="FullScreen"
|
|
13
|
-
@click="fullScreenHandler"
|
|
8
|
+
<TMagicButton class="magic-code-editor-full-screen-icon" circle size="small" @click="fullScreenHandler"
|
|
9
|
+
><MIcon :icon="FullScreen"></MIcon
|
|
14
10
|
></TMagicButton>
|
|
15
11
|
<div ref="codeEditor" class="magic-code-editor-content"></div>
|
|
16
12
|
</div>
|
|
@@ -26,6 +22,7 @@ import serialize from 'serialize-javascript';
|
|
|
26
22
|
|
|
27
23
|
import { TMagicButton } from '@tmagic/design';
|
|
28
24
|
|
|
25
|
+
import MIcon from '@editor/components/Icon.vue';
|
|
29
26
|
import { getConfig } from '@editor/utils/config';
|
|
30
27
|
import monaco from '@editor/utils/monaco-editor';
|
|
31
28
|
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
circle
|
|
19
19
|
size="large"
|
|
20
20
|
title="源码"
|
|
21
|
-
:icon="DocumentIcon"
|
|
22
21
|
:type="showSrc ? 'primary' : ''"
|
|
23
22
|
@click="showSrc = !showSrc"
|
|
24
|
-
|
|
23
|
+
>
|
|
24
|
+
<MIcon :icon="DocumentIcon"></MIcon>
|
|
25
|
+
</TMagicButton>
|
|
25
26
|
|
|
26
27
|
<CodeEditor
|
|
27
28
|
v-if="showSrc"
|
|
@@ -43,6 +44,7 @@ import type { FormState, FormValue } from '@tmagic/form';
|
|
|
43
44
|
import { MForm } from '@tmagic/form';
|
|
44
45
|
import type { MNode } from '@tmagic/schema';
|
|
45
46
|
|
|
47
|
+
import MIcon from '@editor/components/Icon.vue';
|
|
46
48
|
import { useEditorContentHeight } from '@editor/hooks/use-editor-content-height';
|
|
47
49
|
import type { PropsPanelSlots, Services } from '@editor/type';
|
|
48
50
|
|
|
@@ -111,8 +111,8 @@
|
|
|
111
111
|
:key="config.$key ?? index"
|
|
112
112
|
v-if="floatBoxStates[config.$key]?.status"
|
|
113
113
|
v-model:visible="floatBoxStates[config.$key].status"
|
|
114
|
-
:
|
|
115
|
-
:
|
|
114
|
+
v-model:height="columnLeftHeight"
|
|
115
|
+
:width="columnLeftWidth"
|
|
116
116
|
:title="config.text"
|
|
117
117
|
:position="{
|
|
118
118
|
left: floatBoxStates[config.$key].left,
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
<div class="m-editor-slide-list-box">
|
|
124
124
|
<component
|
|
125
125
|
v-if="config && floatBoxStates[config.$key].status"
|
|
126
|
-
:is="config.
|
|
127
|
-
v-bind="config.
|
|
126
|
+
:is="config.component"
|
|
127
|
+
v-bind="config.props || {}"
|
|
128
128
|
v-on="config?.listeners || {}"
|
|
129
129
|
/>
|
|
130
130
|
</div>
|
|
@@ -140,6 +140,7 @@ import { Coin, EditPen, Goods, List } from '@element-plus/icons-vue';
|
|
|
140
140
|
|
|
141
141
|
import FloatingBox from '@editor/components/FloatingBox.vue';
|
|
142
142
|
import MIcon from '@editor/components/Icon.vue';
|
|
143
|
+
import { useEditorContentHeight } from '@editor/hooks/use-editor-content-height';
|
|
143
144
|
import { useFloatBox } from '@editor/hooks/use-float-box';
|
|
144
145
|
import {
|
|
145
146
|
ColumnLayout,
|
|
@@ -176,7 +177,8 @@ const props = withDefaults(
|
|
|
176
177
|
|
|
177
178
|
const services = inject<Services>('services');
|
|
178
179
|
|
|
179
|
-
const
|
|
180
|
+
const columnLeftWidth = computed(() => services?.uiService.get('columnWidth')[ColumnLayout.LEFT] || 0);
|
|
181
|
+
const { height: columnLeftHeight } = useEditorContentHeight();
|
|
180
182
|
|
|
181
183
|
const activeTabName = ref(props.data?.status);
|
|
182
184
|
|
|
@@ -209,11 +211,6 @@ const getItemConfig = (data: SideItem): SideComponent => {
|
|
|
209
211
|
text: '代码编辑',
|
|
210
212
|
component: CodeBlockListPanel,
|
|
211
213
|
slots: {},
|
|
212
|
-
boxComponentConfig: {
|
|
213
|
-
props: {
|
|
214
|
-
slideType: 'box',
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
214
|
},
|
|
218
215
|
'data-source': {
|
|
219
216
|
$key: 'data-source',
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
ref="codeBlockEditor"
|
|
24
24
|
:disabled="!editable"
|
|
25
25
|
:content="codeConfig"
|
|
26
|
-
:slideType="slideType"
|
|
27
26
|
@submit="submitCodeBlockHandler"
|
|
28
27
|
></CodeBlockEditor>
|
|
29
28
|
</template>
|
|
@@ -37,7 +36,7 @@ import type { Id } from '@tmagic/schema';
|
|
|
37
36
|
import CodeBlockEditor from '@editor/components/CodeBlockEditor.vue';
|
|
38
37
|
import SearchInput from '@editor/components/SearchInput.vue';
|
|
39
38
|
import { useCodeBlockEdit } from '@editor/hooks/use-code-block-edit';
|
|
40
|
-
import type { CodeBlockListPanelSlots, CodeDeleteErrorType, Services
|
|
39
|
+
import type { CodeBlockListPanelSlots, CodeDeleteErrorType, Services } from '@editor/type';
|
|
41
40
|
|
|
42
41
|
import CodeBlockList from './CodeBlockList.vue';
|
|
43
42
|
|
|
@@ -49,7 +48,6 @@ defineOptions({
|
|
|
49
48
|
|
|
50
49
|
defineProps<{
|
|
51
50
|
customError?: (id: Id, errorType: CodeDeleteErrorType) => any;
|
|
52
|
-
slideType?: SlideType;
|
|
53
51
|
}>();
|
|
54
52
|
|
|
55
53
|
const { codeBlockService } = inject<Services>('services') || {};
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
:close-on-press-escape="false"
|
|
2
|
+
<FloatingBox
|
|
3
|
+
v-model:visible="boxVisible"
|
|
4
|
+
v-model:width="width"
|
|
5
|
+
v-model:height="editorHeight"
|
|
7
6
|
:title="title"
|
|
8
|
-
:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
:position="boxPosition"
|
|
8
|
+
>
|
|
9
|
+
<template #body>
|
|
10
|
+
<MFormBox
|
|
11
|
+
label-width="80px"
|
|
12
|
+
:title="title"
|
|
13
|
+
:config="dataSourceConfig"
|
|
14
|
+
:values="initValues"
|
|
15
|
+
:disabled="disabled"
|
|
16
|
+
style="height: 100%"
|
|
17
|
+
@submit="submitHandler"
|
|
18
|
+
@error="errorHandler"
|
|
19
|
+
></MFormBox>
|
|
20
|
+
</template>
|
|
21
|
+
</FloatingBox>
|
|
15
22
|
</template>
|
|
16
23
|
|
|
17
24
|
<script setup lang="ts">
|
|
18
|
-
import {
|
|
25
|
+
import { inject, Ref, ref, watchEffect } from 'vue';
|
|
19
26
|
|
|
20
27
|
import { tMagicMessage } from '@tmagic/design';
|
|
21
|
-
import { FormConfig, MFormBox
|
|
28
|
+
import { FormConfig, MFormBox } from '@tmagic/form';
|
|
22
29
|
import { DataSourceSchema } from '@tmagic/schema';
|
|
23
30
|
|
|
24
|
-
import
|
|
31
|
+
import FloatingBox from '@editor/components/FloatingBox.vue';
|
|
32
|
+
import { useEditorContentHeight } from '@editor/hooks';
|
|
33
|
+
import { useNextFloatBoxPosition } from '@editor/hooks/use-next-float-box-position';
|
|
34
|
+
import type { Services } from '@editor/type';
|
|
25
35
|
|
|
26
36
|
defineOptions({
|
|
27
37
|
name: 'MEditorDataSourceConfigPanel',
|
|
@@ -31,20 +41,23 @@ const props = defineProps<{
|
|
|
31
41
|
title?: string;
|
|
32
42
|
values: any;
|
|
33
43
|
disabled: boolean;
|
|
34
|
-
slideType?: SlideType;
|
|
35
44
|
}>();
|
|
36
45
|
|
|
46
|
+
const boxVisible = defineModel<boolean>('visible', { default: false });
|
|
47
|
+
const width = defineModel<number>('width', { default: 670 });
|
|
48
|
+
|
|
37
49
|
const emit = defineEmits(['submit']);
|
|
38
50
|
|
|
39
51
|
const services = inject<Services>('services');
|
|
40
52
|
|
|
41
|
-
const size = computed(() => globalThis.document.body.clientWidth - (services?.uiService.get('columnWidth').left || 0));
|
|
42
|
-
|
|
43
|
-
const fomDrawer = ref<InstanceType<typeof MFormDrawer>>();
|
|
44
|
-
|
|
45
53
|
const initValues = ref<Partial<DataSourceSchema>>({});
|
|
46
54
|
const dataSourceConfig = ref<FormConfig>([]);
|
|
47
55
|
|
|
56
|
+
const { height: editorHeight } = useEditorContentHeight();
|
|
57
|
+
|
|
58
|
+
const parentFloating = inject<Ref<HTMLDivElement | null>>('parentFloating', ref(null));
|
|
59
|
+
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
60
|
+
|
|
48
61
|
watchEffect(() => {
|
|
49
62
|
initValues.value = props.values;
|
|
50
63
|
dataSourceConfig.value = services?.dataSourceService.getFormConfig(initValues.value.type) || [];
|
|
@@ -60,11 +73,12 @@ const errorHandler = (error: any) => {
|
|
|
60
73
|
|
|
61
74
|
defineExpose({
|
|
62
75
|
show() {
|
|
63
|
-
|
|
76
|
+
calcBoxPosition();
|
|
77
|
+
boxVisible.value = true;
|
|
64
78
|
},
|
|
65
79
|
|
|
66
80
|
hide() {
|
|
67
|
-
|
|
81
|
+
boxVisible.value = false;
|
|
68
82
|
},
|
|
69
83
|
});
|
|
70
84
|
</script>
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
:disabled="!editable"
|
|
34
34
|
:values="dataSourceValues"
|
|
35
35
|
:title="dialogTitle"
|
|
36
|
-
:slideType="slideType"
|
|
37
36
|
@submit="submitDataSourceHandler"
|
|
38
37
|
></DataSourceConfigPanel>
|
|
39
38
|
</template>
|
|
@@ -47,7 +46,7 @@ import type { DataSourceSchema } from '@tmagic/schema';
|
|
|
47
46
|
|
|
48
47
|
import SearchInput from '@editor/components/SearchInput.vue';
|
|
49
48
|
import ToolButton from '@editor/components/ToolButton.vue';
|
|
50
|
-
import type { DataSourceListSlots, Services
|
|
49
|
+
import type { DataSourceListSlots, Services } from '@editor/type';
|
|
51
50
|
|
|
52
51
|
import DataSourceConfigPanel from './DataSourceConfigPanel.vue';
|
|
53
52
|
import DataSourceList from './DataSourceList.vue';
|
|
@@ -58,10 +57,6 @@ defineOptions({
|
|
|
58
57
|
name: 'MEditorDataSourceListPanel',
|
|
59
58
|
});
|
|
60
59
|
|
|
61
|
-
defineProps<{
|
|
62
|
-
slideType?: SlideType;
|
|
63
|
-
}>();
|
|
64
|
-
|
|
65
60
|
const { dataSourceService } = inject<Services>('services') || {};
|
|
66
61
|
|
|
67
62
|
const editDialog = ref<InstanceType<typeof DataSourceConfigPanel>>();
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="stageOverlayVisible" class="m-editor-stage-overlay" @click="closeOverlayHandler">
|
|
3
|
-
<TMagicIcon class="m-editor-stage-overlay-close" :size="20" @click="closeOverlayHandler"
|
|
3
|
+
<TMagicIcon class="m-editor-stage-overlay-close" :size="'20'" @click="closeOverlayHandler"
|
|
4
|
+
><CloseBold
|
|
5
|
+
/></TMagicIcon>
|
|
4
6
|
<div ref="stageOverlay" class="m-editor-stage-overlay-container" :style="style" @click.stop></div>
|
|
5
7
|
</div>
|
|
6
8
|
</template>
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
.m-editor-code-block-list {
|
|
2
|
-
height: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.m-fields-code-select {
|
|
6
2
|
width: 100%;
|
|
7
3
|
.el-card__header {
|
|
8
4
|
display: none;
|
|
9
5
|
}
|
|
10
6
|
}
|
|
11
|
-
|
|
12
|
-
.m-editor-code-block-editor {
|
|
13
|
-
.tmagic-design-table {
|
|
14
|
-
height: 180px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.el-drawer__body {
|
|
18
|
-
padding: 10px 20px;
|
|
19
|
-
}
|
|
20
|
-
}
|
package/src/theme/icon.scss
CHANGED
package/src/theme/sidebar.scss
CHANGED
|
@@ -50,10 +50,6 @@
|
|
|
50
50
|
overflow: auto;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.tmagic-design-scrollbar {
|
|
54
|
-
height: 100%;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
53
|
.fold-icon {
|
|
58
54
|
position: absolute;
|
|
59
55
|
bottom: 8px;
|
|
@@ -72,9 +68,6 @@
|
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
.m-editor-slide-list-box {
|
|
75
|
-
display: flex;
|
|
76
|
-
min-width: 240px;
|
|
77
|
-
min-height: 500px;
|
|
78
71
|
> div {
|
|
79
72
|
&:first-child {
|
|
80
73
|
min-width: 240px;
|
package/src/type.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { CodeBlockContent } from '@tmagic/schema';
|
|
2
|
-
import type { SlideType } from '../type';
|
|
3
2
|
declare const _default: import("vue").DefineComponent<{
|
|
4
3
|
width: import("vue").PropType<number>;
|
|
5
4
|
visible: import("vue").PropType<boolean>;
|
|
@@ -16,9 +15,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
15
|
dataSourceType: {
|
|
17
16
|
type: import("vue").PropType<string>;
|
|
18
17
|
};
|
|
19
|
-
slideType: {
|
|
20
|
-
type: import("vue").PropType<SlideType>;
|
|
21
|
-
};
|
|
22
18
|
}, {
|
|
23
19
|
show(): Promise<void>;
|
|
24
20
|
hide(): Promise<void>;
|
|
@@ -42,9 +38,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
38
|
dataSourceType: {
|
|
43
39
|
type: import("vue").PropType<string>;
|
|
44
40
|
};
|
|
45
|
-
slideType: {
|
|
46
|
-
type: import("vue").PropType<SlideType>;
|
|
47
|
-
};
|
|
48
41
|
}>> & {
|
|
49
42
|
onSubmit?: ((values: CodeBlockContent) => any) | undefined;
|
|
50
43
|
"onUpdate:width"?: ((width: number) => any) | undefined;
|
|
@@ -1,34 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
width: import("vue").PropType<number>;
|
|
3
|
+
visible: import("vue").PropType<boolean>;
|
|
4
|
+
visible1: import("vue").PropType<boolean>;
|
|
5
|
+
name: {
|
|
6
|
+
type: import("vue").PropType<string>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
values: {
|
|
10
|
+
type: import("vue").PropType<any>;
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
type: import("vue").PropType<"small" | "large" | "default">;
|
|
14
|
+
};
|
|
15
|
+
model: {
|
|
16
|
+
type: import("vue").PropType<any>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
disabled: {
|
|
20
|
+
type: import("vue").PropType<boolean>;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
config: {
|
|
24
|
+
type: import("vue").PropType<{
|
|
25
|
+
type: 'data-source-fields';
|
|
26
|
+
}>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
initValues: {
|
|
30
|
+
type: import("vue").PropType<any>;
|
|
31
|
+
};
|
|
32
|
+
lastValues: {
|
|
33
|
+
type: import("vue").PropType<Record<string, any>>;
|
|
34
|
+
};
|
|
35
|
+
prop: {
|
|
36
|
+
type: import("vue").PropType<string>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
|
+
"update:width": (width: number) => void;
|
|
41
|
+
"update:visible": (visible: boolean) => void;
|
|
42
|
+
"update:visible1": (visible1: boolean) => void;
|
|
7
43
|
change: (...args: any[]) => void;
|
|
8
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
|
+
width: import("vue").PropType<number>;
|
|
46
|
+
visible: import("vue").PropType<boolean>;
|
|
47
|
+
visible1: import("vue").PropType<boolean>;
|
|
48
|
+
name: {
|
|
49
|
+
type: import("vue").PropType<string>;
|
|
50
|
+
required: true;
|
|
51
|
+
};
|
|
52
|
+
values: {
|
|
53
|
+
type: import("vue").PropType<any>;
|
|
54
|
+
};
|
|
55
|
+
size: {
|
|
56
|
+
type: import("vue").PropType<"small" | "large" | "default">;
|
|
57
|
+
};
|
|
58
|
+
model: {
|
|
59
|
+
type: import("vue").PropType<any>;
|
|
60
|
+
required: true;
|
|
61
|
+
};
|
|
62
|
+
disabled: {
|
|
63
|
+
type: import("vue").PropType<boolean>;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
config: {
|
|
67
|
+
type: import("vue").PropType<{
|
|
68
|
+
type: 'data-source-fields';
|
|
69
|
+
}>;
|
|
70
|
+
required: true;
|
|
71
|
+
};
|
|
72
|
+
initValues: {
|
|
73
|
+
type: import("vue").PropType<any>;
|
|
74
|
+
};
|
|
75
|
+
lastValues: {
|
|
76
|
+
type: import("vue").PropType<Record<string, any>>;
|
|
77
|
+
};
|
|
78
|
+
prop: {
|
|
79
|
+
type: import("vue").PropType<string>;
|
|
80
|
+
required: true;
|
|
81
|
+
};
|
|
82
|
+
}>> & {
|
|
13
83
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
84
|
+
"onUpdate:width"?: ((width: number) => any) | undefined;
|
|
85
|
+
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
86
|
+
"onUpdate:visible1"?: ((visible1: boolean) => any) | undefined;
|
|
14
87
|
}, {
|
|
15
88
|
disabled: boolean;
|
|
16
89
|
}, {}>;
|
|
17
90
|
export default _default;
|
|
18
|
-
type __VLS_WithDefaults<P, D> = {
|
|
19
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
20
|
-
default: D[K];
|
|
21
|
-
}> : P[K];
|
|
22
|
-
};
|
|
23
|
-
type __VLS_Prettify<T> = {
|
|
24
|
-
[K in keyof T]: T[K];
|
|
25
|
-
} & {};
|
|
26
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
|
-
type __VLS_TypePropsToOption<T> = {
|
|
28
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
-
} : {
|
|
31
|
-
type: import('vue').PropType<T[K]>;
|
|
32
|
-
required: true;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
@@ -1,34 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
width: import("vue").PropType<number>;
|
|
3
|
+
visible: import("vue").PropType<boolean>;
|
|
4
|
+
name: {
|
|
5
|
+
type: import("vue").PropType<string>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
values: {
|
|
9
|
+
type: import("vue").PropType<any>;
|
|
10
|
+
};
|
|
11
|
+
size: {
|
|
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, {
|
|
39
|
+
"update:width": (width: number) => void;
|
|
40
|
+
"update:visible": (visible: boolean) => void;
|
|
7
41
|
change: (...args: any[]) => void;
|
|
8
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
42
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
width: import("vue").PropType<number>;
|
|
44
|
+
visible: import("vue").PropType<boolean>;
|
|
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
|
+
}>> & {
|
|
13
80
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
"onUpdate:width"?: ((width: number) => any) | undefined;
|
|
82
|
+
"onUpdate:visible"?: ((visible: boolean) => any) | undefined;
|
|
14
83
|
}, {
|
|
15
84
|
disabled: boolean;
|
|
16
85
|
}, {}>;
|
|
17
86
|
export default _default;
|
|
18
|
-
type __VLS_WithDefaults<P, D> = {
|
|
19
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
20
|
-
default: D[K];
|
|
21
|
-
}> : P[K];
|
|
22
|
-
};
|
|
23
|
-
type __VLS_Prettify<T> = {
|
|
24
|
-
[K in keyof T]: T[K];
|
|
25
|
-
} & {};
|
|
26
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
|
-
type __VLS_TypePropsToOption<T> = {
|
|
28
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
-
} : {
|
|
31
|
-
type: import('vue').PropType<T[K]>;
|
|
32
|
-
required: true;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
@@ -19,9 +19,6 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
|
|
|
19
19
|
dataSourceType: {
|
|
20
20
|
type: import("vue").PropType<string>;
|
|
21
21
|
};
|
|
22
|
-
slideType: {
|
|
23
|
-
type: import("vue").PropType<import("..").SlideType>;
|
|
24
|
-
};
|
|
25
22
|
}>> & {
|
|
26
23
|
onSubmit?: ((values: CodeBlockContent) => any) | undefined;
|
|
27
24
|
"onUpdate:width"?: ((width: number) => any) | undefined;
|
|
@@ -49,9 +46,6 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
|
|
|
49
46
|
dataSourceType: {
|
|
50
47
|
type: import("vue").PropType<string>;
|
|
51
48
|
};
|
|
52
|
-
slideType: {
|
|
53
|
-
type: import("vue").PropType<import("..").SlideType>;
|
|
54
|
-
};
|
|
55
49
|
}>> & {
|
|
56
50
|
onSubmit?: ((values: CodeBlockContent) => any) | undefined;
|
|
57
51
|
"onUpdate:width"?: ((width: number) => any) | undefined;
|
|
@@ -79,9 +73,6 @@ export declare const useCodeBlockEdit: (codeBlockService?: CodeBlockService) =>
|
|
|
79
73
|
dataSourceType: {
|
|
80
74
|
type: import("vue").PropType<string>;
|
|
81
75
|
};
|
|
82
|
-
slideType: {
|
|
83
|
-
type: import("vue").PropType<import("..").SlideType>;
|
|
84
|
-
};
|
|
85
76
|
}>> & {
|
|
86
77
|
onSubmit?: ((values: CodeBlockContent) => any) | undefined;
|
|
87
78
|
"onUpdate:width"?: ((width: number) => any) | undefined;
|