@tmagic/editor 1.2.12 → 1.2.13

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.
@@ -33,7 +33,7 @@
33
33
  const __default__$v = vue.defineComponent({
34
34
  name: "MEditorCode"
35
35
  });
36
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
36
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
37
37
  ...__default__$v,
38
38
  props: {
39
39
  model: null,
@@ -66,7 +66,7 @@
66
66
  const __default__$u = vue.defineComponent({
67
67
  name: "MEditorCodeLink"
68
68
  });
69
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
69
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
70
70
  ...__default__$u,
71
71
  props: {
72
72
  config: null,
@@ -140,7 +140,7 @@
140
140
  const __default__$t = vue.defineComponent({
141
141
  name: "MEditorIcon"
142
142
  });
143
- const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
143
+ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
144
144
  ...__default__$t,
145
145
  props: {
146
146
  icon: null
@@ -182,7 +182,7 @@
182
182
  const __default__$s = vue.defineComponent({
183
183
  name: "MEditorCodeSelect"
184
184
  });
185
- const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
185
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
186
186
  ...__default__$s,
187
187
  props: {
188
188
  config: { default: () => ({
@@ -293,7 +293,7 @@
293
293
  onChange: changeHandler
294
294
  }, {
295
295
  operateCol: vue.withCtx(({ scope }) => [
296
- scope.row.codeId && __props.config.editable ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
296
+ scope.row.codeId && __props.config.editable ? (vue.openBlock(), vue.createBlock(_sfc_main$v, {
297
297
  key: 0,
298
298
  icon: vue.unref(editable) ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
299
299
  class: "edit-icon",
@@ -311,7 +311,7 @@
311
311
  const __default__$r = vue.defineComponent({
312
312
  name: "MEditorCodeSelectCol"
313
313
  });
314
- const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
314
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
315
315
  ...__default__$r,
316
316
  props: {
317
317
  config: null,
@@ -421,7 +421,7 @@
421
421
  const __default__$q = vue.defineComponent({
422
422
  name: "MEditorEventSelect"
423
423
  });
424
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
424
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
425
425
  ...__default__$q,
426
426
  props: {
427
427
  config: null,
@@ -631,7 +631,7 @@
631
631
  const __default__$p = vue.defineComponent({
632
632
  name: "MEditorUISelect"
633
633
  });
634
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
634
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
635
635
  ...__default__$p,
636
636
  props: {
637
637
  config: null,
@@ -745,7 +745,7 @@
745
745
  const __default__$o = vue.defineComponent({
746
746
  name: "MEditorCodeEditor"
747
747
  });
748
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
748
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
749
749
  ...__default__$o,
750
750
  props: {
751
751
  initValues: null,
@@ -878,7 +878,7 @@
878
878
  const __default__$n = vue.defineComponent({
879
879
  name: "MEditorResizer"
880
880
  });
881
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
881
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
882
882
  ...__default__$n,
883
883
  emits: ["change"],
884
884
  setup(__props, { emit }) {
@@ -914,7 +914,7 @@
914
914
  const __default__$m = vue.defineComponent({
915
915
  name: "MEditorLayout"
916
916
  });
917
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
917
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
918
918
  ...__default__$m,
919
919
  props: {
920
920
  left: null,
@@ -1023,7 +1023,7 @@
1023
1023
  }, [
1024
1024
  vue.renderSlot(_ctx.$slots, "left")
1025
1025
  ], 6),
1026
- vue.createVNode(_sfc_main$o, { onChange: changeLeft })
1026
+ vue.createVNode(_sfc_main$p, { onChange: changeLeft })
1027
1027
  ], 64)) : vue.createCommentVNode("", true),
1028
1028
  vue.createElementVNode("div", {
1029
1029
  class: vue.normalizeClass(["m-editor-layout-center", __props.centerClass]),
@@ -1032,7 +1032,7 @@
1032
1032
  vue.renderSlot(_ctx.$slots, "center")
1033
1033
  ], 6),
1034
1034
  vue.unref(hasRight) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1035
- vue.createVNode(_sfc_main$o, { onChange: changeRight }),
1035
+ vue.createVNode(_sfc_main$p, { onChange: changeRight }),
1036
1036
  vue.createElementVNode("div", {
1037
1037
  class: vue.normalizeClass(["m-editor-layout-right", __props.rightClass]),
1038
1038
  style: vue.normalizeStyle(`width: ${__props.right}px`)
@@ -2752,7 +2752,7 @@
2752
2752
  const __default__$l = vue.defineComponent({
2753
2753
  name: "MEditorAddPageBox"
2754
2754
  });
2755
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
2755
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
2756
2756
  ...__default__$l,
2757
2757
  setup(__props) {
2758
2758
  const services = vue.inject("services");
@@ -2776,7 +2776,7 @@
2776
2776
  onClick: clickHandler
2777
2777
  }, [
2778
2778
  vue.createElementVNode("div", null, [
2779
- vue.createVNode(_sfc_main$u, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
2779
+ vue.createVNode(_sfc_main$v, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
2780
2780
  ]),
2781
2781
  _hoisted_3$3
2782
2782
  ])
@@ -2790,7 +2790,7 @@
2790
2790
  const __default__$k = vue.defineComponent({
2791
2791
  name: "MEditorFramework"
2792
2792
  });
2793
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
2793
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
2794
2794
  ...__default__$k,
2795
2795
  props: {
2796
2796
  codeOptions: { default: () => ({}) }
@@ -2868,7 +2868,7 @@
2868
2868
  "init-values": vue.unref(root),
2869
2869
  options: __props.codeOptions,
2870
2870
  onSave: saveCode
2871
- }, null, 8, ["init-values", "options"])) : (vue.openBlock(), vue.createBlock(_sfc_main$n, {
2871
+ }, null, 8, ["init-values", "options"])) : (vue.openBlock(), vue.createBlock(_sfc_main$o, {
2872
2872
  key: 1,
2873
2873
  class: "m-editor-content",
2874
2874
  "left-class": "m-editor-framework-left",
@@ -2887,7 +2887,7 @@
2887
2887
  ]),
2888
2888
  center: vue.withCtx(() => [
2889
2889
  vue.unref(pageLength) > 0 ? vue.renderSlot(_ctx.$slots, "workspace", { key: 0 }) : vue.renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
2890
- vue.createVNode(_sfc_main$m)
2890
+ vue.createVNode(_sfc_main$n)
2891
2891
  ])
2892
2892
  ]),
2893
2893
  _: 2
@@ -2917,7 +2917,7 @@
2917
2917
  const __default__$j = vue.defineComponent({
2918
2918
  name: "MEditorToolButton"
2919
2919
  });
2920
- const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
2920
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
2921
2921
  ...__default__$j,
2922
2922
  props: {
2923
2923
  data: { default: () => ({
@@ -3007,7 +3007,7 @@
3007
3007
  disabled: vue.unref(disabled)
3008
3008
  }, {
3009
3009
  default: vue.withCtx(() => [
3010
- __props.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
3010
+ __props.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$v, {
3011
3011
  key: 0,
3012
3012
  icon: __props.data.icon
3013
3013
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
@@ -3024,7 +3024,7 @@
3024
3024
  disabled: vue.unref(disabled)
3025
3025
  }, {
3026
3026
  default: vue.withCtx(() => [
3027
- __props.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
3027
+ __props.data.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$v, {
3028
3028
  key: 0,
3029
3029
  icon: __props.data.icon
3030
3030
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
@@ -3077,7 +3077,7 @@
3077
3077
  const __default__$i = vue.defineComponent({
3078
3078
  name: "MEditorNavMenu"
3079
3079
  });
3080
- const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
3080
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
3081
3081
  ...__default__$i,
3082
3082
  props: {
3083
3083
  data: { default: () => ({}) },
@@ -3236,7 +3236,7 @@
3236
3236
  style: vue.normalizeStyle(`width: ${vue.unref(columnWidth)?.[key]}px`)
3237
3237
  }, [
3238
3238
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(buttons)[key], (item, index) => {
3239
- return vue.openBlock(), vue.createBlock(_sfc_main$k, {
3239
+ return vue.openBlock(), vue.createBlock(_sfc_main$l, {
3240
3240
  data: item,
3241
3241
  key: index
3242
3242
  }, null, 8, ["data"]);
@@ -3252,7 +3252,7 @@
3252
3252
  const __default__$h = vue.defineComponent({
3253
3253
  name: "MEditorPropsPanel"
3254
3254
  });
3255
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3255
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
3256
3256
  ...__default__$h,
3257
3257
  emits: ["mounted"],
3258
3258
  setup(__props, { expose, emit }) {
@@ -3315,6 +3315,29 @@
3315
3315
  }
3316
3316
  });
3317
3317
 
3318
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
3319
+ __name: "SearchInput",
3320
+ emits: ["search"],
3321
+ setup(__props, { emit }) {
3322
+ const filterText = vue.ref("");
3323
+ const filterTextChangeHandler = () => {
3324
+ emit("search", filterText.value);
3325
+ };
3326
+ return (_ctx, _cache) => {
3327
+ return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicInput), {
3328
+ modelValue: filterText.value,
3329
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filterText.value = $event),
3330
+ class: "search-input",
3331
+ size: "small",
3332
+ placeholder: "\u8F93\u5165\u5173\u952E\u5B57\u8FDB\u884C\u8FC7\u6EE4",
3333
+ clearable: "",
3334
+ "prefix-icon": vue.unref(iconsVue.Search),
3335
+ onInput: filterTextChangeHandler
3336
+ }, null, 8, ["modelValue", "prefix-icon"]);
3337
+ };
3338
+ }
3339
+ });
3340
+
3318
3341
  const _hoisted_1$9 = {
3319
3342
  key: 0,
3320
3343
  class: "m-editor-content-bottom"
@@ -3408,7 +3431,7 @@
3408
3431
  return vue.openBlock(), vue.createElementBlock("div", {
3409
3432
  class: vue.normalizeClass(["m-editor-wrapper", isFullScreen.value ? "fullScreen" : "normal"])
3410
3433
  }, [
3411
- vue.createVNode(_sfc_main$p, {
3434
+ vue.createVNode(_sfc_main$q, {
3412
3435
  ref_key: "codeEditor",
3413
3436
  ref: codeEditor,
3414
3437
  class: "m-editor-container",
@@ -3658,6 +3681,7 @@
3658
3681
  setup(__props) {
3659
3682
  const services = vue.inject("services");
3660
3683
  const codeOptions = vue.inject("codeOptions", {});
3684
+ const size = vue.computed(() => globalThis.document.body.clientWidth - (services?.uiService.get("columnWidth").left || 0));
3661
3685
  const left = vue.ref(200);
3662
3686
  const currentTitle = vue.ref("");
3663
3687
  const codeConfig = vue.ref(null);
@@ -3687,17 +3711,18 @@
3687
3711
  currentTitle.value = state.codeList[0]?.name || "";
3688
3712
  });
3689
3713
  return (_ctx, _cache) => {
3690
- return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDialog), {
3691
- "model-value": true,
3714
+ return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicDrawer), {
3692
3715
  class: "code-editor-dialog",
3716
+ "model-value": true,
3693
3717
  title: currentTitle.value,
3694
- fullscreen: true,
3695
3718
  "close-on-press-escape": false,
3696
3719
  "append-to-body": true,
3697
- "show-close": false
3720
+ "show-close": false,
3721
+ "close-on-click-modal": false,
3722
+ size: vue.unref(size)
3698
3723
  }, {
3699
3724
  default: vue.withCtx(() => [
3700
- vue.createVNode(_sfc_main$n, {
3725
+ vue.createVNode(_sfc_main$o, {
3701
3726
  left: left.value,
3702
3727
  "onUpdate:left": _cache[0] || (_cache[0] = ($event) => left.value = $event),
3703
3728
  "min-left": 45,
@@ -3722,18 +3747,17 @@
3722
3747
  }, 8, ["left"])
3723
3748
  ]),
3724
3749
  _: 3
3725
- }, 8, ["title"]);
3750
+ }, 8, ["title", "size"]);
3726
3751
  };
3727
3752
  }
3728
3753
  });
3729
3754
 
3730
- const _hoisted_1$6 = { class: "m-editor-code-block-list" };
3731
- const _hoisted_2$2 = { class: "code-header-wrapper" };
3732
- const _hoisted_3 = /* @__PURE__ */ vue.createTextVNode("\u65B0\u589E");
3733
- const _hoisted_4 = ["id"];
3734
- const _hoisted_5 = { class: "list-item" };
3735
- const _hoisted_6 = { class: "code-name" };
3736
- const _hoisted_7 = {
3755
+ const _hoisted_1$6 = { class: "code-header-wrapper" };
3756
+ const _hoisted_2$2 = /* @__PURE__ */ vue.createTextVNode("\u65B0\u589E");
3757
+ const _hoisted_3 = ["id"];
3758
+ const _hoisted_4 = { class: "list-item" };
3759
+ const _hoisted_5 = { class: "code-name" };
3760
+ const _hoisted_6 = {
3737
3761
  key: 0,
3738
3762
  class: "right-tool"
3739
3763
  };
@@ -3754,6 +3778,7 @@
3754
3778
  id: target.id,
3755
3779
  name: target.name,
3756
3780
  type: "code",
3781
+ codeBlockContent: codeBlockService?.getCodeContentById(target.id),
3757
3782
  children: Object.entries(target.deps).map(([id, dep]) => ({
3758
3783
  name: dep.name,
3759
3784
  type: "node",
@@ -3797,7 +3822,6 @@
3797
3822
  }
3798
3823
  }
3799
3824
  };
3800
- const filterText = vue.ref("");
3801
3825
  const tree = vue.ref();
3802
3826
  const filterNode = (value, data) => {
3803
3827
  if (!value) {
@@ -3821,107 +3845,97 @@
3821
3845
  }
3822
3846
  };
3823
3847
  return (_ctx, _cache) => {
3824
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
3825
- vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
3826
- vue.createElementVNode("div", _hoisted_2$2, [
3827
- vue.createVNode(vue.unref(design.TMagicInput), {
3828
- class: vue.normalizeClass([vue.unref(editable) ? "code-filter-input" : "code-filter-input-no-btn"]),
3829
- size: "small",
3830
- placeholder: "\u8F93\u5165\u5173\u952E\u5B57\u8FDB\u884C\u8FC7\u6EE4",
3831
- clearable: "",
3832
- modelValue: filterText.value,
3833
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filterText.value = $event),
3834
- onInput: filterTextChangeHandler
3835
- }, null, 8, ["class", "modelValue"]),
3836
- vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
3837
- key: 0,
3838
- class: "create-code-button",
3839
- type: "primary",
3840
- size: "small",
3841
- onClick: createCodeBlock
3842
- }, {
3843
- default: vue.withCtx(() => [
3844
- _hoisted_3
3845
- ]),
3846
- _: 1
3847
- })) : vue.createCommentVNode("", true)
3848
- ])
3849
- ]),
3850
- vue.createVNode(vue.unref(design.TMagicScrollbar), null, {
3851
- default: vue.withCtx(() => [
3852
- vue.createVNode(vue.unref(design.TMagicTree), {
3853
- ref_key: "tree",
3854
- ref: tree,
3855
- class: "magic-editor-layer-tree",
3856
- "node-key": "id",
3857
- "empty-text": "\u6682\u65E0\u4EE3\u7801\u5757",
3858
- "default-expand-all": "",
3859
- "expand-on-click-node": false,
3860
- data: vue.unref(codeList),
3861
- "highlight-current": true,
3862
- "filter-node-method": filterNode,
3863
- onNodeClick: clickHandler
3864
- }, {
3865
- default: vue.withCtx(({ data }) => [
3866
- vue.createElementVNode("div", {
3867
- id: data.id,
3868
- class: "list-container"
3869
- }, [
3870
- vue.createElementVNode("div", _hoisted_5, [
3871
- vue.createElementVNode("span", _hoisted_6, vue.toDisplayString(data.name) + "\uFF08" + vue.toDisplayString(data.id) + "\uFF09", 1),
3872
- data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
3873
- vue.createVNode(vue.unref(design.TMagicTooltip), {
3874
- effect: "dark",
3875
- content: vue.unref(editable) ? "\u7F16\u8F91" : "\u67E5\u770B",
3876
- placement: "bottom"
3877
- }, {
3878
- default: vue.withCtx(() => [
3879
- vue.createVNode(_sfc_main$u, {
3880
- icon: vue.unref(editable) ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
3881
- class: "edit-icon",
3882
- onClick: vue.withModifiers(($event) => editCode(`${data.id}`), ["stop"])
3883
- }, null, 8, ["icon", "onClick"])
3884
- ]),
3885
- _: 2
3886
- }, 1032, ["content"]),
3887
- vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
3888
- key: 0,
3889
- effect: "dark",
3890
- content: "\u5220\u9664",
3891
- placement: "bottom"
3892
- }, {
3893
- default: vue.withCtx(() => [
3894
- vue.createVNode(_sfc_main$u, {
3895
- icon: vue.unref(iconsVue.Close),
3896
- class: "edit-icon",
3897
- onClick: vue.withModifiers(($event) => deleteCode(`${data.id}`), ["stop"])
3898
- }, null, 8, ["icon", "onClick"])
3899
- ]),
3900
- _: 2
3901
- }, 1024)) : vue.createCommentVNode("", true),
3902
- vue.renderSlot(_ctx.$slots, "code-block-panel-tool", {
3903
- id: data.id,
3904
- data: data.codeBlockContent
3905
- })
3906
- ])) : vue.createCommentVNode("", true)
3907
- ])
3908
- ], 8, _hoisted_4)
3909
- ]),
3910
- _: 3
3911
- }, 8, ["data"])
3912
- ]),
3913
- _: 3
3914
- }),
3915
- vue.unref(isShowCodeBlockEditor) ? (vue.openBlock(), vue.createBlock(_sfc_main$f, {
3916
- key: 0,
3917
- paramsColConfig: __props.paramsColConfig
3918
- }, {
3919
- "code-block-edit-panel-header": vue.withCtx(({ id }) => [
3920
- vue.renderSlot(_ctx.$slots, "code-block-edit-panel-header", { id })
3848
+ return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "m-editor-code-block-list" }, {
3849
+ default: vue.withCtx(() => [
3850
+ vue.renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
3851
+ vue.createElementVNode("div", _hoisted_1$6, [
3852
+ vue.createVNode(_sfc_main$i, { onSearch: filterTextChangeHandler }),
3853
+ vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicButton), {
3854
+ key: 0,
3855
+ class: "create-code-button",
3856
+ type: "primary",
3857
+ size: "small",
3858
+ onClick: createCodeBlock
3859
+ }, {
3860
+ default: vue.withCtx(() => [
3861
+ _hoisted_2$2
3862
+ ]),
3863
+ _: 1
3864
+ })) : vue.createCommentVNode("", true)
3865
+ ])
3921
3866
  ]),
3922
- _: 3
3923
- }, 8, ["paramsColConfig"])) : vue.createCommentVNode("", true)
3924
- ]);
3867
+ vue.createVNode(vue.unref(design.TMagicTree), {
3868
+ ref_key: "tree",
3869
+ ref: tree,
3870
+ class: "magic-editor-layer-tree",
3871
+ "node-key": "id",
3872
+ "empty-text": "\u6682\u65E0\u4EE3\u7801\u5757",
3873
+ "default-expand-all": "",
3874
+ "expand-on-click-node": false,
3875
+ data: vue.unref(codeList),
3876
+ "highlight-current": true,
3877
+ "filter-node-method": filterNode,
3878
+ onNodeClick: clickHandler
3879
+ }, {
3880
+ default: vue.withCtx(({ data }) => [
3881
+ vue.createElementVNode("div", {
3882
+ id: data.id,
3883
+ class: "list-container"
3884
+ }, [
3885
+ vue.createElementVNode("div", _hoisted_4, [
3886
+ vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(data.name) + "\uFF08" + vue.toDisplayString(data.id) + "\uFF09", 1),
3887
+ data.type === "code" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
3888
+ vue.createVNode(vue.unref(design.TMagicTooltip), {
3889
+ effect: "dark",
3890
+ content: vue.unref(editable) ? "\u7F16\u8F91" : "\u67E5\u770B",
3891
+ placement: "bottom"
3892
+ }, {
3893
+ default: vue.withCtx(() => [
3894
+ vue.createVNode(_sfc_main$v, {
3895
+ icon: vue.unref(editable) ? vue.unref(iconsVue.Edit) : vue.unref(iconsVue.View),
3896
+ class: "edit-icon",
3897
+ onClick: vue.withModifiers(($event) => editCode(`${data.id}`), ["stop"])
3898
+ }, null, 8, ["icon", "onClick"])
3899
+ ]),
3900
+ _: 2
3901
+ }, 1032, ["content"]),
3902
+ vue.unref(editable) ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTooltip), {
3903
+ key: 0,
3904
+ effect: "dark",
3905
+ content: "\u5220\u9664",
3906
+ placement: "bottom"
3907
+ }, {
3908
+ default: vue.withCtx(() => [
3909
+ vue.createVNode(_sfc_main$v, {
3910
+ icon: vue.unref(iconsVue.Close),
3911
+ class: "edit-icon",
3912
+ onClick: vue.withModifiers(($event) => deleteCode(`${data.id}`), ["stop"])
3913
+ }, null, 8, ["icon", "onClick"])
3914
+ ]),
3915
+ _: 2
3916
+ }, 1024)) : vue.createCommentVNode("", true),
3917
+ vue.renderSlot(_ctx.$slots, "code-block-panel-tool", {
3918
+ id: data.id,
3919
+ data: data.codeBlockContent
3920
+ })
3921
+ ])) : vue.createCommentVNode("", true)
3922
+ ])
3923
+ ], 8, _hoisted_3)
3924
+ ]),
3925
+ _: 3
3926
+ }, 8, ["data"]),
3927
+ vue.unref(isShowCodeBlockEditor) ? (vue.openBlock(), vue.createBlock(_sfc_main$f, {
3928
+ key: 0,
3929
+ paramsColConfig: __props.paramsColConfig
3930
+ }, {
3931
+ "code-block-edit-panel-header": vue.withCtx(({ id }) => [
3932
+ vue.renderSlot(_ctx.$slots, "code-block-edit-panel-header", { id })
3933
+ ]),
3934
+ _: 3
3935
+ }, 8, ["paramsColConfig"])) : vue.createCommentVNode("", true)
3936
+ ]),
3937
+ _: 3
3938
+ });
3925
3939
  };
3926
3940
  }
3927
3941
  });
@@ -3934,6 +3948,9 @@
3934
3948
  ...__default__$c,
3935
3949
  setup(__props) {
3936
3950
  const searchText = vue.ref("");
3951
+ const filterTextChangeHandler = (v) => {
3952
+ searchText.value = v;
3953
+ };
3937
3954
  const services = vue.inject("services");
3938
3955
  const stageOptions = vue.inject("stageOptions");
3939
3956
  const stage = vue.computed(() => services?.editorService.get("stage"));
@@ -4004,15 +4021,7 @@
4004
4021
  "model-value": vue.unref(collapseValue)
4005
4022
  }, {
4006
4023
  default: vue.withCtx(() => [
4007
- vue.createVNode(vue.unref(design.TMagicInput), {
4008
- placeholder: "\u8F93\u5165\u5173\u952E\u5B57\u8FDB\u884C\u8FC7\u6EE4",
4009
- class: "search-input",
4010
- size: "small",
4011
- clearable: "",
4012
- "prefix-icon": vue.unref(iconsVue.Search),
4013
- modelValue: searchText.value,
4014
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchText.value = $event)
4015
- }, null, 8, ["prefix-icon", "modelValue"]),
4024
+ vue.createVNode(_sfc_main$i, { onSearch: filterTextChangeHandler }),
4016
4025
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(list), (group, index) => {
4017
4026
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
4018
4027
  group.items && group.items.length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicCollapseItem), {
@@ -4020,7 +4029,7 @@
4020
4029
  name: `${index}`
4021
4030
  }, {
4022
4031
  title: vue.withCtx(() => [
4023
- vue.createVNode(_sfc_main$u, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
4032
+ vue.createVNode(_sfc_main$v, { icon: vue.unref(iconsVue.Grid) }, null, 8, ["icon"]),
4024
4033
  vue.createTextVNode(vue.toDisplayString(group.title), 1)
4025
4034
  ]),
4026
4035
  default: vue.withCtx(() => [
@@ -4035,7 +4044,7 @@
4035
4044
  onDrag: dragHandler
4036
4045
  }, [
4037
4046
  vue.renderSlot(_ctx.$slots, "component-list-item", { component: item }, () => [
4038
- vue.createVNode(_sfc_main$u, {
4047
+ vue.createVNode(_sfc_main$v, {
4039
4048
  icon: item.icon
4040
4049
  }, null, 8, ["icon"]),
4041
4050
  vue.createVNode(vue.unref(design.TMagicTooltip), {
@@ -4158,7 +4167,7 @@
4158
4167
  }, [
4159
4168
  vue.createElementVNode("div", null, [
4160
4169
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.menuData, (item, index) => {
4161
- return vue.openBlock(), vue.createBlock(_sfc_main$k, {
4170
+ return vue.openBlock(), vue.createBlock(_sfc_main$l, {
4162
4171
  "event-type": "mouseup",
4163
4172
  data: item,
4164
4173
  key: index,
@@ -4305,7 +4314,6 @@
4305
4314
  const menu = vue.ref();
4306
4315
  const checkedKeys = vue.ref([]);
4307
4316
  const isCtrlKeyDown = vue.ref(false);
4308
- const filterText = vue.ref("");
4309
4317
  const expandedKeys = vue.ref([]);
4310
4318
  const currentNodeKey = vue.ref();
4311
4319
  const clicked = vue.ref(false);
@@ -4490,16 +4498,7 @@
4490
4498
  return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicScrollbar), { class: "magic-editor-layer-panel" }, {
4491
4499
  default: vue.withCtx(() => [
4492
4500
  vue.renderSlot(_ctx.$slots, "layer-panel-header"),
4493
- vue.createVNode(vue.unref(design.TMagicInput), {
4494
- modelValue: filterText.value,
4495
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filterText.value = $event),
4496
- class: "search-input",
4497
- size: "small",
4498
- placeholder: "\u8F93\u5165\u5173\u952E\u5B57\u8FDB\u884C\u8FC7\u6EE4",
4499
- clearable: "",
4500
- "prefix-icon": vue.unref(iconsVue.Search),
4501
- onChange: filterTextChangeHandler
4502
- }, null, 8, ["modelValue", "prefix-icon"]),
4501
+ vue.createVNode(_sfc_main$i, { onSearch: filterTextChangeHandler }),
4503
4502
  vue.unref(values).length ? (vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTree), {
4504
4503
  key: 0,
4505
4504
  class: "magic-editor-layer-tree",
@@ -4636,7 +4635,7 @@
4636
4635
  (vue.openBlock(), vue.createElementBlock("div", {
4637
4636
  key: config.text
4638
4637
  }, [
4639
- config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
4638
+ config.icon ? (vue.openBlock(), vue.createBlock(_sfc_main$v, {
4640
4639
  key: 0,
4641
4640
  icon: config.icon
4642
4641
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
@@ -4857,14 +4856,14 @@
4857
4856
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
4858
4857
  onClick: addPage
4859
4858
  }, [
4860
- vue.createVNode(_sfc_main$u, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
4859
+ vue.createVNode(_sfc_main$v, { icon: vue.unref(iconsVue.Plus) }, null, 8, ["icon"])
4861
4860
  ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1)),
4862
4861
  canScroll.value ? (vue.openBlock(), vue.createElementBlock("div", {
4863
4862
  key: 2,
4864
4863
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
4865
4864
  onClick: _cache[0] || (_cache[0] = ($event) => scroll("left"))
4866
4865
  }, [
4867
- vue.createVNode(_sfc_main$u, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
4866
+ vue.createVNode(_sfc_main$v, { icon: vue.unref(iconsVue.ArrowLeftBold) }, null, 8, ["icon"])
4868
4867
  ])) : vue.createCommentVNode("", true),
4869
4868
  vue.unref(pageLength) ? (vue.openBlock(), vue.createElementBlock("div", {
4870
4869
  key: 3,
@@ -4880,7 +4879,7 @@
4880
4879
  class: "m-editor-page-bar-item m-editor-page-bar-item-icon",
4881
4880
  onClick: _cache[1] || (_cache[1] = ($event) => scroll("right"))
4882
4881
  }, [
4883
- vue.createVNode(_sfc_main$u, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
4882
+ vue.createVNode(_sfc_main$v, { icon: vue.unref(iconsVue.ArrowRightBold) }, null, 8, ["icon"])
4884
4883
  ])) : vue.createCommentVNode("", true)
4885
4884
  ], 512);
4886
4885
  };
@@ -4952,7 +4951,7 @@
4952
4951
  default: vue.withCtx(() => [
4953
4952
  vue.createElementVNode("div", null, [
4954
4953
  vue.renderSlot(_ctx.$slots, "page-bar-popover", { page: item }, () => [
4955
- vue.createVNode(_sfc_main$k, {
4954
+ vue.createVNode(_sfc_main$l, {
4956
4955
  data: {
4957
4956
  type: "button",
4958
4957
  text: "\u590D\u5236",
@@ -4960,7 +4959,7 @@
4960
4959
  handler: () => copy(item)
4961
4960
  }
4962
4961
  }, null, 8, ["data"]),
4963
- vue.createVNode(_sfc_main$k, {
4962
+ vue.createVNode(_sfc_main$l, {
4964
4963
  data: {
4965
4964
  type: "button",
4966
4965
  text: "\u5220\u9664",
@@ -5775,9 +5774,6 @@
5775
5774
  });
5776
5775
  constructor() {
5777
5776
  super([
5778
- "getCodeContentById",
5779
- "getCodeDslByIds",
5780
- "getCurrentDsl",
5781
5777
  "setCodeDslById",
5782
5778
  "setCodeEditorShowStatus",
5783
5779
  "setEditStatus",
@@ -5794,16 +5790,16 @@
5794
5790
  getCodeDsl() {
5795
5791
  return this.state.codeDsl;
5796
5792
  }
5797
- async getCodeContentById(id2) {
5793
+ getCodeContentById(id2) {
5798
5794
  if (!id2)
5799
5795
  return null;
5800
- const totalCodeDsl = await this.getCodeDsl();
5796
+ const totalCodeDsl = this.getCodeDsl();
5801
5797
  if (!totalCodeDsl)
5802
5798
  return null;
5803
5799
  return totalCodeDsl[id2] ?? null;
5804
5800
  }
5805
5801
  async setCodeDslById(id, codeConfig) {
5806
- const codeDsl = await this.getCodeDsl();
5802
+ const codeDsl = this.getCodeDsl();
5807
5803
  if (!codeDsl) {
5808
5804
  throw new Error("dsl\u4E2D\u6CA1\u6709codeBlocks");
5809
5805
  }
@@ -5818,8 +5814,8 @@
5818
5814
  };
5819
5815
  this.emit("addOrUpdate", id, codeDsl[id]);
5820
5816
  }
5821
- async getCodeDslByIds(ids) {
5822
- const codeDsl2 = await this.getCodeDsl();
5817
+ getCodeDslByIds(ids) {
5818
+ const codeDsl2 = this.getCodeDsl();
5823
5819
  return lodashEs.pick(codeDsl2, ids);
5824
5820
  }
5825
5821
  async setCodeEditorShowStatus(status) {
@@ -5834,8 +5830,8 @@
5834
5830
  this.setId(id2);
5835
5831
  this.state.isShowCodeEditor = status;
5836
5832
  }
5837
- async getCurrentDsl() {
5838
- return await this.getCodeContentById(this.state.id);
5833
+ getCurrentDsl() {
5834
+ return this.getCodeContentById(this.state.id);
5839
5835
  }
5840
5836
  getEditStatus() {
5841
5837
  return this.state.editable;
@@ -6397,11 +6393,11 @@
6397
6393
  const _sfc_main = vue.defineComponent({
6398
6394
  name: "m-editor",
6399
6395
  components: {
6400
- TMagicNavMenu: _sfc_main$j,
6396
+ TMagicNavMenu: _sfc_main$k,
6401
6397
  Sidebar: _sfc_main$9,
6402
6398
  Workspace: _sfc_main$1,
6403
- PropsPanel: _sfc_main$i,
6404
- Framework: _sfc_main$l
6399
+ PropsPanel: _sfc_main$j,
6400
+ Framework: _sfc_main$m
6405
6401
  },
6406
6402
  props: editorProps,
6407
6403
  emits: ["props-panel-mounted", "update:modelValue"],
@@ -6546,13 +6542,13 @@
6546
6542
  app.config.globalProperties.$TMAGIC_EDITOR = option;
6547
6543
  setConfig(option);
6548
6544
  app.component(Editor.name, Editor);
6549
- app.component("m-fields-ui-select", _sfc_main$q);
6550
- app.component("m-fields-code-link", _sfc_main$v);
6551
- app.component("m-fields-vs-code", _sfc_main$w);
6552
- app.component("magic-code-editor", _sfc_main$p);
6553
- app.component("m-fields-code-select", _sfc_main$t);
6554
- app.component("m-fields-code-select-col", _sfc_main$s);
6555
- app.component("m-fields-event-select", _sfc_main$r);
6545
+ app.component("m-fields-ui-select", _sfc_main$r);
6546
+ app.component("m-fields-code-link", _sfc_main$w);
6547
+ app.component("m-fields-vs-code", _sfc_main$x);
6548
+ app.component("magic-code-editor", _sfc_main$q);
6549
+ app.component("m-fields-code-select", _sfc_main$u);
6550
+ app.component("m-fields-code-select-col", _sfc_main$t);
6551
+ app.component("m-fields-event-select", _sfc_main$s);
6556
6552
  }
6557
6553
  };
6558
6554
 
@@ -6560,24 +6556,24 @@
6560
6556
  exports.COPY_STORAGE_KEY = COPY_STORAGE_KEY;
6561
6557
  exports.CodeBlockList = _sfc_main$e;
6562
6558
  exports.CodeDeleteErrorType = CodeDeleteErrorType;
6563
- exports.CodeSelect = _sfc_main$t;
6564
- exports.CodeSelectCol = _sfc_main$s;
6559
+ exports.CodeSelect = _sfc_main$u;
6560
+ exports.CodeSelectCol = _sfc_main$t;
6565
6561
  exports.ColumnLayout = ColumnLayout;
6566
6562
  exports.ComponentListPanel = _sfc_main$d;
6567
6563
  exports.ContentMenu = _sfc_main$c;
6568
- exports.EventSelect = _sfc_main$r;
6564
+ exports.EventSelect = _sfc_main$s;
6569
6565
  exports.Fixed2Other = Fixed2Other;
6570
6566
  exports.H_GUIDE_LINE_STORAGE_KEY = H_GUIDE_LINE_STORAGE_KEY;
6571
- exports.Icon = _sfc_main$u;
6567
+ exports.Icon = _sfc_main$v;
6572
6568
  exports.Keys = Keys;
6573
6569
  exports.LayerOffset = LayerOffset;
6574
6570
  exports.LayerPanel = _sfc_main$a;
6575
6571
  exports.Layout = Layout;
6576
- exports.LayoutContainer = _sfc_main$n;
6577
- exports.PropsPanel = _sfc_main$i;
6578
- exports.TMagicCodeEditor = _sfc_main$p;
6572
+ exports.LayoutContainer = _sfc_main$o;
6573
+ exports.PropsPanel = _sfc_main$j;
6574
+ exports.TMagicCodeEditor = _sfc_main$q;
6579
6575
  exports.TMagicEditor = Editor;
6580
- exports.ToolButton = _sfc_main$k;
6576
+ exports.ToolButton = _sfc_main$l;
6581
6577
  exports.V_GUIDE_LINE_STORAGE_KEY = V_GUIDE_LINE_STORAGE_KEY;
6582
6578
  exports.beforePaste = beforePaste;
6583
6579
  exports.change2Fixed = change2Fixed;