@tmagic/editor 1.3.0-alpha.2 → 1.3.0-alpha.4

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.
Files changed (89) hide show
  1. package/dist/tmagic-editor.js +800 -514
  2. package/dist/tmagic-editor.js.map +1 -1
  3. package/dist/tmagic-editor.umd.cjs +801 -514
  4. package/dist/tmagic-editor.umd.cjs.map +1 -1
  5. package/package.json +17 -18
  6. package/src/Editor.vue +1 -1
  7. package/src/components/CodeDraftEditor.vue +5 -1
  8. package/src/components/ContentMenu.vue +5 -1
  9. package/src/components/FunctionEditor.vue +6 -1
  10. package/src/components/Icon.vue +5 -1
  11. package/src/components/Layout.vue +5 -1
  12. package/src/components/ScrollBar.vue +5 -1
  13. package/src/components/ScrollViewer.vue +5 -1
  14. package/src/components/SearchInput.vue +4 -0
  15. package/src/components/ToolButton.vue +5 -1
  16. package/src/fields/Code.vue +5 -1
  17. package/src/fields/CodeLink.vue +5 -1
  18. package/src/fields/CodeSelect.vue +8 -2
  19. package/src/fields/CodeSelectCol.vue +6 -2
  20. package/src/fields/DataSourceFields.vue +4 -0
  21. package/src/fields/DataSourceInput.vue +357 -0
  22. package/src/fields/EventSelect.vue +9 -3
  23. package/src/fields/KeyValue.vue +4 -0
  24. package/src/fields/UISelect.vue +5 -1
  25. package/src/icons/AppManageIcon.vue +5 -1
  26. package/src/icons/CodeIcon.vue +5 -1
  27. package/src/index.ts +3 -0
  28. package/src/layouts/AddPageBox.vue +5 -1
  29. package/src/layouts/CodeEditor.vue +5 -1
  30. package/src/layouts/Framework.vue +5 -1
  31. package/src/layouts/NavMenu.vue +5 -1
  32. package/src/layouts/PropsPanel.vue +5 -1
  33. package/src/layouts/Resizer.vue +5 -1
  34. package/src/layouts/sidebar/ComponentListPanel.vue +5 -1
  35. package/src/layouts/sidebar/LayerMenu.vue +5 -1
  36. package/src/layouts/sidebar/LayerPanel.vue +5 -1
  37. package/src/layouts/sidebar/Sidebar.vue +11 -7
  38. package/src/layouts/sidebar/code-block/CodeBlockEditor.vue +5 -1
  39. package/src/layouts/sidebar/code-block/CodeBlockList.vue +5 -1
  40. package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +4 -0
  41. package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +4 -0
  42. package/src/layouts/workspace/Breadcrumb.vue +5 -1
  43. package/src/layouts/workspace/PageBar.vue +5 -1
  44. package/src/layouts/workspace/PageBarScrollContainer.vue +5 -1
  45. package/src/layouts/workspace/Stage.vue +5 -1
  46. package/src/layouts/workspace/ViewerMenu.vue +5 -1
  47. package/src/layouts/workspace/Workspace.vue +5 -1
  48. package/types/Editor.vue.d.ts +1 -1
  49. package/types/components/CodeDraftEditor.vue.d.ts +6 -3
  50. package/types/components/ContentMenu.vue.d.ts +8 -5
  51. package/types/components/FunctionEditor.vue.d.ts +66 -45
  52. package/types/components/Icon.vue.d.ts +2 -2
  53. package/types/components/Layout.vue.d.ts +9 -6
  54. package/types/components/ScrollBar.vue.d.ts +1 -1
  55. package/types/components/ScrollViewer.vue.d.ts +8 -5
  56. package/types/components/SearchInput.vue.d.ts +1 -1
  57. package/types/components/ToolButton.vue.d.ts +8 -5
  58. package/types/fields/Code.vue.d.ts +1 -1
  59. package/types/fields/CodeLink.vue.d.ts +9 -9
  60. package/types/fields/CodeSelect.vue.d.ts +10 -7
  61. package/types/fields/CodeSelectCol.vue.d.ts +8 -5
  62. package/types/fields/DataSourceFields.vue.d.ts +8 -5
  63. package/types/fields/DataSourceInput.vue.d.ts +54 -0
  64. package/types/fields/EventSelect.vue.d.ts +3 -3
  65. package/types/fields/KeyValue.vue.d.ts +8 -5
  66. package/types/fields/UISelect.vue.d.ts +1 -1
  67. package/types/icons/AppManageIcon.vue.d.ts +1 -1
  68. package/types/icons/CodeIcon.vue.d.ts +1 -1
  69. package/types/index.d.ts +1 -0
  70. package/types/layouts/AddPageBox.vue.d.ts +1 -1
  71. package/types/layouts/CodeEditor.vue.d.ts +7 -4
  72. package/types/layouts/Framework.vue.d.ts +13 -10
  73. package/types/layouts/NavMenu.vue.d.ts +7 -4
  74. package/types/layouts/PropsPanel.vue.d.ts +2 -2
  75. package/types/layouts/Resizer.vue.d.ts +2 -2
  76. package/types/layouts/sidebar/ComponentListPanel.vue.d.ts +4 -4
  77. package/types/layouts/sidebar/LayerMenu.vue.d.ts +2 -2
  78. package/types/layouts/sidebar/LayerPanel.vue.d.ts +5 -5
  79. package/types/layouts/sidebar/Sidebar.vue.d.ts +18 -15
  80. package/types/layouts/sidebar/code-block/CodeBlockEditor.vue.d.ts +4 -4
  81. package/types/layouts/sidebar/code-block/CodeBlockList.vue.d.ts +7 -7
  82. package/types/layouts/sidebar/data-source/DataSourceConfigPanel.vue.d.ts +1 -1
  83. package/types/layouts/sidebar/data-source/DataSourceListPanel.vue.d.ts +3 -3
  84. package/types/layouts/workspace/Breadcrumb.vue.d.ts +1 -1
  85. package/types/layouts/workspace/PageBar.vue.d.ts +5 -5
  86. package/types/layouts/workspace/PageBarScrollContainer.vue.d.ts +2 -2
  87. package/types/layouts/workspace/Stage.vue.d.ts +2 -2
  88. package/types/layouts/workspace/ViewerMenu.vue.d.ts +7 -4
  89. package/types/layouts/workspace/Workspace.vue.d.ts +8 -8
@@ -23,16 +23,16 @@
23
23
 
24
24
  const monaco__namespace = /*#__PURE__*/_interopNamespaceDefault(monaco);
25
25
 
26
- const __default__$w = vue.defineComponent({
27
- name: "MEditorCode"
28
- });
29
- const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
30
- ...__default__$w,
26
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
27
+ ...{
28
+ name: "MEditorCode"
29
+ },
30
+ __name: "Code",
31
31
  props: {
32
- model: null,
33
- name: null,
34
- config: null,
35
- prop: null
32
+ model: {},
33
+ name: {},
34
+ config: {},
35
+ prop: {}
36
36
  },
37
37
  emits: ["change"],
38
38
  setup(__props, { emit }) {
@@ -46,26 +46,26 @@
46
46
  return (_ctx, _cache) => {
47
47
  const _component_magic_code_editor = vue.resolveComponent("magic-code-editor");
48
48
  return vue.openBlock(), vue.createBlock(_component_magic_code_editor, {
49
- style: vue.normalizeStyle(`height: ${vue.unref(height)}`),
50
- "init-values": __props.model[__props.name],
51
- language: vue.unref(language),
52
- options: __props.config.options,
49
+ style: vue.normalizeStyle(`height: ${height.value}`),
50
+ "init-values": _ctx.model[_ctx.name],
51
+ language: language.value,
52
+ options: _ctx.config.options,
53
53
  onSave: save
54
54
  }, null, 8, ["style", "init-values", "language", "options"]);
55
55
  };
56
56
  }
57
57
  });
58
58
 
59
- const __default__$v = vue.defineComponent({
60
- name: "MEditorCodeLink"
61
- });
62
- const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
63
- ...__default__$v,
59
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
60
+ ...{
61
+ name: "MEditorCodeLink"
62
+ },
63
+ __name: "CodeLink",
64
64
  props: {
65
- config: null,
66
- model: null,
67
- name: null,
68
- prop: null
65
+ config: {},
66
+ model: {},
67
+ name: {},
68
+ prop: {}
69
69
  },
70
70
  emits: ["change"],
71
71
  setup(__props, { emit }) {
@@ -120,7 +120,7 @@
120
120
  return (_ctx, _cache) => {
121
121
  const _component_m_fields_link = vue.resolveComponent("m-fields-link");
122
122
  return vue.openBlock(), vue.createBlock(_component_m_fields_link, {
123
- config: vue.unref(formConfig),
123
+ config: formConfig.value,
124
124
  model: modelValue,
125
125
  name: "form",
126
126
  onChange: changeHandler
@@ -129,17 +129,17 @@
129
129
  }
130
130
  });
131
131
 
132
- const __default__$u = vue.defineComponent({
133
- name: "MEditorCodeSelect"
134
- });
135
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
136
- ...__default__$u,
132
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
133
+ ...{
134
+ name: "MEditorCodeSelect"
135
+ },
136
+ __name: "CodeSelect",
137
137
  props: {
138
- config: null,
139
- model: null,
140
- prop: null,
141
- name: null,
142
- size: null
138
+ config: {},
139
+ model: {},
140
+ prop: {},
141
+ name: {},
142
+ size: {}
143
143
  },
144
144
  emits: ["change"],
145
145
  setup(__props, { emit }) {
@@ -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",
@@ -175,13 +177,13 @@
175
177
  return (_ctx, _cache) => {
176
178
  const _component_m_form_container = vue.resolveComponent("m-form-container");
177
179
  return vue.openBlock(), vue.createElementBlock("div", {
178
- class: vue.normalizeClass(["m-fields-code-select", __props.config.className])
180
+ class: vue.normalizeClass(["m-fields-code-select", _ctx.config.className])
179
181
  }, [
180
182
  vue.createVNode(vue.unref(design.TMagicCard), null, {
181
183
  default: vue.withCtx(() => [
182
184
  vue.createVNode(_component_m_form_container, {
183
- config: vue.unref(codeConfig),
184
- model: __props.model[__props.name],
185
+ config: codeConfig.value,
186
+ model: _ctx.model[_ctx.name],
185
187
  onChange: changeHandler
186
188
  }, null, 8, ["config", "model"])
187
189
  ]),
@@ -192,18 +194,18 @@
192
194
  }
193
195
  });
194
196
 
195
- const _hoisted_1$n = ["src"];
196
- const __default__$t = vue.defineComponent({
197
- name: "MEditorIcon"
198
- });
199
- const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
200
- ...__default__$t,
197
+ const _hoisted_1$m = ["src"];
198
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
199
+ ...{
200
+ name: "MEditorIcon"
201
+ },
202
+ __name: "Icon",
201
203
  props: {
202
- icon: null
204
+ icon: {}
203
205
  },
204
206
  setup(__props) {
205
207
  return (_ctx, _cache) => {
206
- return !__props.icon ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicIcon), {
208
+ return !_ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicIcon), {
207
209
  key: 0,
208
210
  class: "magic-editor-icon"
209
211
  }, {
@@ -211,23 +213,23 @@
211
213
  vue.createVNode(vue.unref(iconsVue.Edit))
212
214
  ]),
213
215
  _: 1
214
- })) : typeof __props.icon === "string" && __props.icon.startsWith("http") ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicIcon), {
216
+ })) : typeof _ctx.icon === "string" && _ctx.icon.startsWith("http") ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicIcon), {
215
217
  key: 1,
216
218
  class: "magic-editor-icon"
217
219
  }, {
218
220
  default: vue.withCtx(() => [
219
- vue.createElementVNode("img", { src: __props.icon }, null, 8, _hoisted_1$n)
221
+ vue.createElementVNode("img", { src: _ctx.icon }, null, 8, _hoisted_1$m)
220
222
  ]),
221
223
  _: 1
222
- })) : typeof __props.icon === "string" ? (vue.openBlock(), vue.createElementBlock("i", {
224
+ })) : typeof _ctx.icon === "string" ? (vue.openBlock(), vue.createElementBlock("i", {
223
225
  key: 2,
224
- class: vue.normalizeClass(["magic-editor-icon", __props.icon])
226
+ class: vue.normalizeClass(["magic-editor-icon", _ctx.icon])
225
227
  }, null, 2)) : (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicIcon), {
226
228
  key: 3,
227
229
  class: "magic-editor-icon"
228
230
  }, {
229
231
  default: vue.withCtx(() => [
230
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.toRaw(__props.icon))))
232
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.toRaw(_ctx.icon))))
231
233
  ]),
232
234
  _: 1
233
235
  }));
@@ -235,19 +237,19 @@
235
237
  }
236
238
  });
237
239
 
238
- const _hoisted_1$m = { class: "m-fields-code-select-col" };
240
+ const _hoisted_1$l = { class: "m-fields-code-select-col" };
239
241
  const _hoisted_2$e = { class: "code-select-container" };
240
- const __default__$s = vue.defineComponent({
241
- name: "MEditorCodeSelectCol"
242
- });
243
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
244
- ...__default__$s,
242
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
243
+ ...{
244
+ name: "MEditorCodeSelectCol"
245
+ },
246
+ __name: "CodeSelectCol",
245
247
  props: {
246
- config: null,
247
- model: null,
248
- prop: null,
249
- name: null,
250
- size: null
248
+ config: {},
249
+ model: {},
250
+ prop: {},
251
+ name: {},
252
+ size: {}
251
253
  },
252
254
  emits: ["change"],
253
255
  setup(__props, { emit }) {
@@ -329,23 +331,23 @@
329
331
  };
330
332
  return (_ctx, _cache) => {
331
333
  const _component_m_form_container = vue.resolveComponent("m-form-container");
332
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
334
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
333
335
  vue.createElementVNode("div", _hoisted_2$e, [
334
336
  vue.createVNode(_component_m_form_container, {
335
337
  class: "select",
336
338
  config: selectConfig,
337
- model: __props.model,
339
+ model: _ctx.model,
338
340
  onChange: onParamsChangeHandler
339
341
  }, null, 8, ["model"]),
340
- vue.createVNode(_sfc_main$A, {
342
+ vue.createVNode(_sfc_main$B, {
341
343
  class: "icon",
342
- icon: vue.unref(editable) ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
344
+ icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
343
345
  onClick: editCode
344
346
  }, null, 8, ["icon"])
345
347
  ]),
346
348
  vue.createVNode(_component_m_form_container, {
347
349
  config: codeParamsConfig.value,
348
- model: __props.model,
350
+ model: _ctx.model,
349
351
  onChange: onParamsChangeHandler
350
352
  }, null, 8, ["config", "model"])
351
353
  ]);
@@ -353,17 +355,19 @@
353
355
  }
354
356
  });
355
357
 
356
- const _hoisted_1$l = { class: "m-editor-data-source-fields" };
358
+ const _hoisted_1$k = { class: "m-editor-data-source-fields" };
357
359
  const _hoisted_2$d = { class: "m-editor-data-source-fields-footer" };
358
- const _hoisted_3$8 = /* @__PURE__ */ vue.createTextVNode("添加");
359
- const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
360
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
361
+ ...{
362
+ name: "MEditorDataSourceFields"
363
+ },
360
364
  __name: "DataSourceFields",
361
365
  props: {
362
- config: null,
363
- model: null,
364
- prop: null,
366
+ config: {},
367
+ model: {},
368
+ prop: {},
365
369
  disabled: { type: Boolean, default: false },
366
- name: null
370
+ name: {}
367
371
  },
368
372
  emits: ["change"],
369
373
  setup(__props, { emit }) {
@@ -499,21 +503,21 @@
499
503
  }
500
504
  ];
501
505
  return (_ctx, _cache) => {
502
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$l, [
506
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, [
503
507
  vue.createVNode(vue.unref(table.MagicTable), {
504
- data: __props.model[__props.name],
508
+ data: _ctx.model[_ctx.name],
505
509
  columns: filedColumns
506
510
  }, null, 8, ["data"]),
507
511
  vue.createElementVNode("div", _hoisted_2$d, [
508
512
  vue.createVNode(vue.unref(design.TMagicButton), {
509
513
  size: "small",
510
514
  type: "primary",
511
- disabled: __props.disabled,
515
+ disabled: _ctx.disabled,
512
516
  plain: "",
513
517
  onClick: _cache[0] || (_cache[0] = ($event) => newHandler())
514
518
  }, {
515
519
  default: vue.withCtx(() => [
516
- _hoisted_3$8
520
+ vue.createTextVNode("添加")
517
521
  ]),
518
522
  _: 1
519
523
  }, 8, ["disabled"])
@@ -524,7 +528,7 @@
524
528
  title: filedTitle.value,
525
529
  config: dataSourceFieldsConfig,
526
530
  values: fieldValues.value,
527
- parentValues: __props.model[__props.name],
531
+ parentValues: _ctx.model[_ctx.name],
528
532
  onSubmit: fieldChange
529
533
  }, null, 8, ["title", "values", "parentValues"])
530
534
  ]);
@@ -532,23 +536,287 @@
532
536
  }
533
537
  });
534
538
 
535
- const _hoisted_1$k = { class: "m-fields-event-select" };
536
- const _hoisted_2$c = {
539
+ const _hoisted_1$j = { style: { "display": "flex", "flex-direction": "column", "line-height": "1.2em" } };
540
+ const _hoisted_2$c = { style: { "font-size": "10px", "color": "rgba(0, 0, 0, 0.6)" } };
541
+ const _hoisted_3$5 = { class: "el-input__inner" };
542
+ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
543
+ ...{
544
+ name: "MEditorDataSourceInput"
545
+ },
546
+ __name: "DataSourceInput",
547
+ props: {
548
+ config: {},
549
+ model: {},
550
+ name: {},
551
+ prop: {},
552
+ disabled: { type: Boolean, default: false },
553
+ lastValues: {},
554
+ size: {}
555
+ },
556
+ emits: ["change"],
557
+ setup(__props, { emit }) {
558
+ const props = __props;
559
+ const { dataSourceService } = vue.inject("services") || {};
560
+ const autocomplete = vue.ref();
561
+ const isFocused = vue.ref(false);
562
+ const state = vue.ref("");
563
+ const displayState = vue.ref([]);
564
+ const input = vue.computed(() => autocomplete.value?.inputRef?.input);
565
+ const dataSources = vue.computed(() => dataSourceService?.get("dataSources") || []);
566
+ const setDisplayState = () => {
567
+ displayState.value = [];
568
+ const matches = state.value.matchAll(/\{\{([\s\S]+?)\}\}/g);
569
+ let index = 0;
570
+ for (const match of matches) {
571
+ if (typeof match.index === "undefined")
572
+ break;
573
+ displayState.value.push({
574
+ type: "text",
575
+ value: state.value.substring(index, match.index)
576
+ });
577
+ let dsText = "";
578
+ let ds;
579
+ let fields;
580
+ match[1].split(".").forEach((item, index2) => {
581
+ if (index2 === 0) {
582
+ ds = dataSources.value.find((ds2) => ds2.id === item);
583
+ dsText += ds?.title || item;
584
+ fields = ds?.fields;
585
+ return;
586
+ }
587
+ const field = fields?.find((field2) => field2.name === item);
588
+ fields = field?.fields;
589
+ dsText += `.${field?.title || item}`;
590
+ });
591
+ displayState.value.push({
592
+ type: "var",
593
+ value: dsText
594
+ });
595
+ index = match.index + match[0].length;
596
+ }
597
+ if (index < state.value.length) {
598
+ displayState.value.push({
599
+ type: "text",
600
+ value: state.value.substring(index)
601
+ });
602
+ }
603
+ };
604
+ vue.watch(
605
+ () => props.model[props.name],
606
+ (value = "") => {
607
+ state.value = value;
608
+ setDisplayState();
609
+ },
610
+ { immediate: true }
611
+ );
612
+ const mouseupHandler = async () => {
613
+ isFocused.value = true;
614
+ await vue.nextTick();
615
+ autocomplete.value?.focus();
616
+ };
617
+ const blurHandler = () => {
618
+ isFocused.value = false;
619
+ setDisplayState();
620
+ };
621
+ const changeHandler = (v) => {
622
+ emit("change", v);
623
+ };
624
+ let inputText = "";
625
+ const inputHandler = (v) => {
626
+ if (!v) {
627
+ inputText = v;
628
+ }
629
+ };
630
+ const isRightCurlyBracket = (selectionStart = 0) => {
631
+ const lastChar = inputText.substring(selectionStart - 1, selectionStart);
632
+ return lastChar === "}";
633
+ };
634
+ const getSelectionStart = () => {
635
+ let selectionStart = input.value?.selectionStart || 0;
636
+ if (isRightCurlyBracket(selectionStart)) {
637
+ selectionStart -= 1;
638
+ }
639
+ return selectionStart;
640
+ };
641
+ const curCharIsLeftCurlyBracket = (leftCurlyBracketIndex) => leftCurlyBracketIndex > -1 && leftCurlyBracketIndex === getSelectionStart() - 1;
642
+ const curCharIsDot = (dotIndex) => dotIndex > -1 && dotIndex === getSelectionStart() - 1;
643
+ const dsQuerySearch = (queryString, leftCurlyBracketIndex, cb) => {
644
+ let result = [];
645
+ if (curCharIsLeftCurlyBracket(leftCurlyBracketIndex)) {
646
+ result = dataSources.value;
647
+ } else if (leftCurlyBracketIndex > -1) {
648
+ const queryName = queryString.substring(leftCurlyBracketIndex + 1).toLowerCase();
649
+ result = dataSources.value.filter((ds) => ds.title?.toLowerCase().includes(queryName) || ds.id.includes(queryName));
650
+ }
651
+ cb(
652
+ result.map((ds) => ({
653
+ value: ds.id,
654
+ text: ds.title,
655
+ type: "dataSource"
656
+ }))
657
+ );
658
+ };
659
+ const fieldQuerySearch = (queryString, leftAngleIndex, dotIndex, cb) => {
660
+ let result = [];
661
+ const dsKey = queryString.substring(leftAngleIndex + 1, dotIndex);
662
+ const keys = dsKey.split(".");
663
+ const ds = dataSources.value.find((ds2) => ds2.id === keys.shift());
664
+ if (!ds) {
665
+ return;
666
+ }
667
+ let fields = ds.fields || [];
668
+ let key = keys.shift();
669
+ while (key) {
670
+ for (const field of fields) {
671
+ if (field.name === key) {
672
+ fields = field.fields || [];
673
+ key = keys.shift();
674
+ break;
675
+ }
676
+ }
677
+ }
678
+ if (curCharIsDot(dotIndex)) {
679
+ result = fields || [];
680
+ } else if (dotIndex > -1) {
681
+ const queryName = queryString.substring(dotIndex + 1).toLowerCase();
682
+ result = fields.filter(
683
+ (field) => field.name?.toLowerCase().includes(queryName) || field.title?.toLowerCase().includes(queryName)
684
+ ) || [];
685
+ }
686
+ cb(
687
+ result.map((field) => ({
688
+ value: field.name,
689
+ text: field.title,
690
+ type: "field"
691
+ }))
692
+ );
693
+ };
694
+ const querySearch = (queryString, cb) => {
695
+ inputText = queryString;
696
+ const selectionStart = getSelectionStart();
697
+ const curQueryString = queryString.substring(0, selectionStart);
698
+ const fieldKeyStringLastIndex = curQueryString.lastIndexOf(".");
699
+ const dsKeyStringLastIndex = curQueryString.lastIndexOf("{");
700
+ const isFieldTip = fieldKeyStringLastIndex > dsKeyStringLastIndex;
701
+ if (isFieldTip) {
702
+ fieldQuerySearch(curQueryString, dsKeyStringLastIndex, fieldKeyStringLastIndex, cb);
703
+ } else {
704
+ dsQuerySearch(curQueryString, dsKeyStringLastIndex, cb);
705
+ }
706
+ };
707
+ const selectHandler = async ({ value, type }) => {
708
+ const isDataSource = type === "dataSource";
709
+ const selectionStart = input.value?.selectionStart || 0;
710
+ let startText = inputText.substring(0, selectionStart);
711
+ const dotIndex = startText.lastIndexOf(".");
712
+ const leftCurlyBracketIndex = startText.lastIndexOf("{");
713
+ const endText = inputText.substring(selectionStart);
714
+ let suggestText = value;
715
+ if (isDataSource) {
716
+ if (!curCharIsLeftCurlyBracket(leftCurlyBracketIndex)) {
717
+ startText = startText.substring(0, leftCurlyBracketIndex + 1);
718
+ }
719
+ if (!isRightCurlyBracket(selectionStart + 1)) {
720
+ suggestText = `${suggestText}}`;
721
+ }
722
+ suggestText = `{${suggestText}}`;
723
+ } else if (!curCharIsDot(dotIndex)) {
724
+ startText = startText.substring(0, dotIndex + 1);
725
+ }
726
+ state.value = `${startText}${suggestText}${endText}`;
727
+ await vue.nextTick();
728
+ let newSelectionStart = 0;
729
+ if (isDataSource) {
730
+ newSelectionStart = leftCurlyBracketIndex + suggestText.length - 1;
731
+ } else {
732
+ newSelectionStart = dotIndex + suggestText.length + 1;
733
+ }
734
+ input.value?.setSelectionRange(newSelectionStart, newSelectionStart);
735
+ };
736
+ return (_ctx, _cache) => {
737
+ return _ctx.disabled || isFocused.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(design.getConfig)("components")?.autocomplete.component || "el-autocomplete"), vue.mergeProps(
738
+ {
739
+ key: 0,
740
+ class: "tmagic-design-auto-complete",
741
+ ref_key: "autocomplete",
742
+ ref: autocomplete,
743
+ modelValue: state.value,
744
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.value = $event)
745
+ },
746
+ vue.unref(design.getConfig)("components")?.autocomplete.props({
747
+ disabled: _ctx.disabled,
748
+ size: _ctx.size,
749
+ fetchSuggestions: querySearch,
750
+ triggerOnFocus: false,
751
+ clearable: true
752
+ }) || {},
753
+ {
754
+ style: { "width": "100%" },
755
+ onBlur: blurHandler,
756
+ onChange: changeHandler,
757
+ onInput: inputHandler,
758
+ onSelect: selectHandler
759
+ }
760
+ ), {
761
+ suffix: vue.withCtx(() => [
762
+ vue.createVNode(_sfc_main$B, { icon: vue.unref(iconsVue.Coin) }, null, 8, ["icon"])
763
+ ]),
764
+ default: vue.withCtx(({ item }) => [
765
+ vue.createElementVNode("div", _hoisted_1$j, [
766
+ vue.createElementVNode("div", null, vue.toDisplayString(item.text), 1),
767
+ vue.createElementVNode("span", _hoisted_2$c, vue.toDisplayString(item.value), 1)
768
+ ])
769
+ ]),
770
+ _: 1
771
+ }, 16, ["modelValue"])) : (vue.openBlock(), vue.createElementBlock("div", {
772
+ key: 1,
773
+ class: vue.normalizeClass(`el-input el-input--${_ctx.size}`),
774
+ onMouseup: mouseupHandler
775
+ }, [
776
+ vue.createElementVNode("div", {
777
+ class: vue.normalizeClass(`el-input__wrapper ${isFocused.value ? " is-focus" : ""}`)
778
+ }, [
779
+ vue.createElementVNode("div", _hoisted_3$5, [
780
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayState.value, (item, index) => {
781
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
782
+ item.type === "text" ? (vue.openBlock(), vue.createElementBlock("span", {
783
+ key: index,
784
+ style: { "margin-right": "2px" }
785
+ }, vue.toDisplayString(item.value), 1)) : vue.createCommentVNode("", true),
786
+ item.type === "var" ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTag), {
787
+ key: index,
788
+ size: _ctx.size
789
+ }, {
790
+ default: vue.withCtx(() => [
791
+ vue.createTextVNode(vue.toDisplayString(item.value), 1)
792
+ ]),
793
+ _: 2
794
+ }, 1032, ["size"])) : vue.createCommentVNode("", true)
795
+ ], 64);
796
+ }), 256))
797
+ ])
798
+ ], 2)
799
+ ], 34));
800
+ };
801
+ }
802
+ });
803
+
804
+ const _hoisted_1$i = { class: "m-fields-event-select" };
805
+ const _hoisted_2$b = {
537
806
  key: 1,
538
807
  class: "fullWidth"
539
808
  };
540
- const _hoisted_3$7 = /* @__PURE__ */ vue.createTextVNode("添加事件");
541
- const __default__$r = vue.defineComponent({
542
- name: "MEditorEventSelect"
543
- });
544
809
  const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
545
- ...__default__$r,
810
+ ...{
811
+ name: "MEditorEventSelect"
812
+ },
813
+ __name: "EventSelect",
546
814
  props: {
547
- config: null,
548
- model: null,
549
- prop: null,
550
- name: null,
551
- size: null
815
+ config: {},
816
+ model: {},
817
+ prop: {},
818
+ name: {},
819
+ size: {}
552
820
  },
553
821
  emits: ["change"],
554
822
  setup(__props, { emit }) {
@@ -665,6 +933,7 @@
665
933
  {
666
934
  type: "group-list",
667
935
  name: "actions",
936
+ expandAll: true,
668
937
  enableToggleMode: false,
669
938
  items: [actionTypeConfig.value, targetCompConfig.value, compActionConfig.value, codeActionConfig.value]
670
939
  }
@@ -699,16 +968,16 @@
699
968
  const _component_m_form_table = vue.resolveComponent("m-form-table");
700
969
  const _component_m_form_container = vue.resolveComponent("m-form-container");
701
970
  const _component_m_form_panel = vue.resolveComponent("m-form-panel");
702
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$k, [
703
- vue.unref(isOldVersion) ? (vue.openBlock(), vue.createBlock(_component_m_form_table, {
971
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$i, [
972
+ isOldVersion.value ? (vue.openBlock(), vue.createBlock(_component_m_form_table, {
704
973
  key: 0,
705
974
  ref: "eventForm",
706
975
  size: props.size,
707
- model: __props.model,
976
+ model: _ctx.model,
708
977
  name: "events",
709
- config: vue.unref(tableConfig),
978
+ config: tableConfig.value,
710
979
  onChange: onChangeHandler
711
- }, null, 8, ["size", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$c, [
980
+ }, null, 8, ["size", "model", "config"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$b, [
712
981
  vue.createVNode(vue.unref(design.TMagicButton), {
713
982
  class: "create-button",
714
983
  type: "primary",
@@ -716,21 +985,21 @@
716
985
  onClick: _cache[0] || (_cache[0] = ($event) => addEvent())
717
986
  }, {
718
987
  default: vue.withCtx(() => [
719
- _hoisted_3$7
988
+ vue.createTextVNode("添加事件")
720
989
  ]),
721
990
  _: 1
722
991
  }),
723
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.model[__props.name], (cardItem, index) => {
992
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.model[_ctx.name], (cardItem, index) => {
724
993
  return vue.openBlock(), vue.createBlock(_component_m_form_panel, {
725
994
  key: index,
726
- config: vue.unref(actionsConfig),
995
+ config: actionsConfig.value,
727
996
  model: cardItem,
728
997
  onChange: onChangeHandler
729
998
  }, {
730
999
  header: vue.withCtx(() => [
731
1000
  vue.createVNode(_component_m_form_container, {
732
1001
  class: "fullWidth",
733
- config: vue.unref(eventNameConfig),
1002
+ config: eventNameConfig.value,
734
1003
  model: cardItem,
735
1004
  onChange: onChangeHandler
736
1005
  }, null, 8, ["config", "model"]),
@@ -750,19 +1019,21 @@
750
1019
  }
751
1020
  });
752
1021
 
753
- const _hoisted_1$j = { class: "m-fields-key-value" };
754
- const _hoisted_2$b = /* @__PURE__ */ vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
755
- const _hoisted_3$6 = /* @__PURE__ */ vue.createTextVNode("添加");
1022
+ const _hoisted_1$h = { class: "m-fields-key-value" };
1023
+ const _hoisted_2$a = /* @__PURE__ */ vue.createElementVNode("span", { class: "m-fileds-key-value-delimiter" }, ":", -1);
756
1024
  const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
1025
+ ...{
1026
+ name: "MEditorKeyValue"
1027
+ },
757
1028
  __name: "KeyValue",
758
1029
  props: {
759
- config: null,
760
- model: null,
761
- name: null,
762
- prop: null,
1030
+ config: {},
1031
+ model: {},
1032
+ name: {},
1033
+ prop: {},
763
1034
  disabled: { type: Boolean, default: false },
764
- lastValues: null,
765
- size: null
1035
+ lastValues: {},
1036
+ size: {}
766
1037
  },
767
1038
  emits: ["change"],
768
1039
  setup(__props, { emit }) {
@@ -793,7 +1064,7 @@
793
1064
  records.value.splice(index, 1);
794
1065
  };
795
1066
  return (_ctx, _cache) => {
796
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$j, [
1067
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
797
1068
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(records.value, (item, index) => {
798
1069
  return vue.openBlock(), vue.createElementBlock("div", {
799
1070
  class: "m-fields-key-value-item",
@@ -803,23 +1074,23 @@
803
1074
  placeholder: "key",
804
1075
  modelValue: records.value[index][0],
805
1076
  "onUpdate:modelValue": ($event) => records.value[index][0] = $event,
806
- disabled: __props.disabled,
807
- size: __props.size,
1077
+ disabled: _ctx.disabled,
1078
+ size: _ctx.size,
808
1079
  onChange: keyChangeHandler
809
1080
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
810
- _hoisted_2$b,
1081
+ _hoisted_2$a,
811
1082
  vue.createVNode(vue.unref(design.TMagicInput), {
812
1083
  placeholder: "value",
813
1084
  modelValue: records.value[index][1],
814
1085
  "onUpdate:modelValue": ($event) => records.value[index][1] = $event,
815
- disabled: __props.disabled,
816
- size: __props.size,
1086
+ disabled: _ctx.disabled,
1087
+ size: _ctx.size,
817
1088
  onChange: valueChangeHandler
818
1089
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "size"]),
819
1090
  vue.createVNode(vue.unref(design.TMagicButton), {
820
1091
  class: "m-fileds-key-value-delete",
821
1092
  type: "danger",
822
- size: __props.size,
1093
+ size: _ctx.size,
823
1094
  circle: "",
824
1095
  plain: "",
825
1096
  icon: vue.unref(iconsVue.Delete),
@@ -829,13 +1100,13 @@
829
1100
  }), 128)),
830
1101
  vue.createVNode(vue.unref(design.TMagicButton), {
831
1102
  type: "primary",
832
- size: __props.size,
1103
+ size: _ctx.size,
833
1104
  plain: "",
834
1105
  icon: vue.unref(iconsVue.Plus),
835
1106
  onClick: addHandler
836
1107
  }, {
837
1108
  default: vue.withCtx(() => [
838
- _hoisted_3$6
1109
+ vue.createTextVNode("添加")
839
1110
  ]),
840
1111
  _: 1
841
1112
  }, 8, ["size", "icon"])
@@ -844,17 +1115,16 @@
844
1115
  }
845
1116
  });
846
1117
 
847
- const _hoisted_1$i = /* @__PURE__ */ vue.createTextVNode("取消");
848
- const __default__$q = vue.defineComponent({
849
- name: "MEditorUISelect"
850
- });
851
1118
  const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
852
- ...__default__$q,
1119
+ ...{
1120
+ name: "MEditorUISelect"
1121
+ },
1122
+ __name: "UISelect",
853
1123
  props: {
854
- config: null,
855
- model: null,
856
- prop: null,
857
- name: null
1124
+ config: {},
1125
+ model: {},
1126
+ prop: {},
1127
+ name: {}
858
1128
  },
859
1129
  emits: ["change"],
860
1130
  setup(__props, { emit }) {
@@ -911,7 +1181,7 @@
911
1181
  style: { "padding": "0" }
912
1182
  }, {
913
1183
  default: vue.withCtx(() => [
914
- _hoisted_1$i
1184
+ vue.createTextVNode("取消")
915
1185
  ]),
916
1186
  _: 1
917
1187
  }, 8, ["icon"])
@@ -921,7 +1191,7 @@
921
1191
  onClick: startSelect,
922
1192
  style: { "display": "flex" }
923
1193
  }, [
924
- vue.unref(val) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
1194
+ val.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
925
1195
  key: 0,
926
1196
  content: "清除"
927
1197
  }, {
@@ -937,7 +1207,7 @@
937
1207
  _: 1
938
1208
  })) : vue.createCommentVNode("", true),
939
1209
  vue.createVNode(vue.unref(design.TMagicTooltip), {
940
- content: vue.unref(val) ? vue.unref(toName) + "_" + vue.unref(val) : "点击此处选择"
1210
+ content: val.value ? toName.value + "_" + val.value : "点击此处选择"
941
1211
  }, {
942
1212
  default: vue.withCtx(() => [
943
1213
  vue.createVNode(vue.unref(design.TMagicButton), {
@@ -945,7 +1215,7 @@
945
1215
  style: { "padding": "0", "margin": "0" }
946
1216
  }, {
947
1217
  default: vue.withCtx(() => [
948
- vue.createTextVNode(vue.toDisplayString(vue.unref(val) ? vue.unref(toName) + "_" + vue.unref(val) : "点击此处选择"), 1)
1218
+ vue.createTextVNode(vue.toDisplayString(val.value ? toName.value + "_" + val.value : "点击此处选择"), 1)
949
1219
  ]),
950
1220
  _: 1
951
1221
  })
@@ -959,15 +1229,15 @@
959
1229
 
960
1230
  const UISelect_vue_vue_type_style_index_0_lang = '';
961
1231
 
962
- const __default__$p = vue.defineComponent({
963
- name: "MEditorCodeEditor"
964
- });
965
1232
  const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
966
- ...__default__$p,
1233
+ ...{
1234
+ name: "MEditorCodeEditor"
1235
+ },
1236
+ __name: "CodeEditor",
967
1237
  props: {
968
- initValues: null,
969
- modifiedValues: null,
970
- type: null,
1238
+ initValues: {},
1239
+ modifiedValues: {},
1240
+ type: {},
971
1241
  language: { default: "javascript" },
972
1242
  options: { default: () => ({
973
1243
  tabSize: 2
@@ -975,7 +1245,7 @@
975
1245
  autoSave: { type: Boolean, default: true }
976
1246
  },
977
1247
  emits: ["initd", "save"],
978
- setup(__props, { expose, emit }) {
1248
+ setup(__props, { expose: __expose, emit }) {
979
1249
  const props = __props;
980
1250
  const toString = (v, language) => {
981
1251
  let value = "";
@@ -1066,7 +1336,7 @@
1066
1336
  vue.onUnmounted(() => {
1067
1337
  resizeObserver.disconnect();
1068
1338
  });
1069
- expose({
1339
+ __expose({
1070
1340
  getEditor() {
1071
1341
  return vsEditor || vsDiffEditor;
1072
1342
  },
@@ -1092,11 +1362,11 @@
1092
1362
  };
1093
1363
  const getConfig = (key) => $TMAGIC_EDITOR[key];
1094
1364
 
1095
- const __default__$o = vue.defineComponent({
1096
- name: "MEditorResizer"
1097
- });
1098
1365
  const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
1099
- ...__default__$o,
1366
+ ...{
1367
+ name: "MEditorResizer"
1368
+ },
1369
+ __name: "Resizer",
1100
1370
  emits: ["change"],
1101
1371
  setup(__props, { emit }) {
1102
1372
  const target = vue.ref();
@@ -1128,20 +1398,20 @@
1128
1398
  }
1129
1399
  });
1130
1400
 
1131
- const __default__$n = vue.defineComponent({
1132
- name: "MEditorLayout"
1133
- });
1134
1401
  const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
1135
- ...__default__$n,
1402
+ ...{
1403
+ name: "MEditorLayout"
1404
+ },
1405
+ __name: "Layout",
1136
1406
  props: {
1137
- left: null,
1138
- right: null,
1407
+ left: {},
1408
+ right: {},
1139
1409
  minLeft: { default: 46 },
1140
1410
  minRight: { default: 1 },
1141
1411
  minCenter: { default: 5 },
1142
- leftClass: null,
1143
- rightClass: null,
1144
- centerClass: null
1412
+ leftClass: {},
1413
+ rightClass: {},
1414
+ centerClass: {}
1145
1415
  },
1146
1416
  emits: ["update:left", "change", "update:right"],
1147
1417
  setup(__props, { emit }) {
@@ -1233,26 +1503,26 @@
1233
1503
  ref: el,
1234
1504
  class: "m-editor-layout"
1235
1505
  }, [
1236
- vue.unref(hasLeft) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1506
+ hasLeft.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1237
1507
  vue.createElementVNode("div", {
1238
- class: vue.normalizeClass(["m-editor-layout-left", __props.leftClass]),
1239
- style: vue.normalizeStyle(`width: ${__props.left}px`)
1508
+ class: vue.normalizeClass(["m-editor-layout-left", _ctx.leftClass]),
1509
+ style: vue.normalizeStyle(`width: ${_ctx.left}px`)
1240
1510
  }, [
1241
1511
  vue.renderSlot(_ctx.$slots, "left")
1242
1512
  ], 6),
1243
1513
  vue.createVNode(_sfc_main$t, { onChange: changeLeft })
1244
1514
  ], 64)) : vue.createCommentVNode("", true),
1245
1515
  vue.createElementVNode("div", {
1246
- class: vue.normalizeClass(["m-editor-layout-center", __props.centerClass]),
1516
+ class: vue.normalizeClass(["m-editor-layout-center", _ctx.centerClass]),
1247
1517
  style: vue.normalizeStyle(`width: ${center.value}px`)
1248
1518
  }, [
1249
1519
  vue.renderSlot(_ctx.$slots, "center")
1250
1520
  ], 6),
1251
- vue.unref(hasRight) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1521
+ hasRight.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1252
1522
  vue.createVNode(_sfc_main$t, { onChange: changeRight }),
1253
1523
  vue.createElementVNode("div", {
1254
- class: vue.normalizeClass(["m-editor-layout-right", __props.rightClass]),
1255
- style: vue.normalizeStyle(`width: ${__props.right}px`)
1524
+ class: vue.normalizeClass(["m-editor-layout-right", _ctx.rightClass]),
1525
+ style: vue.normalizeStyle(`width: ${_ctx.right}px`)
1256
1526
  }, [
1257
1527
  vue.renderSlot(_ctx.$slots, "right")
1258
1528
  ], 6)
@@ -3116,14 +3386,14 @@
3116
3386
  return stage;
3117
3387
  };
3118
3388
 
3119
- const _hoisted_1$h = { class: "m-editor-empty-panel" };
3120
- const _hoisted_2$a = { class: "m-editor-empty-content" };
3121
- const _hoisted_3$5 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面", -1);
3122
- const __default__$m = vue.defineComponent({
3123
- name: "MEditorAddPageBox"
3124
- });
3389
+ const _hoisted_1$g = { class: "m-editor-empty-panel" };
3390
+ const _hoisted_2$9 = { class: "m-editor-empty-content" };
3391
+ const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("p", null, "新增页面", -1);
3125
3392
  const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
3126
- ...__default__$m,
3393
+ ...{
3394
+ name: "MEditorAddPageBox"
3395
+ },
3396
+ __name: "AddPageBox",
3127
3397
  setup(__props) {
3128
3398
  const services = vue.inject("services");
3129
3399
  const clickHandler = () => {
@@ -3139,16 +3409,16 @@
3139
3409
  });
3140
3410
  };
3141
3411
  return (_ctx, _cache) => {
3142
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$h, [
3143
- vue.createElementVNode("div", _hoisted_2$a, [
3412
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
3413
+ vue.createElementVNode("div", _hoisted_2$9, [
3144
3414
  vue.createElementVNode("div", {
3145
3415
  class: "m-editor-empty-button",
3146
3416
  onClick: clickHandler
3147
3417
  }, [
3148
3418
  vue.createElementVNode("div", null, [
3149
- vue.createVNode(_sfc_main$A, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
3419
+ vue.createVNode(_sfc_main$B, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
3150
3420
  ]),
3151
- _hoisted_3$5
3421
+ _hoisted_3$4
3152
3422
  ])
3153
3423
  ])
3154
3424
  ]);
@@ -3156,25 +3426,25 @@
3156
3426
  }
3157
3427
  });
3158
3428
 
3159
- const _hoisted_1$g = { class: "m-editor" };
3160
- const __default__$l = vue.defineComponent({
3161
- name: "MEditorFramework"
3162
- });
3429
+ const _hoisted_1$f = { class: "m-editor" };
3430
+ const DEFAULT_LEFT_COLUMN_WIDTH = 310;
3431
+ const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
3432
+ const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
3433
+ const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
3163
3434
  const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
3164
- ...__default__$l,
3435
+ ...{
3436
+ name: "MEditorFramework"
3437
+ },
3438
+ __name: "Framework",
3165
3439
  props: {
3166
3440
  codeOptions: { default: () => ({}) }
3167
3441
  },
3168
3442
  setup(__props) {
3169
- const DEFAULT_LEFT_COLUMN_WIDTH = 310;
3170
- const DEFAULT_RIGHT_COLUMN_WIDTH = 480;
3171
3443
  const { editorService, uiService } = vue.inject("services") || {};
3172
3444
  const root = vue.computed(() => editorService?.get("root"));
3173
3445
  const nodes = vue.computed(() => editorService?.get("nodes") || []);
3174
3446
  const pageLength = vue.computed(() => editorService?.get("pageLength") || 0);
3175
3447
  const showSrc = vue.computed(() => uiService?.get("showSrc"));
3176
- const LEFT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorLeftColumnWidthData";
3177
- const RIGHT_COLUMN_WIDTH_STORAGE_KEY = "$MagicEditorRightColumnWidthData";
3178
3448
  const leftColumnWidthCacheData = Number(globalThis.localStorage.getItem(LEFT_COLUMN_WIDTH_STORAGE_KEY));
3179
3449
  const RightColumnWidthCacheData = Number(globalThis.localStorage.getItem(RIGHT_COLUMN_WIDTH_STORAGE_KEY));
3180
3450
  const columnWidth = vue.ref({
@@ -3230,13 +3500,13 @@
3230
3500
  };
3231
3501
  return (_ctx, _cache) => {
3232
3502
  const _component_magic_code_editor = vue.resolveComponent("magic-code-editor");
3233
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$g, [
3503
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
3234
3504
  vue.renderSlot(_ctx.$slots, "nav", { class: "m-editor-nav-menu" }),
3235
- vue.unref(showSrc) ? (vue.openBlock(), vue.createBlock(_component_magic_code_editor, {
3505
+ showSrc.value ? (vue.openBlock(), vue.createBlock(_component_magic_code_editor, {
3236
3506
  key: 0,
3237
3507
  class: "m-editor-content",
3238
- "init-values": vue.unref(root),
3239
- options: __props.codeOptions,
3508
+ "init-values": root.value,
3509
+ options: _ctx.codeOptions,
3240
3510
  onSave: saveCode
3241
3511
  }, null, 8, ["init-values", "options"])) : (vue.openBlock(), vue.createBlock(_sfc_main$s, {
3242
3512
  key: 1,
@@ -3256,13 +3526,13 @@
3256
3526
  vue.renderSlot(_ctx.$slots, "sidebar")
3257
3527
  ]),
3258
3528
  center: vue.withCtx(() => [
3259
- vue.unref(pageLength) > 0 ? vue.renderSlot(_ctx.$slots, "workspace", { key: 0 }) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
3529
+ pageLength.value > 0 ? vue.renderSlot(_ctx.$slots, "workspace", { key: 0 }) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
3260
3530
  vue.createVNode(_sfc_main$r)
3261
3531
  ])
3262
3532
  ]),
3263
3533
  _: 2
3264
3534
  }, [
3265
- vue.unref(pageLength) > 0 && vue.unref(nodes).length === 1 ? {
3535
+ pageLength.value > 0 && nodes.value.length === 1 ? {
3266
3536
  name: "right",
3267
3537
  fn: vue.withCtx(() => [
3268
3538
  vue.createVNode(vue.unref(design.TMagicScrollbar), null, {
@@ -3271,7 +3541,8 @@
3271
3541
  ]),
3272
3542
  _: 3
3273
3543
  })
3274
- ])
3544
+ ]),
3545
+ key: "0"
3275
3546
  } : void 0
3276
3547
  ]), 1032, ["left", "right"]))
3277
3548
  ]);
@@ -3279,16 +3550,16 @@
3279
3550
  }
3280
3551
  });
3281
3552
 
3282
- const _hoisted_1$f = {
3553
+ const _hoisted_1$e = {
3283
3554
  key: 1,
3284
3555
  class: "menu-item-text"
3285
3556
  };
3286
- const _hoisted_2$9 = { class: "el-dropdown-link menubar-menu-button" };
3287
- const __default__$k = vue.defineComponent({
3288
- name: "MEditorToolButton"
3289
- });
3557
+ const _hoisted_2$8 = { class: "el-dropdown-link menubar-menu-button" };
3290
3558
  const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
3291
- ...__default__$k,
3559
+ ...{
3560
+ name: "MEditorToolButton"
3561
+ },
3562
+ __name: "ToolButton",
3292
3563
  props: {
3293
3564
  data: { default: () => ({
3294
3565
  type: "text",
@@ -3353,35 +3624,35 @@
3353
3624
  }
3354
3625
  };
3355
3626
  return (_ctx, _cache) => {
3356
- return vue.unref(display) ? (vue.openBlock(), vue.createElementBlock("div", {
3627
+ return display.value ? (vue.openBlock(), vue.createElementBlock("div", {
3357
3628
  key: 0,
3358
- class: vue.normalizeClass(["menu-item", `${__props.data.type} ${__props.data.className || ""}`]),
3359
- onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(__props.data, $event)),
3360
- onMousedown: _cache[1] || (_cache[1] = ($event) => mousedownHandler(__props.data, $event)),
3361
- onMouseup: _cache[2] || (_cache[2] = ($event) => mouseupHandler(__props.data, $event))
3629
+ class: vue.normalizeClass(["menu-item", `${_ctx.data.type} ${_ctx.data.className || ""}`]),
3630
+ onClick: _cache[0] || (_cache[0] = ($event) => clickHandler(_ctx.data, $event)),
3631
+ onMousedown: _cache[1] || (_cache[1] = ($event) => mousedownHandler(_ctx.data, $event)),
3632
+ onMouseup: _cache[2] || (_cache[2] = ($event) => mouseupHandler(_ctx.data, $event))
3362
3633
  }, [
3363
- __props.data.type === "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDivider), {
3634
+ _ctx.data.type === "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDivider), {
3364
3635
  key: 0,
3365
- direction: __props.data.direction || "vertical"
3366
- }, null, 8, ["direction"])) : __props.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, vue.toDisplayString(__props.data.text), 1)) : __props.data.type === "button" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
3367
- __props.data.tooltip ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
3636
+ direction: _ctx.data.direction || "vertical"
3637
+ }, null, 8, ["direction"])) : _ctx.data.type === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, vue.toDisplayString(_ctx.data.text), 1)) : _ctx.data.type === "button" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
3638
+ _ctx.data.tooltip ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
3368
3639
  key: 0,
3369
3640
  effect: "dark",
3370
3641
  placement: "bottom-start",
3371
- content: __props.data.tooltip
3642
+ content: _ctx.data.tooltip
3372
3643
  }, {
3373
3644
  default: vue.withCtx(() => [
3374
3645
  vue.createVNode(vue.unref(design.TMagicButton), {
3375
3646
  size: "small",
3376
3647
  text: "",
3377
- disabled: vue.unref(disabled)
3648
+ disabled: disabled.value
3378
3649
  }, {
3379
3650
  default: vue.withCtx(() => [
3380
- __props.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
3651
+ _ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
3381
3652
  key: 0,
3382
- icon: __props.data.icon
3653
+ icon: _ctx.data.icon
3383
3654
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
3384
- vue.createElementVNode("span", null, vue.toDisplayString(__props.data.text), 1)
3655
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.data.text), 1)
3385
3656
  ]),
3386
3657
  _: 1
3387
3658
  }, 8, ["disabled"])
@@ -3391,30 +3662,30 @@
3391
3662
  key: 1,
3392
3663
  size: "small",
3393
3664
  text: "",
3394
- disabled: vue.unref(disabled)
3665
+ disabled: disabled.value
3395
3666
  }, {
3396
3667
  default: vue.withCtx(() => [
3397
- __props.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
3668
+ _ctx.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
3398
3669
  key: 0,
3399
- icon: __props.data.icon
3670
+ icon: _ctx.data.icon
3400
3671
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
3401
- vue.createElementVNode("span", null, vue.toDisplayString(__props.data.text), 1)
3672
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.data.text), 1)
3402
3673
  ]),
3403
3674
  _: 1
3404
3675
  }, 8, ["disabled"]))
3405
- ], 64)) : __props.data.type === "dropdown" ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDropdown), {
3676
+ ], 64)) : _ctx.data.type === "dropdown" ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDropdown), {
3406
3677
  key: 3,
3407
3678
  trigger: "click",
3408
- disabled: vue.unref(disabled),
3679
+ disabled: disabled.value,
3409
3680
  onCommand: dropdownHandler
3410
3681
  }, {
3411
3682
  dropdown: vue.withCtx(() => [
3412
- __props.data.items && __props.data.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDropdownMenu), { key: 0 }, {
3683
+ _ctx.data.items && _ctx.data.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDropdownMenu), { key: 0 }, {
3413
3684
  default: vue.withCtx(() => [
3414
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.data.items, (subItem, index) => {
3685
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.data.items, (subItem, index) => {
3415
3686
  return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDropdownItem), {
3416
3687
  key: index,
3417
- command: { data: __props.data, subItem }
3688
+ command: { data: _ctx.data, subItem }
3418
3689
  }, {
3419
3690
  default: vue.withCtx(() => [
3420
3691
  vue.createTextVNode(vue.toDisplayString(subItem.text), 1)
@@ -3427,8 +3698,8 @@
3427
3698
  })) : vue.createCommentVNode("", true)
3428
3699
  ]),
3429
3700
  default: vue.withCtx(() => [
3430
- vue.createElementVNode("span", _hoisted_2$9, [
3431
- vue.createTextVNode(vue.toDisplayString(__props.data.text), 1),
3701
+ vue.createElementVNode("span", _hoisted_2$8, [
3702
+ vue.createTextVNode(vue.toDisplayString(_ctx.data.text), 1),
3432
3703
  vue.createVNode(vue.unref(design.TMagicIcon), { class: "el-icon--right" }, {
3433
3704
  default: vue.withCtx(() => [
3434
3705
  vue.createVNode(vue.unref(iconsVue.ArrowDown))
@@ -3438,17 +3709,17 @@
3438
3709
  ])
3439
3710
  ]),
3440
3711
  _: 1
3441
- }, 8, ["disabled"])) : __props.data.type === "component" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.data.component), vue.normalizeProps(vue.mergeProps({ key: 4 }, __props.data.props || {})), null, 16)) : vue.createCommentVNode("", true)
3712
+ }, 8, ["disabled"])) : _ctx.data.type === "component" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.data.component), vue.normalizeProps(vue.mergeProps({ key: 4 }, _ctx.data.props || {})), null, 16)) : vue.createCommentVNode("", true)
3442
3713
  ], 34)) : vue.createCommentVNode("", true);
3443
3714
  };
3444
3715
  }
3445
3716
  });
3446
3717
 
3447
- const __default__$j = vue.defineComponent({
3448
- name: "MEditorNavMenu"
3449
- });
3450
3718
  const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
3451
- ...__default__$j,
3719
+ ...{
3720
+ name: "MEditorNavMenu"
3721
+ },
3722
+ __name: "NavMenu",
3452
3723
  props: {
3453
3724
  data: { default: () => ({}) },
3454
3725
  height: { default: 35 }
@@ -3597,15 +3868,15 @@
3597
3868
  return (_ctx, _cache) => {
3598
3869
  return vue.openBlock(), vue.createElementBlock("div", {
3599
3870
  class: "m-editor-nav-menu",
3600
- style: vue.normalizeStyle({ height: `${__props.height}px` })
3871
+ style: vue.normalizeStyle({ height: `${_ctx.height}px` })
3601
3872
  }, [
3602
3873
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(keys), (key) => {
3603
3874
  return vue.openBlock(), vue.createElementBlock("div", {
3604
3875
  class: vue.normalizeClass(`menu-${key}`),
3605
3876
  key,
3606
- style: vue.normalizeStyle(`width: ${vue.unref(columnWidth)?.[key]}px`)
3877
+ style: vue.normalizeStyle(`width: ${columnWidth.value?.[key]}px`)
3607
3878
  }, [
3608
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(buttons)[key], (item, index) => {
3879
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(buttons.value[key], (item, index) => {
3609
3880
  return vue.openBlock(), vue.createBlock(_sfc_main$p, {
3610
3881
  data: item,
3611
3882
  key: index
@@ -3618,14 +3889,14 @@
3618
3889
  }
3619
3890
  });
3620
3891
 
3621
- const _hoisted_1$e = { class: "m-editor-props-panel" };
3622
- const __default__$i = vue.defineComponent({
3623
- name: "MEditorPropsPanel"
3624
- });
3892
+ const _hoisted_1$d = { class: "m-editor-props-panel" };
3625
3893
  const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
3626
- ...__default__$i,
3894
+ ...{
3895
+ name: "MEditorPropsPanel"
3896
+ },
3897
+ __name: "PropsPanel",
3627
3898
  emits: ["mounted"],
3628
- setup(__props, { expose, emit }) {
3899
+ setup(__props, { expose: __expose, emit }) {
3629
3900
  const internalInstance = vue.getCurrentInstance();
3630
3901
  const values = vue.ref({});
3631
3902
  const configForm = vue.ref();
@@ -3666,16 +3937,16 @@
3666
3937
  design.tMagicMessage.error(e.message);
3667
3938
  }
3668
3939
  };
3669
- expose({ submit });
3940
+ __expose({ submit });
3670
3941
  return (_ctx, _cache) => {
3671
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
3942
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
3672
3943
  vue.renderSlot(_ctx.$slots, "props-panel-header"),
3673
3944
  vue.createVNode(vue.unref(form.MForm), {
3674
3945
  ref_key: "configForm",
3675
3946
  ref: configForm,
3676
- class: vue.normalizeClass(`m-editor-props-panel ${vue.unref(propsPanelSize)}`),
3677
- "popper-class": `m-editor-props-panel-popper ${vue.unref(propsPanelSize)}`,
3678
- size: vue.unref(propsPanelSize),
3947
+ class: vue.normalizeClass(`m-editor-props-panel ${propsPanelSize.value}`),
3948
+ "popper-class": `m-editor-props-panel-popper ${propsPanelSize.value}`,
3949
+ size: propsPanelSize.value,
3679
3950
  "init-values": values.value,
3680
3951
  config: curFormConfig.value,
3681
3952
  onChange: submit
@@ -3686,6 +3957,9 @@
3686
3957
  });
3687
3958
 
3688
3959
  const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
3960
+ ...{
3961
+ name: "MEditorSearchInput"
3962
+ },
3689
3963
  __name: "SearchInput",
3690
3964
  emits: ["search"],
3691
3965
  setup(__props, { emit }) {
@@ -3717,80 +3991,77 @@
3717
3991
  }
3718
3992
  });
3719
3993
 
3720
- const _export_sfc = (sfc, props) => {
3721
- const target = sfc.__vccOpts || sfc;
3722
- for (const [key, val] of props) {
3723
- target[key] = val;
3724
- }
3725
- return target;
3726
- };
3727
-
3728
- const _sfc_main$l = {};
3729
-
3730
- const _hoisted_1$d = { xmlns: "http://www.w3.org/2000/svg" };
3731
- const _hoisted_2$8 = /*#__PURE__*/vue.createElementVNode("g", {
3994
+ const _hoisted_1$c = { xmlns: "http://www.w3.org/2000/svg" };
3995
+ const _hoisted_2$7 = /* @__PURE__ */ vue.createElementVNode("g", {
3732
3996
  fill: "#7C878E",
3733
3997
  "fill-rule": "evenodd"
3734
3998
  }, [
3735
- /*#__PURE__*/vue.createElementVNode("path", {
3999
+ /* @__PURE__ */ vue.createElementVNode("path", {
3736
4000
  d: "M15.3,5.5 L8,0 L0.7,5.5 L8,11 L15.3,5.5 Z M8,2.5 L12,5.5 L8,8.5 L4,5.5 L8,2.5 Z",
3737
4001
  "fill-rule": "nonzero"
3738
4002
  }),
3739
- /*#__PURE__*/vue.createElementVNode("path", { d: "M8 13.5L2.3 9.2 0.7 10.5 8 16 15.3 10.5 13.7 9.2z" })
4003
+ /* @__PURE__ */ vue.createElementVNode("path", { d: "M8 13.5L2.3 9.2 0.7 10.5 8 16 15.3 10.5 13.7 9.2z" })
3740
4004
  ], -1);
3741
- const _hoisted_3$4 = [
3742
- _hoisted_2$8
4005
+ const _hoisted_3$3 = [
4006
+ _hoisted_2$7
3743
4007
  ];
4008
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
4009
+ ...{
4010
+ name: "MEditorAppManageIcon"
4011
+ },
4012
+ __name: "AppManageIcon",
4013
+ setup(__props) {
4014
+ return (_ctx, _cache) => {
4015
+ return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$c, _hoisted_3$3);
4016
+ };
4017
+ }
4018
+ });
3744
4019
 
3745
- function _sfc_render$2(_ctx, _cache) {
3746
- return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$d, _hoisted_3$4))
3747
- }
3748
- const AppManageIcon = /*#__PURE__*/_export_sfc(_sfc_main$l, [['render',_sfc_render$2]]);
3749
-
3750
- const _sfc_main$k = {};
3751
-
3752
- const _hoisted_1$c = {
4020
+ const _hoisted_1$b = {
3753
4021
  viewBox: "0 0 32 32",
3754
4022
  version: "1.1",
3755
4023
  xmlns: "http://www.w3.org/2000/svg",
3756
4024
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
3757
4025
  };
3758
- const _hoisted_2$7 = /*#__PURE__*/vue.createStaticVNode("<defs><rect id=\"path-1\" x=\"0\" y=\"0\" width=\"32\" height=\"32\"></rect></defs><g id=\"组件规范\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"03图标\" transform=\"translate(-561.000000, -2356.000000)\"><g id=\"icon/line/Universal/code\" transform=\"translate(561.000000, 2356.000000)\"><g id=\"路径\"><mask id=\"mask-2\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask><use id=\"蒙版\" fill=\"#D8D8D8\" opacity=\"0\" xlink:href=\"#path-1\"></use><path d=\"M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z\" id=\"形状\" fill=\"#1D1F24\" mask=\"url(#mask-2)\"></path></g></g><g id=\"icon切图\" transform=\"translate(226.000000, 1782.000000)\"></g></g></g>", 2);
3759
- const _hoisted_4$4 = [
3760
- _hoisted_2$7
4026
+ const _hoisted_2$6 = /* @__PURE__ */ vue.createStaticVNode('<defs><rect id="path-1" x="0" y="0" width="32" height="32"></rect></defs><g id="组件规范" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="03图标" transform="translate(-561.000000, -2356.000000)"><g id="icon/line/Universal/code" transform="translate(561.000000, 2356.000000)"><g id="路径"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="蒙版" fill="#D8D8D8" opacity="0" xlink:href="#path-1"></use><path d="M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z" id="形状" fill="#1D1F24" mask="url(#mask-2)"></path></g></g><g id="icon切图" transform="translate(226.000000, 1782.000000)"></g></g></g>', 2);
4027
+ const _hoisted_4$3 = [
4028
+ _hoisted_2$6
3761
4029
  ];
4030
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
4031
+ ...{
4032
+ name: "MEditorCodeIcon"
4033
+ },
4034
+ __name: "CodeIcon",
4035
+ setup(__props) {
4036
+ return (_ctx, _cache) => {
4037
+ return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$b, _hoisted_4$3);
4038
+ };
4039
+ }
4040
+ });
3762
4041
 
3763
- function _sfc_render$1(_ctx, _cache) {
3764
- return (vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$c, _hoisted_4$4))
3765
- }
3766
- const CodeIcon = /*#__PURE__*/_export_sfc(_sfc_main$k, [['render',_sfc_render$1]]);
3767
-
3768
- const _hoisted_1$b = {
4042
+ const _hoisted_1$a = {
3769
4043
  key: 0,
3770
4044
  class: "m-editor-content-bottom"
3771
4045
  };
3772
- const _hoisted_2$6 = /* @__PURE__ */ vue.createTextVNode("确认");
3773
- const _hoisted_3$3 = /* @__PURE__ */ vue.createTextVNode("关闭");
3774
- const _hoisted_4$3 = {
4046
+ const _hoisted_2$5 = {
3775
4047
  key: 1,
3776
4048
  class: "m-editor-content-bottom"
3777
4049
  };
3778
- const _hoisted_5$2 = /* @__PURE__ */ vue.createTextVNode("关闭");
3779
- const __default__$h = vue.defineComponent({
3780
- name: "MEditorCodeDraftEditor"
3781
- });
3782
4050
  const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
3783
- ...__default__$h,
4051
+ ...{
4052
+ name: "MEditorCodeDraftEditor"
4053
+ },
4054
+ __name: "CodeDraftEditor",
3784
4055
  props: {
3785
- id: null,
3786
- content: null,
4056
+ id: {},
4057
+ content: {},
3787
4058
  editable: { type: Boolean, default: true },
3788
4059
  autoSaveDraft: { type: Boolean, default: true },
3789
- codeOptions: null,
3790
- language: null
4060
+ codeOptions: {},
4061
+ language: {}
3791
4062
  },
3792
4063
  emits: ["close", "saveAndClose"],
3793
- setup(__props, { expose, emit }) {
4064
+ setup(__props, { expose: __expose, emit }) {
3794
4065
  const props = __props;
3795
4066
  const services = vue.inject("services");
3796
4067
  const codeContent = vue.ref("");
@@ -3855,7 +4126,7 @@
3855
4126
  codeEditor.value.focus();
3856
4127
  }
3857
4128
  };
3858
- expose({
4129
+ __expose({
3859
4130
  saveAndClose,
3860
4131
  close
3861
4132
  });
@@ -3869,10 +4140,10 @@
3869
4140
  class: "m-editor-container",
3870
4141
  "init-values": `${codeContent.value}`,
3871
4142
  onSave: saveCodeDraft,
3872
- language: __props.language,
3873
- options: vue.unref(codeOptions)
4143
+ language: _ctx.language,
4144
+ options: codeOptions.value
3874
4145
  }, null, 8, ["init-values", "language", "options"]),
3875
- __props.editable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
4146
+ _ctx.editable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
3876
4147
  vue.createVNode(vue.unref(design.TMagicButton), {
3877
4148
  type: "primary",
3878
4149
  class: "button",
@@ -3889,7 +4160,7 @@
3889
4160
  onClick: saveAndClose
3890
4161
  }, {
3891
4162
  default: vue.withCtx(() => [
3892
- _hoisted_2$6
4163
+ vue.createTextVNode("确认")
3893
4164
  ]),
3894
4165
  _: 1
3895
4166
  }),
@@ -3898,11 +4169,11 @@
3898
4169
  onClick: close
3899
4170
  }, {
3900
4171
  default: vue.withCtx(() => [
3901
- _hoisted_3$3
4172
+ vue.createTextVNode("关闭")
3902
4173
  ]),
3903
4174
  _: 1
3904
4175
  })
3905
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, [
4176
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5, [
3906
4177
  vue.createVNode(vue.unref(design.TMagicButton), {
3907
4178
  type: "primary",
3908
4179
  class: "button",
@@ -3918,7 +4189,7 @@
3918
4189
  onClick: close
3919
4190
  }, {
3920
4191
  default: vue.withCtx(() => [
3921
- _hoisted_5$2
4192
+ vue.createTextVNode("关闭")
3922
4193
  ]),
3923
4194
  _: 1
3924
4195
  })
@@ -3928,25 +4199,25 @@
3928
4199
  }
3929
4200
  });
3930
4201
 
3931
- const _hoisted_1$a = { class: "code-name-wrapper" };
3932
- const _hoisted_2$5 = /* @__PURE__ */ vue.createElementVNode("div", { class: "code-name-label" }, "代码块名称", -1);
4202
+ const _hoisted_1$9 = { class: "code-name-wrapper" };
4203
+ const _hoisted_2$4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "code-name-label" }, "代码块名称", -1);
3933
4204
  const _hoisted_3$2 = { class: "code-name-wrapper" };
3934
4205
  const _hoisted_4$2 = /* @__PURE__ */ vue.createElementVNode("div", { class: "code-name-label" }, "参数", -1);
3935
- const __default__$g = vue.defineComponent({
3936
- name: "MEditorFunctionEditor"
3937
- });
3938
4206
  const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3939
- ...__default__$g,
4207
+ ...{
4208
+ name: "MEditorFunctionEditor"
4209
+ },
4210
+ __name: "FunctionEditor",
3940
4211
  props: {
3941
- id: null,
3942
- name: null,
3943
- content: null,
4212
+ id: {},
4213
+ name: {},
4214
+ content: {},
3944
4215
  editable: { type: Boolean, default: true },
3945
4216
  autoSaveDraft: { type: Boolean, default: true },
3946
- codeOptions: null,
3947
- paramsColConfig: null
4217
+ codeOptions: {},
4218
+ paramsColConfig: {}
3948
4219
  },
3949
- setup(__props, { expose }) {
4220
+ setup(__props, { expose: __expose }) {
3950
4221
  const props = __props;
3951
4222
  const defaultParamColConfig = {
3952
4223
  type: "row",
@@ -4047,20 +4318,20 @@
4047
4318
  services?.codeBlockService.setCodeEditorShowStatus(false);
4048
4319
  };
4049
4320
  const codeDraftEditor = vue.ref();
4050
- expose({
4321
+ __expose({
4051
4322
  codeDraftEditor
4052
4323
  });
4053
4324
  return (_ctx, _cache) => {
4054
4325
  const _component_m_form_table = vue.resolveComponent("m-form-table");
4055
4326
  return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCard), { shadow: "never" }, {
4056
4327
  header: vue.withCtx(() => [
4057
- vue.createElementVNode("div", _hoisted_1$a, [
4058
- _hoisted_2$5,
4328
+ vue.createElementVNode("div", _hoisted_1$9, [
4329
+ _hoisted_2$4,
4059
4330
  vue.createVNode(vue.unref(design.TMagicInput), {
4060
4331
  class: "code-name-input",
4061
4332
  modelValue: codeName.value,
4062
4333
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => codeName.value = $event),
4063
- disabled: !__props.editable
4334
+ disabled: !_ctx.editable
4064
4335
  }, null, 8, ["modelValue", "disabled"])
4065
4336
  ]),
4066
4337
  vue.createElementVNode("div", _hoisted_3$2, [
@@ -4080,11 +4351,11 @@
4080
4351
  vue.createVNode(_sfc_main$j, {
4081
4352
  ref_key: "codeDraftEditor",
4082
4353
  ref: codeDraftEditor,
4083
- id: __props.id,
4354
+ id: _ctx.id,
4084
4355
  content: codeContent.value,
4085
- editable: __props.editable,
4086
- autoSaveDraft: __props.autoSaveDraft,
4087
- codeOptions: __props.codeOptions,
4356
+ editable: _ctx.editable,
4357
+ autoSaveDraft: _ctx.autoSaveDraft,
4358
+ codeOptions: _ctx.codeOptions,
4088
4359
  language: "javascript",
4089
4360
  onSaveAndClose: saveAndClose,
4090
4361
  onClose: close
@@ -4096,17 +4367,17 @@
4096
4367
  }
4097
4368
  });
4098
4369
 
4099
- const _hoisted_1$9 = {
4370
+ const _hoisted_1$8 = {
4100
4371
  key: 0,
4101
4372
  class: "m-editor-code-block-editor-panel"
4102
4373
  };
4103
- const __default__$f = vue.defineComponent({
4104
- name: "MEditorCodeBlockEditor"
4105
- });
4106
4374
  const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
4107
- ...__default__$f,
4375
+ ...{
4376
+ name: "MEditorCodeBlockEditor"
4377
+ },
4378
+ __name: "CodeBlockEditor",
4108
4379
  props: {
4109
- paramsColConfig: null
4380
+ paramsColConfig: {}
4110
4381
  },
4111
4382
  setup(__props) {
4112
4383
  const services = vue.inject("services");
@@ -4153,7 +4424,7 @@
4153
4424
  "append-to-body": true,
4154
4425
  "show-close": false,
4155
4426
  "close-on-click-modal": true,
4156
- size: vue.unref(size),
4427
+ size: size.value,
4157
4428
  "before-close": handleClose
4158
4429
  }, {
4159
4430
  default: vue.withCtx(() => [
@@ -4164,17 +4435,17 @@
4164
4435
  class: "code-editor-layout"
4165
4436
  }, {
4166
4437
  center: vue.withCtx(() => [
4167
- !vue.unref(lodashEs.isEmpty)(codeConfig.value) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
4168
- vue.renderSlot(_ctx.$slots, "code-block-edit-panel-header", { id: vue.unref(id) }),
4438
+ !vue.unref(lodashEs.isEmpty)(codeConfig.value) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$8, [
4439
+ vue.renderSlot(_ctx.$slots, "code-block-edit-panel-header", { id: id.value }),
4169
4440
  codeConfig.value ? (vue.openBlock(), vue.createBlock(_sfc_main$i, {
4170
4441
  key: 0,
4171
4442
  ref_key: "functionEditor",
4172
4443
  ref: functionEditor,
4173
- id: vue.unref(id),
4444
+ id: id.value,
4174
4445
  name: codeConfig.value.name,
4175
4446
  content: codeConfig.value.content,
4176
- paramsColConfig: __props.paramsColConfig,
4177
- editable: !!vue.unref(editable),
4447
+ paramsColConfig: _ctx.paramsColConfig,
4448
+ editable: !!editable.value,
4178
4449
  autoSaveDraft: true,
4179
4450
  codeOptions: vue.unref(codeOptions)
4180
4451
  }, null, 8, ["id", "name", "content", "paramsColConfig", "editable", "codeOptions"])) : vue.createCommentVNode("", true)
@@ -4189,22 +4460,21 @@
4189
4460
  }
4190
4461
  });
4191
4462
 
4192
- const _hoisted_1$8 = { class: "search-wrapper" };
4193
- const _hoisted_2$4 = /* @__PURE__ */ vue.createTextVNode("新增");
4194
- const _hoisted_3$1 = ["id"];
4195
- const _hoisted_4$1 = { class: "list-item" };
4196
- const _hoisted_5$1 = {
4463
+ const _hoisted_1$7 = { class: "search-wrapper" };
4464
+ const _hoisted_2$3 = ["id"];
4465
+ const _hoisted_3$1 = { class: "list-item" };
4466
+ const _hoisted_4$1 = {
4197
4467
  key: 2,
4198
4468
  class: "right-tool"
4199
4469
  };
4200
- const __default__$e = vue.defineComponent({
4201
- name: "MEditorCodeBlockList"
4202
- });
4203
4470
  const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
4204
- ...__default__$e,
4471
+ ...{
4472
+ name: "MEditorCodeBlockList"
4473
+ },
4474
+ __name: "CodeBlockList",
4205
4475
  props: {
4206
- customError: null,
4207
- paramsColConfig: null
4476
+ customError: { type: Function },
4477
+ paramsColConfig: {}
4208
4478
  },
4209
4479
  setup(__props) {
4210
4480
  const props = __props;
@@ -4293,9 +4563,9 @@
4293
4563
  return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "m-editor-code-block-list m-editor-dep-list-panel" }, {
4294
4564
  default: vue.withCtx(() => [
4295
4565
  vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
4296
- vue.createElementVNode("div", _hoisted_1$8, [
4566
+ vue.createElementVNode("div", _hoisted_1$7, [
4297
4567
  vue.createVNode(_sfc_main$m, { onSearch: filterTextChangeHandler }),
4298
- vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4568
+ editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
4299
4569
  key: 0,
4300
4570
  class: "create-code-button",
4301
4571
  type: "primary",
@@ -4303,7 +4573,7 @@
4303
4573
  onClick: createCodeBlock
4304
4574
  }, {
4305
4575
  default: vue.withCtx(() => [
4306
- _hoisted_2$4
4576
+ vue.createTextVNode("新增")
4307
4577
  ]),
4308
4578
  _: 1
4309
4579
  })) : vue.createCommentVNode("", true)
@@ -4315,9 +4585,9 @@
4315
4585
  class: "magic-editor-layer-tree",
4316
4586
  "node-key": "id",
4317
4587
  "empty-text": "暂无代码块",
4318
- "default-expanded-keys": vue.unref(expandedKeys),
4588
+ "default-expanded-keys": expandedKeys.value,
4319
4589
  "expand-on-click-node": false,
4320
- data: vue.unref(codeList),
4590
+ data: codeList.value,
4321
4591
  props: treeProps,
4322
4592
  "highlight-current": true,
4323
4593
  "filter-node-method": filterNode,
@@ -4328,41 +4598,41 @@
4328
4598
  id: data.id,
4329
4599
  class: "list-container"
4330
4600
  }, [
4331
- vue.createElementVNode("div", _hoisted_4$1, [
4332
- data.type === "code" ? (vue.openBlock(), vue.createBlock(CodeIcon, {
4601
+ vue.createElementVNode("div", _hoisted_3$1, [
4602
+ data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$k, {
4333
4603
  key: 0,
4334
4604
  class: "codeIcon"
4335
4605
  })) : vue.createCommentVNode("", true),
4336
- data.type === "node" ? (vue.openBlock(), vue.createBlock(AppManageIcon, {
4606
+ data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
4337
4607
  key: 1,
4338
4608
  class: "compIcon"
4339
4609
  })) : vue.createCommentVNode("", true),
4340
4610
  vue.createElementVNode("span", {
4341
4611
  class: vue.normalizeClass(["name", { code: data.type === "code", hook: data.type === "key" }])
4342
4612
  }, vue.toDisplayString(data.name) + " (" + vue.toDisplayString(data.id) + ")", 3),
4343
- data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [
4613
+ data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [
4344
4614
  vue.createVNode(vue.unref(design.TMagicTooltip), {
4345
4615
  effect: "dark",
4346
- content: vue.unref(editable) ? "编辑" : "查看",
4616
+ content: editable.value ? "编辑" : "查看",
4347
4617
  placement: "bottom"
4348
4618
  }, {
4349
4619
  default: vue.withCtx(() => [
4350
- vue.createVNode(_sfc_main$A, {
4351
- icon: vue.unref(editable) ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
4620
+ vue.createVNode(_sfc_main$B, {
4621
+ icon: editable.value ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
4352
4622
  class: "edit-icon",
4353
4623
  onClick: vue.withModifiers(($event) => editCode(`${data.id}`), ["stop"])
4354
4624
  }, null, 8, ["icon", "onClick"])
4355
4625
  ]),
4356
4626
  _: 2
4357
4627
  }, 1032, ["content"]),
4358
- vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
4628
+ editable.value ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
4359
4629
  key: 0,
4360
4630
  effect: "dark",
4361
4631
  content: "删除",
4362
4632
  placement: "bottom"
4363
4633
  }, {
4364
4634
  default: vue.withCtx(() => [
4365
- vue.createVNode(_sfc_main$A, {
4635
+ vue.createVNode(_sfc_main$B, {
4366
4636
  icon: vue.unref(iconsVue.Close),
4367
4637
  class: "edit-icon",
4368
4638
  onClick: vue.withModifiers(($event) => deleteCode(`${data.id}`), ["stop"])
@@ -4376,13 +4646,13 @@
4376
4646
  })
4377
4647
  ])) : vue.createCommentVNode("", true)
4378
4648
  ])
4379
- ], 8, _hoisted_3$1)
4649
+ ], 8, _hoisted_2$3)
4380
4650
  ]),
4381
4651
  _: 3
4382
4652
  }, 8, ["default-expanded-keys", "data"]),
4383
- vue.unref(isShowCodeBlockEditor) ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
4653
+ isShowCodeBlockEditor.value ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
4384
4654
  key: 0,
4385
- paramsColConfig: __props.paramsColConfig
4655
+ paramsColConfig: _ctx.paramsColConfig
4386
4656
  }, {
4387
4657
  "code-block-edit-panel-header": vue.withCtx(({ id }) => [
4388
4658
  vue.renderSlot(_ctx.$slots, "code-block-edit-panel-header", { id })
@@ -4396,16 +4666,17 @@
4396
4666
  }
4397
4667
  });
4398
4668
 
4399
- const _hoisted_1$7 = /* @__PURE__ */ vue.createTextVNode("确定");
4400
- const _hoisted_2$3 = /* @__PURE__ */ vue.createTextVNode("关闭");
4401
4669
  const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
4670
+ ...{
4671
+ name: "MEditorDataSourceConfigPanel"
4672
+ },
4402
4673
  __name: "DataSourceConfigPanel",
4403
4674
  props: {
4404
- title: null,
4405
- values: null
4675
+ title: {},
4676
+ values: {}
4406
4677
  },
4407
4678
  emits: ["submit"],
4408
- setup(__props, { expose, emit }) {
4679
+ setup(__props, { expose: __expose, emit }) {
4409
4680
  const props = __props;
4410
4681
  const type = vue.ref("base");
4411
4682
  const services = vue.inject("services");
@@ -4436,7 +4707,7 @@
4436
4707
  const hide = () => {
4437
4708
  visible.value = false;
4438
4709
  };
4439
- expose({
4710
+ __expose({
4440
4711
  show() {
4441
4712
  visible.value = true;
4442
4713
  },
@@ -4446,12 +4717,12 @@
4446
4717
  return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDrawer), {
4447
4718
  modelValue: visible.value,
4448
4719
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
4449
- title: __props.title,
4720
+ title: _ctx.title,
4450
4721
  "close-on-press-escape": true,
4451
4722
  "append-to-body": true,
4452
4723
  "show-close": true,
4453
4724
  "close-on-click-modal": true,
4454
- size: vue.unref(size)
4725
+ size: size.value
4455
4726
  }, {
4456
4727
  footer: vue.withCtx(() => [
4457
4728
  vue.createElementVNode("div", null, [
@@ -4460,13 +4731,13 @@
4460
4731
  onClick: submitHandler
4461
4732
  }, {
4462
4733
  default: vue.withCtx(() => [
4463
- _hoisted_1$7
4734
+ vue.createTextVNode("确定")
4464
4735
  ]),
4465
4736
  _: 1
4466
4737
  }),
4467
4738
  vue.createVNode(vue.unref(design.TMagicButton), { onClick: hide }, {
4468
4739
  default: vue.withCtx(() => [
4469
- _hoisted_2$3
4740
+ vue.createTextVNode("关闭")
4470
4741
  ]),
4471
4742
  _: 1
4472
4743
  })
@@ -4476,7 +4747,7 @@
4476
4747
  vue.createVNode(vue.unref(form.MForm), {
4477
4748
  ref_key: "form",
4478
4749
  ref: form$1,
4479
- config: vue.unref(dataSourceConfig),
4750
+ config: dataSourceConfig.value,
4480
4751
  "init-values": initValues.value,
4481
4752
  onChange: changeHandler
4482
4753
  }, null, 8, ["config", "init-values"])
@@ -4488,18 +4759,17 @@
4488
4759
  });
4489
4760
 
4490
4761
  const _hoisted_1$6 = { class: "search-wrapper" };
4491
- const _hoisted_2$2 = /* @__PURE__ */ vue.createTextVNode("新增");
4492
- const _hoisted_3 = ["id"];
4493
- const _hoisted_4 = { class: "list-item" };
4494
- const _hoisted_5 = {
4762
+ const _hoisted_2$2 = ["id"];
4763
+ const _hoisted_3 = { class: "list-item" };
4764
+ const _hoisted_4 = {
4495
4765
  key: 2,
4496
4766
  class: "right-tool"
4497
4767
  };
4498
- const __default__$d = vue.defineComponent({
4499
- name: "MEditorDataSourceListPanel"
4500
- });
4501
4768
  const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
4502
- ...__default__$d,
4769
+ ...{
4770
+ name: "MEditorDataSourceListPanel"
4771
+ },
4772
+ __name: "DataSourceListPanel",
4503
4773
  setup(__props) {
4504
4774
  const services = vue.inject("services", {});
4505
4775
  const { dataSourceService, depService } = vue.inject("services") || {};
@@ -4565,7 +4835,7 @@
4565
4835
  onClick: addHandler
4566
4836
  }, {
4567
4837
  default: vue.withCtx(() => [
4568
- _hoisted_2$2
4838
+ vue.createTextVNode("新增")
4569
4839
  ]),
4570
4840
  _: 1
4571
4841
  })
@@ -4578,7 +4848,7 @@
4578
4848
  "empty-text": "暂无代码块",
4579
4849
  "default-expand-all": "",
4580
4850
  "expand-on-click-node": false,
4581
- data: vue.unref(list),
4851
+ data: list.value,
4582
4852
  "highlight-current": true
4583
4853
  }, {
4584
4854
  default: vue.withCtx(({ data }) => [
@@ -4586,13 +4856,13 @@
4586
4856
  id: data.id,
4587
4857
  class: "list-container"
4588
4858
  }, [
4589
- vue.createElementVNode("div", _hoisted_4, [
4590
- data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
4859
+ vue.createElementVNode("div", _hoisted_3, [
4860
+ data.type === "code" ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
4591
4861
  key: 0,
4592
4862
  class: "codeIcon",
4593
4863
  icon: vue.unref(iconsVue.Coin)
4594
4864
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
4595
- data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
4865
+ data.type === "node" ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
4596
4866
  key: 1,
4597
4867
  class: "compIcon",
4598
4868
  icon: vue.unref(iconsVue.Aim)
@@ -4600,14 +4870,14 @@
4600
4870
  vue.createElementVNode("span", {
4601
4871
  class: vue.normalizeClass(["name", { code: data.type === "code", hook: data.type === "key" }])
4602
4872
  }, vue.toDisplayString(data.name) + "(" + vue.toDisplayString(data.id) + ")", 3),
4603
- data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
4873
+ data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
4604
4874
  vue.createVNode(vue.unref(design.TMagicTooltip), {
4605
4875
  effect: "dark",
4606
4876
  content: "编辑",
4607
4877
  placement: "bottom"
4608
4878
  }, {
4609
4879
  default: vue.withCtx(() => [
4610
- vue.createVNode(_sfc_main$A, {
4880
+ vue.createVNode(_sfc_main$B, {
4611
4881
  class: "edit-icon",
4612
4882
  icon: vue.unref(iconsVue.Edit),
4613
4883
  onClick: vue.withModifiers(($event) => editHandler(`${data.id}`), ["stop"])
@@ -4621,7 +4891,7 @@
4621
4891
  placement: "bottom"
4622
4892
  }, {
4623
4893
  default: vue.withCtx(() => [
4624
- vue.createVNode(_sfc_main$A, {
4894
+ vue.createVNode(_sfc_main$B, {
4625
4895
  icon: vue.unref(iconsVue.Close),
4626
4896
  class: "edit-icon",
4627
4897
  onClick: vue.withModifiers(($event) => removeHandler(`${data.id}`), ["stop"])
@@ -4635,7 +4905,7 @@
4635
4905
  })
4636
4906
  ])) : vue.createCommentVNode("", true)
4637
4907
  ])
4638
- ], 8, _hoisted_3)
4908
+ ], 8, _hoisted_2$2)
4639
4909
  ]),
4640
4910
  _: 3
4641
4911
  }, 8, ["data"]),
@@ -4654,11 +4924,11 @@
4654
4924
  });
4655
4925
 
4656
4926
  const _hoisted_1$5 = ["onClick", "onDragstart"];
4657
- const __default__$c = vue.defineComponent({
4658
- name: "MEditorComponentListPanel"
4659
- });
4660
4927
  const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
4661
- ...__default__$c,
4928
+ ...{
4929
+ name: "MEditorComponentListPanel"
4930
+ },
4931
+ __name: "ComponentListPanel",
4662
4932
  setup(__props) {
4663
4933
  const searchText = vue.ref("");
4664
4934
  const filterTextChangeHandler = (v) => {
@@ -4731,18 +5001,18 @@
4731
5001
  vue.renderSlot(_ctx.$slots, "component-list-panel-header"),
4732
5002
  vue.createVNode(vue.unref(design.TMagicCollapse), {
4733
5003
  class: "ui-component-panel",
4734
- "model-value": vue.unref(collapseValue)
5004
+ "model-value": collapseValue.value
4735
5005
  }, {
4736
5006
  default: vue.withCtx(() => [
4737
5007
  vue.createVNode(_sfc_main$m, { onSearch: filterTextChangeHandler }),
4738
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(list), (group, index) => {
5008
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (group, index) => {
4739
5009
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
4740
5010
  group.items && group.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCollapseItem), {
4741
5011
  key: index,
4742
5012
  name: `${index}`
4743
5013
  }, {
4744
5014
  title: vue.withCtx(() => [
4745
- vue.createVNode(_sfc_main$A, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
5015
+ vue.createVNode(_sfc_main$B, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
4746
5016
  vue.createTextVNode(vue.toDisplayString(group.title), 1)
4747
5017
  ]),
4748
5018
  default: vue.withCtx(() => [
@@ -4757,7 +5027,7 @@
4757
5027
  onDrag: dragHandler
4758
5028
  }, [
4759
5029
  vue.renderSlot(_ctx.$slots, "component-list-item", { component: item }, () => [
4760
- vue.createVNode(_sfc_main$A, {
5030
+ vue.createVNode(_sfc_main$B, {
4761
5031
  icon: item.icon
4762
5032
  }, null, 8, ["icon"]),
4763
5033
  vue.createVNode(vue.unref(design.TMagicTooltip), {
@@ -4788,17 +5058,17 @@
4788
5058
  }
4789
5059
  });
4790
5060
 
4791
- const __default__$b = vue.defineComponent({
4792
- name: "MEditorContentMenu"
4793
- });
4794
5061
  const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
4795
- ...__default__$b,
5062
+ ...{
5063
+ name: "MEditorContentMenu"
5064
+ },
5065
+ __name: "ContentMenu",
4796
5066
  props: {
4797
5067
  menuData: { default: () => [] },
4798
5068
  isSubMenu: { type: Boolean, default: false }
4799
5069
  },
4800
5070
  emits: ["hide", "show"],
4801
- setup(__props, { expose, emit }) {
5071
+ setup(__props, { expose: __expose, emit }) {
4802
5072
  const props = __props;
4803
5073
  const menu = vue.ref();
4804
5074
  const subMenu = vue.ref();
@@ -4865,13 +5135,13 @@
4865
5135
  return;
4866
5136
  globalThis.removeEventListener("mousedown", hideHandler, true);
4867
5137
  });
4868
- expose({
5138
+ __expose({
4869
5139
  hide,
4870
5140
  show
4871
5141
  });
4872
5142
  return (_ctx, _cache) => {
4873
5143
  const _component_content_menu = vue.resolveComponent("content-menu", true);
4874
- return __props.menuData.length ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
5144
+ return _ctx.menuData.length ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
4875
5145
  key: 0,
4876
5146
  class: "magic-editor-content-menu",
4877
5147
  ref_key: "menu",
@@ -4879,7 +5149,7 @@
4879
5149
  style: vue.normalizeStyle(menuStyle.value)
4880
5150
  }, [
4881
5151
  vue.createElementVNode("div", null, [
4882
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.menuData, (item, index) => {
5152
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuData, (item, index) => {
4883
5153
  return vue.openBlock(), vue.createBlock(_sfc_main$p, {
4884
5154
  "event-type": "mouseup",
4885
5155
  data: item,
@@ -4906,15 +5176,15 @@
4906
5176
  }
4907
5177
  });
4908
5178
 
4909
- const __default__$a = vue.defineComponent({
4910
- name: "MEditorLayerMenu"
4911
- });
4912
5179
  const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
4913
- ...__default__$a,
5180
+ ...{
5181
+ name: "MEditorLayerMenu"
5182
+ },
5183
+ __name: "LayerMenu",
4914
5184
  props: {
4915
- layerContentMenu: null
5185
+ layerContentMenu: {}
4916
5186
  },
4917
- setup(__props, { expose }) {
5187
+ setup(__props, { expose: __expose }) {
4918
5188
  const props = __props;
4919
5189
  const services = vue.inject("services");
4920
5190
  const menu = vue.ref();
@@ -4996,12 +5266,12 @@
4996
5266
  const show = (e) => {
4997
5267
  menu.value?.show(e);
4998
5268
  };
4999
- expose({
5269
+ __expose({
5000
5270
  show
5001
5271
  });
5002
5272
  return (_ctx, _cache) => {
5003
5273
  return vue.openBlock(), vue.createBlock(_sfc_main$c, {
5004
- "menu-data": vue.unref(menuData),
5274
+ "menu-data": menuData.value,
5005
5275
  ref_key: "menu",
5006
5276
  ref: menu,
5007
5277
  style: { "overflow": "initial" }
@@ -5011,16 +5281,16 @@
5011
5281
  });
5012
5282
 
5013
5283
  const _hoisted_1$4 = ["id", "onMouseenter"];
5014
- const __default__$9 = vue.defineComponent({
5015
- name: "MEditorLayerPanel"
5016
- });
5284
+ const throttleTime = 150;
5017
5285
  const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
5018
- ...__default__$9,
5286
+ ...{
5287
+ name: "MEditorLayerPanel"
5288
+ },
5289
+ __name: "LayerPanel",
5019
5290
  props: {
5020
- layerContentMenu: null
5291
+ layerContentMenu: {}
5021
5292
  },
5022
5293
  setup(__props) {
5023
- const throttleTime = 150;
5024
5294
  const services = vue.inject("services");
5025
5295
  const editorService = services?.editorService;
5026
5296
  const tree = vue.ref();
@@ -5214,7 +5484,7 @@
5214
5484
  default: vue.withCtx(() => [
5215
5485
  vue.renderSlot(_ctx.$slots, "layer-panel-header"),
5216
5486
  vue.createVNode(_sfc_main$m, { onSearch: filterTextChangeHandler }),
5217
- vue.unref(values).length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTree), {
5487
+ values.value.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTree), {
5218
5488
  key: 0,
5219
5489
  class: "magic-editor-layer-tree",
5220
5490
  ref_key: "tree",
@@ -5225,14 +5495,14 @@
5225
5495
  "default-expanded-keys": expandedKeys.value,
5226
5496
  "default-checked-keys": checkedKeys.value,
5227
5497
  "current-node-key": currentNodeKey.value,
5228
- data: vue.unref(values),
5498
+ data: values.value,
5229
5499
  "expand-on-click-node": false,
5230
- "highlight-current": !vue.unref(isMultiSelect),
5500
+ "highlight-current": !isMultiSelect.value,
5231
5501
  "check-on-click-node": true,
5232
5502
  props: treeProps,
5233
5503
  "filter-node-method": filterNode,
5234
5504
  "allow-drop": allowDrop,
5235
- "show-checkbox": vue.unref(isMultiSelect),
5505
+ "show-checkbox": isMultiSelect.value,
5236
5506
  onNodeClick: clickHandler,
5237
5507
  onNodeContextmenu: contextmenu,
5238
5508
  onNodeDragEnd: handleDragEnd,
@@ -5262,7 +5532,7 @@
5262
5532
  vue.createVNode(_sfc_main$b, {
5263
5533
  ref_key: "menu",
5264
5534
  ref: menu,
5265
- "layer-content-menu": __props.layerContentMenu
5535
+ "layer-content-menu": _ctx.layerContentMenu
5266
5536
  }, null, 8, ["layer-content-menu"])
5267
5537
  ]))
5268
5538
  ]),
@@ -5276,19 +5546,19 @@
5276
5546
  key: 1,
5277
5547
  class: "magic-editor-tab-panel-title"
5278
5548
  };
5279
- const __default__$8 = vue.defineComponent({
5280
- name: "MEditorSidebar"
5281
- });
5282
5549
  const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
5283
- ...__default__$8,
5550
+ ...{
5551
+ name: "MEditorSidebar"
5552
+ },
5553
+ __name: "Sidebar",
5284
5554
  props: {
5285
5555
  data: { default: () => ({ type: "tabs", status: "组件", items: ["component-list", "layer", "code-block", "data-source"] }) },
5286
- layerContentMenu: null
5556
+ layerContentMenu: {}
5287
5557
  },
5288
- setup(__props, { expose }) {
5558
+ setup(__props, { expose: __expose }) {
5289
5559
  const props = __props;
5290
- const tabPaneComponent = design.getConfig("components").tabPane;
5291
- const tabsComponent = design.getConfig("components").tabs;
5560
+ const tabPaneComponent = design.getConfig("components")?.tabPane;
5561
+ const tabsComponent = design.getConfig("components")?.tabs;
5292
5562
  const activeTabName = vue.ref(props.data?.status);
5293
5563
  const getItemConfig = (data) => {
5294
5564
  const map = {
@@ -5337,26 +5607,26 @@
5337
5607
  activeTabName.value = status || "0";
5338
5608
  }
5339
5609
  );
5340
- expose({
5610
+ __expose({
5341
5611
  activeTabName
5342
5612
  });
5343
5613
  return (_ctx, _cache) => {
5344
- return __props.data.type === "tabs" && __props.data.items.length ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(tabsComponent).component), vue.mergeProps({
5614
+ return _ctx.data.type === "tabs" && _ctx.data.items.length ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(tabsComponent)?.component || "el-tabs"), vue.mergeProps({
5345
5615
  key: 0,
5346
5616
  modelValue: activeTabName.value,
5347
5617
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabName.value = $event),
5348
5618
  class: "m-editor-sidebar tmagic-design-tabs"
5349
- }, vue.unref(tabsComponent).props({ type: "card", tabPosition: "left" })), {
5619
+ }, vue.unref(tabsComponent)?.props({ type: "card", tabPosition: "left" }) || {}), {
5350
5620
  default: vue.withCtx(() => [
5351
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(sideBarItems), (config, index) => {
5352
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(tabPaneComponent).component), vue.mergeProps(vue.unref(tabPaneComponent).props({ name: config.text }), {
5621
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(sideBarItems.value, (config, index) => {
5622
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(tabPaneComponent)?.component || "el-tab-pane"), vue.mergeProps(vue.unref(tabPaneComponent)?.props({ name: config.text, lazy: config.lazy }) || {}, {
5353
5623
  key: config.$key || index
5354
5624
  }), {
5355
5625
  label: vue.withCtx(() => [
5356
5626
  (vue.openBlock(), vue.createElementBlock("div", {
5357
5627
  key: config.text
5358
5628
  }, [
5359
- config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$A, {
5629
+ config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$B, {
5360
5630
  key: 0,
5361
5631
  icon: config.icon
5362
5632
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
@@ -5369,7 +5639,8 @@
5369
5639
  name: "component-list-panel-header",
5370
5640
  fn: vue.withCtx(() => [
5371
5641
  config.$key === "component-list" ? vue.renderSlot(_ctx.$slots, "component-list-panel-header", { key: 0 }) : config.slots?.componentListPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.componentListPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
5372
- ])
5642
+ ]),
5643
+ key: "0"
5373
5644
  } : void 0,
5374
5645
  config.$key === "component-list" || config.slots?.componentListItem ? {
5375
5646
  name: "component-list-item",
@@ -5381,19 +5652,22 @@
5381
5652
  key: 1,
5382
5653
  component
5383
5654
  }, null, 8, ["component"])) : vue.createCommentVNode("", true)
5384
- ])
5655
+ ]),
5656
+ key: "1"
5385
5657
  } : void 0,
5386
5658
  config.$key === "layer" || config.slots?.layerPanelHeader ? {
5387
5659
  name: "layer-panel-header",
5388
5660
  fn: vue.withCtx(() => [
5389
5661
  config.$key === "layer" ? vue.renderSlot(_ctx.$slots, "layer-panel-header", { key: 0 }) : config.slots?.layerPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.layerPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
5390
- ])
5662
+ ]),
5663
+ key: "2"
5391
5664
  } : void 0,
5392
5665
  config.$key === "code-block" || config.slots?.codeBlockPanelHeader ? {
5393
5666
  name: "code-block-panel-header",
5394
5667
  fn: vue.withCtx(() => [
5395
5668
  config.$key === "code-block" ? vue.renderSlot(_ctx.$slots, "code-block-panel-header", { key: 0 }) : config.slots?.codeBlockPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
5396
- ])
5669
+ ]),
5670
+ key: "3"
5397
5671
  } : void 0,
5398
5672
  config.$key === "code-block" || config.slots?.codeBlockPanelTool ? {
5399
5673
  name: "code-block-panel-tool",
@@ -5403,7 +5677,8 @@
5403
5677
  id,
5404
5678
  data
5405
5679
  }) : config.slots?.codeBlockPanelTool ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelTool), { key: 1 })) : vue.createCommentVNode("", true)
5406
- ])
5680
+ ]),
5681
+ key: "4"
5407
5682
  } : void 0,
5408
5683
  config.$key === "code-block" || config.slots?.codeBlockEditPanelHeader ? {
5409
5684
  name: "code-block-edit-panel-header",
@@ -5412,7 +5687,8 @@
5412
5687
  key: 0,
5413
5688
  id
5414
5689
  }) : config.slots?.codeBlockEditPanelHeader ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockEditPanelHeader), { key: 1 })) : vue.createCommentVNode("", true)
5415
- ])
5690
+ ]),
5691
+ key: "5"
5416
5692
  } : void 0,
5417
5693
  config.$key === "layer" || config.slots?.layerNodeContent ? {
5418
5694
  name: "layer-node-content",
@@ -5426,7 +5702,8 @@
5426
5702
  data: nodeData,
5427
5703
  node
5428
5704
  }, null, 8, ["data", "node"])) : vue.createCommentVNode("", true)
5429
- ])
5705
+ ]),
5706
+ key: "6"
5430
5707
  } : void 0
5431
5708
  ]), 1040)) : vue.createCommentVNode("", true)
5432
5709
  ]),
@@ -5445,11 +5722,11 @@
5445
5722
  class: "m-editor-breadcrumb"
5446
5723
  };
5447
5724
  const _hoisted_2$1 = { key: 0 };
5448
- const __default__$7 = vue.defineComponent({
5449
- name: "MEditorBreadcrumb"
5450
- });
5451
5725
  const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
5452
- ...__default__$7,
5726
+ ...{
5727
+ name: "MEditorBreadcrumb"
5728
+ },
5729
+ __name: "Breadcrumb",
5453
5730
  setup(__props) {
5454
5731
  const services = vue.inject("services");
5455
5732
  const editorService = services?.editorService;
@@ -5462,14 +5739,14 @@
5462
5739
  editorService?.get("stage")?.select(node2.id);
5463
5740
  };
5464
5741
  return (_ctx, _cache) => {
5465
- return vue.unref(nodes).length === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
5466
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(path), (item, index) => {
5742
+ return nodes.value.length === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
5743
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(path.value, (item, index) => {
5467
5744
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
5468
5745
  key: item.id
5469
5746
  }, [
5470
5747
  vue.createVNode(vue.unref(design.TMagicButton), {
5471
5748
  text: "",
5472
- disabled: item.id === vue.unref(node)?.id,
5749
+ disabled: item.id === node.value?.id,
5473
5750
  onClick: ($event) => select(item)
5474
5751
  }, {
5475
5752
  default: vue.withCtx(() => [
@@ -5477,7 +5754,7 @@
5477
5754
  ]),
5478
5755
  _: 2
5479
5756
  }, 1032, ["disabled", "onClick"]),
5480
- index < vue.unref(path).length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$1, "/")) : vue.createCommentVNode("", true)
5757
+ index < path.value.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$1, "/")) : vue.createCommentVNode("", true)
5481
5758
  ], 64);
5482
5759
  }), 128))
5483
5760
  ])) : vue.createCommentVNode("", true);
@@ -5489,11 +5766,11 @@
5489
5766
  key: 1,
5490
5767
  style: { "width": "21px" }
5491
5768
  };
5492
- const __default__$6 = vue.defineComponent({
5493
- name: "MEditorPageBarScrollContainer"
5494
- });
5495
5769
  const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
5496
- ...__default__$6,
5770
+ ...{
5771
+ name: "MEditorPageBarScrollContainer"
5772
+ },
5773
+ __name: "PageBarScrollContainer",
5497
5774
  setup(__props) {
5498
5775
  const services = vue.inject("services");
5499
5776
  const editorService = services?.editorService;
@@ -5571,22 +5848,22 @@
5571
5848
  ref_key: "pageBar",
5572
5849
  ref: pageBar
5573
5850
  }, [
5574
- vue.unref(showAddPageButton) ? (vue.openBlock(), vue.createElementBlock("div", {
5851
+ showAddPageButton.value ? (vue.openBlock(), vue.createElementBlock("div", {
5575
5852
  key: 0,
5576
5853
  id: "m-editor-page-bar-add-icon",
5577
5854
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
5578
5855
  onClick: addPage
5579
5856
  }, [
5580
- vue.createVNode(_sfc_main$A, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
5857
+ vue.createVNode(_sfc_main$B, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
5581
5858
  ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1)),
5582
5859
  canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
5583
5860
  key: 2,
5584
5861
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
5585
5862
  onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
5586
5863
  }, [
5587
- vue.createVNode(_sfc_main$A, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
5864
+ vue.createVNode(_sfc_main$B, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
5588
5865
  ])) : vue.createCommentVNode("", true),
5589
- vue.unref(pageLength) ? (vue.openBlock(), vue.createElementBlock("div", {
5866
+ pageLength.value ? (vue.openBlock(), vue.createElementBlock("div", {
5590
5867
  key: 3,
5591
5868
  class: "m-editor-page-bar-items",
5592
5869
  ref_key: "itemsContainer",
@@ -5600,7 +5877,7 @@
5600
5877
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
5601
5878
  onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
5602
5879
  }, [
5603
- vue.createVNode(_sfc_main$A, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
5880
+ vue.createVNode(_sfc_main$B, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
5604
5881
  ])) : vue.createCommentVNode("", true)
5605
5882
  ], 512);
5606
5883
  };
@@ -5609,11 +5886,11 @@
5609
5886
 
5610
5887
  const _hoisted_1 = ["onClick"];
5611
5888
  const _hoisted_2 = { class: "m-editor-page-bar-title" };
5612
- const __default__$5 = vue.defineComponent({
5613
- name: "MEditorPageBar"
5614
- });
5615
5889
  const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
5616
- ...__default__$5,
5890
+ ...{
5891
+ name: "MEditorPageBar"
5892
+ },
5893
+ __name: "PageBar",
5617
5894
  setup(__props) {
5618
5895
  const services = vue.inject("services");
5619
5896
  const editorService = services?.editorService;
@@ -5635,9 +5912,9 @@
5635
5912
  return (_ctx, _cache) => {
5636
5913
  return vue.openBlock(), vue.createBlock(_sfc_main$7, null, {
5637
5914
  default: vue.withCtx(() => [
5638
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(root) && vue.unref(root).items || [], (item) => {
5915
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(root.value && root.value.items || [], (item) => {
5639
5916
  return vue.openBlock(), vue.createElementBlock("div", {
5640
- class: vue.normalizeClass(["m-editor-page-bar-item", { active: vue.unref(page)?.id === item.id }]),
5917
+ class: vue.normalizeClass(["m-editor-page-bar-item", { active: page.value?.id === item.id }]),
5641
5918
  key: item.key,
5642
5919
  onClick: ($event) => switchPage(item)
5643
5920
  }, [
@@ -5830,16 +6107,16 @@
5830
6107
  };
5831
6108
  }
5832
6109
 
5833
- const __default__$4 = vue.defineComponent({
5834
- name: "MEditorScrollBar"
5835
- });
5836
6110
  const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
5837
- ...__default__$4,
6111
+ ...{
6112
+ name: "MEditorScrollBar"
6113
+ },
6114
+ __name: "ScrollBar",
5838
6115
  props: {
5839
- size: null,
5840
- scrollSize: null,
6116
+ size: {},
6117
+ scrollSize: {},
5841
6118
  isHorizontal: { type: Boolean },
5842
- pos: null
6119
+ pos: {}
5843
6120
  },
5844
6121
  emits: ["scroll"],
5845
6122
  setup(__props, { emit }) {
@@ -5904,13 +6181,13 @@
5904
6181
  return vue.openBlock(), vue.createElementBlock("div", {
5905
6182
  ref_key: "bar",
5906
6183
  ref: bar,
5907
- class: vue.normalizeClass(["m-editor-scroll-bar", __props.isHorizontal ? "horizontal" : "vertical"])
6184
+ class: vue.normalizeClass(["m-editor-scroll-bar", _ctx.isHorizontal ? "horizontal" : "vertical"])
5908
6185
  }, [
5909
6186
  vue.createElementVNode("div", {
5910
6187
  ref_key: "thumb",
5911
6188
  ref: thumb,
5912
6189
  class: "m-editor-scroll-bar-thumb",
5913
- style: vue.normalizeStyle(vue.unref(thumbStyle))
6190
+ style: vue.normalizeStyle(thumbStyle.value)
5914
6191
  }, null, 4)
5915
6192
  ], 2);
5916
6193
  };
@@ -5919,11 +6196,11 @@
5919
6196
 
5920
6197
  const ScrollBar_vue_vue_type_style_index_0_lang = '';
5921
6198
 
5922
- const __default__$3 = vue.defineComponent({
5923
- name: "MEditorScrollViewer"
5924
- });
5925
6199
  const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
5926
- ...__default__$3,
6200
+ ...{
6201
+ name: "MEditorScrollViewer"
6202
+ },
6203
+ __name: "ScrollViewer",
5927
6204
  props: {
5928
6205
  width: { default: 0 },
5929
6206
  height: { default: 0 },
@@ -5935,7 +6212,7 @@
5935
6212
  height: 0
5936
6213
  }) }
5937
6214
  },
5938
- setup(__props, { expose }) {
6215
+ setup(__props, { expose: __expose }) {
5939
6216
  const props = __props;
5940
6217
  const container = vue.ref();
5941
6218
  const el = vue.ref();
@@ -5989,7 +6266,7 @@
5989
6266
  left: hOffset.value
5990
6267
  });
5991
6268
  };
5992
- expose({
6269
+ __expose({
5993
6270
  container
5994
6271
  });
5995
6272
  return (_ctx, _cache) => {
@@ -6001,23 +6278,23 @@
6001
6278
  vue.createElementVNode("div", {
6002
6279
  ref_key: "el",
6003
6280
  ref: el,
6004
- style: vue.normalizeStyle(vue.unref(style))
6281
+ style: vue.normalizeStyle(style.value)
6005
6282
  }, [
6006
6283
  vue.renderSlot(_ctx.$slots, "default")
6007
6284
  ], 4),
6008
- scrollHeight.value > __props.wrapHeight ? (vue.openBlock(), vue.createBlock(_sfc_main$5, {
6285
+ scrollHeight.value > _ctx.wrapHeight ? (vue.openBlock(), vue.createBlock(_sfc_main$5, {
6009
6286
  key: 0,
6010
6287
  "scroll-size": scrollHeight.value,
6011
- size: __props.wrapHeight,
6288
+ size: _ctx.wrapHeight,
6012
6289
  pos: vOffset.value,
6013
6290
  onScroll: vScrollHandler
6014
6291
  }, null, 8, ["scroll-size", "size", "pos"])) : vue.createCommentVNode("", true),
6015
- scrollWidth.value > __props.wrapWidth ? (vue.openBlock(), vue.createBlock(_sfc_main$5, {
6292
+ scrollWidth.value > _ctx.wrapWidth ? (vue.openBlock(), vue.createBlock(_sfc_main$5, {
6016
6293
  key: 1,
6017
6294
  "is-horizontal": true,
6018
6295
  "scroll-size": scrollWidth.value,
6019
6296
  pos: hOffset.value,
6020
- size: __props.wrapWidth,
6297
+ size: _ctx.wrapWidth,
6021
6298
  onScroll: hScrollHandler
6022
6299
  }, null, 8, ["scroll-size", "pos", "size"])) : vue.createCommentVNode("", true)
6023
6300
  ], 512);
@@ -6025,16 +6302,16 @@
6025
6302
  }
6026
6303
  });
6027
6304
 
6028
- const __default__$2 = vue.defineComponent({
6029
- name: "MEditorViewerMenu"
6030
- });
6031
6305
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
6032
- ...__default__$2,
6306
+ ...{
6307
+ name: "MEditorViewerMenu"
6308
+ },
6309
+ __name: "ViewerMenu",
6033
6310
  props: {
6034
6311
  isMultiSelect: { type: Boolean, default: false },
6035
- stageContentMenu: null
6312
+ stageContentMenu: {}
6036
6313
  },
6037
- setup(__props, { expose }) {
6314
+ setup(__props, { expose: __expose }) {
6038
6315
  const props = __props;
6039
6316
  const services = vue.inject("services");
6040
6317
  const editorService = services?.editorService;
@@ -6169,10 +6446,10 @@
6169
6446
  const data = await storageService.getItem(COPY_STORAGE_KEY);
6170
6447
  canPaste.value = data !== "undefined" && !!data;
6171
6448
  };
6172
- expose({ show });
6449
+ __expose({ show });
6173
6450
  return (_ctx, _cache) => {
6174
6451
  return vue.openBlock(), vue.createBlock(_sfc_main$c, {
6175
- "menu-data": vue.unref(menuData),
6452
+ "menu-data": menuData.value,
6176
6453
  ref_key: "menu",
6177
6454
  ref: menu
6178
6455
  }, null, 8, ["menu-data"]);
@@ -6180,13 +6457,13 @@
6180
6457
  }
6181
6458
  });
6182
6459
 
6183
- const __default__$1 = vue.defineComponent({
6184
- name: "MEditorStage"
6185
- });
6186
6460
  const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
6187
- ...__default__$1,
6461
+ ...{
6462
+ name: "MEditorStage"
6463
+ },
6464
+ __name: "Stage",
6188
6465
  props: {
6189
- stageContentMenu: null
6466
+ stageContentMenu: {}
6190
6467
  },
6191
6468
  setup(__props) {
6192
6469
  let stage = null;
@@ -6311,11 +6588,11 @@
6311
6588
  class: "m-editor-stage",
6312
6589
  ref_key: "stageWrap",
6313
6590
  ref: stageWrap,
6314
- width: vue.unref(stageRect)?.width,
6315
- height: vue.unref(stageRect)?.height,
6316
- "wrap-width": vue.unref(stageContainerRect)?.width,
6317
- "wrap-height": vue.unref(stageContainerRect)?.height,
6318
- zoom: vue.unref(zoom),
6591
+ width: stageRect.value?.width,
6592
+ height: stageRect.value?.height,
6593
+ "wrap-width": stageContainerRect.value?.width,
6594
+ "wrap-height": stageContainerRect.value?.height,
6595
+ zoom: zoom.value,
6319
6596
  "correction-scroll-size": {
6320
6597
  width: 60,
6321
6598
  height: 50
@@ -6326,7 +6603,7 @@
6326
6603
  class: "m-editor-stage-container",
6327
6604
  ref_key: "stageContainer",
6328
6605
  ref: stageContainer,
6329
- style: vue.normalizeStyle(`transform: scale(${vue.unref(zoom)});`),
6606
+ style: vue.normalizeStyle(`transform: scale(${zoom.value});`),
6330
6607
  onContextmenu: contextmenuHandler,
6331
6608
  onDrop: dropHandler,
6332
6609
  onDragover: dragoverHandler
@@ -6335,8 +6612,8 @@
6335
6612
  vue.createVNode(_sfc_main$3, {
6336
6613
  ref_key: "menu",
6337
6614
  ref: menu,
6338
- "is-multi-select": vue.unref(isMultiSelect),
6339
- "stage-content-menu": __props.stageContentMenu
6615
+ "is-multi-select": isMultiSelect.value,
6616
+ "stage-content-menu": _ctx.stageContentMenu
6340
6617
  }, null, 8, ["is-multi-select", "stage-content-menu"])
6341
6618
  ]))
6342
6619
  ]),
@@ -6346,13 +6623,13 @@
6346
6623
  }
6347
6624
  });
6348
6625
 
6349
- const __default__ = vue.defineComponent({
6350
- name: "MEditorWorkspace"
6351
- });
6352
6626
  const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
6353
- ...__default__,
6627
+ ...{
6628
+ name: "MEditorWorkspace"
6629
+ },
6630
+ __name: "Workspace",
6354
6631
  props: {
6355
- stageContentMenu: null
6632
+ stageContentMenu: {}
6356
6633
  },
6357
6634
  setup(__props) {
6358
6635
  const services = vue.inject("services");
@@ -6464,9 +6741,9 @@
6464
6741
  }, [
6465
6742
  vue.createVNode(_sfc_main$8),
6466
6743
  vue.renderSlot(_ctx.$slots, "stage", {}, () => [
6467
- vue.unref(page) ? (vue.openBlock(), vue.createBlock(_sfc_main$2, {
6744
+ page.value ? (vue.openBlock(), vue.createBlock(_sfc_main$2, {
6468
6745
  key: 0,
6469
- "stage-content-menu": __props.stageContentMenu
6746
+ "stage-content-menu": _ctx.stageContentMenu
6470
6747
  }, null, 8, ["stage-content-menu"])) : vue.createCommentVNode("", true)
6471
6748
  ]),
6472
6749
  vue.renderSlot(_ctx.$slots, "workspace-content"),
@@ -7569,7 +7846,7 @@
7569
7846
  };
7570
7847
 
7571
7848
  const _sfc_main = vue.defineComponent({
7572
- name: "m-editor",
7849
+ name: "MEditor",
7573
7850
  components: {
7574
7851
  TMagicNavMenu: _sfc_main$o,
7575
7852
  Sidebar: _sfc_main$9,
@@ -7616,6 +7893,14 @@
7616
7893
  }
7617
7894
  });
7618
7895
 
7896
+ const _export_sfc = (sfc, props) => {
7897
+ const target = sfc.__vccOpts || sfc;
7898
+ for (const [key, val] of props) {
7899
+ target[key] = val;
7900
+ }
7901
+ return target;
7902
+ };
7903
+
7619
7904
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
7620
7905
  const _component_TMagicNavMenu = vue.resolveComponent("TMagicNavMenu");
7621
7906
  const _component_Sidebar = vue.resolveComponent("Sidebar");
@@ -7716,14 +8001,15 @@
7716
8001
  setConfig(option);
7717
8002
  app.component(Editor.name, Editor);
7718
8003
  app.component("m-fields-ui-select", _sfc_main$v);
7719
- app.component("m-fields-code-link", _sfc_main$C);
7720
- app.component("m-fields-vs-code", _sfc_main$D);
8004
+ app.component("m-fields-code-link", _sfc_main$D);
8005
+ app.component("m-fields-vs-code", _sfc_main$E);
7721
8006
  app.component("magic-code-editor", _sfc_main$u);
7722
- app.component("m-fields-code-select", _sfc_main$B);
7723
- app.component("m-fields-code-select-col", _sfc_main$z);
8007
+ app.component("m-fields-code-select", _sfc_main$C);
8008
+ app.component("m-fields-code-select-col", _sfc_main$A);
7724
8009
  app.component("m-fields-event-select", _sfc_main$x);
7725
- app.component("m-fields-data-source-fields", _sfc_main$y);
8010
+ app.component("m-fields-data-source-fields", _sfc_main$z);
7726
8011
  app.component("m-fields-key-value", _sfc_main$w);
8012
+ app.component("m-fields-data-source-input", _sfc_main$y);
7727
8013
  }
7728
8014
  };
7729
8015
 
@@ -7731,16 +8017,17 @@
7731
8017
  exports.COPY_STORAGE_KEY = COPY_STORAGE_KEY;
7732
8018
  exports.CodeBlockList = _sfc_main$g;
7733
8019
  exports.CodeDeleteErrorType = CodeDeleteErrorType;
7734
- exports.CodeSelect = _sfc_main$B;
7735
- exports.CodeSelectCol = _sfc_main$z;
8020
+ exports.CodeSelect = _sfc_main$C;
8021
+ exports.CodeSelectCol = _sfc_main$A;
7736
8022
  exports.ColumnLayout = ColumnLayout;
7737
8023
  exports.ComponentListPanel = _sfc_main$d;
7738
8024
  exports.ContentMenu = _sfc_main$c;
7739
- exports.DataSourceFields = _sfc_main$y;
8025
+ exports.DataSourceFields = _sfc_main$z;
8026
+ exports.DataSourceInput = _sfc_main$y;
7740
8027
  exports.EventSelect = _sfc_main$x;
7741
8028
  exports.Fixed2Other = Fixed2Other;
7742
8029
  exports.H_GUIDE_LINE_STORAGE_KEY = H_GUIDE_LINE_STORAGE_KEY;
7743
- exports.Icon = _sfc_main$A;
8030
+ exports.Icon = _sfc_main$B;
7744
8031
  exports.KeyValue = _sfc_main$w;
7745
8032
  exports.Keys = Keys;
7746
8033
  exports.LayerOffset = LayerOffset;