hldesigner 0.0.1

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 (173) hide show
  1. package/FileSaver.min-b57403e6.js +103 -0
  2. package/_commonjsHelpers-e7ea1525.js +36 -0
  3. package/_plugin-vue_export-helper-dad06003.js +9 -0
  4. package/affix-widget-94198099.js +38 -0
  5. package/anchor-link-widget-919ac0ee.js +5 -0
  6. package/anchor-link-widget.vue_vue_type_script_setup_true_name_anchor-link-widget_lang-7df7e7c1.js +35 -0
  7. package/anchor-widget-77003871.js +57 -0
  8. package/auto-complete-widget-8d76ea70.js +74 -0
  9. package/avatar-widget-3cd63f01.js +38 -0
  10. package/backtop-widget-6fc3db98.js +38 -0
  11. package/badge-widget-f36a769c.js +44 -0
  12. package/baseImp-8c4be88e.js +11050 -0
  13. package/breadcrumb-widget-422a9d28.js +79 -0
  14. package/button-widget-918dde3f.js +48 -0
  15. package/cache-widget-a1637f5f.js +53 -0
  16. package/card-widget-2db8e9d4.js +112 -0
  17. package/carousel-widget-838cc8c9.js +75 -0
  18. package/cascader-widget-42482528.js +97 -0
  19. package/chart-widget-ac07a466.js +44285 -0
  20. package/checkbox-widget-ee1fcb0c.js +79 -0
  21. package/clipboard-fc4d858d.js +497 -0
  22. package/code-cf4fbc89.js +82 -0
  23. package/collapse-widget-1a93bdb5.js +89 -0
  24. package/color-picker-widget-e893711a.js +56 -0
  25. package/common-editor-76ac2e32.js +24 -0
  26. package/common-editor.vue_vue_type_script_setup_true_name_common-editor_lang-634a504e.js +25 -0
  27. package/configItem-6bfa74e0.js +113 -0
  28. package/cont-cell-widget-42f96421.js +8 -0
  29. package/cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-d3be593a.js +59 -0
  30. package/cont-widget-9dda9135.js +42 -0
  31. package/content-wrapper-20c559ac.js +14 -0
  32. package/content-wrapper.vue_vue_type_script_setup_true_lang-4a97c453.js +37 -0
  33. package/customClass-editor-9088a8cf.js +43 -0
  34. package/date-picker-range-widget-b9287f93.js +72 -0
  35. package/date-picker-widget-21595fd5.js +78 -0
  36. package/default-slot-widget-fc87ed0a.js +24 -0
  37. package/default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-0fb8e1cc.js +59 -0
  38. package/descriptions-widget-33a02f1a.js +83 -0
  39. package/designer.es.js +42 -0
  40. package/designer.style.css +11 -0
  41. package/designer.umd.js +161882 -0
  42. package/dialog-5e196819.js +124 -0
  43. package/dialog-widget-22714c34.js +33 -0
  44. package/divider-widget-adf656f2.js +38 -0
  45. package/drag-wrapper-f9fb1533.js +259 -0
  46. package/drawer-widget-404cb6db.js +33 -0
  47. package/dropdown-widget-a4a1e2f7.js +92 -0
  48. package/editor-wrapper-e6b30023.js +779 -0
  49. package/emitter-2b9b9409.js +53 -0
  50. package/empty-widget-c53b07dd.js +64 -0
  51. package/enum-type-255ade69.js +543 -0
  52. package/enum-type-287a50b6.js +2054 -0
  53. package/expression-ea95606e.js +2181 -0
  54. package/feedback-widget-c041b474.js +26 -0
  55. package/feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-efe168a5.js +82 -0
  56. package/field-base-5547436d.js +7 -0
  57. package/field-editor-3e1ce4f3.js +69 -0
  58. package/file-upload-widget-941b9493.js +98 -0
  59. package/form-item-wrapper-8039c512.js +113 -0
  60. package/form-widget-98a02c28.js +184 -0
  61. package/grid-col-widget-3ea371ea.js +8 -0
  62. package/grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-f40c8e16.js +41 -0
  63. package/grid-widget-f0635d43.js +43 -0
  64. package/html-text-widget-c440e86d.js +50 -0
  65. package/icon-2bb9fa65.js +129 -0
  66. package/iframe-widget-37ef665f.js +77 -0
  67. package/image-widget-871d5987.js +64 -0
  68. package/import-config-1eb9a66b.js +13156 -0
  69. package/index-0a2f2997.js +225 -0
  70. package/index-12505eec.js +42 -0
  71. package/index-18720c06.js +138 -0
  72. package/index-188b745d.js +132 -0
  73. package/index-28f32a55.js +216 -0
  74. package/index-2936e7cf.js +3265 -0
  75. package/index-2d29f8d3.js +7233 -0
  76. package/index-3d5d5fac.js +23 -0
  77. package/index-50c3e002.js +227 -0
  78. package/index-6a276ef7.js +131 -0
  79. package/index-6d56f058.js +45 -0
  80. package/index-7b38fd82.js +330 -0
  81. package/index-7c2a8e33.js +17993 -0
  82. package/index-7fa591e3.js +4817 -0
  83. package/index-82f2c56a.js +135 -0
  84. package/index-8713c192.js +344 -0
  85. package/index-8d537d38.js +2393 -0
  86. package/index-9fd4a537.js +99 -0
  87. package/index-ad538d7e.js +832 -0
  88. package/index-c1b1f59f.js +88 -0
  89. package/index-d6fa09d6.js +39 -0
  90. package/index-db2305dc.js +117 -0
  91. package/index-ddd23411.js +4884 -0
  92. package/index-e795786b.js +119 -0
  93. package/index-f146282d.js +1356 -0
  94. package/index-f849ef29.js +216 -0
  95. package/index-ffbcbc43.js +65 -0
  96. package/input-number-widget-64f89b9d.js +66 -0
  97. package/input-widget-0fe7c3d7.js +71 -0
  98. package/install-designer-bed2e18a.js +4752 -0
  99. package/item-4be3cb5b.js +34 -0
  100. package/item-ddbdee11.js +24 -0
  101. package/itemDetail-b31192a5.js +43 -0
  102. package/label-wrapper-91b95fb0.js +12 -0
  103. package/label-wrapper.vue_vue_type_style_index_0_lang-0a7f6bdd.js +80 -0
  104. package/link-widget-0f2bb61c.js +56 -0
  105. package/ltable-col-widget-9f26b93d.js +8 -0
  106. package/ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-639ee976.js +256 -0
  107. package/ltable-widget-b78a72ee.js +69 -0
  108. package/menu-widget-15fdd710.js +96 -0
  109. package/model-widget-3f2b1368.js +122 -0
  110. package/multirow-e1e1205c.js +292 -0
  111. package/multirow-widget copy-671ebd9c.js +858 -0
  112. package/multirow-widget-d256cac6.js +694 -0
  113. package/name-editor-05685151.js +104 -0
  114. package/optionItem-0ac4a3ae.js +4667 -0
  115. package/package.json +13 -0
  116. package/pagination-widget-31a7301d.js +81 -0
  117. package/picture-upload-widget-46ea42a0.js +102 -0
  118. package/postcss-2c4d92ea.js +2285 -0
  119. package/progress-widget-fc1f9557.js +52 -0
  120. package/property-base-e63e2f28.js +78 -0
  121. package/propresult-8fdf23e2.js +22 -0
  122. package/radio-widget-fbc63c11.js +79 -0
  123. package/range-widget-b0882319.js +74 -0
  124. package/rate-widget-9719ca7d.js +56 -0
  125. package/reg-editor.vue_vue_type_script_setup_true_lang-56504fb0.js +61 -0
  126. package/result-widget-925a5426.js +67 -0
  127. package/rich-editor-widget-426f0b19.js +77 -0
  128. package/router-widget-209f0eb1.js +54 -0
  129. package/schemaData-ab87bd49.js +333 -0
  130. package/select-widget-0b560a2f.js +288 -0
  131. package/setView-de8aaf40.js +84 -0
  132. package/sfc-10e3d29c.js +2570 -0
  133. package/share-editor-27d43940.js +448 -0
  134. package/share-event-dd8ff2ba.js +26 -0
  135. package/share-field-451430de.js +690 -0
  136. package/share-file-124a4d83.js +121 -0
  137. package/size-editor-ea05760c.js +92 -0
  138. package/slider-widget-fb4efa96.js +62 -0
  139. package/slot-04a83a27.js +17 -0
  140. package/static-text-widget-2efdd909.js +51 -0
  141. package/steps-widget-6f283f21.js +91 -0
  142. package/subMenu-widget-77e295cb.js +16 -0
  143. package/subMenu-widget.vue_vue_type_script_setup_true_lang-b051a10e.js +69 -0
  144. package/switch-widget-f1120b6c.js +56 -0
  145. package/tab-pane-widget-99c21615.js +8 -0
  146. package/tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-bc962788.js +35 -0
  147. package/table-col-widget-d6d5d21f.js +23 -0
  148. package/table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-2efa4d60.js +80 -0
  149. package/table-widget-9b8d9798.js +163 -0
  150. package/tabs-widget-88393072.js +68 -0
  151. package/tag-widget-33c17c06.js +38 -0
  152. package/target-code-48e9d055.js +33 -0
  153. package/target-datasource-35dfcb1d.js +221 -0
  154. package/target-link-3ffd0149.js +126 -0
  155. package/target-saveForm-012b7de1.js +136 -0
  156. package/target-widget-3d7f6104.js +59 -0
  157. package/target-window-7556d301.js +54 -0
  158. package/template-c30585f4.js +251740 -0
  159. package/text-widget-8b5ece83.js +38 -0
  160. package/textarea-widget-e7c1d9ed.js +56 -0
  161. package/time-picker-range-widget-b8dfcc3b.js +58 -0
  162. package/time-picker-widget-73bde0a3.js +57 -0
  163. package/time-select-widget-08008b76.js +57 -0
  164. package/tmpl-widget-7d245d41.js +92 -0
  165. package/tooltip-wrapper-2922e49e.js +31 -0
  166. package/tree-select-widget-67231123.js +94 -0
  167. package/tree-widget-ab91165f.js +90 -0
  168. package/uuid-39f0308a.js +196 -0
  169. package/value-editor-27783d6c.js +89 -0
  170. package/vue3-sfc-loader-b70bdce4.js +34688 -0
  171. package/widget-base-4c2d6265.js +27 -0
  172. package/widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-bbe0cabe.js +277 -0
  173. package/wrapper-widget-5702502d.js +78 -0
@@ -0,0 +1,1356 @@
1
+ var st = Object.defineProperty;
2
+ var it = (e, t, n) => t in e ? st(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var h = (e, t, n) => (it(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ import { u as ge, d as ce, f as He, k as $, o as De, y as pe, a as K, F as ye } from "./enum-type-287a50b6.js";
5
+ import { reactive as Ue, computed as Q, nextTick as ot, watch as lt } from "vue";
6
+ import { l as rt, c as _, g as ve, m as ct } from "./uuid-39f0308a.js";
7
+ import { d as L, C as N, e as at, g as le, h as ft, L as ut, P as Le, R as pt, i as ht, j as mt, k as dt } from "./enum-type-255ade69.js";
8
+ import { w as Ct, C as gt, g as Tt } from "./optionItem-0ac4a3ae.js";
9
+ import { B as E, f as w, P as H, i as j, I as vt } from "./baseImp-8c4be88e.js";
10
+ import { c as V, p as ze, d as Ve, g as bt } from "./template-c30585f4.js";
11
+ import { q as he } from "./index-7fa591e3.js";
12
+ import { u as yt } from "./icon-2bb9fa65.js";
13
+ function Ot(e) {
14
+ return e = e || /* @__PURE__ */ Object.create(null), {
15
+ /**
16
+ * Register an event handler for the given type.
17
+ *
18
+ * @param {String} type Type of event to listen for, or `"*"` for all events
19
+ * @param {Function} handler Function to call in response to given event
20
+ * @memberOf mitt
21
+ */
22
+ on: function(n, s) {
23
+ (e[n] || (e[n] = [])).push(s);
24
+ },
25
+ /**
26
+ * Remove an event handler for the given type.
27
+ *
28
+ * @param {String} type Type of event to unregister `handler` from, or `"*"`
29
+ * @param {Function} handler Handler function to remove
30
+ * @memberOf mitt
31
+ */
32
+ off: function(n, s) {
33
+ e[n] && e[n].splice(e[n].indexOf(s) >>> 0, 1);
34
+ },
35
+ /**
36
+ * Invoke all handlers for the given type.
37
+ * If present, `"*"` handlers are invoked after type-matched handlers.
38
+ *
39
+ * @param {String} type The event type to invoke
40
+ * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
41
+ * @memberof mitt
42
+ */
43
+ emit: function(n, s) {
44
+ (e[n] || []).map(function(c) {
45
+ c(s);
46
+ }), (e["*"] || []).map(function(c) {
47
+ c(n, s);
48
+ });
49
+ }
50
+ };
51
+ }
52
+ const Oe = new Ot(), Me = {
53
+ $on: Oe.on,
54
+ $off: Oe.off,
55
+ $emit: Oe.emit
56
+ };
57
+ function Lt(e) {
58
+ var t = {
59
+ index: -1,
60
+ maxStep: 20,
61
+ steps: []
62
+ };
63
+ e && !(e != null && e.historyData) && (e.historyData = t);
64
+ const n = Ue((e == null ? void 0 : e.historyData) || t), s = `widget__list__backup__${e == null ? void 0 : e.key}`, c = `form__config__backup__${e == null ? void 0 : e.key}`, a = Q({
65
+ get: () => (n.index < 0 && (n.index = 0), n.steps[n.index]),
66
+ set: (R) => {
67
+ n.index < 0 && (n.index = 0), n.steps[n.index] = R;
68
+ }
69
+ }), y = () => {
70
+ const R = a == null ? void 0 : a.value;
71
+ e.version = rt(), e.widgetList = $(R == null ? void 0 : R.widgetList), e.pageConfig = $(R == null ? void 0 : R.pageConfig);
72
+ }, d = (R) => {
73
+ const g = a;
74
+ g.value = $({
75
+ detail: R,
76
+ widgetList: e.widgetList,
77
+ pageConfig: e.pageConfig
78
+ });
79
+ }, S = () => {
80
+ te(), n.index = n.index + 1, d("initHistory");
81
+ }, v = (R) => {
82
+ var g;
83
+ n.index == n.maxStep - 1 ? (g = n.steps) == null || g.shift() : n.index = n.index + 1, T(R), n.index < n.steps.length - 1 && (n.steps = n.steps.slice(0, n.index + 1));
84
+ }, T = (R) => {
85
+ d(R), Y();
86
+ }, C = () => {
87
+ n.index !== 0 && n.index--, y();
88
+ }, F = () => {
89
+ var R;
90
+ n.index !== ((R = n.steps) == null ? void 0 : R.length) - 1 && n.index++, y();
91
+ }, G = () => {
92
+ var R;
93
+ return n.index > 0 && ((R = n.steps) == null ? void 0 : R.length) > 0;
94
+ }, q = () => {
95
+ var R;
96
+ return n.index < ((R = n.steps) == null ? void 0 : R.length) - 1;
97
+ }, Y = () => {
98
+ ge.set(s, e.widgetList), ge.set(c, e.pageConfig);
99
+ }, te = () => {
100
+ let R = ge.get(s);
101
+ R && ce(e.widgetList, He(R));
102
+ let g = ge.get(c);
103
+ g && ce(e.pageConfig, He(g));
104
+ };
105
+ return {
106
+ initHistoryData: S,
107
+ emitHistoryChange: v,
108
+ saveCurrentHistoryStep: T,
109
+ undoHistoryStep: C,
110
+ redoHistoryStep: F,
111
+ undoEnabled: G,
112
+ redoEnabled: q,
113
+ saveFormContentToStorage: Y,
114
+ loadFormContentFromStorage: te
115
+ };
116
+ }
117
+ const Te = (e, t) => {
118
+ var s;
119
+ if (!e || !t)
120
+ return !1;
121
+ let n = oe(e == null ? void 0 : e.type);
122
+ return !n || !(n != null && n.options) ? !1 : ((s = De(n == null ? void 0 : n.options)) == null ? void 0 : s.indexOf(t)) > -1;
123
+ }, oe = (e) => {
124
+ var t;
125
+ return (t = Ct.allWidgets) == null ? void 0 : t.find((n) => n.type === e);
126
+ }, Ft = (e) => {
127
+ const t = e.id;
128
+ if (!t)
129
+ return null;
130
+ const n = E.getName(e);
131
+ return { id: t, name: n };
132
+ }, X = (e, t, n) => {
133
+ if (!e)
134
+ return _(e);
135
+ var s = e == null ? void 0 : e.id, c = e.type + ve(), a = c;
136
+ n && (a = n(s, c));
137
+ const y = Ft(e);
138
+ return Dt(e, a, t), y && (t != null && t.recordSource) && ce(e, { _source: y }), _(e);
139
+ }, Dt = (e, t, n) => (pe(e, V.id) && (e.id = t), e.options = Pt(e.options, t, n), e), Pt = (e, t, n) => (pe(e, V.name) && (n == null ? void 0 : n.newName) != !1 && (e.name = t.replaceAll("-", "")), pe(e, V.label) && !(e != null && e.label) && (n == null ? void 0 : n.newLabel) != !1 && (e.label = t.replaceAll("-", "")), e), At = (e) => {
140
+ const t = "id@";
141
+ return {
142
+ idClass: `${t}${e == null ? void 0 : e.id}`,
143
+ getIdByIdClass: (a) => a == null ? void 0 : a.substring(t.length),
144
+ isIdClass: (a) => a == null ? void 0 : a.startsWith(t)
145
+ };
146
+ };
147
+ function Et() {
148
+ const e = (o) => E.getOptions(o, "rowspan") || 1, t = (o) => E.getOptions(o, "colspan") || 1, n = (o, r) => {
149
+ E.setOptions(o, "rowspan", r);
150
+ }, s = (o, r) => {
151
+ E.setOptions(o, "colspan", r);
152
+ }, c = (o, r, m) => {
153
+ let b = $(o.rows[r]);
154
+ return M(b), o.rows.splice(m, 0, b), !0;
155
+ }, a = (o, r) => (o.rows.forEach((m) => {
156
+ let b = Z();
157
+ m.cols.splice(r, 0, b);
158
+ }), !0), y = (o) => {
159
+ let r = o.rows.length;
160
+ return c(o, r - 1, r), !0;
161
+ }, d = (o) => {
162
+ let r = o.rows[0].cols.length;
163
+ return a(o, r), !0;
164
+ }, S = (o, r, m, b, O) => {
165
+ let f = O ? r : r + 1;
166
+ if (!O) {
167
+ let P = f, I = !1;
168
+ for (; P < o.rows.length; )
169
+ if (o.rows[P].cols[b].merged)
170
+ P++;
171
+ else {
172
+ f = P, I = !0;
173
+ break;
174
+ }
175
+ I && (f = o.rows.length);
176
+ }
177
+ c(o, m, f);
178
+ let u = 0;
179
+ for (; f < o.rows.length - 1 && u < o.rows[0].cols.length; ) {
180
+ const P = o.rows[f + 1].cols[u];
181
+ if (P.merged) {
182
+ let k = o.rows, ee = {}, J = 0;
183
+ for (let A = f; A >= 0; A--)
184
+ if (!k[A].cols[u].merged && e(k[A].cols[u]) > 1) {
185
+ J = A, ee = k[A].cols[u];
186
+ break;
187
+ }
188
+ if (ee.options) {
189
+ let A = e(ee) + 1;
190
+ C(o.rows, J, u, t(ee), A), u += t(ee);
191
+ } else
192
+ u += 1;
193
+ } else
194
+ u += t(P);
195
+ }
196
+ return !0;
197
+ }, v = (o, r, m, b) => {
198
+ let O = b ? r : r + 1;
199
+ if (!b) {
200
+ let u = O, P = !1;
201
+ for (; u < o.rows[m].cols.length; ) {
202
+ if (o.rows[m].cols[u].merged)
203
+ u++;
204
+ else {
205
+ O = u, P = !0;
206
+ break;
207
+ }
208
+ P || (O = o.rows[m].cols.length);
209
+ }
210
+ }
211
+ a(o, O);
212
+ let f = 0;
213
+ for (; O < o.rows[0].cols.length - 1 && f < o.rows.length; ) {
214
+ const u = o.rows[f].cols[O + 1];
215
+ if (u.merged) {
216
+ let I = o.rows[f].cols, k = {}, ee = null;
217
+ for (let J = O; J >= 0; J--)
218
+ if (!I[J].merged && t(I[J]) > 1) {
219
+ ee = J, k = I[J];
220
+ break;
221
+ }
222
+ if (k.options) {
223
+ let J = t(k) + 1;
224
+ T(o.rows, f, ee, J, e(k)), f += e(k);
225
+ } else
226
+ f += 1;
227
+ } else
228
+ f += e(u);
229
+ }
230
+ return !0;
231
+ }, T = (o, r, m, b, O) => {
232
+ for (let f = r; f < r + O; f++)
233
+ for (let u = m; u < m + b; u++) {
234
+ if (f === r && u === m) {
235
+ s(o[f].cols[u], b);
236
+ continue;
237
+ }
238
+ o[f].cols[u].merged = !0, s(o[f].cols[u], b), o[f].cols[u].widgetList = [];
239
+ }
240
+ }, C = (o, r, m, b, O) => {
241
+ for (let f = r; f < r + O; f++)
242
+ for (let u = m; u < m + b; u++) {
243
+ if (f === r && u === m) {
244
+ n(o[f].cols[u], O);
245
+ continue;
246
+ }
247
+ o[f].cols[u].merged = !0, n(o[f].cols[u], O), o[f].cols[u].widgetList = [];
248
+ }
249
+ }, F = (o, r, m, b, O) => {
250
+ for (let f = r; f < r + O; f++)
251
+ for (let u = m; u < m + b; u++)
252
+ o[f].cols[u].merged = !1, n(o[f].cols[u], 1), s(o[f].cols[u], 1);
253
+ }, G = (o, r, m, b, O) => {
254
+ for (let f = r; f < r + O; f++)
255
+ for (let u = m; u < m + b; u++)
256
+ o[f].cols[u].merged = !1, n(o[f].cols[u], 1), s(o[f].cols[u], 1);
257
+ }, q = (o, r, m, b) => {
258
+ let O = E.getOptions(o[m].cols[0], "rowspan"), f = !1;
259
+ for (let P = 1; P < o[m].cols.length; P++)
260
+ if (e(o[m].cols[P]) !== O) {
261
+ f = !0;
262
+ break;
263
+ }
264
+ if (f)
265
+ return w.info(K.i18nt("designer.hint.rowspanNotConsistentForMergeEntireRow")), !1;
266
+ let u = r.filter((P) => !P.merged && !!P.widgetList && P.widgetList.length > 0);
267
+ return u && u.length > 0 && u[0].id !== r[0].id && (!r[0].widgetList || r[0].widgetList.length <= 0) && (r[0].widgetList = $(u[0].widgetList)), T(o, m, 0, r.length, e(r[b])), !0;
268
+ }, Y = (o, r, m, b, O) => {
269
+ let f = b ? r : r + e(O), u = b ? r - 1 : r;
270
+ if (b) {
271
+ let I = u;
272
+ for (; I >= 0; )
273
+ if (o[I].cols[m].merged)
274
+ I--;
275
+ else {
276
+ u = I;
277
+ break;
278
+ }
279
+ }
280
+ o[f].cols[m].widgetList && o[f].cols[m].widgetList.length > 0 && (!o[u].cols[m].widgetList || o[u].cols[m].widgetList.length === 0) && (o[u].cols[m].widgetList = $(o[f].cols[m].widgetList));
281
+ let P = e(o[f].cols[m]) * 1 + e(o[u].cols[m]) * 1;
282
+ return C(o, u, m, t(O), P), !0;
283
+ }, te = (o, r, m, b) => {
284
+ let O = E.getOptions(o[0].cols[b], "colspan"), f = !1;
285
+ for (let I = 1; I < o.length; I++)
286
+ if (t(o[I].cols[b]) !== O) {
287
+ f = !0;
288
+ break;
289
+ }
290
+ if (f)
291
+ return w.info(K.i18nt("designer.hint.colspanNotConsistentForMergeEntireColumn")), !1;
292
+ let u = [];
293
+ o.forEach((I) => {
294
+ let k = I.cols[b];
295
+ !k.merged && k.widgetList && k.widgetList.length > 0 && u.push(k);
296
+ });
297
+ let P = o[0].cols[b];
298
+ return u && u.length > 0 && u[0].id !== P.id && (!P.widgetList || P.widgetList.length <= 0) && (P.widgetList = $(u[0].widgetList)), C(o, 0, b, t(P), o.length), !0;
299
+ }, R = (o, r, m, b, O, f) => {
300
+ let u = O ? b : b + (E.getOptions(r[b], "colspan") || 1), P = O ? b - 1 : b;
301
+ if (O) {
302
+ let k = P;
303
+ for (; k >= 0; )
304
+ if (o[m].cols[k].merged)
305
+ k--;
306
+ else {
307
+ P = k;
308
+ break;
309
+ }
310
+ }
311
+ r[u].widgetList && r[u].widgetList.length > 0 && (!r[P].widgetList || r[P].widgetList.length === 0) && (r[P].widgetList = $(r[u].widgetList));
312
+ let I = t(r[u]) * 1 + t(r[P]) * 1;
313
+ return T(o, m, P, I, e(f)), !0;
314
+ }, g = (o, r, m, b, O) => (F(o, r, m, b, O), !0), B = (o, r, m, b, O) => (G(o, r, m, b, O), !0), U = (o, r) => {
315
+ let m = !0;
316
+ if (o.forEach((f) => {
317
+ t(f.cols[0]) !== o[0].cols.length && (m = !1);
318
+ }), m)
319
+ return w.info(K.i18nt("designer.hint.lastColCannotBeDeleted")), !1;
320
+ let b = t(o[0].cols[r]), O = !1;
321
+ for (let f = 1; f < o.length; f++)
322
+ if (t(o[f].cols[r]) !== b) {
323
+ O = !0;
324
+ break;
325
+ }
326
+ return O ? (w.info(K.i18nt("designer.hint.colspanNotConsistentForDeleteEntireColumn")), !1) : (o.forEach((f) => {
327
+ f.cols.splice(r, b);
328
+ }), !0);
329
+ }, z = (o, r) => {
330
+ let m = !0;
331
+ if (o[0].cols.forEach((f) => {
332
+ e(f) !== o.length && (m = !1);
333
+ }), m)
334
+ return w.info(K.i18nt("designer.hint.lastRowCannotBeDeleted")), !1;
335
+ let b = e(o[r].cols[0]), O = !1;
336
+ for (let f = 1; f < o[r].cols.length; f++)
337
+ if (e(o[r].cols[f]) !== b) {
338
+ O = !0;
339
+ break;
340
+ }
341
+ return O ? (w.info(K.i18nt("designer.hint.rowspanNotConsistentForDeleteEntireRow")), !1) : (o.splice(r, b), !0);
342
+ }, M = (o) => {
343
+ let r = o ?? { cols: [] };
344
+ return r = X({ ...r, type: L.tableRow, id: "" }), r.merged = !1, o ? r.cols.forEach((m) => {
345
+ Z(m);
346
+ }) : r.cols.push(Z()), r;
347
+ }, Z = (o) => {
348
+ let r = o ?? $(oe(L.tableCol));
349
+ return X(r), r.merged = !1, s(r, 1), n(r, 1), r.widgetList.length = 0, r;
350
+ }, se = (o) => {
351
+ let r = o ?? $(oe(L.table));
352
+ return X(r), r;
353
+ };
354
+ return {
355
+ appendTableRow: y,
356
+ appendTableCol: d,
357
+ insertTableRow: S,
358
+ insertTableCol: v,
359
+ mergeTableWholeRow: q,
360
+ mergeTableRow: Y,
361
+ mergeTableCol: R,
362
+ mergeTableWholeCol: te,
363
+ undoMergeTableCol: g,
364
+ undoMergeTableRow: B,
365
+ deleteTableWholeCol: U,
366
+ deleteTableWholeRow: z,
367
+ initTableRow: M,
368
+ initTable: se,
369
+ initCloneTable: (o) => {
370
+ let r = se();
371
+ return _(o).rows.forEach((m) => {
372
+ let b = _($(m));
373
+ X(b), b.cols.forEach((O) => {
374
+ X(O), O.widgetList = [];
375
+ }), _(r).rows.push(b);
376
+ }), r;
377
+ },
378
+ isTable: (o) => (o == null ? void 0 : o.type) === L.table
379
+ };
380
+ }
381
+ function St() {
382
+ const e = () => {
383
+ let v = _($(oe(L.tabs)));
384
+ return v = X(v), v;
385
+ }, t = (v, T) => {
386
+ let C = _($(oe(L.tabPane)));
387
+ var F = X(C);
388
+ return v && E.setOptions(F, V.label, v), T !== void 0 && E.setOptions(F, V.isdefault, T), F;
389
+ }, n = (v) => {
390
+ var C;
391
+ let T = e();
392
+ return (C = _(v).tabs) == null || C.forEach((F) => {
393
+ var q;
394
+ let G = s(F);
395
+ (q = _(T).tabs) == null || q.push(G);
396
+ }), T;
397
+ }, s = (v) => {
398
+ var T = $(v);
399
+ return X(T), E.setOptions(T, V.isdefault, !1), T.widgetList = [], T;
400
+ };
401
+ return {
402
+ initTab: e,
403
+ initCloneTab: n,
404
+ initTabPane: t,
405
+ initCloneTabPane: s,
406
+ addTabPaneOfTabs: (v, T) => {
407
+ let C = v == null ? void 0 : v.tabs;
408
+ return C || (C = []), T = T || t(), T && C.push(T), !0;
409
+ },
410
+ deleteTabPaneOfTabs: (v, T) => {
411
+ var C;
412
+ if (((C = v.tabs) == null ? void 0 : C.length) === 1) {
413
+ w.info(K.i18nt("designer.hint.lastPaneCannotBeDeleted"));
414
+ return;
415
+ }
416
+ return v.tabs.splice(T, 1), !0;
417
+ },
418
+ // cloneTabPane,
419
+ findTabPaneOfTabs: (v, T) => {
420
+ var C;
421
+ return (C = v.tabs) == null ? void 0 : C.findIndex((F) => E.getName(F) === T);
422
+ },
423
+ getActiveTab: (v) => {
424
+ var C, F;
425
+ let T = (C = v == null ? void 0 : v.tabs) == null ? void 0 : C[0];
426
+ return (F = v == null ? void 0 : v.tabs) == null || F.forEach((G) => {
427
+ E.getOptions(G, V.isdefault) && (T = G);
428
+ }), T;
429
+ },
430
+ isTabs: (v) => (v == null ? void 0 : v.type) === L.tabs
431
+ };
432
+ }
433
+ const wt = (e) => {
434
+ var t = [];
435
+ if (!e)
436
+ return t;
437
+ var n = he("$..widgetList[*]", e);
438
+ return e.type == L.tabs ? (t = e.tabs, t = [...n, ...t]) : e.type == L.grid && (t = he("$..cols[*]", e), t = [...n, ...t]), t = [...n], t == null ? void 0 : t.filter((s) => !!(s != null && s.type));
439
+ }, re = (e, t, n) => {
440
+ e == null || e.forEach((s) => {
441
+ var c, a, y, d, S, v, T;
442
+ if (s) {
443
+ if (t == null || t.push(s), s.type === L.tabs)
444
+ (c = s.tabs) == null || c.forEach((C) => {
445
+ t == null || t.push(C), re(C.widgetList, t, n);
446
+ });
447
+ else if (s.type === L.table)
448
+ (a = s.rows) == null || a.forEach((C) => {
449
+ var F;
450
+ t == null || t.push(C), (F = C == null ? void 0 : C.cols) == null || F.forEach((G) => {
451
+ t == null || t.push(G), re(G.widgetList, t, n);
452
+ });
453
+ });
454
+ else if (s.type === L.grid)
455
+ (y = s.cols) == null || y.forEach((C) => {
456
+ t == null || t.push(C), re(C.widgetList, t, n);
457
+ });
458
+ else if (s.type === L.cont) {
459
+ const C = (F) => {
460
+ var G;
461
+ re(F.widgetList, t, n), (G = F == null ? void 0 : F.children) == null || G.map((q) => {
462
+ C(q);
463
+ });
464
+ };
465
+ (d = s.cols) == null || d.forEach((F) => {
466
+ C(F);
467
+ });
468
+ } else if (((S = s.widgetList) == null ? void 0 : S.length) > 0 && re(s.widgetList, t, n), !n) {
469
+ const C = (T = (v = De(s.options)) == null ? void 0 : v.filter((F) => {
470
+ var G;
471
+ return ((G = s.options[F]) == null ? void 0 : G.type) === N.slot;
472
+ })) == null ? void 0 : T.map((F) => s.options[F]);
473
+ C == null || C.forEach((F) => {
474
+ re(F == null ? void 0 : F.widgetList, t, n);
475
+ });
476
+ }
477
+ }
478
+ });
479
+ }, Pe = (e, t, n) => {
480
+ let s = [];
481
+ return qe(e, (a) => {
482
+ s.push(a);
483
+ }, t, n), s;
484
+ }, qe = (e, t, n, s) => {
485
+ if (!e)
486
+ return;
487
+ const c = [];
488
+ re(e, c, s), c == null || c.forEach((a) => {
489
+ n ? n(a) && t(a) : t(a);
490
+ });
491
+ }, Rt = (e, t) => {
492
+ if (!e)
493
+ return;
494
+ const n = Pe(e, (s) => !!(s != null && s.formItemFlag), !0);
495
+ return n == null || n.forEach((s) => t == null ? void 0 : t(s)), n;
496
+ }, xt = (e, t) => {
497
+ if (!t || (e == null ? void 0 : e.length) <= 0)
498
+ return;
499
+ const n = Pe(e, (c) => (c == null ? void 0 : c.id) === t);
500
+ return n == null ? void 0 : n[0];
501
+ }, en = (e, t) => Pe(e, (n) => (n == null ? void 0 : n.type) === t), tn = (e, t) => {
502
+ var c;
503
+ if (!e)
504
+ return [];
505
+ let n = [], s = (a) => {
506
+ a && (n.find((y) => (y == null ? void 0 : y.name) === E.getName(a)) || n.push({
507
+ type: a.type,
508
+ name: E.getName(a),
509
+ field: a
510
+ }));
511
+ };
512
+ return t ? (c = he("$..*[?(@property === 'formItemFlag' && @ === true)]^", e)) == null || c.forEach((a) => {
513
+ s(a);
514
+ }) : Rt(e, s), n;
515
+ }, ne = (e, t, n, s = !1, c) => {
516
+ var v, T, C, F, G, q, Y, te, R;
517
+ if (!e)
518
+ return;
519
+ let a = {
520
+ id: e.id,
521
+ type: e.type,
522
+ label: E.getOptions(e, "label") || E.getOptions(e, "name") || e.type,
523
+ widget: s ? e : null,
524
+ parent: t,
525
+ children: [],
526
+ matched: !c || (c == null ? void 0 : c(e))
527
+ };
528
+ if (n == null || n.push(a), e.category === void 0)
529
+ return;
530
+ if (a.children = [], e.type === L.grid)
531
+ (v = e == null ? void 0 : e.cols) == null || v.map((g) => {
532
+ var U, z;
533
+ let B = {
534
+ id: g.id,
535
+ type: g.type,
536
+ label: E.getOptions(g, "name", !1, !1) || g.id || g.type,
537
+ children: [],
538
+ parent: a,
539
+ widget: s ? g : null
540
+ };
541
+ (U = a.children) == null || U.push(B), (z = g.widgetList) == null || z.map((M) => {
542
+ ne(M, B, B.children, s, c);
543
+ });
544
+ });
545
+ else if (e.type === L.cont) {
546
+ const g = (B) => {
547
+ var U, z;
548
+ (U = B.widgetList) == null || U.map((M) => {
549
+ ne(M, a, a.children, s, c);
550
+ }), (z = B == null ? void 0 : B.children) == null || z.map((M) => g(M));
551
+ };
552
+ (T = e == null ? void 0 : e.cols) == null || T.map((B) => {
553
+ g(B);
554
+ });
555
+ } else if (e.type === L.table)
556
+ (C = e == null ? void 0 : e.rows) == null || C.map((g) => {
557
+ var U, z;
558
+ let B = {
559
+ id: g.id,
560
+ type: L.tableRow,
561
+ label: L.tableRow,
562
+ selectable: !1,
563
+ children: [],
564
+ parent: a,
565
+ widget: s ? g : null
566
+ };
567
+ (U = g == null ? void 0 : g.cols) == null || U.map((M) => {
568
+ var fe;
569
+ if (M.merged)
570
+ return;
571
+ let Z = B.children, se = {
572
+ id: M.id,
573
+ type: L.tableCol,
574
+ label: L.tableCol,
575
+ children: [],
576
+ parent: B,
577
+ widget: s ? M : null
578
+ };
579
+ (fe = M.widgetList) == null || fe.map((me) => {
580
+ ne(me, se, se.children, s, c);
581
+ }), Z == null || Z.push(se);
582
+ }), (z = a.children) == null || z.push(B);
583
+ });
584
+ else if (e.type === L.tabs)
585
+ (F = e == null ? void 0 : e.tabs) == null || F.map((g) => {
586
+ var U, z;
587
+ let B = {
588
+ id: g.id,
589
+ type: g.type,
590
+ label: E.getOptions(g, "label", !1, !1) || g.type,
591
+ // selectable: true,
592
+ children: [],
593
+ parent: a,
594
+ widget: s ? g : null
595
+ };
596
+ (U = a.children) == null || U.push(B), (z = g == null ? void 0 : g.widgetList) == null || z.map((M) => {
597
+ ne(M, B, B.children, s, c);
598
+ });
599
+ });
600
+ else if (e.type === L.eltable) {
601
+ var y = he("$..widgetList[*]", (G = e.options) == null ? void 0 : G.optionItems.value);
602
+ (y == null ? void 0 : y.length) > 0 && (y == null || y.map((g) => {
603
+ ne(g, a, a.children, s, c);
604
+ }));
605
+ } else
606
+ e.category === at.container && ((q = e == null ? void 0 : e.widgetList) == null ? void 0 : q.length) > 0 && ((Y = e == null ? void 0 : e.widgetList) == null || Y.map((g) => {
607
+ ne(g, a, a.children, s, c);
608
+ }));
609
+ const d = E.getOptions(e, V.widgetList);
610
+ d && (d == null || d.map((g) => {
611
+ ne(g, a, a.children, s, c);
612
+ }));
613
+ const S = (R = (te = De(e.options)) == null ? void 0 : te.filter((g) => {
614
+ var B;
615
+ return ((B = e.options[g]) == null ? void 0 : B.type) === N.slot;
616
+ })) == null ? void 0 : R.map((g) => e.options[g]);
617
+ S == null || S.forEach((g) => {
618
+ var B, U, z;
619
+ if (((B = g == null ? void 0 : g.widgetList) == null ? void 0 : B.length) > 0) {
620
+ let M = {
621
+ id: g.slotName + ve(),
622
+ type: g.type,
623
+ label: g.slotName || g.type,
624
+ children: [],
625
+ parent: a,
626
+ widget: s ? g : null,
627
+ selectable: !1
628
+ };
629
+ (U = a.children) == null || U.push(M), (z = g == null ? void 0 : g.widgetList) == null || z.map((Z) => {
630
+ ne(Z, M, M.children, s, c);
631
+ });
632
+ }
633
+ });
634
+ }, Je = (e, t = !1, n) => {
635
+ const s = [];
636
+ let c = { label: L.page, id: L.page, type: L.page };
637
+ return e == null || e.forEach((a) => {
638
+ ne(a, c, s, t, n);
639
+ }), ce(c, { children: s }), [c];
640
+ }, Ke = (e, t, n) => {
641
+ !e || e.length <= 0 || e.forEach((s) => {
642
+ s.id === t ? n == null || n(s) : Ke(s == null ? void 0 : s.children, t, n);
643
+ });
644
+ }, je = (e, t) => {
645
+ let n = null;
646
+ return Ke(e, t, (s) => {
647
+ n = s;
648
+ }), n;
649
+ }, Fe = (e, t) => {
650
+ const n = je(e, t);
651
+ let s = [];
652
+ const c = (a) => {
653
+ a && (s.push(a), a != null && a.parent && c(a == null ? void 0 : a.parent));
654
+ };
655
+ return c(n), s;
656
+ }, Bt = (e, t, n) => {
657
+ !e || e.length <= 0 || (t || (t = []), e.forEach((s) => {
658
+ var c;
659
+ n != null && n(s) && t.push(s), s != null && s.children && ((c = s == null ? void 0 : s.children) == null ? void 0 : c.length) > 0 && Bt(s == null ? void 0 : s.children, t, n);
660
+ }));
661
+ }, Ee = (e, t, n) => {
662
+ const s = $(e);
663
+ return X(s, t, n), qe([s], (c) => {
664
+ X(c, t, n);
665
+ }), s;
666
+ }, ue = (e, t, n, s = !1, c) => {
667
+ if (!t || (t == null ? void 0 : t.length) <= 0 || !n || !e)
668
+ return;
669
+ let a = null;
670
+ for (var y = 0; y < (t == null ? void 0 : t.length); y++) {
671
+ const d = t == null ? void 0 : t[y];
672
+ if (d.id && (a = E.getOptions(d.widget, n, s, !(c != null && c.designState)), a))
673
+ break;
674
+ }
675
+ return a;
676
+ }, nn = (e, t, n, s) => {
677
+ var d;
678
+ const c = he("$..widgetList[?(@.id==='" + e + "')]^", $(n)), a = (d = c == null ? void 0 : c[0]) == null ? void 0 : d.find((S) => {
679
+ var v;
680
+ return ((v = S == null ? void 0 : S._source) == null ? void 0 : v.name) === t;
681
+ }), y = a == null ? void 0 : a.id;
682
+ return s == null ? void 0 : s(y);
683
+ };
684
+ function Wt() {
685
+ const e = () => {
686
+ let d = _($(oe(L.grid)));
687
+ return d = X(d), d;
688
+ }, t = () => {
689
+ let d = _($(oe(L.gridCol)));
690
+ return d = X(d), d;
691
+ }, n = (d) => {
692
+ let S = $(d);
693
+ return Ee(S);
694
+ };
695
+ return {
696
+ initGrid: e,
697
+ initCloneGrid: (d) => {
698
+ var v;
699
+ let S = e();
700
+ return (v = _(d).cols) == null || v.forEach((T) => {
701
+ let C = n(T);
702
+ _(S).cols.push(C);
703
+ }), S;
704
+ },
705
+ initGridCol: t,
706
+ initCloneGridCol: n,
707
+ // cloneGridCol,
708
+ deleteColOfGrid: (d, S) => (d && d.cols && d.cols.splice(S, 1), !0),
709
+ addNewColOfGrid: (d) => {
710
+ const S = d.cols;
711
+ let v = t();
712
+ if (S && S.length > 0) {
713
+ let T = 0;
714
+ S.forEach((C) => {
715
+ T += E.getOptions(C, "span") || 0;
716
+ }), T >= 24 || E.setOptions(v, "span", 24 - T > 12 ? 12 : 24 - T), d.cols.push(v);
717
+ } else
718
+ d.cols = [v];
719
+ return !0;
720
+ },
721
+ isGrid: (d) => (d == null ? void 0 : d.type) === L.grid
722
+ };
723
+ }
724
+ function _t() {
725
+ return {
726
+ initCloneContCell: (c) => {
727
+ let a = $(c);
728
+ return Ee(a);
729
+ },
730
+ initContCell: (c = le.main, a) => {
731
+ let y = new gt();
732
+ return ce(y, a), y.partName = new H(N.placer, c), y;
733
+ },
734
+ initCont: () => {
735
+ let c = $(oe(L.cont));
736
+ return c.id = c.type + ve(), E.setName(c, c.id), c;
737
+ },
738
+ isCont: (c) => (c == null ? void 0 : c.type) === L.cont
739
+ };
740
+ }
741
+ class Qe {
742
+ constructor() {
743
+ /**
744
+ * 全局组件大小
745
+ */
746
+ h(this, "size", ft.default);
747
+ /**
748
+ * 布局类型
749
+ */
750
+ h(this, "layoutType", ut.PC);
751
+ /**
752
+ * JSON版本号
753
+ */
754
+ h(this, "jsonVersion", ze.pageJsonVersion);
755
+ /**
756
+ * 自定义CSS样式
757
+ */
758
+ h(this, "customClass", new H(N.placer, []));
759
+ /**
760
+ * 组件容器css样式
761
+ */
762
+ h(this, "componentWrapperClass", new H(N.placer, []));
763
+ /**
764
+ * 页面创建时事件
765
+ */
766
+ h(this, "pageCreated", new H(N.event, void 0, new j()));
767
+ /**
768
+ * 页面挂载完成后事件
769
+ */
770
+ h(this, "pageMounted", new H(N.event, void 0, new j()));
771
+ /**
772
+ * 自定义CSS代码
773
+ */
774
+ h(this, "cssCode", new H(N.placer, void 0, new j()));
775
+ /**
776
+ * 全局函数
777
+ */
778
+ h(this, "functions", new H(N.placer, void 0, new j()));
779
+ /**
780
+ * 请求发送前的处理函数
781
+ */
782
+ h(this, "willFetch", new H(N.hook, void 0, new j()));
783
+ /**
784
+ * 请求返回时的数据适配
785
+ */
786
+ h(this, "fitFetch", new H(N.hook, void 0, new j()));
787
+ /**
788
+ * 请求错误处理函数
789
+ */
790
+ h(this, "errorFetch", new H(N.hook, void 0, new j()));
791
+ /**
792
+ * 请求完成时的回调函数
793
+ */
794
+ h(this, "didFetch", new H(N.hook, void 0, new j()));
795
+ /**
796
+ * 数据源
797
+ */
798
+ h(this, "schema", new H(N.dataObject, [{
799
+ protocal: Le.URI,
800
+ name: Ve.urlParams,
801
+ description: K.i18nt("designer.hint.varibaleURL"),
802
+ isReadonly: !0
803
+ }, {
804
+ protocal: Le.CONFIG,
805
+ name: Ve.compParams,
806
+ description: K.i18nt("designer.hint.varibaleConfig"),
807
+ isReadonly: !0
808
+ }]));
809
+ }
810
+ //字段扩展声明
811
+ }
812
+ class $t extends vt {
813
+ constructor() {
814
+ super(...arguments);
815
+ h(this, "protocal", Le.VALUE);
816
+ // id: string = '';
817
+ h(this, "name", "");
818
+ h(this, "description", "");
819
+ h(this, "isReadonly", !1);
820
+ }
821
+ }
822
+ class Gt extends $t {
823
+ constructor() {
824
+ super(...arguments);
825
+ /**
826
+ * URL
827
+ */
828
+ h(this, "url", "");
829
+ /**
830
+ * 数据
831
+ */
832
+ h(this, "data", "");
833
+ /**
834
+ * 加载方式
835
+ */
836
+ // loadType: LoadType = LoadType.auto;
837
+ /**
838
+ * URL参数
839
+ */
840
+ h(this, "params", []);
841
+ /**
842
+ * headers
843
+ */
844
+ h(this, "headers", []);
845
+ /**
846
+ * 允许的http请求内容的最大字节数
847
+ */
848
+ h(this, "maxBodyLength", 2e3);
849
+ /**
850
+ * 允许的HTTP响应内容的最大字节数
851
+ */
852
+ h(this, "maxContentLength", 2e3);
853
+ /**
854
+ * 指定请求超时的毫秒数。
855
+ * 如果请求时间超过 `timeout` 的值,则请求会被中断
856
+ */
857
+ h(this, "timeout", 0);
858
+ /**
859
+ * 方法
860
+ */
861
+ h(this, "method", pt.jsonp);
862
+ /**
863
+ * 响应数据编码
864
+ */
865
+ h(this, "responseEncoding", ht.UTF8);
866
+ /**
867
+ * 响应数据类型
868
+ */
869
+ h(this, "responseType", mt.json);
870
+ /**
871
+ * 跨域请求时是否需要使用凭证
872
+ */
873
+ h(this, "withCredentials", !1);
874
+ /**
875
+ * 判断是否执行远程的表达式或变量
876
+ */
877
+ h(this, "shouldFetch", "");
878
+ /**
879
+ * 请求发送前的处理函数
880
+ */
881
+ h(this, "willFetch", new H(N.hook, void 0, new j()));
882
+ /**
883
+ * 请求返回时的数据适配
884
+ */
885
+ h(this, "fitFetch", new H(N.hook, void 0, new j()));
886
+ /**
887
+ * 请求错误处理函数
888
+ */
889
+ h(this, "errorFetch", new H(N.hook, void 0, new j()));
890
+ /**
891
+ * 请求完成时的回调函数
892
+ */
893
+ h(this, "didFetch", new H(N.hook, void 0, new j()));
894
+ }
895
+ }
896
+ class sn extends Gt {
897
+ //#endregion
898
+ constructor(n) {
899
+ super();
900
+ //#region value
901
+ h(this, "initialData", null);
902
+ this.id = "source" + ve(), n && ce(this, n);
903
+ }
904
+ }
905
+ function ke(e, t) {
906
+ return {
907
+ widgetTree: Q(() => Ue(Je(e, t)))
908
+ };
909
+ }
910
+ function Ne(e, t) {
911
+ const n = Q(() => {
912
+ var d;
913
+ const y = Fe(e, t == null ? void 0 : t.id);
914
+ return (y == null ? void 0 : y.length) <= 0 && (t != null && t._source) ? Fe(e, (d = t == null ? void 0 : t._source) == null ? void 0 : d.id) : y;
915
+ }), s = Q(() => {
916
+ var y;
917
+ return (y = n.value) == null ? void 0 : y.map((d) => ({ id: d == null ? void 0 : d.id, selectable: d.selectable, label: E.getWidgetTypeName(_(d.type)) })).filter((d) => d.id !== (t == null ? void 0 : t.id));
918
+ }), { parentForm: c, parentFormId: a } = Xe(n.value);
919
+ return {
920
+ widgetTree: e,
921
+ parentForm: c,
922
+ parentFormId: a,
923
+ parentTree: s,
924
+ pathNodes: n
925
+ };
926
+ }
927
+ const Xe = (e) => {
928
+ const t = Q(() => {
929
+ var s;
930
+ return (s = e == null ? void 0 : e.find((c) => c.type === L.form)) == null ? void 0 : s.widget;
931
+ }), n = Q(() => {
932
+ var s;
933
+ return (s = t == null ? void 0 : t.value) == null ? void 0 : s.id;
934
+ });
935
+ return {
936
+ parentForm: t,
937
+ parentFormId: n
938
+ };
939
+ };
940
+ function on(e, t) {
941
+ const { widget: n } = e, { parentFormId: s } = Xe(t), c = Q(() => {
942
+ var T, C, F;
943
+ return _(ue((T = e.designer) == null ? void 0 : T.widgetList, t, V.size, !1, e) || ((F = (C = e == null ? void 0 : e.designer) == null ? void 0 : C.pageConfig) == null ? void 0 : F.size));
944
+ }), a = Q(() => {
945
+ var T;
946
+ return _(ue((T = e.designer) == null ? void 0 : T.widgetList, t, V.displayLayout, !1, e));
947
+ }), y = Q(() => {
948
+ var T;
949
+ return _(ue((T = e.designer) == null ? void 0 : T.widgetList, t, V.labelAlign, !1, e));
950
+ }), d = Q(() => {
951
+ var C;
952
+ const T = ue((C = e.designer) == null ? void 0 : C.widgetList, t, V.labelWidth, !1, e);
953
+ return _(T);
954
+ }), S = Q(() => {
955
+ var C;
956
+ const T = ue((C = e.designer) == null ? void 0 : C.widgetList, t, V.labelSuffix, !1, e);
957
+ return _(T);
958
+ }), v = Q(() => (n == null ? void 0 : n.formItemFlag) && !!s.value);
959
+ return {
960
+ displayLayout: a,
961
+ size: c,
962
+ labelWidth: d,
963
+ labelAlign: y,
964
+ labelSuffix: S,
965
+ formItemFlag: v
966
+ };
967
+ }
968
+ class ln {
969
+ constructor() {
970
+ /**
971
+ * 是否显示语言切换菜单
972
+ */
973
+ h(this, "languageMenu", !0);
974
+ /**
975
+ * 是否显示GitHub、文档等外部链接
976
+ */
977
+ h(this, "externalLink", !0);
978
+ /**
979
+ * 是否显示表单模板
980
+ */
981
+ h(this, "pageTemplates", !0);
982
+ /**
983
+ * 是否显示组件事件属性折叠面板
984
+ */
985
+ h(this, "eventCollapse", !0);
986
+ /**
987
+ * 禁止修改组件名称
988
+ */
989
+ h(this, "widgetNameReadonly", !1);
990
+ /**
991
+ * 是否显示清空设计器按钮
992
+ */
993
+ h(this, "clearDesignerButton", !0);
994
+ /**
995
+ * 是否显示预览表单按钮
996
+ */
997
+ h(this, "previewFormButton", !0);
998
+ /**
999
+ * 是否显示导入JSON按钮
1000
+ */
1001
+ h(this, "importJsonButton", !0);
1002
+ /**
1003
+ * 是否显示导出JSON器按钮
1004
+ */
1005
+ h(this, "exportJsonButton", !0);
1006
+ /**
1007
+ * 是否显示保存JSON按钮
1008
+ */
1009
+ h(this, "saveJsonButton", !0);
1010
+ /**
1011
+ * 是否显示保存SFC按钮
1012
+ */
1013
+ h(this, "saveSFCButton", !0);
1014
+ /**
1015
+ * 是否显示导出代码按钮
1016
+ */
1017
+ h(this, "exportCodeButton", !0);
1018
+ /**
1019
+ * 是否显示生成SFC按钮
1020
+ */
1021
+ h(this, "generateSFCButton", !0);
1022
+ /**
1023
+ * 设计器工具按钮栏最大宽度(单位像素)
1024
+ */
1025
+ // toolbarMaxWidth: Number = 450;
1026
+ /**
1027
+ * 设计器工具按钮栏最小宽度(单位像素)
1028
+ */
1029
+ // toolbarMinWidth: Number = 300;
1030
+ /**
1031
+ * 设计器预设CSS样式代码
1032
+ */
1033
+ h(this, "presetCssCode", "");
1034
+ /**
1035
+ * 设计器主题颜色
1036
+ */
1037
+ h(this, "themeColor", "");
1038
+ /**
1039
+ * 是否在设计器初始化时将表单内容重置为空
1040
+ */
1041
+ h(this, "resetPageJson", !1);
1042
+ /**
1043
+ * 是否为设计器定制缓存key
1044
+ */
1045
+ h(this, "radomKey", !1);
1046
+ /**
1047
+ * 常用工具
1048
+ */
1049
+ h(this, "toolButton", !0);
1050
+ }
1051
+ }
1052
+ class It {
1053
+ constructor() {
1054
+ /**
1055
+ * 当前版本号
1056
+ */
1057
+ h(this, "version", "");
1058
+ h(this, "key", "");
1059
+ /**
1060
+ * 当前应用实例
1061
+ */
1062
+ // vueInstance?: any;
1063
+ /**
1064
+ * 操作历史记录
1065
+ */
1066
+ h(this, "historyData");
1067
+ /**
1068
+ * 组件列表
1069
+ */
1070
+ h(this, "widgetList", []);
1071
+ /**
1072
+ * 表单配置项集
1073
+ */
1074
+ h(this, "pageConfig", new Qe());
1075
+ /**
1076
+ * 表单设计容器Ref
1077
+ * 主要用于调用设计组件的函数
1078
+ */
1079
+ h(this, "pageWidget");
1080
+ /**
1081
+ * 自定义样式列表
1082
+ */
1083
+ h(this, "cssClassList", []);
1084
+ /**
1085
+ * 选中组件唯一ID
1086
+ */
1087
+ //selectedId?: string | null | undefined;
1088
+ /**
1089
+ * 选中组件名称(唯一)
1090
+ */
1091
+ //selectedWidgetName?: string | null | undefined;
1092
+ /**
1093
+ * 选中组件
1094
+ */
1095
+ h(this, "selectedWidget");
1096
+ }
1097
+ }
1098
+ function rn(e = !1, t = !1) {
1099
+ yt();
1100
+ var n = new It();
1101
+ t && (n.key = ct().toString());
1102
+ const { initDesigner: s } = Ht(n);
1103
+ return s(e), n;
1104
+ }
1105
+ function Ht(e) {
1106
+ const t = Lt(e), { initHistoryData: n, emitHistoryChange: s, saveCurrentHistoryStep: c, saveFormContentToStorage: a } = t, { initGridCol: y, isGrid: d } = Wt(), { initContCell: S, isCont: v } = _t(), { initTabPane: T, getActiveTab: C, isTabs: F } = St(), { initTableRow: G, isTable: q } = Et(), Y = new Qe(), te = (i = !0) => {
1107
+ e.widgetList = [], e.pageConfig = $(Y), i || n();
1108
+ }, R = (i) => {
1109
+ var p, x;
1110
+ let l = e.widgetList.length === 0;
1111
+ (x = e.widgetList) == null || x.splice(0, (p = e.widgetList) == null ? void 0 : p.length), u(), e.pageConfig = Y, i || (l ? c("clearDesigner") : s("clearDesigner"));
1112
+ }, g = (i) => {
1113
+ e.pageWidget = i;
1114
+ }, B = (i) => xt(e.widgetList, i), U = (i, l) => {
1115
+ i && s(l);
1116
+ }, z = () => ({
1117
+ widgetList: [],
1118
+ pageConfig: ye(Y)
1119
+ }), M = () => ({
1120
+ widgetList: ye(e.widgetList),
1121
+ pageConfig: ye(e.pageConfig)
1122
+ }), Z = (i) => {
1123
+ let l = !1;
1124
+ return R(), i && i.widgetList && (e.widgetList = i.widgetList, l = !0), i && i.pageConfig && (ce(e.pageConfig, i.pageConfig), l = !0), l && m(ze.pageJsonImported, []), l;
1125
+ }, se = (i) => {
1126
+ e && (e.cssClassList = i);
1127
+ }, fe = () => e == null ? void 0 : e.cssClassList, me = (i) => {
1128
+ H.getValue(e.pageConfig.cssCode) === "" && i && H.setValue(e.pageConfig, "cssCode", i);
1129
+ }, o = (i = !1, l) => Je(e.widgetList, i, l), r = () => {
1130
+ var i = o(!1, (D) => !!(D != null && D.formItemFlag) && D.type !== L.multirow);
1131
+ const l = (D, W) => {
1132
+ [
1133
+ L.page,
1134
+ L.form,
1135
+ N.slot,
1136
+ L.grid,
1137
+ L.gridCol,
1138
+ L.table,
1139
+ L.tableRow,
1140
+ L.tableCol,
1141
+ L.card,
1142
+ L.wrapper,
1143
+ L.cont,
1144
+ L.contCell
1145
+ ].includes(W == null ? void 0 : W.type) || W != null && W.label && (D == null || D.push((W == null ? void 0 : W.label) || "")), W != null && W.parent && l(D, W.parent);
1146
+ };
1147
+ let p = [];
1148
+ const x = (D) => {
1149
+ D == null || D.forEach((W) => {
1150
+ if (W.matched) {
1151
+ const ie = [];
1152
+ l(ie, W), W.label = ie.reverse().join(".");
1153
+ const ae = Object.assign({}, W);
1154
+ delete ae.children, delete ae.parent, p.push(ae);
1155
+ }
1156
+ x(W.children);
1157
+ });
1158
+ };
1159
+ return x(i), p;
1160
+ }, m = (i, l) => {
1161
+ Me.$emit(i, l);
1162
+ }, b = (i, l) => {
1163
+ Me.$on(i, (p) => l(p));
1164
+ }, O = (i, l, p) => {
1165
+ i && (p && pe(i.options, "label") ? E.setOptions(i, "label", p) : p && pe(i.options, "content") && E.setOptions(i, "content", p));
1166
+ }, f = (i) => {
1167
+ if (!i) {
1168
+ u();
1169
+ return;
1170
+ }
1171
+ e.selectedWidget = i;
1172
+ }, u = () => {
1173
+ e.selectedWidget = void 0;
1174
+ }, P = (i, l, p) => {
1175
+ const x = i == null ? void 0 : i.newIndex, D = l == null ? void 0 : l[x];
1176
+ D && f(D), s(`drag add ${D == null ? void 0 : D.id}`), p == null || p(l);
1177
+ }, I = (i, l) => {
1178
+ }, k = (i, l, p) => {
1179
+ s("drag update"), p == null || p(l);
1180
+ }, ee = (i, l, p) => {
1181
+ s("drag remove"), p == null || p(l);
1182
+ }, J = (i) => !0, A = (i) => {
1183
+ var x, D;
1184
+ let l = _($(i));
1185
+ if (!l)
1186
+ return null;
1187
+ if (l.id = E.newId(l.type), Te(l, V.name) && E.setOptions(l, V.name, l.id), Te(l, V.label) && E.setOptions(l, V.label, E.getOptions(l, "label") || ((x = l.type) == null ? void 0 : x.toLowerCase())), Te(l, V.content) && E.setOptions(l, V.content, E.getOptions(l, "content") || ((D = l.type) == null ? void 0 : D.toLowerCase())), Te(l, V.optionItems) && (l == null ? void 0 : l.type) !== L.image) {
1188
+ var p = H.getValue(E.getOrgOption(l, V.optionItems));
1189
+ p == null || p.splice(1, 0, Tt(l.type)), H.setValue(l == null ? void 0 : l.options, V.optionItems, p);
1190
+ }
1191
+ return l;
1192
+ }, Ye = (i) => {
1193
+ var x, D, W;
1194
+ let l = A(i);
1195
+ if (!l)
1196
+ return;
1197
+ let p = e.widgetList;
1198
+ e.selectedWidget && (F(e.selectedWidget) ? p = (x = C(_(e.selectedWidget))) == null ? void 0 : x.widgetList : (D = _(e.selectedWidget)) != null && D.widgetList && (p = (W = e.selectedWidget) == null ? void 0 : W.widgetList)), p == null || p.push(l), f(l), s(`addFieldByDbClick ${i == null ? void 0 : i.id}`);
1199
+ }, Ze = (i, l) => {
1200
+ var p = de(i, l);
1201
+ if (i) {
1202
+ if (p === 0) {
1203
+ w.info(K.i18nt("designer.hint.moveUpFirstChildHint"));
1204
+ return;
1205
+ }
1206
+ let x = i[p];
1207
+ i.splice(p, 1), i.splice(p - 1, 0, x);
1208
+ }
1209
+ s(`moveUpWidget ${l == null ? void 0 : l.id}`);
1210
+ }, Ae = (i, l) => {
1211
+ var p = de(i, l);
1212
+ if (i) {
1213
+ if (p === i.length - 1) {
1214
+ w.info(K.i18nt("designer.hint.moveDownLastChildHint"));
1215
+ return;
1216
+ }
1217
+ let x = i[p];
1218
+ i.splice(p, 1), i.splice(p + 1, 0, x);
1219
+ }
1220
+ s(`moveDownWidget ${l == null ? void 0 : l.id}`);
1221
+ }, Se = (i) => {
1222
+ var x, D, W, ie, ae, We, _e, $e, Ge, Ie;
1223
+ let l = null, p = $(i);
1224
+ if (d(i))
1225
+ l = _(p), (x = l.cols) == null || x.push(y()), (D = l.cols) == null || D.push(y());
1226
+ else if (v(i)) {
1227
+ l = _(p);
1228
+ const Ce = S(le.container);
1229
+ (W = Ce.children) == null || W.push(S(le.header));
1230
+ let be = S(le.container, { direction: dt.horizontal });
1231
+ (ie = be.children) == null || ie.push(S(le.aside, { cellWidth: new H(N.placer, "20%") })), (ae = be.children) == null || ae.push(S(le.main, { cellWidth: new H(N.placer, "80%") })), (We = Ce.children) == null || We.push(be), (_e = Ce.children) == null || _e.push(S(le.footer)), ($e = l.cols) == null || $e.push(Ce);
1232
+ } else
1233
+ q(i) ? (l = _(p), (Ge = l.rows) == null || Ge.push(G())) : F(i) ? (l = _(p), (Ie = l.tabs) == null || Ie.push(T(void 0, !0))) : l = _(p);
1234
+ return l.id = E.newId(l.type), E.setName(l, l.id), l;
1235
+ }, we = (i) => {
1236
+ let l = Se(i);
1237
+ e.widgetList.push(l), f(l), s(`addContainerByDbClick ${i == null ? void 0 : i.id}`);
1238
+ }, Re = (i, l) => {
1239
+ var p = null;
1240
+ if (i) {
1241
+ p = Ee(i, { recordSource: !1 });
1242
+ var x = de(l, i);
1243
+ return l == null || l.splice(x + 1, 0, p), f(p), s(`cloneWidget ${i == null ? void 0 : i.id}`), p;
1244
+ }
1245
+ }, xe = (i, l, p) => {
1246
+ var x = de(p, i);
1247
+ if (p) {
1248
+ let D = null;
1249
+ p.length === 1 ? l && (D = l) : p.length === 1 + x ? D = p[x - 1] : D = p[x + 1], ot(() => {
1250
+ p.splice(x, 1), f(D), s(`removeWidget ${i == null ? void 0 : i.id}`);
1251
+ });
1252
+ }
1253
+ }, de = (i, l) => !l || !i ? -1 : i == null ? void 0 : i.indexOf(l), et = (i, l, p) => {
1254
+ e && (f(i), m(bt.fieldSelected, l));
1255
+ }, tt = (i) => {
1256
+ i ? f(i) : u();
1257
+ }, nt = (i) => {
1258
+ var D;
1259
+ const { widgetTree: l } = ke(e.widgetList, !0), { pathNodes: p } = Ne(l.value, i);
1260
+ return (D = p.value) == null ? void 0 : D[1].widget;
1261
+ }, Be = (i) => {
1262
+ var D, W, ie;
1263
+ const { widgetTree: l } = ke(e.widgetList, !0), { pathNodes: p } = Ne(l.value, i);
1264
+ return ((ie = (W = (D = p.value) == null ? void 0 : D[1]) == null ? void 0 : W.widget) == null ? void 0 : ie.widgetList) || e.widgetList;
1265
+ };
1266
+ return {
1267
+ ...t,
1268
+ initDesigner: te,
1269
+ clearDesigner: R,
1270
+ registerPageWidget: g,
1271
+ setSelected: f,
1272
+ clearSelected: u,
1273
+ updateSelectedWidgetLabel: O,
1274
+ copyNewFieldWidget: A,
1275
+ copyNewContainerWidget: Se,
1276
+ addContainerByDbClick: we,
1277
+ addFieldByDbClick: Ye,
1278
+ selectWidget: et,
1279
+ removeSelectedWidget: () => {
1280
+ const i = e.selectedWidget;
1281
+ if (!i)
1282
+ return !1;
1283
+ if (i != null && i.internal)
1284
+ return w.info(K.i18nt("designer.hint.currentNodeCannotBeSelected")), !1;
1285
+ const l = nt(i), p = Be(i);
1286
+ return xe(i, l, p), !0;
1287
+ },
1288
+ cloneSelectedWidget: () => {
1289
+ var i;
1290
+ if ((i = e.selectedWidget) != null && i.internal) {
1291
+ w.info(K.i18nt("designer.hint.currentNodeCannotBeSelected"));
1292
+ return;
1293
+ }
1294
+ return e.selectedWidget;
1295
+ },
1296
+ pasteSelectedWidget: (i) => {
1297
+ const l = e.selectedWidget, p = Be(l);
1298
+ return Re(i, p), !0;
1299
+ },
1300
+ selectParentWidget: tt,
1301
+ moveUpWidget: Ze,
1302
+ moveDownWidget: Ae,
1303
+ cloneWidget: Re,
1304
+ removeWidget: xe,
1305
+ checkWidgetMove: J,
1306
+ onWidgetDragAdd: P,
1307
+ onWidgetDragEnd: I,
1308
+ onWidgetDragUpdate: k,
1309
+ onWidgetDragRemove: ee,
1310
+ setCssClassList: se,
1311
+ getCssClassList: fe,
1312
+ getImportTemplate: z,
1313
+ emitEvent: m,
1314
+ handleEvent: b,
1315
+ loadPageJson: Z,
1316
+ getPageJson: M,
1317
+ loadPresetCssCode: me,
1318
+ getNodeTree: o,
1319
+ findTreeNode: je,
1320
+ findWidgetById: B,
1321
+ findToRootFromNode: Fe,
1322
+ buildFormItemList: r,
1323
+ emitHistoryChangeAfter: U,
1324
+ watchPropAndSaveHistory: (i) => {
1325
+ i && lt(() => {
1326
+ var l;
1327
+ return (l = e == null ? void 0 : e.selectedWidget) == null ? void 0 : l[i];
1328
+ }, (l) => {
1329
+ a();
1330
+ }, { deep: !0 });
1331
+ }
1332
+ };
1333
+ }
1334
+ export {
1335
+ ln as D,
1336
+ sn as S,
1337
+ St as a,
1338
+ nn as b,
1339
+ rn as c,
1340
+ At as d,
1341
+ Lt as e,
1342
+ Pe as f,
1343
+ tn as g,
1344
+ Te as h,
1345
+ Et as i,
1346
+ ke as j,
1347
+ Ne as k,
1348
+ on as l,
1349
+ Wt as m,
1350
+ en as n,
1351
+ wt as o,
1352
+ Bt as p,
1353
+ Ee as r,
1354
+ qe as t,
1355
+ Ht as u
1356
+ };