@tmagic/editor 1.5.0-beta.14 → 1.5.0-beta.15
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 +61 -6
- package/dist/tmagic-editor.js +521 -242
- package/dist/tmagic-editor.umd.cjs +522 -243
- package/package.json +12 -10
- package/src/components/CodeBlockEditor.vue +11 -5
- package/src/components/CodeParams.vue +3 -3
- package/src/fields/Code.vue +1 -2
- package/src/fields/CodeSelect.vue +13 -11
- package/src/fields/CodeSelectCol.vue +32 -5
- package/src/fields/CondOpSelect.vue +5 -2
- package/src/fields/DataSourceFields.vue +31 -12
- package/src/fields/DataSourceMethods.vue +72 -14
- package/src/fields/DisplayConds.vue +8 -3
- package/src/fields/EventSelect.vue +25 -8
- package/src/fields/KeyValue.vue +15 -10
- package/src/hooks/index.ts +0 -1
- package/src/hooks/use-code-block-edit.ts +1 -1
- package/src/hooks/use-data-source-edit.ts +3 -2
- package/src/initService.ts +103 -24
- package/src/layouts/Framework.vue +0 -3
- package/src/layouts/PropsPanel.vue +3 -3
- package/src/layouts/page-bar/PageBar.vue +46 -3
- package/src/layouts/page-bar/PageBarScrollContainer.vue +49 -24
- package/src/layouts/page-bar/PageList.vue +4 -2
- package/src/layouts/sidebar/Sidebar.vue +3 -0
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +6 -1
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +7 -5
- package/src/layouts/sidebar/data-source/DataSourceList.vue +6 -1
- package/src/layouts/workspace/Workspace.vue +5 -2
- package/src/layouts/workspace/viewer/Stage.vue +12 -5
- package/src/services/dataSource.ts +12 -5
- package/src/services/dep.ts +49 -11
- package/src/services/editor.ts +26 -11
- package/src/theme/page-bar.scss +24 -9
- package/src/theme/search-input.scss +1 -0
- package/src/utils/data-source/formConfigs/http.ts +2 -0
- package/src/utils/data-source/index.ts +2 -2
- package/src/utils/editor.ts +94 -2
- package/src/utils/idle-task.ts +34 -3
- package/src/utils/props.ts +3 -3
- package/types/index.d.ts +803 -1169
- package/src/hooks/use-data-source-method.ts +0 -100
package/dist/tmagic-editor.js
CHANGED
|
@@ -7,15 +7,15 @@ export { default as formPlugin } from '@tmagic/form';
|
|
|
7
7
|
import tablePlugin__default, { MagicTable } from '@tmagic/table';
|
|
8
8
|
export * from '@tmagic/table';
|
|
9
9
|
export { default as tablePlugin } from '@tmagic/table';
|
|
10
|
-
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createElementBlock, normalizeClass, resolveDynamicComponent, toRaw, ref, watch, onMounted, onBeforeUnmount, Teleport, normalizeStyle, computed, reactive, resolveComponent, inject, createCommentVNode, Fragment, renderList, mergeProps, mergeModels, useModel, nextTick, provide, renderSlot, toDisplayString, createTextVNode, isRef, createStaticVNode, watchEffect, withModifiers, toHandlers,
|
|
10
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, createElementBlock, normalizeClass, resolveDynamicComponent, toRaw, ref, watch, onMounted, onBeforeUnmount, Teleport, normalizeStyle, computed, reactive, resolveComponent, inject, createCommentVNode, Fragment, renderList, mergeProps, mergeModels, useModel, nextTick, provide, renderSlot, toDisplayString, createTextVNode, isRef, createStaticVNode, watchEffect, withModifiers, toHandlers, createSlots, markRaw, getCurrentInstance, withDirectives, vShow, Transition, resolveDirective, mergeDefaults } from 'vue';
|
|
11
11
|
import { Edit, FullScreen, View, Close, Coin, Delete, Plus, ArrowDown, ArrowLeftBold, ArrowRightBold, Files, Search, CaretBottom, DocumentCopy, Grid, Memo, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Document, ArrowRight, CopyDocument, Hide, Goods, List, EditPen, CloseBold, Top, Bottom } from '@element-plus/icons-vue';
|
|
12
|
-
import { throttle, isEmpty, cloneDeep, mergeWith,
|
|
12
|
+
import { throttle, isEmpty, isObject, cloneDeep, mergeWith, uniq, get, map, has, pick, keys } from 'lodash-es';
|
|
13
13
|
import serialize from 'serialize-javascript';
|
|
14
14
|
import { emmetHTML, emmetCSS } from 'emmet-monaco-es';
|
|
15
15
|
import * as monaco from 'monaco-editor';
|
|
16
16
|
import { HookCodeType, HookType, NODE_CONDS_KEY, Target, Watcher, NodeType, ActionType, DepTargetType, DEFAULT_EVENTS, DEFAULT_METHODS, createCodeBlockTarget, createDataSourceTarget, createDataSourceMethodTarget, createDataSourceCondTarget } from '@tmagic/core';
|
|
17
17
|
export { DepTargetType } from '@tmagic/core';
|
|
18
|
-
import { isPage, isPageFragment, isPop, getNodePath, isNumber, getElById, calcValueByFontsize, toLine, guid, getValueByKeyPath, setValueByKeyPath, getNodeInfo, dataSourceTemplateRegExp, getKeysArray,
|
|
18
|
+
import { isPage, isPageFragment, isPop, getNodePath, isNumber, getElById, calcValueByFontsize, DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, toLine, guid, getValueByKeyPath, setValueByKeyPath, getNodeInfo, dataSourceTemplateRegExp, getKeysArray, getKeys, convertToNumber, getIdFromEl, traverseNode, getDefaultValueFromFields, DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX, removeClassName, addClassName, removeClassNameByClassName, getNodes } from '@tmagic/utils';
|
|
19
19
|
export * from '@tmagic/utils';
|
|
20
20
|
import VanillaMoveable from 'moveable';
|
|
21
21
|
import StageCore__default, { isFixed, GuidesType, getOffset, RenderType, CONTAINER_HIGHLIGHT_CLASS_NAME, ContainerHighlightType } from '@tmagic/stage';
|
|
@@ -23,6 +23,7 @@ export * from '@tmagic/stage';
|
|
|
23
23
|
export { default as StageCore } from '@tmagic/stage';
|
|
24
24
|
import { EventEmitter } from 'events';
|
|
25
25
|
import Gesto from 'gesto';
|
|
26
|
+
import { detailedDiff } from 'deep-object-diff';
|
|
26
27
|
import Sortable from 'sortablejs';
|
|
27
28
|
import KeyController from 'keycon';
|
|
28
29
|
|
|
@@ -290,9 +291,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
|
290
291
|
emits: ["change"],
|
|
291
292
|
setup(__props, { emit: __emit }) {
|
|
292
293
|
const emit = __emit;
|
|
293
|
-
const props = __props;
|
|
294
294
|
const save = (v) => {
|
|
295
|
-
props.model[props.name] = v;
|
|
296
295
|
emit("change", v);
|
|
297
296
|
};
|
|
298
297
|
return (_ctx, _cache) => {
|
|
@@ -442,11 +441,13 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
442
441
|
{ value: HookCodeType.DATA_SOURCE_METHOD, text: "数据源方法" }
|
|
443
442
|
],
|
|
444
443
|
defaultValue: "code",
|
|
445
|
-
onChange: (mForm, v, { model }) => {
|
|
444
|
+
onChange: (mForm, v, { model, prop, changeRecords }) => {
|
|
446
445
|
if (v === HookCodeType.DATA_SOURCE_METHOD) {
|
|
447
446
|
model.codeId = [];
|
|
447
|
+
changeRecords.push({ propPath: prop.replace("codeType", "codeId"), value: [] });
|
|
448
448
|
} else {
|
|
449
449
|
model.codeId = "";
|
|
450
|
+
changeRecords.push({ propPath: prop.replace("codeType", "codeId"), value: "" });
|
|
450
451
|
}
|
|
451
452
|
return v;
|
|
452
453
|
}
|
|
@@ -485,9 +486,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
485
486
|
immediate: true
|
|
486
487
|
}
|
|
487
488
|
);
|
|
488
|
-
const changeHandler =
|
|
489
|
-
emit("change", props.model[props.name]);
|
|
490
|
-
};
|
|
489
|
+
const changeHandler = (v, eventData) => emit("change", v, eventData);
|
|
491
490
|
return (_ctx, _cache) => {
|
|
492
491
|
return openBlock(), createElementBlock("div", {
|
|
493
492
|
class: normalizeClass(["m-fields-code-select", _ctx.config.className])
|
|
@@ -569,7 +568,7 @@ const styleTabConfig = {
|
|
|
569
568
|
fieldConfig: {
|
|
570
569
|
type: "text"
|
|
571
570
|
},
|
|
572
|
-
disabled: (
|
|
571
|
+
disabled: (_vm, { model }) => model.position === "fixed" && model._magic_position === "fixedBottom"
|
|
573
572
|
},
|
|
574
573
|
{
|
|
575
574
|
type: "data-source-field-select",
|
|
@@ -590,7 +589,7 @@ const styleTabConfig = {
|
|
|
590
589
|
fieldConfig: {
|
|
591
590
|
type: "text"
|
|
592
591
|
},
|
|
593
|
-
disabled: (
|
|
592
|
+
disabled: (_vm, { model }) => model.position === "fixed" && model._magic_position === "fixedTop"
|
|
594
593
|
}
|
|
595
594
|
]
|
|
596
595
|
},
|
|
@@ -839,7 +838,7 @@ const advancedTabConfig = {
|
|
|
839
838
|
};
|
|
840
839
|
const displayTabConfig = {
|
|
841
840
|
title: "显示条件",
|
|
842
|
-
display: (
|
|
841
|
+
display: (_vm, { model }) => model.type !== "page",
|
|
843
842
|
items: [
|
|
844
843
|
{
|
|
845
844
|
type: "display-conds",
|
|
@@ -1163,6 +1162,70 @@ const moveItemsInContainer = (sourceIndices, parent, targetIndex) => {
|
|
|
1163
1162
|
}
|
|
1164
1163
|
}
|
|
1165
1164
|
};
|
|
1165
|
+
const isValueIncludeDataSource = (value) => {
|
|
1166
|
+
if (typeof value === "string" && /\$\{([\s\S]+?)\}/.test(value)) {
|
|
1167
|
+
return true;
|
|
1168
|
+
}
|
|
1169
|
+
if (Array.isArray(value) && `${value[0]}`.startsWith(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX)) {
|
|
1170
|
+
return true;
|
|
1171
|
+
}
|
|
1172
|
+
if (value?.isBindDataSource && value.dataSourceId) {
|
|
1173
|
+
return true;
|
|
1174
|
+
}
|
|
1175
|
+
if (value?.isBindDataSourceField && value.dataSourceId) {
|
|
1176
|
+
return true;
|
|
1177
|
+
}
|
|
1178
|
+
return false;
|
|
1179
|
+
};
|
|
1180
|
+
const isIncludeDataSourceByDiffAddResult = (diffResult) => {
|
|
1181
|
+
for (const value of Object.values(diffResult)) {
|
|
1182
|
+
const result = isValueIncludeDataSource(value);
|
|
1183
|
+
if (result) {
|
|
1184
|
+
return true;
|
|
1185
|
+
}
|
|
1186
|
+
if (isObject(value)) {
|
|
1187
|
+
return isIncludeDataSourceByDiffAddResult(value);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
return false;
|
|
1191
|
+
};
|
|
1192
|
+
const isIncludeDataSourceByDiffUpdatedResult = (diffResult, oldNode) => {
|
|
1193
|
+
for (const [key, value] of Object.entries(diffResult)) {
|
|
1194
|
+
if (isValueIncludeDataSource(value)) {
|
|
1195
|
+
return true;
|
|
1196
|
+
}
|
|
1197
|
+
if (isValueIncludeDataSource(oldNode[key])) {
|
|
1198
|
+
return true;
|
|
1199
|
+
}
|
|
1200
|
+
if (isObject(value)) {
|
|
1201
|
+
return isIncludeDataSourceByDiffUpdatedResult(value, oldNode[key]);
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
return false;
|
|
1205
|
+
};
|
|
1206
|
+
const isIncludeDataSource = (node, oldNode) => {
|
|
1207
|
+
const diffResult = detailedDiff(oldNode, node);
|
|
1208
|
+
let isIncludeDataSource2 = false;
|
|
1209
|
+
if (diffResult.updated) {
|
|
1210
|
+
if (diffResult.updated[NODE_CONDS_KEY]) {
|
|
1211
|
+
return true;
|
|
1212
|
+
}
|
|
1213
|
+
isIncludeDataSource2 = isIncludeDataSourceByDiffUpdatedResult(diffResult.updated, oldNode);
|
|
1214
|
+
if (isIncludeDataSource2) return true;
|
|
1215
|
+
}
|
|
1216
|
+
if (diffResult.added) {
|
|
1217
|
+
isIncludeDataSource2 = isIncludeDataSourceByDiffAddResult(diffResult.added);
|
|
1218
|
+
if (isIncludeDataSource2) return true;
|
|
1219
|
+
}
|
|
1220
|
+
if (diffResult.deleted) {
|
|
1221
|
+
if (diffResult.deleted[NODE_CONDS_KEY]) {
|
|
1222
|
+
return true;
|
|
1223
|
+
}
|
|
1224
|
+
isIncludeDataSource2 = isIncludeDataSourceByDiffAddResult(diffResult.deleted);
|
|
1225
|
+
if (isIncludeDataSource2) return true;
|
|
1226
|
+
}
|
|
1227
|
+
return isIncludeDataSource2;
|
|
1228
|
+
};
|
|
1166
1229
|
|
|
1167
1230
|
const compose = (middleware, isAsync) => {
|
|
1168
1231
|
if (!Array.isArray(middleware)) throw new TypeError("Middleware 必须是一个数组!");
|
|
@@ -2115,13 +2178,13 @@ class Editor extends BaseService {
|
|
|
2115
2178
|
}
|
|
2116
2179
|
this.emit("remove", nodes);
|
|
2117
2180
|
}
|
|
2118
|
-
async doUpdate(config) {
|
|
2181
|
+
async doUpdate(config, { changeRecords = [] } = {}) {
|
|
2119
2182
|
const root = this.get("root");
|
|
2120
2183
|
if (!root) throw new Error("root为空");
|
|
2121
2184
|
if (!config?.id) throw new Error("没有配置或者配置缺少id值");
|
|
2122
2185
|
const info = this.getNodeInfo(config.id, false);
|
|
2123
2186
|
if (!info.node) throw new Error(`获取不到id为${config.id}的节点`);
|
|
2124
|
-
const node =
|
|
2187
|
+
const node = toRaw(info.node);
|
|
2125
2188
|
let newConfig = await this.toggleFixedPosition(toRaw(config), node, root);
|
|
2126
2189
|
newConfig = mergeWith(cloneDeep(node), newConfig, (objValue, srcValue, key) => {
|
|
2127
2190
|
if (typeof srcValue === "undefined" && Object.hasOwn(newConfig, key)) {
|
|
@@ -2137,7 +2200,11 @@ class Editor extends BaseService {
|
|
|
2137
2200
|
if (!newConfig.type) throw new Error("配置缺少type值");
|
|
2138
2201
|
if (newConfig.type === NodeType.ROOT) {
|
|
2139
2202
|
this.set("root", newConfig);
|
|
2140
|
-
return
|
|
2203
|
+
return {
|
|
2204
|
+
oldNode: node,
|
|
2205
|
+
newNode: newConfig,
|
|
2206
|
+
changeRecords
|
|
2207
|
+
};
|
|
2141
2208
|
}
|
|
2142
2209
|
const { parent } = info;
|
|
2143
2210
|
if (!parent) throw new Error("获取不到父级节点");
|
|
@@ -2158,21 +2225,25 @@ class Editor extends BaseService {
|
|
|
2158
2225
|
this.set("page", newConfig);
|
|
2159
2226
|
}
|
|
2160
2227
|
this.addModifiedNodeId(newConfig.id);
|
|
2161
|
-
return
|
|
2228
|
+
return {
|
|
2229
|
+
oldNode: node,
|
|
2230
|
+
newNode: newConfig,
|
|
2231
|
+
changeRecords
|
|
2232
|
+
};
|
|
2162
2233
|
}
|
|
2163
2234
|
/**
|
|
2164
2235
|
* 更新节点
|
|
2165
2236
|
* @param config 新的节点配置,配置中需要有id信息
|
|
2166
2237
|
* @returns 更新后的节点配置
|
|
2167
2238
|
*/
|
|
2168
|
-
async update(config) {
|
|
2239
|
+
async update(config, data = {}) {
|
|
2169
2240
|
const nodes = Array.isArray(config) ? config : [config];
|
|
2170
|
-
const
|
|
2171
|
-
if (
|
|
2241
|
+
const updateData = await Promise.all(nodes.map((node) => this.doUpdate(node, data)));
|
|
2242
|
+
if (updateData[0].oldNode?.type !== NodeType.ROOT) {
|
|
2172
2243
|
this.pushHistoryState();
|
|
2173
2244
|
}
|
|
2174
|
-
this.emit("update",
|
|
2175
|
-
return Array.isArray(config) ?
|
|
2245
|
+
this.emit("update", updateData);
|
|
2246
|
+
return Array.isArray(config) ? updateData.map((item) => item.newNode) : updateData[0].newNode;
|
|
2176
2247
|
}
|
|
2177
2248
|
/**
|
|
2178
2249
|
* 将id为id1的组件移动到id为id2的组件位置上,例如:[1,2,3,4] -> sort(1,3) -> [2,1,3,4]
|
|
@@ -2366,7 +2437,7 @@ class Editor extends BaseService {
|
|
|
2366
2437
|
parent.items?.splice(index, 1);
|
|
2367
2438
|
await stage.remove({ id: node.id, parentId: parent.id, root: cloneDeep(root) });
|
|
2368
2439
|
const layout = await this.getLayout(target);
|
|
2369
|
-
const newConfig = mergeWith(cloneDeep(node), config, (
|
|
2440
|
+
const newConfig = mergeWith(cloneDeep(node), config, (_objValue, srcValue) => {
|
|
2370
2441
|
if (Array.isArray(srcValue)) {
|
|
2371
2442
|
return srcValue;
|
|
2372
2443
|
}
|
|
@@ -2732,6 +2803,7 @@ const HttpFormConfig = [
|
|
|
2732
2803
|
name: "params",
|
|
2733
2804
|
type: "key-value",
|
|
2734
2805
|
defaultValue: {},
|
|
2806
|
+
advanced: true,
|
|
2735
2807
|
text: "参数"
|
|
2736
2808
|
},
|
|
2737
2809
|
{
|
|
@@ -2745,6 +2817,7 @@ const HttpFormConfig = [
|
|
|
2745
2817
|
name: "headers",
|
|
2746
2818
|
type: "key-value",
|
|
2747
2819
|
defaultValue: {},
|
|
2820
|
+
advanced: true,
|
|
2748
2821
|
text: "请求头"
|
|
2749
2822
|
}
|
|
2750
2823
|
]
|
|
@@ -2799,7 +2872,7 @@ const fillConfig = (config) => [
|
|
|
2799
2872
|
},
|
|
2800
2873
|
{
|
|
2801
2874
|
title: "请求参数裁剪",
|
|
2802
|
-
display: (
|
|
2875
|
+
display: (_formState, { model }) => model.type === "http",
|
|
2803
2876
|
items: [
|
|
2804
2877
|
{
|
|
2805
2878
|
name: "beforeRequest",
|
|
@@ -2811,7 +2884,7 @@ const fillConfig = (config) => [
|
|
|
2811
2884
|
},
|
|
2812
2885
|
{
|
|
2813
2886
|
title: "响应数据裁剪",
|
|
2814
|
-
display: (
|
|
2887
|
+
display: (_formState, { model }) => model.type === "http",
|
|
2815
2888
|
items: [
|
|
2816
2889
|
{
|
|
2817
2890
|
name: "afterResponse",
|
|
@@ -2978,6 +3051,10 @@ globalThis.requestIdleCallback = globalThis.requestIdleCallback || function(cb)
|
|
|
2978
3051
|
class IdleTask extends EventEmitter {
|
|
2979
3052
|
taskList = [];
|
|
2980
3053
|
taskHandle = null;
|
|
3054
|
+
constructor() {
|
|
3055
|
+
super();
|
|
3056
|
+
this.setMaxListeners(1e3);
|
|
3057
|
+
}
|
|
2981
3058
|
enqueueTask(taskHandler, taskData) {
|
|
2982
3059
|
this.taskList.push({
|
|
2983
3060
|
handler: taskHandler,
|
|
@@ -2987,6 +3064,9 @@ class IdleTask extends EventEmitter {
|
|
|
2987
3064
|
this.taskHandle = globalThis.requestIdleCallback(this.runTaskQueue.bind(this), { timeout: 1e4 });
|
|
2988
3065
|
}
|
|
2989
3066
|
}
|
|
3067
|
+
clearTasks() {
|
|
3068
|
+
this.taskList = [];
|
|
3069
|
+
}
|
|
2990
3070
|
on(eventName, listener) {
|
|
2991
3071
|
return super.on(eventName, listener);
|
|
2992
3072
|
}
|
|
@@ -2997,9 +3077,27 @@ class IdleTask extends EventEmitter {
|
|
|
2997
3077
|
return super.emit(eventName, ...args);
|
|
2998
3078
|
}
|
|
2999
3079
|
runTaskQueue(deadline) {
|
|
3000
|
-
while (
|
|
3001
|
-
const
|
|
3002
|
-
|
|
3080
|
+
while (deadline.timeRemaining() > 0 && this.taskList.length) {
|
|
3081
|
+
const timeRemaining = deadline.timeRemaining();
|
|
3082
|
+
let times = 0;
|
|
3083
|
+
if (timeRemaining <= 5) {
|
|
3084
|
+
times = 10;
|
|
3085
|
+
} else if (timeRemaining <= 10) {
|
|
3086
|
+
times = 100;
|
|
3087
|
+
} else if (timeRemaining <= 15) {
|
|
3088
|
+
times = 300;
|
|
3089
|
+
} else {
|
|
3090
|
+
times = 600;
|
|
3091
|
+
}
|
|
3092
|
+
for (let i = 0; i < times; i++) {
|
|
3093
|
+
const task = this.taskList.shift();
|
|
3094
|
+
if (task) {
|
|
3095
|
+
task.handler(task.data);
|
|
3096
|
+
}
|
|
3097
|
+
if (this.taskList.length === 0) {
|
|
3098
|
+
break;
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3003
3101
|
}
|
|
3004
3102
|
if (this.taskList.length) {
|
|
3005
3103
|
this.taskHandle = globalThis.requestIdleCallback(this.runTaskQueue.bind(this), { timeout: 300 });
|
|
@@ -3184,10 +3282,10 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
3184
3282
|
}))
|
|
3185
3283
|
)
|
|
3186
3284
|
);
|
|
3187
|
-
const onParamsChangeHandler = async () => {
|
|
3285
|
+
const onParamsChangeHandler = async (v, eventData) => {
|
|
3188
3286
|
try {
|
|
3189
3287
|
const value = await form.value?.submitForm(true);
|
|
3190
|
-
emit("change", value);
|
|
3288
|
+
emit("change", value, eventData);
|
|
3191
3289
|
} catch (e) {
|
|
3192
3290
|
error(e);
|
|
3193
3291
|
}
|
|
@@ -3280,9 +3378,26 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3280
3378
|
return codeId;
|
|
3281
3379
|
}
|
|
3282
3380
|
};
|
|
3283
|
-
const
|
|
3381
|
+
const onCodeIdChangeHandler = (value) => {
|
|
3284
3382
|
props.model.params = value.params;
|
|
3285
|
-
emit("change", props.model
|
|
3383
|
+
emit("change", props.model, {
|
|
3384
|
+
changeRecords: [
|
|
3385
|
+
{
|
|
3386
|
+
propPath: props.prop,
|
|
3387
|
+
value: value[props.name]
|
|
3388
|
+
}
|
|
3389
|
+
]
|
|
3390
|
+
});
|
|
3391
|
+
};
|
|
3392
|
+
const onParamsChangeHandler = (value, eventData) => {
|
|
3393
|
+
props.model.params = value.params;
|
|
3394
|
+
emit("change", props.model, {
|
|
3395
|
+
...eventData,
|
|
3396
|
+
changeRecords: (eventData.changeRecords || []).map((item) => ({
|
|
3397
|
+
prop: `${props.prop.replace(props.name, "")}${item.propPath}`,
|
|
3398
|
+
value: item.value
|
|
3399
|
+
}))
|
|
3400
|
+
});
|
|
3286
3401
|
};
|
|
3287
3402
|
const editCode = (id) => {
|
|
3288
3403
|
eventBus?.emit("edit-code", id);
|
|
@@ -3295,7 +3410,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
3295
3410
|
config: selectConfig,
|
|
3296
3411
|
model: _ctx.model,
|
|
3297
3412
|
size: _ctx.size,
|
|
3298
|
-
onChange:
|
|
3413
|
+
onChange: onCodeIdChangeHandler
|
|
3299
3414
|
}, null, 8, ["model", "size"]),
|
|
3300
3415
|
_ctx.model[_ctx.name] && hasCodeBlockSidePanel.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
3301
3416
|
key: 0,
|
|
@@ -3594,7 +3709,7 @@ const useCodeBlockEdit = (codeBlockService) => {
|
|
|
3594
3709
|
}
|
|
3595
3710
|
codeConfig.value = {
|
|
3596
3711
|
name: "",
|
|
3597
|
-
content: `({app, params}) => {
|
|
3712
|
+
content: `({app, params, flowState}) => {
|
|
3598
3713
|
// place your code here
|
|
3599
3714
|
}`,
|
|
3600
3715
|
params: []
|
|
@@ -3640,78 +3755,6 @@ const useCodeBlockEdit = (codeBlockService) => {
|
|
|
3640
3755
|
};
|
|
3641
3756
|
};
|
|
3642
3757
|
|
|
3643
|
-
const useDataSourceMethod = () => {
|
|
3644
|
-
const codeConfig = ref();
|
|
3645
|
-
const codeBlockEditor = ref();
|
|
3646
|
-
const dataSource = ref();
|
|
3647
|
-
const dataSourceMethod = ref("");
|
|
3648
|
-
return {
|
|
3649
|
-
codeConfig,
|
|
3650
|
-
codeBlockEditor,
|
|
3651
|
-
createCode: async (model) => {
|
|
3652
|
-
codeConfig.value = {
|
|
3653
|
-
name: "",
|
|
3654
|
-
content: `({ params, dataSource, app }) => {
|
|
3655
|
-
// place your code here
|
|
3656
|
-
}`,
|
|
3657
|
-
params: []
|
|
3658
|
-
};
|
|
3659
|
-
await nextTick();
|
|
3660
|
-
dataSource.value = model;
|
|
3661
|
-
dataSourceMethod.value = "";
|
|
3662
|
-
codeBlockEditor.value?.show();
|
|
3663
|
-
},
|
|
3664
|
-
editCode: async (model, methodName) => {
|
|
3665
|
-
const method = model.methods?.find((method2) => method2.name === methodName);
|
|
3666
|
-
if (!method) {
|
|
3667
|
-
tMagicMessage.error("获取数据源方法失败");
|
|
3668
|
-
return;
|
|
3669
|
-
}
|
|
3670
|
-
let codeContent = method.content || `({ params, dataSource, app }) => {
|
|
3671
|
-
// place your code here
|
|
3672
|
-
}`;
|
|
3673
|
-
if (typeof codeContent !== "string") {
|
|
3674
|
-
codeContent = codeContent.toString();
|
|
3675
|
-
}
|
|
3676
|
-
codeConfig.value = {
|
|
3677
|
-
...cloneDeep(method),
|
|
3678
|
-
content: codeContent
|
|
3679
|
-
};
|
|
3680
|
-
await nextTick();
|
|
3681
|
-
dataSource.value = model;
|
|
3682
|
-
dataSourceMethod.value = methodName;
|
|
3683
|
-
codeBlockEditor.value?.show();
|
|
3684
|
-
},
|
|
3685
|
-
deleteCode: async (model, methodName) => {
|
|
3686
|
-
if (!model.methods) return;
|
|
3687
|
-
const index = model.methods.findIndex((method) => method.name === methodName);
|
|
3688
|
-
if (index === -1) {
|
|
3689
|
-
return;
|
|
3690
|
-
}
|
|
3691
|
-
model.methods.splice(index, 1);
|
|
3692
|
-
},
|
|
3693
|
-
submitCode: (values) => {
|
|
3694
|
-
if (!dataSource.value) return;
|
|
3695
|
-
if (!dataSource.value.methods) {
|
|
3696
|
-
dataSource.value.methods = [];
|
|
3697
|
-
}
|
|
3698
|
-
if (values.content) {
|
|
3699
|
-
const parseDSL = getEditorConfig("parseDSL");
|
|
3700
|
-
if (typeof values.content === "string") {
|
|
3701
|
-
values.content = parseDSL(values.content);
|
|
3702
|
-
}
|
|
3703
|
-
}
|
|
3704
|
-
if (dataSourceMethod.value) {
|
|
3705
|
-
const index = dataSource.value.methods.findIndex((method) => method.name === dataSourceMethod.value);
|
|
3706
|
-
dataSource.value.methods.splice(index, 1, values);
|
|
3707
|
-
} else {
|
|
3708
|
-
dataSource.value.methods.push(values);
|
|
3709
|
-
}
|
|
3710
|
-
codeBlockEditor.value?.hide();
|
|
3711
|
-
}
|
|
3712
|
-
};
|
|
3713
|
-
};
|
|
3714
|
-
|
|
3715
3758
|
const state = reactive({
|
|
3716
3759
|
uiSelectMode: false,
|
|
3717
3760
|
showSrc: false,
|
|
@@ -4198,14 +4241,28 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
4198
4241
|
calcBoxPosition();
|
|
4199
4242
|
addDialogVisible.value = true;
|
|
4200
4243
|
};
|
|
4201
|
-
const fieldChange = ({ index, ...value }) => {
|
|
4244
|
+
const fieldChange = ({ index, ...value }, data) => {
|
|
4245
|
+
addDialogVisible.value = false;
|
|
4202
4246
|
if (index > -1) {
|
|
4203
|
-
|
|
4247
|
+
emit("change", value, {
|
|
4248
|
+
modifyKey: index,
|
|
4249
|
+
changeRecords: (data.changeRecords || []).map((item) => ({
|
|
4250
|
+
propPath: `${props.prop}.${index}.${item.propPath}`,
|
|
4251
|
+
value: item.value
|
|
4252
|
+
}))
|
|
4253
|
+
});
|
|
4204
4254
|
} else {
|
|
4205
|
-
props.model[props.name].
|
|
4255
|
+
const modifyKey = props.model[props.name].length;
|
|
4256
|
+
emit("change", value, {
|
|
4257
|
+
modifyKey,
|
|
4258
|
+
changeRecords: [
|
|
4259
|
+
{
|
|
4260
|
+
propPath: `${props.prop}.${modifyKey}`,
|
|
4261
|
+
value
|
|
4262
|
+
}
|
|
4263
|
+
]
|
|
4264
|
+
});
|
|
4206
4265
|
}
|
|
4207
|
-
addDialogVisible.value = false;
|
|
4208
|
-
emit("change", props.model[props.name]);
|
|
4209
4266
|
};
|
|
4210
4267
|
const fieldColumns = [
|
|
4211
4268
|
{
|
|
@@ -4399,9 +4456,8 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
4399
4456
|
const addFromJsonFromChange = ({ data }) => {
|
|
4400
4457
|
try {
|
|
4401
4458
|
const value = JSON.parse(data);
|
|
4402
|
-
props.model[props.name] = getFieldsConfig(value, props.model[props.name]);
|
|
4403
4459
|
addFromJsonDialogVisible.value = false;
|
|
4404
|
-
emit("change", props.model[props.name]);
|
|
4460
|
+
emit("change", getFieldsConfig(value, props.model[props.name]));
|
|
4405
4461
|
} catch (e) {
|
|
4406
4462
|
tMagicMessage.error(e.message);
|
|
4407
4463
|
}
|
|
@@ -5185,9 +5241,9 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5185
5241
|
}
|
|
5186
5242
|
}
|
|
5187
5243
|
]);
|
|
5188
|
-
const submitForm = (values) => {
|
|
5244
|
+
const submitForm = (values, data) => {
|
|
5189
5245
|
changedValue.value = void 0;
|
|
5190
|
-
emit("submit", values);
|
|
5246
|
+
emit("submit", values, data);
|
|
5191
5247
|
};
|
|
5192
5248
|
const errorHandler = (error) => {
|
|
5193
5249
|
tMagicMessage.error(error.message);
|
|
@@ -5208,7 +5264,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
5208
5264
|
type: "warning",
|
|
5209
5265
|
distinguishCancelAndClose: true
|
|
5210
5266
|
}).then(() => {
|
|
5211
|
-
changedValue.value && submitForm(changedValue.value);
|
|
5267
|
+
changedValue.value && submitForm(changedValue.value, { changeRecords: formBox.value?.form?.changeRecords });
|
|
5212
5268
|
done();
|
|
5213
5269
|
}).catch((action) => {
|
|
5214
5270
|
done(action === "cancel");
|
|
@@ -5372,7 +5428,9 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5372
5428
|
setup(__props, { emit: __emit }) {
|
|
5373
5429
|
const props = __props;
|
|
5374
5430
|
const emit = __emit;
|
|
5375
|
-
const
|
|
5431
|
+
const codeConfig = ref();
|
|
5432
|
+
const codeBlockEditor = ref();
|
|
5433
|
+
let editIndex = -1;
|
|
5376
5434
|
const methodColumns = [
|
|
5377
5435
|
{
|
|
5378
5436
|
label: "名称",
|
|
@@ -5397,16 +5455,29 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5397
5455
|
actions: [
|
|
5398
5456
|
{
|
|
5399
5457
|
text: "编辑",
|
|
5400
|
-
handler: (
|
|
5401
|
-
|
|
5402
|
-
|
|
5458
|
+
handler: (method, index) => {
|
|
5459
|
+
let codeContent = method.content || `({ params, dataSource, app }) => {
|
|
5460
|
+
// place your code here
|
|
5461
|
+
}`;
|
|
5462
|
+
if (typeof codeContent !== "string") {
|
|
5463
|
+
codeContent = codeContent.toString();
|
|
5464
|
+
}
|
|
5465
|
+
codeConfig.value = {
|
|
5466
|
+
...cloneDeep(method),
|
|
5467
|
+
content: codeContent
|
|
5468
|
+
};
|
|
5469
|
+
editIndex = index;
|
|
5470
|
+
nextTick(() => {
|
|
5471
|
+
codeBlockEditor.value?.show();
|
|
5472
|
+
});
|
|
5403
5473
|
}
|
|
5404
5474
|
},
|
|
5405
5475
|
{
|
|
5406
5476
|
text: "删除",
|
|
5407
5477
|
buttonType: "danger",
|
|
5408
|
-
handler: (row) => {
|
|
5409
|
-
|
|
5478
|
+
handler: async (row, index) => {
|
|
5479
|
+
await tMagicMessageBox.confirm(`确定删除${row.name}?`, "提示");
|
|
5480
|
+
props.model[props.name].splice(index, 1);
|
|
5410
5481
|
emit("change", props.model[props.name]);
|
|
5411
5482
|
}
|
|
5412
5483
|
}
|
|
@@ -5414,12 +5485,48 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5414
5485
|
}
|
|
5415
5486
|
];
|
|
5416
5487
|
const createCodeHandler = () => {
|
|
5417
|
-
|
|
5418
|
-
|
|
5488
|
+
codeConfig.value = {
|
|
5489
|
+
name: "",
|
|
5490
|
+
content: `({ params, dataSource, app, flowState }) => {
|
|
5491
|
+
// place your code here
|
|
5492
|
+
}`,
|
|
5493
|
+
params: []
|
|
5494
|
+
};
|
|
5495
|
+
editIndex = -1;
|
|
5496
|
+
nextTick(() => {
|
|
5497
|
+
codeBlockEditor.value?.show();
|
|
5498
|
+
});
|
|
5419
5499
|
};
|
|
5420
|
-
const submitCodeHandler = (
|
|
5421
|
-
|
|
5422
|
-
|
|
5500
|
+
const submitCodeHandler = (value, data) => {
|
|
5501
|
+
if (value.content) {
|
|
5502
|
+
const parseDSL = getEditorConfig("parseDSL");
|
|
5503
|
+
if (typeof value.content === "string") {
|
|
5504
|
+
value.content = parseDSL(value.content);
|
|
5505
|
+
}
|
|
5506
|
+
}
|
|
5507
|
+
if (editIndex > -1) {
|
|
5508
|
+
emit("change", value, {
|
|
5509
|
+
modifyKey: editIndex,
|
|
5510
|
+
changeRecords: (data.changeRecords || []).map((item) => ({
|
|
5511
|
+
propPath: `${props.prop}.${editIndex}.${item.propPath}`,
|
|
5512
|
+
value: item.value
|
|
5513
|
+
}))
|
|
5514
|
+
});
|
|
5515
|
+
} else {
|
|
5516
|
+
const modifyKey = props.model[props.name].length;
|
|
5517
|
+
emit("change", value, {
|
|
5518
|
+
modifyKey,
|
|
5519
|
+
changeRecords: [
|
|
5520
|
+
{
|
|
5521
|
+
propPath: `${props.prop}.${modifyKey}`,
|
|
5522
|
+
value
|
|
5523
|
+
}
|
|
5524
|
+
]
|
|
5525
|
+
});
|
|
5526
|
+
}
|
|
5527
|
+
editIndex = -1;
|
|
5528
|
+
codeConfig.value = void 0;
|
|
5529
|
+
codeBlockEditor.value?.hide();
|
|
5423
5530
|
};
|
|
5424
5531
|
return (_ctx, _cache) => {
|
|
5425
5532
|
return openBlock(), createElementBlock("div", _hoisted_1$p, [
|
|
@@ -5441,12 +5548,12 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
5441
5548
|
_: 1
|
|
5442
5549
|
}, 8, ["disabled"])
|
|
5443
5550
|
]),
|
|
5444
|
-
|
|
5551
|
+
codeConfig.value ? (openBlock(), createBlock(_sfc_main$L, {
|
|
5445
5552
|
key: 0,
|
|
5446
5553
|
ref_key: "codeBlockEditor",
|
|
5447
5554
|
ref: codeBlockEditor,
|
|
5448
5555
|
disabled: _ctx.disabled,
|
|
5449
|
-
content:
|
|
5556
|
+
content: codeConfig.value,
|
|
5450
5557
|
"is-data-source": true,
|
|
5451
5558
|
"data-source-type": _ctx.model.type,
|
|
5452
5559
|
onSubmit: submitCodeHandler
|
|
@@ -6044,8 +6151,11 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
6044
6151
|
}
|
|
6045
6152
|
]
|
|
6046
6153
|
}));
|
|
6047
|
-
const changeHandler = (v) => {
|
|
6048
|
-
|
|
6154
|
+
const changeHandler = (v, eventData) => {
|
|
6155
|
+
if (!Array.isArray(props.model[props.name])) {
|
|
6156
|
+
props.model[props.name] = [];
|
|
6157
|
+
}
|
|
6158
|
+
emit("change", v, eventData);
|
|
6049
6159
|
};
|
|
6050
6160
|
return (_ctx, _cache) => {
|
|
6051
6161
|
return openBlock(), createBlock(unref(MGroupList), {
|
|
@@ -6329,17 +6439,19 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6329
6439
|
if (!props.model[props.name]) {
|
|
6330
6440
|
props.model[props.name] = [];
|
|
6331
6441
|
}
|
|
6332
|
-
|
|
6333
|
-
|
|
6442
|
+
emit("change", defaultEvent, {
|
|
6443
|
+
modifyKey: props.model[props.name].length
|
|
6444
|
+
});
|
|
6334
6445
|
};
|
|
6335
6446
|
const removeEvent = (index) => {
|
|
6336
6447
|
if (!props.name) return;
|
|
6337
6448
|
props.model[props.name].splice(index, 1);
|
|
6338
|
-
|
|
6449
|
+
emit("change", props.model[props.name]);
|
|
6339
6450
|
};
|
|
6340
|
-
const
|
|
6341
|
-
emit("change", props.model);
|
|
6451
|
+
const eventNameChangeHandler = (v, eventData) => {
|
|
6452
|
+
emit("change", props.model[props.name], eventData);
|
|
6342
6453
|
};
|
|
6454
|
+
const onChangeHandler = (v, eventData) => emit("change", props.model[props.name], eventData);
|
|
6343
6455
|
return (_ctx, _cache) => {
|
|
6344
6456
|
const _component_m_form_table = resolveComponent("m-form-table");
|
|
6345
6457
|
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
@@ -6370,6 +6482,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6370
6482
|
key: index,
|
|
6371
6483
|
disabled: _ctx.disabled,
|
|
6372
6484
|
size: _ctx.size,
|
|
6485
|
+
prop: `${_ctx.prop}.${index}`,
|
|
6373
6486
|
config: actionsConfig.value,
|
|
6374
6487
|
model: cardItem,
|
|
6375
6488
|
"label-width": _ctx.config.labelWidth || "100px",
|
|
@@ -6382,8 +6495,9 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6382
6495
|
model: cardItem,
|
|
6383
6496
|
disabled: _ctx.disabled,
|
|
6384
6497
|
size: _ctx.size,
|
|
6385
|
-
|
|
6386
|
-
|
|
6498
|
+
prop: `${_ctx.prop}.${index}`,
|
|
6499
|
+
onChange: eventNameChangeHandler
|
|
6500
|
+
}, null, 8, ["config", "model", "disabled", "size", "prop"]),
|
|
6387
6501
|
createVNode(unref(TMagicButton), {
|
|
6388
6502
|
style: { "color": "#f56c6c" },
|
|
6389
6503
|
link: "",
|
|
@@ -6394,7 +6508,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6394
6508
|
}, null, 8, ["icon", "disabled", "size", "onClick"])
|
|
6395
6509
|
]),
|
|
6396
6510
|
_: 2
|
|
6397
|
-
}, 1032, ["disabled", "size", "config", "model", "label-width"]);
|
|
6511
|
+
}, 1032, ["disabled", "size", "prop", "config", "model", "label-width"]);
|
|
6398
6512
|
}), 128))
|
|
6399
6513
|
]))
|
|
6400
6514
|
]);
|
|
@@ -6447,14 +6561,18 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6447
6561
|
const records = ref([]);
|
|
6448
6562
|
const showCode = ref(false);
|
|
6449
6563
|
watchEffect(() => {
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6564
|
+
if (typeof props.model[props.name] === "function") {
|
|
6565
|
+
showCode.value = true;
|
|
6566
|
+
} else {
|
|
6567
|
+
const initValues = Object.entries(props.model[props.name] || {});
|
|
6568
|
+
for (const [, value] of initValues) {
|
|
6569
|
+
if (typeof value !== "string") {
|
|
6570
|
+
showCode.value = true;
|
|
6571
|
+
break;
|
|
6572
|
+
}
|
|
6455
6573
|
}
|
|
6574
|
+
records.value = initValues;
|
|
6456
6575
|
}
|
|
6457
|
-
records.value = initValues;
|
|
6458
6576
|
});
|
|
6459
6577
|
const getValue = () => {
|
|
6460
6578
|
const record = {};
|
|
@@ -6536,7 +6654,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
6536
6654
|
key: 1,
|
|
6537
6655
|
height: "200px",
|
|
6538
6656
|
"init-values": _ctx.model[_ctx.name],
|
|
6539
|
-
language: "
|
|
6657
|
+
language: "javascript",
|
|
6540
6658
|
options: {
|
|
6541
6659
|
readOnly: _ctx.disabled
|
|
6542
6660
|
},
|
|
@@ -7204,7 +7322,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7204
7322
|
pageBarSortOptions: {},
|
|
7205
7323
|
length: {}
|
|
7206
7324
|
},
|
|
7207
|
-
setup(__props) {
|
|
7325
|
+
setup(__props, { expose: __expose }) {
|
|
7208
7326
|
const props = __props;
|
|
7209
7327
|
const services = inject("services");
|
|
7210
7328
|
const editorService = services?.editorService;
|
|
@@ -7234,23 +7352,28 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7234
7352
|
});
|
|
7235
7353
|
let translateLeft = 0;
|
|
7236
7354
|
const scroll = (type) => {
|
|
7237
|
-
if (!itemsContainer.value) return;
|
|
7355
|
+
if (!itemsContainer.value || !canScroll.value) return;
|
|
7238
7356
|
const maxScrollLeft = itemsContainer.value.scrollWidth - itemsContainerWidth.value;
|
|
7239
7357
|
if (type === "left") {
|
|
7240
|
-
translateLeft
|
|
7241
|
-
if (translateLeft > 0) {
|
|
7242
|
-
translateLeft = 0;
|
|
7243
|
-
}
|
|
7358
|
+
scrollTo(translateLeft + 200);
|
|
7244
7359
|
} else if (type === "right") {
|
|
7245
|
-
translateLeft
|
|
7246
|
-
if (-translateLeft > maxScrollLeft) {
|
|
7247
|
-
translateLeft = -maxScrollLeft;
|
|
7248
|
-
}
|
|
7360
|
+
scrollTo(translateLeft - 200);
|
|
7249
7361
|
} else if (type === "start") {
|
|
7250
|
-
|
|
7362
|
+
scrollTo(0);
|
|
7251
7363
|
} else if (type === "end") {
|
|
7252
|
-
|
|
7364
|
+
scrollTo(-maxScrollLeft);
|
|
7253
7365
|
}
|
|
7366
|
+
};
|
|
7367
|
+
const scrollTo = (value) => {
|
|
7368
|
+
if (!itemsContainer.value || !canScroll.value) return;
|
|
7369
|
+
const maxScrollLeft = itemsContainer.value.scrollWidth - itemsContainerWidth.value;
|
|
7370
|
+
if (value >= 0) {
|
|
7371
|
+
value = 0;
|
|
7372
|
+
}
|
|
7373
|
+
if (-value > maxScrollLeft) {
|
|
7374
|
+
value = -maxScrollLeft;
|
|
7375
|
+
}
|
|
7376
|
+
translateLeft = value;
|
|
7254
7377
|
itemsContainer.value.style.transform = `translate(${translateLeft}px, 0px)`;
|
|
7255
7378
|
};
|
|
7256
7379
|
watch(
|
|
@@ -7258,11 +7381,13 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7258
7381
|
(length = 0, preLength = 0) => {
|
|
7259
7382
|
setTimeout(() => {
|
|
7260
7383
|
setCanScroll();
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7384
|
+
nextTick(() => {
|
|
7385
|
+
if (length < preLength || preLength === 0) {
|
|
7386
|
+
scroll("start");
|
|
7387
|
+
} else {
|
|
7388
|
+
scroll("end");
|
|
7389
|
+
}
|
|
7390
|
+
});
|
|
7266
7391
|
if (length > 1) {
|
|
7267
7392
|
const el = document.querySelector(".m-editor-page-bar-items");
|
|
7268
7393
|
let beforeDragList = [];
|
|
@@ -7299,6 +7424,14 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7299
7424
|
immediate: true
|
|
7300
7425
|
}
|
|
7301
7426
|
);
|
|
7427
|
+
__expose({
|
|
7428
|
+
itemsContainerWidth,
|
|
7429
|
+
scroll,
|
|
7430
|
+
scrollTo,
|
|
7431
|
+
getTranslateLeft() {
|
|
7432
|
+
return translateLeft;
|
|
7433
|
+
}
|
|
7434
|
+
});
|
|
7302
7435
|
return (_ctx, _cache) => {
|
|
7303
7436
|
return openBlock(), createElementBlock("div", {
|
|
7304
7437
|
class: "m-editor-page-bar",
|
|
@@ -7306,25 +7439,24 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7306
7439
|
ref: pageBar
|
|
7307
7440
|
}, [
|
|
7308
7441
|
renderSlot(_ctx.$slots, "prepend"),
|
|
7309
|
-
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
7310
|
-
key: 0,
|
|
7311
|
-
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
7312
|
-
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
7313
|
-
}, [
|
|
7314
|
-
createVNode(_sfc_main$Y, { icon: unref(ArrowLeftBold) }, null, 8, ["icon"])
|
|
7315
|
-
])) : createCommentVNode("", true),
|
|
7316
7442
|
_ctx.length ? (openBlock(), createElementBlock("div", {
|
|
7317
|
-
key:
|
|
7443
|
+
key: 0,
|
|
7318
7444
|
class: "m-editor-page-bar-items",
|
|
7319
7445
|
ref_key: "itemsContainer",
|
|
7320
|
-
ref: itemsContainer
|
|
7321
|
-
style: normalizeStyle(`width: ${itemsContainerWidth.value}px`)
|
|
7446
|
+
ref: itemsContainer
|
|
7322
7447
|
}, [
|
|
7323
7448
|
renderSlot(_ctx.$slots, "default")
|
|
7324
|
-
],
|
|
7449
|
+
], 512)) : createCommentVNode("", true),
|
|
7450
|
+
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
7451
|
+
key: 1,
|
|
7452
|
+
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-left-icon",
|
|
7453
|
+
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
7454
|
+
}, [
|
|
7455
|
+
createVNode(_sfc_main$Y, { icon: unref(ArrowLeftBold) }, null, 8, ["icon"])
|
|
7456
|
+
])) : createCommentVNode("", true),
|
|
7325
7457
|
canScroll.value ? (openBlock(), createElementBlock("div", {
|
|
7326
7458
|
key: 2,
|
|
7327
|
-
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
7459
|
+
class: "m-editor-page-bar-item m-editor-page-bar-item-icon m-editor-page-bar-item-right-icon",
|
|
7328
7460
|
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
7329
7461
|
}, [
|
|
7330
7462
|
createVNode(_sfc_main$Y, { icon: unref(ArrowRightBold) }, null, 8, ["icon"])
|
|
@@ -7352,8 +7484,9 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
7352
7484
|
const uiService = services?.uiService;
|
|
7353
7485
|
const editorService = services?.editorService;
|
|
7354
7486
|
const showPageListButton = computed(() => uiService?.get("showPageListButton"));
|
|
7355
|
-
const
|
|
7356
|
-
|
|
7487
|
+
const page = computed(() => editorService?.get("page"));
|
|
7488
|
+
const switchPage = async (id) => {
|
|
7489
|
+
await editorService?.select(id);
|
|
7357
7490
|
};
|
|
7358
7491
|
return (_ctx, _cache) => {
|
|
7359
7492
|
return showPageListButton.value ? (openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
@@ -7380,6 +7513,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
7380
7513
|
data: {
|
|
7381
7514
|
type: "button",
|
|
7382
7515
|
text: item.devconfig?.tabName || item.name || item.id,
|
|
7516
|
+
className: item.id === page.value?.id ? "active" : "",
|
|
7383
7517
|
handler: () => switchPage(item.id)
|
|
7384
7518
|
},
|
|
7385
7519
|
key: index
|
|
@@ -7460,7 +7594,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
7460
7594
|
});
|
|
7461
7595
|
|
|
7462
7596
|
const _hoisted_1$c = { class: "m-editor-page-bar-tabs" };
|
|
7463
|
-
const _hoisted_2$5 = ["page-id", "onClick"];
|
|
7597
|
+
const _hoisted_2$5 = ["data-page-id", "onClick"];
|
|
7464
7598
|
const _hoisted_3$2 = { class: "m-editor-page-bar-title" };
|
|
7465
7599
|
const _hoisted_4$2 = ["title"];
|
|
7466
7600
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
@@ -7511,9 +7645,38 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7511
7645
|
const remove = (node) => {
|
|
7512
7646
|
editorService?.remove(node);
|
|
7513
7647
|
};
|
|
7648
|
+
const pageBarScrollContainer = ref();
|
|
7649
|
+
const pageBarItems = ref();
|
|
7650
|
+
watch(page, (page2) => {
|
|
7651
|
+
if (!page2 || !pageBarScrollContainer.value?.itemsContainerWidth || !pageBarItems.value || pageBarItems.value.length < 2) {
|
|
7652
|
+
return;
|
|
7653
|
+
}
|
|
7654
|
+
const firstItem = pageBarItems.value[0];
|
|
7655
|
+
const lastItem = pageBarItems.value[pageBarItems.value.length - 1];
|
|
7656
|
+
if (page2.id === firstItem.dataset.pageId) {
|
|
7657
|
+
pageBarScrollContainer.value.scroll("start");
|
|
7658
|
+
} else if (page2.id === lastItem.dataset.pageId) {
|
|
7659
|
+
pageBarScrollContainer.value.scroll("end");
|
|
7660
|
+
} else {
|
|
7661
|
+
const pageItem = pageBarItems.value.find((item) => item.dataset.pageId === page2.id);
|
|
7662
|
+
if (!pageItem) {
|
|
7663
|
+
return;
|
|
7664
|
+
}
|
|
7665
|
+
const pageItemRect = pageItem.getBoundingClientRect();
|
|
7666
|
+
const offsetLeft = pageItemRect.left - firstItem.getBoundingClientRect().left;
|
|
7667
|
+
const { itemsContainerWidth } = pageBarScrollContainer.value;
|
|
7668
|
+
const left = itemsContainerWidth - offsetLeft - pageItemRect.width;
|
|
7669
|
+
const translateLeft = pageBarScrollContainer.value.getTranslateLeft();
|
|
7670
|
+
if (offsetLeft + translateLeft < 0 || offsetLeft + pageItemRect.width > itemsContainerWidth - translateLeft) {
|
|
7671
|
+
pageBarScrollContainer.value.scrollTo(left);
|
|
7672
|
+
}
|
|
7673
|
+
}
|
|
7674
|
+
});
|
|
7514
7675
|
return (_ctx, _cache) => {
|
|
7515
7676
|
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
7516
7677
|
createVNode(_sfc_main$w, {
|
|
7678
|
+
ref_key: "pageBarScrollContainer",
|
|
7679
|
+
ref: pageBarScrollContainer,
|
|
7517
7680
|
"page-bar-sort-options": _ctx.pageBarSortOptions,
|
|
7518
7681
|
length: list.value.length
|
|
7519
7682
|
}, {
|
|
@@ -7536,8 +7699,11 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
7536
7699
|
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (item) => {
|
|
7537
7700
|
return openBlock(), createElementBlock("div", {
|
|
7538
7701
|
class: normalizeClass(["m-editor-page-bar-item", { active: page.value?.id === item.id }]),
|
|
7702
|
+
ref_for: true,
|
|
7703
|
+
ref_key: "pageBarItems",
|
|
7704
|
+
ref: pageBarItems,
|
|
7539
7705
|
key: item.id,
|
|
7540
|
-
"page-id": item.id,
|
|
7706
|
+
"data-page-id": item.id,
|
|
7541
7707
|
onClick: ($event) => switchPage(item.id)
|
|
7542
7708
|
}, [
|
|
7543
7709
|
createElementVNode("div", _hoisted_3$2, [
|
|
@@ -7669,7 +7835,6 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7669
7835
|
const root = computed(() => editorService?.get("root"));
|
|
7670
7836
|
const page = computed(() => editorService?.get("page"));
|
|
7671
7837
|
const pageLength = computed(() => editorService?.get("pageLength") || 0);
|
|
7672
|
-
const stageLoading = computed(() => editorService?.get("stageLoading") || false);
|
|
7673
7838
|
const showSrc = computed(() => uiService?.get("showSrc"));
|
|
7674
7839
|
const getLeftColumnWidthCacheData = () => Number(globalThis.localStorage.getItem(LEFT_COLUMN_WIDTH_STORAGE_KEY)) || DEFAULT_LEFT_COLUMN_WIDTH;
|
|
7675
7840
|
const getRightColumnWidthCacheData = () => Number(globalThis.localStorage.getItem(RIGHT_COLUMN_WIDTH_STORAGE_KEY)) || DEFAULT_RIGHT_COLUMN_WIDTH;
|
|
@@ -7720,7 +7885,6 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7720
7885
|
}
|
|
7721
7886
|
};
|
|
7722
7887
|
return (_ctx, _cache) => {
|
|
7723
|
-
const _directive_loading = resolveDirective("loading");
|
|
7724
7888
|
return openBlock(), createElementBlock("div", {
|
|
7725
7889
|
class: "m-editor",
|
|
7726
7890
|
ref_key: "content",
|
|
@@ -7737,9 +7901,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7737
7901
|
options: unref(codeOptions),
|
|
7738
7902
|
onSave: saveCode
|
|
7739
7903
|
}, null, 8, ["init-values", "options"])
|
|
7740
|
-
]) :
|
|
7904
|
+
]) : (openBlock(), createBlock(_sfc_main$z, {
|
|
7741
7905
|
key: 1,
|
|
7742
|
-
"element-loading-text": "Runtime 加载中...",
|
|
7743
7906
|
ref_key: "splitView",
|
|
7744
7907
|
ref: splitView,
|
|
7745
7908
|
class: "m-editor-content",
|
|
@@ -7799,9 +7962,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
7799
7962
|
]),
|
|
7800
7963
|
key: "0"
|
|
7801
7964
|
} : void 0
|
|
7802
|
-
]), 1032, ["left", "right", "width"])),
|
|
7803
|
-
[_directive_loading, stageLoading.value]
|
|
7804
|
-
]),
|
|
7965
|
+
]), 1032, ["left", "right", "width"])),
|
|
7805
7966
|
renderSlot(_ctx.$slots, "content-after"),
|
|
7806
7967
|
renderSlot(_ctx.$slots, "footer")
|
|
7807
7968
|
], 512);
|
|
@@ -8050,10 +8211,10 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8050
8211
|
configForm.value.formState.stage = stage.value;
|
|
8051
8212
|
}
|
|
8052
8213
|
});
|
|
8053
|
-
const submit = async () => {
|
|
8214
|
+
const submit = async (v, eventData) => {
|
|
8054
8215
|
try {
|
|
8055
8216
|
const values2 = await configForm.value?.submitForm();
|
|
8056
|
-
services?.editorService.update(values2);
|
|
8217
|
+
services?.editorService.update(values2, { changeRecords: eventData.changeRecords });
|
|
8057
8218
|
} catch (e) {
|
|
8058
8219
|
emit("submit-error", e);
|
|
8059
8220
|
}
|
|
@@ -8355,6 +8516,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8355
8516
|
const emit = __emit;
|
|
8356
8517
|
const services = inject("services");
|
|
8357
8518
|
const { codeBlockService, depService, editorService } = services || {};
|
|
8519
|
+
const collecting = computed(() => depService?.get("collecting"));
|
|
8358
8520
|
const codeList = computed(
|
|
8359
8521
|
() => Object.entries(codeBlockService?.getCodeDsl() || {}).map(([codeId, code]) => {
|
|
8360
8522
|
const target = depService?.getTarget(codeId, DepTargetType.CODE_BLOCK);
|
|
@@ -8454,8 +8616,19 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8454
8616
|
}, toDisplayString(data.name) + " " + toDisplayString(data.key ? `(${data.key})` : ""), 3)
|
|
8455
8617
|
]),
|
|
8456
8618
|
"tree-node-tool": withCtx(({ data }) => [
|
|
8457
|
-
data.type === "code" ? (openBlock(), createBlock(unref(
|
|
8619
|
+
collecting.value && data.type === "code" ? (openBlock(), createBlock(unref(TMagicTag), {
|
|
8458
8620
|
key: 0,
|
|
8621
|
+
type: "info",
|
|
8622
|
+
size: "small",
|
|
8623
|
+
style: { "margin-right": "5px" }
|
|
8624
|
+
}, {
|
|
8625
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
8626
|
+
createTextVNode("依赖收集中")
|
|
8627
|
+
])),
|
|
8628
|
+
_: 1
|
|
8629
|
+
})) : createCommentVNode("", true),
|
|
8630
|
+
data.type === "code" ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
8631
|
+
key: 1,
|
|
8459
8632
|
effect: "dark",
|
|
8460
8633
|
content: editable.value ? "编辑" : "查看",
|
|
8461
8634
|
placement: "bottom"
|
|
@@ -8470,7 +8643,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8470
8643
|
_: 2
|
|
8471
8644
|
}, 1032, ["content"])) : createCommentVNode("", true),
|
|
8472
8645
|
data.type === "code" && editable.value ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
8473
|
-
key:
|
|
8646
|
+
key: 2,
|
|
8474
8647
|
effect: "dark",
|
|
8475
8648
|
content: "删除",
|
|
8476
8649
|
placement: "bottom"
|
|
@@ -8586,9 +8759,9 @@ const useDataSourceEdit = (dataSourceService) => {
|
|
|
8586
8759
|
dialogTitle.value = `编辑${dataSourceValues.value.title || ""}`;
|
|
8587
8760
|
editDialog.value.show();
|
|
8588
8761
|
};
|
|
8589
|
-
const submitDataSourceHandler = (value) => {
|
|
8762
|
+
const submitDataSourceHandler = (value, eventData) => {
|
|
8590
8763
|
if (value.id) {
|
|
8591
|
-
dataSourceService?.update(value);
|
|
8764
|
+
dataSourceService?.update(value, { changeRecords: eventData.changeRecords });
|
|
8592
8765
|
} else {
|
|
8593
8766
|
dataSourceService?.add(value);
|
|
8594
8767
|
}
|
|
@@ -8635,8 +8808,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
8635
8808
|
initValues.value = props.values;
|
|
8636
8809
|
dataSourceConfig.value = services?.dataSourceService.getFormConfig(initValues.value.type) || [];
|
|
8637
8810
|
});
|
|
8638
|
-
const submitHandler = (values) => {
|
|
8639
|
-
emit("submit", values);
|
|
8811
|
+
const submitHandler = (values, data) => {
|
|
8812
|
+
emit("submit", values, data);
|
|
8640
8813
|
};
|
|
8641
8814
|
const errorHandler = (error) => {
|
|
8642
8815
|
tMagicMessage.error(error.message);
|
|
@@ -8692,6 +8865,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8692
8865
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
8693
8866
|
const emit = __emit;
|
|
8694
8867
|
const { depService, editorService, dataSourceService } = inject("services") || {};
|
|
8868
|
+
const collecting = computed(() => depService?.get("collecting"));
|
|
8695
8869
|
const editable = computed(() => dataSourceService?.get("editable") ?? true);
|
|
8696
8870
|
const dataSources = computed(() => dataSourceService?.get("dataSources") || []);
|
|
8697
8871
|
const dsDep = computed(() => depService?.getTargets(DepTargetType.DATA_SOURCE) || {});
|
|
@@ -8797,8 +8971,19 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8797
8971
|
}, toDisplayString(data.name) + " " + toDisplayString(data.key ? `(${data.key})` : ""), 3)
|
|
8798
8972
|
]),
|
|
8799
8973
|
"tree-node-tool": withCtx(({ data }) => [
|
|
8800
|
-
data.type === "ds" ? (openBlock(), createBlock(unref(
|
|
8974
|
+
collecting.value && data.type === "ds" ? (openBlock(), createBlock(unref(TMagicTag), {
|
|
8801
8975
|
key: 0,
|
|
8976
|
+
type: "info",
|
|
8977
|
+
size: "small",
|
|
8978
|
+
style: { "margin-right": "5px" }
|
|
8979
|
+
}, {
|
|
8980
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
8981
|
+
createTextVNode("依赖收集中")
|
|
8982
|
+
])),
|
|
8983
|
+
_: 1
|
|
8984
|
+
})) : createCommentVNode("", true),
|
|
8985
|
+
data.type === "ds" ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
8986
|
+
key: 1,
|
|
8802
8987
|
effect: "dark",
|
|
8803
8988
|
content: editable.value ? "编辑" : "查看",
|
|
8804
8989
|
placement: "bottom"
|
|
@@ -8813,7 +8998,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
8813
8998
|
_: 2
|
|
8814
8999
|
}, 1032, ["content"])) : createCommentVNode("", true),
|
|
8815
9000
|
data.type === "ds" && editable.value ? (openBlock(), createBlock(unref(TMagicTooltip), {
|
|
8816
|
-
key:
|
|
9001
|
+
key: 2,
|
|
8817
9002
|
effect: "dark",
|
|
8818
9003
|
content: "删除",
|
|
8819
9004
|
placement: "bottom"
|
|
@@ -10079,6 +10264,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10079
10264
|
setup(__props, { expose: __expose }) {
|
|
10080
10265
|
const props = __props;
|
|
10081
10266
|
const services = inject("services");
|
|
10267
|
+
const collecting = computed(() => services?.depService.get("collecting"));
|
|
10082
10268
|
const columnLeftWidth = computed(() => services?.uiService.get("columnWidth")[ColumnLayout.LEFT] || 0);
|
|
10083
10269
|
const { height: editorContentHeight } = useEditorContentHeight();
|
|
10084
10270
|
const columnLeftHeight = ref(0);
|
|
@@ -10221,7 +10407,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10221
10407
|
]),
|
|
10222
10408
|
(openBlock(true), createElementBlock(Fragment, null, renderList(sideBarItems.value, (config, index) => {
|
|
10223
10409
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
10224
|
-
class: "m-editor-sidebar-content",
|
|
10410
|
+
class: normalizeClass(["m-editor-sidebar-content", { "m-editor-dep-collecting": collecting.value }]),
|
|
10225
10411
|
key: config.$key ?? index
|
|
10226
10412
|
}, [
|
|
10227
10413
|
config?.component && !unref(floatBoxStates)[config.$key]?.status ? (openBlock(), createBlock(resolveDynamicComponent(config.component), mergeProps({
|
|
@@ -10347,7 +10533,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
10347
10533
|
key: "11"
|
|
10348
10534
|
} : void 0
|
|
10349
10535
|
]), 1040)) : createCommentVNode("", true)
|
|
10350
|
-
])), [
|
|
10536
|
+
], 2)), [
|
|
10351
10537
|
[vShow, [config.text, config.$key, `${index}`].includes(activeTabName.value)]
|
|
10352
10538
|
]);
|
|
10353
10539
|
}), 128))
|
|
@@ -10928,15 +11114,17 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
10928
11114
|
},
|
|
10929
11115
|
__name: "Stage",
|
|
10930
11116
|
props: {
|
|
11117
|
+
stageOptions: {},
|
|
10931
11118
|
stageContentMenu: {},
|
|
10932
11119
|
disabledStageOverlay: { type: Boolean, default: false },
|
|
10933
11120
|
customContentMenu: {}
|
|
10934
11121
|
},
|
|
10935
11122
|
setup(__props) {
|
|
11123
|
+
const props = __props;
|
|
10936
11124
|
let stage = null;
|
|
10937
11125
|
let runtime = null;
|
|
10938
11126
|
const services = inject("services");
|
|
10939
|
-
const
|
|
11127
|
+
const stageLoading = computed(() => services?.editorService.get("stageLoading") || false);
|
|
10940
11128
|
const stageWrap = ref();
|
|
10941
11129
|
const stageContainer = ref();
|
|
10942
11130
|
const menu = ref();
|
|
@@ -10951,8 +11139,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
10951
11139
|
watchEffect(() => {
|
|
10952
11140
|
if (stage || !page.value) return;
|
|
10953
11141
|
if (!stageContainer.value) return;
|
|
10954
|
-
if (!(stageOptions?.runtimeUrl || stageOptions?.render) || !root.value) return;
|
|
10955
|
-
stage = useStage(stageOptions);
|
|
11142
|
+
if (!(props.stageOptions?.runtimeUrl || props.stageOptions?.render) || !root.value) return;
|
|
11143
|
+
stage = useStage(props.stageOptions);
|
|
10956
11144
|
stage.on("select", () => {
|
|
10957
11145
|
stageWrap.value?.container?.focus();
|
|
10958
11146
|
});
|
|
@@ -10972,6 +11160,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
10972
11160
|
});
|
|
10973
11161
|
onBeforeUnmount(() => {
|
|
10974
11162
|
stage?.destroy();
|
|
11163
|
+
services?.editorService.set("stage", null);
|
|
10975
11164
|
});
|
|
10976
11165
|
watch(zoom, (zoom2) => {
|
|
10977
11166
|
if (!stage || !zoom2) return;
|
|
@@ -11039,7 +11228,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11039
11228
|
if (!config || config.dragType !== DragType.COMPONENT_LIST) return;
|
|
11040
11229
|
e.preventDefault();
|
|
11041
11230
|
const doc = stage?.renderer?.contentWindow?.document;
|
|
11042
|
-
const parentEl = doc?.querySelector(
|
|
11231
|
+
const parentEl = doc?.querySelector(
|
|
11232
|
+
`.${props.stageOptions?.containerHighlightClassName}`
|
|
11233
|
+
);
|
|
11043
11234
|
let parent = page.value;
|
|
11044
11235
|
const parentId = getIdFromEl()(parentEl);
|
|
11045
11236
|
if (parentId) {
|
|
@@ -11078,11 +11269,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11078
11269
|
}
|
|
11079
11270
|
};
|
|
11080
11271
|
return (_ctx, _cache) => {
|
|
11081
|
-
|
|
11272
|
+
const _directive_loading = resolveDirective("loading");
|
|
11273
|
+
return withDirectives((openBlock(), createBlock(_sfc_main$8, {
|
|
11082
11274
|
class: "m-editor-stage",
|
|
11083
11275
|
ref_key: "stageWrap",
|
|
11084
11276
|
ref: stageWrap,
|
|
11085
11277
|
tabindex: "-1",
|
|
11278
|
+
"element-loading-text": "Runtime 加载中...",
|
|
11086
11279
|
width: stageRect.value?.width,
|
|
11087
11280
|
height: stageRect.value?.height,
|
|
11088
11281
|
"wrap-width": stageContainerRect.value?.width,
|
|
@@ -11119,7 +11312,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
11119
11312
|
createVNode(_sfc_main$7)
|
|
11120
11313
|
]),
|
|
11121
11314
|
_: 1
|
|
11122
|
-
}, 8, ["width", "height", "wrap-width", "wrap-height", "zoom"])
|
|
11315
|
+
}, 8, ["width", "height", "wrap-width", "wrap-height", "zoom"])), [
|
|
11316
|
+
[_directive_loading, stageLoading.value]
|
|
11317
|
+
]);
|
|
11123
11318
|
};
|
|
11124
11319
|
}
|
|
11125
11320
|
});
|
|
@@ -11181,18 +11376,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
11181
11376
|
customContentMenu: {}
|
|
11182
11377
|
},
|
|
11183
11378
|
setup(__props) {
|
|
11379
|
+
const stageOptions = inject("stageOptions");
|
|
11184
11380
|
const services = inject("services");
|
|
11185
11381
|
const page = computed(() => services?.editorService.get("page"));
|
|
11186
11382
|
return (_ctx, _cache) => {
|
|
11187
11383
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
11188
11384
|
createVNode(_sfc_main$2),
|
|
11189
11385
|
renderSlot(_ctx.$slots, "stage", {}, () => [
|
|
11190
|
-
page.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
11386
|
+
page.value && (unref(stageOptions)?.render || unref(stageOptions)?.runtimeUrl) ? (openBlock(), createBlock(_sfc_main$3, {
|
|
11191
11387
|
key: 0,
|
|
11388
|
+
"stage-options": unref(stageOptions),
|
|
11192
11389
|
"disabled-stage-overlay": _ctx.disabledStageOverlay,
|
|
11193
11390
|
"stage-content-menu": _ctx.stageContentMenu,
|
|
11194
11391
|
"custom-content-menu": _ctx.customContentMenu
|
|
11195
|
-
}, null, 8, ["disabled-stage-overlay", "stage-content-menu", "custom-content-menu"])) : createCommentVNode("", true)
|
|
11392
|
+
}, null, 8, ["stage-options", "disabled-stage-overlay", "stage-content-menu", "custom-content-menu"])) : createCommentVNode("", true)
|
|
11196
11393
|
]),
|
|
11197
11394
|
renderSlot(_ctx.$slots, "workspace-content")
|
|
11198
11395
|
]);
|
|
@@ -11542,12 +11739,17 @@ class DataSource extends BaseService {
|
|
|
11542
11739
|
this.emit("add", newConfig);
|
|
11543
11740
|
return newConfig;
|
|
11544
11741
|
}
|
|
11545
|
-
update(config) {
|
|
11742
|
+
update(config, { changeRecords = [] } = {}) {
|
|
11546
11743
|
const dataSources = this.get("dataSources");
|
|
11547
11744
|
const index = dataSources.findIndex((ds) => ds.id === config.id);
|
|
11548
|
-
dataSources[index]
|
|
11549
|
-
|
|
11550
|
-
|
|
11745
|
+
const oldConfig = dataSources[index];
|
|
11746
|
+
const newConfig = cloneDeep(config);
|
|
11747
|
+
dataSources[index] = newConfig;
|
|
11748
|
+
this.emit("update", newConfig, {
|
|
11749
|
+
oldConfig,
|
|
11750
|
+
changeRecords
|
|
11751
|
+
});
|
|
11752
|
+
return newConfig;
|
|
11551
11753
|
}
|
|
11552
11754
|
remove(id) {
|
|
11553
11755
|
const dataSources = this.get("dataSources");
|
|
@@ -11623,7 +11825,16 @@ const dataSourceService = new DataSource();
|
|
|
11623
11825
|
|
|
11624
11826
|
const idleTask = new IdleTask();
|
|
11625
11827
|
class Dep extends BaseService {
|
|
11828
|
+
state = reactive({
|
|
11829
|
+
collecting: false
|
|
11830
|
+
});
|
|
11626
11831
|
watcher = new Watcher({ initialTargets: reactive({}) });
|
|
11832
|
+
set(name, value) {
|
|
11833
|
+
this.state[name] = value;
|
|
11834
|
+
}
|
|
11835
|
+
get(name) {
|
|
11836
|
+
return this.state[name];
|
|
11837
|
+
}
|
|
11627
11838
|
removeTargets(type = DepTargetType.DEFAULT) {
|
|
11628
11839
|
this.watcher.removeTargets(type);
|
|
11629
11840
|
const targets = this.watcher.getTargets(type);
|
|
@@ -11650,34 +11861,30 @@ class Dep extends BaseService {
|
|
|
11650
11861
|
this.watcher.clearTargets();
|
|
11651
11862
|
}
|
|
11652
11863
|
collect(nodes, depExtendedData = {}, deep = false, type) {
|
|
11864
|
+
this.set("collecting", true);
|
|
11653
11865
|
this.watcher.collectByCallback(nodes, type, ({ node, target }) => {
|
|
11654
11866
|
this.collectNode(node, target, depExtendedData, deep);
|
|
11655
11867
|
});
|
|
11868
|
+
this.set("collecting", false);
|
|
11656
11869
|
this.emit("collected", nodes, deep);
|
|
11657
11870
|
}
|
|
11658
11871
|
collectIdle(nodes, depExtendedData = {}, deep = false, type) {
|
|
11872
|
+
this.set("collecting", true);
|
|
11659
11873
|
let startTask = false;
|
|
11660
11874
|
this.watcher.collectByCallback(nodes, type, ({ node, target }) => {
|
|
11661
11875
|
startTask = true;
|
|
11662
|
-
|
|
11663
|
-
({ node: node2, deep: deep2, target: target2 }) => {
|
|
11664
|
-
this.collectNode(node2, target2, depExtendedData, deep2);
|
|
11665
|
-
},
|
|
11666
|
-
{
|
|
11667
|
-
node,
|
|
11668
|
-
deep,
|
|
11669
|
-
target
|
|
11670
|
-
}
|
|
11671
|
-
);
|
|
11876
|
+
this.enqueueTask(node, target, depExtendedData, deep);
|
|
11672
11877
|
});
|
|
11673
11878
|
return new Promise((resolve) => {
|
|
11674
11879
|
if (!startTask) {
|
|
11675
11880
|
this.emit("collected", nodes, deep);
|
|
11881
|
+
this.set("collecting", false);
|
|
11676
11882
|
resolve();
|
|
11677
11883
|
return;
|
|
11678
11884
|
}
|
|
11679
11885
|
idleTask.once("finish", () => {
|
|
11680
11886
|
this.emit("collected", nodes, deep);
|
|
11887
|
+
this.set("collecting", false);
|
|
11681
11888
|
resolve();
|
|
11682
11889
|
});
|
|
11683
11890
|
});
|
|
@@ -11706,6 +11913,9 @@ class Dep extends BaseService {
|
|
|
11706
11913
|
hasSpecifiedTypeTarget(type = DepTargetType.DEFAULT) {
|
|
11707
11914
|
return this.watcher.hasSpecifiedTypeTarget(type);
|
|
11708
11915
|
}
|
|
11916
|
+
clearIdleTasks() {
|
|
11917
|
+
idleTask.clearTasks();
|
|
11918
|
+
}
|
|
11709
11919
|
on(eventName, listener) {
|
|
11710
11920
|
return super.on(eventName, listener);
|
|
11711
11921
|
}
|
|
@@ -11715,6 +11925,23 @@ class Dep extends BaseService {
|
|
|
11715
11925
|
emit(eventName, ...args) {
|
|
11716
11926
|
return super.emit(eventName, ...args);
|
|
11717
11927
|
}
|
|
11928
|
+
enqueueTask(node, target, depExtendedData, deep) {
|
|
11929
|
+
idleTask.enqueueTask(
|
|
11930
|
+
({ node: node2, deep: deep2, target: target2 }) => {
|
|
11931
|
+
this.collectNode(node2, target2, depExtendedData, deep2);
|
|
11932
|
+
},
|
|
11933
|
+
{
|
|
11934
|
+
node,
|
|
11935
|
+
deep: false,
|
|
11936
|
+
target
|
|
11937
|
+
}
|
|
11938
|
+
);
|
|
11939
|
+
if (deep && Array.isArray(node.items) && node.items.length) {
|
|
11940
|
+
node.items.forEach((item) => {
|
|
11941
|
+
this.enqueueTask(item, target, depExtendedData, deep);
|
|
11942
|
+
});
|
|
11943
|
+
}
|
|
11944
|
+
}
|
|
11718
11945
|
}
|
|
11719
11946
|
const depService = new Dep();
|
|
11720
11947
|
|
|
@@ -12288,6 +12515,7 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12288
12515
|
initDataSourceDepTarget(ds);
|
|
12289
12516
|
});
|
|
12290
12517
|
if (Array.isArray(value.items)) {
|
|
12518
|
+
depService.clearIdleTasks();
|
|
12291
12519
|
collectIdle(value.items, true);
|
|
12292
12520
|
} else {
|
|
12293
12521
|
depService.clear();
|
|
@@ -12312,10 +12540,20 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12312
12540
|
emit("update:modelValue", value);
|
|
12313
12541
|
}
|
|
12314
12542
|
};
|
|
12315
|
-
const
|
|
12316
|
-
|
|
12317
|
-
|
|
12318
|
-
|
|
12543
|
+
const stage = computed(() => editorService.get("stage"));
|
|
12544
|
+
watch(stage, (stage2) => {
|
|
12545
|
+
if (!stage2) {
|
|
12546
|
+
return;
|
|
12547
|
+
}
|
|
12548
|
+
stage2.on("rerender", () => {
|
|
12549
|
+
const node = editorService.get("node");
|
|
12550
|
+
if (!node) return;
|
|
12551
|
+
collectIdle([node], true).then(() => {
|
|
12552
|
+
afterUpdateNodes([node]);
|
|
12553
|
+
});
|
|
12554
|
+
});
|
|
12555
|
+
});
|
|
12556
|
+
const getApp = () => stage.value?.renderer?.runtime?.getApp?.();
|
|
12319
12557
|
const updateDataSourceSchema = (nodes, deep) => {
|
|
12320
12558
|
const root = editorService.get("root");
|
|
12321
12559
|
const app = getApp();
|
|
@@ -12327,8 +12565,7 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12327
12565
|
if (root?.dataSources) {
|
|
12328
12566
|
getApp()?.dataSourceManager?.updateSchema(root.dataSources);
|
|
12329
12567
|
}
|
|
12330
|
-
|
|
12331
|
-
if (!root || !stage) return;
|
|
12568
|
+
if (!root || !stage.value) return;
|
|
12332
12569
|
const allNodes = [];
|
|
12333
12570
|
if (deep) {
|
|
12334
12571
|
nodes.forEach((node) => {
|
|
@@ -12345,7 +12582,7 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12345
12582
|
deps.forEach((dep) => {
|
|
12346
12583
|
Object.keys(dep).forEach((id) => {
|
|
12347
12584
|
const node = allNodes.find((node2) => node2.id === id);
|
|
12348
|
-
node && stage.update({
|
|
12585
|
+
node && stage.value?.update({
|
|
12349
12586
|
config: cloneDeep(node),
|
|
12350
12587
|
parentId: editorService.getParentById(node.id)?.id,
|
|
12351
12588
|
root: cloneDeep(root)
|
|
@@ -12356,13 +12593,8 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12356
12593
|
const afterUpdateNodes = (nodes) => {
|
|
12357
12594
|
const root = editorService.get("root");
|
|
12358
12595
|
if (!root) return;
|
|
12359
|
-
const stage = editorService.get("stage");
|
|
12360
|
-
const app = getApp();
|
|
12361
|
-
if (app?.dsl) {
|
|
12362
|
-
app.dsl.dataSourceDeps = root.dataSourceDeps;
|
|
12363
|
-
}
|
|
12364
12596
|
for (const node of nodes) {
|
|
12365
|
-
stage?.update({
|
|
12597
|
+
stage.value?.update({
|
|
12366
12598
|
config: cloneDeep(node),
|
|
12367
12599
|
parentId: editorService.getParentById(node.id)?.id,
|
|
12368
12600
|
root: cloneDeep(root)
|
|
@@ -12395,8 +12627,17 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12395
12627
|
delete root.dataSourceCondDeps[id];
|
|
12396
12628
|
}
|
|
12397
12629
|
};
|
|
12630
|
+
const depCollectedHandler = () => {
|
|
12631
|
+
const root = editorService.get("root");
|
|
12632
|
+
if (!root) return;
|
|
12633
|
+
const app = getApp();
|
|
12634
|
+
if (app?.dsl) {
|
|
12635
|
+
app.dsl.dataSourceDeps = root.dataSourceDeps;
|
|
12636
|
+
}
|
|
12637
|
+
};
|
|
12398
12638
|
depService.on("add-target", targetAddHandler);
|
|
12399
12639
|
depService.on("remove-target", targetRemoveHandler);
|
|
12640
|
+
depService.on("collected", depCollectedHandler);
|
|
12400
12641
|
const initDataSourceDepTarget = (ds) => {
|
|
12401
12642
|
depService.addTarget(createDataSourceTarget(ds, reactive({})));
|
|
12402
12643
|
depService.addTarget(createDataSourceMethodTarget(ds, reactive({})));
|
|
@@ -12419,10 +12660,30 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12419
12660
|
afterUpdateNodes(nodes);
|
|
12420
12661
|
});
|
|
12421
12662
|
};
|
|
12422
|
-
const nodeUpdateHandler = (
|
|
12423
|
-
|
|
12424
|
-
|
|
12663
|
+
const nodeUpdateHandler = (data) => {
|
|
12664
|
+
const needRecollectNodes = [];
|
|
12665
|
+
const normalNodes = [];
|
|
12666
|
+
data.forEach(({ newNode, oldNode, changeRecords }) => {
|
|
12667
|
+
if (changeRecords?.length) {
|
|
12668
|
+
for (const record of changeRecords) {
|
|
12669
|
+
if (!record.propPath || new RegExp(`${NODE_CONDS_KEY}.(\\d)+.cond`).test(record.propPath) || new RegExp(`${NODE_CONDS_KEY}.(\\d)+.cond.(\\d)+.value`).test(record.propPath) || record.propPath === NODE_CONDS_KEY || isValueIncludeDataSource(record.value)) {
|
|
12670
|
+
needRecollectNodes.push(newNode);
|
|
12671
|
+
break;
|
|
12672
|
+
}
|
|
12673
|
+
}
|
|
12674
|
+
} else if (isIncludeDataSource(newNode, oldNode)) {
|
|
12675
|
+
needRecollectNodes.push(newNode);
|
|
12676
|
+
} else {
|
|
12677
|
+
normalNodes.push(newNode);
|
|
12678
|
+
}
|
|
12425
12679
|
});
|
|
12680
|
+
if (needRecollectNodes.length) {
|
|
12681
|
+
collectIdle(needRecollectNodes, true).then(() => {
|
|
12682
|
+
afterUpdateNodes(needRecollectNodes);
|
|
12683
|
+
});
|
|
12684
|
+
} else if (normalNodes.length) {
|
|
12685
|
+
afterUpdateNodes(normalNodes);
|
|
12686
|
+
}
|
|
12426
12687
|
};
|
|
12427
12688
|
const nodeRemoveHandler = (nodes) => {
|
|
12428
12689
|
depService.clear(nodes);
|
|
@@ -12453,13 +12714,30 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12453
12714
|
initDataSourceDepTarget(config);
|
|
12454
12715
|
getApp()?.dataSourceManager?.addDataSource(config);
|
|
12455
12716
|
};
|
|
12456
|
-
const dataSourceUpdateHandler = (config) => {
|
|
12717
|
+
const dataSourceUpdateHandler = (config, { changeRecords }) => {
|
|
12718
|
+
let needRecollectDep = false;
|
|
12719
|
+
for (const changeRecord of changeRecords) {
|
|
12720
|
+
if (!changeRecord.propPath) {
|
|
12721
|
+
continue;
|
|
12722
|
+
}
|
|
12723
|
+
needRecollectDep = changeRecord.propPath === "fields" || changeRecord.propPath === "methods" || /fields.(\d)+.name/.test(changeRecord.propPath) || /fields.(\d)+$/.test(changeRecord.propPath) || /methods.(\d)+.name/.test(changeRecord.propPath) || /methods.(\d)+$/.test(changeRecord.propPath);
|
|
12724
|
+
if (needRecollectDep) {
|
|
12725
|
+
break;
|
|
12726
|
+
}
|
|
12727
|
+
}
|
|
12457
12728
|
const root = editorService.get("root");
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12729
|
+
if (needRecollectDep) {
|
|
12730
|
+
if (Array.isArray(root?.items)) {
|
|
12731
|
+
depService.clearIdleTasks();
|
|
12732
|
+
removeDataSourceTarget(config.id);
|
|
12733
|
+
initDataSourceDepTarget(config);
|
|
12734
|
+
collectIdle(root.items, true).then(() => {
|
|
12735
|
+
updateDataSourceSchema(root?.items || [], true);
|
|
12736
|
+
});
|
|
12737
|
+
}
|
|
12738
|
+
} else if (root?.dataSources) {
|
|
12739
|
+
getApp()?.dataSourceManager?.updateSchema(root.dataSources);
|
|
12740
|
+
}
|
|
12463
12741
|
};
|
|
12464
12742
|
const removeDataSourceTarget = (id) => {
|
|
12465
12743
|
depService.removeTarget(id, DepTargetType.DATA_SOURCE);
|
|
@@ -12481,6 +12759,7 @@ const initServiceEvents = (props, emit, { editorService, codeBlockService, dataS
|
|
|
12481
12759
|
onBeforeUnmount(() => {
|
|
12482
12760
|
depService.off("add-target", targetAddHandler);
|
|
12483
12761
|
depService.off("remove-target", targetRemoveHandler);
|
|
12762
|
+
depService.off("collected", depCollectedHandler);
|
|
12484
12763
|
editorService.off("history-change", historyChangeHandler);
|
|
12485
12764
|
editorService.off("root-change", rootChangeHandler);
|
|
12486
12765
|
editorService.off("add", nodeAddHandler);
|
|
@@ -12753,4 +13032,4 @@ const index = {
|
|
|
12753
13032
|
}
|
|
12754
13033
|
};
|
|
12755
13034
|
|
|
12756
|
-
export { CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$L as CodeBlockEditor, _sfc_main$l as CodeBlockList, _sfc_main$k as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$U as CodeSelect, _sfc_main$S as CodeSelectCol, ColumnLayout, _sfc_main$b as ComponentListPanel, _sfc_main$R as CondOpSelect, _sfc_main$g as ContentMenu, _sfc_main$j as DataSourceConfigPanel, _sfc_main$N as DataSourceFieldSelect, _sfc_main$P as DataSourceFields, _sfc_main$M as DataSourceInput, _sfc_main$J as DataSourceMethodSelect, _sfc_main$K as DataSourceMethods, _sfc_main$I as DataSourceMocks, _sfc_main$H as DataSourceSelect, _sfc_main$G as DisplayConds, DragType, _sfc_main$F as EventSelect, Fixed2Other, _sfc_main$Q as FloatingBox, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$Y as Icon, IdleTask, KeyBindingCommand, _sfc_main$D as KeyValue, Keys, LayerOffset, _sfc_main$c as LayerPanel, Layout, _sfc_main$z as LayoutContainer, _sfc_main$C as PageFragmentSelect, _sfc_main$p as PropsPanel, _sfc_main$A as Resizer, ScrollViewer, SideItemKey, _sfc_main$z as SplitView, _sfc_main$X as TMagicCodeEditor, _sfc_main as TMagicEditor, _sfc_main$y as ToolButton, _sfc_main$m as Tree, _sfc_main$n as TreeNode, UI_SELECT_MODE_EVENT_NAME, UndoRedo, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, arrayOptions, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, eqOptions, error, eventTabConfig, eventsService, fillConfig$1 as fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getDefaultConfig, getDisplayField, getEditorConfig, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, log, moveItemsInContainer, numberOptions, propsService, removeDataSourceFieldPrefix, serializeConfig, setChildrenLayout, setEditorConfig, setLayout, stageOverlayService, storageService, styleTabConfig, uiService, updateStatus, useCodeBlockEdit,
|
|
13035
|
+
export { CODE_DRAFT_STORAGE_KEY, COPY_CODE_STORAGE_KEY, COPY_DS_STORAGE_KEY, COPY_STORAGE_KEY, _sfc_main$L as CodeBlockEditor, _sfc_main$l as CodeBlockList, _sfc_main$k as CodeBlockListPanel, CodeDeleteErrorType, _sfc_main$U as CodeSelect, _sfc_main$S as CodeSelectCol, ColumnLayout, _sfc_main$b as ComponentListPanel, _sfc_main$R as CondOpSelect, _sfc_main$g as ContentMenu, _sfc_main$j as DataSourceConfigPanel, _sfc_main$N as DataSourceFieldSelect, _sfc_main$P as DataSourceFields, _sfc_main$M as DataSourceInput, _sfc_main$J as DataSourceMethodSelect, _sfc_main$K as DataSourceMethods, _sfc_main$I as DataSourceMocks, _sfc_main$H as DataSourceSelect, _sfc_main$G as DisplayConds, DragType, _sfc_main$F as EventSelect, Fixed2Other, _sfc_main$Q as FloatingBox, H_GUIDE_LINE_STORAGE_KEY, _sfc_main$Y as Icon, IdleTask, KeyBindingCommand, _sfc_main$D as KeyValue, Keys, LayerOffset, _sfc_main$c as LayerPanel, Layout, _sfc_main$z as LayoutContainer, _sfc_main$C as PageFragmentSelect, _sfc_main$p as PropsPanel, _sfc_main$A as Resizer, ScrollViewer, SideItemKey, _sfc_main$z as SplitView, _sfc_main$X as TMagicCodeEditor, _sfc_main as TMagicEditor, _sfc_main$y as ToolButton, _sfc_main$m as Tree, _sfc_main$n as TreeNode, UI_SELECT_MODE_EVENT_NAME, UndoRedo, V_GUIDE_LINE_STORAGE_KEY, advancedTabConfig, arrayOptions, beforePaste, change2Fixed, codeBlockService, dataSourceService, debug, index as default, depService, displayTabConfig, editorService, eqOptions, error, eventTabConfig, eventsService, fillConfig$1 as fillConfig, fixNodeLeft, fixNodePosition, generatePageName, generatePageNameByApp, getAddParent, getCascaderOptionsFromFields, getDefaultConfig, getDisplayField, getEditorConfig, getFormConfig, getFormValue, getGuideLineFromCache, getInitPositionStyle, getNodeIndex, getPageFragmentList, getPageList, getPageNameList, getPositionInContainer, getRelativeStyle, historyService, info, isIncludeDataSource, isValueIncludeDataSource, log, moveItemsInContainer, numberOptions, propsService, removeDataSourceFieldPrefix, serializeConfig, setChildrenLayout, setEditorConfig, setLayout, stageOverlayService, storageService, styleTabConfig, uiService, updateStatus, useCodeBlockEdit, useEditorContentHeight, useFilter, useFloatBox, useGetSo, useNextFloatBoxPosition, useNodeStatus$1 as useNodeStatus, useStage, useWindowRect, warn };
|