@tmagic/editor 1.3.0-alpha.3 → 1.3.0-alpha.5
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/tmagic-editor.js +35 -15
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +35 -15
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +10 -10
- package/src/Editor.vue +19 -1
- package/src/fields/CodeSelect.vue +2 -0
- package/src/fields/EventSelect.vue +1 -0
- package/src/layouts/CodeEditor.vue +2 -2
- package/src/layouts/Framework.vue +13 -17
- package/types/components/FunctionEditor.vue.d.ts +7 -7
- package/types/layouts/CodeEditor.vue.d.ts +6 -6
- package/types/layouts/Framework.vue.d.ts +7 -31
|
@@ -148,6 +148,8 @@
|
|
|
148
148
|
type: "group-list",
|
|
149
149
|
name: "hookData",
|
|
150
150
|
enableToggleMode: false,
|
|
151
|
+
expandAll: true,
|
|
152
|
+
titleKey: "codeId",
|
|
151
153
|
items: [
|
|
152
154
|
{
|
|
153
155
|
type: "code-select-col",
|
|
@@ -931,6 +933,7 @@
|
|
|
931
933
|
{
|
|
932
934
|
type: "group-list",
|
|
933
935
|
name: "actions",
|
|
936
|
+
expandAll: true,
|
|
934
937
|
enableToggleMode: false,
|
|
935
938
|
items: [actionTypeConfig.value, targetCompConfig.value, compActionConfig.value, codeActionConfig.value]
|
|
936
939
|
}
|
|
@@ -3433,10 +3436,8 @@
|
|
|
3433
3436
|
name: "MEditorFramework"
|
|
3434
3437
|
},
|
|
3435
3438
|
__name: "Framework",
|
|
3436
|
-
props: {
|
|
3437
|
-
codeOptions: { default: () => ({}) }
|
|
3438
|
-
},
|
|
3439
3439
|
setup(__props) {
|
|
3440
|
+
const codeOptions = vue.inject("codeOptions", {});
|
|
3440
3441
|
const { editorService, uiService } = vue.inject("services") || {};
|
|
3441
3442
|
const root = vue.computed(() => editorService?.get("root"));
|
|
3442
3443
|
const nodes = vue.computed(() => editorService?.get("nodes") || []);
|
|
@@ -3496,16 +3497,18 @@
|
|
|
3496
3497
|
}
|
|
3497
3498
|
};
|
|
3498
3499
|
return (_ctx, _cache) => {
|
|
3499
|
-
const _component_magic_code_editor = vue.resolveComponent("magic-code-editor");
|
|
3500
3500
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
|
|
3501
|
-
vue.renderSlot(_ctx.$slots, "
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3501
|
+
vue.renderSlot(_ctx.$slots, "header"),
|
|
3502
|
+
vue.renderSlot(_ctx.$slots, "nav"),
|
|
3503
|
+
vue.renderSlot(_ctx.$slots, "content-before"),
|
|
3504
|
+
showSrc.value ? vue.renderSlot(_ctx.$slots, "src-code", { key: 0 }, () => [
|
|
3505
|
+
vue.createVNode(_sfc_main$u, {
|
|
3506
|
+
class: "m-editor-content",
|
|
3507
|
+
"init-values": root.value,
|
|
3508
|
+
options: vue.unref(codeOptions),
|
|
3509
|
+
onSave: saveCode
|
|
3510
|
+
}, null, 8, ["init-values", "options"])
|
|
3511
|
+
]) : (vue.openBlock(), vue.createBlock(_sfc_main$s, {
|
|
3509
3512
|
key: 1,
|
|
3510
3513
|
class: "m-editor-content",
|
|
3511
3514
|
"left-class": "m-editor-framework-left",
|
|
@@ -3541,7 +3544,9 @@
|
|
|
3541
3544
|
]),
|
|
3542
3545
|
key: "0"
|
|
3543
3546
|
} : void 0
|
|
3544
|
-
]), 1032, ["left", "right"]))
|
|
3547
|
+
]), 1032, ["left", "right"])),
|
|
3548
|
+
vue.renderSlot(_ctx.$slots, "content-after"),
|
|
3549
|
+
vue.renderSlot(_ctx.$slots, "footer")
|
|
3545
3550
|
]);
|
|
3546
3551
|
};
|
|
3547
3552
|
}
|
|
@@ -7904,12 +7909,21 @@
|
|
|
7904
7909
|
const _component_Workspace = vue.resolveComponent("Workspace");
|
|
7905
7910
|
const _component_PropsPanel = vue.resolveComponent("PropsPanel");
|
|
7906
7911
|
const _component_Framework = vue.resolveComponent("Framework");
|
|
7907
|
-
return vue.openBlock(), vue.createBlock(_component_Framework,
|
|
7912
|
+
return vue.openBlock(), vue.createBlock(_component_Framework, null, {
|
|
7913
|
+
header: vue.withCtx(() => [
|
|
7914
|
+
vue.renderSlot(_ctx.$slots, "header")
|
|
7915
|
+
]),
|
|
7908
7916
|
nav: vue.withCtx(() => [
|
|
7909
7917
|
vue.renderSlot(_ctx.$slots, "nav", { editorService: _ctx.editorService }, () => [
|
|
7910
7918
|
vue.createVNode(_component_TMagicNavMenu, { data: _ctx.menu }, null, 8, ["data"])
|
|
7911
7919
|
])
|
|
7912
7920
|
]),
|
|
7921
|
+
"content-before": vue.withCtx(() => [
|
|
7922
|
+
vue.renderSlot(_ctx.$slots, "content-before")
|
|
7923
|
+
]),
|
|
7924
|
+
"src-code": vue.withCtx(() => [
|
|
7925
|
+
vue.renderSlot(_ctx.$slots, "src-code", { editorService: _ctx.editorService })
|
|
7926
|
+
]),
|
|
7913
7927
|
sidebar: vue.withCtx(() => [
|
|
7914
7928
|
vue.renderSlot(_ctx.$slots, "sidebar", { editorService: _ctx.editorService }, () => [
|
|
7915
7929
|
vue.createVNode(_component_Sidebar, {
|
|
@@ -7981,8 +7995,14 @@
|
|
|
7981
7995
|
empty: vue.withCtx(() => [
|
|
7982
7996
|
vue.renderSlot(_ctx.$slots, "empty", { editorService: _ctx.editorService })
|
|
7983
7997
|
]),
|
|
7998
|
+
"content-after": vue.withCtx(() => [
|
|
7999
|
+
vue.renderSlot(_ctx.$slots, "content-after")
|
|
8000
|
+
]),
|
|
8001
|
+
footer: vue.withCtx(() => [
|
|
8002
|
+
vue.renderSlot(_ctx.$slots, "footer")
|
|
8003
|
+
]),
|
|
7984
8004
|
_: 3
|
|
7985
|
-
}
|
|
8005
|
+
});
|
|
7986
8006
|
}
|
|
7987
8007
|
const Editor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
7988
8008
|
|