@tmagic/editor 1.8.0-manmanyu.21 → 1.8.0-manmanyu.23
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/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +56 -13
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +7 -0
- package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/layouts/history-list/useHistoryRevert.js +7 -3
- package/dist/es/layouts/props-panel/use-style-panel.js +3 -2
- package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/es/services/ui.js +3 -0
- package/dist/es/style.css +9 -1
- package/dist/es/utils/const.js +1 -1
- package/dist/style.css +9 -1
- package/dist/themes/magic-admin.css +37 -13
- package/dist/tmagic-editor.umd.cjs +114 -25
- package/package.json +7 -7
- package/src/components/CodeBlockEditor.vue +3 -0
- package/src/components/CompareForm.vue +7 -0
- package/src/components/FloatingBox.vue +71 -7
- package/src/fields/DataSourceFields.vue +5 -0
- package/src/fields/DataSourceMocks.vue +3 -0
- package/src/layouts/Framework.vue +7 -6
- package/src/layouts/history-list/HistoryDiffDialog.vue +11 -1
- package/src/layouts/history-list/useHistoryRevert.ts +4 -0
- package/src/layouts/props-panel/use-style-panel.ts +4 -3
- package/src/layouts/sidebar/Sidebar.vue +2 -0
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +3 -0
- package/src/layouts/workspace/viewer/NodeListMenu.vue +4 -1
- package/src/services/ui.ts +6 -0
- package/src/theme/floating-box.scss +9 -1
- package/src/theme/themes/magic-admin/index.scss +44 -18
- package/src/type.ts +12 -0
- package/src/utils/const.ts +2 -2
- package/types/index.d.ts +26 -4
|
@@ -120,6 +120,7 @@ var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
120
120
|
changedValue.value = void 0;
|
|
121
121
|
};
|
|
122
122
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
|
|
123
|
+
const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
|
|
123
124
|
watch(boxVisible, (visible) => {
|
|
124
125
|
nextTick(() => {
|
|
125
126
|
if (!visible) emit("close");
|
|
@@ -145,7 +146,9 @@ var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
145
146
|
"onUpdate:width": _cache[2] || (_cache[2] = ($event) => width.value = $event),
|
|
146
147
|
height: unref(codeBlockEditorHeight),
|
|
147
148
|
"onUpdate:height": _cache[3] || (_cache[3] = ($event) => isRef(codeBlockEditorHeight) ? codeBlockEditorHeight.value = $event : null),
|
|
149
|
+
"body-style": { padding: "0 16px" },
|
|
148
150
|
title: __props.content.name ? `${__props.disabled ? "查看" : "编辑"}${__props.content.name}` : "新增代码",
|
|
151
|
+
"framework-width": frameworkWidth.value,
|
|
149
152
|
position: unref(boxPosition),
|
|
150
153
|
"before-close": beforeClose
|
|
151
154
|
}, {
|
|
@@ -187,6 +190,7 @@ var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
187
190
|
"width",
|
|
188
191
|
"height",
|
|
189
192
|
"title",
|
|
193
|
+
"framework-width",
|
|
190
194
|
"position"
|
|
191
195
|
]),
|
|
192
196
|
(openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(unref(TMagicDialog), {
|
|
@@ -21,6 +21,7 @@ var CompareForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
21
21
|
},
|
|
22
22
|
baseFormState: {},
|
|
23
23
|
selfDiffFieldTypes: {},
|
|
24
|
+
size: {},
|
|
24
25
|
loadConfig: {},
|
|
25
26
|
services: {}
|
|
26
27
|
},
|
|
@@ -181,13 +182,15 @@ var CompareForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
181
182
|
"label-width": __props.labelWidth,
|
|
182
183
|
"extend-state": mergedExtendState,
|
|
183
184
|
"show-diff": showDiff,
|
|
184
|
-
"self-diff-field-types": __props.selfDiffFieldTypes
|
|
185
|
+
"self-diff-field-types": __props.selfDiffFieldTypes,
|
|
186
|
+
size: __props.size
|
|
185
187
|
}, null, 8, [
|
|
186
188
|
"config",
|
|
187
189
|
"init-values",
|
|
188
190
|
"last-values",
|
|
189
191
|
"label-width",
|
|
190
|
-
"self-diff-field-types"
|
|
192
|
+
"self-diff-field-types",
|
|
193
|
+
"size"
|
|
191
194
|
])) : createCommentVNode("v-if", true)], 4);
|
|
192
195
|
};
|
|
193
196
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { useServices } from "../hooks/use-services.js";
|
|
2
1
|
import Icon_default from "./Icon.js";
|
|
3
2
|
import { TMagicButton, useThemeClass, useZIndex } from "@tmagic/design";
|
|
4
|
-
import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeModels,
|
|
3
|
+
import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeStyle, onBeforeUnmount, openBlock, provide, ref, renderSlot, toDisplayString, unref, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
5
4
|
import { Close } from "@element-plus/icons-vue";
|
|
6
5
|
import VanillaMoveable from "moveable";
|
|
7
6
|
//#region packages/editor/src/components/FloatingBox.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -17,6 +16,9 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
17
16
|
top: 0
|
|
18
17
|
}) },
|
|
19
18
|
title: { default: "" },
|
|
19
|
+
bodyStyle: {},
|
|
20
|
+
initialStyle: { default: () => ({}) },
|
|
21
|
+
frameworkWidth: { default: 0 },
|
|
20
22
|
beforeClose: {}
|
|
21
23
|
}, {
|
|
22
24
|
"width": { default: 0 },
|
|
@@ -54,19 +56,51 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
54
56
|
if (targetEl.value) return targetEl.value.clientHeight - titleHeight.value;
|
|
55
57
|
return "auto";
|
|
56
58
|
});
|
|
57
|
-
const { uiService } = useServices();
|
|
58
|
-
const frameworkWidth = computed(() => uiService.get("frameworkRect").width || 0);
|
|
59
59
|
const style = computed(() => {
|
|
60
60
|
let { left } = props.position;
|
|
61
|
-
|
|
61
|
+
const frameworkWidth = props.frameworkWidth || globalThis.window?.innerWidth || 0;
|
|
62
|
+
if (width.value && frameworkWidth) left = left + width.value > frameworkWidth ? frameworkWidth - width.value : left;
|
|
62
63
|
return {
|
|
63
64
|
left: `${left}px`,
|
|
64
65
|
top: `${props.position.top}px`,
|
|
65
66
|
width: width.value ? `${width.value}px` : "auto",
|
|
66
|
-
height: height.value ? `${height.value}px` : "auto"
|
|
67
|
+
height: height.value ? `${height.value}px` : "auto",
|
|
68
|
+
...props.initialStyle
|
|
67
69
|
};
|
|
68
70
|
});
|
|
69
71
|
let moveable = null;
|
|
72
|
+
let dragMask = null;
|
|
73
|
+
let dragMaskVisible = false;
|
|
74
|
+
const bindDragMaskSafety = () => {
|
|
75
|
+
globalThis.window?.addEventListener("pointerup", hideDragMask, true);
|
|
76
|
+
globalThis.window?.addEventListener("blur", hideDragMask);
|
|
77
|
+
globalThis.document?.addEventListener("visibilitychange", hideDragMask);
|
|
78
|
+
};
|
|
79
|
+
const unbindDragMaskSafety = () => {
|
|
80
|
+
globalThis.window?.removeEventListener("pointerup", hideDragMask, true);
|
|
81
|
+
globalThis.window?.removeEventListener("blur", hideDragMask);
|
|
82
|
+
globalThis.document?.removeEventListener("visibilitychange", hideDragMask);
|
|
83
|
+
};
|
|
84
|
+
const showDragMask = () => {
|
|
85
|
+
if (dragMaskVisible) return;
|
|
86
|
+
if (!dragMask) {
|
|
87
|
+
dragMask = globalThis.document.createElement("div");
|
|
88
|
+
dragMask.className = "m-editor-float-box-drag-mask";
|
|
89
|
+
}
|
|
90
|
+
globalThis.document.body.appendChild(dragMask);
|
|
91
|
+
dragMaskVisible = true;
|
|
92
|
+
bindDragMaskSafety();
|
|
93
|
+
const setMaskZIndex = () => {
|
|
94
|
+
if (dragMask) dragMask.style.zIndex = `${curZIndex.value + 1}`;
|
|
95
|
+
};
|
|
96
|
+
setMaskZIndex();
|
|
97
|
+
nextTick(setMaskZIndex);
|
|
98
|
+
};
|
|
99
|
+
const hideDragMask = () => {
|
|
100
|
+
unbindDragMaskSafety();
|
|
101
|
+
dragMask?.parentNode?.removeChild(dragMask);
|
|
102
|
+
dragMaskVisible = false;
|
|
103
|
+
};
|
|
70
104
|
const initMoveable = () => {
|
|
71
105
|
moveable = new VanillaMoveable(globalThis.document.body, {
|
|
72
106
|
className: "m-editor-floating-box-moveable",
|
|
@@ -89,6 +123,10 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
89
123
|
position: "css"
|
|
90
124
|
}
|
|
91
125
|
});
|
|
126
|
+
moveable.on("drag", showDragMask);
|
|
127
|
+
moveable.on("resize", showDragMask);
|
|
128
|
+
moveable.on("dragEnd", hideDragMask);
|
|
129
|
+
moveable.on("resizeEnd", hideDragMask);
|
|
92
130
|
moveable.on("drag", (e) => {
|
|
93
131
|
e.target.style.transform = e.transform;
|
|
94
132
|
});
|
|
@@ -101,6 +139,7 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
101
139
|
});
|
|
102
140
|
};
|
|
103
141
|
const destroyMoveable = () => {
|
|
142
|
+
hideDragMask();
|
|
104
143
|
moveable?.destroy();
|
|
105
144
|
moveable = null;
|
|
106
145
|
};
|
|
@@ -140,15 +179,16 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
140
179
|
return visible.value ? (openBlock(), createBlock(Teleport, {
|
|
141
180
|
key: 0,
|
|
142
181
|
to: "body"
|
|
143
|
-
}, [createElementVNode("div", {
|
|
182
|
+
}, [createElementVNode("div", mergeProps({
|
|
144
183
|
ref: "target",
|
|
145
|
-
class:
|
|
146
|
-
|
|
184
|
+
class: ["m-editor-float-box", unref(themeClass)]
|
|
185
|
+
}, _ctx.$attrs, {
|
|
186
|
+
style: {
|
|
147
187
|
...style.value,
|
|
148
188
|
zIndex: curZIndex.value
|
|
149
|
-
}
|
|
189
|
+
},
|
|
150
190
|
onMousedown: nextZIndex
|
|
151
|
-
}, [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, () => [createElementVNode("span", null, toDisplayString(__props.title), 1)]), createElementVNode("div", null, [createVNode(unref(TMagicButton), {
|
|
191
|
+
}), [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, () => [createElementVNode("span", null, toDisplayString(__props.title), 1)]), createElementVNode("div", null, [createVNode(unref(TMagicButton), {
|
|
152
192
|
link: "",
|
|
153
193
|
size: "small",
|
|
154
194
|
onClick: closeHandler
|
|
@@ -157,8 +197,11 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
157
197
|
_: 1
|
|
158
198
|
})])], 512), createElementVNode("div", {
|
|
159
199
|
class: "m-editor-float-box-body",
|
|
160
|
-
style: normalizeStyle({
|
|
161
|
-
|
|
200
|
+
style: normalizeStyle({
|
|
201
|
+
height: `${bodyHeight.value}px`,
|
|
202
|
+
...__props.bodyStyle
|
|
203
|
+
})
|
|
204
|
+
}, [renderSlot(_ctx.$slots, "body")], 4)], 16)])) : createCommentVNode("v-if", true);
|
|
162
205
|
};
|
|
163
206
|
}
|
|
164
207
|
});
|
|
@@ -316,6 +316,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
316
316
|
const addFromJsonDialogVisible = useModel(__props, "visible1");
|
|
317
317
|
const { height: editorHeight } = useEditorContentHeight();
|
|
318
318
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
|
|
319
|
+
const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
|
|
319
320
|
/**
|
|
320
321
|
* 由 DataSourceConfigPanel 注入:打开数据源详情后需要直接打开的字段路径(字段名数组)。
|
|
321
322
|
* 当前层消费 path[0],并把剩余路径下发给嵌套字段,实现逐层打开。
|
|
@@ -356,6 +357,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
356
357
|
_: 1
|
|
357
358
|
}, 8, ["disabled"])])) : createCommentVNode("v-if", true),
|
|
358
359
|
createVNode(FloatingBox_default, {
|
|
360
|
+
"body-style": { padding: "0 16px" },
|
|
359
361
|
visible: addDialogVisible.value,
|
|
360
362
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => addDialogVisible.value = $event),
|
|
361
363
|
width: width.value,
|
|
@@ -363,6 +365,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
363
365
|
height: unref(editorHeight),
|
|
364
366
|
"onUpdate:height": _cache[4] || (_cache[4] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
|
|
365
367
|
title: fieldTitle.value,
|
|
368
|
+
"framework-width": frameworkWidth.value,
|
|
366
369
|
position: unref(boxPosition)
|
|
367
370
|
}, {
|
|
368
371
|
body: withCtx(() => [createVNode(unref(MFormBox), {
|
|
@@ -385,9 +388,11 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
385
388
|
"width",
|
|
386
389
|
"height",
|
|
387
390
|
"title",
|
|
391
|
+
"framework-width",
|
|
388
392
|
"position"
|
|
389
393
|
]),
|
|
390
394
|
createVNode(FloatingBox_default, {
|
|
395
|
+
"body-style": { padding: "0 16px" },
|
|
391
396
|
visible: addFromJsonDialogVisible.value,
|
|
392
397
|
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => addFromJsonDialogVisible.value = $event),
|
|
393
398
|
width: width.value,
|
|
@@ -395,6 +400,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
395
400
|
height: unref(editorHeight),
|
|
396
401
|
"onUpdate:height": _cache[7] || (_cache[7] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
|
|
397
402
|
title: "快速添加数据定义",
|
|
403
|
+
"framework-width": frameworkWidth.value,
|
|
398
404
|
position: unref(boxPosition)
|
|
399
405
|
}, {
|
|
400
406
|
body: withCtx(() => [createVNode(unref(MFormBox), {
|
|
@@ -408,6 +414,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
408
414
|
"visible",
|
|
409
415
|
"width",
|
|
410
416
|
"height",
|
|
417
|
+
"framework-width",
|
|
411
418
|
"position"
|
|
412
419
|
])
|
|
413
420
|
]);
|
|
@@ -216,6 +216,7 @@ var DataSourceMocks_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
216
216
|
const addDialogVisible = useModel(__props, "visible");
|
|
217
217
|
const { height: editorHeight } = useEditorContentHeight();
|
|
218
218
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
|
|
219
|
+
const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
|
|
219
220
|
return (_ctx, _cache) => {
|
|
220
221
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
221
222
|
createVNode(unref(MagicTable), {
|
|
@@ -233,6 +234,7 @@ var DataSourceMocks_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
233
234
|
_: 1
|
|
234
235
|
}, 8, ["disabled"])])) : createCommentVNode("v-if", true),
|
|
235
236
|
createVNode(FloatingBox_default, {
|
|
237
|
+
"body-style": { padding: "0 16px" },
|
|
236
238
|
visible: addDialogVisible.value,
|
|
237
239
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => addDialogVisible.value = $event),
|
|
238
240
|
width: width.value,
|
|
@@ -240,6 +242,7 @@ var DataSourceMocks_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
240
242
|
height: unref(editorHeight),
|
|
241
243
|
"onUpdate:height": _cache[3] || (_cache[3] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
|
|
242
244
|
title: drawerTitle.value,
|
|
245
|
+
"framework-width": frameworkWidth.value,
|
|
243
246
|
position: unref(boxPosition)
|
|
244
247
|
}, {
|
|
245
248
|
body: withCtx(() => [createVNode(unref(MFormBox), {
|
|
@@ -260,6 +263,7 @@ var DataSourceMocks_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
260
263
|
"width",
|
|
261
264
|
"height",
|
|
262
265
|
"title",
|
|
266
|
+
"framework-width",
|
|
263
267
|
"position"
|
|
264
268
|
])
|
|
265
269
|
]);
|
|
@@ -29,6 +29,9 @@ var Framework_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
29
29
|
const pageLength = computed(() => editorService.get("pageLength") || 0);
|
|
30
30
|
const showSrc = computed(() => uiService.get("showSrc"));
|
|
31
31
|
const columnWidth = computed(() => uiService.get("columnWidth"));
|
|
32
|
+
const minLeftColumnWidth = computed(() => uiService.get("minLeftColumnWidth"));
|
|
33
|
+
const minCenterColumnWidth = computed(() => uiService.get("minCenterColumnWidth"));
|
|
34
|
+
const minRightColumnWidth = computed(() => uiService.get("minRightColumnWidth"));
|
|
32
35
|
watch(pageLength, () => {
|
|
33
36
|
splitViewRef.value?.updateWidth();
|
|
34
37
|
});
|
|
@@ -95,9 +98,9 @@ var Framework_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
95
98
|
"right-class": "m-editor-framework-right",
|
|
96
99
|
left: __props.hideSidebar ? void 0 : columnWidth.value.left,
|
|
97
100
|
right: columnWidth.value.right,
|
|
98
|
-
"min-left": __props.hideSidebar ? 0 :
|
|
99
|
-
"min-right":
|
|
100
|
-
"min-center":
|
|
101
|
+
"min-left": __props.hideSidebar ? 0 : minLeftColumnWidth.value,
|
|
102
|
+
"min-right": minRightColumnWidth.value,
|
|
103
|
+
"min-center": minCenterColumnWidth.value,
|
|
101
104
|
width: frameworkRect.value.width,
|
|
102
105
|
onChange: columnWidthChange
|
|
103
106
|
}, createSlots({
|
package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -28,6 +28,7 @@ var HistoryDiffDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
28
28
|
extendState: {},
|
|
29
29
|
loadConfig: {},
|
|
30
30
|
width: { default: "900px" },
|
|
31
|
+
size: {},
|
|
31
32
|
isConfirm: { type: Boolean },
|
|
32
33
|
onConfirm: {},
|
|
33
34
|
selfDiffFieldTypes: {},
|
|
@@ -258,6 +259,7 @@ var HistoryDiffDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
258
259
|
"load-config": __props.loadConfig,
|
|
259
260
|
"self-diff-field-types": __props.selfDiffFieldTypes,
|
|
260
261
|
services: props.services,
|
|
262
|
+
size: props.size,
|
|
261
263
|
height: "70vh"
|
|
262
264
|
}, null, 8, [
|
|
263
265
|
"category",
|
|
@@ -269,7 +271,8 @@ var HistoryDiffDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
269
271
|
"extend-state",
|
|
270
272
|
"load-config",
|
|
271
273
|
"self-diff-field-types",
|
|
272
|
-
"services"
|
|
274
|
+
"services",
|
|
275
|
+
"size"
|
|
273
276
|
])) : (openBlock(), createBlock(CodeEditor_default, {
|
|
274
277
|
key: 2,
|
|
275
278
|
type: "diff",
|
|
@@ -48,6 +48,7 @@ var mountHistoryDiffDialog = async (options) => {
|
|
|
48
48
|
selfDiffFieldTypes: options.selfDiffFieldTypes,
|
|
49
49
|
compareFormState: options.compareFormState,
|
|
50
50
|
width: options.width,
|
|
51
|
+
size: options.size ?? options.services?.uiService?.get("propsPanelSize"),
|
|
51
52
|
onClose: options.onClose
|
|
52
53
|
});
|
|
53
54
|
if (options.appContext) Object.assign(app._context, options.appContext);
|
|
@@ -148,7 +149,8 @@ var useHistoryRevert = (options = {}, services) => {
|
|
|
148
149
|
extendState,
|
|
149
150
|
services,
|
|
150
151
|
...extra,
|
|
151
|
-
width: extra?.width ?? dialogWidth
|
|
152
|
+
width: extra?.width ?? dialogWidth,
|
|
153
|
+
size: extra?.size
|
|
152
154
|
});
|
|
153
155
|
return confirmRevert();
|
|
154
156
|
};
|
|
@@ -275,7 +277,8 @@ var useHistoryRevert = (options = {}, services) => {
|
|
|
275
277
|
if (!await runRevert(revertOptions.diffPayload ?? null, {
|
|
276
278
|
loadConfig: revertOptions.loadConfig,
|
|
277
279
|
selfDiffFieldTypes: revertOptions.selfDiffFieldTypes,
|
|
278
|
-
width: revertOptions.width
|
|
280
|
+
width: revertOptions.width,
|
|
281
|
+
size: revertOptions.size
|
|
279
282
|
})) return null;
|
|
280
283
|
return await revertOptions.revert();
|
|
281
284
|
};
|
|
@@ -289,7 +292,8 @@ var useHistoryRevert = (options = {}, services) => {
|
|
|
289
292
|
extendState,
|
|
290
293
|
services,
|
|
291
294
|
...extra,
|
|
292
|
-
width: extra?.width ?? dialogWidth
|
|
295
|
+
width: extra?.width ?? dialogWidth,
|
|
296
|
+
size: extra?.size
|
|
293
297
|
});
|
|
294
298
|
};
|
|
295
299
|
return {
|
|
@@ -23,8 +23,9 @@ var useStylePanel = ({ uiService, storageService }, propsPanelWidth) => {
|
|
|
23
23
|
columnWidth.center += propsPanelWidth.value;
|
|
24
24
|
}
|
|
25
25
|
if (columnWidth.center < 0) {
|
|
26
|
-
|
|
27
|
-
columnWidth.
|
|
26
|
+
const minCenterColumnWidth = uiService.get("minCenterColumnWidth");
|
|
27
|
+
columnWidth.right = columnWidth.right + columnWidth.center - minCenterColumnWidth;
|
|
28
|
+
columnWidth.center = minCenterColumnWidth;
|
|
28
29
|
propsPanelWidth.value = columnWidth.right / 2;
|
|
29
30
|
}
|
|
30
31
|
storageService.setItem(RIGHT_COLUMN_WIDTH_STORAGE_KEY, columnWidth.right, { protocol: Protocol.NUMBER });
|
|
@@ -61,6 +61,7 @@ var Sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
61
61
|
const taskLength = computed(() => depService.get("taskLength"));
|
|
62
62
|
const tipsBarVisible = ref(true);
|
|
63
63
|
const columnLeftWidth = computed(() => uiService.get("columnWidth")[ColumnLayout.LEFT]);
|
|
64
|
+
const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
|
|
64
65
|
const { height: editorContentHeight } = useEditorContentHeight();
|
|
65
66
|
const columnLeftHeight = ref(0);
|
|
66
67
|
const unWatchEditorContentHeight = watch(editorContentHeight, (height) => {
|
|
@@ -301,6 +302,7 @@ var Sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
301
302
|
"onUpdate:height": _cache[2] || (_cache[2] = ($event) => columnLeftHeight.value = $event),
|
|
302
303
|
width: columnLeftWidth.value,
|
|
303
304
|
title: config.text,
|
|
305
|
+
"framework-width": frameworkWidth.value,
|
|
304
306
|
position: {
|
|
305
307
|
left: unref(floatBoxStates)[config.$key].left,
|
|
306
308
|
top: unref(floatBoxStates)[config.$key].top
|
|
@@ -317,6 +319,7 @@ var Sidebar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
317
319
|
"height",
|
|
318
320
|
"width",
|
|
319
321
|
"title",
|
|
322
|
+
"framework-width",
|
|
320
323
|
"position"
|
|
321
324
|
])) : createCommentVNode("v-if", true)], 64);
|
|
322
325
|
}), 256))]))], 64);
|
|
@@ -39,6 +39,7 @@ var DataSourceConfigPanel_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
39
39
|
const dataSourceConfig = ref([]);
|
|
40
40
|
const { height: editorHeight } = useEditorContentHeight();
|
|
41
41
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
|
|
42
|
+
const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
|
|
42
43
|
/** 供「方法定义」tab 内的字段消费,用于打开数据源详情后自动打开指定方法 */
|
|
43
44
|
provide("editingDataSourceMethodName", computed(() => props.editMethodName));
|
|
44
45
|
/** 供「数据定义」tab 内的字段消费,用于打开数据源详情后自动打开指定字段 */
|
|
@@ -77,6 +78,7 @@ var DataSourceConfigPanel_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
77
78
|
});
|
|
78
79
|
return (_ctx, _cache) => {
|
|
79
80
|
return openBlock(), createBlock(FloatingBox_default, {
|
|
81
|
+
"body-style": { padding: "0 16px" },
|
|
80
82
|
visible: boxVisible.value,
|
|
81
83
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => boxVisible.value = $event),
|
|
82
84
|
width: width.value,
|
|
@@ -84,6 +86,7 @@ var DataSourceConfigPanel_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
84
86
|
height: unref(editorHeight),
|
|
85
87
|
"onUpdate:height": _cache[2] || (_cache[2] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
|
|
86
88
|
title: __props.title,
|
|
89
|
+
"framework-width": frameworkWidth.value,
|
|
87
90
|
position: unref(boxPosition)
|
|
88
91
|
}, {
|
|
89
92
|
body: withCtx(() => [createVNode(unref(MFormBox), {
|
|
@@ -107,6 +110,7 @@ var DataSourceConfigPanel_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
107
110
|
"width",
|
|
108
111
|
"height",
|
|
109
112
|
"title",
|
|
113
|
+
"framework-width",
|
|
110
114
|
"position"
|
|
111
115
|
]);
|
|
112
116
|
};
|
package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -11,7 +11,8 @@ var NodeListMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
11
11
|
__name: "NodeListMenu",
|
|
12
12
|
setup(__props) {
|
|
13
13
|
const services = useServices();
|
|
14
|
-
const { editorService } = services;
|
|
14
|
+
const { editorService, uiService } = services;
|
|
15
|
+
const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
|
|
15
16
|
const visible = ref(false);
|
|
16
17
|
const buttonVisible = ref(false);
|
|
17
18
|
const buttonEl = useTemplateRef("button");
|
|
@@ -71,6 +72,7 @@ var NodeListMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
71
72
|
visible: visible.value,
|
|
72
73
|
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
|
|
73
74
|
title: "当前位置下的组件",
|
|
75
|
+
"framework-width": frameworkWidth.value,
|
|
74
76
|
position: menuPosition.value
|
|
75
77
|
}, {
|
|
76
78
|
body: withCtx(() => [createVNode(Tree_default, {
|
|
@@ -80,7 +82,11 @@ var NodeListMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
80
82
|
onNodeClick: clickHandler
|
|
81
83
|
}, null, 8, ["data", "node-status-map"])]),
|
|
82
84
|
_: 1
|
|
83
|
-
}, 8, [
|
|
85
|
+
}, 8, [
|
|
86
|
+
"visible",
|
|
87
|
+
"framework-width",
|
|
88
|
+
"position"
|
|
89
|
+
])) : createCommentVNode("v-if", true)], 64);
|
|
84
90
|
};
|
|
85
91
|
}
|
|
86
92
|
});
|
package/dist/es/services/ui.js
CHANGED
|
@@ -23,6 +23,9 @@ var state = shallowReactive({
|
|
|
23
23
|
center: 0,
|
|
24
24
|
right: storage_default.getItem("$MagicEditorRightColumnWidthData", { protocol: Protocol.NUMBER }) || 480
|
|
25
25
|
},
|
|
26
|
+
minLeftColumnWidth: 260,
|
|
27
|
+
minCenterColumnWidth: 400,
|
|
28
|
+
minRightColumnWidth: 300,
|
|
26
29
|
showGuides: true,
|
|
27
30
|
hasGuides: false,
|
|
28
31
|
showRule: true,
|
package/dist/es/style.css
CHANGED
|
@@ -2260,13 +2260,21 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
2260
2260
|
.m-editor-float-box .m-editor-float-box-body {
|
|
2261
2261
|
overflow: auto;
|
|
2262
2262
|
flex: 1;
|
|
2263
|
-
padding: 0 16px;
|
|
2264
2263
|
}
|
|
2265
2264
|
|
|
2266
2265
|
.m-editor-floating-box-moveable {
|
|
2267
2266
|
opacity: 0;
|
|
2268
2267
|
}
|
|
2269
2268
|
|
|
2269
|
+
.m-editor-float-box-drag-mask {
|
|
2270
|
+
position: fixed;
|
|
2271
|
+
top: 0;
|
|
2272
|
+
left: 0;
|
|
2273
|
+
width: 100%;
|
|
2274
|
+
height: 100%;
|
|
2275
|
+
background-color: transparent;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2270
2278
|
.m-fields-page-fragment-select {
|
|
2271
2279
|
width: 100%;
|
|
2272
2280
|
}
|
package/dist/es/utils/const.js
CHANGED
|
@@ -6,7 +6,7 @@ var RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
|
6
6
|
var PROPS_PANEL_WIDTH_STORAGE_KEY = "$MagicEditorPropsPanelWidthData";
|
|
7
7
|
var DEFAULT_LEFT_COLUMN_WIDTH = 310;
|
|
8
8
|
var DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
9
|
-
var MIN_LEFT_COLUMN_WIDTH =
|
|
9
|
+
var MIN_LEFT_COLUMN_WIDTH = 260;
|
|
10
10
|
var MIN_CENTER_COLUMN_WIDTH = 400;
|
|
11
11
|
var MIN_RIGHT_COLUMN_WIDTH = 300;
|
|
12
12
|
var H_GUIDE_LINE_STORAGE_KEY = "$MagicStageHorizontalGuidelinesData";
|
package/dist/style.css
CHANGED
|
@@ -2260,13 +2260,21 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
2260
2260
|
.m-editor-float-box .m-editor-float-box-body {
|
|
2261
2261
|
overflow: auto;
|
|
2262
2262
|
flex: 1;
|
|
2263
|
-
padding: 0 16px;
|
|
2264
2263
|
}
|
|
2265
2264
|
|
|
2266
2265
|
.m-editor-floating-box-moveable {
|
|
2267
2266
|
opacity: 0;
|
|
2268
2267
|
}
|
|
2269
2268
|
|
|
2269
|
+
.m-editor-float-box-drag-mask {
|
|
2270
|
+
position: fixed;
|
|
2271
|
+
top: 0;
|
|
2272
|
+
left: 0;
|
|
2273
|
+
width: 100%;
|
|
2274
|
+
height: 100%;
|
|
2275
|
+
background-color: transparent;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2270
2278
|
.m-fields-page-fragment-select {
|
|
2271
2279
|
width: 100%;
|
|
2272
2280
|
}
|
|
@@ -2293,13 +2293,21 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
2293
2293
|
.m-editor-float-box .m-editor-float-box-body {
|
|
2294
2294
|
overflow: auto;
|
|
2295
2295
|
flex: 1;
|
|
2296
|
-
padding: 0 16px;
|
|
2297
2296
|
}
|
|
2298
2297
|
|
|
2299
2298
|
.m-editor-floating-box-moveable {
|
|
2300
2299
|
opacity: 0;
|
|
2301
2300
|
}
|
|
2302
2301
|
|
|
2302
|
+
.m-editor-float-box-drag-mask {
|
|
2303
|
+
position: fixed;
|
|
2304
|
+
top: 0;
|
|
2305
|
+
left: 0;
|
|
2306
|
+
width: 100%;
|
|
2307
|
+
height: 100%;
|
|
2308
|
+
background-color: transparent;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2303
2311
|
.m-fields-page-fragment-select {
|
|
2304
2312
|
width: 100%;
|
|
2305
2313
|
}
|
|
@@ -2753,9 +2761,12 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
2753
2761
|
}
|
|
2754
2762
|
|
|
2755
2763
|
.m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header {
|
|
2756
|
-
|
|
2757
|
-
|
|
2764
|
+
width: 61px;
|
|
2765
|
+
padding-top: 4px;
|
|
2766
|
+
flex-shrink: 0;
|
|
2767
|
+
border-right: 1px solid rgba(0, 84, 225, 0.1);
|
|
2758
2768
|
display: flex;
|
|
2769
|
+
background-color: #fff;
|
|
2759
2770
|
box-sizing: border-box;
|
|
2760
2771
|
flex-direction: column;
|
|
2761
2772
|
align-items: center;
|
|
@@ -2764,24 +2775,27 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
2764
2775
|
display: flex;
|
|
2765
2776
|
flex-direction: column;
|
|
2766
2777
|
align-items: center;
|
|
2767
|
-
|
|
2768
|
-
|
|
2778
|
+
border-radius: 4px;
|
|
2779
|
+
padding: 4px 2px;
|
|
2780
|
+
width: 52px;
|
|
2769
2781
|
margin-bottom: 4px;
|
|
2782
|
+
box-sizing: border-box;
|
|
2770
2783
|
background-color: transparent;
|
|
2784
|
+
color: #84909d;
|
|
2771
2785
|
}
|
|
2772
2786
|
.m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item:hover {
|
|
2773
|
-
background-color: rgba(0, 0, 0, 0.
|
|
2787
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
2774
2788
|
}
|
|
2775
2789
|
.m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item > i {
|
|
2776
|
-
color: #
|
|
2790
|
+
color: #84909d;
|
|
2791
|
+
font-size: 20px;
|
|
2777
2792
|
}
|
|
2778
2793
|
.m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item.is-active {
|
|
2779
|
-
background-color:
|
|
2780
|
-
border-radius: 4px;
|
|
2794
|
+
background-color: var(--el-button-hover-bg-color, rgb(230, 238, 253));
|
|
2781
2795
|
color: var(--el-color-primary);
|
|
2782
2796
|
}
|
|
2783
2797
|
.m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item.is-active:hover {
|
|
2784
|
-
background-color:
|
|
2798
|
+
background-color: var(--el-button-hover-bg-color, rgb(230, 238, 253));
|
|
2785
2799
|
}
|
|
2786
2800
|
.m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item.is-active > i {
|
|
2787
2801
|
color: var(--el-color-primary);
|
|
@@ -2790,11 +2804,17 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
2790
2804
|
color: var(--el-color-primary);
|
|
2791
2805
|
}
|
|
2792
2806
|
.m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-header .m-editor-sidebar-header-item .magic-editor-tab-panel-title {
|
|
2793
|
-
font-size:
|
|
2807
|
+
font-size: 12px;
|
|
2794
2808
|
line-height: 14px;
|
|
2795
|
-
font-weight:
|
|
2809
|
+
font-weight: 400;
|
|
2810
|
+
margin: 0 4px;
|
|
2811
|
+
width: 52px;
|
|
2812
|
+
text-align: center;
|
|
2796
2813
|
}
|
|
2797
|
-
.m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-
|
|
2814
|
+
.m-editor.m-editor--magic-admin .m-editor-sidebar .m-editor-sidebar-content {
|
|
2815
|
+
width: calc(100% - 61px);
|
|
2816
|
+
}
|
|
2817
|
+
.m-editor.m-editor--magic-admin .m-editor-props-panel .el-input__wrapper {
|
|
2798
2818
|
border-radius: 4px;
|
|
2799
2819
|
}
|
|
2800
2820
|
.m-editor.m-editor--magic-admin .border-box-container .border-icon-container .border-icon {
|
|
@@ -2868,4 +2888,8 @@ fieldset.m-fieldset .m-form-tip {
|
|
|
2868
2888
|
}
|
|
2869
2889
|
.m-editor.m-theme--magic-admin .magic-right-panel-tabs-top > .el-tabs > .el-tabs__header .el-tabs__nav-wrap.is-top::after {
|
|
2870
2890
|
display: none;
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
.m-editor.m-theme--magic-admin .m-editor-nav-menu .menu-item > button > i {
|
|
2894
|
+
font-size: 16px;
|
|
2871
2895
|
}
|