@tmagic/editor 1.5.0-beta.0 → 1.5.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 +285 -8
- package/dist/tmagic-editor.js +396 -332
- package/dist/tmagic-editor.umd.cjs +628 -533
- package/package.json +13 -14
- package/src/Editor.vue +18 -4
- package/src/components/CodeBlockEditor.vue +5 -5
- package/src/components/SearchInput.vue +1 -0
- package/src/components/Tree.vue +10 -2
- package/src/components/TreeNode.vue +4 -2
- package/src/editorProps.ts +6 -3
- package/src/fields/CodeLink.vue +2 -2
- package/src/fields/CodeSelect.vue +1 -1
- package/src/fields/CodeSelectCol.vue +1 -1
- package/src/fields/CondOpSelect.vue +1 -1
- package/src/fields/DataSourceFieldSelect/FieldSelect.vue +2 -8
- package/src/fields/DataSourceFieldSelect/Index.vue +2 -2
- package/src/fields/DataSourceFields.vue +1 -1
- package/src/fields/DataSourceInput.vue +4 -4
- package/src/fields/DataSourceMethodSelect.vue +1 -1
- package/src/fields/DataSourceMethods.vue +1 -1
- package/src/fields/DataSourceMocks.vue +1 -1
- package/src/fields/DisplayConds.vue +1 -1
- package/src/fields/EventSelect.vue +4 -4
- package/src/fields/PageFragmentSelect.vue +1 -1
- package/src/fields/UISelect.vue +1 -1
- package/src/hooks/index.ts +7 -0
- package/src/hooks/use-code-block-edit.ts +1 -1
- package/src/hooks/use-data-source-edit.ts +1 -1
- package/src/hooks/use-data-source-method.ts +3 -3
- package/src/hooks/use-filter.ts +2 -2
- package/src/hooks/use-node-status.ts +3 -3
- package/src/hooks/use-stage.ts +2 -2
- package/src/index.ts +30 -8
- package/src/initService.ts +17 -10
- package/src/layouts/AddPageBox.vue +1 -1
- package/src/layouts/CodeEditor.vue +5 -5
- package/src/layouts/Framework.vue +2 -2
- package/src/layouts/NavMenu.vue +1 -1
- package/src/layouts/PropsPanel.vue +1 -1
- package/src/layouts/page-bar/AddButton.vue +1 -1
- package/src/layouts/page-bar/PageBar.vue +8 -2
- package/src/layouts/page-bar/PageBarScrollContainer.vue +1 -1
- package/src/layouts/page-bar/PageList.vue +8 -2
- package/src/layouts/page-bar/SwitchTypeButton.vue +1 -1
- package/src/layouts/sidebar/ComponentListPanel.vue +1 -1
- package/src/layouts/sidebar/Sidebar.vue +31 -3
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +11 -3
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +11 -2
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +1 -1
- package/src/layouts/sidebar/data-source/DataSourceList.vue +13 -3
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +30 -15
- package/src/layouts/sidebar/layer/LayerNodeTool.vue +1 -1
- package/src/layouts/sidebar/layer/LayerPanel.vue +5 -1
- package/src/layouts/sidebar/layer/use-click.ts +1 -1
- package/src/layouts/sidebar/layer/use-drag.ts +1 -1
- package/src/layouts/sidebar/layer/use-node-status.ts +3 -4
- package/src/layouts/workspace/Breadcrumb.vue +1 -1
- package/src/layouts/workspace/viewer/NodeListMenu.vue +2 -2
- package/src/layouts/workspace/viewer/Stage.vue +9 -5
- package/src/layouts/workspace/viewer/StageOverlay.vue +9 -4
- package/src/layouts/workspace/viewer/ViewerMenu.vue +1 -1
- package/src/services/codeBlock.ts +7 -7
- package/src/services/dataSource.ts +3 -4
- package/src/services/dep.ts +2 -2
- package/src/services/editor.ts +10 -11
- package/src/services/history.ts +1 -1
- package/src/services/props.ts +3 -3
- package/src/services/stageOverlay.ts +15 -7
- package/src/services/storage.ts +2 -2
- package/src/theme/data-source.scss +8 -5
- package/src/theme/index.scss +3 -0
- package/src/theme/page-bar.scss +2 -1
- package/src/type.ts +14 -11
- package/src/utils/config.ts +5 -5
- package/src/utils/content-menu.ts +3 -3
- package/src/utils/data-source/index.ts +1 -1
- package/src/utils/editor.ts +13 -35
- package/src/utils/operator.ts +2 -1
- package/src/utils/props.ts +1 -1
- package/src/utils/tree.ts +1 -1
- package/types/index.d.ts +1664 -3039
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'vue', '@element-plus/icons-vue', 'lodash-es', 'serialize-javascript', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicEditor = {}, global.
|
|
5
|
-
})(this, (function (exports, vue, iconsVue, lodashEs, serialize,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tmagic/design'), require('@tmagic/form'), require('@tmagic/table'), require('vue'), require('@element-plus/icons-vue'), require('lodash-es'), require('serialize-javascript'), require('emmet-monaco-es'), require('monaco-editor'), require('@tmagic/core'), require('@tmagic/utils'), require('moveable'), require('@tmagic/stage'), require('events'), require('gesto'), require('sortablejs'), require('keycon')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@tmagic/design', '@tmagic/form', '@tmagic/table', 'vue', '@element-plus/icons-vue', 'lodash-es', 'serialize-javascript', 'emmet-monaco-es', 'monaco-editor', '@tmagic/core', '@tmagic/utils', 'moveable', '@tmagic/stage', 'events', 'gesto', 'sortablejs', 'keycon'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicEditor = {}, global.designPlugin, global.formPlugin, global.tablePlugin, global.Vue, global.iconsVue, global.lodashEs, global.serialize, global.emmetMonacoEs, global.monaco, global.core, global.utils, global.VanillaMoveable, global.StageCore, global.events, global.Gesto, global.Sortable, global.KeyController));
|
|
5
|
+
})(this, (function (exports, designPlugin, formPlugin, tablePlugin, vue, iconsVue, lodashEs, serialize, emmetMonacoEs, monaco, core, utils, VanillaMoveable, StageCore, events, Gesto, Sortable, KeyController) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
setup(__props) {
|
|
36
36
|
const isRelativePath = (str) => /^(\.|(\.\.)?\/)/.test(str);
|
|
37
37
|
return (_ctx, _cache) => {
|
|
38
|
-
return !_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
38
|
+
return !_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicIcon), {
|
|
39
39
|
key: 0,
|
|
40
40
|
class: "magic-editor-icon"
|
|
41
41
|
}, {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
vue.createVNode(vue.unref(iconsVue.Edit))
|
|
44
44
|
]),
|
|
45
45
|
_: 1
|
|
46
|
-
})) : typeof _ctx.icon === "string" && (_ctx.icon.startsWith("http") || isRelativePath(_ctx.icon)) ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
46
|
+
})) : typeof _ctx.icon === "string" && (_ctx.icon.startsWith("http") || isRelativePath(_ctx.icon)) ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicIcon), {
|
|
47
47
|
key: 1,
|
|
48
48
|
class: "magic-editor-icon"
|
|
49
49
|
}, {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
})) : typeof _ctx.icon === "string" ? (vue.openBlock(), vue.createElementBlock("i", {
|
|
55
55
|
key: 2,
|
|
56
56
|
class: vue.normalizeClass(["magic-editor-icon", _ctx.icon])
|
|
57
|
-
}, null, 2)) : (vue.openBlock(), vue.createBlock(vue.unref(
|
|
57
|
+
}, null, 2)) : (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicIcon), {
|
|
58
58
|
key: 3,
|
|
59
59
|
class: "magic-editor-icon"
|
|
60
60
|
}, {
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
let $TMAGIC_EDITOR = {};
|
|
71
|
-
const
|
|
71
|
+
const setEditorConfig = (option) => {
|
|
72
72
|
$TMAGIC_EDITOR = option;
|
|
73
73
|
};
|
|
74
|
-
const
|
|
74
|
+
const getEditorConfig = (key) => $TMAGIC_EDITOR[key];
|
|
75
75
|
|
|
76
76
|
emmetMonacoEs.emmetHTML(monaco__namespace);
|
|
77
77
|
emmetMonacoEs.emmetCSS(monaco__namespace, ["css", "scss"]);
|
|
@@ -119,14 +119,14 @@
|
|
|
119
119
|
}
|
|
120
120
|
return value;
|
|
121
121
|
};
|
|
122
|
-
const
|
|
122
|
+
const parseCode = (v, language) => {
|
|
123
123
|
if (typeof v !== "string") {
|
|
124
124
|
return v;
|
|
125
125
|
}
|
|
126
126
|
if (language === "json") {
|
|
127
127
|
return JSON.parse(v);
|
|
128
128
|
}
|
|
129
|
-
return
|
|
129
|
+
return getEditorConfig("parseDSL")(v);
|
|
130
130
|
};
|
|
131
131
|
let vsEditor = null;
|
|
132
132
|
let vsDiffEditor = null;
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
e.stopPropagation();
|
|
175
175
|
const newValue = getEditorValue();
|
|
176
176
|
values.value = newValue;
|
|
177
|
-
emit("save", props.parse ?
|
|
177
|
+
emit("save", props.parse ? parseCode(newValue, props.language) : newValue);
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
if (props.type !== "diff" && props.autoSave) {
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
const newValue = getEditorValue();
|
|
183
183
|
if (values.value !== newValue) {
|
|
184
184
|
values.value = newValue;
|
|
185
|
-
emit("save", props.parse ?
|
|
185
|
+
emit("save", props.parse ? parseCode(newValue, props.language) : newValue);
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
}
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
class: vue.normalizeClass(`magic-code-editor-wrapper${fullScreen.value ? " full-screen" : ""}`),
|
|
246
246
|
style: vue.normalizeStyle(!fullScreen.value && _ctx.height ? `height: ${_ctx.height}` : "100%")
|
|
247
247
|
}, [
|
|
248
|
-
vue.createVNode(vue.unref(
|
|
248
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
249
249
|
class: "magic-code-editor-full-screen-icon",
|
|
250
250
|
circle: "",
|
|
251
251
|
size: "small",
|
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
const changeHandler = (v) => {
|
|
369
369
|
if (!props.name || !props.model) return;
|
|
370
370
|
try {
|
|
371
|
-
const parseDSL =
|
|
371
|
+
const parseDSL = getEditorConfig("parseDSL");
|
|
372
372
|
props.model[props.name] = parseDSL(`(${v[props.name]})`);
|
|
373
373
|
emit("change", props.model[props.name]);
|
|
374
374
|
} catch (e) {
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
enableToggleMode: false,
|
|
415
415
|
expandAll: true,
|
|
416
416
|
title: (mForm, { model, index }) => {
|
|
417
|
-
if (model.codeType ===
|
|
417
|
+
if (model.codeType === core.HookCodeType.DATA_SOURCE_METHOD) {
|
|
418
418
|
if (Array.isArray(model.codeId)) {
|
|
419
419
|
if (model.codeId.length < 2) {
|
|
420
420
|
return index;
|
|
@@ -435,12 +435,12 @@
|
|
|
435
435
|
name: "codeType",
|
|
436
436
|
span: 6,
|
|
437
437
|
options: [
|
|
438
|
-
{ value:
|
|
439
|
-
{ value:
|
|
438
|
+
{ value: core.HookCodeType.CODE, text: "代码块" },
|
|
439
|
+
{ value: core.HookCodeType.DATA_SOURCE_METHOD, text: "数据源方法" }
|
|
440
440
|
],
|
|
441
441
|
defaultValue: "code",
|
|
442
442
|
onChange: (mForm, v, { model }) => {
|
|
443
|
-
if (v ===
|
|
443
|
+
if (v === core.HookCodeType.DATA_SOURCE_METHOD) {
|
|
444
444
|
model.codeId = [];
|
|
445
445
|
} else {
|
|
446
446
|
model.codeId = "";
|
|
@@ -453,7 +453,7 @@
|
|
|
453
453
|
name: "codeId",
|
|
454
454
|
span: 18,
|
|
455
455
|
labelWidth: 0,
|
|
456
|
-
display: (mForm, { model }) => model.codeType !==
|
|
456
|
+
display: (mForm, { model }) => model.codeType !== core.HookCodeType.DATA_SOURCE_METHOD,
|
|
457
457
|
notEditable: () => !services?.codeBlockService.getEditStatus()
|
|
458
458
|
},
|
|
459
459
|
{
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
name: "codeId",
|
|
462
462
|
span: 18,
|
|
463
463
|
labelWidth: 0,
|
|
464
|
-
display: (mForm, { model }) => model.codeType ===
|
|
464
|
+
display: (mForm, { model }) => model.codeType === core.HookCodeType.DATA_SOURCE_METHOD,
|
|
465
465
|
notEditable: () => !services?.dataSourceService.get("editable")
|
|
466
466
|
}
|
|
467
467
|
]
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
(value) => {
|
|
474
474
|
if (lodashEs.isEmpty(value)) {
|
|
475
475
|
props.model[props.name] = {
|
|
476
|
-
hookType:
|
|
476
|
+
hookType: core.HookType.CODE,
|
|
477
477
|
hookData: []
|
|
478
478
|
};
|
|
479
479
|
}
|
|
@@ -489,9 +489,9 @@
|
|
|
489
489
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
490
490
|
class: vue.normalizeClass(["m-fields-code-select", _ctx.config.className])
|
|
491
491
|
}, [
|
|
492
|
-
vue.createVNode(vue.unref(
|
|
492
|
+
vue.createVNode(vue.unref(designPlugin.TMagicCard), null, {
|
|
493
493
|
default: vue.withCtx(() => [
|
|
494
|
-
vue.createVNode(vue.unref(
|
|
494
|
+
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
495
495
|
config: codeConfig.value,
|
|
496
496
|
size: _ctx.size,
|
|
497
497
|
prop: _ctx.prop,
|
|
@@ -840,7 +840,7 @@
|
|
|
840
840
|
items: [
|
|
841
841
|
{
|
|
842
842
|
type: "display-conds",
|
|
843
|
-
name:
|
|
843
|
+
name: core.NODE_CONDS_KEY,
|
|
844
844
|
titlePrefix: "条件组",
|
|
845
845
|
defaultValue: []
|
|
846
846
|
}
|
|
@@ -998,7 +998,6 @@
|
|
|
998
998
|
return pageName;
|
|
999
999
|
};
|
|
1000
1000
|
const generatePageNameByApp = (app, type) => generatePageName(getPageNameList(type === "page" ? getPageList(app) : getPageFragmentList(app)), type);
|
|
1001
|
-
const isFixed = (node) => node.style?.position === "fixed";
|
|
1002
1001
|
const getNodeIndex = (id, parent) => {
|
|
1003
1002
|
const items = parent?.items || [];
|
|
1004
1003
|
return items.findIndex((item) => `${item.id}` === `${id}`);
|
|
@@ -1016,11 +1015,14 @@
|
|
|
1016
1015
|
height = 0;
|
|
1017
1016
|
}
|
|
1018
1017
|
const { height: parentHeight } = parentNode.style;
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1018
|
+
let wrapperHeightDeal = parentHeight;
|
|
1019
|
+
if (stage.mask && stage.renderer) {
|
|
1020
|
+
const { scrollTop = 0, wrapperHeight } = stage.mask;
|
|
1021
|
+
wrapperHeightDeal = utils.calcValueByFontsize(stage.renderer.getDocument(), wrapperHeight);
|
|
1022
|
+
const scrollTopDeal = utils.calcValueByFontsize(stage.renderer.getDocument(), scrollTop);
|
|
1023
|
+
if (utils.isPage(parentNode)) {
|
|
1024
|
+
return (wrapperHeightDeal - height) / 2 + scrollTopDeal;
|
|
1025
|
+
}
|
|
1024
1026
|
}
|
|
1025
1027
|
return (Math.min(parentHeight, wrapperHeightDeal) - height) / 2;
|
|
1026
1028
|
};
|
|
@@ -1135,22 +1137,13 @@
|
|
|
1135
1137
|
return {
|
|
1136
1138
|
...config.style || {},
|
|
1137
1139
|
top: getMiddleTop(config, parent, stage),
|
|
1138
|
-
left: fixNodeLeft(config, parent, stage?.renderer
|
|
1140
|
+
left: fixNodeLeft(config, parent, stage?.renderer?.contentWindow?.document)
|
|
1139
1141
|
};
|
|
1140
1142
|
};
|
|
1141
1143
|
const serializeConfig = (config) => serialize(config, {
|
|
1142
1144
|
space: 2,
|
|
1143
1145
|
unsafe: true
|
|
1144
1146
|
}).replace(/"(\w+)":\s/g, "$1: ");
|
|
1145
|
-
const traverseNode = (node, cb, parents = []) => {
|
|
1146
|
-
cb(node, parents);
|
|
1147
|
-
if (Array.isArray(node.items) && node.items.length) {
|
|
1148
|
-
parents.push(node);
|
|
1149
|
-
node.items.forEach((item) => {
|
|
1150
|
-
traverseNode(item, cb, [...parents]);
|
|
1151
|
-
});
|
|
1152
|
-
}
|
|
1153
|
-
};
|
|
1154
1147
|
const moveItemsInContainer = (sourceIndices, parent, targetIndex) => {
|
|
1155
1148
|
sourceIndices.sort((a, b) => a - b);
|
|
1156
1149
|
for (let i = sourceIndices.length - 1; i >= 0; i--) {
|
|
@@ -1472,10 +1465,10 @@
|
|
|
1472
1465
|
replaceRelateId(originConfigs, targetConfigs, collectorOptions) {
|
|
1473
1466
|
const relateIdMap = this.getRelateIdMap();
|
|
1474
1467
|
if (Object.keys(relateIdMap).length === 0) return;
|
|
1475
|
-
const target = new
|
|
1468
|
+
const target = new core.Target({
|
|
1476
1469
|
...collectorOptions
|
|
1477
1470
|
});
|
|
1478
|
-
const coperWatcher = new
|
|
1471
|
+
const coperWatcher = new core.Watcher();
|
|
1479
1472
|
coperWatcher.addTarget(target);
|
|
1480
1473
|
coperWatcher.collect(originConfigs, {}, true, collectorOptions.type);
|
|
1481
1474
|
originConfigs.forEach((config) => {
|
|
@@ -1707,7 +1700,7 @@
|
|
|
1707
1700
|
if (item === null) return null;
|
|
1708
1701
|
switch (protocol) {
|
|
1709
1702
|
case "object" /* OBJECT */:
|
|
1710
|
-
return
|
|
1703
|
+
return getEditorConfig("parseDSL")(`(${item})`);
|
|
1711
1704
|
case "json" /* JSON */:
|
|
1712
1705
|
return JSON.parse(item);
|
|
1713
1706
|
case "number" /* NUMBER */:
|
|
@@ -1919,7 +1912,7 @@
|
|
|
1919
1912
|
* 只有容器拥有布局
|
|
1920
1913
|
*/
|
|
1921
1914
|
async getLayout(parent, node) {
|
|
1922
|
-
if (node && typeof node !== "function" && isFixed(node)) return Layout.FIXED;
|
|
1915
|
+
if (node && typeof node !== "function" && StageCore.isFixed(node.style || {})) return Layout.FIXED;
|
|
1923
1916
|
if (parent.layout) {
|
|
1924
1917
|
return parent.layout;
|
|
1925
1918
|
}
|
|
@@ -1944,7 +1937,7 @@
|
|
|
1944
1937
|
historyService.resetState();
|
|
1945
1938
|
}
|
|
1946
1939
|
if (node?.id) {
|
|
1947
|
-
this.get("stage")?.renderer
|
|
1940
|
+
this.get("stage")?.renderer?.runtime?.getApp?.()?.page?.emit(
|
|
1948
1941
|
"editor:select",
|
|
1949
1942
|
{
|
|
1950
1943
|
node,
|
|
@@ -1959,7 +1952,7 @@
|
|
|
1959
1952
|
}
|
|
1960
1953
|
async selectNextNode() {
|
|
1961
1954
|
const node = vue.toRaw(this.get("node"));
|
|
1962
|
-
if (!node || utils.isPage(node) || node.type ===
|
|
1955
|
+
if (!node || utils.isPage(node) || node.type === core.NodeType.ROOT) return node;
|
|
1963
1956
|
const parent = vue.toRaw(this.getParentById(node.id));
|
|
1964
1957
|
if (!parent) return node;
|
|
1965
1958
|
const index = getNodeIndex(node.id, parent);
|
|
@@ -2020,7 +2013,7 @@
|
|
|
2020
2013
|
const curNode = this.get("node");
|
|
2021
2014
|
const stage = this.get("stage");
|
|
2022
2015
|
if (!curNode) throw new Error("当前选中节点为空");
|
|
2023
|
-
if ((parent.type ===
|
|
2016
|
+
if ((parent.type === core.NodeType.ROOT || curNode?.type === core.NodeType.ROOT) && !(utils.isPage(node) || utils.isPageFragment(node))) {
|
|
2024
2017
|
throw new Error("app下不能添加组件");
|
|
2025
2018
|
}
|
|
2026
2019
|
if (parent.id !== curNode.id && !(utils.isPage(node) || utils.isPageFragment(node))) {
|
|
@@ -2160,7 +2153,7 @@
|
|
|
2160
2153
|
}
|
|
2161
2154
|
});
|
|
2162
2155
|
if (!newConfig.type) throw new Error("配置缺少type值");
|
|
2163
|
-
if (newConfig.type ===
|
|
2156
|
+
if (newConfig.type === core.NodeType.ROOT) {
|
|
2164
2157
|
this.set("root", newConfig);
|
|
2165
2158
|
return newConfig;
|
|
2166
2159
|
}
|
|
@@ -2198,7 +2191,7 @@
|
|
|
2198
2191
|
async update(config) {
|
|
2199
2192
|
const nodes = Array.isArray(config) ? config : [config];
|
|
2200
2193
|
const newNodes = await Promise.all(nodes.map((node) => this.doUpdate(node)));
|
|
2201
|
-
if (newNodes[0]?.type !==
|
|
2194
|
+
if (newNodes[0]?.type !== core.NodeType.ROOT) {
|
|
2202
2195
|
this.pushHistoryState();
|
|
2203
2196
|
}
|
|
2204
2197
|
this.emit("update", newNodes);
|
|
@@ -2249,10 +2242,10 @@
|
|
|
2249
2242
|
copyWithRelated(config, collectorOptions) {
|
|
2250
2243
|
const copyNodes = Array.isArray(config) ? config : [config];
|
|
2251
2244
|
if (collectorOptions && typeof collectorOptions.isTarget === "function") {
|
|
2252
|
-
const customTarget = new
|
|
2245
|
+
const customTarget = new core.Target({
|
|
2253
2246
|
...collectorOptions
|
|
2254
2247
|
});
|
|
2255
|
-
const coperWatcher = new
|
|
2248
|
+
const coperWatcher = new core.Watcher();
|
|
2256
2249
|
coperWatcher.addTarget(customTarget);
|
|
2257
2250
|
coperWatcher.collect(copyNodes, {}, true, collectorOptions.type);
|
|
2258
2251
|
Object.keys(customTarget.deps).forEach((nodeId) => {
|
|
@@ -2286,7 +2279,7 @@
|
|
|
2286
2279
|
let parent = null;
|
|
2287
2280
|
if (config.length === 1 && config[0].id === node?.id) {
|
|
2288
2281
|
parent = this.get("parent");
|
|
2289
|
-
if (parent?.type ===
|
|
2282
|
+
if (parent?.type === core.NodeType.ROOT) {
|
|
2290
2283
|
parent = this.get("page");
|
|
2291
2284
|
}
|
|
2292
2285
|
}
|
|
@@ -2298,7 +2291,7 @@
|
|
|
2298
2291
|
}
|
|
2299
2292
|
async doPaste(config, position = {}) {
|
|
2300
2293
|
propsService.clearRelateId();
|
|
2301
|
-
const doc = this.get("stage")?.renderer
|
|
2294
|
+
const doc = this.get("stage")?.renderer?.contentWindow?.document;
|
|
2302
2295
|
const pasteConfigs = beforePaste(position, lodashEs.cloneDeep(config), doc);
|
|
2303
2296
|
return pasteConfigs;
|
|
2304
2297
|
}
|
|
@@ -2312,7 +2305,7 @@
|
|
|
2312
2305
|
}
|
|
2313
2306
|
if (!node.style) return config;
|
|
2314
2307
|
const stage = this.get("stage");
|
|
2315
|
-
const doc = stage?.renderer
|
|
2308
|
+
const doc = stage?.renderer?.contentWindow?.document;
|
|
2316
2309
|
if (doc) {
|
|
2317
2310
|
const el = utils.getElById()(doc, node.id);
|
|
2318
2311
|
const parentEl = layout === Layout.FIXED ? doc.body : el?.offsetParent;
|
|
@@ -2587,9 +2580,9 @@
|
|
|
2587
2580
|
async toggleFixedPosition(dist, src, root) {
|
|
2588
2581
|
const newConfig = lodashEs.cloneDeep(dist);
|
|
2589
2582
|
if (!utils.isPop(src) && newConfig.style?.position) {
|
|
2590
|
-
if (isFixed(newConfig) && !isFixed(src)) {
|
|
2583
|
+
if (StageCore.isFixed(newConfig.style) && !StageCore.isFixed(src.style || {})) {
|
|
2591
2584
|
newConfig.style = change2Fixed(newConfig, root);
|
|
2592
|
-
} else if (!isFixed(newConfig) && isFixed(src)) {
|
|
2585
|
+
} else if (!StageCore.isFixed(newConfig.style) && StageCore.isFixed(src.style || {})) {
|
|
2593
2586
|
newConfig.style = await Fixed2Other(newConfig, root, this.getLayout);
|
|
2594
2587
|
}
|
|
2595
2588
|
}
|
|
@@ -2651,7 +2644,7 @@
|
|
|
2651
2644
|
}
|
|
2652
2645
|
const root = editorService.get("root");
|
|
2653
2646
|
if ((utils.isPage(pasteConfig) || utils.isPageFragment(pasteConfig)) && root) {
|
|
2654
|
-
pasteConfig.name = generatePageNameByApp(root, utils.isPage(pasteConfig) ?
|
|
2647
|
+
pasteConfig.name = generatePageNameByApp(root, utils.isPage(pasteConfig) ? core.NodeType.PAGE : core.NodeType.PAGE_FRAGMENT);
|
|
2655
2648
|
}
|
|
2656
2649
|
return pasteConfig;
|
|
2657
2650
|
});
|
|
@@ -3189,7 +3182,7 @@
|
|
|
3189
3182
|
setup(__props, { emit: __emit }) {
|
|
3190
3183
|
const props = __props;
|
|
3191
3184
|
const emit = __emit;
|
|
3192
|
-
const form
|
|
3185
|
+
const form = vue.ref();
|
|
3193
3186
|
const getFormConfig = (items = []) => [
|
|
3194
3187
|
{
|
|
3195
3188
|
type: "fieldset",
|
|
@@ -3212,16 +3205,16 @@
|
|
|
3212
3205
|
);
|
|
3213
3206
|
const onParamsChangeHandler = async () => {
|
|
3214
3207
|
try {
|
|
3215
|
-
const value = await form
|
|
3208
|
+
const value = await form.value?.submitForm(true);
|
|
3216
3209
|
emit("change", value);
|
|
3217
3210
|
} catch (e) {
|
|
3218
3211
|
error(e);
|
|
3219
3212
|
}
|
|
3220
3213
|
};
|
|
3221
3214
|
return (_ctx, _cache) => {
|
|
3222
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
3215
|
+
return vue.openBlock(), vue.createBlock(vue.unref(formPlugin.MForm), {
|
|
3223
3216
|
ref_key: "form",
|
|
3224
|
-
ref: form
|
|
3217
|
+
ref: form,
|
|
3225
3218
|
config: codeParamsConfig.value,
|
|
3226
3219
|
"init-values": _ctx.model,
|
|
3227
3220
|
disabled: _ctx.disabled,
|
|
@@ -3234,7 +3227,7 @@
|
|
|
3234
3227
|
});
|
|
3235
3228
|
|
|
3236
3229
|
const _hoisted_1$u = { class: "m-fields-code-select-col" };
|
|
3237
|
-
const _hoisted_2$
|
|
3230
|
+
const _hoisted_2$g = { class: "code-select-container" };
|
|
3238
3231
|
const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
3239
3232
|
...{
|
|
3240
3233
|
name: "MFieldsCodeSelectCol"
|
|
@@ -3258,7 +3251,7 @@
|
|
|
3258
3251
|
const eventBus = vue.inject("eventBus");
|
|
3259
3252
|
const emit = __emit;
|
|
3260
3253
|
const props = __props;
|
|
3261
|
-
const notEditable = vue.computed(() =>
|
|
3254
|
+
const notEditable = vue.computed(() => formPlugin.filterFunction(mForm, props.config.notEditable, props));
|
|
3262
3255
|
const hasCodeBlockSidePanel = vue.computed(
|
|
3263
3256
|
() => (services?.uiService.get("sideBarItems") || []).find((item) => item.$key === SideItemKey.CODE_BLOCK)
|
|
3264
3257
|
);
|
|
@@ -3299,7 +3292,7 @@
|
|
|
3299
3292
|
onChange: (formState, codeId, { model }) => {
|
|
3300
3293
|
paramsConfig.value = getParamItemsConfig(codeId);
|
|
3301
3294
|
if (paramsConfig.value.length) {
|
|
3302
|
-
model.params =
|
|
3295
|
+
model.params = formPlugin.createValues(formState, paramsConfig.value, {}, model.params);
|
|
3303
3296
|
} else {
|
|
3304
3297
|
model.params = {};
|
|
3305
3298
|
}
|
|
@@ -3315,15 +3308,15 @@
|
|
|
3315
3308
|
};
|
|
3316
3309
|
return (_ctx, _cache) => {
|
|
3317
3310
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [
|
|
3318
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3319
|
-
vue.createVNode(vue.unref(
|
|
3311
|
+
vue.createElementVNode("div", _hoisted_2$g, [
|
|
3312
|
+
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
3320
3313
|
class: "select",
|
|
3321
3314
|
config: selectConfig,
|
|
3322
3315
|
model: _ctx.model,
|
|
3323
3316
|
size: _ctx.size,
|
|
3324
3317
|
onChange: onParamsChangeHandler
|
|
3325
3318
|
}, null, 8, ["model", "size"]),
|
|
3326
|
-
_ctx.model[_ctx.name] && hasCodeBlockSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
3319
|
+
_ctx.model[_ctx.name] && hasCodeBlockSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
3327
3320
|
key: 0,
|
|
3328
3321
|
class: "m-fields-select-action-button",
|
|
3329
3322
|
size: _ctx.size,
|
|
@@ -3371,7 +3364,7 @@
|
|
|
3371
3364
|
const emit = __emit;
|
|
3372
3365
|
const { dataSourceService } = vue.inject("services") || {};
|
|
3373
3366
|
const props = __props;
|
|
3374
|
-
const optionComponent =
|
|
3367
|
+
const optionComponent = designPlugin.getDesignConfig("components")?.option;
|
|
3375
3368
|
const options = vue.computed(() => {
|
|
3376
3369
|
const [id, ...fieldNames] = [...props.config.parentFields || [], ...props.model.field];
|
|
3377
3370
|
const ds = dataSourceService?.getDataSourceById(id);
|
|
@@ -3403,7 +3396,7 @@
|
|
|
3403
3396
|
emit("change", v);
|
|
3404
3397
|
};
|
|
3405
3398
|
return (_ctx, _cache) => {
|
|
3406
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
3399
|
+
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicSelect), {
|
|
3407
3400
|
modelValue: _ctx.model[_ctx.name],
|
|
3408
3401
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.model[_ctx.name] = $event),
|
|
3409
3402
|
clearable: "",
|
|
@@ -3458,7 +3451,7 @@
|
|
|
3458
3451
|
const props = __props;
|
|
3459
3452
|
const target = vue.ref();
|
|
3460
3453
|
const titleEl = vue.ref();
|
|
3461
|
-
const zIndex =
|
|
3454
|
+
const zIndex = designPlugin.useZIndex();
|
|
3462
3455
|
const curZIndex = vue.ref(0);
|
|
3463
3456
|
const titleHeight = vue.ref(0);
|
|
3464
3457
|
const bodyHeight = vue.computed(() => {
|
|
@@ -3585,7 +3578,7 @@
|
|
|
3585
3578
|
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.title), 1)
|
|
3586
3579
|
]),
|
|
3587
3580
|
vue.createElementVNode("div", null, [
|
|
3588
|
-
vue.createVNode(vue.unref(
|
|
3581
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
3589
3582
|
link: "",
|
|
3590
3583
|
size: "small",
|
|
3591
3584
|
onClick: closeHandler
|
|
@@ -3615,7 +3608,7 @@
|
|
|
3615
3608
|
const codeBlockEditor = vue.ref();
|
|
3616
3609
|
const createCodeBlock = async () => {
|
|
3617
3610
|
if (!codeBlockService) {
|
|
3618
|
-
|
|
3611
|
+
designPlugin.tMagicMessage.error("新增代码块失败");
|
|
3619
3612
|
return;
|
|
3620
3613
|
}
|
|
3621
3614
|
codeConfig.value = {
|
|
@@ -3632,7 +3625,7 @@
|
|
|
3632
3625
|
const editCode = async (id) => {
|
|
3633
3626
|
const codeBlock = await codeBlockService?.getCodeContentById(id);
|
|
3634
3627
|
if (!codeBlock) {
|
|
3635
|
-
|
|
3628
|
+
designPlugin.tMagicMessage.error("获取代码块内容失败");
|
|
3636
3629
|
return;
|
|
3637
3630
|
}
|
|
3638
3631
|
let codeContent = codeBlock.content;
|
|
@@ -3690,7 +3683,7 @@
|
|
|
3690
3683
|
editCode: async (model, methodName) => {
|
|
3691
3684
|
const method = model.methods?.find((method2) => method2.name === methodName);
|
|
3692
3685
|
if (!method) {
|
|
3693
|
-
|
|
3686
|
+
designPlugin.tMagicMessage.error("获取数据源方法失败");
|
|
3694
3687
|
return;
|
|
3695
3688
|
}
|
|
3696
3689
|
let codeContent = method.content || `({ params, dataSource, app }) => {
|
|
@@ -3722,7 +3715,7 @@
|
|
|
3722
3715
|
dataSource.value.methods = [];
|
|
3723
3716
|
}
|
|
3724
3717
|
if (values.content) {
|
|
3725
|
-
const parseDSL =
|
|
3718
|
+
const parseDSL = getEditorConfig("parseDSL");
|
|
3726
3719
|
if (typeof values.content === "string") {
|
|
3727
3720
|
values.content = parseDSL(values.content);
|
|
3728
3721
|
}
|
|
@@ -3885,7 +3878,7 @@
|
|
|
3885
3878
|
}
|
|
3886
3879
|
}
|
|
3887
3880
|
);
|
|
3888
|
-
stage.mask
|
|
3881
|
+
stage.mask?.setGuides([
|
|
3889
3882
|
getGuideLineFromCache(getGuideLineKey(H_GUIDE_LINE_STORAGE_KEY)),
|
|
3890
3883
|
getGuideLineFromCache(getGuideLineKey(V_GUIDE_LINE_STORAGE_KEY))
|
|
3891
3884
|
]);
|
|
@@ -4065,6 +4058,68 @@
|
|
|
4065
4058
|
};
|
|
4066
4059
|
};
|
|
4067
4060
|
|
|
4061
|
+
const useFilter = (nodeData, nodeStatusMap, filterNodeMethod) => {
|
|
4062
|
+
const filterIsMatch = (value, data) => {
|
|
4063
|
+
const string = !Array.isArray(value) ? [value] : value;
|
|
4064
|
+
if (!string.length) {
|
|
4065
|
+
return true;
|
|
4066
|
+
}
|
|
4067
|
+
return string.some((v) => filterNodeMethod(v, data));
|
|
4068
|
+
};
|
|
4069
|
+
const filter = (text) => {
|
|
4070
|
+
if (!nodeData.value.length) return;
|
|
4071
|
+
nodeData.value.forEach((node) => {
|
|
4072
|
+
utils.traverseNode(node, (node2, parents) => {
|
|
4073
|
+
if (!nodeStatusMap.value) return;
|
|
4074
|
+
const visible = filterIsMatch(text, node2);
|
|
4075
|
+
if (visible && parents.length) {
|
|
4076
|
+
parents.forEach((parent) => {
|
|
4077
|
+
updateStatus(nodeStatusMap.value, parent.id, {
|
|
4078
|
+
visible,
|
|
4079
|
+
expand: true
|
|
4080
|
+
});
|
|
4081
|
+
});
|
|
4082
|
+
}
|
|
4083
|
+
updateStatus(nodeStatusMap.value, node2.id, {
|
|
4084
|
+
visible
|
|
4085
|
+
});
|
|
4086
|
+
});
|
|
4087
|
+
});
|
|
4088
|
+
};
|
|
4089
|
+
return {
|
|
4090
|
+
filterText: vue.ref(""),
|
|
4091
|
+
filterTextChangeHandler(text) {
|
|
4092
|
+
filter(text);
|
|
4093
|
+
}
|
|
4094
|
+
};
|
|
4095
|
+
};
|
|
4096
|
+
|
|
4097
|
+
const useGetSo = (target, emit) => {
|
|
4098
|
+
let getso;
|
|
4099
|
+
const isDraging = vue.ref(false);
|
|
4100
|
+
vue.onMounted(() => {
|
|
4101
|
+
if (!target.value) return;
|
|
4102
|
+
getso = new Gesto(target.value, {
|
|
4103
|
+
container: window,
|
|
4104
|
+
pinchOutside: true
|
|
4105
|
+
}).on("drag", (e) => {
|
|
4106
|
+
if (!target.value) return;
|
|
4107
|
+
emit("change", e);
|
|
4108
|
+
}).on("dragStart", () => {
|
|
4109
|
+
isDraging.value = true;
|
|
4110
|
+
}).on("dragEnd", () => {
|
|
4111
|
+
isDraging.value = false;
|
|
4112
|
+
});
|
|
4113
|
+
});
|
|
4114
|
+
vue.onBeforeUnmount(() => {
|
|
4115
|
+
getso?.unset();
|
|
4116
|
+
isDraging.value = false;
|
|
4117
|
+
});
|
|
4118
|
+
return {
|
|
4119
|
+
isDraging
|
|
4120
|
+
};
|
|
4121
|
+
};
|
|
4122
|
+
|
|
4068
4123
|
const useNextFloatBoxPosition = (uiService, parent) => {
|
|
4069
4124
|
const boxPosition = vue.ref({
|
|
4070
4125
|
left: 0,
|
|
@@ -4089,8 +4144,42 @@
|
|
|
4089
4144
|
};
|
|
4090
4145
|
};
|
|
4091
4146
|
|
|
4147
|
+
const createPageNodeStatus$1 = (nodeData, initialLayerNodeStatus) => {
|
|
4148
|
+
const map = /* @__PURE__ */ new Map();
|
|
4149
|
+
nodeData.forEach(
|
|
4150
|
+
(node) => utils.traverseNode(node, (node2) => {
|
|
4151
|
+
map.set(
|
|
4152
|
+
node2.id,
|
|
4153
|
+
initialLayerNodeStatus?.get(node2.id) || {
|
|
4154
|
+
visible: true,
|
|
4155
|
+
expand: false,
|
|
4156
|
+
selected: false,
|
|
4157
|
+
draggable: false
|
|
4158
|
+
}
|
|
4159
|
+
);
|
|
4160
|
+
})
|
|
4161
|
+
);
|
|
4162
|
+
return map;
|
|
4163
|
+
};
|
|
4164
|
+
const useNodeStatus$1 = (nodeData) => {
|
|
4165
|
+
const nodeStatusMap = vue.ref(/* @__PURE__ */ new Map());
|
|
4166
|
+
vue.watch(
|
|
4167
|
+
nodeData,
|
|
4168
|
+
(nodeData2) => {
|
|
4169
|
+
nodeStatusMap.value = createPageNodeStatus$1(nodeData2, nodeStatusMap.value);
|
|
4170
|
+
},
|
|
4171
|
+
{
|
|
4172
|
+
immediate: true,
|
|
4173
|
+
deep: true
|
|
4174
|
+
}
|
|
4175
|
+
);
|
|
4176
|
+
return {
|
|
4177
|
+
nodeStatusMap
|
|
4178
|
+
};
|
|
4179
|
+
};
|
|
4180
|
+
|
|
4092
4181
|
const _hoisted_1$t = { class: "m-editor-data-source-fields" };
|
|
4093
|
-
const _hoisted_2$
|
|
4182
|
+
const _hoisted_2$f = { class: "m-editor-data-source-fields-footer" };
|
|
4094
4183
|
const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
4095
4184
|
...{
|
|
4096
4185
|
name: "MFieldsDataSourceFields"
|
|
@@ -4181,7 +4270,7 @@
|
|
|
4181
4270
|
text: "删除",
|
|
4182
4271
|
buttonType: "danger",
|
|
4183
4272
|
handler: async (row, index) => {
|
|
4184
|
-
await
|
|
4273
|
+
await designPlugin.tMagicMessageBox.confirm(`确定删除${row.title}(${row.name})?`, "提示");
|
|
4185
4274
|
props.model[props.name].splice(index, 1);
|
|
4186
4275
|
emit("change", props.model[props.name]);
|
|
4187
4276
|
}
|
|
@@ -4333,7 +4422,7 @@
|
|
|
4333
4422
|
addFromJsonDialogVisible.value = false;
|
|
4334
4423
|
emit("change", props.model[props.name]);
|
|
4335
4424
|
} catch (e) {
|
|
4336
|
-
|
|
4425
|
+
designPlugin.tMagicMessage.error(e.message);
|
|
4337
4426
|
}
|
|
4338
4427
|
};
|
|
4339
4428
|
const addDialogVisible = vue.useModel(__props, "visible");
|
|
@@ -4343,32 +4432,32 @@
|
|
|
4343
4432
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
4344
4433
|
return (_ctx, _cache) => {
|
|
4345
4434
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$t, [
|
|
4346
|
-
vue.createVNode(vue.unref(
|
|
4435
|
+
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
4347
4436
|
data: _ctx.model[_ctx.name],
|
|
4348
4437
|
columns: fieldColumns
|
|
4349
4438
|
}, null, 8, ["data"]),
|
|
4350
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
4351
|
-
vue.createVNode(vue.unref(
|
|
4439
|
+
vue.createElementVNode("div", _hoisted_2$f, [
|
|
4440
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
4352
4441
|
size: "small",
|
|
4353
4442
|
disabled: _ctx.disabled,
|
|
4354
4443
|
plain: "",
|
|
4355
4444
|
onClick: _cache[0] || (_cache[0] = ($event) => newFromJsonHandler())
|
|
4356
4445
|
}, {
|
|
4357
|
-
default: vue.withCtx(() => [
|
|
4446
|
+
default: vue.withCtx(() => _cache[8] || (_cache[8] = [
|
|
4358
4447
|
vue.createTextVNode("快速添加")
|
|
4359
|
-
]),
|
|
4448
|
+
])),
|
|
4360
4449
|
_: 1
|
|
4361
4450
|
}, 8, ["disabled"]),
|
|
4362
|
-
vue.createVNode(vue.unref(
|
|
4451
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
4363
4452
|
size: "small",
|
|
4364
4453
|
type: "primary",
|
|
4365
4454
|
disabled: _ctx.disabled,
|
|
4366
4455
|
plain: "",
|
|
4367
4456
|
onClick: _cache[1] || (_cache[1] = ($event) => newHandler())
|
|
4368
4457
|
}, {
|
|
4369
|
-
default: vue.withCtx(() => [
|
|
4458
|
+
default: vue.withCtx(() => _cache[9] || (_cache[9] = [
|
|
4370
4459
|
vue.createTextVNode("添加")
|
|
4371
|
-
]),
|
|
4460
|
+
])),
|
|
4372
4461
|
_: 1
|
|
4373
4462
|
}, 8, ["disabled"])
|
|
4374
4463
|
]),
|
|
@@ -4383,7 +4472,7 @@
|
|
|
4383
4472
|
position: vue.unref(boxPosition)
|
|
4384
4473
|
}, {
|
|
4385
4474
|
body: vue.withCtx(() => [
|
|
4386
|
-
vue.createVNode(vue.unref(
|
|
4475
|
+
vue.createVNode(vue.unref(formPlugin.MFormBox), {
|
|
4387
4476
|
"label-width": "80px",
|
|
4388
4477
|
title: fieldTitle.value,
|
|
4389
4478
|
config: dataSourceFieldsConfig,
|
|
@@ -4406,7 +4495,7 @@
|
|
|
4406
4495
|
position: vue.unref(boxPosition)
|
|
4407
4496
|
}, {
|
|
4408
4497
|
body: vue.withCtx(() => [
|
|
4409
|
-
vue.createVNode(vue.unref(
|
|
4498
|
+
vue.createVNode(vue.unref(formPlugin.MFormBox), {
|
|
4410
4499
|
config: jsonFromConfig,
|
|
4411
4500
|
values: jsonFromValues.value,
|
|
4412
4501
|
disabled: _ctx.disabled,
|
|
@@ -4439,13 +4528,13 @@
|
|
|
4439
4528
|
const props = __props;
|
|
4440
4529
|
const emit = __emit;
|
|
4441
4530
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
4442
|
-
const optionComponent =
|
|
4531
|
+
const optionComponent = designPlugin.getDesignConfig("components")?.option;
|
|
4443
4532
|
const services = vue.inject("services");
|
|
4444
4533
|
const mForm = vue.inject("mForm");
|
|
4445
4534
|
const eventBus = vue.inject("eventBus");
|
|
4446
4535
|
const dataSources = vue.computed(() => services?.dataSourceService.get("dataSources") || []);
|
|
4447
4536
|
const valueIsKey = vue.computed(() => props.value === "key");
|
|
4448
|
-
const notEditable = vue.computed(() =>
|
|
4537
|
+
const notEditable = vue.computed(() => formPlugin.filterFunction(mForm, props.notEditable, props));
|
|
4449
4538
|
const dataSourcesOptions = vue.computed(
|
|
4450
4539
|
() => dataSources.value.map((ds) => ({
|
|
4451
4540
|
text: ds.title || ds.id,
|
|
@@ -4504,7 +4593,7 @@
|
|
|
4504
4593
|
return (_ctx, _cache) => {
|
|
4505
4594
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
|
|
4506
4595
|
_ctx.checkStrictly ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4507
|
-
vue.createVNode(vue.unref(
|
|
4596
|
+
vue.createVNode(vue.unref(designPlugin.TMagicSelect), {
|
|
4508
4597
|
"model-value": selectDataSourceId.value,
|
|
4509
4598
|
clearable: "",
|
|
4510
4599
|
filterable: "",
|
|
@@ -4534,7 +4623,7 @@
|
|
|
4534
4623
|
]),
|
|
4535
4624
|
_: 1
|
|
4536
4625
|
}, 8, ["model-value", "size", "disabled"]),
|
|
4537
|
-
vue.createVNode(vue.unref(
|
|
4626
|
+
vue.createVNode(vue.unref(designPlugin.TMagicCascader), {
|
|
4538
4627
|
"model-value": selectFieldsId.value,
|
|
4539
4628
|
clearable: "",
|
|
4540
4629
|
filterable: "",
|
|
@@ -4546,7 +4635,7 @@
|
|
|
4546
4635
|
},
|
|
4547
4636
|
onChange: fieldChangeHandler
|
|
4548
4637
|
}, null, 8, ["model-value", "size", "disabled", "options", "props"])
|
|
4549
|
-
], 64)) : (vue.openBlock(), vue.createBlock(vue.unref(
|
|
4638
|
+
], 64)) : (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicCascader), {
|
|
4550
4639
|
key: 1,
|
|
4551
4640
|
clearable: "",
|
|
4552
4641
|
filterable: "",
|
|
@@ -4559,12 +4648,12 @@
|
|
|
4559
4648
|
},
|
|
4560
4649
|
onChange: onChangeHandler
|
|
4561
4650
|
}, null, 8, ["model-value", "disabled", "size", "options", "props"])),
|
|
4562
|
-
selectDataSourceId.value && hasDataSourceSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
4651
|
+
selectDataSourceId.value && hasDataSourceSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
4563
4652
|
key: 2,
|
|
4564
4653
|
content: notEditable.value ? "查看" : "编辑"
|
|
4565
4654
|
}, {
|
|
4566
4655
|
default: vue.withCtx(() => [
|
|
4567
|
-
vue.createVNode(vue.unref(
|
|
4656
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
4568
4657
|
class: "m-fields-select-action-button",
|
|
4569
4658
|
size: _ctx.size,
|
|
4570
4659
|
onClick: _cache[0] || (_cache[0] = ($event) => editHandler(selectDataSourceId.value))
|
|
@@ -4681,7 +4770,7 @@
|
|
|
4681
4770
|
if (!keys.length || field?.type && (field.type === "any" || dataSourceFieldType.includes("any") || dataSourceFieldType.includes(field.type))) {
|
|
4682
4771
|
emit("change", value);
|
|
4683
4772
|
} else {
|
|
4684
|
-
|
|
4773
|
+
designPlugin.tMagicMessage.error(`请选择类型为${dataSourceFieldType.join("或")}的字段`);
|
|
4685
4774
|
emit("change", [dsId]);
|
|
4686
4775
|
}
|
|
4687
4776
|
};
|
|
@@ -4706,16 +4795,16 @@
|
|
|
4706
4795
|
"last-values": _ctx.lastValues,
|
|
4707
4796
|
"init-values": _ctx.initValues,
|
|
4708
4797
|
values: _ctx.values,
|
|
4709
|
-
prop:
|
|
4798
|
+
prop: _ctx.prop,
|
|
4710
4799
|
onChange: onChangeHandler
|
|
4711
4800
|
}, null, 40, ["config", "model", "name", "disabled", "size", "last-values", "init-values", "values", "prop"])),
|
|
4712
|
-
_ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
4801
|
+
_ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
4713
4802
|
key: 2,
|
|
4714
4803
|
disabled: showDataSourceFieldSelect.value,
|
|
4715
4804
|
content: "选择数据源"
|
|
4716
4805
|
}, {
|
|
4717
4806
|
default: vue.withCtx(() => [
|
|
4718
|
-
vue.createVNode(vue.unref(
|
|
4807
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
4719
4808
|
style: { "margin-left": "5px" },
|
|
4720
4809
|
type: showDataSourceFieldSelect.value ? "primary" : "default",
|
|
4721
4810
|
size: _ctx.size,
|
|
@@ -4735,8 +4824,8 @@
|
|
|
4735
4824
|
});
|
|
4736
4825
|
|
|
4737
4826
|
const _hoisted_1$q = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
4738
|
-
const _hoisted_2$
|
|
4739
|
-
const _hoisted_3$
|
|
4827
|
+
const _hoisted_2$e = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
4828
|
+
const _hoisted_3$4 = { class: "el-input__inner t-input__inner" };
|
|
4740
4829
|
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
4741
4830
|
...{
|
|
4742
4831
|
name: "MFieldsDataSourceInput"
|
|
@@ -4913,7 +5002,7 @@
|
|
|
4913
5002
|
changeHandler(state.value);
|
|
4914
5003
|
};
|
|
4915
5004
|
return (_ctx, _cache) => {
|
|
4916
|
-
return _ctx.disabled || isFocused.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(
|
|
5005
|
+
return _ctx.disabled || isFocused.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(designPlugin.getDesignConfig)("components")?.autocomplete.component || "el-autocomplete"), vue.mergeProps(
|
|
4917
5006
|
{
|
|
4918
5007
|
key: 0,
|
|
4919
5008
|
class: "tmagic-design-auto-complete",
|
|
@@ -4922,7 +5011,7 @@
|
|
|
4922
5011
|
modelValue: state.value,
|
|
4923
5012
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event)
|
|
4924
5013
|
},
|
|
4925
|
-
vue.unref(
|
|
5014
|
+
vue.unref(designPlugin.getDesignConfig)("components")?.autocomplete.props({
|
|
4926
5015
|
disabled: _ctx.disabled,
|
|
4927
5016
|
size: _ctx.size,
|
|
4928
5017
|
fetchSuggestions: querySearch,
|
|
@@ -4942,7 +5031,7 @@
|
|
|
4942
5031
|
default: vue.withCtx(({ item }) => [
|
|
4943
5032
|
vue.createElementVNode("div", _hoisted_1$q, [
|
|
4944
5033
|
vue.createElementVNode("div", null, vue.toDisplayString(item.text), 1),
|
|
4945
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
5034
|
+
vue.createElementVNode("span", _hoisted_2$e, vue.toDisplayString(item.value), 1)
|
|
4946
5035
|
])
|
|
4947
5036
|
]),
|
|
4948
5037
|
_: 1
|
|
@@ -4954,14 +5043,14 @@
|
|
|
4954
5043
|
vue.createElementVNode("div", {
|
|
4955
5044
|
class: vue.normalizeClass(`tmagic-data-source-input-text-wrapper el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
|
|
4956
5045
|
}, [
|
|
4957
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
5046
|
+
vue.createElementVNode("div", _hoisted_3$4, [
|
|
4958
5047
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayState.value, (item, index) => {
|
|
4959
5048
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
4960
5049
|
item.type === "text" ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4961
5050
|
key: index,
|
|
4962
5051
|
style: { "margin-right": "2px" }
|
|
4963
5052
|
}, vue.toDisplayString(item.value), 1)) : vue.createCommentVNode("", true),
|
|
4964
|
-
item.type === "var" ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
5053
|
+
item.type === "var" ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTag), {
|
|
4965
5054
|
key: index,
|
|
4966
5055
|
size: _ctx.size
|
|
4967
5056
|
}, {
|
|
@@ -4984,9 +5073,9 @@
|
|
|
4984
5073
|
});
|
|
4985
5074
|
|
|
4986
5075
|
const _hoisted_1$p = { style: { "display": "flex", "margin-bottom": "10px" } };
|
|
4987
|
-
const _hoisted_2$
|
|
4988
|
-
const _hoisted_3$
|
|
4989
|
-
const _hoisted_4$
|
|
5076
|
+
const _hoisted_2$d = { style: { "flex": "1" } };
|
|
5077
|
+
const _hoisted_3$3 = { style: { "flex": "1" } };
|
|
5078
|
+
const _hoisted_4$3 = { class: "dialog-footer" };
|
|
4990
5079
|
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
4991
5080
|
...{
|
|
4992
5081
|
name: "MEditorCodeBlockEditor"
|
|
@@ -5106,10 +5195,10 @@
|
|
|
5106
5195
|
height: "500px",
|
|
5107
5196
|
onChange: (formState, code) => {
|
|
5108
5197
|
try {
|
|
5109
|
-
|
|
5198
|
+
getEditorConfig("parseDSL")(code);
|
|
5110
5199
|
return code;
|
|
5111
5200
|
} catch (error) {
|
|
5112
|
-
|
|
5201
|
+
designPlugin.tMagicMessage.error(error.message);
|
|
5113
5202
|
throw error;
|
|
5114
5203
|
}
|
|
5115
5204
|
}
|
|
@@ -5120,7 +5209,7 @@
|
|
|
5120
5209
|
emit("submit", values);
|
|
5121
5210
|
};
|
|
5122
5211
|
const errorHandler = (error) => {
|
|
5123
|
-
|
|
5212
|
+
designPlugin.tMagicMessage.error(error.message);
|
|
5124
5213
|
};
|
|
5125
5214
|
const formBox = vue.ref();
|
|
5126
5215
|
const changedValue = vue.ref();
|
|
@@ -5132,7 +5221,7 @@
|
|
|
5132
5221
|
done();
|
|
5133
5222
|
return;
|
|
5134
5223
|
}
|
|
5135
|
-
|
|
5224
|
+
designPlugin.tMagicMessageBox.confirm("当前代码块已修改,是否保存?", "提示", {
|
|
5136
5225
|
confirmButtonText: "保存并关闭",
|
|
5137
5226
|
cancelButtonText: "不保存并关闭",
|
|
5138
5227
|
type: "warning",
|
|
@@ -5172,7 +5261,7 @@
|
|
|
5172
5261
|
"before-close": beforeClose
|
|
5173
5262
|
}, {
|
|
5174
5263
|
body: vue.withCtx(() => [
|
|
5175
|
-
vue.createVNode(vue.unref(
|
|
5264
|
+
vue.createVNode(vue.unref(formPlugin.MFormBox), {
|
|
5176
5265
|
class: "m-editor-code-block-editor",
|
|
5177
5266
|
ref_key: "formBox",
|
|
5178
5267
|
ref: formBox,
|
|
@@ -5189,15 +5278,15 @@
|
|
|
5189
5278
|
onClosed: closedHandler
|
|
5190
5279
|
}, {
|
|
5191
5280
|
left: vue.withCtx(() => [
|
|
5192
|
-
!_ctx.disabled ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
5281
|
+
!_ctx.disabled ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
5193
5282
|
key: 0,
|
|
5194
5283
|
type: "primary",
|
|
5195
5284
|
link: "",
|
|
5196
5285
|
onClick: _cache[0] || (_cache[0] = ($event) => difVisible.value = true)
|
|
5197
5286
|
}, {
|
|
5198
|
-
default: vue.withCtx(() => [
|
|
5287
|
+
default: vue.withCtx(() => _cache[6] || (_cache[6] = [
|
|
5199
5288
|
vue.createTextVNode("查看修改")
|
|
5200
|
-
]),
|
|
5289
|
+
])),
|
|
5201
5290
|
_: 1
|
|
5202
5291
|
})) : vue.createCommentVNode("", true)
|
|
5203
5292
|
]),
|
|
@@ -5207,56 +5296,56 @@
|
|
|
5207
5296
|
_: 1
|
|
5208
5297
|
}, 8, ["visible", "width", "height", "title", "position"]),
|
|
5209
5298
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
5210
|
-
vue.createVNode(vue.unref(
|
|
5299
|
+
vue.createVNode(vue.unref(designPlugin.TMagicDialog), {
|
|
5211
5300
|
title: "查看修改",
|
|
5212
5301
|
modelValue: difVisible.value,
|
|
5213
5302
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => difVisible.value = $event),
|
|
5214
5303
|
fullscreen: ""
|
|
5215
5304
|
}, {
|
|
5216
5305
|
footer: vue.withCtx(() => [
|
|
5217
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
5218
|
-
vue.createVNode(vue.unref(
|
|
5306
|
+
vue.createElementVNode("span", _hoisted_4$3, [
|
|
5307
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5219
5308
|
size: "small",
|
|
5220
5309
|
onClick: _cache[4] || (_cache[4] = ($event) => difVisible.value = false)
|
|
5221
5310
|
}, {
|
|
5222
|
-
default: vue.withCtx(() => [
|
|
5311
|
+
default: vue.withCtx(() => _cache[9] || (_cache[9] = [
|
|
5223
5312
|
vue.createTextVNode("取消")
|
|
5224
|
-
]),
|
|
5313
|
+
])),
|
|
5225
5314
|
_: 1
|
|
5226
5315
|
}),
|
|
5227
|
-
vue.createVNode(vue.unref(
|
|
5316
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5228
5317
|
size: "small",
|
|
5229
5318
|
type: "primary",
|
|
5230
5319
|
onClick: diffChange
|
|
5231
5320
|
}, {
|
|
5232
|
-
default: vue.withCtx(() => [
|
|
5321
|
+
default: vue.withCtx(() => _cache[10] || (_cache[10] = [
|
|
5233
5322
|
vue.createTextVNode("确定")
|
|
5234
|
-
]),
|
|
5323
|
+
])),
|
|
5235
5324
|
_: 1
|
|
5236
5325
|
})
|
|
5237
5326
|
])
|
|
5238
5327
|
]),
|
|
5239
5328
|
default: vue.withCtx(() => [
|
|
5240
5329
|
vue.createElementVNode("div", _hoisted_1$p, [
|
|
5241
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5242
|
-
vue.createVNode(vue.unref(
|
|
5330
|
+
vue.createElementVNode("div", _hoisted_2$d, [
|
|
5331
|
+
vue.createVNode(vue.unref(designPlugin.TMagicTag), {
|
|
5243
5332
|
size: "small",
|
|
5244
5333
|
type: "info"
|
|
5245
5334
|
}, {
|
|
5246
|
-
default: vue.withCtx(() => [
|
|
5335
|
+
default: vue.withCtx(() => _cache[7] || (_cache[7] = [
|
|
5247
5336
|
vue.createTextVNode("修改前")
|
|
5248
|
-
]),
|
|
5337
|
+
])),
|
|
5249
5338
|
_: 1
|
|
5250
5339
|
})
|
|
5251
5340
|
]),
|
|
5252
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
5253
|
-
vue.createVNode(vue.unref(
|
|
5341
|
+
vue.createElementVNode("div", _hoisted_3$3, [
|
|
5342
|
+
vue.createVNode(vue.unref(designPlugin.TMagicTag), {
|
|
5254
5343
|
size: "small",
|
|
5255
5344
|
type: "success"
|
|
5256
5345
|
}, {
|
|
5257
|
-
default: vue.withCtx(() => [
|
|
5346
|
+
default: vue.withCtx(() => _cache[8] || (_cache[8] = [
|
|
5258
5347
|
vue.createTextVNode("修改后")
|
|
5259
|
-
]),
|
|
5348
|
+
])),
|
|
5260
5349
|
_: 1
|
|
5261
5350
|
})
|
|
5262
5351
|
])
|
|
@@ -5281,7 +5370,7 @@
|
|
|
5281
5370
|
});
|
|
5282
5371
|
|
|
5283
5372
|
const _hoisted_1$o = { class: "m-editor-data-source-methods" };
|
|
5284
|
-
const _hoisted_2$
|
|
5373
|
+
const _hoisted_2$c = { class: "m-editor-data-source-methods-footer" };
|
|
5285
5374
|
const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
5286
5375
|
...{
|
|
5287
5376
|
name: "MFieldsDataSourceMethods"
|
|
@@ -5353,21 +5442,21 @@
|
|
|
5353
5442
|
};
|
|
5354
5443
|
return (_ctx, _cache) => {
|
|
5355
5444
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
|
|
5356
|
-
vue.createVNode(vue.unref(
|
|
5445
|
+
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
5357
5446
|
data: _ctx.model[_ctx.name],
|
|
5358
5447
|
columns: methodColumns
|
|
5359
5448
|
}, null, 8, ["data"]),
|
|
5360
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5361
|
-
vue.createVNode(vue.unref(
|
|
5449
|
+
vue.createElementVNode("div", _hoisted_2$c, [
|
|
5450
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5362
5451
|
size: "small",
|
|
5363
5452
|
type: "primary",
|
|
5364
5453
|
disabled: _ctx.disabled,
|
|
5365
5454
|
plain: "",
|
|
5366
5455
|
onClick: createCodeHandler
|
|
5367
5456
|
}, {
|
|
5368
|
-
default: vue.withCtx(() => [
|
|
5457
|
+
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
5369
5458
|
vue.createTextVNode("添加")
|
|
5370
|
-
]),
|
|
5459
|
+
])),
|
|
5371
5460
|
_: 1
|
|
5372
5461
|
}, 8, ["disabled"])
|
|
5373
5462
|
]),
|
|
@@ -5387,7 +5476,7 @@
|
|
|
5387
5476
|
});
|
|
5388
5477
|
|
|
5389
5478
|
const _hoisted_1$n = { class: "m-fields-data-source-method-select" };
|
|
5390
|
-
const _hoisted_2$
|
|
5479
|
+
const _hoisted_2$b = { class: "data-source-method-select-container" };
|
|
5391
5480
|
const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
5392
5481
|
...{
|
|
5393
5482
|
name: "MFieldsDataSourceMethodSelect"
|
|
@@ -5415,7 +5504,7 @@
|
|
|
5415
5504
|
const hasDataSourceSidePanel = vue.computed(
|
|
5416
5505
|
() => (services?.uiService.get("sideBarItems") || []).find((item) => item.$key === SideItemKey.DATA_SOURCE)
|
|
5417
5506
|
);
|
|
5418
|
-
const notEditable = vue.computed(() =>
|
|
5507
|
+
const notEditable = vue.computed(() => formPlugin.filterFunction(mForm, props.config.notEditable, props));
|
|
5419
5508
|
const dataSources = vue.computed(() => dataSourceService?.get("dataSources"));
|
|
5420
5509
|
const isCustomMethod = vue.computed(() => {
|
|
5421
5510
|
const [id, name] = props.model[props.name];
|
|
@@ -5435,7 +5524,7 @@
|
|
|
5435
5524
|
const setParamsConfig = (dataSourceMethod, formState = {}) => {
|
|
5436
5525
|
paramsConfig.value = dataSourceMethod ? getParamItemsConfig(dataSourceMethod) : [];
|
|
5437
5526
|
if (paramsConfig.value.length) {
|
|
5438
|
-
props.model.params =
|
|
5527
|
+
props.model.params = formPlugin.createValues(formState, paramsConfig.value, {}, props.model.params);
|
|
5439
5528
|
} else {
|
|
5440
5529
|
props.model.params = {};
|
|
5441
5530
|
}
|
|
@@ -5475,20 +5564,20 @@
|
|
|
5475
5564
|
};
|
|
5476
5565
|
return (_ctx, _cache) => {
|
|
5477
5566
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$n, [
|
|
5478
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5479
|
-
vue.createVNode(vue.unref(
|
|
5567
|
+
vue.createElementVNode("div", _hoisted_2$b, [
|
|
5568
|
+
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
5480
5569
|
class: "select",
|
|
5481
5570
|
config: cascaderConfig.value,
|
|
5482
5571
|
model: _ctx.model,
|
|
5483
5572
|
size: _ctx.size,
|
|
5484
5573
|
onChange: onChangeHandler
|
|
5485
5574
|
}, null, 8, ["config", "model", "size"]),
|
|
5486
|
-
_ctx.model[_ctx.name] && isCustomMethod.value && hasDataSourceSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
5575
|
+
_ctx.model[_ctx.name] && isCustomMethod.value && hasDataSourceSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
5487
5576
|
key: 0,
|
|
5488
5577
|
content: notEditable.value ? "查看" : "编辑"
|
|
5489
5578
|
}, {
|
|
5490
5579
|
default: vue.withCtx(() => [
|
|
5491
|
-
vue.createVNode(vue.unref(
|
|
5580
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5492
5581
|
class: "m-fields-select-action-button",
|
|
5493
5582
|
size: _ctx.size,
|
|
5494
5583
|
onClick: editCodeHandler
|
|
@@ -5519,7 +5608,7 @@
|
|
|
5519
5608
|
});
|
|
5520
5609
|
|
|
5521
5610
|
const _hoisted_1$m = { class: "m-editor-data-source-fields" };
|
|
5522
|
-
const _hoisted_2$
|
|
5611
|
+
const _hoisted_2$a = { class: "m-editor-data-source-fields-footer" };
|
|
5523
5612
|
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
5524
5613
|
...{
|
|
5525
5614
|
name: "MFieldsDataSourceMocks"
|
|
@@ -5631,7 +5720,7 @@
|
|
|
5631
5720
|
label: "是否启用",
|
|
5632
5721
|
prop: "enable",
|
|
5633
5722
|
type: "component",
|
|
5634
|
-
component:
|
|
5723
|
+
component: designPlugin.TMagicSwitch,
|
|
5635
5724
|
props: (row) => ({
|
|
5636
5725
|
modelValue: row.enable,
|
|
5637
5726
|
activeValue: true,
|
|
@@ -5647,7 +5736,7 @@
|
|
|
5647
5736
|
label: "编辑器中使用",
|
|
5648
5737
|
prop: "useInEditor",
|
|
5649
5738
|
type: "component",
|
|
5650
|
-
component:
|
|
5739
|
+
component: designPlugin.TMagicSwitch,
|
|
5651
5740
|
props: (row) => ({
|
|
5652
5741
|
modelValue: row.useInEditor,
|
|
5653
5742
|
activeValue: true,
|
|
@@ -5679,7 +5768,7 @@
|
|
|
5679
5768
|
text: "删除",
|
|
5680
5769
|
buttonType: "danger",
|
|
5681
5770
|
handler: async (row, index) => {
|
|
5682
|
-
await
|
|
5771
|
+
await designPlugin.tMagicMessageBox.confirm(`确定删除${row.title}?`, "提示");
|
|
5683
5772
|
props.model[props.name].splice(index, 1);
|
|
5684
5773
|
emit("change", props.model[props.name]);
|
|
5685
5774
|
}
|
|
@@ -5725,21 +5814,21 @@
|
|
|
5725
5814
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
|
|
5726
5815
|
return (_ctx, _cache) => {
|
|
5727
5816
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
|
|
5728
|
-
vue.createVNode(vue.unref(
|
|
5817
|
+
vue.createVNode(vue.unref(tablePlugin.MagicTable), {
|
|
5729
5818
|
data: _ctx.model[_ctx.name],
|
|
5730
5819
|
columns
|
|
5731
5820
|
}, null, 8, ["data"]),
|
|
5732
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5733
|
-
vue.createVNode(vue.unref(
|
|
5821
|
+
vue.createElementVNode("div", _hoisted_2$a, [
|
|
5822
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5734
5823
|
size: "small",
|
|
5735
5824
|
type: "primary",
|
|
5736
5825
|
disabled: _ctx.disabled,
|
|
5737
5826
|
plain: "",
|
|
5738
5827
|
onClick: _cache[0] || (_cache[0] = ($event) => newHandler())
|
|
5739
5828
|
}, {
|
|
5740
|
-
default: vue.withCtx(() => [
|
|
5829
|
+
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
|
5741
5830
|
vue.createTextVNode("添加")
|
|
5742
|
-
]),
|
|
5831
|
+
])),
|
|
5743
5832
|
_: 1
|
|
5744
5833
|
}, 8, ["disabled"])
|
|
5745
5834
|
]),
|
|
@@ -5754,7 +5843,7 @@
|
|
|
5754
5843
|
position: vue.unref(boxPosition)
|
|
5755
5844
|
}, {
|
|
5756
5845
|
body: vue.withCtx(() => [
|
|
5757
|
-
vue.createVNode(vue.unref(
|
|
5846
|
+
vue.createVNode(vue.unref(formPlugin.MFormBox), {
|
|
5758
5847
|
ref: "addDialog",
|
|
5759
5848
|
"label-width": "120px",
|
|
5760
5849
|
config: formConfig,
|
|
@@ -5796,7 +5885,7 @@
|
|
|
5796
5885
|
const { dataSourceService, uiService } = vue.inject("services") || {};
|
|
5797
5886
|
const eventBus = vue.inject("eventBus");
|
|
5798
5887
|
const dataSources = vue.computed(() => dataSourceService?.get("dataSources") || []);
|
|
5799
|
-
const notEditable = vue.computed(() =>
|
|
5888
|
+
const notEditable = vue.computed(() => formPlugin.filterFunction(mForm, props.config.notEditable, props));
|
|
5800
5889
|
const hasDataSourceSidePanel = vue.computed(
|
|
5801
5890
|
() => (uiService?.get("sideBarItems") || []).find((item) => item.$key === SideItemKey.DATA_SOURCE)
|
|
5802
5891
|
);
|
|
@@ -5830,7 +5919,7 @@
|
|
|
5830
5919
|
};
|
|
5831
5920
|
return (_ctx, _cache) => {
|
|
5832
5921
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
|
|
5833
|
-
vue.createVNode(vue.unref(
|
|
5922
|
+
vue.createVNode(vue.unref(formPlugin.MSelect), {
|
|
5834
5923
|
model: _ctx.model,
|
|
5835
5924
|
name: _ctx.name,
|
|
5836
5925
|
size: _ctx.size,
|
|
@@ -5840,12 +5929,12 @@
|
|
|
5840
5929
|
"last-values": _ctx.lastValues,
|
|
5841
5930
|
onChange: changeHandler
|
|
5842
5931
|
}, null, 8, ["model", "name", "size", "prop", "disabled", "config", "last-values"]),
|
|
5843
|
-
_ctx.model[_ctx.name] && hasDataSourceSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
5932
|
+
_ctx.model[_ctx.name] && hasDataSourceSidePanel.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
5844
5933
|
key: 0,
|
|
5845
5934
|
content: notEditable.value ? "查看" : "编辑"
|
|
5846
5935
|
}, {
|
|
5847
5936
|
default: vue.withCtx(() => [
|
|
5848
|
-
vue.createVNode(vue.unref(
|
|
5937
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
5849
5938
|
class: "m-fields-select-action-button",
|
|
5850
5939
|
size: _ctx.size,
|
|
5851
5940
|
onClick: editHandler
|
|
@@ -5887,7 +5976,7 @@
|
|
|
5887
5976
|
const props = __props;
|
|
5888
5977
|
const { dataSourceService } = vue.inject("services") || {};
|
|
5889
5978
|
const mForm = vue.inject("mForm");
|
|
5890
|
-
const parentFields = vue.computed(() =>
|
|
5979
|
+
const parentFields = vue.computed(() => formPlugin.filterFunction(mForm, props.config.parentFields, props) || []);
|
|
5891
5980
|
const config = vue.computed(() => ({
|
|
5892
5981
|
type: "groupList",
|
|
5893
5982
|
name: props.name,
|
|
@@ -5978,7 +6067,7 @@
|
|
|
5978
6067
|
emit("change", v);
|
|
5979
6068
|
};
|
|
5980
6069
|
return (_ctx, _cache) => {
|
|
5981
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
6070
|
+
return vue.openBlock(), vue.createBlock(vue.unref(formPlugin.MGroupList), {
|
|
5982
6071
|
style: { "width": "100%" },
|
|
5983
6072
|
config: config.value,
|
|
5984
6073
|
name: _ctx.name,
|
|
@@ -5994,7 +6083,7 @@
|
|
|
5994
6083
|
});
|
|
5995
6084
|
|
|
5996
6085
|
const _hoisted_1$k = { class: "m-fields-event-select" };
|
|
5997
|
-
const _hoisted_2$
|
|
6086
|
+
const _hoisted_2$9 = {
|
|
5998
6087
|
key: 1,
|
|
5999
6088
|
class: "fullWidth"
|
|
6000
6089
|
};
|
|
@@ -6052,7 +6141,7 @@
|
|
|
6052
6141
|
}
|
|
6053
6142
|
];
|
|
6054
6143
|
pageFragment.items.forEach((node) => {
|
|
6055
|
-
traverseNode(node, (node2) => {
|
|
6144
|
+
utils.traverseNode(node, (node2) => {
|
|
6056
6145
|
const nodeEvents = node2.type && eventsService.getEvent(node2.type) || [];
|
|
6057
6146
|
events.push({
|
|
6058
6147
|
label: `${node2.name}_${node2.id}`,
|
|
@@ -6094,24 +6183,24 @@
|
|
|
6094
6183
|
name: "actionType",
|
|
6095
6184
|
text: "联动类型",
|
|
6096
6185
|
type: "select",
|
|
6097
|
-
defaultValue:
|
|
6186
|
+
defaultValue: core.ActionType.COMP,
|
|
6098
6187
|
options: () => [
|
|
6099
6188
|
{
|
|
6100
6189
|
text: "组件",
|
|
6101
6190
|
label: "组件",
|
|
6102
|
-
value:
|
|
6191
|
+
value: core.ActionType.COMP
|
|
6103
6192
|
},
|
|
6104
6193
|
{
|
|
6105
6194
|
text: "代码",
|
|
6106
6195
|
label: "代码",
|
|
6107
6196
|
disabled: !Object.keys(codeBlockService?.getCodeDsl() || {}).length,
|
|
6108
|
-
value:
|
|
6197
|
+
value: core.ActionType.CODE
|
|
6109
6198
|
},
|
|
6110
6199
|
{
|
|
6111
6200
|
text: "数据源",
|
|
6112
6201
|
label: "数据源",
|
|
6113
6202
|
disabled: !dataSourceService?.get("dataSources")?.filter((ds) => ds.methods?.length || dataSourceService?.getFormMethod(ds.type).length).length,
|
|
6114
|
-
value:
|
|
6203
|
+
value: core.ActionType.DATA_SOURCE
|
|
6115
6204
|
}
|
|
6116
6205
|
]
|
|
6117
6206
|
};
|
|
@@ -6122,7 +6211,7 @@
|
|
|
6122
6211
|
name: "to",
|
|
6123
6212
|
text: "联动组件",
|
|
6124
6213
|
type: "ui-select",
|
|
6125
|
-
display: (mForm, { model }) => model.actionType ===
|
|
6214
|
+
display: (mForm, { model }) => model.actionType === core.ActionType.COMP,
|
|
6126
6215
|
onChange: (MForm, v, { model }) => {
|
|
6127
6216
|
model.method = "";
|
|
6128
6217
|
return v;
|
|
@@ -6142,7 +6231,7 @@
|
|
|
6142
6231
|
return "select";
|
|
6143
6232
|
},
|
|
6144
6233
|
checkStrictly: () => props.config.src !== "component",
|
|
6145
|
-
display: (mForm, { model }) => model.actionType ===
|
|
6234
|
+
display: (mForm, { model }) => model.actionType === core.ActionType.COMP,
|
|
6146
6235
|
options: (mForm, { model }) => {
|
|
6147
6236
|
const node = editorService?.getNodeById(model.to);
|
|
6148
6237
|
if (!node?.type) return [];
|
|
@@ -6153,7 +6242,7 @@
|
|
|
6153
6242
|
if (pageFragment) {
|
|
6154
6243
|
methods = [];
|
|
6155
6244
|
pageFragment.items.forEach((node2) => {
|
|
6156
|
-
traverseNode(node2, (node3) => {
|
|
6245
|
+
utils.traverseNode(node2, (node3) => {
|
|
6157
6246
|
const nodeMethods = node3.type && eventsService?.getMethod(node3.type) || [];
|
|
6158
6247
|
if (nodeMethods.length) {
|
|
6159
6248
|
methods.push({
|
|
@@ -6181,7 +6270,7 @@
|
|
|
6181
6270
|
text: "代码块",
|
|
6182
6271
|
name: "codeId",
|
|
6183
6272
|
notEditable: () => !codeBlockService?.getEditStatus(),
|
|
6184
|
-
display: (mForm, { model }) => model.actionType ===
|
|
6273
|
+
display: (mForm, { model }) => model.actionType === core.ActionType.CODE
|
|
6185
6274
|
};
|
|
6186
6275
|
return { ...defaultCodeActionConfig, ...props.config.codeActionConfig };
|
|
6187
6276
|
});
|
|
@@ -6191,7 +6280,7 @@
|
|
|
6191
6280
|
text: "数据源方法",
|
|
6192
6281
|
name: "dataSourceMethod",
|
|
6193
6282
|
notEditable: () => !services?.dataSourceService.get("editable"),
|
|
6194
|
-
display: (mForm, { model }) => model.actionType ===
|
|
6283
|
+
display: (mForm, { model }) => model.actionType === core.ActionType.DATA_SOURCE
|
|
6195
6284
|
};
|
|
6196
6285
|
return { ...defaultDataSourceActionConfig, ...props.config.dataSourceActionConfig };
|
|
6197
6286
|
});
|
|
@@ -6282,21 +6371,21 @@
|
|
|
6282
6371
|
model: _ctx.model,
|
|
6283
6372
|
config: tableConfig.value,
|
|
6284
6373
|
onChange: onChangeHandler
|
|
6285
|
-
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
6286
|
-
vue.createVNode(vue.unref(
|
|
6374
|
+
}, null, 8, ["size", "disabled", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$9, [
|
|
6375
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6287
6376
|
class: "create-button",
|
|
6288
6377
|
type: "primary",
|
|
6289
6378
|
size: _ctx.size,
|
|
6290
6379
|
disabled: _ctx.disabled,
|
|
6291
6380
|
onClick: _cache[0] || (_cache[0] = ($event) => addEvent())
|
|
6292
6381
|
}, {
|
|
6293
|
-
default: vue.withCtx(() => [
|
|
6382
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
6294
6383
|
vue.createTextVNode("添加事件")
|
|
6295
|
-
]),
|
|
6384
|
+
])),
|
|
6296
6385
|
_: 1
|
|
6297
6386
|
}, 8, ["size", "disabled"]),
|
|
6298
6387
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.model[_ctx.name], (cardItem, index) => {
|
|
6299
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
6388
|
+
return vue.openBlock(), vue.createBlock(vue.unref(formPlugin.MPanel), {
|
|
6300
6389
|
key: index,
|
|
6301
6390
|
disabled: _ctx.disabled,
|
|
6302
6391
|
size: _ctx.size,
|
|
@@ -6306,7 +6395,7 @@
|
|
|
6306
6395
|
onChange: onChangeHandler
|
|
6307
6396
|
}, {
|
|
6308
6397
|
header: vue.withCtx(() => [
|
|
6309
|
-
vue.createVNode(vue.unref(
|
|
6398
|
+
vue.createVNode(vue.unref(formPlugin.MContainer), {
|
|
6310
6399
|
class: "fullWidth",
|
|
6311
6400
|
config: eventNameConfig.value,
|
|
6312
6401
|
model: cardItem,
|
|
@@ -6314,7 +6403,7 @@
|
|
|
6314
6403
|
size: _ctx.size,
|
|
6315
6404
|
onChange: onChangeHandler
|
|
6316
6405
|
}, null, 8, ["config", "model", "disabled", "size"]),
|
|
6317
|
-
vue.createVNode(vue.unref(
|
|
6406
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6318
6407
|
style: { "color": "#f56c6c" },
|
|
6319
6408
|
link: "",
|
|
6320
6409
|
icon: vue.unref(iconsVue.Delete),
|
|
@@ -6338,10 +6427,6 @@
|
|
|
6338
6427
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6339
6428
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
6340
6429
|
};
|
|
6341
|
-
const _hoisted_2$c = /* @__PURE__ */ vue.createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2);
|
|
6342
|
-
const _hoisted_4$6 = [
|
|
6343
|
-
_hoisted_2$c
|
|
6344
|
-
];
|
|
6345
6430
|
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
6346
6431
|
...{
|
|
6347
6432
|
name: "MEditorCodeIcon"
|
|
@@ -6349,14 +6434,15 @@
|
|
|
6349
6434
|
__name: "CodeIcon",
|
|
6350
6435
|
setup(__props) {
|
|
6351
6436
|
return (_ctx, _cache) => {
|
|
6352
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$j,
|
|
6437
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$j, _cache[0] || (_cache[0] = [
|
|
6438
|
+
vue.createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2)
|
|
6439
|
+
]));
|
|
6353
6440
|
};
|
|
6354
6441
|
}
|
|
6355
6442
|
});
|
|
6356
6443
|
|
|
6357
6444
|
const _hoisted_1$i = { class: "m-fields-key-value" };
|
|
6358
|
-
const _hoisted_2$
|
|
6359
|
-
const _hoisted_3$6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
|
|
6445
|
+
const _hoisted_2$8 = { key: 0 };
|
|
6360
6446
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
6361
6447
|
...{
|
|
6362
6448
|
name: "MFieldsKeyValue"
|
|
@@ -6416,13 +6502,13 @@
|
|
|
6416
6502
|
};
|
|
6417
6503
|
return (_ctx, _cache) => {
|
|
6418
6504
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
|
|
6419
|
-
!showCode.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
6505
|
+
!showCode.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$8, [
|
|
6420
6506
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(records.value, (item, index) => {
|
|
6421
6507
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6422
6508
|
class: "m-fields-key-value-item",
|
|
6423
6509
|
key: index
|
|
6424
6510
|
}, [
|
|
6425
|
-
vue.createVNode(vue.unref(
|
|
6511
|
+
vue.createVNode(vue.unref(designPlugin.TMagicInput), {
|
|
6426
6512
|
placeholder: "key",
|
|
6427
6513
|
modelValue: records.value[index][0],
|
|
6428
6514
|
"onUpdate:modelValue": ($event) => records.value[index][0] = $event,
|
|
@@ -6430,8 +6516,8 @@
|
|
|
6430
6516
|
size: _ctx.size,
|
|
6431
6517
|
onChange: keyChangeHandler
|
|
6432
6518
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
6433
|
-
|
|
6434
|
-
vue.createVNode(vue.unref(
|
|
6519
|
+
_cache[1] || (_cache[1] = vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1)),
|
|
6520
|
+
vue.createVNode(vue.unref(designPlugin.TMagicInput), {
|
|
6435
6521
|
placeholder: "value",
|
|
6436
6522
|
modelValue: records.value[index][1],
|
|
6437
6523
|
"onUpdate:modelValue": ($event) => records.value[index][1] = $event,
|
|
@@ -6439,7 +6525,7 @@
|
|
|
6439
6525
|
size: _ctx.size,
|
|
6440
6526
|
onChange: valueChangeHandler
|
|
6441
6527
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
|
|
6442
|
-
vue.createVNode(vue.unref(
|
|
6528
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6443
6529
|
class: "m-fileds-key-value-delete",
|
|
6444
6530
|
type: "danger",
|
|
6445
6531
|
size: _ctx.size,
|
|
@@ -6451,7 +6537,7 @@
|
|
|
6451
6537
|
}, null, 8, ["size", "disabled", "icon", "onClick"])
|
|
6452
6538
|
]);
|
|
6453
6539
|
}), 128)),
|
|
6454
|
-
vue.createVNode(vue.unref(
|
|
6540
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6455
6541
|
type: "primary",
|
|
6456
6542
|
size: _ctx.size,
|
|
6457
6543
|
disabled: _ctx.disabled,
|
|
@@ -6459,9 +6545,9 @@
|
|
|
6459
6545
|
icon: vue.unref(iconsVue.Plus),
|
|
6460
6546
|
onClick: addHandler
|
|
6461
6547
|
}, {
|
|
6462
|
-
default: vue.withCtx(() => [
|
|
6548
|
+
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
6463
6549
|
vue.createTextVNode("添加")
|
|
6464
|
-
]),
|
|
6550
|
+
])),
|
|
6465
6551
|
_: 1
|
|
6466
6552
|
}, 8, ["size", "disabled", "icon"])
|
|
6467
6553
|
])) : vue.createCommentVNode("", true),
|
|
@@ -6476,7 +6562,7 @@
|
|
|
6476
6562
|
parse: true,
|
|
6477
6563
|
onSave: save
|
|
6478
6564
|
}, null, 8, ["init-values", "options"])) : vue.createCommentVNode("", true),
|
|
6479
|
-
_ctx.config.advanced ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
6565
|
+
_ctx.config.advanced ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
6480
6566
|
key: 2,
|
|
6481
6567
|
size: "default",
|
|
6482
6568
|
disabled: _ctx.disabled,
|
|
@@ -6490,7 +6576,7 @@
|
|
|
6490
6576
|
});
|
|
6491
6577
|
|
|
6492
6578
|
const _hoisted_1$h = { class: "m-fields-page-fragment-select" };
|
|
6493
|
-
const _hoisted_2$
|
|
6579
|
+
const _hoisted_2$7 = { class: "page-fragment-select-container" };
|
|
6494
6580
|
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
6495
6581
|
...{
|
|
6496
6582
|
name: "MFieldsPageFragmentSelect"
|
|
@@ -6513,7 +6599,7 @@
|
|
|
6513
6599
|
const emit = __emit;
|
|
6514
6600
|
const props = __props;
|
|
6515
6601
|
const pageList = vue.computed(
|
|
6516
|
-
() => services?.editorService.get("root")?.items.filter((item) => item.type ===
|
|
6602
|
+
() => services?.editorService.get("root")?.items.filter((item) => item.type === core.NodeType.PAGE_FRAGMENT)
|
|
6517
6603
|
);
|
|
6518
6604
|
const selectConfig = {
|
|
6519
6605
|
type: "select",
|
|
@@ -6538,7 +6624,7 @@
|
|
|
6538
6624
|
return (_ctx, _cache) => {
|
|
6539
6625
|
const _component_m_form_container = vue.resolveComponent("m-form-container");
|
|
6540
6626
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
|
|
6541
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
6627
|
+
vue.createElementVNode("div", _hoisted_2$7, [
|
|
6542
6628
|
vue.createVNode(_component_m_form_container, {
|
|
6543
6629
|
class: "select",
|
|
6544
6630
|
config: selectConfig,
|
|
@@ -6645,7 +6731,7 @@
|
|
|
6645
6731
|
class: "m-fields-ui-select",
|
|
6646
6732
|
onClick: cancelHandler
|
|
6647
6733
|
}, [
|
|
6648
|
-
vue.createVNode(vue.unref(
|
|
6734
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6649
6735
|
type: "danger",
|
|
6650
6736
|
icon: vue.unref(iconsVue.Delete),
|
|
6651
6737
|
disabled: _ctx.disabled,
|
|
@@ -6653,19 +6739,19 @@
|
|
|
6653
6739
|
link: "",
|
|
6654
6740
|
style: { "padding": "0" }
|
|
6655
6741
|
}, {
|
|
6656
|
-
default: vue.withCtx(() => [
|
|
6742
|
+
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
6657
6743
|
vue.createTextVNode("取消")
|
|
6658
|
-
]),
|
|
6744
|
+
])),
|
|
6659
6745
|
_: 1
|
|
6660
6746
|
}, 8, ["icon", "disabled", "size"])
|
|
6661
6747
|
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
|
|
6662
6748
|
val.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
6663
|
-
vue.createVNode(vue.unref(
|
|
6749
|
+
vue.createVNode(vue.unref(designPlugin.TMagicTooltip), {
|
|
6664
6750
|
content: "清除",
|
|
6665
6751
|
placement: "top"
|
|
6666
6752
|
}, {
|
|
6667
6753
|
default: vue.withCtx(() => [
|
|
6668
|
-
vue.createVNode(vue.unref(
|
|
6754
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6669
6755
|
style: { "padding": "0" },
|
|
6670
6756
|
type: "danger",
|
|
6671
6757
|
icon: vue.unref(iconsVue.Close),
|
|
@@ -6677,12 +6763,12 @@
|
|
|
6677
6763
|
]),
|
|
6678
6764
|
_: 1
|
|
6679
6765
|
}),
|
|
6680
|
-
vue.createVNode(vue.unref(
|
|
6766
|
+
vue.createVNode(vue.unref(designPlugin.TMagicTooltip), {
|
|
6681
6767
|
content: "点击选中组件",
|
|
6682
6768
|
placement: "top"
|
|
6683
6769
|
}, {
|
|
6684
6770
|
default: vue.withCtx(() => [
|
|
6685
|
-
vue.createVNode(vue.unref(
|
|
6771
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6686
6772
|
link: "",
|
|
6687
6773
|
style: { "padding": "0", "margin": "0" },
|
|
6688
6774
|
disabled: _ctx.disabled,
|
|
@@ -6699,22 +6785,22 @@
|
|
|
6699
6785
|
]),
|
|
6700
6786
|
_: 1
|
|
6701
6787
|
})
|
|
6702
|
-
], 64)) : (vue.openBlock(), vue.createBlock(vue.unref(
|
|
6788
|
+
], 64)) : (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
6703
6789
|
key: 1,
|
|
6704
6790
|
content: "点击此处选择",
|
|
6705
6791
|
placement: "top"
|
|
6706
6792
|
}, {
|
|
6707
6793
|
default: vue.withCtx(() => [
|
|
6708
|
-
vue.createVNode(vue.unref(
|
|
6794
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
6709
6795
|
link: "",
|
|
6710
6796
|
style: { "padding": "0", "margin": "0" },
|
|
6711
6797
|
disabled: _ctx.disabled,
|
|
6712
6798
|
size: _ctx.size,
|
|
6713
6799
|
onClick: startSelect
|
|
6714
6800
|
}, {
|
|
6715
|
-
default: vue.withCtx(() => [
|
|
6801
|
+
default: vue.withCtx(() => _cache[3] || (_cache[3] = [
|
|
6716
6802
|
vue.createTextVNode("点击此处选择")
|
|
6717
|
-
]),
|
|
6803
|
+
])),
|
|
6718
6804
|
_: 1
|
|
6719
6805
|
}, 8, ["disabled", "size"])
|
|
6720
6806
|
]),
|
|
@@ -6725,32 +6811,6 @@
|
|
|
6725
6811
|
}
|
|
6726
6812
|
});
|
|
6727
6813
|
|
|
6728
|
-
const useGetSo = (target, emit) => {
|
|
6729
|
-
let getso;
|
|
6730
|
-
const isDraging = vue.ref(false);
|
|
6731
|
-
vue.onMounted(() => {
|
|
6732
|
-
if (!target.value) return;
|
|
6733
|
-
getso = new Gesto(target.value, {
|
|
6734
|
-
container: window,
|
|
6735
|
-
pinchOutside: true
|
|
6736
|
-
}).on("drag", (e) => {
|
|
6737
|
-
if (!target.value) return;
|
|
6738
|
-
emit("change", e);
|
|
6739
|
-
}).on("dragStart", () => {
|
|
6740
|
-
isDraging.value = true;
|
|
6741
|
-
}).on("dragEnd", () => {
|
|
6742
|
-
isDraging.value = false;
|
|
6743
|
-
});
|
|
6744
|
-
});
|
|
6745
|
-
vue.onBeforeUnmount(() => {
|
|
6746
|
-
getso?.unset();
|
|
6747
|
-
isDraging.value = false;
|
|
6748
|
-
});
|
|
6749
|
-
return {
|
|
6750
|
-
isDraging
|
|
6751
|
-
};
|
|
6752
|
-
};
|
|
6753
|
-
|
|
6754
6814
|
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
6755
6815
|
...{
|
|
6756
6816
|
name: "MEditorResizer"
|
|
@@ -6937,7 +6997,7 @@
|
|
|
6937
6997
|
key: 1,
|
|
6938
6998
|
class: "menu-item-text"
|
|
6939
6999
|
};
|
|
6940
|
-
const _hoisted_2$
|
|
7000
|
+
const _hoisted_2$6 = { class: "el-dropdown-link menubar-menu-button" };
|
|
6941
7001
|
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
6942
7002
|
...{
|
|
6943
7003
|
name: "MEditorToolButton"
|
|
@@ -7006,18 +7066,18 @@
|
|
|
7006
7066
|
onMousedown: _cache[1] || (_cache[1] = ($event) => mousedownHandler(_ctx.data, $event)),
|
|
7007
7067
|
onMouseup: _cache[2] || (_cache[2] = ($event) => mouseupHandler(_ctx.data, $event))
|
|
7008
7068
|
}, [
|
|
7009
|
-
_ctx.data.type === "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
7069
|
+
_ctx.data.type === "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicDivider), {
|
|
7010
7070
|
key: 0,
|
|
7011
7071
|
direction: _ctx.data.direction || "vertical"
|
|
7012
7072
|
}, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, vue.toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
7013
|
-
_ctx.data.tooltip ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
7073
|
+
_ctx.data.tooltip ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
7014
7074
|
key: 0,
|
|
7015
7075
|
effect: "dark",
|
|
7016
7076
|
placement: "bottom-start",
|
|
7017
7077
|
content: _ctx.data.tooltip
|
|
7018
7078
|
}, {
|
|
7019
7079
|
default: vue.withCtx(() => [
|
|
7020
|
-
vue.createVNode(vue.unref(
|
|
7080
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
7021
7081
|
size: "small",
|
|
7022
7082
|
link: "",
|
|
7023
7083
|
disabled: disabled.value
|
|
@@ -7033,7 +7093,7 @@
|
|
|
7033
7093
|
}, 8, ["disabled"])
|
|
7034
7094
|
]),
|
|
7035
7095
|
_: 1
|
|
7036
|
-
}, 8, ["content"])) : (vue.openBlock(), vue.createBlock(vue.unref(
|
|
7096
|
+
}, 8, ["content"])) : (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
7037
7097
|
key: 1,
|
|
7038
7098
|
size: "small",
|
|
7039
7099
|
link: "",
|
|
@@ -7049,17 +7109,17 @@
|
|
|
7049
7109
|
]),
|
|
7050
7110
|
_: 1
|
|
7051
7111
|
}, 8, ["disabled", "title"]))
|
|
7052
|
-
], 64)) : _ctx.data.type === "dropdown" ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
7112
|
+
], 64)) : _ctx.data.type === "dropdown" ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicDropdown), {
|
|
7053
7113
|
key: 3,
|
|
7054
7114
|
trigger: "click",
|
|
7055
7115
|
disabled: disabled.value,
|
|
7056
7116
|
onCommand: dropdownHandler
|
|
7057
7117
|
}, {
|
|
7058
7118
|
dropdown: vue.withCtx(() => [
|
|
7059
|
-
_ctx.data.items && _ctx.data.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
7119
|
+
_ctx.data.items && _ctx.data.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicDropdownMenu), { key: 0 }, {
|
|
7060
7120
|
default: vue.withCtx(() => [
|
|
7061
7121
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data.items, (subItem, index) => {
|
|
7062
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
7122
|
+
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicDropdownItem), {
|
|
7063
7123
|
key: index,
|
|
7064
7124
|
command: { data: _ctx.data, subItem }
|
|
7065
7125
|
}, {
|
|
@@ -7074,9 +7134,9 @@
|
|
|
7074
7134
|
})) : vue.createCommentVNode("", true)
|
|
7075
7135
|
]),
|
|
7076
7136
|
default: vue.withCtx(() => [
|
|
7077
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
7137
|
+
vue.createElementVNode("span", _hoisted_2$6, [
|
|
7078
7138
|
vue.createTextVNode(vue.toDisplayString(_ctx.data.text), 1),
|
|
7079
|
-
vue.createVNode(vue.unref(
|
|
7139
|
+
vue.createVNode(vue.unref(designPlugin.TMagicIcon), { class: "el-icon--right" }, {
|
|
7080
7140
|
default: vue.withCtx(() => [
|
|
7081
7141
|
vue.createVNode(vue.unref(iconsVue.ArrowDown))
|
|
7082
7142
|
]),
|
|
@@ -7244,7 +7304,7 @@
|
|
|
7244
7304
|
vue.watch(
|
|
7245
7305
|
() => props.type,
|
|
7246
7306
|
(type) => {
|
|
7247
|
-
if (type ===
|
|
7307
|
+
if (type === core.NodeType.PAGE) {
|
|
7248
7308
|
unWatchPageFragmentLength?.();
|
|
7249
7309
|
unWatchPageFragmentLength = null;
|
|
7250
7310
|
unWatchPageLength = crateWatchLength(pageLength);
|
|
@@ -7272,7 +7332,7 @@
|
|
|
7272
7332
|
}, [
|
|
7273
7333
|
vue.createVNode(_sfc_main$Y, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
|
|
7274
7334
|
])) : vue.createCommentVNode("", true),
|
|
7275
|
-
_ctx.type === vue.unref(
|
|
7335
|
+
_ctx.type === vue.unref(core.NodeType).PAGE && pageLength.value || _ctx.type === vue.unref(core.NodeType).PAGE_FRAGMENT && pageFragmentLength.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
7276
7336
|
key: 1,
|
|
7277
7337
|
class: "m-editor-page-bar-items",
|
|
7278
7338
|
ref_key: "itemsContainer",
|
|
@@ -7316,14 +7376,15 @@
|
|
|
7316
7376
|
};
|
|
7317
7377
|
return (_ctx, _cache) => {
|
|
7318
7378
|
return showPageListButton.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
|
|
7319
|
-
vue.createVNode(vue.unref(
|
|
7379
|
+
vue.createVNode(vue.unref(designPlugin.TMagicPopover), {
|
|
7320
7380
|
"popper-class": "page-bar-popover",
|
|
7321
7381
|
placement: "top",
|
|
7382
|
+
trigger: "hover",
|
|
7322
7383
|
width: 160,
|
|
7323
|
-
|
|
7384
|
+
"destroy-on-close": true
|
|
7324
7385
|
}, {
|
|
7325
7386
|
reference: vue.withCtx(() => [
|
|
7326
|
-
vue.createVNode(vue.unref(
|
|
7387
|
+
vue.createVNode(vue.unref(designPlugin.TMagicIcon), { class: "m-editor-page-list-menu-icon" }, {
|
|
7327
7388
|
default: vue.withCtx(() => [
|
|
7328
7389
|
vue.createVNode(vue.unref(iconsVue.Files))
|
|
7329
7390
|
]),
|
|
@@ -7365,11 +7426,11 @@
|
|
|
7365
7426
|
setup(__props, { emit: __emit }) {
|
|
7366
7427
|
const data = [
|
|
7367
7428
|
{
|
|
7368
|
-
type:
|
|
7429
|
+
type: core.NodeType.PAGE,
|
|
7369
7430
|
text: "页面"
|
|
7370
7431
|
},
|
|
7371
7432
|
{
|
|
7372
|
-
type:
|
|
7433
|
+
type: core.NodeType.PAGE_FRAGMENT,
|
|
7373
7434
|
text: "页面片"
|
|
7374
7435
|
}
|
|
7375
7436
|
];
|
|
@@ -7379,7 +7440,7 @@
|
|
|
7379
7440
|
};
|
|
7380
7441
|
return (_ctx, _cache) => {
|
|
7381
7442
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(data, (item) => {
|
|
7382
|
-
return vue.createVNode(vue.unref(
|
|
7443
|
+
return vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
7383
7444
|
class: vue.normalizeClass(["m-editor-page-bar-switch-type-button", { active: _ctx.modelValue === item.type }]),
|
|
7384
7445
|
size: "small",
|
|
7385
7446
|
key: item.type,
|
|
@@ -7398,9 +7459,9 @@
|
|
|
7398
7459
|
});
|
|
7399
7460
|
|
|
7400
7461
|
const _hoisted_1$c = { class: "m-editor-page-bar-tabs" };
|
|
7401
|
-
const _hoisted_2$
|
|
7402
|
-
const _hoisted_3$
|
|
7403
|
-
const _hoisted_4$
|
|
7462
|
+
const _hoisted_2$5 = ["page-id", "onClick"];
|
|
7463
|
+
const _hoisted_3$2 = { class: "m-editor-page-bar-title" };
|
|
7464
|
+
const _hoisted_4$2 = ["title"];
|
|
7404
7465
|
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
7405
7466
|
...{
|
|
7406
7467
|
name: "MEditorPageBar"
|
|
@@ -7411,37 +7472,37 @@
|
|
|
7411
7472
|
pageBarSortOptions: {}
|
|
7412
7473
|
},
|
|
7413
7474
|
setup(__props) {
|
|
7414
|
-
const active = vue.ref(
|
|
7475
|
+
const active = vue.ref(core.NodeType.PAGE);
|
|
7415
7476
|
const services = vue.inject("services");
|
|
7416
7477
|
const editorService = services?.editorService;
|
|
7417
7478
|
const root = vue.computed(() => editorService?.get("root"));
|
|
7418
7479
|
const page = vue.computed(() => editorService?.get("page"));
|
|
7419
7480
|
const pageList = vue.computed(() => getPageList(root.value));
|
|
7420
7481
|
const pageFragmentList = vue.computed(() => getPageFragmentList(root.value));
|
|
7421
|
-
const list = vue.computed(() => active.value ===
|
|
7482
|
+
const list = vue.computed(() => active.value === core.NodeType.PAGE ? pageList.value : pageFragmentList.value);
|
|
7422
7483
|
const activePage = vue.ref("");
|
|
7423
7484
|
const activePageFragment = vue.ref("");
|
|
7424
7485
|
vue.watch(
|
|
7425
7486
|
page,
|
|
7426
7487
|
(page2) => {
|
|
7427
7488
|
if (!page2) {
|
|
7428
|
-
if (active.value ===
|
|
7489
|
+
if (active.value === core.NodeType.PAGE) {
|
|
7429
7490
|
activePage.value = "";
|
|
7430
7491
|
}
|
|
7431
|
-
if (active.value ===
|
|
7492
|
+
if (active.value === core.NodeType.PAGE_FRAGMENT) {
|
|
7432
7493
|
activePageFragment.value = "";
|
|
7433
7494
|
}
|
|
7434
7495
|
return;
|
|
7435
7496
|
}
|
|
7436
7497
|
if (utils.isPage(page2)) {
|
|
7437
7498
|
activePage.value = page2?.id;
|
|
7438
|
-
if (active.value !==
|
|
7439
|
-
active.value =
|
|
7499
|
+
if (active.value !== core.NodeType.PAGE) {
|
|
7500
|
+
active.value = core.NodeType.PAGE;
|
|
7440
7501
|
}
|
|
7441
7502
|
} else if (utils.isPageFragment(page2)) {
|
|
7442
7503
|
activePageFragment.value = page2?.id;
|
|
7443
|
-
if (active.value !==
|
|
7444
|
-
active.value =
|
|
7504
|
+
if (active.value !== core.NodeType.PAGE_FRAGMENT) {
|
|
7505
|
+
active.value = core.NodeType.PAGE_FRAGMENT;
|
|
7445
7506
|
}
|
|
7446
7507
|
}
|
|
7447
7508
|
},
|
|
@@ -7450,7 +7511,7 @@
|
|
|
7450
7511
|
}
|
|
7451
7512
|
);
|
|
7452
7513
|
vue.watch(active, (active2) => {
|
|
7453
|
-
if (active2 ===
|
|
7514
|
+
if (active2 === core.NodeType.PAGE) {
|
|
7454
7515
|
if (!activePage.value && !pageList.value.length) {
|
|
7455
7516
|
editorService?.selectRoot();
|
|
7456
7517
|
return;
|
|
@@ -7458,7 +7519,7 @@
|
|
|
7458
7519
|
switchPage(activePage.value);
|
|
7459
7520
|
return;
|
|
7460
7521
|
}
|
|
7461
|
-
if (active2 ===
|
|
7522
|
+
if (active2 === core.NodeType.PAGE_FRAGMENT) {
|
|
7462
7523
|
if (!activePageFragment.value && !pageFragmentList.value.length) {
|
|
7463
7524
|
editorService?.selectRoot();
|
|
7464
7525
|
return;
|
|
@@ -7507,21 +7568,22 @@
|
|
|
7507
7568
|
"page-id": item.id,
|
|
7508
7569
|
onClick: ($event) => switchPage(item.id)
|
|
7509
7570
|
}, [
|
|
7510
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
7571
|
+
vue.createElementVNode("div", _hoisted_3$2, [
|
|
7511
7572
|
vue.renderSlot(_ctx.$slots, "page-bar-title", { page: item }, () => [
|
|
7512
7573
|
vue.createElementVNode("span", {
|
|
7513
7574
|
title: item.name
|
|
7514
|
-
}, vue.toDisplayString(item.name || item.id), 9, _hoisted_4$
|
|
7575
|
+
}, vue.toDisplayString(item.name || item.id), 9, _hoisted_4$2)
|
|
7515
7576
|
])
|
|
7516
7577
|
]),
|
|
7517
|
-
vue.createVNode(vue.unref(
|
|
7578
|
+
vue.createVNode(vue.unref(designPlugin.TMagicPopover), {
|
|
7518
7579
|
"popper-class": "page-bar-popover",
|
|
7519
7580
|
placement: "top",
|
|
7581
|
+
trigger: "hover",
|
|
7520
7582
|
width: 160,
|
|
7521
|
-
|
|
7583
|
+
"destroy-on-close": true
|
|
7522
7584
|
}, {
|
|
7523
7585
|
reference: vue.withCtx(() => [
|
|
7524
|
-
vue.createVNode(vue.unref(
|
|
7586
|
+
vue.createVNode(vue.unref(designPlugin.TMagicIcon), { class: "m-editor-page-bar-menu-icon" }, {
|
|
7525
7587
|
default: vue.withCtx(() => [
|
|
7526
7588
|
vue.createVNode(vue.unref(iconsVue.CaretBottom))
|
|
7527
7589
|
]),
|
|
@@ -7552,7 +7614,7 @@
|
|
|
7552
7614
|
]),
|
|
7553
7615
|
_: 2
|
|
7554
7616
|
}, 1024)
|
|
7555
|
-
], 10, _hoisted_2$
|
|
7617
|
+
], 10, _hoisted_2$5);
|
|
7556
7618
|
}), 128))
|
|
7557
7619
|
]),
|
|
7558
7620
|
_: 3
|
|
@@ -7563,9 +7625,7 @@
|
|
|
7563
7625
|
});
|
|
7564
7626
|
|
|
7565
7627
|
const _hoisted_1$b = { class: "m-editor-empty-panel" };
|
|
7566
|
-
const _hoisted_2$
|
|
7567
|
-
const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面", -1);
|
|
7568
|
-
const _hoisted_4$4 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面片", -1);
|
|
7628
|
+
const _hoisted_2$4 = { class: "m-editor-empty-content" };
|
|
7569
7629
|
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
7570
7630
|
...{
|
|
7571
7631
|
name: "MEditorAddPageBox"
|
|
@@ -7589,25 +7649,25 @@
|
|
|
7589
7649
|
};
|
|
7590
7650
|
return (_ctx, _cache) => {
|
|
7591
7651
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
|
|
7592
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
7652
|
+
vue.createElementVNode("div", _hoisted_2$4, [
|
|
7593
7653
|
vue.createElementVNode("div", {
|
|
7594
7654
|
class: "m-editor-empty-button",
|
|
7595
|
-
onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(vue.unref(
|
|
7655
|
+
onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(vue.unref(core.NodeType).PAGE))
|
|
7596
7656
|
}, [
|
|
7597
7657
|
vue.createElementVNode("div", null, [
|
|
7598
7658
|
vue.createVNode(_sfc_main$Y, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
7599
7659
|
]),
|
|
7600
|
-
|
|
7660
|
+
_cache[2] || (_cache[2] = vue.createElementVNode("p", null, "新增页面", -1))
|
|
7601
7661
|
]),
|
|
7602
7662
|
!_ctx.disabledPageFragment ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
7603
7663
|
key: 0,
|
|
7604
7664
|
class: "m-editor-empty-button",
|
|
7605
|
-
onClick: _cache[1] || (_cache[1] = ($event) => clickHandler(vue.unref(
|
|
7665
|
+
onClick: _cache[1] || (_cache[1] = ($event) => clickHandler(vue.unref(core.NodeType).PAGE_FRAGMENT))
|
|
7606
7666
|
}, [
|
|
7607
7667
|
vue.createElementVNode("div", null, [
|
|
7608
7668
|
vue.createVNode(_sfc_main$Y, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
7609
7669
|
]),
|
|
7610
|
-
|
|
7670
|
+
_cache[3] || (_cache[3] = vue.createElementVNode("p", null, "新增页面片", -1))
|
|
7611
7671
|
])) : vue.createCommentVNode("", true)
|
|
7612
7672
|
])
|
|
7613
7673
|
]);
|
|
@@ -7680,7 +7740,7 @@
|
|
|
7680
7740
|
});
|
|
7681
7741
|
const saveCode = (value) => {
|
|
7682
7742
|
try {
|
|
7683
|
-
const parseDSL =
|
|
7743
|
+
const parseDSL = getEditorConfig("parseDSL");
|
|
7684
7744
|
editorService?.set("root", parseDSL(value));
|
|
7685
7745
|
} catch (e) {
|
|
7686
7746
|
console.error(e);
|
|
@@ -7753,7 +7813,7 @@
|
|
|
7753
7813
|
page.value ? {
|
|
7754
7814
|
name: "right",
|
|
7755
7815
|
fn: vue.withCtx(() => [
|
|
7756
|
-
vue.createVNode(vue.unref(
|
|
7816
|
+
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), null, {
|
|
7757
7817
|
default: vue.withCtx(() => [
|
|
7758
7818
|
vue.renderSlot(_ctx.$slots, "props-panel")
|
|
7759
7819
|
]),
|
|
@@ -7819,7 +7879,7 @@
|
|
|
7819
7879
|
className: "delete",
|
|
7820
7880
|
icon: vue.markRaw(iconsVue.Delete),
|
|
7821
7881
|
tooltip: `刪除(Delete)`,
|
|
7822
|
-
disabled: () => services?.editorService.get("node")?.type ===
|
|
7882
|
+
disabled: () => services?.editorService.get("node")?.type === core.NodeType.PAGE,
|
|
7823
7883
|
handler: () => {
|
|
7824
7884
|
const node = services?.editorService.get("node");
|
|
7825
7885
|
node && services?.editorService.remove(node);
|
|
@@ -8031,7 +8091,7 @@
|
|
|
8031
8091
|
return (_ctx, _cache) => {
|
|
8032
8092
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
|
|
8033
8093
|
vue.renderSlot(_ctx.$slots, "props-panel-header"),
|
|
8034
|
-
vue.createVNode(vue.unref(
|
|
8094
|
+
vue.createVNode(vue.unref(formPlugin.MForm), {
|
|
8035
8095
|
ref_key: "configForm",
|
|
8036
8096
|
ref: configForm,
|
|
8037
8097
|
class: vue.normalizeClass(propsPanelSize.value),
|
|
@@ -8043,7 +8103,7 @@
|
|
|
8043
8103
|
onChange: submit,
|
|
8044
8104
|
onError: errorHandler
|
|
8045
8105
|
}, null, 8, ["class", "popper-class", "size", "init-values", "config", "extend-state"]),
|
|
8046
|
-
!_ctx.disabledShowSrc ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
8106
|
+
!_ctx.disabledShowSrc ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
8047
8107
|
key: 0,
|
|
8048
8108
|
class: "m-editor-props-panel-src-icon",
|
|
8049
8109
|
circle: "",
|
|
@@ -8087,10 +8147,11 @@
|
|
|
8087
8147
|
timer && clearTimeout(timer);
|
|
8088
8148
|
timer = setTimeout(() => {
|
|
8089
8149
|
emit("search", filterText.value);
|
|
8150
|
+
timer = null;
|
|
8090
8151
|
}, 300);
|
|
8091
8152
|
};
|
|
8092
8153
|
return (_ctx, _cache) => {
|
|
8093
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
8154
|
+
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicInput), {
|
|
8094
8155
|
modelValue: filterText.value,
|
|
8095
8156
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filterText.value = $event),
|
|
8096
8157
|
class: "search-input",
|
|
@@ -8100,7 +8161,7 @@
|
|
|
8100
8161
|
onInput: filterTextChangeHandler
|
|
8101
8162
|
}, {
|
|
8102
8163
|
prefix: vue.withCtx(() => [
|
|
8103
|
-
vue.createVNode(vue.unref(
|
|
8164
|
+
vue.createVNode(vue.unref(designPlugin.TMagicIcon), null, {
|
|
8104
8165
|
default: vue.withCtx(() => [
|
|
8105
8166
|
vue.createVNode(vue.unref(iconsVue.Search))
|
|
8106
8167
|
]),
|
|
@@ -8114,9 +8175,9 @@
|
|
|
8114
8175
|
});
|
|
8115
8176
|
|
|
8116
8177
|
const _hoisted_1$9 = ["draggable", "data-node-id", "data-parent-id", "data-parents-id", "data-is-container"];
|
|
8117
|
-
const _hoisted_2$
|
|
8118
|
-
const _hoisted_3$
|
|
8119
|
-
const _hoisted_4$
|
|
8178
|
+
const _hoisted_2$3 = { class: "tree-node-label" };
|
|
8179
|
+
const _hoisted_3$1 = { class: "tree-node-tool" };
|
|
8180
|
+
const _hoisted_4$1 = {
|
|
8120
8181
|
key: 0,
|
|
8121
8182
|
class: "m-editor-tree-node-children"
|
|
8122
8183
|
};
|
|
@@ -8130,7 +8191,8 @@
|
|
|
8130
8191
|
parent: {},
|
|
8131
8192
|
parentsId: { default: () => [] },
|
|
8132
8193
|
nodeStatusMap: {},
|
|
8133
|
-
indent: { default: 0 }
|
|
8194
|
+
indent: { default: 0 },
|
|
8195
|
+
nextLevelIndentIncrement: { default: 11 }
|
|
8134
8196
|
},
|
|
8135
8197
|
emits: ["node-dragstart", "node-dragleave", "node-dragend", "node-contextmenu", "node-mouseenter", "node-click"],
|
|
8136
8198
|
setup(__props, { emit: __emit }) {
|
|
@@ -8204,18 +8266,18 @@
|
|
|
8204
8266
|
onClick: nodeClickHandler
|
|
8205
8267
|
}, [
|
|
8206
8268
|
vue.renderSlot(_ctx.$slots, "tree-node-content", { data: _ctx.data }, () => [
|
|
8207
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
8269
|
+
vue.createElementVNode("div", _hoisted_2$3, [
|
|
8208
8270
|
vue.renderSlot(_ctx.$slots, "tree-node-label", { data: _ctx.data }, () => [
|
|
8209
8271
|
vue.createTextVNode(vue.toDisplayString(`${_ctx.data.name} (${_ctx.data.id})`), 1)
|
|
8210
8272
|
])
|
|
8211
8273
|
]),
|
|
8212
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
8274
|
+
vue.createElementVNode("div", _hoisted_3$1, [
|
|
8213
8275
|
vue.renderSlot(_ctx.$slots, "tree-node-tool", { data: _ctx.data })
|
|
8214
8276
|
])
|
|
8215
8277
|
])
|
|
8216
8278
|
])
|
|
8217
8279
|
], 38),
|
|
8218
|
-
hasChildren.value && expanded.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
8280
|
+
hasChildren.value && expanded.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [
|
|
8219
8281
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data.items, (item) => {
|
|
8220
8282
|
return vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
8221
8283
|
key: item.id,
|
|
@@ -8223,7 +8285,7 @@
|
|
|
8223
8285
|
parent: _ctx.data,
|
|
8224
8286
|
parentsId: [..._ctx.parentsId, _ctx.data.id],
|
|
8225
8287
|
"node-status-map": _ctx.nodeStatusMap,
|
|
8226
|
-
indent: _ctx.indent +
|
|
8288
|
+
indent: _ctx.indent + _ctx.nextLevelIndentIncrement
|
|
8227
8289
|
}, {
|
|
8228
8290
|
"tree-node-content": vue.withCtx(({ data: nodeData }) => [
|
|
8229
8291
|
vue.renderSlot(_ctx.$slots, "tree-node-content", { data: nodeData })
|
|
@@ -8258,6 +8320,7 @@
|
|
|
8258
8320
|
data: {},
|
|
8259
8321
|
nodeStatusMap: {},
|
|
8260
8322
|
indent: { default: 0 },
|
|
8323
|
+
nextLevelIndentIncrement: {},
|
|
8261
8324
|
emptyText: { default: "暂无数据" }
|
|
8262
8325
|
},
|
|
8263
8326
|
emits: ["node-dragover", "node-dragstart", "node-dragleave", "node-dragend", "node-contextmenu", "node-mouseenter", "node-click"],
|
|
@@ -8277,6 +8340,7 @@
|
|
|
8277
8340
|
key: item.id,
|
|
8278
8341
|
data: item,
|
|
8279
8342
|
indent: _ctx.indent,
|
|
8343
|
+
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8280
8344
|
"node-status-map": _ctx.nodeStatusMap
|
|
8281
8345
|
}, {
|
|
8282
8346
|
"tree-node-content": vue.withCtx(({ data: nodeData }) => [
|
|
@@ -8289,7 +8353,7 @@
|
|
|
8289
8353
|
vue.renderSlot(_ctx.$slots, "tree-node-tool", { data: nodeData })
|
|
8290
8354
|
]),
|
|
8291
8355
|
_: 2
|
|
8292
|
-
}, 1032, ["data", "indent", "node-status-map"]);
|
|
8356
|
+
}, 1032, ["data", "indent", "next-level-indent-increment", "node-status-map"]);
|
|
8293
8357
|
}), 128)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
|
|
8294
8358
|
vue.createElementVNode("p", null, vue.toDisplayString(_ctx.emptyText), 1)
|
|
8295
8359
|
]))
|
|
@@ -8298,82 +8362,14 @@
|
|
|
8298
8362
|
}
|
|
8299
8363
|
});
|
|
8300
8364
|
|
|
8301
|
-
const useFilter = (nodeData, nodeStatusMap, filterNodeMethod) => {
|
|
8302
|
-
const filterIsMatch = (value, data) => {
|
|
8303
|
-
const string = !Array.isArray(value) ? [value] : value;
|
|
8304
|
-
if (!string.length) {
|
|
8305
|
-
return true;
|
|
8306
|
-
}
|
|
8307
|
-
return string.some((v) => filterNodeMethod(v, data));
|
|
8308
|
-
};
|
|
8309
|
-
const filter = (text) => {
|
|
8310
|
-
if (!nodeData.value.length) return;
|
|
8311
|
-
nodeData.value.forEach((node) => {
|
|
8312
|
-
traverseNode(node, (node2, parents) => {
|
|
8313
|
-
if (!nodeStatusMap.value) return;
|
|
8314
|
-
const visible = filterIsMatch(text, node2);
|
|
8315
|
-
if (visible && parents.length) {
|
|
8316
|
-
parents.forEach((parent) => {
|
|
8317
|
-
updateStatus(nodeStatusMap.value, parent.id, {
|
|
8318
|
-
visible,
|
|
8319
|
-
expand: true
|
|
8320
|
-
});
|
|
8321
|
-
});
|
|
8322
|
-
}
|
|
8323
|
-
updateStatus(nodeStatusMap.value, node2.id, {
|
|
8324
|
-
visible
|
|
8325
|
-
});
|
|
8326
|
-
});
|
|
8327
|
-
});
|
|
8328
|
-
};
|
|
8329
|
-
return {
|
|
8330
|
-
filterText: vue.ref(""),
|
|
8331
|
-
filterTextChangeHandler(text) {
|
|
8332
|
-
filter(text);
|
|
8333
|
-
}
|
|
8334
|
-
};
|
|
8335
|
-
};
|
|
8336
|
-
|
|
8337
|
-
const createPageNodeStatus$1 = (nodeData, initialLayerNodeStatus) => {
|
|
8338
|
-
const map = /* @__PURE__ */ new Map();
|
|
8339
|
-
nodeData.forEach(
|
|
8340
|
-
(node) => traverseNode(node, (node2) => {
|
|
8341
|
-
map.set(
|
|
8342
|
-
node2.id,
|
|
8343
|
-
initialLayerNodeStatus?.get(node2.id) || {
|
|
8344
|
-
visible: true,
|
|
8345
|
-
expand: false,
|
|
8346
|
-
selected: false,
|
|
8347
|
-
draggable: false
|
|
8348
|
-
}
|
|
8349
|
-
);
|
|
8350
|
-
})
|
|
8351
|
-
);
|
|
8352
|
-
return map;
|
|
8353
|
-
};
|
|
8354
|
-
const useNodeStatus$1 = (nodeData) => {
|
|
8355
|
-
const nodeStatusMap = vue.ref(/* @__PURE__ */ new Map());
|
|
8356
|
-
vue.watch(
|
|
8357
|
-
nodeData,
|
|
8358
|
-
(nodeData2) => {
|
|
8359
|
-
nodeStatusMap.value = createPageNodeStatus$1(nodeData2, nodeStatusMap.value);
|
|
8360
|
-
},
|
|
8361
|
-
{
|
|
8362
|
-
immediate: true,
|
|
8363
|
-
deep: true
|
|
8364
|
-
}
|
|
8365
|
-
);
|
|
8366
|
-
return {
|
|
8367
|
-
nodeStatusMap
|
|
8368
|
-
};
|
|
8369
|
-
};
|
|
8370
|
-
|
|
8371
8365
|
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
8372
8366
|
...{
|
|
8373
8367
|
name: "MEditorCodeBlockList"
|
|
8374
8368
|
},
|
|
8375
8369
|
__name: "CodeBlockList",
|
|
8376
8370
|
props: {
|
|
8371
|
+
indent: {},
|
|
8372
|
+
nextLevelIndentIncrement: {},
|
|
8377
8373
|
customError: { type: Function }
|
|
8378
8374
|
},
|
|
8379
8375
|
emits: ["edit", "remove"],
|
|
@@ -8384,7 +8380,7 @@
|
|
|
8384
8380
|
const { codeBlockService, depService, editorService } = services || {};
|
|
8385
8381
|
const codeList = vue.computed(
|
|
8386
8382
|
() => Object.entries(codeBlockService?.getCodeDsl() || {}).map(([codeId, code]) => {
|
|
8387
|
-
const target = depService?.getTarget(codeId,
|
|
8383
|
+
const target = depService?.getTarget(codeId, core.DepTargetType.CODE_BLOCK);
|
|
8388
8384
|
const pageList = editorService?.get("root")?.items.map((page) => ({
|
|
8389
8385
|
name: page.devconfig?.tabName || page.name,
|
|
8390
8386
|
type: "node",
|
|
@@ -8446,7 +8442,7 @@
|
|
|
8446
8442
|
const existBinds = Boolean(currentCode?.items?.length);
|
|
8447
8443
|
const undeleteableList = codeBlockService?.getUndeletableList() || [];
|
|
8448
8444
|
if (!existBinds && !undeleteableList.includes(id)) {
|
|
8449
|
-
await
|
|
8445
|
+
await designPlugin.tMagicMessageBox.confirm("确定删除该代码块吗?", "提示", {
|
|
8450
8446
|
confirmButtonText: "确定",
|
|
8451
8447
|
cancelButtonText: "取消",
|
|
8452
8448
|
type: "warning"
|
|
@@ -8456,7 +8452,7 @@
|
|
|
8456
8452
|
if (typeof props.customError === "function") {
|
|
8457
8453
|
props.customError(id, existBinds ? CodeDeleteErrorType.BIND : CodeDeleteErrorType.UNDELETEABLE);
|
|
8458
8454
|
} else {
|
|
8459
|
-
|
|
8455
|
+
designPlugin.tMagicMessage.error("代码块删除失败");
|
|
8460
8456
|
}
|
|
8461
8457
|
}
|
|
8462
8458
|
};
|
|
@@ -8467,6 +8463,8 @@
|
|
|
8467
8463
|
return vue.openBlock(), vue.createBlock(_sfc_main$m, {
|
|
8468
8464
|
data: codeList.value,
|
|
8469
8465
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
8466
|
+
indent: _ctx.indent,
|
|
8467
|
+
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8470
8468
|
onNodeClick: clickHandler
|
|
8471
8469
|
}, {
|
|
8472
8470
|
"tree-node-label": vue.withCtx(({ data }) => [
|
|
@@ -8479,7 +8477,7 @@
|
|
|
8479
8477
|
}, vue.toDisplayString(data.name) + " " + vue.toDisplayString(data.key ? `(${data.key})` : ""), 3)
|
|
8480
8478
|
]),
|
|
8481
8479
|
"tree-node-tool": vue.withCtx(({ data }) => [
|
|
8482
|
-
data.type === "code" ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
8480
|
+
data.type === "code" ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
8483
8481
|
key: 0,
|
|
8484
8482
|
effect: "dark",
|
|
8485
8483
|
content: editable.value ? "编辑" : "查看",
|
|
@@ -8494,7 +8492,7 @@
|
|
|
8494
8492
|
]),
|
|
8495
8493
|
_: 2
|
|
8496
8494
|
}, 1032, ["content"])) : vue.createCommentVNode("", true),
|
|
8497
|
-
data.type === "code" && editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
8495
|
+
data.type === "code" && editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
8498
8496
|
key: 1,
|
|
8499
8497
|
effect: "dark",
|
|
8500
8498
|
content: "删除",
|
|
@@ -8515,7 +8513,7 @@
|
|
|
8515
8513
|
})
|
|
8516
8514
|
]),
|
|
8517
8515
|
_: 3
|
|
8518
|
-
}, 8, ["data", "node-status-map"]);
|
|
8516
|
+
}, 8, ["data", "node-status-map", "indent", "next-level-indent-increment"]);
|
|
8519
8517
|
};
|
|
8520
8518
|
}
|
|
8521
8519
|
});
|
|
@@ -8527,6 +8525,8 @@
|
|
|
8527
8525
|
},
|
|
8528
8526
|
__name: "CodeBlockListPanel",
|
|
8529
8527
|
props: {
|
|
8528
|
+
indent: {},
|
|
8529
|
+
nextLevelIndentIncrement: {},
|
|
8530
8530
|
customError: { type: Function }
|
|
8531
8531
|
},
|
|
8532
8532
|
setup(__props) {
|
|
@@ -8543,21 +8543,21 @@
|
|
|
8543
8543
|
});
|
|
8544
8544
|
return (_ctx, _cache) => {
|
|
8545
8545
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
8546
|
-
vue.createVNode(vue.unref(
|
|
8546
|
+
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), { class: "m-editor-code-block-list m-editor-layer-panel" }, {
|
|
8547
8547
|
default: vue.withCtx(() => [
|
|
8548
8548
|
vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
8549
8549
|
vue.createElementVNode("div", _hoisted_1$7, [
|
|
8550
8550
|
vue.createVNode(_sfc_main$o, { onSearch: filterTextChangeHandler }),
|
|
8551
|
-
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
8551
|
+
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicButton), {
|
|
8552
8552
|
key: 0,
|
|
8553
8553
|
class: "create-code-button",
|
|
8554
8554
|
type: "primary",
|
|
8555
8555
|
size: "small",
|
|
8556
8556
|
onClick: vue.unref(createCodeBlock)
|
|
8557
8557
|
}, {
|
|
8558
|
-
default: vue.withCtx(() => [
|
|
8558
|
+
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
8559
8559
|
vue.createTextVNode("新增")
|
|
8560
|
-
]),
|
|
8560
|
+
])),
|
|
8561
8561
|
_: 1
|
|
8562
8562
|
}, 8, ["onClick"])) : vue.createCommentVNode("", true),
|
|
8563
8563
|
vue.renderSlot(_ctx.$slots, "code-block-panel-search")
|
|
@@ -8567,6 +8567,8 @@
|
|
|
8567
8567
|
ref_key: "codeBlockList",
|
|
8568
8568
|
ref: codeBlockList,
|
|
8569
8569
|
"custom-error": _ctx.customError,
|
|
8570
|
+
indent: _ctx.indent,
|
|
8571
|
+
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8570
8572
|
onEdit: vue.unref(editCode),
|
|
8571
8573
|
onRemove: vue.unref(deleteCode)
|
|
8572
8574
|
}, {
|
|
@@ -8577,7 +8579,7 @@
|
|
|
8577
8579
|
})
|
|
8578
8580
|
]),
|
|
8579
8581
|
_: 3
|
|
8580
|
-
}, 8, ["custom-error", "onEdit", "onRemove"])
|
|
8582
|
+
}, 8, ["custom-error", "indent", "next-level-indent-increment", "onEdit", "onRemove"])
|
|
8581
8583
|
]),
|
|
8582
8584
|
_: 3
|
|
8583
8585
|
}),
|
|
@@ -8660,7 +8662,7 @@
|
|
|
8660
8662
|
emit("submit", values);
|
|
8661
8663
|
};
|
|
8662
8664
|
const errorHandler = (error) => {
|
|
8663
|
-
|
|
8665
|
+
designPlugin.tMagicMessage.error(error.message);
|
|
8664
8666
|
};
|
|
8665
8667
|
__expose({
|
|
8666
8668
|
show() {
|
|
@@ -8683,7 +8685,7 @@
|
|
|
8683
8685
|
position: vue.unref(boxPosition)
|
|
8684
8686
|
}, {
|
|
8685
8687
|
body: vue.withCtx(() => [
|
|
8686
|
-
vue.createVNode(vue.unref(
|
|
8688
|
+
vue.createVNode(vue.unref(formPlugin.MFormBox), {
|
|
8687
8689
|
"label-width": "80px",
|
|
8688
8690
|
title: _ctx.title,
|
|
8689
8691
|
config: dataSourceConfig.value,
|
|
@@ -8705,15 +8707,19 @@
|
|
|
8705
8707
|
name: "MEditorDataSourceList"
|
|
8706
8708
|
},
|
|
8707
8709
|
__name: "DataSourceList",
|
|
8710
|
+
props: {
|
|
8711
|
+
indent: {},
|
|
8712
|
+
nextLevelIndentIncrement: {}
|
|
8713
|
+
},
|
|
8708
8714
|
emits: ["edit", "remove"],
|
|
8709
8715
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8710
8716
|
const emit = __emit;
|
|
8711
8717
|
const { depService, editorService, dataSourceService } = vue.inject("services") || {};
|
|
8712
8718
|
const editable = vue.computed(() => dataSourceService?.get("editable") ?? true);
|
|
8713
8719
|
const dataSources = vue.computed(() => dataSourceService?.get("dataSources") || []);
|
|
8714
|
-
const dsDep = vue.computed(() => depService?.getTargets(
|
|
8715
|
-
const dsMethodDep = vue.computed(() => depService?.getTargets(
|
|
8716
|
-
const dsCondDep = vue.computed(() => depService?.getTargets(
|
|
8720
|
+
const dsDep = vue.computed(() => depService?.getTargets(core.DepTargetType.DATA_SOURCE) || {});
|
|
8721
|
+
const dsMethodDep = vue.computed(() => depService?.getTargets(core.DepTargetType.DATA_SOURCE_METHOD) || {});
|
|
8722
|
+
const dsCondDep = vue.computed(() => depService?.getTargets(core.DepTargetType.DATA_SOURCE_COND) || {});
|
|
8717
8723
|
const getKeyTreeConfig = (dep, type, parentKey) => dep.keys.map((key) => ({
|
|
8718
8724
|
name: key,
|
|
8719
8725
|
id: `${parentKey}_${key}`,
|
|
@@ -8776,7 +8782,7 @@
|
|
|
8776
8782
|
emit("edit", id);
|
|
8777
8783
|
};
|
|
8778
8784
|
const removeHandler = async (id) => {
|
|
8779
|
-
await
|
|
8785
|
+
await designPlugin.tMagicMessageBox.confirm("确定删除?", "提示", {
|
|
8780
8786
|
confirmButtonText: "确定",
|
|
8781
8787
|
cancelButtonText: "取消",
|
|
8782
8788
|
type: "warning"
|
|
@@ -8800,6 +8806,8 @@
|
|
|
8800
8806
|
return vue.openBlock(), vue.createBlock(_sfc_main$m, {
|
|
8801
8807
|
data: list.value,
|
|
8802
8808
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
8809
|
+
indent: _ctx.indent,
|
|
8810
|
+
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8803
8811
|
onNodeClick: clickHandler
|
|
8804
8812
|
}, {
|
|
8805
8813
|
"tree-node-label": vue.withCtx(({ data }) => [
|
|
@@ -8812,7 +8820,7 @@
|
|
|
8812
8820
|
}, vue.toDisplayString(data.name) + " " + vue.toDisplayString(data.key ? `(${data.key})` : ""), 3)
|
|
8813
8821
|
]),
|
|
8814
8822
|
"tree-node-tool": vue.withCtx(({ data }) => [
|
|
8815
|
-
data.type === "ds" ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
8823
|
+
data.type === "ds" ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
8816
8824
|
key: 0,
|
|
8817
8825
|
effect: "dark",
|
|
8818
8826
|
content: editable.value ? "编辑" : "查看",
|
|
@@ -8827,7 +8835,7 @@
|
|
|
8827
8835
|
]),
|
|
8828
8836
|
_: 2
|
|
8829
8837
|
}, 1032, ["content"])) : vue.createCommentVNode("", true),
|
|
8830
|
-
data.type === "ds" && editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
8838
|
+
data.type === "ds" && editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
8831
8839
|
key: 1,
|
|
8832
8840
|
effect: "dark",
|
|
8833
8841
|
content: "删除",
|
|
@@ -8845,18 +8853,21 @@
|
|
|
8845
8853
|
vue.renderSlot(_ctx.$slots, "data-source-panel-tool", { data })
|
|
8846
8854
|
]),
|
|
8847
8855
|
_: 3
|
|
8848
|
-
}, 8, ["data", "node-status-map"]);
|
|
8856
|
+
}, 8, ["data", "node-status-map", "indent", "next-level-indent-increment"]);
|
|
8849
8857
|
};
|
|
8850
8858
|
}
|
|
8851
8859
|
});
|
|
8852
8860
|
|
|
8853
8861
|
const _hoisted_1$6 = { class: "search-wrapper" };
|
|
8854
|
-
const _hoisted_2$5 = { class: "data-source-list-panel-add-menu" };
|
|
8855
8862
|
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
8856
8863
|
...{
|
|
8857
8864
|
name: "MEditorDataSourceListPanel"
|
|
8858
8865
|
},
|
|
8859
8866
|
__name: "DataSourceListPanel",
|
|
8867
|
+
props: {
|
|
8868
|
+
indent: {},
|
|
8869
|
+
nextLevelIndentIncrement: {}
|
|
8870
|
+
},
|
|
8860
8871
|
setup(__props) {
|
|
8861
8872
|
const eventBus = vue.inject("eventBus");
|
|
8862
8873
|
const { dataSourceService } = vue.inject("services") || {};
|
|
@@ -8894,40 +8905,41 @@
|
|
|
8894
8905
|
});
|
|
8895
8906
|
return (_ctx, _cache) => {
|
|
8896
8907
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
8897
|
-
vue.createVNode(vue.unref(
|
|
8908
|
+
vue.createVNode(vue.unref(designPlugin.TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
|
|
8898
8909
|
default: vue.withCtx(() => [
|
|
8899
8910
|
vue.createElementVNode("div", _hoisted_1$6, [
|
|
8900
8911
|
vue.createVNode(_sfc_main$o, { onSearch: filterTextChangeHandler }),
|
|
8901
|
-
vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
8912
|
+
vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicPopover), {
|
|
8902
8913
|
key: 0,
|
|
8903
|
-
placement: "right"
|
|
8914
|
+
placement: "right",
|
|
8915
|
+
trigger: "hover",
|
|
8916
|
+
"popper-class": "data-source-list-panel-add-menu",
|
|
8917
|
+
"destroy-on-close": true
|
|
8904
8918
|
}, {
|
|
8905
8919
|
reference: vue.withCtx(() => [
|
|
8906
|
-
vue.createVNode(vue.unref(
|
|
8920
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
8907
8921
|
type: "primary",
|
|
8908
8922
|
size: "small"
|
|
8909
8923
|
}, {
|
|
8910
|
-
default: vue.withCtx(() => [
|
|
8924
|
+
default: vue.withCtx(() => _cache[0] || (_cache[0] = [
|
|
8911
8925
|
vue.createTextVNode("新增")
|
|
8912
|
-
]),
|
|
8926
|
+
])),
|
|
8913
8927
|
_: 1
|
|
8914
8928
|
})
|
|
8915
8929
|
]),
|
|
8916
8930
|
default: vue.withCtx(() => [
|
|
8917
|
-
vue.
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
}), 128))
|
|
8930
|
-
])
|
|
8931
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(datasourceTypeList.value, (item, index) => {
|
|
8932
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
8933
|
+
data: {
|
|
8934
|
+
type: "button",
|
|
8935
|
+
text: item.text,
|
|
8936
|
+
handler: () => {
|
|
8937
|
+
addHandler(item.type);
|
|
8938
|
+
}
|
|
8939
|
+
},
|
|
8940
|
+
key: index
|
|
8941
|
+
}, null, 8, ["data"]);
|
|
8942
|
+
}), 128))
|
|
8931
8943
|
]),
|
|
8932
8944
|
_: 1
|
|
8933
8945
|
})) : vue.createCommentVNode("", true),
|
|
@@ -8936,9 +8948,11 @@
|
|
|
8936
8948
|
vue.createVNode(_sfc_main$i, {
|
|
8937
8949
|
ref_key: "dataSourceList",
|
|
8938
8950
|
ref: dataSourceList,
|
|
8951
|
+
indent: _ctx.indent,
|
|
8952
|
+
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
8939
8953
|
onEdit: vue.unref(editHandler),
|
|
8940
8954
|
onRemove: removeHandler
|
|
8941
|
-
}, null, 8, ["onEdit"])
|
|
8955
|
+
}, null, 8, ["indent", "next-level-indent-increment", "onEdit"])
|
|
8942
8956
|
]),
|
|
8943
8957
|
_: 3
|
|
8944
8958
|
}),
|
|
@@ -8975,7 +8989,7 @@
|
|
|
8975
8989
|
const subMenu = vue.ref();
|
|
8976
8990
|
const visible = vue.ref(false);
|
|
8977
8991
|
const subMenuData = vue.ref([]);
|
|
8978
|
-
const zIndex =
|
|
8992
|
+
const zIndex = designPlugin.useZIndex();
|
|
8979
8993
|
const curZIndex = vue.ref(0);
|
|
8980
8994
|
const menuPosition = vue.ref({
|
|
8981
8995
|
left: 0,
|
|
@@ -9128,18 +9142,6 @@
|
|
|
9128
9142
|
fill: "currentColor",
|
|
9129
9143
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9130
9144
|
};
|
|
9131
|
-
const _hoisted_2$4 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
9132
|
-
"fill-rule": "evenodd",
|
|
9133
|
-
d: "M9.828 4H2.19a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91H9v1H2.826a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181L15.546 8H14.54l.265-2.91A1 1 0 0 0 13.81 4H9.828zm-2.95-1.707L7.587 3H2.19c-.24 0-.47.042-.684.12L1.5 2.98a1 1 0 0 1 1-.98h3.672a1 1 0 0 1 .707.293z"
|
|
9134
|
-
}, null, -1);
|
|
9135
|
-
const _hoisted_3$2 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
9136
|
-
"fill-rule": "evenodd",
|
|
9137
|
-
d: "M11 11.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5z"
|
|
9138
|
-
}, null, -1);
|
|
9139
|
-
const _hoisted_4$2 = [
|
|
9140
|
-
_hoisted_2$4,
|
|
9141
|
-
_hoisted_3$2
|
|
9142
|
-
];
|
|
9143
9145
|
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
9144
9146
|
...{
|
|
9145
9147
|
name: "MEditorFolderMinusIcon"
|
|
@@ -9147,7 +9149,16 @@
|
|
|
9147
9149
|
__name: "FolderMinusIcon",
|
|
9148
9150
|
setup(__props) {
|
|
9149
9151
|
return (_ctx, _cache) => {
|
|
9150
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$5,
|
|
9152
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$5, _cache[0] || (_cache[0] = [
|
|
9153
|
+
vue.createElementVNode("path", {
|
|
9154
|
+
"fill-rule": "evenodd",
|
|
9155
|
+
d: "M9.828 4H2.19a1 1 0 0 0-.996 1.09l.637 7a1 1 0 0 0 .995.91H9v1H2.826a2 2 0 0 1-1.991-1.819l-.637-7a1.99 1.99 0 0 1 .342-1.31L.5 3a2 2 0 0 1 2-2h3.672a2 2 0 0 1 1.414.586l.828.828A2 2 0 0 0 9.828 3h3.982a2 2 0 0 1 1.992 2.181L15.546 8H14.54l.265-2.91A1 1 0 0 0 13.81 4H9.828zm-2.95-1.707L7.587 3H2.19c-.24 0-.47.042-.684.12L1.5 2.98a1 1 0 0 1 1-.98h3.672a1 1 0 0 1 .707.293z"
|
|
9156
|
+
}, null, -1),
|
|
9157
|
+
vue.createElementVNode("path", {
|
|
9158
|
+
"fill-rule": "evenodd",
|
|
9159
|
+
d: "M11 11.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5z"
|
|
9160
|
+
}, null, -1)
|
|
9161
|
+
]));
|
|
9151
9162
|
};
|
|
9152
9163
|
}
|
|
9153
9164
|
});
|
|
@@ -9158,7 +9169,7 @@
|
|
|
9158
9169
|
icon: iconsVue.Delete,
|
|
9159
9170
|
display: (services) => {
|
|
9160
9171
|
const node = services?.editorService?.get("node");
|
|
9161
|
-
return node?.type !==
|
|
9172
|
+
return node?.type !== core.NodeType.ROOT && !utils.isPage(node) && !utils.isPageFragment(node);
|
|
9162
9173
|
},
|
|
9163
9174
|
handler: (services) => {
|
|
9164
9175
|
const nodes = services?.editorService?.get("nodes");
|
|
@@ -9186,8 +9197,8 @@
|
|
|
9186
9197
|
const stage = services?.editorService?.get("stage");
|
|
9187
9198
|
const rect = menu.value.$el.getBoundingClientRect();
|
|
9188
9199
|
const parentRect = stage?.container?.getBoundingClientRect();
|
|
9189
|
-
const initialLeft = utils.calcValueByFontsize(stage?.renderer
|
|
9190
|
-
const initialTop = utils.calcValueByFontsize(stage?.renderer
|
|
9200
|
+
const initialLeft = utils.calcValueByFontsize(stage?.renderer?.getDocument(), (rect.left || 0) - (parentRect?.left || 0)) / services.uiService.get("zoom");
|
|
9201
|
+
const initialTop = utils.calcValueByFontsize(stage?.renderer?.getDocument(), (rect.top || 0) - (parentRect?.top || 0)) / services.uiService.get("zoom");
|
|
9191
9202
|
services?.editorService?.paste({ left: initialLeft, top: initialTop });
|
|
9192
9203
|
} else {
|
|
9193
9204
|
services?.editorService?.paste();
|
|
@@ -9747,7 +9758,7 @@
|
|
|
9747
9758
|
draggable: false
|
|
9748
9759
|
});
|
|
9749
9760
|
page.items.forEach(
|
|
9750
|
-
(node) => traverseNode(node, (node2) => {
|
|
9761
|
+
(node) => utils.traverseNode(node, (node2) => {
|
|
9751
9762
|
map.set(
|
|
9752
9763
|
node2.id,
|
|
9753
9764
|
initialLayerNodeStatus?.get(node2.id) || {
|
|
@@ -9802,7 +9813,7 @@
|
|
|
9802
9813
|
services?.editorService.on("add", (newNodes) => {
|
|
9803
9814
|
newNodes.forEach((node) => {
|
|
9804
9815
|
if (utils.isPage(node) || utils.isPageFragment(node)) return;
|
|
9805
|
-
traverseNode(node, (node2) => {
|
|
9816
|
+
utils.traverseNode(node, (node2) => {
|
|
9806
9817
|
nodeStatusMap.value?.set(node2.id, {
|
|
9807
9818
|
visible: true,
|
|
9808
9819
|
expand: Array.isArray(node2.items),
|
|
@@ -9814,7 +9825,7 @@
|
|
|
9814
9825
|
});
|
|
9815
9826
|
services?.editorService.on("remove", (nodes2) => {
|
|
9816
9827
|
nodes2.forEach((node) => {
|
|
9817
|
-
traverseNode(node, (node2) => {
|
|
9828
|
+
utils.traverseNode(node, (node2) => {
|
|
9818
9829
|
nodeStatusMap.value?.delete(node2.id);
|
|
9819
9830
|
});
|
|
9820
9831
|
});
|
|
@@ -9832,6 +9843,8 @@
|
|
|
9832
9843
|
__name: "LayerPanel",
|
|
9833
9844
|
props: {
|
|
9834
9845
|
layerContentMenu: {},
|
|
9846
|
+
indent: {},
|
|
9847
|
+
nextLevelIndentIncrement: {},
|
|
9835
9848
|
customContentMenu: { type: Function }
|
|
9836
9849
|
},
|
|
9837
9850
|
setup(__props) {
|
|
@@ -9870,7 +9883,7 @@
|
|
|
9870
9883
|
highlightHandler: mouseenterHandler
|
|
9871
9884
|
} = useClick(services, isCtrlKeyDown, nodeStatusMap);
|
|
9872
9885
|
return (_ctx, _cache) => {
|
|
9873
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
9886
|
+
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicScrollbar), { class: "m-editor-layer-panel" }, {
|
|
9874
9887
|
default: vue.withCtx(() => [
|
|
9875
9888
|
vue.renderSlot(_ctx.$slots, "layer-panel-header"),
|
|
9876
9889
|
vue.createVNode(_sfc_main$o, { onSearch: vue.unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
|
|
@@ -9881,6 +9894,8 @@
|
|
|
9881
9894
|
ref: tree,
|
|
9882
9895
|
data: nodeData.value,
|
|
9883
9896
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
9897
|
+
indent: _ctx.indent,
|
|
9898
|
+
"next-level-indent-increment": _ctx.nextLevelIndentIncrement,
|
|
9884
9899
|
onNodeDragover: vue.unref(handleDragOver),
|
|
9885
9900
|
onNodeDragstart: vue.unref(handleDragStart),
|
|
9886
9901
|
onNodeDragleave: vue.unref(handleDragLeave),
|
|
@@ -9901,7 +9916,7 @@
|
|
|
9901
9916
|
vue.renderSlot(_ctx.$slots, "layer-node-label", { data: nodeData2 })
|
|
9902
9917
|
]),
|
|
9903
9918
|
_: 3
|
|
9904
|
-
}, 8, ["data", "node-status-map", "onNodeDragover", "onNodeDragstart", "onNodeDragleave", "onNodeDragend", "onNodeContextmenu", "onNodeMouseenter", "onNodeClick"])) : vue.createCommentVNode("", true),
|
|
9919
|
+
}, 8, ["data", "node-status-map", "indent", "next-level-indent-increment", "onNodeDragover", "onNodeDragstart", "onNodeDragleave", "onNodeDragend", "onNodeContextmenu", "onNodeMouseenter", "onNodeClick"])) : vue.createCommentVNode("", true),
|
|
9905
9920
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
9906
9921
|
vue.createVNode(_sfc_main$e, {
|
|
9907
9922
|
ref_key: "menu",
|
|
@@ -9919,7 +9934,7 @@
|
|
|
9919
9934
|
});
|
|
9920
9935
|
|
|
9921
9936
|
const _hoisted_1$4 = ["onClick", "onDragstart"];
|
|
9922
|
-
const _hoisted_2$
|
|
9937
|
+
const _hoisted_2$2 = ["title"];
|
|
9923
9938
|
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
9924
9939
|
...{
|
|
9925
9940
|
name: "MEditorComponentListPanel"
|
|
@@ -9970,7 +9985,7 @@
|
|
|
9970
9985
|
globalThis.clearTimeout(timeout);
|
|
9971
9986
|
timeout = void 0;
|
|
9972
9987
|
}
|
|
9973
|
-
const doc = stage.value?.renderer
|
|
9988
|
+
const doc = stage.value?.renderer?.getDocument();
|
|
9974
9989
|
if (doc && stageOptions?.containerHighlightClassName) {
|
|
9975
9990
|
utils.removeClassNameByClassName(doc, stageOptions.containerHighlightClassName);
|
|
9976
9991
|
}
|
|
@@ -9991,19 +10006,19 @@
|
|
|
9991
10006
|
timeout = stage.value.delayedMarkContainer(e);
|
|
9992
10007
|
};
|
|
9993
10008
|
return (_ctx, _cache) => {
|
|
9994
|
-
return vue.openBlock(), vue.createBlock(vue.unref(
|
|
10009
|
+
return vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicScrollbar), null, {
|
|
9995
10010
|
default: vue.withCtx(() => [
|
|
9996
10011
|
vue.renderSlot(_ctx.$slots, "component-list-panel-header"),
|
|
9997
10012
|
vue.createVNode(_sfc_main$o, { onSearch: filterTextChangeHandler }),
|
|
9998
10013
|
vue.renderSlot(_ctx.$slots, "component-list", { componentGroupList: list.value }, () => [
|
|
9999
|
-
vue.createVNode(vue.unref(
|
|
10014
|
+
vue.createVNode(vue.unref(designPlugin.TMagicCollapse), {
|
|
10000
10015
|
class: "ui-component-panel",
|
|
10001
10016
|
"model-value": collapseValue.value
|
|
10002
10017
|
}, {
|
|
10003
10018
|
default: vue.withCtx(() => [
|
|
10004
10019
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (group, index) => {
|
|
10005
10020
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
10006
|
-
group.items && group.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
10021
|
+
group.items && group.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicCollapseItem), {
|
|
10007
10022
|
key: index,
|
|
10008
10023
|
name: `${index}`
|
|
10009
10024
|
}, {
|
|
@@ -10023,7 +10038,7 @@
|
|
|
10023
10038
|
onDrag: dragHandler
|
|
10024
10039
|
}, [
|
|
10025
10040
|
vue.renderSlot(_ctx.$slots, "component-list-item", { component: item }, () => [
|
|
10026
|
-
vue.createVNode(vue.unref(
|
|
10041
|
+
vue.createVNode(vue.unref(designPlugin.TMagicTooltip), {
|
|
10027
10042
|
placement: "right",
|
|
10028
10043
|
disabled: !Boolean(item.desc),
|
|
10029
10044
|
content: item.desc
|
|
@@ -10037,7 +10052,7 @@
|
|
|
10037
10052
|
}, 1032, ["disabled", "content"]),
|
|
10038
10053
|
vue.createElementVNode("span", {
|
|
10039
10054
|
title: item.text
|
|
10040
|
-
}, vue.toDisplayString(item.text), 9, _hoisted_2$
|
|
10055
|
+
}, vue.toDisplayString(item.text), 9, _hoisted_2$2)
|
|
10041
10056
|
])
|
|
10042
10057
|
], 40, _hoisted_1$4);
|
|
10043
10058
|
}), 128))
|
|
@@ -10061,13 +10076,13 @@
|
|
|
10061
10076
|
key: 0,
|
|
10062
10077
|
class: "m-editor-sidebar"
|
|
10063
10078
|
};
|
|
10064
|
-
const _hoisted_2$
|
|
10065
|
-
const _hoisted_3
|
|
10066
|
-
const _hoisted_4
|
|
10079
|
+
const _hoisted_2$1 = { class: "m-editor-sidebar-header" };
|
|
10080
|
+
const _hoisted_3 = ["draggable", "onClick", "onDragend"];
|
|
10081
|
+
const _hoisted_4 = {
|
|
10067
10082
|
key: 1,
|
|
10068
10083
|
class: "magic-editor-tab-panel-title"
|
|
10069
10084
|
};
|
|
10070
|
-
const _hoisted_5
|
|
10085
|
+
const _hoisted_5 = { class: "m-editor-slide-list-box" };
|
|
10071
10086
|
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
10072
10087
|
...{
|
|
10073
10088
|
name: "MEditorSidebar"
|
|
@@ -10080,13 +10095,30 @@
|
|
|
10080
10095
|
items: [SideItemKey.COMPONENT_LIST, SideItemKey.LAYER, SideItemKey.CODE_BLOCK, SideItemKey.DATA_SOURCE]
|
|
10081
10096
|
}) },
|
|
10082
10097
|
layerContentMenu: {},
|
|
10098
|
+
indent: {},
|
|
10099
|
+
nextLevelIndentIncrement: {},
|
|
10083
10100
|
customContentMenu: {}
|
|
10084
10101
|
},
|
|
10085
10102
|
setup(__props, { expose: __expose }) {
|
|
10086
10103
|
const props = __props;
|
|
10087
10104
|
const services = vue.inject("services");
|
|
10088
10105
|
const columnLeftWidth = vue.computed(() => services?.uiService.get("columnWidth")[ColumnLayout.LEFT] || 0);
|
|
10089
|
-
const { height:
|
|
10106
|
+
const { height: editorContentHeight } = useEditorContentHeight();
|
|
10107
|
+
const columnLeftHeight = vue.ref(0);
|
|
10108
|
+
const unWatchEditorContentHeight = vue.watch(
|
|
10109
|
+
editorContentHeight,
|
|
10110
|
+
(height) => {
|
|
10111
|
+
if (height) {
|
|
10112
|
+
columnLeftHeight.value = height * 0.5;
|
|
10113
|
+
vue.nextTick().then(() => {
|
|
10114
|
+
unWatchEditorContentHeight();
|
|
10115
|
+
});
|
|
10116
|
+
}
|
|
10117
|
+
},
|
|
10118
|
+
{
|
|
10119
|
+
immediate: true
|
|
10120
|
+
}
|
|
10121
|
+
);
|
|
10090
10122
|
const activeTabName = vue.ref(props.data?.status);
|
|
10091
10123
|
const getItemConfig = (data) => {
|
|
10092
10124
|
const map = {
|
|
@@ -10105,7 +10137,9 @@
|
|
|
10105
10137
|
text: "已选组件",
|
|
10106
10138
|
props: {
|
|
10107
10139
|
layerContentMenu: props.layerContentMenu,
|
|
10108
|
-
customContentMenu: props.customContentMenu
|
|
10140
|
+
customContentMenu: props.customContentMenu,
|
|
10141
|
+
indent: props.indent,
|
|
10142
|
+
nextLevelIndentIncrement: props.nextLevelIndentIncrement
|
|
10109
10143
|
},
|
|
10110
10144
|
component: _sfc_main$c,
|
|
10111
10145
|
slots: {}
|
|
@@ -10116,6 +10150,10 @@
|
|
|
10116
10150
|
icon: iconsVue.EditPen,
|
|
10117
10151
|
text: "代码编辑",
|
|
10118
10152
|
component: _sfc_main$k,
|
|
10153
|
+
props: {
|
|
10154
|
+
indent: props.indent,
|
|
10155
|
+
nextLevelIndentIncrement: props.nextLevelIndentIncrement
|
|
10156
|
+
},
|
|
10119
10157
|
slots: {}
|
|
10120
10158
|
},
|
|
10121
10159
|
[SideItemKey.DATA_SOURCE]: {
|
|
@@ -10124,6 +10162,10 @@
|
|
|
10124
10162
|
icon: iconsVue.Coin,
|
|
10125
10163
|
text: "数据源",
|
|
10126
10164
|
component: _sfc_main$h,
|
|
10165
|
+
props: {
|
|
10166
|
+
indent: props.indent,
|
|
10167
|
+
nextLevelIndentIncrement: props.nextLevelIndentIncrement
|
|
10168
|
+
},
|
|
10127
10169
|
slots: {}
|
|
10128
10170
|
}
|
|
10129
10171
|
};
|
|
@@ -10178,7 +10220,7 @@
|
|
|
10178
10220
|
return (_ctx, _cache) => {
|
|
10179
10221
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
10180
10222
|
_ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
10181
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
10223
|
+
vue.createElementVNode("div", _hoisted_2$1, [
|
|
10182
10224
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
|
|
10183
10225
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
10184
10226
|
class: vue.normalizeClass(["m-editor-sidebar-header-item", { "is-active": activeTabName.value === config.text }]),
|
|
@@ -10194,8 +10236,8 @@
|
|
|
10194
10236
|
key: 0,
|
|
10195
10237
|
icon: config.icon
|
|
10196
10238
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
10197
|
-
config.text ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4
|
|
10198
|
-
], 46, _hoisted_3
|
|
10239
|
+
config.text ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, vue.toDisplayString(config.text), 1)) : vue.createCommentVNode("", true)
|
|
10240
|
+
], 46, _hoisted_3)), [
|
|
10199
10241
|
[vue.vShow, !vue.unref(floatBoxStates)[config.$key]?.status]
|
|
10200
10242
|
]);
|
|
10201
10243
|
}), 128))
|
|
@@ -10340,8 +10382,8 @@
|
|
|
10340
10382
|
key: config.$key ?? index,
|
|
10341
10383
|
visible: vue.unref(floatBoxStates)[config.$key].status,
|
|
10342
10384
|
"onUpdate:visible": ($event) => vue.unref(floatBoxStates)[config.$key].status = $event,
|
|
10343
|
-
height:
|
|
10344
|
-
"onUpdate:height": _cache[1] || (_cache[1] = ($event) =>
|
|
10385
|
+
height: columnLeftHeight.value,
|
|
10386
|
+
"onUpdate:height": _cache[1] || (_cache[1] = ($event) => columnLeftHeight.value = $event),
|
|
10345
10387
|
width: columnLeftWidth.value,
|
|
10346
10388
|
title: config.text,
|
|
10347
10389
|
position: {
|
|
@@ -10350,7 +10392,7 @@
|
|
|
10350
10392
|
}
|
|
10351
10393
|
}, {
|
|
10352
10394
|
body: vue.withCtx(() => [
|
|
10353
|
-
vue.createElementVNode("div", _hoisted_5
|
|
10395
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
10354
10396
|
config && vue.unref(floatBoxStates)[config.$key].status ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.component), vue.mergeProps({
|
|
10355
10397
|
key: 0,
|
|
10356
10398
|
ref_for: true
|
|
@@ -10581,7 +10623,7 @@
|
|
|
10581
10623
|
if (!stage2) return;
|
|
10582
10624
|
vue.nextTick(() => unWatch());
|
|
10583
10625
|
stage2.on("select", (el, event) => {
|
|
10584
|
-
const els = stage2.renderer
|
|
10626
|
+
const els = stage2.renderer?.getElementsFromPoint(event) || [];
|
|
10585
10627
|
const ids = els.map((el2) => utils.getIdFromEl()(el2)).filter((id) => Boolean(id));
|
|
10586
10628
|
buttonVisible.value = ids.length > 3;
|
|
10587
10629
|
filterTextChangeHandler(ids);
|
|
@@ -10625,7 +10667,7 @@
|
|
|
10625
10667
|
});
|
|
10626
10668
|
return (_ctx, _cache) => {
|
|
10627
10669
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
10628
|
-
page.value && buttonVisible.value ? (vue.openBlock(), vue.createBlock(vue.unref(
|
|
10670
|
+
page.value && buttonVisible.value ? (vue.openBlock(), vue.createBlock(vue.unref(designPlugin.TMagicTooltip), {
|
|
10629
10671
|
key: 0,
|
|
10630
10672
|
content: "点击查看当前位置下的组件"
|
|
10631
10673
|
}, {
|
|
@@ -10680,7 +10722,7 @@
|
|
|
10680
10722
|
vue.watch(stage, (stage2) => {
|
|
10681
10723
|
if (stage2) {
|
|
10682
10724
|
stage2.on("dblclick", async (event) => {
|
|
10683
|
-
const el = await stage2.actionManager
|
|
10725
|
+
const el = await stage2.actionManager?.getElementFromPoint(event) || null;
|
|
10684
10726
|
services?.stageOverlayService.openOverlay(el);
|
|
10685
10727
|
});
|
|
10686
10728
|
} else {
|
|
@@ -10695,11 +10737,15 @@
|
|
|
10695
10737
|
subStage.mount(stageOverlay2);
|
|
10696
10738
|
const { mask, renderer } = subStage;
|
|
10697
10739
|
const { contentWindow } = renderer;
|
|
10698
|
-
mask
|
|
10740
|
+
mask?.showRule(false);
|
|
10699
10741
|
services?.stageOverlayService.updateOverlay();
|
|
10700
10742
|
contentWindow?.magic.onRuntimeReady({});
|
|
10701
10743
|
}
|
|
10702
10744
|
});
|
|
10745
|
+
vue.onBeforeUnmount(() => {
|
|
10746
|
+
services?.stageOverlayService.get("stage")?.destroy();
|
|
10747
|
+
services?.stageOverlayService.set("stage", null);
|
|
10748
|
+
});
|
|
10703
10749
|
const closeOverlayHandler = () => {
|
|
10704
10750
|
services?.stageOverlayService.closeOverlay();
|
|
10705
10751
|
};
|
|
@@ -10709,7 +10755,7 @@
|
|
|
10709
10755
|
class: "m-editor-stage-overlay",
|
|
10710
10756
|
onClick: closeOverlayHandler
|
|
10711
10757
|
}, [
|
|
10712
|
-
vue.createVNode(vue.unref(
|
|
10758
|
+
vue.createVNode(vue.unref(designPlugin.TMagicIcon), {
|
|
10713
10759
|
class: "m-editor-stage-overlay-close",
|
|
10714
10760
|
size: "20",
|
|
10715
10761
|
onClick: closeOverlayHandler
|
|
@@ -10737,32 +10783,6 @@
|
|
|
10737
10783
|
fill: "none",
|
|
10738
10784
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10739
10785
|
};
|
|
10740
|
-
const _hoisted_2$1 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
10741
|
-
"fill-rule": "evenodd",
|
|
10742
|
-
"clip-rule": "evenodd",
|
|
10743
|
-
d: "M2 4H21V6H2V4Z",
|
|
10744
|
-
fill: "black",
|
|
10745
|
-
"fill-opacity": "0.9"
|
|
10746
|
-
}, null, -1);
|
|
10747
|
-
const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
10748
|
-
"fill-rule": "evenodd",
|
|
10749
|
-
"clip-rule": "evenodd",
|
|
10750
|
-
d: "M5 11H18V13H5V11Z",
|
|
10751
|
-
fill: "black",
|
|
10752
|
-
"fill-opacity": "0.9"
|
|
10753
|
-
}, null, -1);
|
|
10754
|
-
const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
10755
|
-
"fill-rule": "evenodd",
|
|
10756
|
-
"clip-rule": "evenodd",
|
|
10757
|
-
d: "M2 18H21V20H2V18Z",
|
|
10758
|
-
fill: "black",
|
|
10759
|
-
"fill-opacity": "0.9"
|
|
10760
|
-
}, null, -1);
|
|
10761
|
-
const _hoisted_5 = [
|
|
10762
|
-
_hoisted_2$1,
|
|
10763
|
-
_hoisted_3,
|
|
10764
|
-
_hoisted_4
|
|
10765
|
-
];
|
|
10766
10786
|
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
10767
10787
|
...{
|
|
10768
10788
|
name: "MEditorCenterIcon"
|
|
@@ -10770,7 +10790,29 @@
|
|
|
10770
10790
|
__name: "CenterIcon",
|
|
10771
10791
|
setup(__props) {
|
|
10772
10792
|
return (_ctx, _cache) => {
|
|
10773
|
-
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2,
|
|
10793
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [
|
|
10794
|
+
vue.createElementVNode("path", {
|
|
10795
|
+
"fill-rule": "evenodd",
|
|
10796
|
+
"clip-rule": "evenodd",
|
|
10797
|
+
d: "M2 4H21V6H2V4Z",
|
|
10798
|
+
fill: "black",
|
|
10799
|
+
"fill-opacity": "0.9"
|
|
10800
|
+
}, null, -1),
|
|
10801
|
+
vue.createElementVNode("path", {
|
|
10802
|
+
"fill-rule": "evenodd",
|
|
10803
|
+
"clip-rule": "evenodd",
|
|
10804
|
+
d: "M5 11H18V13H5V11Z",
|
|
10805
|
+
fill: "black",
|
|
10806
|
+
"fill-opacity": "0.9"
|
|
10807
|
+
}, null, -1),
|
|
10808
|
+
vue.createElementVNode("path", {
|
|
10809
|
+
"fill-rule": "evenodd",
|
|
10810
|
+
"clip-rule": "evenodd",
|
|
10811
|
+
d: "M2 18H21V20H2V18Z",
|
|
10812
|
+
fill: "black",
|
|
10813
|
+
"fill-opacity": "0.9"
|
|
10814
|
+
}, null, -1)
|
|
10815
|
+
]));
|
|
10774
10816
|
};
|
|
10775
10817
|
}
|
|
10776
10818
|
});
|
|
@@ -10883,7 +10925,7 @@
|
|
|
10883
10925
|
const layout = await editorService.getLayout(parent.value);
|
|
10884
10926
|
const isLayoutConform = [Layout.ABSOLUTE, Layout.FIXED].includes(layout);
|
|
10885
10927
|
const isTypeConform = nodes.value?.every(
|
|
10886
|
-
(selectedNode) => ![
|
|
10928
|
+
(selectedNode) => ![core.NodeType.ROOT, core.NodeType.PAGE, "pop"].includes(`${selectedNode?.type}`)
|
|
10887
10929
|
);
|
|
10888
10930
|
canCenter.value = isLayoutConform && !!isTypeConform;
|
|
10889
10931
|
},
|
|
@@ -10951,6 +10993,9 @@
|
|
|
10951
10993
|
});
|
|
10952
10994
|
});
|
|
10953
10995
|
});
|
|
10996
|
+
vue.onBeforeUnmount(() => {
|
|
10997
|
+
stage?.destroy();
|
|
10998
|
+
});
|
|
10954
10999
|
vue.watch(zoom, (zoom2) => {
|
|
10955
11000
|
if (!stage || !zoom2) return;
|
|
10956
11001
|
stage.setZoom(zoom2);
|
|
@@ -10991,7 +11036,7 @@
|
|
|
10991
11036
|
services?.keybindingService.unregisterEl("stage");
|
|
10992
11037
|
services?.editorService.off("root-change", rootChangeHandler);
|
|
10993
11038
|
});
|
|
10994
|
-
const parseDSL =
|
|
11039
|
+
const parseDSL = getEditorConfig("parseDSL");
|
|
10995
11040
|
const contextmenuHandler = (e) => {
|
|
10996
11041
|
e.preventDefault();
|
|
10997
11042
|
menu.value?.show(e);
|
|
@@ -11008,7 +11053,7 @@
|
|
|
11008
11053
|
const config = parseDSL(`(${data})`);
|
|
11009
11054
|
if (!config || config.dragType !== DragType.COMPONENT_LIST) return;
|
|
11010
11055
|
e.preventDefault();
|
|
11011
|
-
const doc = stage?.renderer
|
|
11056
|
+
const doc = stage?.renderer?.contentWindow?.document;
|
|
11012
11057
|
const parentEl = doc?.querySelector(`.${stageOptions?.containerHighlightClassName}`);
|
|
11013
11058
|
let parent = page.value;
|
|
11014
11059
|
const parentId = utils.getIdFromEl()(parentEl);
|
|
@@ -11121,7 +11166,7 @@
|
|
|
11121
11166
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
11122
11167
|
key: item.id
|
|
11123
11168
|
}, [
|
|
11124
|
-
vue.createVNode(vue.unref(
|
|
11169
|
+
vue.createVNode(vue.unref(designPlugin.TMagicButton), {
|
|
11125
11170
|
link: "",
|
|
11126
11171
|
disabled: item.id === node.value?.id,
|
|
11127
11172
|
onClick: ($event) => select(item)
|
|
@@ -11242,7 +11287,7 @@
|
|
|
11242
11287
|
if (codeDsl[id] && !force) return;
|
|
11243
11288
|
const codeConfigProcessed = lodashEs.cloneDeep(codeConfig);
|
|
11244
11289
|
if (codeConfigProcessed.content) {
|
|
11245
|
-
const parseDSL =
|
|
11290
|
+
const parseDSL = getEditorConfig("parseDSL");
|
|
11246
11291
|
if (typeof codeConfigProcessed.content === "string") {
|
|
11247
11292
|
codeConfigProcessed.content = parseDSL(codeConfigProcessed.content);
|
|
11248
11293
|
}
|
|
@@ -11364,10 +11409,10 @@
|
|
|
11364
11409
|
const copyNodes = Array.isArray(config) ? config : [config];
|
|
11365
11410
|
const copyData = {};
|
|
11366
11411
|
if (collectorOptions && typeof collectorOptions.isTarget === "function") {
|
|
11367
|
-
const customTarget = new
|
|
11412
|
+
const customTarget = new core.Target({
|
|
11368
11413
|
...collectorOptions
|
|
11369
11414
|
});
|
|
11370
|
-
const coperWatcher = new
|
|
11415
|
+
const coperWatcher = new core.Watcher();
|
|
11371
11416
|
coperWatcher.addTarget(customTarget);
|
|
11372
11417
|
coperWatcher.collect(copyNodes, {}, true, collectorOptions.type);
|
|
11373
11418
|
Object.keys(customTarget.deps).forEach((nodeId) => {
|
|
@@ -11551,10 +11596,10 @@
|
|
|
11551
11596
|
const copyNodes = Array.isArray(config) ? config : [config];
|
|
11552
11597
|
const copyData = [];
|
|
11553
11598
|
if (collectorOptions && typeof collectorOptions.isTarget === "function") {
|
|
11554
|
-
const customTarget = new
|
|
11599
|
+
const customTarget = new core.Target({
|
|
11555
11600
|
...collectorOptions
|
|
11556
11601
|
});
|
|
11557
|
-
const coperWatcher = new
|
|
11602
|
+
const coperWatcher = new core.Watcher();
|
|
11558
11603
|
coperWatcher.addTarget(customTarget);
|
|
11559
11604
|
coperWatcher.collect(copyNodes, {}, true, collectorOptions.type);
|
|
11560
11605
|
Object.keys(customTarget.deps).forEach((nodeId) => {
|
|
@@ -11593,8 +11638,8 @@
|
|
|
11593
11638
|
|
|
11594
11639
|
const idleTask = new IdleTask();
|
|
11595
11640
|
class Dep extends BaseService {
|
|
11596
|
-
watcher = new
|
|
11597
|
-
removeTargets(type =
|
|
11641
|
+
watcher = new core.Watcher({ initialTargets: vue.reactive({}) });
|
|
11642
|
+
removeTargets(type = core.DepTargetType.DEFAULT) {
|
|
11598
11643
|
this.watcher.removeTargets(type);
|
|
11599
11644
|
const targets = this.watcher.getTargets(type);
|
|
11600
11645
|
if (!targets) return;
|
|
@@ -11602,17 +11647,17 @@
|
|
|
11602
11647
|
this.emit("remove-target", target.id);
|
|
11603
11648
|
}
|
|
11604
11649
|
}
|
|
11605
|
-
getTargets(type =
|
|
11650
|
+
getTargets(type = core.DepTargetType.DEFAULT) {
|
|
11606
11651
|
return this.watcher.getTargets(type);
|
|
11607
11652
|
}
|
|
11608
|
-
getTarget(id, type =
|
|
11653
|
+
getTarget(id, type = core.DepTargetType.DEFAULT) {
|
|
11609
11654
|
return this.watcher.getTarget(id, type);
|
|
11610
11655
|
}
|
|
11611
11656
|
addTarget(target) {
|
|
11612
11657
|
this.watcher.addTarget(target);
|
|
11613
11658
|
this.emit("add-target", target);
|
|
11614
11659
|
}
|
|
11615
|
-
removeTarget(id, type =
|
|
11660
|
+
removeTarget(id, type = core.DepTargetType.DEFAULT) {
|
|
11616
11661
|
this.watcher.removeTarget(id, type);
|
|
11617
11662
|
this.emit("remove-target", id);
|
|
11618
11663
|
}
|
|
@@ -11660,10 +11705,10 @@
|
|
|
11660
11705
|
clearByType(type, nodes) {
|
|
11661
11706
|
return this.watcher.clearByType(type, nodes);
|
|
11662
11707
|
}
|
|
11663
|
-
hasTarget(id, type =
|
|
11708
|
+
hasTarget(id, type = core.DepTargetType.DEFAULT) {
|
|
11664
11709
|
return this.watcher.hasTarget(id, type);
|
|
11665
11710
|
}
|
|
11666
|
-
hasSpecifiedTypeTarget(type =
|
|
11711
|
+
hasSpecifiedTypeTarget(type = core.DepTargetType.DEFAULT) {
|
|
11667
11712
|
return this.watcher.hasSpecifiedTypeTarget(type);
|
|
11668
11713
|
}
|
|
11669
11714
|
on(eventName, listener) {
|
|
@@ -11951,6 +11996,10 @@
|
|
|
11951
11996
|
const subStage = this.get("stage");
|
|
11952
11997
|
const wrapDiv = this.get("wrapDiv");
|
|
11953
11998
|
subStage?.destroy();
|
|
11999
|
+
for (let i = 0, l = wrapDiv.children.length; i < l; i++) {
|
|
12000
|
+
const child = wrapDiv.children[i];
|
|
12001
|
+
child.remove();
|
|
12002
|
+
}
|
|
11954
12003
|
wrapDiv.remove();
|
|
11955
12004
|
this.set("stage", null);
|
|
11956
12005
|
this.set("sourceEl", null);
|
|
@@ -11976,7 +12025,7 @@
|
|
|
11976
12025
|
autoScrollIntoView: false,
|
|
11977
12026
|
render: async (stage) => {
|
|
11978
12027
|
this.copyDocumentElement();
|
|
11979
|
-
const rootEls = stage.renderer
|
|
12028
|
+
const rootEls = stage.renderer?.getDocument()?.body.children;
|
|
11980
12029
|
if (rootEls) {
|
|
11981
12030
|
Array.from(rootEls).forEach((element) => {
|
|
11982
12031
|
if (["SCRIPT", "STYLE"].includes(element.tagName)) {
|
|
@@ -12005,8 +12054,8 @@
|
|
|
12005
12054
|
copyDocumentElement() {
|
|
12006
12055
|
const subStage = this.get("stage");
|
|
12007
12056
|
const stage = editorService.get("stage");
|
|
12008
|
-
const doc = subStage?.renderer
|
|
12009
|
-
const documentElement = stage?.renderer
|
|
12057
|
+
const doc = subStage?.renderer?.getDocument();
|
|
12058
|
+
const documentElement = stage?.renderer?.getDocument()?.documentElement;
|
|
12010
12059
|
if (doc && documentElement) {
|
|
12011
12060
|
doc.replaceChild(documentElement.cloneNode(true), doc.documentElement);
|
|
12012
12061
|
}
|
|
@@ -12024,12 +12073,13 @@
|
|
|
12024
12073
|
height: ${sourceEl?.scrollHeight}px;
|
|
12025
12074
|
background-color: #fff;
|
|
12026
12075
|
`;
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12076
|
+
for (let i = 0, l = wrapDiv.children.length; i < l; i++) {
|
|
12077
|
+
const child = wrapDiv.children[i];
|
|
12078
|
+
child.remove();
|
|
12079
|
+
}
|
|
12030
12080
|
wrapDiv.appendChild(contentEl);
|
|
12031
12081
|
setTimeout(() => {
|
|
12032
|
-
subStage?.renderer
|
|
12082
|
+
subStage?.renderer?.contentWindow?.magic.onPageElUpdate(wrapDiv);
|
|
12033
12083
|
});
|
|
12034
12084
|
if (await stageOptions?.canSelect?.(contentEl)) {
|
|
12035
12085
|
const id = utils.getIdFromEl()(contentEl);
|
|
@@ -12235,9 +12285,9 @@
|
|
|
12235
12285
|
value.dataSources = value.dataSources || [];
|
|
12236
12286
|
codeBlockService.setCodeDsl(value.codeBlocks);
|
|
12237
12287
|
dataSourceService.set("dataSources", value.dataSources);
|
|
12238
|
-
depService.removeTargets(
|
|
12288
|
+
depService.removeTargets(core.DepTargetType.CODE_BLOCK);
|
|
12239
12289
|
Object.entries(value.codeBlocks).forEach(([id, code]) => {
|
|
12240
|
-
depService.addTarget(
|
|
12290
|
+
depService.addTarget(core.createCodeBlockTarget(id, code));
|
|
12241
12291
|
});
|
|
12242
12292
|
dataSourceService.get("dataSources").forEach((ds) => {
|
|
12243
12293
|
initDataSourceDepTarget(ds);
|
|
@@ -12269,7 +12319,7 @@
|
|
|
12269
12319
|
};
|
|
12270
12320
|
const getApp = () => {
|
|
12271
12321
|
const stage = editorService.get("stage");
|
|
12272
|
-
return stage?.renderer
|
|
12322
|
+
return stage?.renderer?.runtime?.getApp?.();
|
|
12273
12323
|
};
|
|
12274
12324
|
const updateDataSourceSchema = () => {
|
|
12275
12325
|
const root = editorService.get("root");
|
|
@@ -12280,13 +12330,13 @@
|
|
|
12280
12330
|
const targetAddHandler = (target) => {
|
|
12281
12331
|
const root = editorService.get("root");
|
|
12282
12332
|
if (!root) return;
|
|
12283
|
-
if (target.type ===
|
|
12333
|
+
if (target.type === core.DepTargetType.DATA_SOURCE) {
|
|
12284
12334
|
if (!root.dataSourceDeps) {
|
|
12285
12335
|
root.dataSourceDeps = {};
|
|
12286
12336
|
}
|
|
12287
12337
|
root.dataSourceDeps[target.id] = target.deps;
|
|
12288
12338
|
}
|
|
12289
|
-
if (target.type ===
|
|
12339
|
+
if (target.type === core.DepTargetType.DATA_SOURCE_COND) {
|
|
12290
12340
|
if (!root.dataSourceCondDeps) {
|
|
12291
12341
|
root.dataSourceCondDeps = {};
|
|
12292
12342
|
}
|
|
@@ -12302,7 +12352,7 @@
|
|
|
12302
12352
|
delete root.dataSourceCondDeps[id];
|
|
12303
12353
|
}
|
|
12304
12354
|
};
|
|
12305
|
-
const collectedHandler = (nodes, deep) => {
|
|
12355
|
+
const collectedHandler = lodashEs.debounce((nodes, deep) => {
|
|
12306
12356
|
const root = editorService.get("root");
|
|
12307
12357
|
const stage = editorService.get("stage");
|
|
12308
12358
|
if (!root || !stage) return;
|
|
@@ -12317,7 +12367,7 @@
|
|
|
12317
12367
|
const allNodes = [];
|
|
12318
12368
|
if (deep) {
|
|
12319
12369
|
nodes.forEach((node) => {
|
|
12320
|
-
traverseNode(node, (node2) => {
|
|
12370
|
+
utils.traverseNode(node, (node2) => {
|
|
12321
12371
|
if (!allNodes.includes(node2)) {
|
|
12322
12372
|
allNodes.push(node2);
|
|
12323
12373
|
}
|
|
@@ -12337,14 +12387,14 @@
|
|
|
12337
12387
|
});
|
|
12338
12388
|
});
|
|
12339
12389
|
});
|
|
12340
|
-
};
|
|
12390
|
+
}, 300);
|
|
12341
12391
|
depService.on("add-target", targetAddHandler);
|
|
12342
12392
|
depService.on("remove-target", targetRemoveHandler);
|
|
12343
12393
|
depService.on("collected", collectedHandler);
|
|
12344
12394
|
const initDataSourceDepTarget = (ds) => {
|
|
12345
|
-
depService.addTarget(
|
|
12346
|
-
depService.addTarget(
|
|
12347
|
-
depService.addTarget(
|
|
12395
|
+
depService.addTarget(core.createDataSourceTarget(ds, vue.reactive({})));
|
|
12396
|
+
depService.addTarget(core.createDataSourceMethodTarget(ds, vue.reactive({})));
|
|
12397
|
+
depService.addTarget(core.createDataSourceCondTarget(ds, vue.reactive({})));
|
|
12348
12398
|
};
|
|
12349
12399
|
const collectIdle = (nodes, deep) => {
|
|
12350
12400
|
nodes.forEach((node) => {
|
|
@@ -12376,14 +12426,14 @@
|
|
|
12376
12426
|
editorService.on("remove", nodeRemoveHandler);
|
|
12377
12427
|
editorService.on("update", nodeUpdateHandler);
|
|
12378
12428
|
const codeBlockAddOrUpdateHandler = (id, codeBlock) => {
|
|
12379
|
-
if (depService.hasTarget(id,
|
|
12380
|
-
depService.getTarget(id,
|
|
12429
|
+
if (depService.hasTarget(id, core.DepTargetType.CODE_BLOCK)) {
|
|
12430
|
+
depService.getTarget(id, core.DepTargetType.CODE_BLOCK).name = codeBlock.name;
|
|
12381
12431
|
return;
|
|
12382
12432
|
}
|
|
12383
|
-
depService.addTarget(
|
|
12433
|
+
depService.addTarget(core.createCodeBlockTarget(id, codeBlock));
|
|
12384
12434
|
};
|
|
12385
12435
|
const codeBlockRemoveHandler = (id) => {
|
|
12386
|
-
depService.removeTarget(id,
|
|
12436
|
+
depService.removeTarget(id, core.DepTargetType.CODE_BLOCK);
|
|
12387
12437
|
};
|
|
12388
12438
|
codeBlockService.on("addOrUpdate", codeBlockAddOrUpdateHandler);
|
|
12389
12439
|
codeBlockService.on("remove", codeBlockRemoveHandler);
|
|
@@ -12398,9 +12448,9 @@
|
|
|
12398
12448
|
collectIdle(root?.items || [], true);
|
|
12399
12449
|
};
|
|
12400
12450
|
const removeDataSourceTarget = (id) => {
|
|
12401
|
-
depService.removeTarget(id,
|
|
12402
|
-
depService.removeTarget(id,
|
|
12403
|
-
depService.removeTarget(id,
|
|
12451
|
+
depService.removeTarget(id, core.DepTargetType.DATA_SOURCE);
|
|
12452
|
+
depService.removeTarget(id, core.DepTargetType.DATA_SOURCE_COND);
|
|
12453
|
+
depService.removeTarget(id, core.DepTargetType.DATA_SOURCE_METHOD);
|
|
12404
12454
|
};
|
|
12405
12455
|
const dataSourceRemoveHandler = (id) => {
|
|
12406
12456
|
removeDataSourceTarget(id);
|
|
@@ -12461,6 +12511,8 @@
|
|
|
12461
12511
|
disabledPageFragment: { type: Boolean },
|
|
12462
12512
|
disabledStageOverlay: { type: Boolean },
|
|
12463
12513
|
disabledShowSrc: { type: Boolean },
|
|
12514
|
+
treeIndent: {},
|
|
12515
|
+
treeNextLevelIndentIncrement: {},
|
|
12464
12516
|
render: { type: Function },
|
|
12465
12517
|
updateDragEl: { type: Function },
|
|
12466
12518
|
canSelect: { type: Function },
|
|
@@ -12537,7 +12589,9 @@
|
|
|
12537
12589
|
vue.createVNode(_sfc_main$a, {
|
|
12538
12590
|
data: _ctx.sidebar,
|
|
12539
12591
|
"layer-content-menu": _ctx.layerContentMenu,
|
|
12540
|
-
"custom-content-menu": _ctx.customContentMenu
|
|
12592
|
+
"custom-content-menu": _ctx.customContentMenu,
|
|
12593
|
+
indent: _ctx.treeIndent,
|
|
12594
|
+
"next-level-indent-increment": _ctx.treeNextLevelIndentIncrement
|
|
12541
12595
|
}, {
|
|
12542
12596
|
"layer-panel-header": vue.withCtx(() => [
|
|
12543
12597
|
vue.renderSlot(_ctx.$slots, "layer-panel-header")
|
|
@@ -12579,7 +12633,7 @@
|
|
|
12579
12633
|
vue.renderSlot(_ctx.$slots, "data-source-panel-search")
|
|
12580
12634
|
]),
|
|
12581
12635
|
_: 3
|
|
12582
|
-
}, 8, ["data", "layer-content-menu", "custom-content-menu"])
|
|
12636
|
+
}, 8, ["data", "layer-content-menu", "custom-content-menu", "indent", "next-level-indent-increment"])
|
|
12583
12637
|
])
|
|
12584
12638
|
]),
|
|
12585
12639
|
workspace: vue.withCtx(() => [
|
|
@@ -12649,8 +12703,11 @@
|
|
|
12649
12703
|
const index = {
|
|
12650
12704
|
install: (app, opt) => {
|
|
12651
12705
|
const option = Object.assign(defaultInstallOpt, opt || {});
|
|
12706
|
+
app.use(designPlugin, opt || {});
|
|
12707
|
+
app.use(formPlugin, opt || {});
|
|
12708
|
+
app.use(tablePlugin);
|
|
12652
12709
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
12653
|
-
|
|
12710
|
+
setEditorConfig(option);
|
|
12654
12711
|
app.component(`${_sfc_main.name || "MEditor"}`, _sfc_main);
|
|
12655
12712
|
app.component("magic-code-editor", _sfc_main$X);
|
|
12656
12713
|
app.component("m-fields-ui-select", _sfc_main$B);
|
|
@@ -12673,10 +12730,14 @@
|
|
|
12673
12730
|
}
|
|
12674
12731
|
};
|
|
12675
12732
|
|
|
12733
|
+
exports.designPlugin = designPlugin;
|
|
12734
|
+
exports.formPlugin = formPlugin;
|
|
12735
|
+
exports.tablePlugin = tablePlugin;
|
|
12676
12736
|
Object.defineProperty(exports, "DepTargetType", {
|
|
12677
12737
|
enumerable: true,
|
|
12678
|
-
get: () =>
|
|
12738
|
+
get: () => core.DepTargetType
|
|
12679
12739
|
});
|
|
12740
|
+
exports.StageCore = StageCore;
|
|
12680
12741
|
exports.CODE_DRAFT_STORAGE_KEY = CODE_DRAFT_STORAGE_KEY;
|
|
12681
12742
|
exports.COPY_CODE_STORAGE_KEY = COPY_CODE_STORAGE_KEY;
|
|
12682
12743
|
exports.COPY_DS_STORAGE_KEY = COPY_DS_STORAGE_KEY;
|
|
@@ -12723,6 +12784,8 @@
|
|
|
12723
12784
|
exports.TMagicCodeEditor = _sfc_main$X;
|
|
12724
12785
|
exports.TMagicEditor = _sfc_main;
|
|
12725
12786
|
exports.ToolButton = _sfc_main$y;
|
|
12787
|
+
exports.Tree = _sfc_main$m;
|
|
12788
|
+
exports.TreeNode = _sfc_main$n;
|
|
12726
12789
|
exports.UI_SELECT_MODE_EVENT_NAME = UI_SELECT_MODE_EVENT_NAME;
|
|
12727
12790
|
exports.UndoRedo = UndoRedo;
|
|
12728
12791
|
exports.V_GUIDE_LINE_STORAGE_KEY = V_GUIDE_LINE_STORAGE_KEY;
|
|
@@ -12748,9 +12811,9 @@
|
|
|
12748
12811
|
exports.generatePageNameByApp = generatePageNameByApp;
|
|
12749
12812
|
exports.getAddParent = getAddParent;
|
|
12750
12813
|
exports.getCascaderOptionsFromFields = getCascaderOptionsFromFields;
|
|
12751
|
-
exports.getConfig = getConfig;
|
|
12752
12814
|
exports.getDefaultConfig = getDefaultConfig;
|
|
12753
12815
|
exports.getDisplayField = getDisplayField;
|
|
12816
|
+
exports.getEditorConfig = getEditorConfig;
|
|
12754
12817
|
exports.getFormConfig = getFormConfig;
|
|
12755
12818
|
exports.getFormValue = getFormValue;
|
|
12756
12819
|
exports.getGuideLineFromCache = getGuideLineFromCache;
|
|
@@ -12763,7 +12826,6 @@
|
|
|
12763
12826
|
exports.getRelativeStyle = getRelativeStyle;
|
|
12764
12827
|
exports.historyService = historyService;
|
|
12765
12828
|
exports.info = info;
|
|
12766
|
-
exports.isFixed = isFixed;
|
|
12767
12829
|
exports.log = log;
|
|
12768
12830
|
exports.moveItemsInContainer = moveItemsInContainer;
|
|
12769
12831
|
exports.numberOptions = numberOptions;
|
|
@@ -12771,21 +12833,54 @@
|
|
|
12771
12833
|
exports.removeDataSourceFieldPrefix = removeDataSourceFieldPrefix;
|
|
12772
12834
|
exports.serializeConfig = serializeConfig;
|
|
12773
12835
|
exports.setChildrenLayout = setChildrenLayout;
|
|
12774
|
-
exports.
|
|
12836
|
+
exports.setEditorConfig = setEditorConfig;
|
|
12775
12837
|
exports.setLayout = setLayout;
|
|
12776
12838
|
exports.stageOverlayService = stageOverlayService;
|
|
12777
12839
|
exports.storageService = storageService;
|
|
12778
12840
|
exports.styleTabConfig = styleTabConfig;
|
|
12779
|
-
exports.traverseNode = traverseNode;
|
|
12780
12841
|
exports.uiService = uiService;
|
|
12781
12842
|
exports.updateStatus = updateStatus;
|
|
12782
12843
|
exports.useCodeBlockEdit = useCodeBlockEdit;
|
|
12783
12844
|
exports.useDataSourceMethod = useDataSourceMethod;
|
|
12784
12845
|
exports.useEditorContentHeight = useEditorContentHeight;
|
|
12846
|
+
exports.useFilter = useFilter;
|
|
12785
12847
|
exports.useFloatBox = useFloatBox;
|
|
12848
|
+
exports.useGetSo = useGetSo;
|
|
12849
|
+
exports.useNextFloatBoxPosition = useNextFloatBoxPosition;
|
|
12850
|
+
exports.useNodeStatus = useNodeStatus$1;
|
|
12786
12851
|
exports.useStage = useStage;
|
|
12787
12852
|
exports.useWindowRect = useWindowRect;
|
|
12788
12853
|
exports.warn = warn;
|
|
12854
|
+
Object.keys(designPlugin).forEach(k => {
|
|
12855
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
12856
|
+
enumerable: true,
|
|
12857
|
+
get: () => designPlugin[k]
|
|
12858
|
+
});
|
|
12859
|
+
});
|
|
12860
|
+
Object.keys(formPlugin).forEach(k => {
|
|
12861
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
12862
|
+
enumerable: true,
|
|
12863
|
+
get: () => formPlugin[k]
|
|
12864
|
+
});
|
|
12865
|
+
});
|
|
12866
|
+
Object.keys(tablePlugin).forEach(k => {
|
|
12867
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
12868
|
+
enumerable: true,
|
|
12869
|
+
get: () => tablePlugin[k]
|
|
12870
|
+
});
|
|
12871
|
+
});
|
|
12872
|
+
Object.keys(utils).forEach(k => {
|
|
12873
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
12874
|
+
enumerable: true,
|
|
12875
|
+
get: () => utils[k]
|
|
12876
|
+
});
|
|
12877
|
+
});
|
|
12878
|
+
Object.keys(StageCore).forEach(k => {
|
|
12879
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
12880
|
+
enumerable: true,
|
|
12881
|
+
get: () => StageCore[k]
|
|
12882
|
+
});
|
|
12883
|
+
});
|
|
12789
12884
|
|
|
12790
12885
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
12791
12886
|
|