@tmagic/editor 1.5.12 → 1.5.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.
@@ -2467,32 +2467,6 @@
2467
2467
  Stack.prototype.has = stackHas;
2468
2468
  Stack.prototype.set = stackSet;
2469
2469
 
2470
- /**
2471
- * The base implementation of `_.assign` without support for multiple sources
2472
- * or `customizer` functions.
2473
- *
2474
- * @private
2475
- * @param {Object} object The destination object.
2476
- * @param {Object} source The source object.
2477
- * @returns {Object} Returns `object`.
2478
- */
2479
- function baseAssign(object, source) {
2480
- return object && copyObject(source, keys(source), object);
2481
- }
2482
-
2483
- /**
2484
- * The base implementation of `_.assignIn` without support for multiple sources
2485
- * or `customizer` functions.
2486
- *
2487
- * @private
2488
- * @param {Object} object The destination object.
2489
- * @param {Object} source The source object.
2490
- * @returns {Object} Returns `object`.
2491
- */
2492
- function baseAssignIn(object, source) {
2493
- return object && copyObject(source, keysIn(source), object);
2494
- }
2495
-
2496
2470
  /** Detect free variable `exports`. */
2497
2471
  var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
2498
2472
 
@@ -2578,7 +2552,7 @@
2578
2552
  var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
2579
2553
 
2580
2554
  /* Built-in method references for those with the same name as other `lodash` methods. */
2581
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
2555
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
2582
2556
 
2583
2557
  /**
2584
2558
  * Creates an array of the own enumerable symbols of `object`.
@@ -2587,59 +2561,16 @@
2587
2561
  * @param {Object} object The object to query.
2588
2562
  * @returns {Array} Returns the array of symbols.
2589
2563
  */
2590
- var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
2564
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
2591
2565
  if (object == null) {
2592
2566
  return [];
2593
2567
  }
2594
2568
  object = Object(object);
2595
- return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
2569
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
2596
2570
  return propertyIsEnumerable.call(object, symbol);
2597
2571
  });
2598
2572
  };
2599
2573
 
2600
- /**
2601
- * Copies own symbols of `source` to `object`.
2602
- *
2603
- * @private
2604
- * @param {Object} source The object to copy symbols from.
2605
- * @param {Object} [object={}] The object to copy symbols to.
2606
- * @returns {Object} Returns `object`.
2607
- */
2608
- function copySymbols(source, object) {
2609
- return copyObject(source, getSymbols(source), object);
2610
- }
2611
-
2612
- /* Built-in method references for those with the same name as other `lodash` methods. */
2613
- var nativeGetSymbols = Object.getOwnPropertySymbols;
2614
-
2615
- /**
2616
- * Creates an array of the own and inherited enumerable symbols of `object`.
2617
- *
2618
- * @private
2619
- * @param {Object} object The object to query.
2620
- * @returns {Array} Returns the array of symbols.
2621
- */
2622
- var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
2623
- var result = [];
2624
- while (object) {
2625
- arrayPush(result, getSymbols(object));
2626
- object = getPrototype(object);
2627
- }
2628
- return result;
2629
- };
2630
-
2631
- /**
2632
- * Copies own and inherited symbols of `source` to `object`.
2633
- *
2634
- * @private
2635
- * @param {Object} source The object to copy symbols from.
2636
- * @param {Object} [object={}] The object to copy symbols to.
2637
- * @returns {Object} Returns `object`.
2638
- */
2639
- function copySymbolsIn(source, object) {
2640
- return copyObject(source, getSymbolsIn(source), object);
2641
- }
2642
-
2643
2574
  /**
2644
2575
  * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2645
2576
  * `keysFunc` and `symbolsFunc` to get the enumerable property names and
@@ -2667,18 +2598,6 @@
2667
2598
  return baseGetAllKeys(object, keys, getSymbols);
2668
2599
  }
2669
2600
 
2670
- /**
2671
- * Creates an array of own and inherited enumerable property names and
2672
- * symbols of `object`.
2673
- *
2674
- * @private
2675
- * @param {Object} object The object to query.
2676
- * @returns {Array} Returns the array of property names and symbols.
2677
- */
2678
- function getAllKeysIn(object) {
2679
- return baseGetAllKeys(object, keysIn, getSymbolsIn);
2680
- }
2681
-
2682
2601
  /* Built-in method references that are verified to be native. */
2683
2602
  var DataView = getNative(root$1, 'DataView');
2684
2603
 
@@ -2787,7 +2706,7 @@
2787
2706
  * @returns {Object} Returns the cloned data view.
2788
2707
  */
2789
2708
  function cloneDataView(dataView, isDeep) {
2790
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
2709
+ var buffer = cloneArrayBuffer(dataView.buffer) ;
2791
2710
  return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2792
2711
  }
2793
2712
 
@@ -2880,7 +2799,7 @@
2880
2799
  return new Ctor(+object);
2881
2800
 
2882
2801
  case dataViewTag$2:
2883
- return cloneDataView(object, isDeep);
2802
+ return cloneDataView(object);
2884
2803
 
2885
2804
  case float32Tag$1: case float64Tag$1:
2886
2805
  case int8Tag$1: case int16Tag$1: case int32Tag$1:
@@ -2991,9 +2910,7 @@
2991
2910
  var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2992
2911
 
2993
2912
  /** Used to compose bitmasks for cloning. */
2994
- var CLONE_DEEP_FLAG$1 = 1,
2995
- CLONE_FLAT_FLAG = 2,
2996
- CLONE_SYMBOLS_FLAG$1 = 4;
2913
+ var CLONE_DEEP_FLAG$1 = 1;
2997
2914
 
2998
2915
  /** `Object#toString` result references. */
2999
2916
  var argsTag$1 = '[object Arguments]',
@@ -3058,9 +2975,7 @@
3058
2975
  */
3059
2976
  function baseClone(value, bitmask, customizer, key, object, stack) {
3060
2977
  var result,
3061
- isDeep = bitmask & CLONE_DEEP_FLAG$1,
3062
- isFlat = bitmask & CLONE_FLAT_FLAG,
3063
- isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
2978
+ isDeep = bitmask & CLONE_DEEP_FLAG$1;
3064
2979
  if (result !== undefined) {
3065
2980
  return result;
3066
2981
  }
@@ -3070,9 +2985,6 @@
3070
2985
  var isArr = isArray(value);
3071
2986
  if (isArr) {
3072
2987
  result = initCloneArray(value);
3073
- if (!isDeep) {
3074
- return copyArray(value, result);
3075
- }
3076
2988
  } else {
3077
2989
  var tag = getTag(value),
3078
2990
  isFunc = tag == funcTag || tag == genTag;
@@ -3081,12 +2993,7 @@
3081
2993
  return cloneBuffer(value, isDeep);
3082
2994
  }
3083
2995
  if (tag == objectTag$1 || tag == argsTag$1 || (isFunc && !object)) {
3084
- result = (isFlat || isFunc) ? {} : initCloneObject(value);
3085
- if (!isDeep) {
3086
- return isFlat
3087
- ? copySymbolsIn(value, baseAssignIn(result, value))
3088
- : copySymbols(value, baseAssign(result, value));
3089
- }
2996
+ result = (isFunc) ? {} : initCloneObject(value);
3090
2997
  } else {
3091
2998
  if (!cloneableTags[tag]) {
3092
2999
  return object ? value : {};
@@ -3112,9 +3019,8 @@
3112
3019
  });
3113
3020
  }
3114
3021
 
3115
- var keysFunc = isFull
3116
- ? (isFlat ? getAllKeysIn : getAllKeys)
3117
- : (isFlat ? keysIn : keys);
3022
+ var keysFunc = (getAllKeys)
3023
+ ;
3118
3024
 
3119
3025
  var props = isArr ? undefined : keysFunc(value);
3120
3026
  arrayEach(props || value, function(subValue, key) {
@@ -6341,7 +6247,7 @@
6341
6247
  class History extends BaseService {
6342
6248
  state = vue.reactive({
6343
6249
  pageSteps: {},
6344
- pageId: undefined,
6250
+ pageId: void 0,
6345
6251
  canRedo: false,
6346
6252
  canUndo: false
6347
6253
  });
@@ -6354,7 +6260,7 @@
6354
6260
  this.resetPage();
6355
6261
  }
6356
6262
  resetPage() {
6357
- this.state.pageId = undefined;
6263
+ this.state.pageId = void 0;
6358
6264
  this.state.canRedo = false;
6359
6265
  this.state.canUndo = false;
6360
6266
  }
@@ -6374,7 +6280,7 @@
6374
6280
  this.emit("page-change", this.state.pageSteps[this.state.pageId]);
6375
6281
  }
6376
6282
  resetState() {
6377
- this.state.pageId = undefined;
6283
+ this.state.pageId = void 0;
6378
6284
  this.state.pageSteps = {};
6379
6285
  this.state.canRedo = false;
6380
6286
  this.state.canUndo = false;
@@ -6426,7 +6332,6 @@
6426
6332
  return Protocol2;
6427
6333
  })(Protocol || {});
6428
6334
  const canUsePluginMethods$5 = {
6429
- async: [],
6430
6335
  sync: ["getStorage", "getNamespace", "clear", "getItem", "removeItem", "setItem"]
6431
6336
  };
6432
6337
  class WebStorage extends BaseService {
@@ -6563,9 +6468,7 @@
6563
6468
  "undo",
6564
6469
  "redo",
6565
6470
  "move"
6566
- ],
6567
- sync: []
6568
- };
6471
+ ]};
6569
6472
  class Editor extends BaseService {
6570
6473
  state = vue.reactive({
6571
6474
  root: null,
@@ -7962,7 +7865,7 @@
7962
7865
  const nodeStatus = nodeStatusMap.get(id);
7963
7866
  if (!nodeStatus) return;
7964
7867
  utils.getKeys(status).forEach((key) => {
7965
- if (nodeStatus[key] !== undefined && status[key] !== undefined) {
7868
+ if (nodeStatus[key] !== void 0 && status[key] !== void 0) {
7966
7869
  nodeStatus[key] = Boolean(status[key]);
7967
7870
  }
7968
7871
  });
@@ -8565,9 +8468,7 @@
8565
8468
  }
8566
8469
  });
8567
8470
  const canUsePluginMethods$3 = {
8568
- async: ["zoom", "calcZoom"],
8569
- sync: []
8570
- };
8471
+ async: ["zoom", "calcZoom"]};
8571
8472
  class Ui extends BaseService {
8572
8473
  constructor() {
8573
8474
  super(canUsePluginMethods$3.async.map((methodName) => ({ name: methodName, isAsync: true })));
@@ -9975,7 +9876,7 @@
9975
9876
  "visible": { type: Boolean, ...{ default: false } },
9976
9877
  "visibleModifiers": {}
9977
9878
  }),
9978
- emits: /* @__PURE__ */ vue.mergeModels(["submit"], ["update:width", "update:visible"]),
9879
+ emits: /* @__PURE__ */ vue.mergeModels(["submit", "close", "open"], ["update:width", "update:visible"]),
9979
9880
  setup(__props, { expose: __expose, emit: __emit }) {
9980
9881
  const width = vue.useModel(__props, "width");
9981
9882
  const boxVisible = vue.useModel(__props, "visible");
@@ -10088,7 +9989,7 @@
10088
9989
  }
10089
9990
  ]);
10090
9991
  const submitForm = (values, data) => {
10091
- changedValue.value = undefined;
9992
+ changedValue.value = void 0;
10092
9993
  emit("submit", values, data);
10093
9994
  };
10094
9995
  const errorHandler = (error) => {
@@ -10117,10 +10018,19 @@
10117
10018
  });
10118
10019
  };
10119
10020
  const closedHandler = () => {
10120
- changedValue.value = undefined;
10021
+ changedValue.value = void 0;
10121
10022
  };
10122
10023
  const parentFloating = vue.inject("parentFloating", vue.ref(null));
10123
10024
  const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, parentFloating);
10025
+ vue.watch(boxVisible, (visible) => {
10026
+ vue.nextTick(() => {
10027
+ if (!visible) {
10028
+ emit("close");
10029
+ } else {
10030
+ emit("open");
10031
+ }
10032
+ });
10033
+ });
10124
10034
  __expose({
10125
10035
  async show() {
10126
10036
  calcBoxPosition();
@@ -10385,7 +10295,7 @@
10385
10295
  });
10386
10296
  }
10387
10297
  editIndex = -1;
10388
- codeConfig.value = undefined;
10298
+ codeConfig.value = void 0;
10389
10299
  codeBlockEditorRef.value?.hide();
10390
10300
  };
10391
10301
  return (_ctx, _cache) => {
@@ -11737,7 +11647,7 @@
11737
11647
  return target;
11738
11648
  };
11739
11649
 
11740
- const _sfc_main$13 = {};
11650
+ const _sfc_main$13 = { };
11741
11651
 
11742
11652
  const _hoisted_1$J = {
11743
11653
  xmlns: "http://www.w3.org/2000/svg",
@@ -11751,7 +11661,7 @@
11751
11661
  }
11752
11662
  const BackgroundRepeat = /*#__PURE__*/_export_sfc(_sfc_main$13, [['render',_sfc_render$k]]);
11753
11663
 
11754
- const _sfc_main$12 = {};
11664
+ const _sfc_main$12 = { };
11755
11665
 
11756
11666
  const _hoisted_1$I = {
11757
11667
  xmlns: "http://www.w3.org/2000/svg",
@@ -11768,7 +11678,7 @@
11768
11678
  }
11769
11679
  const BackgroundRepeatX = /*#__PURE__*/_export_sfc(_sfc_main$12, [['render',_sfc_render$j]]);
11770
11680
 
11771
- const _sfc_main$11 = {};
11681
+ const _sfc_main$11 = { };
11772
11682
 
11773
11683
  const _hoisted_1$H = {
11774
11684
  xmlns: "http://www.w3.org/2000/svg",
@@ -11785,7 +11695,7 @@
11785
11695
  }
11786
11696
  const BackgroundRepeatY = /*#__PURE__*/_export_sfc(_sfc_main$11, [['render',_sfc_render$i]]);
11787
11697
 
11788
- const _sfc_main$10 = {};
11698
+ const _sfc_main$10 = { };
11789
11699
 
11790
11700
  const _hoisted_1$G = {
11791
11701
  xmlns: "http://www.w3.org/2000/svg",
@@ -11877,7 +11787,7 @@
11877
11787
  }
11878
11788
  });
11879
11789
 
11880
- const _sfc_main$_ = {};
11790
+ const _sfc_main$_ = { };
11881
11791
 
11882
11792
  const _hoisted_1$F = {
11883
11793
  xmlns: "http://www.w3.org/2000/svg",
@@ -11891,7 +11801,7 @@
11891
11801
  }
11892
11802
  const AlignLeft = /*#__PURE__*/_export_sfc(_sfc_main$_, [['render',_sfc_render$g]]);
11893
11803
 
11894
- const _sfc_main$Z = {};
11804
+ const _sfc_main$Z = { };
11895
11805
 
11896
11806
  const _hoisted_1$E = {
11897
11807
  xmlns: "http://www.w3.org/2000/svg",
@@ -11905,7 +11815,7 @@
11905
11815
  }
11906
11816
  const AlignCenter = /*#__PURE__*/_export_sfc(_sfc_main$Z, [['render',_sfc_render$f]]);
11907
11817
 
11908
- const _sfc_main$Y = {};
11818
+ const _sfc_main$Y = { };
11909
11819
 
11910
11820
  const _hoisted_1$D = {
11911
11821
  xmlns: "http://www.w3.org/2000/svg",
@@ -12102,7 +12012,7 @@
12102
12012
  }
12103
12013
  });
12104
12014
 
12105
- const _sfc_main$V = {};
12015
+ const _sfc_main$V = { };
12106
12016
 
12107
12017
  const _hoisted_1$B = {
12108
12018
  xmlns: "http://www.w3.org/2000/svg",
@@ -12116,7 +12026,7 @@
12116
12026
  }
12117
12027
  const DisplayBlock = /*#__PURE__*/_export_sfc(_sfc_main$V, [['render',_sfc_render$d]]);
12118
12028
 
12119
- const _sfc_main$U = {};
12029
+ const _sfc_main$U = { };
12120
12030
 
12121
12031
  const _hoisted_1$A = {
12122
12032
  xmlns: "http://www.w3.org/2000/svg",
@@ -12130,7 +12040,7 @@
12130
12040
  }
12131
12041
  const DisplayFlex = /*#__PURE__*/_export_sfc(_sfc_main$U, [['render',_sfc_render$c]]);
12132
12042
 
12133
- const _sfc_main$T = {};
12043
+ const _sfc_main$T = { };
12134
12044
 
12135
12045
  const _hoisted_1$z = {
12136
12046
  xmlns: "http://www.w3.org/2000/svg",
@@ -12144,7 +12054,7 @@
12144
12054
  }
12145
12055
  const DisplayInline = /*#__PURE__*/_export_sfc(_sfc_main$T, [['render',_sfc_render$b]]);
12146
12056
 
12147
- const _sfc_main$S = {};
12057
+ const _sfc_main$S = { };
12148
12058
 
12149
12059
  const _hoisted_1$y = {
12150
12060
  xmlns: "http://www.w3.org/2000/svg",
@@ -12158,7 +12068,7 @@
12158
12068
  }
12159
12069
  const DisplayInlineBlock = /*#__PURE__*/_export_sfc(_sfc_main$S, [['render',_sfc_render$a]]);
12160
12070
 
12161
- const _sfc_main$R = {};
12071
+ const _sfc_main$R = { };
12162
12072
 
12163
12073
  const _hoisted_1$x = {
12164
12074
  xmlns: "http://www.w3.org/2000/svg",
@@ -12172,7 +12082,7 @@
12172
12082
  }
12173
12083
  const DisplayNone = /*#__PURE__*/_export_sfc(_sfc_main$R, [['render',_sfc_render$9]]);
12174
12084
 
12175
- const _sfc_main$Q = {};
12085
+ const _sfc_main$Q = { };
12176
12086
 
12177
12087
  const _hoisted_1$w = {
12178
12088
  xmlns: "http://www.w3.org/2000/svg",
@@ -12186,7 +12096,7 @@
12186
12096
  }
12187
12097
  const FlexDirectionColumn = /*#__PURE__*/_export_sfc(_sfc_main$Q, [['render',_sfc_render$8]]);
12188
12098
 
12189
- const _sfc_main$P = {};
12099
+ const _sfc_main$P = { };
12190
12100
 
12191
12101
  const _hoisted_1$v = {
12192
12102
  xmlns: "http://www.w3.org/2000/svg",
@@ -12200,7 +12110,7 @@
12200
12110
  }
12201
12111
  const FlexDirectionColumnReverse = /*#__PURE__*/_export_sfc(_sfc_main$P, [['render',_sfc_render$7]]);
12202
12112
 
12203
- const _sfc_main$O = {};
12113
+ const _sfc_main$O = { };
12204
12114
 
12205
12115
  const _hoisted_1$u = {
12206
12116
  xmlns: "http://www.w3.org/2000/svg",
@@ -12214,7 +12124,7 @@
12214
12124
  }
12215
12125
  const FlexDirectionRow = /*#__PURE__*/_export_sfc(_sfc_main$O, [['render',_sfc_render$6]]);
12216
12126
 
12217
- const _sfc_main$N = {};
12127
+ const _sfc_main$N = { };
12218
12128
 
12219
12129
  const _hoisted_1$t = {
12220
12130
  xmlns: "http://www.w3.org/2000/svg",
@@ -12228,7 +12138,7 @@
12228
12138
  }
12229
12139
  const FlexDirectionRowReverse = /*#__PURE__*/_export_sfc(_sfc_main$N, [['render',_sfc_render$5]]);
12230
12140
 
12231
- const _sfc_main$M = {};
12141
+ const _sfc_main$M = { };
12232
12142
 
12233
12143
  const _hoisted_1$s = {
12234
12144
  xmlns: "http://www.w3.org/2000/svg",
@@ -12242,7 +12152,7 @@
12242
12152
  }
12243
12153
  const JustifyContentCenter = /*#__PURE__*/_export_sfc(_sfc_main$M, [['render',_sfc_render$4]]);
12244
12154
 
12245
- const _sfc_main$L = {};
12155
+ const _sfc_main$L = { };
12246
12156
 
12247
12157
  const _hoisted_1$r = {
12248
12158
  xmlns: "http://www.w3.org/2000/svg",
@@ -12256,7 +12166,7 @@
12256
12166
  }
12257
12167
  const JustifyContentFlexEnd = /*#__PURE__*/_export_sfc(_sfc_main$L, [['render',_sfc_render$3]]);
12258
12168
 
12259
- const _sfc_main$K = {};
12169
+ const _sfc_main$K = { };
12260
12170
 
12261
12171
  const _hoisted_1$q = {
12262
12172
  xmlns: "http://www.w3.org/2000/svg",
@@ -12270,7 +12180,7 @@
12270
12180
  }
12271
12181
  const JustifyContentFlexStart = /*#__PURE__*/_export_sfc(_sfc_main$K, [['render',_sfc_render$2]]);
12272
12182
 
12273
- const _sfc_main$J = {};
12183
+ const _sfc_main$J = { };
12274
12184
 
12275
12185
  const _hoisted_1$p = {
12276
12186
  xmlns: "http://www.w3.org/2000/svg",
@@ -12284,7 +12194,7 @@
12284
12194
  }
12285
12195
  const JustifyContentSpaceAround = /*#__PURE__*/_export_sfc(_sfc_main$J, [['render',_sfc_render$1]]);
12286
12196
 
12287
- const _sfc_main$I = {};
12197
+ const _sfc_main$I = { };
12288
12198
 
12289
12199
  const _hoisted_1$o = {
12290
12200
  xmlns: "http://www.w3.org/2000/svg",
@@ -12882,7 +12792,7 @@
12882
12792
  emit("change", id);
12883
12793
  mForm?.$emit("field-change", props.prop, id);
12884
12794
  }
12885
- {
12795
+ if (cancelHandler) {
12886
12796
  cancelHandler();
12887
12797
  }
12888
12798
  };
@@ -14198,7 +14108,7 @@
14198
14108
  vue.renderSlot(_ctx.$slots, "props-panel")
14199
14109
  ]),
14200
14110
  key: "0"
14201
- } : undefined
14111
+ } : void 0
14202
14112
  ]), 1032, ["left", "right", "min-left", "min-right", "min-center", "width"])),
14203
14113
  vue.renderSlot(_ctx.$slots, "content-after"),
14204
14114
  vue.renderSlot(_ctx.$slots, "footer")
@@ -15320,6 +15230,7 @@
15320
15230
  emit("node-contextmenu", event, data);
15321
15231
  };
15322
15232
  __expose({
15233
+ nodeStatusMap,
15323
15234
  filter: filterTextChangeHandler,
15324
15235
  deleteCode
15325
15236
  });
@@ -15481,7 +15392,7 @@
15481
15392
  const eventBus = vue.inject("eventBus");
15482
15393
  const { codeBlockService } = useServices();
15483
15394
  const editable = vue.computed(() => codeBlockService.getEditStatus());
15484
- const { codeBlockEditor, codeConfig, editCode, deleteCode, createCodeBlock, submitCodeBlockHandler } = useCodeBlockEdit(codeBlockService);
15395
+ const { codeId, codeBlockEditor, codeConfig, editCode, deleteCode, createCodeBlock, submitCodeBlockHandler } = useCodeBlockEdit(codeBlockService);
15485
15396
  const codeBlockListRef = vue.useTemplateRef("codeBlockList");
15486
15397
  const filterTextChangeHandler = (val) => {
15487
15398
  codeBlockListRef.value?.filter(val);
@@ -15489,6 +15400,20 @@
15489
15400
  eventBus?.on("edit-code", (id) => {
15490
15401
  editCode(id);
15491
15402
  });
15403
+ const editDialogOpenHandler = () => {
15404
+ if (codeBlockListRef.value) {
15405
+ for (const [statusId, status] of codeBlockListRef.value.nodeStatusMap.entries()) {
15406
+ status.selected = statusId === codeId.value;
15407
+ }
15408
+ }
15409
+ };
15410
+ const editDialogCloseHandler = () => {
15411
+ if (codeBlockListRef.value) {
15412
+ for (const [, status] of codeBlockListRef.value.nodeStatusMap.entries()) {
15413
+ status.selected = false;
15414
+ }
15415
+ }
15416
+ };
15492
15417
  const {
15493
15418
  nodeContentMenuHandler,
15494
15419
  menuData: contentMenuData,
@@ -15552,7 +15477,9 @@
15552
15477
  ref: codeBlockEditor,
15553
15478
  disabled: !editable.value,
15554
15479
  content: vue.unref(codeConfig),
15555
- onSubmit: vue.unref(submitCodeBlockHandler)
15480
+ onSubmit: vue.unref(submitCodeBlockHandler),
15481
+ onClose: editDialogCloseHandler,
15482
+ onOpen: editDialogOpenHandler
15556
15483
  }, null, 8, ["disabled", "content", "onSubmit"])) : vue.createCommentVNode("v-if", true),
15557
15484
  (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
15558
15485
  menuData.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
@@ -15617,7 +15544,7 @@
15617
15544
  "width": { default: 670 },
15618
15545
  "widthModifiers": {}
15619
15546
  }),
15620
- emits: /* @__PURE__ */ vue.mergeModels(["submit"], ["update:visible", "update:width"]),
15547
+ emits: /* @__PURE__ */ vue.mergeModels(["submit", "close", "open"], ["update:visible", "update:width"]),
15621
15548
  setup(__props, { expose: __expose, emit: __emit }) {
15622
15549
  const props = __props;
15623
15550
  const boxVisible = vue.useModel(__props, "visible");
@@ -15639,6 +15566,15 @@
15639
15566
  const errorHandler = (error) => {
15640
15567
  designPlugin.tMagicMessage.error(error.message);
15641
15568
  };
15569
+ vue.watch(boxVisible, (visible) => {
15570
+ vue.nextTick(() => {
15571
+ if (!visible) {
15572
+ emit("close");
15573
+ } else if (initValues.value?.id) {
15574
+ emit("open", initValues.value.id);
15575
+ }
15576
+ });
15577
+ });
15642
15578
  __expose({
15643
15579
  show() {
15644
15580
  calcBoxPosition();
@@ -15774,6 +15710,7 @@
15774
15710
  emit("node-contextmenu", event, data);
15775
15711
  };
15776
15712
  __expose({
15713
+ nodeStatusMap,
15777
15714
  filter: filterTextChangeHandler
15778
15715
  });
15779
15716
  return (_ctx, _cache) => {
@@ -15929,6 +15866,20 @@
15929
15866
  const eventBus = vue.inject("eventBus");
15930
15867
  const { dataSourceService } = useServices();
15931
15868
  const { editDialog, dataSourceValues, dialogTitle, editable, editHandler, submitDataSourceHandler } = useDataSourceEdit(dataSourceService);
15869
+ const editDialogOpenHandler = (id) => {
15870
+ if (dataSourceList.value) {
15871
+ for (const [statusId, status] of dataSourceList.value.nodeStatusMap.entries()) {
15872
+ status.selected = statusId === id;
15873
+ }
15874
+ }
15875
+ };
15876
+ const editDialogCloseHandler = () => {
15877
+ if (dataSourceList.value) {
15878
+ for (const [, status] of dataSourceList.value.nodeStatusMap.entries()) {
15879
+ status.selected = false;
15880
+ }
15881
+ }
15882
+ };
15932
15883
  const datasourceTypeList = vue.computed(
15933
15884
  () => [
15934
15885
  { text: "基础", type: "base" },
@@ -16045,7 +15996,9 @@
16045
15996
  disabled: !vue.unref(editable),
16046
15997
  values: vue.unref(dataSourceValues),
16047
15998
  title: vue.unref(dialogTitle),
16048
- onSubmit: vue.unref(submitDataSourceHandler)
15999
+ onSubmit: vue.unref(submitDataSourceHandler),
16000
+ onClose: editDialogCloseHandler,
16001
+ onOpen: editDialogOpenHandler
16049
16002
  }, null, 8, ["disabled", "values", "title", "onSubmit"]),
16050
16003
  (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
16051
16004
  menuData.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
@@ -16932,7 +16885,7 @@
16932
16885
  const dragendHandler = () => {
16933
16886
  if (timeout) {
16934
16887
  globalThis.clearTimeout(timeout);
16935
- timeout = undefined;
16888
+ timeout = void 0;
16936
16889
  }
16937
16890
  const doc = stage.value?.renderer?.getDocument();
16938
16891
  if (doc && stageOptions?.containerHighlightClassName) {
@@ -16947,7 +16900,7 @@
16947
16900
  clientY = e.clientY;
16948
16901
  if (timeout) {
16949
16902
  globalThis.clearTimeout(timeout);
16950
- timeout = undefined;
16903
+ timeout = void 0;
16951
16904
  }
16952
16905
  return;
16953
16906
  }
@@ -17271,14 +17224,14 @@
17271
17224
  }) : config.slots?.componentList ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.componentList), { key: 1 })) : vue.createCommentVNode("v-if", true)
17272
17225
  ]),
17273
17226
  key: "0"
17274
- } : undefined,
17227
+ } : void 0,
17275
17228
  config.$key === "component-list" || config.slots?.componentListPanelHeader ? {
17276
17229
  name: "component-list-panel-header",
17277
17230
  fn: vue.withCtx(() => [
17278
17231
  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("v-if", true)
17279
17232
  ]),
17280
17233
  key: "1"
17281
- } : undefined,
17234
+ } : void 0,
17282
17235
  config.$key === "component-list" || config.slots?.componentListItem ? {
17283
17236
  name: "component-list-item",
17284
17237
  fn: vue.withCtx(({ component }) => [
@@ -17291,21 +17244,21 @@
17291
17244
  }, null, 8, ["component"])) : vue.createCommentVNode("v-if", true)
17292
17245
  ]),
17293
17246
  key: "2"
17294
- } : undefined,
17247
+ } : void 0,
17295
17248
  config.$key === "layer" || config.slots?.layerPanelHeader ? {
17296
17249
  name: "layer-panel-header",
17297
17250
  fn: vue.withCtx(() => [
17298
17251
  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("v-if", true)
17299
17252
  ]),
17300
17253
  key: "3"
17301
- } : undefined,
17254
+ } : void 0,
17302
17255
  config.$key === "code-block" || config.slots?.codeBlockPanelHeader ? {
17303
17256
  name: "code-block-panel-header",
17304
17257
  fn: vue.withCtx(() => [
17305
17258
  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("v-if", true)
17306
17259
  ]),
17307
17260
  key: "4"
17308
- } : undefined,
17261
+ } : void 0,
17309
17262
  config.$key === "code-block" || config.slots?.codeBlockPanelTool ? {
17310
17263
  name: "code-block-panel-tool",
17311
17264
  fn: vue.withCtx(({ id, data }) => [
@@ -17316,14 +17269,14 @@
17316
17269
  }) : config.slots?.codeBlockPanelTool ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelTool), { key: 1 })) : vue.createCommentVNode("v-if", true)
17317
17270
  ]),
17318
17271
  key: "5"
17319
- } : undefined,
17272
+ } : void 0,
17320
17273
  config.$key === "code-block" || config.slots?.codeBlockPanelSearch ? {
17321
17274
  name: "code-block-panel-search",
17322
17275
  fn: vue.withCtx(() => [
17323
17276
  config.$key === "code-block" ? vue.renderSlot(_ctx.$slots, "code-block-panel-search", { key: 0 }) : config.slots?.codeBlockPanelSearch ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.codeBlockPanelSearch), { key: 1 })) : vue.createCommentVNode("v-if", true)
17324
17277
  ]),
17325
17278
  key: "6"
17326
- } : undefined,
17279
+ } : void 0,
17327
17280
  config.$key === "layer" || config.slots?.layerNodeContent ? {
17328
17281
  name: "layer-node-content",
17329
17282
  fn: vue.withCtx(({ data: nodeData }) => [
@@ -17336,7 +17289,7 @@
17336
17289
  }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true)
17337
17290
  ]),
17338
17291
  key: "7"
17339
- } : undefined,
17292
+ } : void 0,
17340
17293
  config.$key === "layer" || config.slots?.layerNodeLabel ? {
17341
17294
  name: "layer-node-label",
17342
17295
  fn: vue.withCtx(({ data: nodeData }) => [
@@ -17349,7 +17302,7 @@
17349
17302
  }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true)
17350
17303
  ]),
17351
17304
  key: "8"
17352
- } : undefined,
17305
+ } : void 0,
17353
17306
  config.$key === "layer" || config.slots?.layerNodeTool ? {
17354
17307
  name: "layer-node-tool",
17355
17308
  fn: vue.withCtx(({ data: nodeData }) => [
@@ -17362,7 +17315,7 @@
17362
17315
  }, null, 8, ["data"])) : vue.createCommentVNode("v-if", true)
17363
17316
  ]),
17364
17317
  key: "9"
17365
- } : undefined,
17318
+ } : void 0,
17366
17319
  config.$key === "data-source" || config.slots?.dataSourcePanelTool ? {
17367
17320
  name: "data-source-panel-tool",
17368
17321
  fn: vue.withCtx(({ data }) => [
@@ -17372,14 +17325,14 @@
17372
17325
  }) : config.slots?.DataSourcePanelTool ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.DataSourcePanelTool), { key: 1 })) : vue.createCommentVNode("v-if", true)
17373
17326
  ]),
17374
17327
  key: "10"
17375
- } : undefined,
17328
+ } : void 0,
17376
17329
  config.$key === "data-source" || config.slots?.dataSourcePanelSearch ? {
17377
17330
  name: "data-source-panel-search",
17378
17331
  fn: vue.withCtx(() => [
17379
17332
  config.$key === "data-source" ? vue.renderSlot(_ctx.$slots, "data-source-panel-search", { key: 0 }) : config.slots?.dataSourcePanelSearch ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(config.slots.dataSourcePanelSearch), { key: 1 })) : vue.createCommentVNode("v-if", true)
17380
17333
  ]),
17381
17334
  key: "11"
17382
- } : undefined
17335
+ } : void 0
17383
17336
  ]),
17384
17337
  1040
17385
17338
  /* FULL_PROPS, DYNAMIC_SLOTS */
@@ -18374,7 +18327,7 @@
18374
18327
  editable: true,
18375
18328
  combineIds: [],
18376
18329
  undeletableList: [],
18377
- paramsColConfig: undefined
18330
+ paramsColConfig: void 0
18378
18331
  });
18379
18332
  constructor() {
18380
18333
  super([
@@ -18638,7 +18591,6 @@
18638
18591
  const componentListService = new ComponentList();
18639
18592
 
18640
18593
  const canUsePluginMethods$1 = {
18641
- async: [],
18642
18594
  sync: [
18643
18595
  "getFormConfig",
18644
18596
  "setFormConfig",
@@ -19160,7 +19112,6 @@
19160
19112
  const keybindingService = new Keybinding();
19161
19113
 
19162
19114
  const canUsePluginMethods = {
19163
- async: [],
19164
19115
  sync: ["openOverlay", "closeOverlay", "updateOverlay", "createStage"]
19165
19116
  };
19166
19117
  class StageOverlay extends BaseService {
@@ -19500,14 +19451,14 @@
19500
19451
  const getTMagicApp = () => {
19501
19452
  const renderer = editorService.get("stage")?.renderer;
19502
19453
  if (!renderer) {
19503
- return undefined;
19454
+ return void 0;
19504
19455
  }
19505
19456
  if (renderer.runtime) {
19506
19457
  return renderer.runtime.getApp?.();
19507
19458
  }
19508
19459
  return new Promise((resolve) => {
19509
19460
  const timeout = globalThis.setTimeout(() => {
19510
- resolve(undefined);
19461
+ resolve(void 0);
19511
19462
  }, 1e4);
19512
19463
  renderer.on("runtime-ready", () => {
19513
19464
  if (timeout) {