epic-designer-gold 1.0.5 → 1.0.7

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 (158) hide show
  1. package/dist/ETable-adkZzXhI.cjs +1 -0
  2. package/dist/ETable-ogvH56w7.js +50 -0
  3. package/dist/ETd-BCM7zA8V.cjs +1 -0
  4. package/dist/{row-DAy14ve9.js → ETd-CRUvOVnZ.js} +13 -13
  5. package/dist/ETr-BqGghav2.cjs +1 -0
  6. package/dist/ETr-nIjGkdzO.js +43 -0
  7. package/dist/attributeView-BCjRZKcy.cjs +1 -0
  8. package/dist/{attributeView-Cu_tjo9A.js → attributeView-CcnkUeu9.js} +7 -7
  9. package/dist/axios-CXDYiOMX.js +1704 -0
  10. package/dist/axios-tuVKNgv9.cjs +6 -0
  11. package/dist/card-C9ua0f7r.cjs +1 -0
  12. package/dist/card-CI6L3YKU.js +33 -0
  13. package/dist/cell-AML-qIH9.cjs +1 -0
  14. package/dist/cell-B_q5hgzb.js +35 -0
  15. package/dist/col-C4lVVBzC.cjs +1 -0
  16. package/dist/col-DcVPBKEc.js +31 -0
  17. package/dist/core/components/builder/src/builder.vue.d.ts +2 -2
  18. package/dist/core/components/designer/src/modules/attributeView/eventView.vue.d.ts +2 -0
  19. package/dist/core/components/node/src/node.vue.d.ts +3 -2
  20. package/dist/core/extensions/EColumnEditor/columnItem.vue.d.ts +10 -0
  21. package/dist/core/extensions/EColumnEditor/index.vue.d.ts +18 -0
  22. package/dist/core/extensions/PaddingMarginControl/index.vue.d.ts +10 -0
  23. package/dist/eventView-5fa6mfSD.cjs +1 -0
  24. package/dist/eventView-C2wKhfU_.js +63 -0
  25. package/dist/{form-CthzLIgs.cjs → form-Bofkrmkd.cjs} +1 -1
  26. package/dist/{form-6cUK-Ari.js → form-VbfBmb63.js} +5 -5
  27. package/dist/iframe-CRF3GSRv.cjs +1 -0
  28. package/dist/iframe-Fgbk3vqJ.js +48 -0
  29. package/dist/index-0WmqAKuy.js +4 -0
  30. package/dist/index-5yjG3fiB.cjs +1 -0
  31. package/dist/{index-DxNdcsD-.js → index-B0OgKtuT.js} +105 -100
  32. package/dist/{index-Dg7MK40D.js → index-B1s67XDZ.js} +17 -17
  33. package/dist/index-BEUYVwRA.cjs +1 -0
  34. package/dist/{index-DeFAvWuV.cjs → index-BHEw6RsQ.cjs} +1 -1
  35. package/dist/index-BHZbtFEF.cjs +1 -0
  36. package/dist/index-BU05X44j.cjs +1 -0
  37. package/dist/index-BY37Ndo7.cjs +10 -0
  38. package/dist/index-BoL2PSBk.cjs +1 -0
  39. package/dist/index-BvfkMKTv.cjs +1 -0
  40. package/dist/{index-BLJT8e0Q.js → index-BvvGezNc.js} +4 -4
  41. package/dist/{index-CHCOxt3B.js → index-BydHABbW.js} +3 -3
  42. package/dist/index-C2s4IuAR.cjs +1 -0
  43. package/dist/index-CCCx1tbF.cjs +1 -0
  44. package/dist/index-CD00bJyK.js +839 -0
  45. package/dist/{index-Bybwt7-u.js → index-CG0UEELU.js} +1 -1
  46. package/dist/index-CdnV7DS4.js +265 -0
  47. package/dist/{index-D0kQz_zt.js → index-Cln9MN7u.js} +1 -1
  48. package/dist/index-CpBfljmg.cjs +1 -0
  49. package/dist/{index-CMbBKMQU.js → index-CpTA2IRB.js} +2 -2
  50. package/dist/index-CpevxZqj.cjs +1 -0
  51. package/dist/index-CraRg8wh.js +107 -0
  52. package/dist/{index-CEDIwmNK.js → index-Cx7gKpkD.js} +2 -2
  53. package/dist/index-DYQi05p8.cjs +1 -0
  54. package/dist/{index-CjIIhZdV.js → index-E8jDNKrc.js} +3 -3
  55. package/dist/index-FgdbKgb5.cjs +1 -0
  56. package/dist/index-GIYb626z.js +1422 -0
  57. package/dist/{index-CgwN4ucQ.js → index-IGxCNti8.js} +48 -28
  58. package/dist/{index-CqeRfqUw.cjs → index-IPz4bbk7.cjs} +1 -1
  59. package/dist/index-R2r9Rw5O.cjs +1 -0
  60. package/dist/index-WkZdU_zw.js +47 -0
  61. package/dist/index-v2u1WTMm.cjs +1 -0
  62. package/dist/index-vCJWgHu-.js +142 -0
  63. package/dist/index.cjs +1 -1
  64. package/dist/index.js +2 -2
  65. package/dist/locale/lang/en-US.d.ts +2 -0
  66. package/dist/locale/lang/zh-cn.d.ts +2 -0
  67. package/dist/modal-DCBqsiP2.cjs +1 -0
  68. package/dist/modal-DZRBS-Mt.js +58 -0
  69. package/dist/outline-BE98qFHQ.cjs +1 -0
  70. package/dist/{outline-DxCKINRN.js → outline-Ch5PHy3c.js} +2 -2
  71. package/dist/pluginManager-BCnrHPYv.js +660 -0
  72. package/dist/pluginManager-DWHAX8kP.cjs +1 -0
  73. package/dist/sign-BS-9u6is.cjs +1 -0
  74. package/dist/{sign-B-FCN_7O.js → sign-l63EYvVo.js} +61 -56
  75. package/dist/style.css +1 -1
  76. package/dist/styleView-Dhj1GDqf.js +140 -0
  77. package/dist/styleView-DocskQJQ.cjs +1 -0
  78. package/dist/tabPanel-CXZYMEwi.cjs +1 -0
  79. package/dist/{col-D4hvKfJ6.js → tabPanel-DAw7ENrC.js} +7 -7
  80. package/dist/table-75K2lqjD.js +65 -0
  81. package/dist/table-CN2LNWqY.cjs +1 -0
  82. package/dist/tabs-CYH9lAUk.cjs +1 -0
  83. package/dist/tabs-DCyifACM.js +41 -0
  84. package/dist/text-B92ioaoV.cjs +1 -0
  85. package/dist/text-C-b94tBH.js +47 -0
  86. package/dist/tree.vue_vue_type_script_setup_true_lang-BsVyMb-n.js +243 -0
  87. package/dist/tree.vue_vue_type_script_setup_true_lang-VGvT-OYl.cjs +1 -0
  88. package/dist/ui/elementPlus/ETable/ETable.d.ts +20 -0
  89. package/dist/ui/elementPlus/ETd/ETd.d.ts +20 -0
  90. package/dist/ui/elementPlus/ETr/ETr.d.ts +20 -0
  91. package/dist/ui/elementPlus/ETr/index.d.ts +3 -0
  92. package/dist/ui/elementPlus/iframe/iframe.d.ts +29 -0
  93. package/dist/ui/elementPlus/iframe/index.d.ts +3 -0
  94. package/dist/ui/elementPlus/index.cjs +1 -1
  95. package/dist/ui/elementPlus/index.js +904 -403
  96. package/dist/ui/elementPlus/rate/index.d.ts +3 -0
  97. package/dist/ui/elementPlus/tab-panel/index.d.ts +3 -0
  98. package/dist/ui/elementPlus/table/table.d.ts +9 -0
  99. package/dist/ui/elementPlus/table-cell/index.d.ts +3 -0
  100. package/dist/ui/elementPlus/tabs/index.d.ts +2 -0
  101. package/dist/ui/elementPlus/tabs/tabs.d.ts +29 -0
  102. package/dist/ui/elementPlus/text/text.d.ts +9 -0
  103. package/dist/ui/naiveUi/index.cjs +1 -1
  104. package/dist/ui/naiveUi/index.js +1 -1
  105. package/dist/uploadFile-pgvj4Lm9.cjs +1 -0
  106. package/dist/uploadFile-qCbXuHfd.js +81 -0
  107. package/dist/uploadImage-B3sOX-5F.cjs +1 -0
  108. package/dist/{uploadImage-CF7fobUP.cjs → uploadImage-CNMsK4Lh.cjs} +1 -1
  109. package/dist/uploadImage-DQmVV0jl.js +121 -0
  110. package/dist/{uploadImage-COCC3pxH.js → uploadImage-VFICaVgX.js} +1 -1
  111. package/package.json +1 -1
  112. package/dist/attributeView-B2dWB_U2.cjs +0 -1
  113. package/dist/axios-B8aFvCWj.cjs +0 -6
  114. package/dist/axios-Bb3STC1u.js +0 -2362
  115. package/dist/card-BowzD9vN.cjs +0 -1
  116. package/dist/card-CNGNDzPp.js +0 -31
  117. package/dist/col-B1GUMkMK.cjs +0 -1
  118. package/dist/col-BNNn9Yx8.cjs +0 -1
  119. package/dist/col-u5YiB-UK.js +0 -41
  120. package/dist/index-21c4Pe3i.cjs +0 -1
  121. package/dist/index-B553TaXm.js +0 -44
  122. package/dist/index-BULuVnVl.js +0 -1359
  123. package/dist/index-BV9SE7wG.cjs +0 -1
  124. package/dist/index-BhcwWM1G.cjs +0 -1
  125. package/dist/index-Bn8pwpgq.cjs +0 -1
  126. package/dist/index-Bxi3JLms.cjs +0 -1
  127. package/dist/index-CEvDmc0a.js +0 -104
  128. package/dist/index-CI3dhGXT.cjs +0 -1
  129. package/dist/index-CYAKMqdR.cjs +0 -1
  130. package/dist/index-Cq6eLpKZ.cjs +0 -1
  131. package/dist/index-CrV5FaWU.cjs +0 -10
  132. package/dist/index-DR80h8IU.js +0 -4
  133. package/dist/index-DUMEtCCN.cjs +0 -1
  134. package/dist/index-DddTXMY9.cjs +0 -1
  135. package/dist/index-DeZ09CHf.cjs +0 -1
  136. package/dist/index-DzxQG0o7.cjs +0 -1
  137. package/dist/index-VblxMq6V.js +0 -742
  138. package/dist/modal-BLOgN3us.cjs +0 -1
  139. package/dist/modal-UFu4bD6x.js +0 -57
  140. package/dist/outline-CK-jNomF.cjs +0 -1
  141. package/dist/row-BWnbt6dh.cjs +0 -1
  142. package/dist/sign-Dho4kHTC.cjs +0 -1
  143. package/dist/styleView-CRUqDcCl.cjs +0 -1
  144. package/dist/styleView-ClMjCfMk.js +0 -106
  145. package/dist/table-CnBJm7Bx.js +0 -43
  146. package/dist/table-DM2-xHlv.cjs +0 -1
  147. package/dist/text-C-52xLjs.js +0 -33
  148. package/dist/text-X9fl5oe8.cjs +0 -1
  149. package/dist/tree.vue_vue_type_script_setup_true_lang-B9rWLveX.js +0 -242
  150. package/dist/tree.vue_vue_type_script_setup_true_lang-DDDqMedP.cjs +0 -1
  151. package/dist/uploadFile-Bc5Rxk0b.js +0 -77
  152. package/dist/uploadFile-oB2-NP-v.cjs +0 -1
  153. package/dist/uploadImage-4tgp3t7X.cjs +0 -1
  154. package/dist/uploadImage-CGXm3zNQ.js +0 -96
  155. /package/dist/ui/elementPlus/{table-col → ETable}/index.d.ts +0 -0
  156. /package/dist/ui/elementPlus/{table-row → ETd}/index.d.ts +0 -0
  157. /package/dist/ui/elementPlus/{table-col/col.d.ts → tab-panel/tabPanel.d.ts} +0 -0
  158. /package/dist/ui/elementPlus/{table-row/row.d.ts → table-cell/cell.d.ts} +0 -0
@@ -0,0 +1,839 @@
1
+ import { defineComponent as re, inject as A, ref as M, computed as q, watch as fe, openBlock as H, createElementBlock as F, Fragment as he, withDirectives as Ce, createElementVNode as V, normalizeClass as pe, toDisplayString as Qe, unref as u, createVNode as B, createCommentVNode as ie, withCtx as Z, createTextVNode as de, vShow as Te, createBlock as ve, mergeProps as Ke, useAttrs as Xe, provide as Ye, onUnmounted as qe, resolveComponent as Ge, createSlots as je, renderList as Ne, shallowRef as et, watchEffect as tt, nextTick as ze, normalizeStyle as ye, renderSlot as ot, onMounted as nt } from "vue";
2
+ import { p as oe, o as D, g as te, a as we, h as st, d as ke, q as lt } from "./pluginManager-BCnrHPYv.js";
3
+ import { u as $e, a as at, b as _e, _ as it, c as rt, d as ct, e as dt, w as ut, f as ht } from "./index-GIYb626z.js";
4
+ import { ElDropdown as ft, ElDropdownMenu as pt, ElDropdownItem as ue } from "element-plus";
5
+ import { _ as me } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
6
+ import { d as vt } from "./vuedraggable.umd-D2S7Eo7p.js";
7
+ const mt = { class: "epic-widget-action-item whitespace-nowrap" }, gt = {
8
+ key: 0,
9
+ class: "flex items-center"
10
+ }, xt = {
11
+ key: 0,
12
+ title: "单元格操作",
13
+ class: "epic-widget-action-item pointer-events-auto"
14
+ }, yt = /* @__PURE__ */ re({
15
+ __name: "previewWidgets",
16
+ setup(ne, { expose: U }) {
17
+ const v = A("pageManager", {}), o = A("pageSchema"), t = A("designer"), b = A("designerProps"), a = A("revoke"), m = M(null), I = M(null), w = M(null), P = M(!1), i = M(!1), r = M(!0), h = M("top"), { canvasScale: c, disabledZoom: $ } = $e();
18
+ let s = null;
19
+ const Y = q(() => {
20
+ const e = t.state.checkedNode;
21
+ return !(!(e != null && e.id) || b.value.lockDefaultSchemaEdit && v.defaultComponentIds.value.includes(e == null ? void 0 : e.id) || e.type === "table-cell");
22
+ }), Q = q(() => {
23
+ const e = t.state.checkedNode;
24
+ return (e == null ? void 0 : e.type) === "eTd";
25
+ });
26
+ q(() => {
27
+ const e = t.state.checkedNode;
28
+ return (e == null ? void 0 : e.type) === "table";
29
+ });
30
+ const O = q(() => {
31
+ var S, C, R, f, J, X;
32
+ const e = v.componentInstances.value, l = (S = t.state.checkedNode) == null ? void 0 : S.id;
33
+ if ((R = (C = t.state.checkedNode) == null ? void 0 : C.componentProps) != null && R.hidden)
34
+ return null;
35
+ const x = oe.getComponentConfingByType((f = t.state.checkedNode) == null ? void 0 : f.type) ?? null;
36
+ if (!l || !(e != null && e[l]))
37
+ return null;
38
+ if (x != null && x.defaultSchema.input && ((J = t.state.checkedNode) == null ? void 0 : J.noFormItem) !== !0)
39
+ return (X = e[l + "formItem"]) == null ? void 0 : X.$el;
40
+ const n = e[l];
41
+ return !(n != null && n.$el) || (n == null ? void 0 : n.$el.nodeName) === "#text" || !(n != null && n.$el.getBoundingClientRect) ? null : n == null ? void 0 : n.$el;
42
+ }), g = q(() => {
43
+ var S, C, R, f;
44
+ const e = v.componentInstances.value, l = (S = t.state.hoverNode) == null ? void 0 : S.id, x = oe.getComponentConfingByType((C = t.state.hoverNode) == null ? void 0 : C.type) ?? null;
45
+ if (!l || !(e != null && e[l]))
46
+ return null;
47
+ if (x != null && x.defaultSchema.input && ((R = t.state.hoverNode) == null ? void 0 : R.noFormItem) !== !0)
48
+ return (f = e[l + "formItem"]) == null ? void 0 : f.$el;
49
+ const n = e[l];
50
+ return (n == null ? void 0 : n.$el.nodeName) === "#text" ? null : n == null ? void 0 : n.$el;
51
+ }), { mutationObserver: k, observerConfig: y } = Re(K), { startTimedQuery: j, stopTimedQuery: ce } = at(K);
52
+ fe(
53
+ () => O.value,
54
+ (e) => {
55
+ if (e) {
56
+ P.value = !0, k.observe(e, y);
57
+ const l = e.parentNode;
58
+ l && (l.ondragstart = () => {
59
+ r.value = !1, j();
60
+ }, l.ondragend = () => {
61
+ r.value = !0, ce();
62
+ }), K();
63
+ } else
64
+ P.value = !1;
65
+ }
66
+ );
67
+ const { mutationObserver: z, observerConfig: L } = Re(be);
68
+ fe(
69
+ () => g.value,
70
+ (e) => {
71
+ e && (z.observe(e, L), be());
72
+ }
73
+ );
74
+ let W = 0;
75
+ fe(
76
+ () => {
77
+ var e;
78
+ return (e = t.state.hoverNode) == null ? void 0 : e.id;
79
+ },
80
+ (e) => {
81
+ if (e) {
82
+ i.value = !0, clearTimeout(W);
83
+ return;
84
+ }
85
+ W = setTimeout(() => {
86
+ i.value = !1;
87
+ }, 300);
88
+ }
89
+ );
90
+ let ee = 0, se = 0;
91
+ function K() {
92
+ const e = O.value;
93
+ if (!e || !s) return;
94
+ const { top: l, left: x } = s == null ? void 0 : s.getBoundingClientRect(), { top: n, left: S, width: C, height: R } = e.getBoundingClientRect(), f = $.value ? 1 : c.value, J = n - l + ((s == null ? void 0 : s.scrollTop) ?? 0) * f, X = S - x + ((s == null ? void 0 : s.scrollLeft) ?? 0) * f, G = R / f;
95
+ m.value && (m.value.style.width = `${C / f}px`, m.value.style.height = `${G}px`, m.value.style.top = `${J / f}px`, m.value.style.left = `${X / f}px`, Ae(J, X)), w.value && (J < 45 && G < 100 ? (w.value.style.top = "", w.value.style.bottom = "-30px", w.value.style["border-radius"] = "0px 0px 4px 4px", h.value = "bottom") : J < 45 ? (w.value.style.top = "0px", w.value.style["border-radius"] = "0px 0px 4px 0", h.value = "center") : (w.value.style.top = "-30px", w.value.style["border-radius"] = "4px 4px 0px 0px", h.value = "top"));
96
+ }
97
+ function Ae(e, l) {
98
+ const x = O.value;
99
+ if (!s || !x) return;
100
+ const n = s.getBoundingClientRect(), { width: S } = x.getBoundingClientRect(), C = $.value ? 1 : c.value, R = e / C - n.top;
101
+ let f = l / C - n.left + S / C;
102
+ f < n.width && (f = 0);
103
+ const J = s.scrollTop - n.height / 3 + 60, X = s.scrollTop + n.height / 3 * 2, G = s.scrollLeft - n.width + 200, le = s.scrollLeft + n.width - 200;
104
+ Math.abs(R - ee) < 10 && Math.abs(f - se) < 10 || (ee = R, se = f, !(R > J && R < X && f > G && f < le) && (s.scrollTop = R, s.scrollLeft = f));
105
+ }
106
+ function be() {
107
+ var G, le;
108
+ const e = g.value;
109
+ if (!e) return;
110
+ const { top: l, left: x } = (s == null ? void 0 : s.getBoundingClientRect()) ?? { top: 0, left: 0 }, { top: n, left: S, width: C, height: R } = ((G = e.getBoundingClientRect) == null ? void 0 : G.call(e)) ?? ((le = e.nextElementSibling) == null ? void 0 : le.getBoundingClientRect()), f = $.value ? 1 : c.value, J = n - l + ((s == null ? void 0 : s.scrollTop) ?? 0) * f, X = S - x + ((s == null ? void 0 : s.scrollLeft) ?? 0) * f;
111
+ I.value && (I.value.style.width = `${C / f}px`, I.value.style.height = `${R / f}px`, I.value.style.top = `${J / f}px`, I.value.style.left = `${X / f}px`);
112
+ }
113
+ function Re(e) {
114
+ const l = window.MutationObserver, x = {
115
+ childList: !0,
116
+ attributes: !0,
117
+ subtree: !0
118
+ };
119
+ return {
120
+ mutationObserver: new l(e),
121
+ observerConfig: x
122
+ };
123
+ }
124
+ function Ue(e) {
125
+ var l, x, n, S, C, R, f, J, X, G, le, De, Be, Me, Le, Ee, He, Ie;
126
+ if (e === "right") {
127
+ const d = t.state.matched.find((N) => N.type === "eTable"), _ = D(o.schemas, (d == null ? void 0 : d.id) ?? "root"), T = (x = D(o.schemas, ((l = t.state.checkedNode) == null ? void 0 : l.id) ?? "root")) == null ? void 0 : x.index;
128
+ (n = _.list) == null || n[0].children.forEach((N) => {
129
+ var E;
130
+ (E = N.children) == null || E.splice(T + 1, 0, {
131
+ type: "eTd",
132
+ id: "eTd_" + te(),
133
+ children: []
134
+ });
135
+ }), a.push(o.schemas, "添加右列");
136
+ } else if (e === "left") {
137
+ const d = t.state.matched.find((N) => N.type === "eTable"), _ = D(o.schemas, (d == null ? void 0 : d.id) ?? "root"), T = (C = D(o.schemas, ((S = t.state.checkedNode) == null ? void 0 : S.id) ?? "root")) == null ? void 0 : C.index;
138
+ (R = _.list) == null || R[0].children.forEach((N) => {
139
+ var E;
140
+ T === 0 ? N.children.unshift({
141
+ type: "eTd",
142
+ id: "eTd_" + te(),
143
+ children: []
144
+ }) : (E = N.children) == null || E.splice(T - 1, 0, {
145
+ type: "eTd",
146
+ id: "eTd_" + te(),
147
+ children: []
148
+ });
149
+ }), a.push(o.schemas, "添加左列");
150
+ } else if (e === "top") {
151
+ const d = t.state.matched.find((p) => p.type === "eTable"), _ = t.state.matched.find((p) => p.type === "eTr"), T = D(o.schemas, (d == null ? void 0 : d.id) ?? "root"), N = D(o.schemas, (_ == null ? void 0 : _.id) ?? "root"), E = D(o.schemas, ((f = t.state.checkedNode) == null ? void 0 : f.id) ?? "root");
152
+ N.index === 0 ? (J = T.list) == null || J[0].children.unshift({
153
+ type: "eTr",
154
+ id: "eTr_" + te(),
155
+ children: we(E.list).map((p) => (p.id = "eTd_" + te(), p.children = [], p))
156
+ }) : (X = T.list) == null || X[0].children.splice(N.index - 1, 0, {
157
+ type: "eTr",
158
+ id: "eTr_" + te(),
159
+ children: we(E.list).map((p) => (p.id = "eTd_" + te(), p.children = [], p))
160
+ }), a.push(o.schemas, "添加上列");
161
+ } else if (e === "bottom") {
162
+ const d = t.state.matched.find((p) => p.type === "eTable"), _ = t.state.matched.find((p) => p.type === "eTr"), T = D(o.schemas, (d == null ? void 0 : d.id) ?? "root"), N = D(o.schemas, (_ == null ? void 0 : _.id) ?? "root"), E = D(o.schemas, ((G = t.state.checkedNode) == null ? void 0 : G.id) ?? "root");
163
+ (le = T.list) == null || le[0].children.splice(N.index + 1, 0, {
164
+ type: "eTr",
165
+ id: "eTr_" + te(),
166
+ children: we(E.list).map((p) => (p.id = "eTd_" + te(), p.children = [], p))
167
+ }), a.push(o.schemas, "添加下列");
168
+ } else if (e === "merge-right") {
169
+ t.state.matched.find((N) => N.type === "eTr");
170
+ const d = D(o.schemas, ((De = t.state.checkedNode) == null ? void 0 : De.id) ?? "root");
171
+ if (d.index === d.list.length - 1)
172
+ return;
173
+ const _ = d.list[d.index], T = d.list[d.index + 1];
174
+ _.colspan = (_.colspan || 1) + (T.colspan || 1), d.list.splice(d.index + 1, 1), a.push(o.schemas, "向右合并");
175
+ } else if (e === "merge-bottom") {
176
+ const d = t.state.matched.find((p) => p.type === "eTable"), _ = t.state.matched.find((p) => p.type === "eTr");
177
+ D(o.schemas, (d == null ? void 0 : d.id) ?? "root");
178
+ const T = D(o.schemas, (_ == null ? void 0 : _.id) ?? "root"), E = D(o.schemas, ((Be = t.state.checkedNode) == null ? void 0 : Be.id) ?? "root").index;
179
+ if (T.index !== T.list.length - 1) {
180
+ const p = T.list[T.index];
181
+ let ge = 0, xe = 0;
182
+ p.children.forEach((ae, Se) => {
183
+ ae.colSpan || (ae.colSpan = 1), xe = xe + ae.colSpan, xe === E + 1 && (ge = Se);
184
+ }), p.children[ge].rowSpan = (p.children[ge].rowSpan || 1) + 1;
185
+ const Ze = T.list[T.index + p.children[ge].rowSpan - 1];
186
+ let Oe = 0, Ve = 0;
187
+ p.children.forEach((ae, Se) => {
188
+ ae.colSpan || (ae.colSpan = 1), Ve = Ve + ae.colSpan, xe === E + 1 && (Oe = Se);
189
+ }), Ze.children.splice(Oe, 1);
190
+ }
191
+ a.push(o.schemas, "向下合并");
192
+ } else if (e === "delete-col") {
193
+ const d = t.state.matched.find((N) => N.type === "eTable"), _ = D(o.schemas, (d == null ? void 0 : d.id) ?? "root"), T = (Le = D(o.schemas, ((Me = t.state.checkedNode) == null ? void 0 : Me.id) ?? "root")) == null ? void 0 : Le.index;
194
+ (Ee = _.list) == null || Ee[0].children.forEach((N) => {
195
+ var E;
196
+ (E = N.children) == null || E.splice(T, 1);
197
+ }), a.push(o.schemas, "删除当前列");
198
+ } else if (e === "delete-row") {
199
+ const d = t.state.matched.find((E) => E.type === "eTable"), _ = t.state.matched.find((E) => E.type === "eTr"), T = D(o.schemas, (d == null ? void 0 : d.id) ?? "root"), N = D(o.schemas, (_ == null ? void 0 : _.id) ?? "root");
200
+ D(o.schemas, ((He = t.state.checkedNode) == null ? void 0 : He.id) ?? "root"), (Ie = T.list) == null || Ie[0].children.splice(N.index, 1), a.push(o.schemas, "删除当前行");
201
+ }
202
+ }
203
+ function Pe() {
204
+ var C;
205
+ const e = D(o.schemas, ((C = t.state.checkedNode) == null ? void 0 : C.id) ?? "root");
206
+ if (!e)
207
+ return !1;
208
+ const { list: l, schema: x, index: n } = e, S = st(x);
209
+ l.splice(n + 1, 0, S), t.setCheckedNode(S), a.push(o.schemas, "复制组件");
210
+ }
211
+ function Fe() {
212
+ var S;
213
+ const e = D(o.schemas, ((S = t.state.checkedNode) == null ? void 0 : S.id) ?? "root");
214
+ if (!e)
215
+ return !1;
216
+ let { list: l, schema: x, index: n } = e;
217
+ l.splice(n, 1), n === l.length && n--, t.setCheckedNode(l[n]), a.push(o.schemas, "删除组件");
218
+ }
219
+ function Je(e) {
220
+ s = e, s == null || s.addEventListener("scroll", () => {
221
+ K();
222
+ }), _e(O, K), _e(g, be);
223
+ }
224
+ return U({
225
+ handleInit: Je
226
+ }), (e, l) => {
227
+ var x, n, S, C, R;
228
+ return H(), F(he, null, [
229
+ Ce(V("div", {
230
+ ref_key: "selectorRef",
231
+ ref: m,
232
+ class: pe(["epic-checked-widget absolute pointer-events-none z-20", h.value + " " + (r.value ? "transition-all" : "")])
233
+ }, [
234
+ V("div", {
235
+ class: "epic-widget-action-box",
236
+ ref_key: "actionBoxRef",
237
+ ref: w
238
+ }, [
239
+ V("div", mt, Qe((n = u(oe).getComponentConfingByType(((x = u(t).state.checkedNode) == null ? void 0 : x.type) ?? "")) == null ? void 0 : n.defaultSchema.label), 1),
240
+ Y.value ? (H(), F("div", gt, [
241
+ Y.value && !Q.value ? (H(), F("div", {
242
+ key: 0,
243
+ title: "复制",
244
+ class: "epic-widget-action-item pointer-events-auto",
245
+ onClick: Pe
246
+ }, [
247
+ B(u(me), { name: "icon--epic--copy-all-outline-rounded" })
248
+ ])) : ie("", !0),
249
+ B(u(ft), {
250
+ onCommand: Ue,
251
+ trigger: "click"
252
+ }, {
253
+ dropdown: Z(() => [
254
+ B(u(pt), null, {
255
+ default: Z(() => [
256
+ B(u(ue), { command: "left" }, {
257
+ default: Z(() => l[0] || (l[0] = [
258
+ de("添加左列")
259
+ ])),
260
+ _: 1
261
+ }),
262
+ B(u(ue), { command: "right" }, {
263
+ default: Z(() => l[1] || (l[1] = [
264
+ de("添加右列")
265
+ ])),
266
+ _: 1
267
+ }),
268
+ B(u(ue), { command: "top" }, {
269
+ default: Z(() => l[2] || (l[2] = [
270
+ de("添加上列")
271
+ ])),
272
+ _: 1
273
+ }),
274
+ B(u(ue), { command: "bottom" }, {
275
+ default: Z(() => l[3] || (l[3] = [
276
+ de("添加下列")
277
+ ])),
278
+ _: 1
279
+ }),
280
+ B(u(ue), {
281
+ command: "delete-row",
282
+ divided: ""
283
+ }, {
284
+ default: Z(() => l[4] || (l[4] = [
285
+ de("删除当前行")
286
+ ])),
287
+ _: 1
288
+ }),
289
+ B(u(ue), { command: "delete-col" }, {
290
+ default: Z(() => l[5] || (l[5] = [
291
+ de("删除当前列")
292
+ ])),
293
+ _: 1
294
+ })
295
+ ]),
296
+ _: 1
297
+ })
298
+ ]),
299
+ default: Z(() => [
300
+ Q.value ? (H(), F("div", xt, [
301
+ B(u(me), { name: "icon--epic--window-outline" })
302
+ ])) : ie("", !0)
303
+ ]),
304
+ _: 1
305
+ }),
306
+ Y.value && !Q.value ? (H(), F("div", {
307
+ key: 1,
308
+ title: "删除",
309
+ class: "epic-widget-action-item pointer-events-auto",
310
+ onClick: Fe
311
+ }, [
312
+ B(u(me), { name: "icon--epic--delete-outline-rounded" })
313
+ ])) : ie("", !0)
314
+ ])) : ie("", !0)
315
+ ], 512)
316
+ ], 2), [
317
+ [Te, P.value && ((S = u(t).state.checkedNode) == null ? void 0 : S.id) !== "root"]
318
+ ]),
319
+ Ce(V("div", {
320
+ ref_key: "hoverWidgetRef",
321
+ ref: I,
322
+ class: "epic-hover-widget absolute transition-all pointer-events-none z-998"
323
+ }, null, 512), [
324
+ [Te, i.value && ((C = u(t).state.checkedNode) == null ? void 0 : C.id) !== ((R = u(t).state.hoverNode) == null ? void 0 : R.id)]
325
+ ])
326
+ ], 64);
327
+ };
328
+ }
329
+ }), _t = /* @__PURE__ */ re({
330
+ name: "EditNodeItem",
331
+ __name: "editNodeItem",
332
+ props: {
333
+ schemas: {}
334
+ },
335
+ emits: ["update:schemas"],
336
+ setup(ne, { emit: U }) {
337
+ const v = A("designer"), o = A("pageSchema"), t = A("revoke"), b = ne, a = U, m = q({
338
+ get() {
339
+ return b.schemas;
340
+ },
341
+ set(r) {
342
+ a("update:schemas", r);
343
+ }
344
+ });
345
+ function I(r) {
346
+ v.setCheckedNode(m.value[r]), v.setDisableHover(!0);
347
+ }
348
+ function w() {
349
+ v.setDisableHover(), t.push(o.schemas, "拖拽组件");
350
+ }
351
+ function P() {
352
+ t.push(o.schemas, "插入组件");
353
+ }
354
+ function i(r) {
355
+ var h, c, $;
356
+ return r.id === ((h = o.schemas[0]) == null ? void 0 : h.id) || ($ = (c = oe.getComponentConfingByType(r.type)) == null ? void 0 : c.editConstraints) != null && $.immovable ? "unmover-item" : "draggable-item";
357
+ }
358
+ return (r, h) => (H(), ve(u(vt), Ke({
359
+ modelValue: m.value,
360
+ "onUpdate:modelValue": h[0] || (h[0] = (c) => m.value = c),
361
+ "item-key": "id",
362
+ "component-data": {
363
+ type: "transition-group"
364
+ },
365
+ class: "epic-draggable-range"
366
+ }, {
367
+ animation: 200,
368
+ group: "edit-draggable",
369
+ handle: ".draggable-item",
370
+ ghostClass: "moveing"
371
+ }, {
372
+ onStart: h[1] || (h[1] = (c) => I(c.oldIndex)),
373
+ onEnd: h[2] || (h[2] = (c) => w()),
374
+ onAdd: h[3] || (h[3] = (c) => {
375
+ I(c.newIndex), P();
376
+ })
377
+ }), {
378
+ item: Z(({ element: c, index: $ }) => [
379
+ (H(), F("div", {
380
+ class: pe(["widget-box", i(c)]),
381
+ key: $
382
+ }, [
383
+ B(We, { schema: c }, null, 8, ["schema"])
384
+ ], 2))
385
+ ]),
386
+ _: 1
387
+ }, 16, ["modelValue"]));
388
+ }
389
+ }), We = /* @__PURE__ */ re({
390
+ name: "ENodeItem",
391
+ __name: "nodeItem",
392
+ props: {
393
+ schema: {},
394
+ name: {}
395
+ },
396
+ setup(ne) {
397
+ const U = Xe(), v = A("designer"), o = A("pageManager", {}), t = A("pageSchema", {}), b = M(null);
398
+ Ye("nodeAttrs", U);
399
+ const a = ne, m = q(() => {
400
+ var $, s, Y, Q, O;
401
+ const i = o.componentInstances.value, r = ($ = a.schema) == null ? void 0 : $.id, h = oe.getComponentConfingByType((s = a.schema) == null ? void 0 : s.type) ?? null;
402
+ if (!r || !(i != null && i[r]))
403
+ return null;
404
+ if (h != null && h.defaultSchema.input && ((Y = a.schema) == null ? void 0 : Y.noFormItem) !== !0)
405
+ return (Q = i[r + "formItem"]) == null ? void 0 : Q.$el;
406
+ const c = i[r];
407
+ return ((O = c == null ? void 0 : c.$el) == null ? void 0 : O.nodeName) === "#text" ? null : c == null ? void 0 : c.$el;
408
+ });
409
+ fe(
410
+ () => m.value,
411
+ (i) => {
412
+ i == null || i.addEventListener("click", I, !1), i == null || i.addEventListener("mouseover", w, !1), i == null || i.addEventListener("mouseout", P, !1);
413
+ }
414
+ ), qe(() => {
415
+ var i, r, h;
416
+ (i = m.value) == null || i.removeEventListener("click", I, !1), (r = m.value) == null || r.removeEventListener("mouseover", w, !1), (h = m.value) == null || h.removeEventListener("mouseout", P, !1);
417
+ });
418
+ function I(i) {
419
+ i.stopPropagation(), v.setCheckedNode(a.schema);
420
+ }
421
+ function w(i) {
422
+ var r;
423
+ a.schema.id !== ((r = t.schemas[0]) == null ? void 0 : r.id) && (i.stopPropagation(), v.setHoverNode(a.schema));
424
+ }
425
+ function P(i) {
426
+ i.stopPropagation(), v.setHoverNode(null);
427
+ }
428
+ return (i, r) => {
429
+ var c, $;
430
+ const h = Ge("ENodeItem");
431
+ return H(), ve(u(it), {
432
+ ref_key: "nodeRef",
433
+ ref: b,
434
+ componentSchema: a.schema
435
+ }, je({ _: 2 }, [
436
+ ($ = (c = u(oe).getComponentConfingByType(a.schema.type)) == null ? void 0 : c.editConstraints) != null && $.childImmovable ? {
437
+ name: "edit-node",
438
+ fn: Z(() => [
439
+ (H(!0), F(he, null, Ne(a.schema.children, (s) => (H(), ve(h, {
440
+ key: s.id,
441
+ schema: s
442
+ }, null, 8, ["schema"]))), 128))
443
+ ]),
444
+ key: "0"
445
+ } : {
446
+ name: "edit-node",
447
+ fn: Z(() => [
448
+ a.schema.children ? (H(), ve(_t, {
449
+ key: 0,
450
+ schemas: a.schema.children,
451
+ "onUpdate:schemas": r[0] || (r[0] = (s) => a.schema.children = s)
452
+ }, null, 8, ["schemas"])) : ie("", !0)
453
+ ]),
454
+ key: "1"
455
+ }
456
+ ]), 1032, ["componentSchema"]);
457
+ };
458
+ }
459
+ }), bt = { class: "min-w-750px rounded h-full" }, St = /* @__PURE__ */ re({
460
+ __name: "previewJson",
461
+ setup(ne, { expose: U }) {
462
+ const v = oe.getComponent("modal"), o = oe.getComponent("monacoEditor"), t = {
463
+ theme: "vs-light",
464
+ selectOnLineNumbers: !0,
465
+ minimap: {
466
+ enabled: !1
467
+ },
468
+ readOnly: !0
469
+ }, b = M(null), a = M(!1), m = A("pageSchema");
470
+ function I() {
471
+ a.value = !1;
472
+ }
473
+ function w() {
474
+ a.value = !0, b.value ? b.value.setValue(JSON.stringify(m, null, 2)) : setTimeout(() => {
475
+ w();
476
+ }, 300);
477
+ }
478
+ function P(i = "epic-data.json") {
479
+ const r = JSON.stringify(m, null, 2);
480
+ var h = `data:text/json;charset=utf-8,${encodeURIComponent(r)}`, c = document.createElement("a");
481
+ c.setAttribute("href", h), c.setAttribute("download", i), c.click();
482
+ }
483
+ return U({
484
+ handleOpen: w
485
+ }), (i, r) => (H(), ve(u(v), {
486
+ modelValue: a.value,
487
+ "onUpdate:modelValue": r[0] || (r[0] = (h) => a.value = h),
488
+ title: "查看数据",
489
+ class: "w-900px",
490
+ width: "900px",
491
+ onClose: I,
492
+ onOk: P,
493
+ okText: "导出数据"
494
+ }, {
495
+ default: Z(() => [
496
+ V("div", bt, [
497
+ B(u(o), {
498
+ ref_key: "monacoEditorRef",
499
+ ref: b,
500
+ class: "editor h-full",
501
+ autoToggleTheme: "",
502
+ readOnly: "",
503
+ config: t,
504
+ language: "json"
505
+ }, null, 512)
506
+ ])
507
+ ]),
508
+ _: 1
509
+ }, 8, ["modelValue"]));
510
+ }
511
+ }), wt = { class: "epic-edit-toolbar flex items-center justify-between px-2" }, kt = { class: "flex-1 h-full flex items-center" }, Ct = {
512
+ key: 0,
513
+ class: "epic-divider"
514
+ }, Tt = ["title", "onClick"], Nt = { class: "flex-1 h-full flex items-center justify-end" }, $t = {
515
+ key: 0,
516
+ class: "flex items-center ml-12px"
517
+ }, Rt = { class: "pr-8px w-82px cursor-pointer" }, Dt = { class: "epic-device h-28px items-center gap-1 rounded-md border p-2px flex" }, Bt = ["title", "onClick"], Mt = /* @__PURE__ */ re({
518
+ __name: "toolbar",
519
+ setup(ne) {
520
+ const U = oe.getComponent("select"), { canvasScale: v, disabledZoom: o } = $e(), t = M("pc"), b = A("pageSchema"), a = A("designer"), m = A("revoke"), I = M(null), w = [
521
+ {
522
+ icon: "icon--epic--computer-outline-rounded",
523
+ title: "pc",
524
+ key: "pc"
525
+ },
526
+ {
527
+ icon: "icon--epic--tablet-android-outline-rounded",
528
+ title: "平板",
529
+ key: "pad"
530
+ },
531
+ {
532
+ icon: "icon--epic--phone-iphone-outline-sharp",
533
+ title: "手机",
534
+ key: "mobile"
535
+ }
536
+ ], P = q(() => [
537
+ // {
538
+ // icon: "icon--epic--code",
539
+ // title: "查看数据",
540
+ // on: () => handlePreview(),
541
+ // },
542
+ // {
543
+ // icon: "icon--epic--exit-to-app-rounded",
544
+ // title: "导入数据",
545
+ // on: handleOpenFileSelector,
546
+ // },
547
+ {
548
+ icon: "icon--epic--trash",
549
+ title: "清空",
550
+ on: s
551
+ },
552
+ {
553
+ icon: "icon--epic--undo",
554
+ title: "撤销",
555
+ on: c,
556
+ disabled: !m.recordList.value.length,
557
+ divider: !0
558
+ },
559
+ {
560
+ icon: "icon--epic--redo",
561
+ title: "重做",
562
+ on: $,
563
+ disabled: !m.undoList.value.length
564
+ }
565
+ ]), i = M(null), r = q({
566
+ get() {
567
+ return `${(v.value * 100).toFixed(0)}%`;
568
+ },
569
+ set(g) {
570
+ const k = parseFloat(g);
571
+ v.value = k / 100;
572
+ }
573
+ }), h = [
574
+ {
575
+ label: "60%",
576
+ value: "60%"
577
+ },
578
+ {
579
+ label: "80%",
580
+ value: "80%"
581
+ },
582
+ {
583
+ label: "100%",
584
+ value: "100%"
585
+ },
586
+ {
587
+ label: "120%",
588
+ value: "120%"
589
+ },
590
+ {
591
+ label: "140%",
592
+ value: "140%"
593
+ }
594
+ ];
595
+ function c() {
596
+ const g = m.undo();
597
+ g && (ke(b.schemas, g), a.setCheckedNode(b.schemas[0]));
598
+ }
599
+ function $() {
600
+ const g = m.redo();
601
+ g && (ke(b.schemas, g), a.setCheckedNode(b.schemas[0]));
602
+ }
603
+ function s() {
604
+ a.reset();
605
+ }
606
+ function Y(g) {
607
+ var j;
608
+ const k = (j = g.target.files) == null ? void 0 : j[0];
609
+ if (!k) return;
610
+ g.target.value = null;
611
+ const y = new FileReader();
612
+ y.readAsText(k), y.onload = (ce) => {
613
+ var z;
614
+ Q((z = ce.target) == null ? void 0 : z.result);
615
+ };
616
+ }
617
+ function Q(g) {
618
+ try {
619
+ let k = JSON.parse(g ?? "");
620
+ k.schemas || (k = lt(k)), ke(b, k);
621
+ } catch (k) {
622
+ console.error(k);
623
+ }
624
+ }
625
+ function O(g) {
626
+ a.handleToggleDeviceMode(g), t.value = g;
627
+ const k = {
628
+ pc: {},
629
+ pad: {
630
+ width: "780px",
631
+ mode: g
632
+ },
633
+ mobile: {
634
+ width: "390px",
635
+ height: "844px",
636
+ mode: g
637
+ }
638
+ };
639
+ b.canvas = k[g], console.log("%c [ pageSchema ]-248", "font-size:13px; background:pink; color:#bf2c9f;", b);
640
+ }
641
+ return (g, k) => (H(), F(he, null, [
642
+ V("div", wt, [
643
+ V("div", kt, [
644
+ (H(!0), F(he, null, Ne(P.value, (y, j) => (H(), F(he, { key: j }, [
645
+ y.divider ? (H(), F("div", Ct)) : ie("", !0),
646
+ V("div", {
647
+ title: y.title,
648
+ class: pe(["epic-action-item text-base h-90% px-10px flex items-center cursor-pointer", { disabled: y.disabled }]),
649
+ onClick: y.on
650
+ }, [
651
+ B(u(me), {
652
+ name: y.icon
653
+ }, null, 8, ["name"])
654
+ ], 10, Tt)
655
+ ], 64))), 128))
656
+ ]),
657
+ Ce(V("input", {
658
+ type: "file",
659
+ ref_key: "fileRef",
660
+ ref: i,
661
+ accept: ".json,.txt",
662
+ onChange: Y
663
+ }, null, 544), [
664
+ [Te, !1]
665
+ ]),
666
+ V("div", Nt, [
667
+ u(o) ? ie("", !0) : (H(), F("div", $t, [
668
+ V("div", Rt, [
669
+ B(u(U), {
670
+ value: r.value,
671
+ "onUpdate:value": k[0] || (k[0] = (y) => r.value = y),
672
+ modelValue: r.value,
673
+ "onUpdate:modelValue": k[1] || (k[1] = (y) => r.value = y),
674
+ options: h,
675
+ size: "small"
676
+ }, null, 8, ["value", "modelValue"])
677
+ ])
678
+ ])),
679
+ V("div", Dt, [
680
+ (H(), F(he, null, Ne(w, (y) => V("div", {
681
+ key: y.key,
682
+ title: y.title,
683
+ class: pe(["epic-device-item h-full px-1 flex items-center cursor-pointer text-base transition-colors rounded-sm", { checked: y.key === t.value }]),
684
+ onClick: (j) => O(y.key)
685
+ }, [
686
+ B(u(me), {
687
+ name: y.icon
688
+ }, null, 8, ["name"])
689
+ ], 10, Bt)), 64))
690
+ ])
691
+ ])
692
+ ]),
693
+ B(St, {
694
+ ref_key: "previewJson",
695
+ ref: I
696
+ }, null, 512)
697
+ ], 64));
698
+ }
699
+ }), Lt = { class: "h-full flex flex-col relative" }, Et = ["draggable"], Ht = /* @__PURE__ */ re({
700
+ __name: "editScreenContainer",
701
+ setup(ne) {
702
+ const U = A("pageSchema"), v = M(null), o = M(null), t = M(null), { pressSpace: b, disabledZoom: a } = $e(), {
703
+ handleElementDragStart: m,
704
+ handleElementDrag: I,
705
+ handleElementDragEnd: w
706
+ } = rt(v), { width: P, height: i } = ct(v), { canvasScale: r, handleZoom: h } = dt(o);
707
+ let c = 0, $ = 0;
708
+ const s = M({}), Y = M({}), Q = M({}), O = et({ width: 0, height: 0 });
709
+ tt(k), fe(Q, () => {
710
+ ze(g);
711
+ });
712
+ function g() {
713
+ t.value && (O.value = {
714
+ width: t.value.clientWidth,
715
+ height: t.value.clientHeight
716
+ });
717
+ }
718
+ function k() {
719
+ var z, L;
720
+ Q.value = {
721
+ width: ((z = U.canvas) == null ? void 0 : z.width) ?? "0",
722
+ height: ((L = U.canvas) == null ? void 0 : L.height) ?? "0"
723
+ };
724
+ }
725
+ ut(P, y), fe(O, y);
726
+ function y() {
727
+ let z = O.value.width || c, L = O.value.height || $;
728
+ s.value = {
729
+ width: P.value + z + "px",
730
+ // 滚动框宽度,包含额外的宽度
731
+ height: i.value + L + "px"
732
+ // 滚动框高度,包含额外的高度
733
+ }, Y.value = {
734
+ width: z + "px",
735
+ // 画布宽度
736
+ height: L + "px"
737
+ // 画布高度
738
+ }, j();
739
+ }
740
+ function j() {
741
+ ze(() => {
742
+ var se;
743
+ let z = O.value.width || c;
744
+ const W = (O.value.height || $) / 2, ee = z / 2;
745
+ (se = v.value) == null || se.scrollTo(ee, W);
746
+ });
747
+ }
748
+ _e(v, ce), _e(o, ce);
749
+ function ce() {
750
+ var L;
751
+ if (!v.value) return;
752
+ const z = v.value.getBoundingClientRect();
753
+ if (c = z.width - 60, $ = z.height - 80, !a.value)
754
+ if (O.value.width === 0)
755
+ r.value = 1;
756
+ else {
757
+ const W = (c - 20) / O.value.width, ee = $ / (O.value.height || ((L = o.value) == null ? void 0 : L.clientHeight) || 1), se = Math.abs(W - 1) < Math.abs(ee - 1);
758
+ let K = 1;
759
+ se ? K = W : K = ee, (W < 1 || ee < 1) && (K = Math.min(W, ee)), K < 1.4 && K > 0.5 && (r.value = K);
760
+ }
761
+ ht(y, 50)();
762
+ }
763
+ return (z, L) => (H(), F("div", Lt, [
764
+ B(Mt),
765
+ V("div", {
766
+ ref_key: "editScreenContainerRef",
767
+ ref: v,
768
+ class: pe(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container", { "cursor-grab": u(b) }]),
769
+ draggable: u(b),
770
+ onWheel: L[0] || (L[0] = //@ts-ignore
771
+ (...W) => u(h) && u(h)(...W)),
772
+ onDragstart: L[1] || (L[1] = //@ts-ignore
773
+ (...W) => u(m) && u(m)(...W)),
774
+ onDragend: L[2] || (L[2] = //@ts-ignore
775
+ (...W) => u(w) && u(w)(...W)),
776
+ onDrag: L[3] || (L[3] = //@ts-ignore
777
+ (...W) => u(I) && u(I)(...W))
778
+ }, [
779
+ V("div", {
780
+ id: "canvasContainer",
781
+ class: "flex items-center justify-center",
782
+ style: ye(s.value)
783
+ }, [
784
+ V("div", {
785
+ ref_key: "draggableElRef",
786
+ ref: o,
787
+ class: "transition-all"
788
+ }, [
789
+ V("div", {
790
+ class: pe({ "pointer-events-none": u(b) }),
791
+ style: ye(Y.value)
792
+ }, [
793
+ ot(z.$slots, "default")
794
+ ], 6)
795
+ ], 512)
796
+ ], 4)
797
+ ], 42, Et),
798
+ V("div", {
799
+ ref_key: "sizeBoxRef",
800
+ ref: t,
801
+ class: "absolute top-0 pointer-events-none",
802
+ style: ye(Q.value)
803
+ }, null, 4)
804
+ ]));
805
+ }
806
+ }), It = { class: "epic-edit-canvas" }, Pt = /* @__PURE__ */ re({
807
+ __name: "index",
808
+ setup(ne) {
809
+ const U = M(null), v = M(null), o = A("pageSchema"), t = q(() => o.schemas[0]), b = q(() => ({
810
+ width: "100%",
811
+ height: "100%"
812
+ }));
813
+ return nt(() => {
814
+ var a;
815
+ (a = v.value) == null || a.handleInit(U.value);
816
+ }), (a, m) => (H(), F("section", It, [
817
+ B(Ht, null, {
818
+ default: Z(() => [
819
+ V("div", {
820
+ ref_key: "epicEditRangeRef",
821
+ ref: U,
822
+ class: "epic-edit-range rounded-md overflow-auto relative",
823
+ style: ye(b.value)
824
+ }, [
825
+ B(We, { schema: t.value }, null, 8, ["schema"]),
826
+ B(yt, {
827
+ ref_key: "ePreviewWidgetsRef",
828
+ ref: v
829
+ }, null, 512)
830
+ ], 4)
831
+ ]),
832
+ _: 1
833
+ })
834
+ ]));
835
+ }
836
+ });
837
+ export {
838
+ Pt as default
839
+ };