@tmagic/editor 1.4.0 → 1.4.2

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@element-plus/icons-vue'), require('lodash-es'), require('serialize-javascript'), require('@tmagic/design'), require('emmet-monaco-es'), require('monaco-editor'), require('@tmagic/schema'), require('@tmagic/form'), require('moveable'), require('@tmagic/table'), require('@tmagic/utils'), require('@tmagic/dep'), require('gesto'), require('@tmagic/stage'), require('events'), require('@tmagic/core'), require('keycon')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'vue', '@element-plus/icons-vue', 'lodash-es', 'serialize-javascript', '@tmagic/design', 'emmet-monaco-es', 'monaco-editor', '@tmagic/schema', '@tmagic/form', 'moveable', '@tmagic/table', '@tmagic/utils', '@tmagic/dep', 'gesto', '@tmagic/stage', 'events', '@tmagic/core', 'keycon'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicEditor = {}, global.Vue, global.iconsVue, global.lodashEs, global.serialize, global.design, global.emmetMonacoEs, global.monaco, global.schema, global.form, global.VanillaMoveable, global.table, global.utils, global.dep, global.Gesto, global.StageCore, global.events, global.core, global.KeyController));
5
- })(this, (function (exports, vue, iconsVue, lodashEs, serialize, design, emmetMonacoEs, monaco, schema, form, VanillaMoveable, table, utils, dep, Gesto, StageCore, events, core, KeyController) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('@element-plus/icons-vue'), require('lodash-es'), require('serialize-javascript'), require('@tmagic/design'), require('emmet-monaco-es'), require('monaco-editor'), require('@tmagic/form'), require('@tmagic/schema'), require('moveable'), require('@tmagic/table'), require('@tmagic/utils'), require('@tmagic/dep'), require('gesto'), require('@tmagic/stage'), require('events'), require('@tmagic/core'), require('keycon')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'vue', '@element-plus/icons-vue', 'lodash-es', 'serialize-javascript', '@tmagic/design', 'emmet-monaco-es', 'monaco-editor', '@tmagic/form', '@tmagic/schema', 'moveable', '@tmagic/table', '@tmagic/utils', '@tmagic/dep', 'gesto', '@tmagic/stage', 'events', '@tmagic/core', 'keycon'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TMagicEditor = {}, global.Vue, global.iconsVue, global.lodashEs, global.serialize, global.design, global.emmetMonacoEs, global.monaco, global.form, global.schema, global.VanillaMoveable, global.table, global.utils, global.dep, global.Gesto, global.StageCore, global.events, global.core, global.KeyController));
5
+ })(this, (function (exports, vue, iconsVue, lodashEs, serialize, design, emmetMonacoEs, monaco, form, schema, VanillaMoveable, table, utils, dep, Gesto, StageCore, events, core, KeyController) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
@@ -488,17 +488,20 @@
488
488
  emit("change", props.model[props.name]);
489
489
  };
490
490
  return (_ctx, _cache) => {
491
- const _component_m_form_container = vue.resolveComponent("m-form-container");
492
491
  return vue.openBlock(), vue.createElementBlock("div", {
493
492
  class: vue.normalizeClass(["m-fields-code-select", _ctx.config.className])
494
493
  }, [
495
494
  vue.createVNode(vue.unref(design.TMagicCard), null, {
496
495
  default: vue.withCtx(() => [
497
- vue.createVNode(_component_m_form_container, {
496
+ vue.createVNode(vue.unref(form.MContainer), {
498
497
  config: codeConfig.value,
498
+ size: _ctx.size,
499
+ prop: _ctx.prop,
500
+ disabled: _ctx.disabled,
501
+ lastValues: _ctx.lastValues,
499
502
  model: _ctx.model[_ctx.name],
500
503
  onChange: changeHandler
501
- }, null, 8, ["config", "model"])
504
+ }, null, 8, ["config", "size", "prop", "disabled", "lastValues", "model"])
502
505
  ]),
503
506
  _: 1
504
507
  })
@@ -3170,7 +3173,10 @@
3170
3173
  throw new Error(`获取不到id为${config.id}的节点`);
3171
3174
  const node = lodashEs.cloneDeep(vue.toRaw(info.node));
3172
3175
  let newConfig = await this.toggleFixedPosition(vue.toRaw(config), node, root);
3173
- newConfig = lodashEs.mergeWith(lodashEs.cloneDeep(node), newConfig, (objValue, srcValue) => {
3176
+ newConfig = lodashEs.mergeWith(lodashEs.cloneDeep(node), newConfig, (objValue, srcValue, key) => {
3177
+ if (typeof srcValue === "undefined" && Object.hasOwn(newConfig, key)) {
3178
+ return "";
3179
+ }
3174
3180
  if (lodashEs.isObject(srcValue) && Array.isArray(objValue)) {
3175
3181
  return srcValue;
3176
3182
  }
@@ -4598,8 +4604,115 @@
4598
4604
  }
4599
4605
  });
4600
4606
 
4601
- const _hoisted_1$o = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
4607
+ const useDataSourceEdit = (dataSourceService) => {
4608
+ const dialogTitle = vue.ref("");
4609
+ const editDialog = vue.ref();
4610
+ const dataSourceValues = vue.ref({});
4611
+ const editable = vue.computed(() => dataSourceService?.get("editable") ?? true);
4612
+ const editHandler = (id) => {
4613
+ if (!editDialog.value)
4614
+ return;
4615
+ dataSourceValues.value = {
4616
+ ...dataSourceService?.getDataSourceById(id)
4617
+ };
4618
+ dialogTitle.value = `编辑${dataSourceValues.value.title || ""}`;
4619
+ editDialog.value.show();
4620
+ };
4621
+ const submitDataSourceHandler = (value) => {
4622
+ if (value.id) {
4623
+ dataSourceService?.update(value);
4624
+ } else {
4625
+ dataSourceService?.add(value);
4626
+ }
4627
+ editDialog.value?.hide();
4628
+ };
4629
+ return {
4630
+ dialogTitle,
4631
+ editDialog,
4632
+ dataSourceValues,
4633
+ editable,
4634
+ editHandler,
4635
+ submitDataSourceHandler
4636
+ };
4637
+ };
4638
+
4602
4639
  const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
4640
+ ...{
4641
+ name: "MEditorDataSourceConfigPanel"
4642
+ },
4643
+ __name: "DataSourceConfigPanel",
4644
+ props: /* @__PURE__ */ vue.mergeModels({
4645
+ title: {},
4646
+ values: {},
4647
+ disabled: { type: Boolean }
4648
+ }, {
4649
+ "visible": { type: Boolean, ...{ default: false } },
4650
+ "visibleModifiers": {},
4651
+ "width": { default: 670 },
4652
+ "widthModifiers": {}
4653
+ }),
4654
+ emits: /* @__PURE__ */ vue.mergeModels(["submit"], ["update:visible", "update:width"]),
4655
+ setup(__props, { expose: __expose, emit: __emit }) {
4656
+ const props = __props;
4657
+ const boxVisible = vue.useModel(__props, "visible");
4658
+ const width = vue.useModel(__props, "width");
4659
+ const emit = __emit;
4660
+ const services = vue.inject("services");
4661
+ const initValues = vue.ref({});
4662
+ const dataSourceConfig = vue.ref([]);
4663
+ const { height: editorHeight } = useEditorContentHeight();
4664
+ const parentFloating = vue.inject("parentFloating", vue.ref(null));
4665
+ const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
4666
+ vue.watchEffect(() => {
4667
+ initValues.value = props.values;
4668
+ dataSourceConfig.value = services?.dataSourceService.getFormConfig(initValues.value.type) || [];
4669
+ });
4670
+ const submitHandler = (values) => {
4671
+ emit("submit", values);
4672
+ };
4673
+ const errorHandler = (error) => {
4674
+ design.tMagicMessage.error(error.message);
4675
+ };
4676
+ __expose({
4677
+ show() {
4678
+ calcBoxPosition();
4679
+ boxVisible.value = true;
4680
+ },
4681
+ hide() {
4682
+ boxVisible.value = false;
4683
+ }
4684
+ });
4685
+ return (_ctx, _cache) => {
4686
+ return vue.openBlock(), vue.createBlock(_sfc_main$P, {
4687
+ visible: boxVisible.value,
4688
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => boxVisible.value = $event),
4689
+ width: width.value,
4690
+ "onUpdate:width": _cache[1] || (_cache[1] = ($event) => width.value = $event),
4691
+ height: vue.unref(editorHeight),
4692
+ "onUpdate:height": _cache[2] || (_cache[2] = ($event) => vue.isRef(editorHeight) ? editorHeight.value = $event : null),
4693
+ title: _ctx.title,
4694
+ position: vue.unref(boxPosition)
4695
+ }, {
4696
+ body: vue.withCtx(() => [
4697
+ vue.createVNode(vue.unref(form.MFormBox), {
4698
+ "label-width": "80px",
4699
+ title: _ctx.title,
4700
+ config: dataSourceConfig.value,
4701
+ values: initValues.value,
4702
+ disabled: _ctx.disabled,
4703
+ style: { "height": "100%" },
4704
+ onSubmit: submitHandler,
4705
+ onError: errorHandler
4706
+ }, null, 8, ["title", "config", "values", "disabled"])
4707
+ ]),
4708
+ _: 1
4709
+ }, 8, ["visible", "width", "height", "title", "position"]);
4710
+ };
4711
+ }
4712
+ });
4713
+
4714
+ const _hoisted_1$o = { style: { "width": "100%", "display": "flex", "align-items": "center" } };
4715
+ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
4603
4716
  ...{
4604
4717
  name: "MFieldsDataSourceFieldSelect"
4605
4718
  },
@@ -4620,6 +4733,13 @@
4620
4733
  const services = vue.inject("services");
4621
4734
  const emit = __emit;
4622
4735
  const props = __props;
4736
+ const selectedDataSourceId = vue.computed(() => {
4737
+ const value = props.model[props.name];
4738
+ if (!Array.isArray(value) || !value.length) {
4739
+ return "";
4740
+ }
4741
+ return value[0].replace(utils.DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, "");
4742
+ });
4623
4743
  const dataSources = vue.computed(() => services?.dataSourceService.get("dataSources"));
4624
4744
  const getOptionChildren = (fields = [], dataSourceFieldType = ["any"]) => {
4625
4745
  const child = [];
@@ -4638,7 +4758,7 @@
4638
4758
  child.push(item);
4639
4759
  return;
4640
4760
  }
4641
- if (!dataSourceFieldType.includes(fieldType) && fieldType !== "object") {
4761
+ if (!dataSourceFieldType.includes(fieldType) && !["array", "object", "any"].includes(fieldType)) {
4642
4762
  return;
4643
4763
  }
4644
4764
  if (!children.length && ["object", "array", "any"].includes(field.type || "")) {
@@ -4668,7 +4788,7 @@
4668
4788
  vue.onMounted(() => {
4669
4789
  const value = props.model[props.name];
4670
4790
  if (Array.isArray(value) && typeof value[0] === "string" && value[0].startsWith(utils.DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX)) {
4671
- return showDataSourceFieldSelect.value = true;
4791
+ showDataSourceFieldSelect.value = true;
4672
4792
  }
4673
4793
  });
4674
4794
  const mForm = vue.inject("mForm");
@@ -4697,6 +4817,9 @@
4697
4817
  const onChangeHandler = (value) => {
4698
4818
  emit("change", value);
4699
4819
  };
4820
+ const { editDialog, dataSourceValues, dialogTitle, editable, editHandler, submitDataSourceHandler } = useDataSourceEdit(
4821
+ services?.dataSourceService
4822
+ );
4700
4823
  return (_ctx, _cache) => {
4701
4824
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$o, [
4702
4825
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tagName.value), {
@@ -4712,19 +4835,39 @@
4712
4835
  prop: `${_ctx.prop}${_ctx.prop ? "." : ""}${_ctx.name}`,
4713
4836
  onChange: onChangeHandler
4714
4837
  }, null, 40, ["config", "model", "name", "disabled", "size", "last-values", "init-values", "values", "prop"])),
4715
- _ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4838
+ (showDataSourceFieldSelect.value || !_ctx.config.fieldConfig) && selectedDataSourceId.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4716
4839
  key: 0,
4717
4840
  style: { "margin-left": "5px" },
4718
4841
  link: "",
4842
+ size: _ctx.size,
4843
+ onClick: _cache[0] || (_cache[0] = ($event) => vue.unref(editHandler)(selectedDataSourceId.value))
4844
+ }, {
4845
+ default: vue.withCtx(() => [
4846
+ vue.createVNode(_sfc_main$U, { icon: vue.unref(iconsVue.Edit) }, null, 8, ["icon"])
4847
+ ]),
4848
+ _: 1
4849
+ }, 8, ["size"])) : vue.createCommentVNode("", true),
4850
+ _ctx.config.fieldConfig ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4851
+ key: 1,
4852
+ style: { "margin-left": "5px" },
4853
+ link: "",
4719
4854
  type: showDataSourceFieldSelect.value ? "primary" : "default",
4720
4855
  size: _ctx.size,
4721
- onClick: _cache[0] || (_cache[0] = ($event) => showDataSourceFieldSelect.value = !showDataSourceFieldSelect.value)
4856
+ onClick: _cache[1] || (_cache[1] = ($event) => showDataSourceFieldSelect.value = !showDataSourceFieldSelect.value)
4722
4857
  }, {
4723
4858
  default: vue.withCtx(() => [
4724
4859
  vue.createVNode(_sfc_main$U, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
4725
4860
  ]),
4726
4861
  _: 1
4727
- }, 8, ["type", "size"])) : vue.createCommentVNode("", true)
4862
+ }, 8, ["type", "size"])) : vue.createCommentVNode("", true),
4863
+ vue.createVNode(_sfc_main$K, {
4864
+ ref_key: "editDialog",
4865
+ ref: editDialog,
4866
+ disabled: !vue.unref(editable),
4867
+ values: vue.unref(dataSourceValues),
4868
+ title: vue.unref(dialogTitle),
4869
+ onSubmit: vue.unref(submitDataSourceHandler)
4870
+ }, null, 8, ["disabled", "values", "title", "onSubmit"])
4728
4871
  ]);
4729
4872
  };
4730
4873
  }
@@ -4733,7 +4876,7 @@
4733
4876
  const _hoisted_1$n = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
4734
4877
  const _hoisted_2$h = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
4735
4878
  const _hoisted_3$7 = { class: "el-input__inner t-input__inner" };
4736
- const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
4879
+ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
4737
4880
  ...{
4738
4881
  name: "MFieldsDataSourceInput"
4739
4882
  },
@@ -4971,7 +5114,7 @@
4971
5114
 
4972
5115
  const _hoisted_1$m = { class: "m-editor-data-source-methods" };
4973
5116
  const _hoisted_2$g = { class: "m-editor-data-source-methods-footer" };
4974
- const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
5117
+ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
4975
5118
  ...{
4976
5119
  name: "MFieldsDataSourceMethods"
4977
5120
  },
@@ -5077,7 +5220,7 @@
5077
5220
 
5078
5221
  const _hoisted_1$l = { class: "m-fields-data-source-method-select" };
5079
5222
  const _hoisted_2$f = { class: "data-source-method-select-container" };
5080
- const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
5223
+ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
5081
5224
  ...{
5082
5225
  name: "MFieldsDataSourceMethodSelect"
5083
5226
  },
@@ -5207,7 +5350,7 @@
5207
5350
 
5208
5351
  const _hoisted_1$k = { class: "m-editor-data-source-fields" };
5209
5352
  const _hoisted_2$e = { class: "m-editor-data-source-fields-footer" };
5210
- const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
5353
+ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
5211
5354
  ...{
5212
5355
  name: "MFieldsDataSourceMocks"
5213
5356
  },
@@ -5460,7 +5603,7 @@
5460
5603
  }
5461
5604
  });
5462
5605
 
5463
- const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
5606
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
5464
5607
  ...{
5465
5608
  name: "MFieldsDataSourceSelect"
5466
5609
  },
@@ -5522,7 +5665,7 @@
5522
5665
  key: 1,
5523
5666
  class: "fullWidth"
5524
5667
  };
5525
- const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
5668
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
5526
5669
  ...{
5527
5670
  name: "MFieldsEventSelect"
5528
5671
  },
@@ -5796,7 +5939,7 @@
5796
5939
  const _hoisted_4$6 = [
5797
5940
  _hoisted_2$c
5798
5941
  ];
5799
- const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
5942
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5800
5943
  ...{
5801
5944
  name: "MEditorCodeIcon"
5802
5945
  },
@@ -5811,7 +5954,7 @@
5811
5954
  const _hoisted_1$h = { class: "m-fields-key-value" };
5812
5955
  const _hoisted_2$b = { key: 0 };
5813
5956
  const _hoisted_3$6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
5814
- const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
5957
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
5815
5958
  ...{
5816
5959
  name: "MFieldsKeyValue"
5817
5960
  },
@@ -5935,7 +6078,7 @@
5935
6078
  size: "default",
5936
6079
  disabled: _ctx.disabled,
5937
6080
  link: "",
5938
- icon: _sfc_main$D,
6081
+ icon: _sfc_main$C,
5939
6082
  onClick: _cache[0] || (_cache[0] = ($event) => showCode.value = !showCode.value)
5940
6083
  }, null, 8, ["disabled"])) : vue.createCommentVNode("", true)
5941
6084
  ]);
@@ -5945,7 +6088,7 @@
5945
6088
 
5946
6089
  const _hoisted_1$g = { class: "m-fields-page-fragment-select" };
5947
6090
  const _hoisted_2$a = { class: "page-fragment-select-container" };
5948
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
6091
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
5949
6092
  ...{
5950
6093
  name: "MFieldsPageFragmentSelect"
5951
6094
  },
@@ -6017,7 +6160,7 @@
6017
6160
  class: "m-fields-ui-select",
6018
6161
  style: { "display": "flex" }
6019
6162
  };
6020
- const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
6163
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
6021
6164
  ...{
6022
6165
  name: "MFieldsUISelect"
6023
6166
  },
@@ -6205,7 +6348,7 @@
6205
6348
  };
6206
6349
  };
6207
6350
 
6208
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
6351
+ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
6209
6352
  ...{
6210
6353
  name: "MEditorResizer"
6211
6354
  },
@@ -6227,7 +6370,7 @@
6227
6370
  }
6228
6371
  });
6229
6372
 
6230
- const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
6373
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
6231
6374
  ...{
6232
6375
  name: "MEditorSplitView"
6233
6376
  },
@@ -6343,6 +6486,9 @@
6343
6486
  __expose({
6344
6487
  updateWidth() {
6345
6488
  clientWidth = props.width ?? el.value?.clientWidth ?? clientWidth;
6489
+ if (clientWidth <= 0) {
6490
+ return;
6491
+ }
6346
6492
  const columnWidth = getCenterWidth(props.left, props.right);
6347
6493
  emit("change", {
6348
6494
  left: columnWidth.left,
@@ -6365,7 +6511,7 @@
6365
6511
  }, [
6366
6512
  vue.renderSlot(_ctx.$slots, "left")
6367
6513
  ], 6),
6368
- vue.createVNode(_sfc_main$z, { onChange: changeLeft })
6514
+ vue.createVNode(_sfc_main$y, { onChange: changeLeft })
6369
6515
  ], 64)) : vue.createCommentVNode("", true),
6370
6516
  vue.createElementVNode("div", {
6371
6517
  class: vue.normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
@@ -6374,7 +6520,7 @@
6374
6520
  vue.renderSlot(_ctx.$slots, "center")
6375
6521
  ], 6),
6376
6522
  hasRight.value && _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
6377
- vue.createVNode(_sfc_main$z, { onChange: changeRight }),
6523
+ vue.createVNode(_sfc_main$y, { onChange: changeRight }),
6378
6524
  vue.createElementVNode("div", {
6379
6525
  class: vue.normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
6380
6526
  style: vue.normalizeStyle(`width: ${_ctx.right}px`)
@@ -6392,7 +6538,7 @@
6392
6538
  class: "menu-item-text"
6393
6539
  };
6394
6540
  const _hoisted_2$9 = { class: "el-dropdown-link menubar-menu-button" };
6395
- const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
6541
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
6396
6542
  ...{
6397
6543
  name: "MEditorToolButton"
6398
6544
  },
@@ -6557,7 +6703,7 @@
6557
6703
  key: 1,
6558
6704
  style: { "width": "21px" }
6559
6705
  };
6560
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
6706
+ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
6561
6707
  ...{
6562
6708
  name: "MEditorPageBarAddButton"
6563
6709
  },
@@ -6597,7 +6743,7 @@
6597
6743
  }
6598
6744
  });
6599
6745
 
6600
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
6746
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
6601
6747
  ...{
6602
6748
  name: "MEditorPageBarScrollContainer"
6603
6749
  },
@@ -6726,7 +6872,7 @@
6726
6872
  }
6727
6873
  });
6728
6874
 
6729
- const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
6875
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
6730
6876
  ...{
6731
6877
  name: "MEditorPageBarSwitchTypeButton"
6732
6878
  },
@@ -6774,7 +6920,7 @@
6774
6920
  const _hoisted_2$8 = ["onClick"];
6775
6921
  const _hoisted_3$5 = { class: "m-editor-page-bar-title" };
6776
6922
  const _hoisted_4$5 = ["title"];
6777
- const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
6923
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
6778
6924
  ...{
6779
6925
  name: "MEditorPageBar"
6780
6926
  },
@@ -6853,14 +6999,14 @@
6853
6999
  };
6854
7000
  return (_ctx, _cache) => {
6855
7001
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
6856
- !_ctx.disabledPageFragment ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
7002
+ !_ctx.disabledPageFragment ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
6857
7003
  key: 0,
6858
7004
  modelValue: active.value,
6859
7005
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => active.value = $event)
6860
7006
  }, null, 8, ["modelValue"])) : vue.createCommentVNode("", true),
6861
- vue.createVNode(_sfc_main$v, { type: active.value }, {
7007
+ vue.createVNode(_sfc_main$u, { type: active.value }, {
6862
7008
  prepend: vue.withCtx(() => [
6863
- vue.createVNode(_sfc_main$w, { type: active.value }, null, 8, ["type"])
7009
+ vue.createVNode(_sfc_main$v, { type: active.value }, null, 8, ["type"])
6864
7010
  ]),
6865
7011
  default: vue.withCtx(() => [
6866
7012
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (item) => {
@@ -6893,7 +7039,7 @@
6893
7039
  default: vue.withCtx(() => [
6894
7040
  vue.createElementVNode("div", null, [
6895
7041
  vue.renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
6896
- vue.createVNode(_sfc_main$x, {
7042
+ vue.createVNode(_sfc_main$w, {
6897
7043
  data: {
6898
7044
  type: "button",
6899
7045
  text: "复制",
@@ -6901,7 +7047,7 @@
6901
7047
  handler: () => copy(item)
6902
7048
  }
6903
7049
  }, null, 8, ["data"]),
6904
- vue.createVNode(_sfc_main$x, {
7050
+ vue.createVNode(_sfc_main$w, {
6905
7051
  data: {
6906
7052
  type: "button",
6907
7053
  text: "删除",
@@ -6928,7 +7074,7 @@
6928
7074
  const _hoisted_2$7 = { class: "m-editor-empty-content" };
6929
7075
  const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面", -1);
6930
7076
  const _hoisted_4$4 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面片", -1);
6931
- const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
7077
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
6932
7078
  ...{
6933
7079
  name: "MEditorAddPageBox"
6934
7080
  },
@@ -6983,7 +7129,7 @@
6983
7129
  const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
6984
7130
  const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
6985
7131
  const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
6986
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
7132
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
6987
7133
  ...{
6988
7134
  name: "MEditorFramework"
6989
7135
  },
@@ -7002,10 +7148,11 @@
7002
7148
  const stageLoading = vue.computed(() => editorService?.get("stageLoading") || false);
7003
7149
  const showSrc = vue.computed(() => uiService?.get("showSrc"));
7004
7150
  const getLeftColumnWidthCacheData = () => Number(globalThis.localStorage.getItem(LEFT_COLUMN_WIDTH_STORAGE_KEY)) || DEFAULT_LEFT_COLUMN_WIDTH;
7151
+ const getRightColumnWidthCacheData = () => Number(globalThis.localStorage.getItem(RIGHT_COLUMN_WIDTH_STORAGE_KEY)) || DEFAULT_RIGHT_COLUMN_WIDTH;
7005
7152
  const columnWidth = vue.ref({
7006
7153
  left: getLeftColumnWidthCacheData(),
7007
7154
  center: 0,
7008
- right: Number(globalThis.localStorage.getItem(RIGHT_COLUMN_WIDTH_STORAGE_KEY)) || DEFAULT_RIGHT_COLUMN_WIDTH
7155
+ right: getRightColumnWidthCacheData()
7009
7156
  });
7010
7157
  vue.watch(pageLength, () => {
7011
7158
  splitView.value?.updateWidth();
@@ -7066,7 +7213,7 @@
7066
7213
  options: vue.unref(codeOptions),
7067
7214
  onSave: saveCode
7068
7215
  }, null, 8, ["init-values", "options"])
7069
- ]) : vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$y, {
7216
+ ]) : vue.withDirectives((vue.openBlock(), vue.createBlock(_sfc_main$x, {
7070
7217
  key: 1,
7071
7218
  "element-loading-text": "Runtime 加载中...",
7072
7219
  ref_key: "splitView",
@@ -7090,10 +7237,10 @@
7090
7237
  ]),
7091
7238
  center: vue.withCtx(() => [
7092
7239
  page.value ? vue.renderSlot(_ctx.$slots, "workspace", { key: 0 }) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
7093
- vue.createVNode(_sfc_main$s, { "disabled-page-fragment": _ctx.disabledPageFragment }, null, 8, ["disabled-page-fragment"])
7240
+ vue.createVNode(_sfc_main$r, { "disabled-page-fragment": _ctx.disabledPageFragment }, null, 8, ["disabled-page-fragment"])
7094
7241
  ]),
7095
7242
  vue.renderSlot(_ctx.$slots, "page-bar", {}, () => [
7096
- vue.createVNode(_sfc_main$t, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
7243
+ vue.createVNode(_sfc_main$s, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
7097
7244
  "page-bar-title": vue.withCtx(({ page: page2 }) => [
7098
7245
  vue.renderSlot(_ctx.$slots, "page-bar-title", { page: page2 })
7099
7246
  ]),
@@ -7128,7 +7275,7 @@
7128
7275
  }
7129
7276
  });
7130
7277
 
7131
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
7278
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
7132
7279
  ...{
7133
7280
  name: "MEditorNavMenu"
7134
7281
  },
@@ -7310,7 +7457,7 @@
7310
7457
  style: vue.normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
7311
7458
  }, [
7312
7459
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(buttons.value[key], (item, index) => {
7313
- return vue.openBlock(), vue.createBlock(_sfc_main$x, {
7460
+ return vue.openBlock(), vue.createBlock(_sfc_main$w, {
7314
7461
  data: item,
7315
7462
  key: index
7316
7463
  }, null, 8, ["data"]);
@@ -7323,7 +7470,7 @@
7323
7470
  });
7324
7471
 
7325
7472
  const _hoisted_1$a = { class: "m-editor-props-panel" };
7326
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
7473
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
7327
7474
  ...{
7328
7475
  name: "MEditorPropsPanel"
7329
7476
  },
@@ -7426,7 +7573,7 @@
7426
7573
  }
7427
7574
  });
7428
7575
 
7429
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
7576
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
7430
7577
  ...{
7431
7578
  name: "MEditorSearchInput"
7432
7579
  },
@@ -7484,7 +7631,7 @@
7484
7631
  key: 0,
7485
7632
  class: "m-editor-tree-node-children"
7486
7633
  };
7487
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
7634
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
7488
7635
  ...{
7489
7636
  name: "MEditorTreeNode"
7490
7637
  },
@@ -7605,7 +7752,7 @@
7605
7752
  key: 1,
7606
7753
  class: "m-editor-tree-empty"
7607
7754
  };
7608
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
7755
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
7609
7756
  ...{
7610
7757
  name: "MEditorTree"
7611
7758
  },
@@ -7629,7 +7776,7 @@
7629
7776
  onDragover: handleDragOver
7630
7777
  }, [
7631
7778
  _ctx.data?.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.data, (item) => {
7632
- return vue.openBlock(), vue.createBlock(_sfc_main$n, {
7779
+ return vue.openBlock(), vue.createBlock(_sfc_main$m, {
7633
7780
  key: item.id,
7634
7781
  data: item,
7635
7782
  indent: _ctx.indent,
@@ -7726,7 +7873,7 @@
7726
7873
  };
7727
7874
  };
7728
7875
 
7729
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
7876
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
7730
7877
  ...{
7731
7878
  name: "MEditorCodeBlockList"
7732
7879
  },
@@ -7808,7 +7955,7 @@
7808
7955
  filter: filterTextChangeHandler
7809
7956
  });
7810
7957
  return (_ctx, _cache) => {
7811
- return vue.openBlock(), vue.createBlock(_sfc_main$m, {
7958
+ return vue.openBlock(), vue.createBlock(_sfc_main$l, {
7812
7959
  data: codeList.value,
7813
7960
  "node-status-map": vue.unref(nodeStatusMap),
7814
7961
  onNodeClick: clickHandler
@@ -7865,7 +8012,7 @@
7865
8012
  });
7866
8013
 
7867
8014
  const _hoisted_1$7 = { class: "search-wrapper" };
7868
- const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
8015
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
7869
8016
  ...{
7870
8017
  name: "MEditorCodeBlockListPanel"
7871
8018
  },
@@ -7887,7 +8034,7 @@
7887
8034
  default: vue.withCtx(() => [
7888
8035
  vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
7889
8036
  vue.createElementVNode("div", _hoisted_1$7, [
7890
- vue.createVNode(_sfc_main$o, { onSearch: filterTextChangeHandler }),
8037
+ vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
7891
8038
  editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
7892
8039
  key: 0,
7893
8040
  class: "create-code-button",
@@ -7903,7 +8050,7 @@
7903
8050
  vue.renderSlot(_ctx.$slots, "code-block-panel-search")
7904
8051
  ])
7905
8052
  ]),
7906
- vue.createVNode(_sfc_main$l, {
8053
+ vue.createVNode(_sfc_main$k, {
7907
8054
  ref_key: "codeBlockList",
7908
8055
  ref: codeBlockList,
7909
8056
  "custom-error": _ctx.customError,
@@ -7934,81 +8081,6 @@
7934
8081
  }
7935
8082
  });
7936
8083
 
7937
- const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
7938
- ...{
7939
- name: "MEditorDataSourceConfigPanel"
7940
- },
7941
- __name: "DataSourceConfigPanel",
7942
- props: /* @__PURE__ */ vue.mergeModels({
7943
- title: {},
7944
- values: {},
7945
- disabled: { type: Boolean }
7946
- }, {
7947
- "visible": { type: Boolean, ...{ default: false } },
7948
- "visibleModifiers": {},
7949
- "width": { default: 670 },
7950
- "widthModifiers": {}
7951
- }),
7952
- emits: /* @__PURE__ */ vue.mergeModels(["submit"], ["update:visible", "update:width"]),
7953
- setup(__props, { expose: __expose, emit: __emit }) {
7954
- const props = __props;
7955
- const boxVisible = vue.useModel(__props, "visible");
7956
- const width = vue.useModel(__props, "width");
7957
- const emit = __emit;
7958
- const services = vue.inject("services");
7959
- const initValues = vue.ref({});
7960
- const dataSourceConfig = vue.ref([]);
7961
- const { height: editorHeight } = useEditorContentHeight();
7962
- const parentFloating = vue.inject("parentFloating", vue.ref(null));
7963
- const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(services?.uiService, parentFloating);
7964
- vue.watchEffect(() => {
7965
- initValues.value = props.values;
7966
- dataSourceConfig.value = services?.dataSourceService.getFormConfig(initValues.value.type) || [];
7967
- });
7968
- const submitHandler = (values) => {
7969
- emit("submit", values);
7970
- };
7971
- const errorHandler = (error) => {
7972
- design.tMagicMessage.error(error.message);
7973
- };
7974
- __expose({
7975
- show() {
7976
- calcBoxPosition();
7977
- boxVisible.value = true;
7978
- },
7979
- hide() {
7980
- boxVisible.value = false;
7981
- }
7982
- });
7983
- return (_ctx, _cache) => {
7984
- return vue.openBlock(), vue.createBlock(_sfc_main$P, {
7985
- visible: boxVisible.value,
7986
- "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => boxVisible.value = $event),
7987
- width: width.value,
7988
- "onUpdate:width": _cache[1] || (_cache[1] = ($event) => width.value = $event),
7989
- height: vue.unref(editorHeight),
7990
- "onUpdate:height": _cache[2] || (_cache[2] = ($event) => vue.isRef(editorHeight) ? editorHeight.value = $event : null),
7991
- title: _ctx.title,
7992
- position: vue.unref(boxPosition)
7993
- }, {
7994
- body: vue.withCtx(() => [
7995
- vue.createVNode(vue.unref(form.MFormBox), {
7996
- "label-width": "80px",
7997
- title: _ctx.title,
7998
- config: dataSourceConfig.value,
7999
- values: initValues.value,
8000
- disabled: _ctx.disabled,
8001
- style: { "height": "100%" },
8002
- onSubmit: submitHandler,
8003
- onError: errorHandler
8004
- }, null, 8, ["title", "config", "values", "disabled"])
8005
- ]),
8006
- _: 1
8007
- }, 8, ["visible", "width", "height", "title", "position"]);
8008
- };
8009
- }
8010
- });
8011
-
8012
8084
  const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
8013
8085
  ...{
8014
8086
  name: "MEditorDataSourceList"
@@ -8098,7 +8170,7 @@
8098
8170
  filter: filterTextChangeHandler
8099
8171
  });
8100
8172
  return (_ctx, _cache) => {
8101
- return vue.openBlock(), vue.createBlock(_sfc_main$m, {
8173
+ return vue.openBlock(), vue.createBlock(_sfc_main$l, {
8102
8174
  data: list.value,
8103
8175
  "node-status-map": vue.unref(nodeStatusMap),
8104
8176
  onNodeClick: clickHandler
@@ -8160,10 +8232,7 @@
8160
8232
  __name: "DataSourceListPanel",
8161
8233
  setup(__props) {
8162
8234
  const { dataSourceService } = vue.inject("services") || {};
8163
- const editDialog = vue.ref();
8164
- const dataSourceValues = vue.ref({});
8165
- const dialogTitle = vue.ref("");
8166
- const editable = vue.computed(() => dataSourceService?.get("editable") ?? true);
8235
+ const { editDialog, dataSourceValues, dialogTitle, editable, editHandler, submitDataSourceHandler } = useDataSourceEdit(dataSourceService);
8167
8236
  const datasourceTypeList = vue.computed(
8168
8237
  () => [
8169
8238
  { text: "基础", type: "base" },
@@ -8186,26 +8255,9 @@
8186
8255
  dialogTitle.value = `新增${datasourceType?.text || ""}`;
8187
8256
  editDialog.value.show();
8188
8257
  };
8189
- const editHandler = (id) => {
8190
- if (!editDialog.value)
8191
- return;
8192
- dataSourceValues.value = {
8193
- ...dataSourceService?.getDataSourceById(id)
8194
- };
8195
- dialogTitle.value = `编辑${dataSourceValues.value.title || ""}`;
8196
- editDialog.value.show();
8197
- };
8198
8258
  const removeHandler = (id) => {
8199
8259
  dataSourceService?.remove(id);
8200
8260
  };
8201
- const submitDataSourceHandler = (value) => {
8202
- if (value.id) {
8203
- dataSourceService?.update(value);
8204
- } else {
8205
- dataSourceService?.add(value);
8206
- }
8207
- editDialog.value?.hide();
8208
- };
8209
8261
  const dataSourceList = vue.ref();
8210
8262
  const filterTextChangeHandler = (val) => {
8211
8263
  dataSourceList.value?.filter(val);
@@ -8215,8 +8267,8 @@
8215
8267
  vue.createVNode(vue.unref(design.TMagicScrollbar), { class: "data-source-list-panel m-editor-layer-panel" }, {
8216
8268
  default: vue.withCtx(() => [
8217
8269
  vue.createElementVNode("div", _hoisted_1$6, [
8218
- vue.createVNode(_sfc_main$o, { onSearch: filterTextChangeHandler }),
8219
- editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicPopover), {
8270
+ vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
8271
+ vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicPopover), {
8220
8272
  key: 0,
8221
8273
  placement: "right"
8222
8274
  }, {
@@ -8234,7 +8286,7 @@
8234
8286
  default: vue.withCtx(() => [
8235
8287
  vue.createElementVNode("div", _hoisted_2$5, [
8236
8288
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(datasourceTypeList.value, (item, index) => {
8237
- return vue.openBlock(), vue.createBlock(_sfc_main$x, {
8289
+ return vue.openBlock(), vue.createBlock(_sfc_main$w, {
8238
8290
  data: {
8239
8291
  type: "button",
8240
8292
  text: item.text,
@@ -8252,20 +8304,22 @@
8252
8304
  vue.renderSlot(_ctx.$slots, "data-source-panel-search")
8253
8305
  ]),
8254
8306
  vue.createVNode(_sfc_main$i, {
8255
- onEdit: editHandler,
8307
+ ref_key: "dataSourceList",
8308
+ ref: dataSourceList,
8309
+ onEdit: vue.unref(editHandler),
8256
8310
  onRemove: removeHandler
8257
- })
8311
+ }, null, 8, ["onEdit"])
8258
8312
  ]),
8259
8313
  _: 3
8260
8314
  }),
8261
- vue.createVNode(_sfc_main$j, {
8315
+ vue.createVNode(_sfc_main$K, {
8262
8316
  ref_key: "editDialog",
8263
8317
  ref: editDialog,
8264
- disabled: !editable.value,
8265
- values: dataSourceValues.value,
8266
- title: dialogTitle.value,
8267
- onSubmit: submitDataSourceHandler
8268
- }, null, 8, ["disabled", "values", "title"])
8318
+ disabled: !vue.unref(editable),
8319
+ values: vue.unref(dataSourceValues),
8320
+ title: vue.unref(dialogTitle),
8321
+ onSubmit: vue.unref(submitDataSourceHandler)
8322
+ }, null, 8, ["disabled", "values", "title", "onSubmit"])
8269
8323
  ], 64);
8270
8324
  };
8271
8325
  }
@@ -8402,7 +8456,7 @@
8402
8456
  vue.renderSlot(_ctx.$slots, "title"),
8403
8457
  vue.createElementVNode("div", null, [
8404
8458
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuData, (item, index) => {
8405
- return vue.openBlock(), vue.createBlock(_sfc_main$x, {
8459
+ return vue.openBlock(), vue.createBlock(_sfc_main$w, {
8406
8460
  "event-type": "mouseup",
8407
8461
  ref_for: true,
8408
8462
  ref_key: "buttons",
@@ -9178,8 +9232,8 @@
9178
9232
  return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "m-editor-layer-panel" }, {
9179
9233
  default: vue.withCtx(() => [
9180
9234
  vue.renderSlot(_ctx.$slots, "layer-panel-header"),
9181
- vue.createVNode(_sfc_main$o, { onSearch: vue.unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
9182
- page.value && vue.unref(nodeStatusMap) ? (vue.openBlock(), vue.createBlock(_sfc_main$m, {
9235
+ vue.createVNode(_sfc_main$n, { onSearch: vue.unref(filterTextChangeHandler) }, null, 8, ["onSearch"]),
9236
+ page.value && vue.unref(nodeStatusMap) ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
9183
9237
  key: 0,
9184
9238
  tabindex: "-1",
9185
9239
  ref_key: "tree",
@@ -9305,7 +9359,7 @@
9305
9359
  "model-value": collapseValue.value
9306
9360
  }, {
9307
9361
  default: vue.withCtx(() => [
9308
- vue.createVNode(_sfc_main$o, { onSearch: filterTextChangeHandler }),
9362
+ vue.createVNode(_sfc_main$n, { onSearch: filterTextChangeHandler }),
9309
9363
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (group, index) => {
9310
9364
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
9311
9365
  group.items && group.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCollapseItem), {
@@ -9415,7 +9469,7 @@
9415
9469
  type: "component",
9416
9470
  icon: iconsVue.EditPen,
9417
9471
  text: "代码编辑",
9418
- component: _sfc_main$k,
9472
+ component: _sfc_main$j,
9419
9473
  slots: {}
9420
9474
  },
9421
9475
  "data-source": {
@@ -10049,7 +10103,7 @@
10049
10103
  position: menuPosition.value
10050
10104
  }, {
10051
10105
  body: vue.withCtx(() => [
10052
- vue.createVNode(_sfc_main$m, {
10106
+ vue.createVNode(_sfc_main$l, {
10053
10107
  class: "m-editor-node-list-menu magic-editor-layer-tree",
10054
10108
  data: nodeData.value,
10055
10109
  "node-status-map": vue.unref(nodeStatusMap),
@@ -11631,13 +11685,13 @@
11631
11685
  vue.provide("stageOptions", stageOptions);
11632
11686
  __expose(services);
11633
11687
  return (_ctx, _cache) => {
11634
- return vue.openBlock(), vue.createBlock(_sfc_main$r, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
11688
+ return vue.openBlock(), vue.createBlock(_sfc_main$q, { "disabled-page-fragment": _ctx.disabledPageFragment }, {
11635
11689
  header: vue.withCtx(() => [
11636
11690
  vue.renderSlot(_ctx.$slots, "header")
11637
11691
  ]),
11638
11692
  nav: vue.withCtx(() => [
11639
11693
  vue.renderSlot(_ctx.$slots, "nav", { editorService: vue.unref(editorService) }, () => [
11640
- vue.createVNode(_sfc_main$q, { data: _ctx.menu }, null, 8, ["data"])
11694
+ vue.createVNode(_sfc_main$p, { data: _ctx.menu }, null, 8, ["data"])
11641
11695
  ])
11642
11696
  ]),
11643
11697
  "content-before": vue.withCtx(() => [
@@ -11712,7 +11766,7 @@
11712
11766
  ]),
11713
11767
  "props-panel": vue.withCtx(() => [
11714
11768
  vue.renderSlot(_ctx.$slots, "props-panel", {}, () => [
11715
- vue.createVNode(_sfc_main$p, {
11769
+ vue.createVNode(_sfc_main$o, {
11716
11770
  "extend-state": _ctx.extendFormState,
11717
11771
  onMounted: _cache[0] || (_cache[0] = (instance) => _ctx.$emit("props-panel-mounted", instance)),
11718
11772
  onFormError: _cache[1] || (_cache[1] = (e) => _ctx.$emit("props-form-error", e)),
@@ -11760,21 +11814,21 @@
11760
11814
  setConfig(option);
11761
11815
  app.component(`${_sfc_main.name || "MEditor"}`, _sfc_main);
11762
11816
  app.component("magic-code-editor", _sfc_main$T);
11763
- app.component("m-fields-ui-select", _sfc_main$A);
11817
+ app.component("m-fields-ui-select", _sfc_main$z);
11764
11818
  app.component("m-fields-code-link", _sfc_main$R);
11765
11819
  app.component("m-fields-vs-code", _sfc_main$S);
11766
11820
  app.component("m-fields-code-select", _sfc_main$Q);
11767
11821
  app.component("m-fields-code-select-col", _sfc_main$M);
11768
- app.component("m-fields-event-select", _sfc_main$E);
11822
+ app.component("m-fields-event-select", _sfc_main$D);
11769
11823
  app.component("m-fields-data-source-fields", _sfc_main$L);
11770
- app.component("m-fields-data-source-mocks", _sfc_main$G);
11771
- app.component("m-fields-key-value", _sfc_main$C);
11772
- app.component("m-fields-data-source-input", _sfc_main$J);
11773
- app.component("m-fields-data-source-select", _sfc_main$F);
11774
- app.component("m-fields-data-source-methods", _sfc_main$I);
11775
- app.component("m-fields-data-source-method-select", _sfc_main$H);
11776
- app.component("m-fields-data-source-field-select", _sfc_main$K);
11777
- app.component("m-fields-page-fragment-select", _sfc_main$B);
11824
+ app.component("m-fields-data-source-mocks", _sfc_main$F);
11825
+ app.component("m-fields-key-value", _sfc_main$B);
11826
+ app.component("m-fields-data-source-input", _sfc_main$I);
11827
+ app.component("m-fields-data-source-select", _sfc_main$E);
11828
+ app.component("m-fields-data-source-methods", _sfc_main$H);
11829
+ app.component("m-fields-data-source-method-select", _sfc_main$G);
11830
+ app.component("m-fields-data-source-field-select", _sfc_main$J);
11831
+ app.component("m-fields-page-fragment-select", _sfc_main$A);
11778
11832
  }
11779
11833
  };
11780
11834
 
@@ -11785,41 +11839,41 @@
11785
11839
  exports.CODE_DRAFT_STORAGE_KEY = CODE_DRAFT_STORAGE_KEY;
11786
11840
  exports.COPY_STORAGE_KEY = COPY_STORAGE_KEY;
11787
11841
  exports.CodeBlockEditor = _sfc_main$O;
11788
- exports.CodeBlockList = _sfc_main$l;
11789
- exports.CodeBlockListPanel = _sfc_main$k;
11842
+ exports.CodeBlockList = _sfc_main$k;
11843
+ exports.CodeBlockListPanel = _sfc_main$j;
11790
11844
  exports.CodeDeleteErrorType = CodeDeleteErrorType;
11791
11845
  exports.CodeSelect = _sfc_main$Q;
11792
11846
  exports.CodeSelectCol = _sfc_main$M;
11793
11847
  exports.ColumnLayout = ColumnLayout;
11794
11848
  exports.ComponentListPanel = _sfc_main$b;
11795
11849
  exports.ContentMenu = _sfc_main$g;
11796
- exports.DataSourceConfigPanel = _sfc_main$j;
11797
- exports.DataSourceFieldSelect = _sfc_main$K;
11850
+ exports.DataSourceConfigPanel = _sfc_main$K;
11851
+ exports.DataSourceFieldSelect = _sfc_main$J;
11798
11852
  exports.DataSourceFields = _sfc_main$L;
11799
- exports.DataSourceInput = _sfc_main$J;
11800
- exports.DataSourceMethodSelect = _sfc_main$H;
11801
- exports.DataSourceMethods = _sfc_main$I;
11802
- exports.DataSourceMocks = _sfc_main$G;
11803
- exports.DataSourceSelect = _sfc_main$F;
11853
+ exports.DataSourceInput = _sfc_main$I;
11854
+ exports.DataSourceMethodSelect = _sfc_main$G;
11855
+ exports.DataSourceMethods = _sfc_main$H;
11856
+ exports.DataSourceMocks = _sfc_main$F;
11857
+ exports.DataSourceSelect = _sfc_main$E;
11804
11858
  exports.DragType = DragType;
11805
- exports.EventSelect = _sfc_main$E;
11859
+ exports.EventSelect = _sfc_main$D;
11806
11860
  exports.Fixed2Other = Fixed2Other;
11807
11861
  exports.H_GUIDE_LINE_STORAGE_KEY = H_GUIDE_LINE_STORAGE_KEY;
11808
11862
  exports.Icon = _sfc_main$U;
11809
11863
  exports.KeyBindingCommand = KeyBindingCommand;
11810
- exports.KeyValue = _sfc_main$C;
11864
+ exports.KeyValue = _sfc_main$B;
11811
11865
  exports.Keys = Keys;
11812
11866
  exports.LayerOffset = LayerOffset;
11813
11867
  exports.LayerPanel = _sfc_main$c;
11814
11868
  exports.Layout = Layout;
11815
- exports.LayoutContainer = _sfc_main$y;
11816
- exports.PageFragmentSelect = _sfc_main$B;
11817
- exports.PropsPanel = _sfc_main$p;
11818
- exports.Resizer = _sfc_main$z;
11819
- exports.SplitView = _sfc_main$y;
11869
+ exports.LayoutContainer = _sfc_main$x;
11870
+ exports.PageFragmentSelect = _sfc_main$A;
11871
+ exports.PropsPanel = _sfc_main$o;
11872
+ exports.Resizer = _sfc_main$y;
11873
+ exports.SplitView = _sfc_main$x;
11820
11874
  exports.TMagicCodeEditor = _sfc_main$T;
11821
11875
  exports.TMagicEditor = _sfc_main;
11822
- exports.ToolButton = _sfc_main$x;
11876
+ exports.ToolButton = _sfc_main$w;
11823
11877
  exports.UI_SELECT_MODE_EVENT_NAME = UI_SELECT_MODE_EVENT_NAME;
11824
11878
  exports.V_GUIDE_LINE_STORAGE_KEY = V_GUIDE_LINE_STORAGE_KEY;
11825
11879
  exports.advancedTabConfig = advancedTabConfig;