@tmagic/editor 1.3.10 → 1.3.11
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 +21 -0
- package/dist/tmagic-editor.js +320 -165
- package/dist/tmagic-editor.umd.cjs +343 -188
- package/package.json +11 -11
- package/src/components/ScrollViewer.vue +3 -1
- package/src/hooks/use-node-status.ts +2 -2
- package/src/hooks/use-stage-overlay.ts +158 -0
- package/src/layouts/workspace/viewer/Stage.vue +22 -13
- package/src/layouts/workspace/viewer/StageOverlay.vue +16 -0
- package/src/theme/stage.scss +24 -0
- package/types/components/ScrollViewer.vue.d.ts +1 -0
- package/types/hooks/use-stage-overlay.d.ts +7 -0
- package/types/layouts/workspace/viewer/StageOverlay.vue.d.ts +2 -0
- package/dist/tmagic-editor.js.map +0 -1
- package/dist/tmagic-editor.umd.cjs.map +0 -1
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
const _hoisted_1$t = {
|
|
36
36
|
class: /* @__PURE__ */ vue.normalizeClass(`magic-code-editor`)
|
|
37
37
|
};
|
|
38
|
-
const _sfc_main$
|
|
38
|
+
const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
39
39
|
...{
|
|
40
40
|
name: "MEditorCodeEditor"
|
|
41
41
|
},
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
|
|
224
|
-
const _sfc_main$
|
|
224
|
+
const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
225
225
|
...{
|
|
226
226
|
name: "MEditorCode"
|
|
227
227
|
},
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
emit("change", v);
|
|
247
247
|
};
|
|
248
248
|
return (_ctx, _cache) => {
|
|
249
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
249
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$U, {
|
|
250
250
|
height: _ctx.config.height,
|
|
251
251
|
"init-values": _ctx.model[_ctx.name],
|
|
252
252
|
language: _ctx.config.language,
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
}
|
|
262
262
|
});
|
|
263
263
|
|
|
264
|
-
const _sfc_main$
|
|
264
|
+
const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
265
265
|
...{
|
|
266
266
|
name: "MEditorCodeLink"
|
|
267
267
|
},
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
343
|
|
|
344
|
-
const _sfc_main$
|
|
344
|
+
const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
345
345
|
...{
|
|
346
346
|
name: "MEditorCodeSelect"
|
|
347
347
|
},
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
const _hoisted_2$k = { style: { "flex": "1" } };
|
|
419
419
|
const _hoisted_3$8 = { style: { "flex": "1" } };
|
|
420
420
|
const _hoisted_4$7 = { class: "dialog-footer" };
|
|
421
|
-
const _sfc_main$
|
|
421
|
+
const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
422
422
|
...{
|
|
423
423
|
name: "MEditorCodeBlockEditor"
|
|
424
424
|
},
|
|
@@ -686,7 +686,7 @@
|
|
|
686
686
|
})
|
|
687
687
|
])
|
|
688
688
|
]),
|
|
689
|
-
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
689
|
+
difVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$U, {
|
|
690
690
|
key: 0,
|
|
691
691
|
ref_key: "magicVsEditor",
|
|
692
692
|
ref: magicVsEditor,
|
|
@@ -3218,7 +3218,7 @@
|
|
|
3218
3218
|
return newNode;
|
|
3219
3219
|
};
|
|
3220
3220
|
|
|
3221
|
-
const _sfc_main$
|
|
3221
|
+
const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
3222
3222
|
...{
|
|
3223
3223
|
name: "MEditorCodeParams"
|
|
3224
3224
|
},
|
|
@@ -3269,7 +3269,7 @@
|
|
|
3269
3269
|
});
|
|
3270
3270
|
|
|
3271
3271
|
const _hoisted_1$r = ["src"];
|
|
3272
|
-
const _sfc_main$
|
|
3272
|
+
const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
3273
3273
|
...{
|
|
3274
3274
|
name: "MEditorIcon"
|
|
3275
3275
|
},
|
|
@@ -3373,7 +3373,7 @@
|
|
|
3373
3373
|
|
|
3374
3374
|
const _hoisted_1$q = { class: "m-fields-code-select-col" };
|
|
3375
3375
|
const _hoisted_2$j = { class: "code-select-container" };
|
|
3376
|
-
const _sfc_main$
|
|
3376
|
+
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
3377
3377
|
...{
|
|
3378
3378
|
name: "MEditorCodeSelectCol"
|
|
3379
3379
|
},
|
|
@@ -3455,14 +3455,14 @@
|
|
|
3455
3455
|
size: _ctx.size,
|
|
3456
3456
|
onChange: onParamsChangeHandler
|
|
3457
3457
|
}, null, 8, ["model", "size"]),
|
|
3458
|
-
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3458
|
+
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
3459
3459
|
key: 0,
|
|
3460
3460
|
class: "icon",
|
|
3461
3461
|
icon: !_ctx.disabled ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
3462
3462
|
onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(editCode)(_ctx.model[_ctx.name]))
|
|
3463
3463
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true)
|
|
3464
3464
|
]),
|
|
3465
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3465
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$P, {
|
|
3466
3466
|
key: 0,
|
|
3467
3467
|
name: "params",
|
|
3468
3468
|
model: _ctx.model,
|
|
@@ -3470,7 +3470,7 @@
|
|
|
3470
3470
|
"params-config": paramsConfig.value,
|
|
3471
3471
|
onChange: onParamsChangeHandler
|
|
3472
3472
|
}, null, 8, ["model", "size", "params-config"])) : vue.createCommentVNode("", true),
|
|
3473
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
3473
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
3474
3474
|
key: 1,
|
|
3475
3475
|
ref_key: "codeBlockEditor",
|
|
3476
3476
|
ref: codeBlockEditor,
|
|
@@ -3485,7 +3485,7 @@
|
|
|
3485
3485
|
|
|
3486
3486
|
const _hoisted_1$p = { class: "m-editor-data-source-fields" };
|
|
3487
3487
|
const _hoisted_2$i = { class: "m-editor-data-source-fields-footer" };
|
|
3488
|
-
const _sfc_main$
|
|
3488
|
+
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
3489
3489
|
...{
|
|
3490
3490
|
name: "MEditorDataSourceFields"
|
|
3491
3491
|
},
|
|
@@ -3777,7 +3777,7 @@
|
|
|
3777
3777
|
}
|
|
3778
3778
|
});
|
|
3779
3779
|
|
|
3780
|
-
const _sfc_main$
|
|
3780
|
+
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
3781
3781
|
__name: "DataSourceFieldSelect",
|
|
3782
3782
|
props: {
|
|
3783
3783
|
config: {},
|
|
@@ -3835,7 +3835,7 @@
|
|
|
3835
3835
|
const _hoisted_1$o = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
|
|
3836
3836
|
const _hoisted_2$h = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
|
|
3837
3837
|
const _hoisted_3$7 = { class: "el-input__inner" };
|
|
3838
|
-
const _sfc_main$
|
|
3838
|
+
const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
3839
3839
|
...{
|
|
3840
3840
|
name: "MEditorDataSourceInput"
|
|
3841
3841
|
},
|
|
@@ -4025,7 +4025,7 @@
|
|
|
4025
4025
|
}
|
|
4026
4026
|
), {
|
|
4027
4027
|
suffix: vue.withCtx(() => [
|
|
4028
|
-
vue.createVNode(_sfc_main$
|
|
4028
|
+
vue.createVNode(_sfc_main$O, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
|
|
4029
4029
|
]),
|
|
4030
4030
|
default: vue.withCtx(({ item }) => [
|
|
4031
4031
|
vue.createElementVNode("div", _hoisted_1$o, [
|
|
@@ -4060,7 +4060,7 @@
|
|
|
4060
4060
|
}, 1032, ["size"])) : vue.createCommentVNode("", true)
|
|
4061
4061
|
], 64);
|
|
4062
4062
|
}), 256)),
|
|
4063
|
-
vue.createVNode(_sfc_main$
|
|
4063
|
+
vue.createVNode(_sfc_main$O, {
|
|
4064
4064
|
class: "tmagic-data-source-input-icon",
|
|
4065
4065
|
icon: vue.unref(iconsVue.Coin)
|
|
4066
4066
|
}, null, 8, ["icon"])
|
|
@@ -4145,7 +4145,7 @@
|
|
|
4145
4145
|
|
|
4146
4146
|
const _hoisted_1$n = { class: "m-editor-data-source-methods" };
|
|
4147
4147
|
const _hoisted_2$g = { class: "m-editor-data-source-methods-footer" };
|
|
4148
|
-
const _sfc_main$
|
|
4148
|
+
const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
4149
4149
|
...{
|
|
4150
4150
|
name: "MEditorDataSourceMethods"
|
|
4151
4151
|
},
|
|
@@ -4234,7 +4234,7 @@
|
|
|
4234
4234
|
_: 1
|
|
4235
4235
|
}, 8, ["disabled"])
|
|
4236
4236
|
]),
|
|
4237
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4237
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
4238
4238
|
key: 0,
|
|
4239
4239
|
ref_key: "codeBlockEditor",
|
|
4240
4240
|
ref: codeBlockEditor,
|
|
@@ -4251,7 +4251,7 @@
|
|
|
4251
4251
|
|
|
4252
4252
|
const _hoisted_1$m = { class: "m-fields-data-source-method-select" };
|
|
4253
4253
|
const _hoisted_2$f = { class: "data-source-method-select-container" };
|
|
4254
|
-
const _sfc_main$
|
|
4254
|
+
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
4255
4255
|
...{
|
|
4256
4256
|
name: "MEditorDataSourceMethodSelect"
|
|
4257
4257
|
},
|
|
@@ -4342,14 +4342,14 @@
|
|
|
4342
4342
|
model: _ctx.model,
|
|
4343
4343
|
onChange: onChangeHandler
|
|
4344
4344
|
}, null, 8, ["config", "model"]),
|
|
4345
|
-
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4345
|
+
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
4346
4346
|
key: 0,
|
|
4347
4347
|
class: "icon",
|
|
4348
4348
|
icon: !_ctx.disabled ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
4349
4349
|
onClick: editCodeHandler
|
|
4350
4350
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true)
|
|
4351
4351
|
]),
|
|
4352
|
-
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4352
|
+
paramsConfig.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$P, {
|
|
4353
4353
|
key: 0,
|
|
4354
4354
|
name: "params",
|
|
4355
4355
|
model: _ctx.model,
|
|
@@ -4358,7 +4358,7 @@
|
|
|
4358
4358
|
"params-config": paramsConfig.value,
|
|
4359
4359
|
onChange: onChangeHandler
|
|
4360
4360
|
}, null, 8, ["model", "size", "disabled", "params-config"])) : vue.createCommentVNode("", true),
|
|
4361
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
4361
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
4362
4362
|
key: 1,
|
|
4363
4363
|
ref_key: "codeBlockEditor",
|
|
4364
4364
|
ref: codeBlockEditor,
|
|
@@ -4373,7 +4373,7 @@
|
|
|
4373
4373
|
|
|
4374
4374
|
const _hoisted_1$l = { class: "m-editor-data-source-fields" };
|
|
4375
4375
|
const _hoisted_2$e = { class: "m-editor-data-source-fields-footer" };
|
|
4376
|
-
const _sfc_main$
|
|
4376
|
+
const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
4377
4377
|
...{
|
|
4378
4378
|
name: "MEditorDataSourceMocks"
|
|
4379
4379
|
},
|
|
@@ -4460,7 +4460,7 @@
|
|
|
4460
4460
|
const columns = [
|
|
4461
4461
|
{
|
|
4462
4462
|
type: "expand",
|
|
4463
|
-
component: _sfc_main$
|
|
4463
|
+
component: _sfc_main$U,
|
|
4464
4464
|
props: (row) => ({
|
|
4465
4465
|
initValues: row.data,
|
|
4466
4466
|
language: "json",
|
|
@@ -4605,7 +4605,7 @@
|
|
|
4605
4605
|
}
|
|
4606
4606
|
});
|
|
4607
4607
|
|
|
4608
|
-
const _sfc_main$
|
|
4608
|
+
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
4609
4609
|
...{
|
|
4610
4610
|
name: "MEditorDataSourceSelect"
|
|
4611
4611
|
},
|
|
@@ -4667,7 +4667,7 @@
|
|
|
4667
4667
|
key: 1,
|
|
4668
4668
|
class: "fullWidth"
|
|
4669
4669
|
};
|
|
4670
|
-
const _sfc_main$
|
|
4670
|
+
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
4671
4671
|
...{
|
|
4672
4672
|
name: "MEditorEventSelect"
|
|
4673
4673
|
},
|
|
@@ -4940,7 +4940,7 @@
|
|
|
4940
4940
|
const _hoisted_4$6 = [
|
|
4941
4941
|
_hoisted_2$c
|
|
4942
4942
|
];
|
|
4943
|
-
const _sfc_main$
|
|
4943
|
+
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
4944
4944
|
...{
|
|
4945
4945
|
name: "MEditorCodeIcon"
|
|
4946
4946
|
},
|
|
@@ -4955,7 +4955,7 @@
|
|
|
4955
4955
|
const _hoisted_1$i = { class: "m-fields-key-value" };
|
|
4956
4956
|
const _hoisted_2$b = { key: 0 };
|
|
4957
4957
|
const _hoisted_3$6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
|
|
4958
|
-
const _sfc_main$
|
|
4958
|
+
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
4959
4959
|
...{
|
|
4960
4960
|
name: "MEditorKeyValue"
|
|
4961
4961
|
},
|
|
@@ -5063,7 +5063,7 @@
|
|
|
5063
5063
|
_: 1
|
|
5064
5064
|
}, 8, ["size", "disabled", "icon"])
|
|
5065
5065
|
])) : vue.createCommentVNode("", true),
|
|
5066
|
-
_ctx.config.advanced && showCode.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5066
|
+
_ctx.config.advanced && showCode.value ? (vue.openBlock(), vue.createBlock(_sfc_main$U, {
|
|
5067
5067
|
key: 1,
|
|
5068
5068
|
height: "200px",
|
|
5069
5069
|
"init-values": _ctx.model[_ctx.name],
|
|
@@ -5079,7 +5079,7 @@
|
|
|
5079
5079
|
size: "default",
|
|
5080
5080
|
disabled: _ctx.disabled,
|
|
5081
5081
|
link: "",
|
|
5082
|
-
icon: _sfc_main$
|
|
5082
|
+
icon: _sfc_main$E,
|
|
5083
5083
|
onClick: _cache[0] || (_cache[0] = ($event) => showCode.value = !showCode.value)
|
|
5084
5084
|
}, null, 8, ["disabled"])) : vue.createCommentVNode("", true)
|
|
5085
5085
|
]);
|
|
@@ -5089,7 +5089,7 @@
|
|
|
5089
5089
|
|
|
5090
5090
|
const _hoisted_1$h = { class: "m-fields-page-fragment-select" };
|
|
5091
5091
|
const _hoisted_2$a = { class: "page-fragment-select-container" };
|
|
5092
|
-
const _sfc_main$
|
|
5092
|
+
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
5093
5093
|
...{
|
|
5094
5094
|
name: "MEditorPageFragmentSelect"
|
|
5095
5095
|
},
|
|
@@ -5144,7 +5144,7 @@
|
|
|
5144
5144
|
size: _ctx.size,
|
|
5145
5145
|
onChange: changeHandler
|
|
5146
5146
|
}, null, 8, ["model", "size"]),
|
|
5147
|
-
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5147
|
+
_ctx.model[_ctx.name] ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
5148
5148
|
key: 0,
|
|
5149
5149
|
class: "icon",
|
|
5150
5150
|
icon: vue.unref(iconsVue.Edit),
|
|
@@ -5161,7 +5161,7 @@
|
|
|
5161
5161
|
class: "m-fields-ui-select",
|
|
5162
5162
|
style: { "display": "flex" }
|
|
5163
5163
|
};
|
|
5164
|
-
const _sfc_main$
|
|
5164
|
+
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
5165
5165
|
...{
|
|
5166
5166
|
name: "MEditorUISelect"
|
|
5167
5167
|
},
|
|
@@ -5346,7 +5346,7 @@
|
|
|
5346
5346
|
};
|
|
5347
5347
|
};
|
|
5348
5348
|
|
|
5349
|
-
const _sfc_main$
|
|
5349
|
+
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
5350
5350
|
...{
|
|
5351
5351
|
name: "MEditorResizer"
|
|
5352
5352
|
},
|
|
@@ -5368,7 +5368,7 @@
|
|
|
5368
5368
|
}
|
|
5369
5369
|
});
|
|
5370
5370
|
|
|
5371
|
-
const _sfc_main$
|
|
5371
|
+
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
5372
5372
|
...{
|
|
5373
5373
|
name: "MEditorLayout"
|
|
5374
5374
|
},
|
|
@@ -5495,7 +5495,7 @@
|
|
|
5495
5495
|
}, [
|
|
5496
5496
|
vue.renderSlot(_ctx.$slots, "left")
|
|
5497
5497
|
], 6),
|
|
5498
|
-
vue.createVNode(_sfc_main$
|
|
5498
|
+
vue.createVNode(_sfc_main$A, { onChange: changeLeft })
|
|
5499
5499
|
], 64)) : vue.createCommentVNode("", true),
|
|
5500
5500
|
vue.createElementVNode("div", {
|
|
5501
5501
|
class: vue.normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
|
|
@@ -5504,7 +5504,7 @@
|
|
|
5504
5504
|
vue.renderSlot(_ctx.$slots, "center")
|
|
5505
5505
|
], 6),
|
|
5506
5506
|
hasRight.value && _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
5507
|
-
vue.createVNode(_sfc_main$
|
|
5507
|
+
vue.createVNode(_sfc_main$A, { onChange: changeRight }),
|
|
5508
5508
|
vue.createElementVNode("div", {
|
|
5509
5509
|
class: vue.normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
|
|
5510
5510
|
style: vue.normalizeStyle(`width: ${_ctx.right}px`)
|
|
@@ -5522,7 +5522,7 @@
|
|
|
5522
5522
|
class: "menu-item-text"
|
|
5523
5523
|
};
|
|
5524
5524
|
const _hoisted_2$9 = { class: "el-dropdown-link menubar-menu-button" };
|
|
5525
|
-
const _sfc_main$
|
|
5525
|
+
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
5526
5526
|
...{
|
|
5527
5527
|
name: "MEditorToolButton"
|
|
5528
5528
|
},
|
|
@@ -5615,7 +5615,7 @@
|
|
|
5615
5615
|
disabled: disabled.value
|
|
5616
5616
|
}, {
|
|
5617
5617
|
default: vue.withCtx(() => [
|
|
5618
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5618
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
5619
5619
|
key: 0,
|
|
5620
5620
|
icon: _ctx.data.icon
|
|
5621
5621
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -5633,7 +5633,7 @@
|
|
|
5633
5633
|
title: _ctx.data.text
|
|
5634
5634
|
}, {
|
|
5635
5635
|
default: vue.withCtx(() => [
|
|
5636
|
-
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5636
|
+
_ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
5637
5637
|
key: 0,
|
|
5638
5638
|
icon: _ctx.data.icon
|
|
5639
5639
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -5687,7 +5687,7 @@
|
|
|
5687
5687
|
key: 1,
|
|
5688
5688
|
style: { "width": "21px" }
|
|
5689
5689
|
};
|
|
5690
|
-
const _sfc_main$
|
|
5690
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
5691
5691
|
...{
|
|
5692
5692
|
name: "MEditorPageBarAddButton"
|
|
5693
5693
|
},
|
|
@@ -5721,13 +5721,13 @@
|
|
|
5721
5721
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
5722
5722
|
onClick: addPage
|
|
5723
5723
|
}, [
|
|
5724
|
-
vue.createVNode(_sfc_main$
|
|
5724
|
+
vue.createVNode(_sfc_main$O, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
5725
5725
|
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e));
|
|
5726
5726
|
};
|
|
5727
5727
|
}
|
|
5728
5728
|
});
|
|
5729
5729
|
|
|
5730
|
-
const _sfc_main$
|
|
5730
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
5731
5731
|
...{
|
|
5732
5732
|
name: "MEditorPageBarScrollContainer"
|
|
5733
5733
|
},
|
|
@@ -5833,7 +5833,7 @@
|
|
|
5833
5833
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
5834
5834
|
onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
|
|
5835
5835
|
}, [
|
|
5836
|
-
vue.createVNode(_sfc_main$
|
|
5836
|
+
vue.createVNode(_sfc_main$O, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
|
|
5837
5837
|
])) : vue.createCommentVNode("", true),
|
|
5838
5838
|
_ctx.type === vue.unref(schema.NodeType).PAGE && pageLength.value || _ctx.type === vue.unref(schema.NodeType).PAGE_FRAGMENT && pageFragmentLength.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
5839
5839
|
key: 1,
|
|
@@ -5849,14 +5849,14 @@
|
|
|
5849
5849
|
class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
|
|
5850
5850
|
onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
|
|
5851
5851
|
}, [
|
|
5852
|
-
vue.createVNode(_sfc_main$
|
|
5852
|
+
vue.createVNode(_sfc_main$O, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
|
|
5853
5853
|
])) : vue.createCommentVNode("", true)
|
|
5854
5854
|
], 512);
|
|
5855
5855
|
};
|
|
5856
5856
|
}
|
|
5857
5857
|
});
|
|
5858
5858
|
|
|
5859
|
-
const _sfc_main$
|
|
5859
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
5860
5860
|
...{
|
|
5861
5861
|
name: "MEditorPageBarSwitchTypeButton"
|
|
5862
5862
|
},
|
|
@@ -5904,7 +5904,7 @@
|
|
|
5904
5904
|
const _hoisted_2$8 = ["onClick"];
|
|
5905
5905
|
const _hoisted_3$5 = { class: "m-editor-page-bar-title" };
|
|
5906
5906
|
const _hoisted_4$5 = ["title"];
|
|
5907
|
-
const _sfc_main$
|
|
5907
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
5908
5908
|
...{
|
|
5909
5909
|
name: "MEditorPageBar"
|
|
5910
5910
|
},
|
|
@@ -5983,14 +5983,14 @@
|
|
|
5983
5983
|
};
|
|
5984
5984
|
return (_ctx, _cache) => {
|
|
5985
5985
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
|
|
5986
|
-
!_ctx.disabledPageFragment ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
5986
|
+
!_ctx.disabledPageFragment ? (vue.openBlock(), vue.createBlock(_sfc_main$v, {
|
|
5987
5987
|
key: 0,
|
|
5988
5988
|
modelValue: active.value,
|
|
5989
5989
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => active.value = $event)
|
|
5990
5990
|
}, null, 8, ["modelValue"])) : vue.createCommentVNode("", true),
|
|
5991
|
-
vue.createVNode(_sfc_main$
|
|
5991
|
+
vue.createVNode(_sfc_main$w, { type: active.value }, {
|
|
5992
5992
|
prepend: vue.withCtx(() => [
|
|
5993
|
-
vue.createVNode(_sfc_main$
|
|
5993
|
+
vue.createVNode(_sfc_main$x, { type: active.value }, null, 8, ["type"])
|
|
5994
5994
|
]),
|
|
5995
5995
|
default: vue.withCtx(() => [
|
|
5996
5996
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (item) => {
|
|
@@ -6023,7 +6023,7 @@
|
|
|
6023
6023
|
default: vue.withCtx(() => [
|
|
6024
6024
|
vue.createElementVNode("div", null, [
|
|
6025
6025
|
vue.renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
|
|
6026
|
-
vue.createVNode(_sfc_main$
|
|
6026
|
+
vue.createVNode(_sfc_main$y, {
|
|
6027
6027
|
data: {
|
|
6028
6028
|
type: "button",
|
|
6029
6029
|
text: "复制",
|
|
@@ -6031,7 +6031,7 @@
|
|
|
6031
6031
|
handler: () => copy(item)
|
|
6032
6032
|
}
|
|
6033
6033
|
}, null, 8, ["data"]),
|
|
6034
|
-
vue.createVNode(_sfc_main$
|
|
6034
|
+
vue.createVNode(_sfc_main$y, {
|
|
6035
6035
|
data: {
|
|
6036
6036
|
type: "button",
|
|
6037
6037
|
text: "删除",
|
|
@@ -6058,7 +6058,7 @@
|
|
|
6058
6058
|
const _hoisted_2$7 = { class: "m-editor-empty-content" };
|
|
6059
6059
|
const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面", -1);
|
|
6060
6060
|
const _hoisted_4$4 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面片", -1);
|
|
6061
|
-
const _sfc_main$
|
|
6061
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
6062
6062
|
...{
|
|
6063
6063
|
name: "MEditorAddPageBox"
|
|
6064
6064
|
},
|
|
@@ -6089,7 +6089,7 @@
|
|
|
6089
6089
|
onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(vue.unref(schema.NodeType).PAGE))
|
|
6090
6090
|
}, [
|
|
6091
6091
|
vue.createElementVNode("div", null, [
|
|
6092
|
-
vue.createVNode(_sfc_main$
|
|
6092
|
+
vue.createVNode(_sfc_main$O, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
6093
6093
|
]),
|
|
6094
6094
|
_hoisted_3$4
|
|
6095
6095
|
]),
|
|
@@ -6099,7 +6099,7 @@
|
|
|
6099
6099
|
onClick: _cache[1] || (_cache[1] = ($event) => clickHandler(vue.unref(schema.NodeType).PAGE_FRAGMENT))
|
|
6100
6100
|
}, [
|
|
6101
6101
|
vue.createElementVNode("div", null, [
|
|
6102
|
-
vue.createVNode(_sfc_main$
|
|
6102
|
+
vue.createVNode(_sfc_main$O, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
|
|
6103
6103
|
]),
|
|
6104
6104
|
_hoisted_4$4
|
|
6105
6105
|
])) : vue.createCommentVNode("", true)
|
|
@@ -6113,7 +6113,7 @@
|
|
|
6113
6113
|
const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
|
|
6114
6114
|
const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
|
|
6115
6115
|
const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
|
|
6116
|
-
const _sfc_main$
|
|
6116
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
6117
6117
|
...{
|
|
6118
6118
|
name: "MEditorFramework"
|
|
6119
6119
|
},
|
|
@@ -6194,13 +6194,13 @@
|
|
|
6194
6194
|
vue.renderSlot(_ctx.$slots, "nav"),
|
|
6195
6195
|
vue.renderSlot(_ctx.$slots, "content-before"),
|
|
6196
6196
|
showSrc.value ? vue.renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
6197
|
-
vue.createVNode(_sfc_main$
|
|
6197
|
+
vue.createVNode(_sfc_main$U, {
|
|
6198
6198
|
class: "m-editor-content",
|
|
6199
6199
|
"init-values": root.value,
|
|
6200
6200
|
options: vue.unref(codeOptions),
|
|
6201
6201
|
onSave: saveCode
|
|
6202
6202
|
}, null, 8, ["init-values", "options"])
|
|
6203
|
-
]) : vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6203
|
+
]) : vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$z, {
|
|
6204
6204
|
key: 1,
|
|
6205
6205
|
"element-loading-text": "Runtime 加载中...",
|
|
6206
6206
|
ref_key: "splitView",
|
|
@@ -6223,10 +6223,10 @@
|
|
|
6223
6223
|
]),
|
|
6224
6224
|
center: vue.withCtx(() => [
|
|
6225
6225
|
page.value ? vue.renderSlot(_ctx.$slots, "workspace", { key: 0 }) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
|
|
6226
|
-
vue.createVNode(_sfc_main$
|
|
6226
|
+
vue.createVNode(_sfc_main$t, { "disabled-page-fragment": _ctx.disabledPageFragment }, null, 8, ["disabled-page-fragment"])
|
|
6227
6227
|
]),
|
|
6228
6228
|
vue.renderSlot(_ctx.$slots, "page-bar", {}, () => [
|
|
6229
|
-
vue.createVNode(_sfc_main$
|
|
6229
|
+
vue.createVNode(_sfc_main$u, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
|
|
6230
6230
|
"page-bar-title": vue.withCtx(({ page: page2 }) => [
|
|
6231
6231
|
vue.renderSlot(_ctx.$slots, "page-bar-title", { page: page2 })
|
|
6232
6232
|
]),
|
|
@@ -6261,7 +6261,7 @@
|
|
|
6261
6261
|
}
|
|
6262
6262
|
});
|
|
6263
6263
|
|
|
6264
|
-
const _sfc_main$
|
|
6264
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
6265
6265
|
...{
|
|
6266
6266
|
name: "MEditorNavMenu"
|
|
6267
6267
|
},
|
|
@@ -6423,7 +6423,7 @@
|
|
|
6423
6423
|
style: vue.normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
|
|
6424
6424
|
}, [
|
|
6425
6425
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(buttons.value[key], (item, index) => {
|
|
6426
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6426
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
6427
6427
|
data: item,
|
|
6428
6428
|
key: index
|
|
6429
6429
|
}, null, 8, ["data"]);
|
|
@@ -6436,7 +6436,7 @@
|
|
|
6436
6436
|
});
|
|
6437
6437
|
|
|
6438
6438
|
const _hoisted_1$b = { class: "m-editor-props-panel" };
|
|
6439
|
-
const _sfc_main$
|
|
6439
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
6440
6440
|
...{
|
|
6441
6441
|
name: "MEditorPropsPanel"
|
|
6442
6442
|
},
|
|
@@ -6643,7 +6643,7 @@
|
|
|
6643
6643
|
};
|
|
6644
6644
|
};
|
|
6645
6645
|
|
|
6646
|
-
const _sfc_main$
|
|
6646
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
6647
6647
|
...{
|
|
6648
6648
|
name: "MEditorSearchInput"
|
|
6649
6649
|
},
|
|
@@ -6701,7 +6701,7 @@
|
|
|
6701
6701
|
key: 0,
|
|
6702
6702
|
class: "m-editor-tree-node-children"
|
|
6703
6703
|
};
|
|
6704
|
-
const _sfc_main$
|
|
6704
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
6705
6705
|
...{
|
|
6706
6706
|
name: "MEditorTreeNode"
|
|
6707
6707
|
},
|
|
@@ -6768,7 +6768,7 @@
|
|
|
6768
6768
|
onContextmenu: nodeContentmenuHandler,
|
|
6769
6769
|
onMouseenter: mouseenterHandler
|
|
6770
6770
|
}, [
|
|
6771
|
-
vue.createVNode(_sfc_main$
|
|
6771
|
+
vue.createVNode(_sfc_main$O, {
|
|
6772
6772
|
class: "expand-icon",
|
|
6773
6773
|
style: vue.normalizeStyle(hasChildren.value ? "" : "color: transparent; cursor: default"),
|
|
6774
6774
|
icon: expanded.value ? vue.unref(iconsVue.ArrowDown) : vue.unref(iconsVue.ArrowRight),
|
|
@@ -6822,7 +6822,7 @@
|
|
|
6822
6822
|
key: 1,
|
|
6823
6823
|
class: "m-editor-tree-empty"
|
|
6824
6824
|
};
|
|
6825
|
-
const _sfc_main$
|
|
6825
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
6826
6826
|
...{
|
|
6827
6827
|
name: "MEditorTree"
|
|
6828
6828
|
},
|
|
@@ -6846,7 +6846,7 @@
|
|
|
6846
6846
|
onDragover: handleDragOver
|
|
6847
6847
|
}, [
|
|
6848
6848
|
_ctx.data?.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.data, (item) => {
|
|
6849
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
6849
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
6850
6850
|
key: item.id,
|
|
6851
6851
|
data: item,
|
|
6852
6852
|
indent: _ctx.indent,
|
|
@@ -6909,13 +6909,13 @@
|
|
|
6909
6909
|
};
|
|
6910
6910
|
};
|
|
6911
6911
|
|
|
6912
|
-
const createPageNodeStatus$1 = (nodeData,
|
|
6912
|
+
const createPageNodeStatus$1 = (nodeData, initialLayerNodeStatus) => {
|
|
6913
6913
|
const map = /* @__PURE__ */ new Map();
|
|
6914
6914
|
nodeData.forEach(
|
|
6915
6915
|
(node) => traverseNode(node, (node2) => {
|
|
6916
6916
|
map.set(
|
|
6917
6917
|
node2.id,
|
|
6918
|
-
|
|
6918
|
+
initialLayerNodeStatus?.get(node2.id) || {
|
|
6919
6919
|
visible: true,
|
|
6920
6920
|
expand: false,
|
|
6921
6921
|
selected: false,
|
|
@@ -6943,7 +6943,7 @@
|
|
|
6943
6943
|
};
|
|
6944
6944
|
};
|
|
6945
6945
|
|
|
6946
|
-
const _sfc_main$
|
|
6946
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
6947
6947
|
...{
|
|
6948
6948
|
name: "MEditorCodeBlockList"
|
|
6949
6949
|
},
|
|
@@ -7025,7 +7025,7 @@
|
|
|
7025
7025
|
filter: filterTextChangeHandler
|
|
7026
7026
|
});
|
|
7027
7027
|
return (_ctx, _cache) => {
|
|
7028
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7028
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$n, {
|
|
7029
7029
|
data: codeList.value,
|
|
7030
7030
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
7031
7031
|
onNodeClick: clickHandler
|
|
@@ -7047,7 +7047,7 @@
|
|
|
7047
7047
|
placement: "bottom"
|
|
7048
7048
|
}, {
|
|
7049
7049
|
default: vue.withCtx(() => [
|
|
7050
|
-
vue.createVNode(_sfc_main$
|
|
7050
|
+
vue.createVNode(_sfc_main$O, {
|
|
7051
7051
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
7052
7052
|
class: "edit-icon",
|
|
7053
7053
|
onClick: vue.withModifiers(($event) => editCode(`${data.key}`), ["stop"])
|
|
@@ -7062,7 +7062,7 @@
|
|
|
7062
7062
|
placement: "bottom"
|
|
7063
7063
|
}, {
|
|
7064
7064
|
default: vue.withCtx(() => [
|
|
7065
|
-
vue.createVNode(_sfc_main$
|
|
7065
|
+
vue.createVNode(_sfc_main$O, {
|
|
7066
7066
|
icon: vue.unref(iconsVue.Close),
|
|
7067
7067
|
class: "edit-icon",
|
|
7068
7068
|
onClick: vue.withModifiers(($event) => deleteCode(`${data.key}`), ["stop"])
|
|
@@ -7082,7 +7082,7 @@
|
|
|
7082
7082
|
});
|
|
7083
7083
|
|
|
7084
7084
|
const _hoisted_1$8 = { class: "search-wrapper" };
|
|
7085
|
-
const _sfc_main$
|
|
7085
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
7086
7086
|
...{
|
|
7087
7087
|
name: "MEditorCodeBlockListPanel"
|
|
7088
7088
|
},
|
|
@@ -7105,7 +7105,7 @@
|
|
|
7105
7105
|
default: vue.withCtx(() => [
|
|
7106
7106
|
vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
7107
7107
|
vue.createElementVNode("div", _hoisted_1$8, [
|
|
7108
|
-
vue.createVNode(_sfc_main$
|
|
7108
|
+
vue.createVNode(_sfc_main$p, { onSearch: filterTextChangeHandler }),
|
|
7109
7109
|
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
|
|
7110
7110
|
key: 0,
|
|
7111
7111
|
class: "create-code-button",
|
|
@@ -7121,7 +7121,7 @@
|
|
|
7121
7121
|
vue.renderSlot(_ctx.$slots, "code-block-panel-search")
|
|
7122
7122
|
])
|
|
7123
7123
|
]),
|
|
7124
|
-
vue.createVNode(_sfc_main$
|
|
7124
|
+
vue.createVNode(_sfc_main$m, {
|
|
7125
7125
|
ref_key: "codeBlockList",
|
|
7126
7126
|
ref: codeBlockList,
|
|
7127
7127
|
"custom-error": _ctx.customError,
|
|
@@ -7139,7 +7139,7 @@
|
|
|
7139
7139
|
]),
|
|
7140
7140
|
_: 3
|
|
7141
7141
|
}),
|
|
7142
|
-
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7142
|
+
vue.unref(codeConfig) ? (vue.openBlock(), vue.createBlock(_sfc_main$Q, {
|
|
7143
7143
|
key: 0,
|
|
7144
7144
|
ref_key: "codeBlockEditor",
|
|
7145
7145
|
ref: codeBlockEditor,
|
|
@@ -7153,7 +7153,7 @@
|
|
|
7153
7153
|
}
|
|
7154
7154
|
});
|
|
7155
7155
|
|
|
7156
|
-
const _sfc_main$
|
|
7156
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
7157
7157
|
...{
|
|
7158
7158
|
name: "MEditorDataSourceConfigPanel"
|
|
7159
7159
|
},
|
|
@@ -7209,7 +7209,7 @@
|
|
|
7209
7209
|
}
|
|
7210
7210
|
});
|
|
7211
7211
|
|
|
7212
|
-
const _sfc_main$
|
|
7212
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
7213
7213
|
...{
|
|
7214
7214
|
name: "MEditorDataSourceList"
|
|
7215
7215
|
},
|
|
@@ -7298,7 +7298,7 @@
|
|
|
7298
7298
|
filter: filterTextChangeHandler
|
|
7299
7299
|
});
|
|
7300
7300
|
return (_ctx, _cache) => {
|
|
7301
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7301
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$n, {
|
|
7302
7302
|
data: list.value,
|
|
7303
7303
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
7304
7304
|
onNodeClick: clickHandler
|
|
@@ -7320,7 +7320,7 @@
|
|
|
7320
7320
|
placement: "bottom"
|
|
7321
7321
|
}, {
|
|
7322
7322
|
default: vue.withCtx(() => [
|
|
7323
|
-
vue.createVNode(_sfc_main$
|
|
7323
|
+
vue.createVNode(_sfc_main$O, {
|
|
7324
7324
|
icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
|
|
7325
7325
|
class: "edit-icon",
|
|
7326
7326
|
onClick: vue.withModifiers(($event) => editHandler(`${data.key}`), ["stop"])
|
|
@@ -7335,7 +7335,7 @@
|
|
|
7335
7335
|
placement: "bottom"
|
|
7336
7336
|
}, {
|
|
7337
7337
|
default: vue.withCtx(() => [
|
|
7338
|
-
vue.createVNode(_sfc_main$
|
|
7338
|
+
vue.createVNode(_sfc_main$O, {
|
|
7339
7339
|
icon: vue.unref(iconsVue.Close),
|
|
7340
7340
|
class: "edit-icon",
|
|
7341
7341
|
onClick: vue.withModifiers(($event) => removeHandler(`${data.key}`), ["stop"])
|
|
@@ -7353,7 +7353,7 @@
|
|
|
7353
7353
|
|
|
7354
7354
|
const _hoisted_1$7 = { class: "search-wrapper" };
|
|
7355
7355
|
const _hoisted_2$5 = { class: "data-source-list-panel-add-menu" };
|
|
7356
|
-
const _sfc_main$
|
|
7356
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
7357
7357
|
...{
|
|
7358
7358
|
name: "MEditorDataSourceListPanel"
|
|
7359
7359
|
},
|
|
@@ -7418,7 +7418,7 @@
|
|
|
7418
7418
|
vue.createVNode(vue.unref(design.TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
|
|
7419
7419
|
default: vue.withCtx(() => [
|
|
7420
7420
|
vue.createElementVNode("div", _hoisted_1$7, [
|
|
7421
|
-
vue.createVNode(_sfc_main$
|
|
7421
|
+
vue.createVNode(_sfc_main$p, { onSearch: filterTextChangeHandler }),
|
|
7422
7422
|
editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicPopover), {
|
|
7423
7423
|
key: 0,
|
|
7424
7424
|
placement: "right"
|
|
@@ -7437,7 +7437,7 @@
|
|
|
7437
7437
|
default: vue.withCtx(() => [
|
|
7438
7438
|
vue.createElementVNode("div", _hoisted_2$5, [
|
|
7439
7439
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(datasourceTypeList.value, (item, index) => {
|
|
7440
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7440
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
7441
7441
|
data: {
|
|
7442
7442
|
type: "button",
|
|
7443
7443
|
text: item.text,
|
|
@@ -7453,14 +7453,14 @@
|
|
|
7453
7453
|
_: 1
|
|
7454
7454
|
})) : vue.createCommentVNode("", true)
|
|
7455
7455
|
]),
|
|
7456
|
-
vue.createVNode(_sfc_main$
|
|
7456
|
+
vue.createVNode(_sfc_main$j, {
|
|
7457
7457
|
onEdit: editHandler,
|
|
7458
7458
|
onRemove: removeHandler
|
|
7459
7459
|
})
|
|
7460
7460
|
]),
|
|
7461
7461
|
_: 1
|
|
7462
7462
|
}),
|
|
7463
|
-
vue.createVNode(_sfc_main$
|
|
7463
|
+
vue.createVNode(_sfc_main$k, {
|
|
7464
7464
|
ref_key: "editDialog",
|
|
7465
7465
|
ref: editDialog,
|
|
7466
7466
|
disabled: !editable.value,
|
|
@@ -7474,7 +7474,7 @@
|
|
|
7474
7474
|
}
|
|
7475
7475
|
});
|
|
7476
7476
|
|
|
7477
|
-
const _sfc_main$
|
|
7477
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
7478
7478
|
...{
|
|
7479
7479
|
name: "MEditorContentMenu"
|
|
7480
7480
|
},
|
|
@@ -7605,7 +7605,7 @@
|
|
|
7605
7605
|
vue.renderSlot(_ctx.$slots, "title"),
|
|
7606
7606
|
vue.createElementVNode("div", null, [
|
|
7607
7607
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuData, (item, index) => {
|
|
7608
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7608
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, {
|
|
7609
7609
|
"event-type": "mouseup",
|
|
7610
7610
|
ref_for: true,
|
|
7611
7611
|
ref_key: "buttons",
|
|
@@ -7660,7 +7660,7 @@
|
|
|
7660
7660
|
_hoisted_2$4,
|
|
7661
7661
|
_hoisted_3$2
|
|
7662
7662
|
];
|
|
7663
|
-
const _sfc_main$
|
|
7663
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
7664
7664
|
...{
|
|
7665
7665
|
name: "MEditorFolderMinusIcon"
|
|
7666
7666
|
},
|
|
@@ -7745,7 +7745,7 @@
|
|
|
7745
7745
|
};
|
|
7746
7746
|
};
|
|
7747
7747
|
|
|
7748
|
-
const _sfc_main$
|
|
7748
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
7749
7749
|
...{
|
|
7750
7750
|
name: "MEditorLayerMenu"
|
|
7751
7751
|
},
|
|
@@ -7812,7 +7812,7 @@
|
|
|
7812
7812
|
{
|
|
7813
7813
|
type: "button",
|
|
7814
7814
|
text: "全部折叠",
|
|
7815
|
-
icon: _sfc_main$
|
|
7815
|
+
icon: _sfc_main$g,
|
|
7816
7816
|
display: () => utils.isPage(node.value) || utils.isPageFragment(node.value),
|
|
7817
7817
|
handler: () => {
|
|
7818
7818
|
emit("collapse-all");
|
|
@@ -7841,7 +7841,7 @@
|
|
|
7841
7841
|
show
|
|
7842
7842
|
});
|
|
7843
7843
|
return (_ctx, _cache) => {
|
|
7844
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7844
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$h, {
|
|
7845
7845
|
"menu-data": menuData.value,
|
|
7846
7846
|
ref_key: "menu",
|
|
7847
7847
|
ref: menu,
|
|
@@ -7851,7 +7851,7 @@
|
|
|
7851
7851
|
}
|
|
7852
7852
|
});
|
|
7853
7853
|
|
|
7854
|
-
const _sfc_main$
|
|
7854
|
+
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
7855
7855
|
__name: "LayerNodeTool",
|
|
7856
7856
|
props: {
|
|
7857
7857
|
data: {}
|
|
@@ -7870,12 +7870,12 @@
|
|
|
7870
7870
|
};
|
|
7871
7871
|
return (_ctx, _cache) => {
|
|
7872
7872
|
return _ctx.data.type !== "page" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
7873
|
-
_ctx.data.visible === false ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7873
|
+
_ctx.data.visible === false ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
7874
7874
|
key: 0,
|
|
7875
7875
|
icon: vue.unref(iconsVue.Hide),
|
|
7876
7876
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => setNodeVisible(true), ["stop"])),
|
|
7877
7877
|
title: "点击显示"
|
|
7878
|
-
}, null, 8, ["icon"])) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7878
|
+
}, null, 8, ["icon"])) : (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
7879
7879
|
key: 1,
|
|
7880
7880
|
icon: vue.unref(iconsVue.View),
|
|
7881
7881
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => setNodeVisible(false), ["stop"])),
|
|
@@ -8327,7 +8327,7 @@
|
|
|
8327
8327
|
};
|
|
8328
8328
|
};
|
|
8329
8329
|
|
|
8330
|
-
const _sfc_main$
|
|
8330
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
8331
8331
|
...{
|
|
8332
8332
|
name: "MEditorLayerPanel"
|
|
8333
8333
|
},
|
|
@@ -8376,8 +8376,8 @@
|
|
|
8376
8376
|
return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "m-editor-layer-panel" }, {
|
|
8377
8377
|
default: vue.withCtx(() => [
|
|
8378
8378
|
vue.renderSlot(_ctx.$slots, "layer-panel-header"),
|
|
8379
|
-
vue.createVNode(_sfc_main$
|
|
8380
|
-
page.value && vue.unref(nodeStatusMap) ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8379
|
+
vue.createVNode(_sfc_main$p, { onSearch: vue.unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
|
|
8380
|
+
page.value && vue.unref(nodeStatusMap) ? (vue.openBlock(), vue.createBlock(_sfc_main$n, {
|
|
8381
8381
|
key: 0,
|
|
8382
8382
|
tabindex: "-1",
|
|
8383
8383
|
ref_key: "tree",
|
|
@@ -8397,7 +8397,7 @@
|
|
|
8397
8397
|
]),
|
|
8398
8398
|
"tree-node-tool": vue.withCtx(({ data: nodeData2 }) => [
|
|
8399
8399
|
vue.renderSlot(_ctx.$slots, "layer-node-tool", { data: nodeData2 }, () => [
|
|
8400
|
-
vue.createVNode(_sfc_main$
|
|
8400
|
+
vue.createVNode(_sfc_main$e, { data: nodeData2 }, null, 8, ["data"])
|
|
8401
8401
|
])
|
|
8402
8402
|
]),
|
|
8403
8403
|
"tree-node-label": vue.withCtx(({ data: nodeData2 }) => [
|
|
@@ -8406,7 +8406,7 @@
|
|
|
8406
8406
|
_: 3
|
|
8407
8407
|
}, 8, ["data", "node-status-map", "onNodeDragover", "onNodeDragstart", "onNodeDragleave", "onNodeDragend", "onNodeContextmenu", "onNodeMouseenter", "onNodeClick"])) : vue.createCommentVNode("", true),
|
|
8408
8408
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
8409
|
-
vue.createVNode(_sfc_main$
|
|
8409
|
+
vue.createVNode(_sfc_main$f, {
|
|
8410
8410
|
ref_key: "menu",
|
|
8411
8411
|
ref: menu,
|
|
8412
8412
|
"layer-content-menu": _ctx.layerContentMenu,
|
|
@@ -8423,7 +8423,7 @@
|
|
|
8423
8423
|
|
|
8424
8424
|
const _hoisted_1$5 = ["onClick", "onDragstart"];
|
|
8425
8425
|
const _hoisted_2$3 = ["title"];
|
|
8426
|
-
const _sfc_main$
|
|
8426
|
+
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
8427
8427
|
...{
|
|
8428
8428
|
name: "MEditorComponentListPanel"
|
|
8429
8429
|
},
|
|
@@ -8503,7 +8503,7 @@
|
|
|
8503
8503
|
"model-value": collapseValue.value
|
|
8504
8504
|
}, {
|
|
8505
8505
|
default: vue.withCtx(() => [
|
|
8506
|
-
vue.createVNode(_sfc_main$
|
|
8506
|
+
vue.createVNode(_sfc_main$p, { onSearch: filterTextChangeHandler }),
|
|
8507
8507
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (group, index) => {
|
|
8508
8508
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
8509
8509
|
group.items && group.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCollapseItem), {
|
|
@@ -8511,7 +8511,7 @@
|
|
|
8511
8511
|
name: `${index}`
|
|
8512
8512
|
}, {
|
|
8513
8513
|
title: vue.withCtx(() => [
|
|
8514
|
-
vue.createVNode(_sfc_main$
|
|
8514
|
+
vue.createVNode(_sfc_main$O, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
|
|
8515
8515
|
vue.createTextVNode(vue.toDisplayString(group.title), 1)
|
|
8516
8516
|
]),
|
|
8517
8517
|
default: vue.withCtx(() => [
|
|
@@ -8532,7 +8532,7 @@
|
|
|
8532
8532
|
content: item.desc
|
|
8533
8533
|
}, {
|
|
8534
8534
|
default: vue.withCtx(() => [
|
|
8535
|
-
vue.createVNode(_sfc_main$
|
|
8535
|
+
vue.createVNode(_sfc_main$O, {
|
|
8536
8536
|
icon: item.icon
|
|
8537
8537
|
}, null, 8, ["icon"])
|
|
8538
8538
|
]),
|
|
@@ -8572,7 +8572,7 @@
|
|
|
8572
8572
|
const _hoisted_5$1 = { class: "m-editor-float-box-list" };
|
|
8573
8573
|
const _hoisted_6 = ["onClick"];
|
|
8574
8574
|
const _hoisted_7 = { class: "m-editor-float-box-body" };
|
|
8575
|
-
const _sfc_main$
|
|
8575
|
+
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
8576
8576
|
...{
|
|
8577
8577
|
name: "MEditorSidebar"
|
|
8578
8578
|
},
|
|
@@ -8593,7 +8593,7 @@
|
|
|
8593
8593
|
type: "component",
|
|
8594
8594
|
icon: iconsVue.Goods,
|
|
8595
8595
|
text: "组件",
|
|
8596
|
-
component: _sfc_main$
|
|
8596
|
+
component: _sfc_main$c,
|
|
8597
8597
|
slots: {}
|
|
8598
8598
|
},
|
|
8599
8599
|
layer: {
|
|
@@ -8605,7 +8605,7 @@
|
|
|
8605
8605
|
layerContentMenu: props.layerContentMenu,
|
|
8606
8606
|
customContentMenu: props.customContentMenu
|
|
8607
8607
|
},
|
|
8608
|
-
component: _sfc_main$
|
|
8608
|
+
component: _sfc_main$d,
|
|
8609
8609
|
slots: {}
|
|
8610
8610
|
},
|
|
8611
8611
|
"code-block": {
|
|
@@ -8613,7 +8613,7 @@
|
|
|
8613
8613
|
type: "component",
|
|
8614
8614
|
icon: iconsVue.EditPen,
|
|
8615
8615
|
text: "代码编辑",
|
|
8616
|
-
component: _sfc_main$
|
|
8616
|
+
component: _sfc_main$l,
|
|
8617
8617
|
slots: {},
|
|
8618
8618
|
boxComponentConfig: {
|
|
8619
8619
|
props: {
|
|
@@ -8626,7 +8626,7 @@
|
|
|
8626
8626
|
type: "component",
|
|
8627
8627
|
icon: iconsVue.Coin,
|
|
8628
8628
|
text: "数据源",
|
|
8629
|
-
component: _sfc_main$
|
|
8629
|
+
component: _sfc_main$i,
|
|
8630
8630
|
slots: {},
|
|
8631
8631
|
boxComponentConfig: {
|
|
8632
8632
|
props: {
|
|
@@ -8681,7 +8681,7 @@
|
|
|
8681
8681
|
(...args) => vue.unref(dragstartHandler) && vue.unref(dragstartHandler)(...args)),
|
|
8682
8682
|
onDragend: ($event) => vue.unref(dragendHandler)(config.$key, $event)
|
|
8683
8683
|
}, [
|
|
8684
|
-
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
8684
|
+
config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$O, {
|
|
8685
8685
|
key: 0,
|
|
8686
8686
|
icon: config.icon
|
|
8687
8687
|
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
@@ -8817,7 +8817,7 @@
|
|
|
8817
8817
|
onClick: ($event) => vue.unref(showFloatBox)(config.$key)
|
|
8818
8818
|
}, [
|
|
8819
8819
|
vue.createElementVNode("div", null, vue.toDisplayString(config.text), 1),
|
|
8820
|
-
vue.createVNode(_sfc_main$
|
|
8820
|
+
vue.createVNode(_sfc_main$O, {
|
|
8821
8821
|
class: "m-editor-float-box-close",
|
|
8822
8822
|
icon: vue.unref(iconsVue.Close),
|
|
8823
8823
|
onClick: vue.withModifiers(($event) => vue.unref(closeFloatBox)(config.$key), ["stop"])
|
|
@@ -8965,7 +8965,7 @@
|
|
|
8965
8965
|
};
|
|
8966
8966
|
}
|
|
8967
8967
|
|
|
8968
|
-
const _sfc_main$
|
|
8968
|
+
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
8969
8969
|
...{
|
|
8970
8970
|
name: "MEditorScrollBar"
|
|
8971
8971
|
},
|
|
@@ -9053,7 +9053,7 @@
|
|
|
9053
9053
|
}
|
|
9054
9054
|
});
|
|
9055
9055
|
|
|
9056
|
-
const _sfc_main$
|
|
9056
|
+
const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
|
|
9057
9057
|
...{
|
|
9058
9058
|
name: "MEditorScrollViewer"
|
|
9059
9059
|
},
|
|
@@ -9139,14 +9139,15 @@
|
|
|
9139
9139
|
}, [
|
|
9140
9140
|
vue.renderSlot(_ctx.$slots, "default")
|
|
9141
9141
|
], 4),
|
|
9142
|
-
|
|
9142
|
+
vue.renderSlot(_ctx.$slots, "content"),
|
|
9143
|
+
scrollHeight.value > _ctx.wrapHeight ? (vue.openBlock(), vue.createBlock(_sfc_main$a, {
|
|
9143
9144
|
key: 0,
|
|
9144
9145
|
"scroll-size": scrollHeight.value,
|
|
9145
|
-
size: _ctx.wrapHeight,
|
|
9146
9146
|
pos: vOffset.value,
|
|
9147
|
+
size: _ctx.wrapHeight,
|
|
9147
9148
|
onScroll: vScrollHandler
|
|
9148
|
-
}, null, 8, ["scroll-size", "
|
|
9149
|
-
scrollWidth.value > _ctx.wrapWidth ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9149
|
+
}, null, 8, ["scroll-size", "pos", "size"])) : vue.createCommentVNode("", true),
|
|
9150
|
+
scrollWidth.value > _ctx.wrapWidth ? (vue.openBlock(), vue.createBlock(_sfc_main$a, {
|
|
9150
9151
|
key: 1,
|
|
9151
9152
|
"is-horizontal": true,
|
|
9152
9153
|
"scroll-size": scrollWidth.value,
|
|
@@ -9361,7 +9362,7 @@
|
|
|
9361
9362
|
};
|
|
9362
9363
|
|
|
9363
9364
|
const _hoisted_1$3 = { class: "m-editor-float-box-body" };
|
|
9364
|
-
const _sfc_main$
|
|
9365
|
+
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
9365
9366
|
__name: "FloatingBox",
|
|
9366
9367
|
props: {
|
|
9367
9368
|
visible: { type: Boolean, default: false },
|
|
@@ -9470,7 +9471,7 @@
|
|
|
9470
9471
|
}
|
|
9471
9472
|
});
|
|
9472
9473
|
|
|
9473
|
-
const _sfc_main$
|
|
9474
|
+
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
9474
9475
|
__name: "NodeListMenu",
|
|
9475
9476
|
setup(__props) {
|
|
9476
9477
|
const services = vue.inject("services");
|
|
@@ -9552,7 +9553,7 @@
|
|
|
9552
9553
|
]),
|
|
9553
9554
|
_: 1
|
|
9554
9555
|
})) : vue.createCommentVNode("", true),
|
|
9555
|
-
page.value && vue.unref(nodeStatusMap) && buttonVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9556
|
+
page.value && vue.unref(nodeStatusMap) && buttonVisible.value ? (vue.openBlock(), vue.createBlock(_sfc_main$8, {
|
|
9556
9557
|
key: 1,
|
|
9557
9558
|
ref_key: "box",
|
|
9558
9559
|
ref: box,
|
|
@@ -9562,7 +9563,7 @@
|
|
|
9562
9563
|
position: menuPosition.value
|
|
9563
9564
|
}, {
|
|
9564
9565
|
body: vue.withCtx(() => [
|
|
9565
|
-
vue.createVNode(_sfc_main$
|
|
9566
|
+
vue.createVNode(_sfc_main$n, {
|
|
9566
9567
|
class: "m-editor-node-list-menu magic-editor-layer-tree",
|
|
9567
9568
|
data: nodeData.value,
|
|
9568
9569
|
"node-status-map": vue.unref(nodeStatusMap),
|
|
@@ -9576,6 +9577,157 @@
|
|
|
9576
9577
|
}
|
|
9577
9578
|
});
|
|
9578
9579
|
|
|
9580
|
+
const useStageOverlay = () => {
|
|
9581
|
+
const services = vue.inject("services");
|
|
9582
|
+
const stageOptions = vue.inject("stageOptions");
|
|
9583
|
+
const wrapWidth = vue.ref(0);
|
|
9584
|
+
const wrapHeight = vue.ref(0);
|
|
9585
|
+
const stageOverlayVisible = vue.ref(false);
|
|
9586
|
+
const stageOverlay = vue.ref();
|
|
9587
|
+
const stage = vue.computed(() => services?.editorService.get("stage"));
|
|
9588
|
+
let subStage = null;
|
|
9589
|
+
const div = document.createElement("div");
|
|
9590
|
+
let selectEl = null;
|
|
9591
|
+
const render = () => {
|
|
9592
|
+
if (!selectEl)
|
|
9593
|
+
return;
|
|
9594
|
+
const content = selectEl.cloneNode(true);
|
|
9595
|
+
content.style.position = "static";
|
|
9596
|
+
Array.from(div.children).forEach((element) => {
|
|
9597
|
+
element.remove();
|
|
9598
|
+
});
|
|
9599
|
+
div.appendChild(content);
|
|
9600
|
+
subStage?.renderer.contentWindow?.magic.onPageElUpdate(div);
|
|
9601
|
+
subStage?.select(content);
|
|
9602
|
+
};
|
|
9603
|
+
const copyDocumentElement = () => {
|
|
9604
|
+
const doc = subStage?.renderer.getDocument();
|
|
9605
|
+
const documentElement = stage.value?.renderer.getDocument()?.documentElement;
|
|
9606
|
+
if (doc && documentElement) {
|
|
9607
|
+
doc.replaceChild(documentElement.cloneNode(true), doc.documentElement);
|
|
9608
|
+
}
|
|
9609
|
+
};
|
|
9610
|
+
const updateOverlay = () => {
|
|
9611
|
+
if (!selectEl)
|
|
9612
|
+
return;
|
|
9613
|
+
const { scrollWidth, scrollHeight } = selectEl;
|
|
9614
|
+
stageOverlay.value.style.width = `${scrollWidth}px`;
|
|
9615
|
+
stageOverlay.value.style.height = `${scrollHeight}px`;
|
|
9616
|
+
wrapWidth.value = scrollWidth;
|
|
9617
|
+
wrapHeight.value = scrollHeight;
|
|
9618
|
+
};
|
|
9619
|
+
const updateHandler = () => {
|
|
9620
|
+
render();
|
|
9621
|
+
updateOverlay();
|
|
9622
|
+
};
|
|
9623
|
+
const addHandler = () => {
|
|
9624
|
+
render();
|
|
9625
|
+
updateOverlay();
|
|
9626
|
+
};
|
|
9627
|
+
const removeHandler = () => {
|
|
9628
|
+
render();
|
|
9629
|
+
updateOverlay();
|
|
9630
|
+
};
|
|
9631
|
+
const openOverlay = async (el) => {
|
|
9632
|
+
selectEl = el;
|
|
9633
|
+
stageOverlayVisible.value = true;
|
|
9634
|
+
if (!stageOverlay.value) {
|
|
9635
|
+
await vue.nextTick();
|
|
9636
|
+
}
|
|
9637
|
+
if (!stageOptions) {
|
|
9638
|
+
return;
|
|
9639
|
+
}
|
|
9640
|
+
subStage = useStage({
|
|
9641
|
+
...stageOptions,
|
|
9642
|
+
runtimeUrl: "",
|
|
9643
|
+
autoScrollIntoView: false,
|
|
9644
|
+
render(stage2) {
|
|
9645
|
+
copyDocumentElement();
|
|
9646
|
+
const rootEl = stage2.renderer.getDocument()?.getElementById("app");
|
|
9647
|
+
if (rootEl) {
|
|
9648
|
+
rootEl.remove();
|
|
9649
|
+
}
|
|
9650
|
+
div.style.cssText = `
|
|
9651
|
+
width: ${el.scrollWidth}px;
|
|
9652
|
+
height: ${el.scrollHeight}px;
|
|
9653
|
+
background-color: #fff;
|
|
9654
|
+
`;
|
|
9655
|
+
render();
|
|
9656
|
+
return div;
|
|
9657
|
+
}
|
|
9658
|
+
});
|
|
9659
|
+
subStage.mount(stageOverlay.value);
|
|
9660
|
+
const { mask, renderer } = subStage;
|
|
9661
|
+
const { contentWindow } = renderer;
|
|
9662
|
+
mask.showRule(false);
|
|
9663
|
+
updateOverlay();
|
|
9664
|
+
contentWindow?.magic.onRuntimeReady({});
|
|
9665
|
+
services?.editorService.on("update", updateHandler);
|
|
9666
|
+
services?.editorService.on("add", addHandler);
|
|
9667
|
+
services?.editorService.on("remove", removeHandler);
|
|
9668
|
+
};
|
|
9669
|
+
const closeOverlay = () => {
|
|
9670
|
+
stageOverlayVisible.value = false;
|
|
9671
|
+
subStage?.destroy();
|
|
9672
|
+
subStage = null;
|
|
9673
|
+
services?.editorService.off("update", updateHandler);
|
|
9674
|
+
services?.editorService.off("add", addHandler);
|
|
9675
|
+
services?.editorService.off("remove", removeHandler);
|
|
9676
|
+
};
|
|
9677
|
+
vue.watch(stage, (stage2) => {
|
|
9678
|
+
if (stage2) {
|
|
9679
|
+
stage2.on("dblclick", async (event) => {
|
|
9680
|
+
const el = await stage2.actionManager.getElementFromPoint(event);
|
|
9681
|
+
if (el) {
|
|
9682
|
+
openOverlay(el);
|
|
9683
|
+
}
|
|
9684
|
+
});
|
|
9685
|
+
} else if (subStage) {
|
|
9686
|
+
closeOverlay();
|
|
9687
|
+
}
|
|
9688
|
+
});
|
|
9689
|
+
return {
|
|
9690
|
+
wrapWidth,
|
|
9691
|
+
wrapHeight,
|
|
9692
|
+
stageOverlayVisible,
|
|
9693
|
+
stageOverlay,
|
|
9694
|
+
closeOverlay
|
|
9695
|
+
};
|
|
9696
|
+
};
|
|
9697
|
+
|
|
9698
|
+
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
9699
|
+
__name: "StageOverlay",
|
|
9700
|
+
setup(__props) {
|
|
9701
|
+
const { stageOverlayVisible, stageOverlay, closeOverlay } = useStageOverlay();
|
|
9702
|
+
return (_ctx, _cache) => {
|
|
9703
|
+
return vue.unref(stageOverlayVisible) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
9704
|
+
key: 0,
|
|
9705
|
+
class: "m-editor-stage-overlay",
|
|
9706
|
+
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
9707
|
+
(...args) => vue.unref(closeOverlay) && vue.unref(closeOverlay)(...args))
|
|
9708
|
+
}, [
|
|
9709
|
+
vue.createVNode(vue.unref(design.TMagicIcon), {
|
|
9710
|
+
class: "m-editor-stage-overlay-close",
|
|
9711
|
+
size: 20,
|
|
9712
|
+
onClick: vue.unref(closeOverlay)
|
|
9713
|
+
}, {
|
|
9714
|
+
default: vue.withCtx(() => [
|
|
9715
|
+
vue.createVNode(vue.unref(iconsVue.CloseBold))
|
|
9716
|
+
]),
|
|
9717
|
+
_: 1
|
|
9718
|
+
}, 8, ["onClick"]),
|
|
9719
|
+
vue.createElementVNode("div", {
|
|
9720
|
+
ref_key: "stageOverlay",
|
|
9721
|
+
ref: stageOverlay,
|
|
9722
|
+
class: "m-editor-stage-overlay-container",
|
|
9723
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
9724
|
+
}, ["stop"]))
|
|
9725
|
+
}, null, 512)
|
|
9726
|
+
])) : vue.createCommentVNode("", true);
|
|
9727
|
+
};
|
|
9728
|
+
}
|
|
9729
|
+
});
|
|
9730
|
+
|
|
9579
9731
|
const _hoisted_1$2 = {
|
|
9580
9732
|
viewBox: "0 0 24 24",
|
|
9581
9733
|
fill: "none",
|
|
@@ -9741,7 +9893,7 @@
|
|
|
9741
9893
|
};
|
|
9742
9894
|
__expose({ show });
|
|
9743
9895
|
return (_ctx, _cache) => {
|
|
9744
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
9896
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$h, {
|
|
9745
9897
|
"menu-data": menuData.value,
|
|
9746
9898
|
ref_key: "menu",
|
|
9747
9899
|
ref: menu
|
|
@@ -9787,10 +9939,11 @@
|
|
|
9787
9939
|
stageWrap.value?.container?.focus();
|
|
9788
9940
|
});
|
|
9789
9941
|
services?.editorService.set("stage", vue.markRaw(stage));
|
|
9790
|
-
stage
|
|
9791
|
-
if (!node.value?.id)
|
|
9942
|
+
stage.mount(stageContainer.value);
|
|
9943
|
+
if (!node.value?.id) {
|
|
9792
9944
|
return;
|
|
9793
|
-
|
|
9945
|
+
}
|
|
9946
|
+
stage.on("runtime-ready", (rt) => {
|
|
9794
9947
|
runtime = rt;
|
|
9795
9948
|
root.value && runtime?.updateRootConfig?.(lodashEs.cloneDeep(vue.toRaw(root.value)));
|
|
9796
9949
|
page.value?.id && runtime?.updatePageId?.(page.value.id);
|
|
@@ -9885,8 +10038,8 @@
|
|
|
9885
10038
|
left = e.clientX - containerRect.left + scrollLeft;
|
|
9886
10039
|
if (parentEl && doc) {
|
|
9887
10040
|
const { left: parentLeft, top: parentTop } = StageCore.getOffset(parentEl);
|
|
9888
|
-
left = left - StageCore.calcValueByFontsize(doc, parentLeft);
|
|
9889
|
-
top = top - StageCore.calcValueByFontsize(doc, parentTop);
|
|
10041
|
+
left = left - StageCore.calcValueByFontsize(doc, parentLeft) * zoom.value;
|
|
10042
|
+
top = top - StageCore.calcValueByFontsize(doc, parentTop) * zoom.value;
|
|
9890
10043
|
}
|
|
9891
10044
|
}
|
|
9892
10045
|
config.data.style = {
|
|
@@ -9900,7 +10053,7 @@
|
|
|
9900
10053
|
}
|
|
9901
10054
|
};
|
|
9902
10055
|
return (_ctx, _cache) => {
|
|
9903
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
10056
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$9, {
|
|
9904
10057
|
class: "m-editor-stage",
|
|
9905
10058
|
ref_key: "stageWrap",
|
|
9906
10059
|
ref: stageWrap,
|
|
@@ -9916,16 +10069,7 @@
|
|
|
9916
10069
|
},
|
|
9917
10070
|
onClick: _cache[0] || (_cache[0] = ($event) => stageWrap.value?.container?.focus())
|
|
9918
10071
|
}, {
|
|
9919
|
-
|
|
9920
|
-
vue.createElementVNode("div", {
|
|
9921
|
-
class: "m-editor-stage-container",
|
|
9922
|
-
ref_key: "stageContainer",
|
|
9923
|
-
ref: stageContainer,
|
|
9924
|
-
style: vue.normalizeStyle(`transform: scale(${zoom.value});`),
|
|
9925
|
-
onContextmenu: contextmenuHandler,
|
|
9926
|
-
onDrop: dropHandler,
|
|
9927
|
-
onDragover: dragoverHandler
|
|
9928
|
-
}, null, 36),
|
|
10072
|
+
content: vue.withCtx(() => [
|
|
9929
10073
|
vue.createVNode(_sfc_main$6),
|
|
9930
10074
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
9931
10075
|
vue.createVNode(_sfc_main$4, {
|
|
@@ -9937,6 +10081,18 @@
|
|
|
9937
10081
|
}, null, 8, ["is-multi-select", "stage-content-menu", "custom-content-menu"])
|
|
9938
10082
|
]))
|
|
9939
10083
|
]),
|
|
10084
|
+
default: vue.withCtx(() => [
|
|
10085
|
+
vue.createElementVNode("div", {
|
|
10086
|
+
class: "m-editor-stage-container",
|
|
10087
|
+
ref_key: "stageContainer",
|
|
10088
|
+
ref: stageContainer,
|
|
10089
|
+
style: vue.normalizeStyle(`transform: scale(${zoom.value});`),
|
|
10090
|
+
onContextmenu: contextmenuHandler,
|
|
10091
|
+
onDrop: dropHandler,
|
|
10092
|
+
onDragover: dragoverHandler
|
|
10093
|
+
}, null, 36),
|
|
10094
|
+
vue.createVNode(_sfc_main$7)
|
|
10095
|
+
]),
|
|
9940
10096
|
_: 1
|
|
9941
10097
|
}, 8, ["width", "height", "wrap-width", "wrap-height", "zoom"]);
|
|
9942
10098
|
};
|
|
@@ -10906,13 +11062,13 @@
|
|
|
10906
11062
|
);
|
|
10907
11063
|
__expose(services);
|
|
10908
11064
|
return (_ctx, _cache) => {
|
|
10909
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
11065
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$s, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
|
|
10910
11066
|
header: vue.withCtx(() => [
|
|
10911
11067
|
vue.renderSlot(_ctx.$slots, "header")
|
|
10912
11068
|
]),
|
|
10913
11069
|
nav: vue.withCtx(() => [
|
|
10914
11070
|
vue.renderSlot(_ctx.$slots, "nav", { editorService: vue.unref(editorService) }, () => [
|
|
10915
|
-
vue.createVNode(_sfc_main$
|
|
11071
|
+
vue.createVNode(_sfc_main$r, { data: _ctx.menu }, null, 8, ["data"])
|
|
10916
11072
|
])
|
|
10917
11073
|
]),
|
|
10918
11074
|
"content-before": vue.withCtx(() => [
|
|
@@ -10923,7 +11079,7 @@
|
|
|
10923
11079
|
]),
|
|
10924
11080
|
sidebar: vue.withCtx(() => [
|
|
10925
11081
|
vue.renderSlot(_ctx.$slots, "sidebar", { editorService: vue.unref(editorService) }, () => [
|
|
10926
|
-
vue.createVNode(_sfc_main$
|
|
11082
|
+
vue.createVNode(_sfc_main$b, {
|
|
10927
11083
|
data: _ctx.sidebar,
|
|
10928
11084
|
"layer-content-menu": _ctx.layerContentMenu,
|
|
10929
11085
|
"custom-content-menu": _ctx.customContentMenu
|
|
@@ -10980,7 +11136,7 @@
|
|
|
10980
11136
|
]),
|
|
10981
11137
|
"props-panel": vue.withCtx(() => [
|
|
10982
11138
|
vue.renderSlot(_ctx.$slots, "props-panel", {}, () => [
|
|
10983
|
-
vue.createVNode(_sfc_main$
|
|
11139
|
+
vue.createVNode(_sfc_main$q, {
|
|
10984
11140
|
"extend-state": _ctx.extendFormState,
|
|
10985
11141
|
onMounted: _cache[0] || (_cache[0] = (instance) => _ctx.$emit("props-panel-mounted", instance)),
|
|
10986
11142
|
onFormError: _cache[1] || (_cache[1] = (e) => _ctx.$emit("props-form-error", e)),
|
|
@@ -11027,22 +11183,22 @@
|
|
|
11027
11183
|
app.config.globalProperties.$TMAGIC_EDITOR = option;
|
|
11028
11184
|
setConfig(option);
|
|
11029
11185
|
app.component(_sfc_main.name, _sfc_main);
|
|
11030
|
-
app.component("m-fields-ui-select", _sfc_main$
|
|
11031
|
-
app.component("m-fields-code-link", _sfc_main$
|
|
11032
|
-
app.component("m-fields-vs-code", _sfc_main$
|
|
11033
|
-
app.component("magic-code-editor", _sfc_main$
|
|
11034
|
-
app.component("m-fields-code-select", _sfc_main$
|
|
11035
|
-
app.component("m-fields-code-select-col", _sfc_main$
|
|
11036
|
-
app.component("m-fields-event-select", _sfc_main$
|
|
11037
|
-
app.component("m-fields-data-source-fields", _sfc_main$
|
|
11038
|
-
app.component("m-fields-data-source-mocks", _sfc_main$
|
|
11039
|
-
app.component("m-fields-key-value", _sfc_main$
|
|
11040
|
-
app.component("m-fields-data-source-input", _sfc_main$
|
|
11041
|
-
app.component("m-fields-data-source-select", _sfc_main$
|
|
11042
|
-
app.component("m-fields-data-source-methods", _sfc_main$
|
|
11043
|
-
app.component("m-fields-data-source-method-select", _sfc_main$
|
|
11044
|
-
app.component("m-fields-data-source-field-select", _sfc_main$
|
|
11045
|
-
app.component("m-fields-page-fragment-select", _sfc_main$
|
|
11186
|
+
app.component("m-fields-ui-select", _sfc_main$B);
|
|
11187
|
+
app.component("m-fields-code-link", _sfc_main$S);
|
|
11188
|
+
app.component("m-fields-vs-code", _sfc_main$T);
|
|
11189
|
+
app.component("magic-code-editor", _sfc_main$U);
|
|
11190
|
+
app.component("m-fields-code-select", _sfc_main$R);
|
|
11191
|
+
app.component("m-fields-code-select-col", _sfc_main$N);
|
|
11192
|
+
app.component("m-fields-event-select", _sfc_main$F);
|
|
11193
|
+
app.component("m-fields-data-source-fields", _sfc_main$M);
|
|
11194
|
+
app.component("m-fields-data-source-mocks", _sfc_main$H);
|
|
11195
|
+
app.component("m-fields-key-value", _sfc_main$D);
|
|
11196
|
+
app.component("m-fields-data-source-input", _sfc_main$K);
|
|
11197
|
+
app.component("m-fields-data-source-select", _sfc_main$G);
|
|
11198
|
+
app.component("m-fields-data-source-methods", _sfc_main$J);
|
|
11199
|
+
app.component("m-fields-data-source-method-select", _sfc_main$I);
|
|
11200
|
+
app.component("m-fields-data-source-field-select", _sfc_main$L);
|
|
11201
|
+
app.component("m-fields-page-fragment-select", _sfc_main$C);
|
|
11046
11202
|
}
|
|
11047
11203
|
};
|
|
11048
11204
|
|
|
@@ -11052,41 +11208,41 @@
|
|
|
11052
11208
|
});
|
|
11053
11209
|
exports.CODE_DRAFT_STORAGE_KEY = CODE_DRAFT_STORAGE_KEY;
|
|
11054
11210
|
exports.COPY_STORAGE_KEY = COPY_STORAGE_KEY;
|
|
11055
|
-
exports.CodeBlockEditor = _sfc_main$
|
|
11056
|
-
exports.CodeBlockList = _sfc_main$
|
|
11057
|
-
exports.CodeBlockListPanel = _sfc_main$
|
|
11211
|
+
exports.CodeBlockEditor = _sfc_main$Q;
|
|
11212
|
+
exports.CodeBlockList = _sfc_main$m;
|
|
11213
|
+
exports.CodeBlockListPanel = _sfc_main$l;
|
|
11058
11214
|
exports.CodeDeleteErrorType = CodeDeleteErrorType;
|
|
11059
|
-
exports.CodeSelect = _sfc_main$
|
|
11060
|
-
exports.CodeSelectCol = _sfc_main$
|
|
11215
|
+
exports.CodeSelect = _sfc_main$R;
|
|
11216
|
+
exports.CodeSelectCol = _sfc_main$N;
|
|
11061
11217
|
exports.ColumnLayout = ColumnLayout;
|
|
11062
|
-
exports.ComponentListPanel = _sfc_main$
|
|
11063
|
-
exports.ContentMenu = _sfc_main$
|
|
11064
|
-
exports.DataSourceFieldSelect = _sfc_main$
|
|
11065
|
-
exports.DataSourceFields = _sfc_main$
|
|
11066
|
-
exports.DataSourceInput = _sfc_main$
|
|
11067
|
-
exports.DataSourceMethodSelect = _sfc_main$
|
|
11068
|
-
exports.DataSourceMethods = _sfc_main$
|
|
11069
|
-
exports.DataSourceMocks = _sfc_main$
|
|
11070
|
-
exports.DataSourceSelect = _sfc_main$
|
|
11218
|
+
exports.ComponentListPanel = _sfc_main$c;
|
|
11219
|
+
exports.ContentMenu = _sfc_main$h;
|
|
11220
|
+
exports.DataSourceFieldSelect = _sfc_main$L;
|
|
11221
|
+
exports.DataSourceFields = _sfc_main$M;
|
|
11222
|
+
exports.DataSourceInput = _sfc_main$K;
|
|
11223
|
+
exports.DataSourceMethodSelect = _sfc_main$I;
|
|
11224
|
+
exports.DataSourceMethods = _sfc_main$J;
|
|
11225
|
+
exports.DataSourceMocks = _sfc_main$H;
|
|
11226
|
+
exports.DataSourceSelect = _sfc_main$G;
|
|
11071
11227
|
exports.DragType = DragType;
|
|
11072
|
-
exports.EventSelect = _sfc_main$
|
|
11228
|
+
exports.EventSelect = _sfc_main$F;
|
|
11073
11229
|
exports.Fixed2Other = Fixed2Other;
|
|
11074
11230
|
exports.H_GUIDE_LINE_STORAGE_KEY = H_GUIDE_LINE_STORAGE_KEY;
|
|
11075
|
-
exports.Icon = _sfc_main$
|
|
11231
|
+
exports.Icon = _sfc_main$O;
|
|
11076
11232
|
exports.KeyBindingCommand = KeyBindingCommand;
|
|
11077
|
-
exports.KeyValue = _sfc_main$
|
|
11233
|
+
exports.KeyValue = _sfc_main$D;
|
|
11078
11234
|
exports.Keys = Keys;
|
|
11079
11235
|
exports.LayerOffset = LayerOffset;
|
|
11080
|
-
exports.LayerPanel = _sfc_main$
|
|
11236
|
+
exports.LayerPanel = _sfc_main$d;
|
|
11081
11237
|
exports.Layout = Layout;
|
|
11082
|
-
exports.LayoutContainer = _sfc_main$
|
|
11083
|
-
exports.PageFragmentSelect = _sfc_main$
|
|
11084
|
-
exports.PropsPanel = _sfc_main$
|
|
11085
|
-
exports.Resizer = _sfc_main$
|
|
11086
|
-
exports.SplitView = _sfc_main$
|
|
11087
|
-
exports.TMagicCodeEditor = _sfc_main$
|
|
11238
|
+
exports.LayoutContainer = _sfc_main$z;
|
|
11239
|
+
exports.PageFragmentSelect = _sfc_main$C;
|
|
11240
|
+
exports.PropsPanel = _sfc_main$q;
|
|
11241
|
+
exports.Resizer = _sfc_main$A;
|
|
11242
|
+
exports.SplitView = _sfc_main$z;
|
|
11243
|
+
exports.TMagicCodeEditor = _sfc_main$U;
|
|
11088
11244
|
exports.TMagicEditor = _sfc_main;
|
|
11089
|
-
exports.ToolButton = _sfc_main$
|
|
11245
|
+
exports.ToolButton = _sfc_main$y;
|
|
11090
11246
|
exports.UI_SELECT_MODE_EVENT_NAME = UI_SELECT_MODE_EVENT_NAME;
|
|
11091
11247
|
exports.V_GUIDE_LINE_STORAGE_KEY = V_GUIDE_LINE_STORAGE_KEY;
|
|
11092
11248
|
exports.advancedTabConfig = advancedTabConfig;
|
|
@@ -11143,4 +11299,3 @@
|
|
|
11143
11299
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
11144
11300
|
|
|
11145
11301
|
}));
|
|
11146
|
-
//# sourceMappingURL=tmagic-editor.umd.cjs.map
|