hldesigner 0.0.294 → 0.0.296

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 (215) hide show
  1. package/{_pdf-6d272319.js → _pdf-1b95fb5d.js} +13 -12
  2. package/{_share_image-707deb7b.js → _share_image-0ca0ad96.js} +2 -2
  3. package/{_share_size.vue_vue_type_script_setup_true_lang-198b6412.js → _share_size.vue_vue_type_script_setup_true_lang-25e38d41.js} +3 -3
  4. package/{_txt-14955ea9.js → _txt-170bb7d6.js} +8 -7
  5. package/{_unsupport-8b411d51.js → _unsupport-1309283f.js} +2 -2
  6. package/{affix-widget-b164f66f.js → affix-widget-a1e94961.js} +25 -24
  7. package/{alert-widget-a5b38a7f.js → alert-widget-e89962f3.js} +25 -24
  8. package/{anchor-widget-cb79aead.js → anchor-widget-2666cfcb.js} +22 -21
  9. package/{auto-complete-widget-2b5c9b04.js → auto-complete-widget-f19efc93.js} +25 -24
  10. package/avatar-widget-d1f582e7.js +49 -0
  11. package/{backtop-widget-54df7811.js → backtop-widget-800b83e2.js} +25 -24
  12. package/{badge-widget-b3e2b84e.js → badge-widget-3dfede47.js} +28 -27
  13. package/{barcode-widget-c9539f20.js → barcode-widget-1a9a8e4a.js} +23 -22
  14. package/{baseImp-7f0c4121.js → baseCommonField-607f46b1.js} +3567 -3903
  15. package/baseDataType-af503f9f.js +4 -0
  16. package/{breadcrumb-widget-966a5b98.js → breadcrumb-widget-72fc4371.js} +28 -27
  17. package/{button-widget-b29f2836.js → button-widget-3f9aebd6.js} +25 -24
  18. package/{cache-widget-8cdf6bb3.js → cache-widget-4446b135.js} +24 -23
  19. package/{card-widget-635325c2.js → card-widget-ce3e3897.js} +40 -39
  20. package/{carousel-widget-a7f37b1e.js → carousel-widget-cc0ed1e7.js} +23 -22
  21. package/{cascader-widget-8bb5f9db.js → cascader-widget-d1fc3ca0.js} +24 -23
  22. package/{chart-widget-fb1a670b.js → chart-widget-85cb8854.js} +48 -47
  23. package/{checkbox-widget-52c61029.js → checkbox-widget-db3afa9b.js} +31 -30
  24. package/codeType-e06c2bb4.js +4 -0
  25. package/{collapse-widget-a4d2945d.js → collapse-widget-8779845e.js} +29 -28
  26. package/{color-picker-widget-c7d26f46.js → color-picker-widget-f745a9cd.js} +24 -23
  27. package/common-editor-353641ab.js +30 -0
  28. package/{common-editor.vue_vue_type_script_setup_true_name_common-editor_lang-cd2508fd.js → common-editor.vue_vue_type_script_setup_true_name_common-editor_lang-8352d795.js} +2 -2
  29. package/{configItem-e39cd3bb.js → configItem-7889264b.js} +51 -50
  30. package/{cont-cell-widget-d4a89c8a.js → cont-cell-widget-d44e04d3.js} +1 -1
  31. package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-a72224f3.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-b5288fd3.js} +5 -5
  32. package/{cont-widget-c1e4feae.js → cont-widget-18cd3de8.js} +5 -5
  33. package/content-wrapper-36adcccb.js +19 -0
  34. package/{content-wrapper.vue_vue_type_script_setup_true_lang-74a9ce66.js → content-wrapper.vue_vue_type_script_setup_true_lang-88a3a92e.js} +7 -7
  35. package/countdown-widget-8716e1ba.js +61 -0
  36. package/{css-editor-1b37b14b.js → css-editor-53b67144.js} +80 -77
  37. package/{cssClass-de753b04.js → cssClass-1492660e.js} +2 -2
  38. package/cssIndex-4c169331.js +160 -0
  39. package/{customClass-editor-30844eef.js → customClass-editor-b910c95b.js} +22 -20
  40. package/{date-picker-range-widget-68c22748.js → date-picker-range-widget-2278cad8.js} +33 -32
  41. package/{date-picker-widget-4532430c.js → date-picker-widget-d361f6f3.js} +34 -33
  42. package/default-slot-widget-9312050d.js +33 -0
  43. package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-7903c803.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-7e67d1a4.js} +8 -8
  44. package/{descriptions-widget-ec41f960.js → descriptions-widget-e3e0d806.js} +23 -22
  45. package/designer.es.js +40 -40
  46. package/designer.style.css +2 -2
  47. package/designer.umd.js +327 -327
  48. package/{dialog-f67b0d8f.js → dialog-abd1055d.js} +2 -2
  49. package/dialog-widget-3e040d0f.js +41 -0
  50. package/divider-widget-4037971b.js +55 -0
  51. package/{drag-wrapper-04c5f241.js → drag-wrapper-a7ac11e7.js} +21 -21
  52. package/drawer-widget-3b223a9b.js +41 -0
  53. package/{dropdown-widget-9c81e135.js → dropdown-widget-7b107117.js} +23 -22
  54. package/{editor-wrapper-e4b65100.js → editor-wrapper-412921da.js} +99 -100
  55. package/{emitter-2e6d5612.js → emitter-752d9612.js} +1 -1
  56. package/{empty-widget-631442f5.js → empty-widget-03dc45a4.js} +25 -24
  57. package/{enum-type-e32f6d55.js → enum-669d691c.js} +344 -351
  58. package/{expression-5df4780f.js → expression-185552e1.js} +1562 -1386
  59. package/feedback-widget-c555aa07.js +34 -0
  60. package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-a365a6c2.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-664151d2.js} +6 -6
  61. package/{field-editor-98dd0a48.js → field-editor-01ad04f5.js} +22 -20
  62. package/{fieldobj-e04fe3b7.js → fieldobj-097a7c28.js} +7 -7
  63. package/{file-upload-widget-2a7f1bc3.js → file-upload-widget-132d811f.js} +29 -28
  64. package/{form-item-wrapper-fd97d391.js → form-item-wrapper-e095f173.js} +18 -17
  65. package/{form-widget-8289b9c1.js → form-widget-3e609e45.js} +45 -45
  66. package/{global-provide-inject-f7c2434f.js → globalProvideInject-f72c46e1.js} +1 -1
  67. package/{grid-col-widget-1bce9b22.js → grid-col-widget-07f9934e.js} +1 -1
  68. package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-91bc4542.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-e758879c.js} +5 -5
  69. package/{grid-widget-6d7246c3.js → grid-widget-fcdf2ff1.js} +5 -5
  70. package/{hcard-widget-64f8b247.js → hcard-widget-25a74183.js} +29 -28
  71. package/{html-text-widget-4783ce1e.js → html-text-widget-3f9a7049.js} +23 -22
  72. package/{icon-widget-6bdfa4d3.js → icon-widget-6428cc00.js} +26 -25
  73. package/iframe-widget-beb764f8.js +138 -0
  74. package/image-editor-82e3d316.js +55 -0
  75. package/{image-widget-8158689d.js → image-widget-e340b551.js} +22 -21
  76. package/{index-3e27dbc2.js → index-05b3b9ca.js} +32 -31
  77. package/{enum-type-eeb2dcbd.js → index-0fea97a8.js} +311 -111
  78. package/index-1071c4c7.js +83 -0
  79. package/{index-3dabfdc0.js → index-1a4f56dd.js} +63 -62
  80. package/index-436cc07a.js +265 -0
  81. package/{index-bcac9980.js → index-5728cd3c.js} +24 -23
  82. package/{index-e0d0fa2e.js → index-61d6c848.js} +1 -1
  83. package/{index-a26bf6de.js → index-68c3c04e.js} +219 -218
  84. package/{index-6f2e7cc2.js → index-69b23b46.js} +46 -45
  85. package/index-6fb8d595.js +80 -0
  86. package/{index-397967db.js → index-730f8497.js} +18 -16
  87. package/{index-6aa18a15.js → index-7766bc2f.js} +106 -106
  88. package/{index-0504bd3a.js → index-79a0163e.js} +12 -11
  89. package/{index-73758a90.js → index-8cfb6a9c.js} +1 -1
  90. package/{index-290ac037.js → index-9254507b.js} +27 -26
  91. package/{index-afd82448.js → index-9b56c1e6.js} +22 -20
  92. package/index-a1324d15.js +1350 -0
  93. package/{index-03c22bc5.js → index-a1c1b668.js} +45 -43
  94. package/{index-74ce0e3c.js → index-a565454e.js} +7 -7
  95. package/{index-1878e33f.js → index-ac413547.js} +46 -45
  96. package/index-b55657c0.js +351 -0
  97. package/{index-bca6580c.js → index-b82a7942.js} +32 -30
  98. package/index-cd781075.js +239 -0
  99. package/{index-b236e386.js → index-e207955c.js} +22 -21
  100. package/{index-cd822487.js → index-f5e76d4f.js} +13 -12
  101. package/{index-0409d23f.js → index-fcc4373b.js} +59 -59
  102. package/{input-number-widget-0f414e2c.js → input-number-widget-8cc70bb5.js} +27 -26
  103. package/{input-tag-widget-ad3eb896.js → input-tag-widget-f9b11b33.js} +25 -24
  104. package/{input-widget-469c5464.js → input-widget-f29e34fc.js} +25 -24
  105. package/{install-designer-13ab516e.js → install-designer-90c18b43.js} +1911 -1799
  106. package/{item-fb474622.js → item-20a8e244.js} +11 -10
  107. package/{itemDetail-f887bfaf.js → itemDetail-b08a6256.js} +17 -16
  108. package/{label-wrapper-acfc937a.js → label-wrapper-cc5b374b.js} +7 -6
  109. package/{label-wrapper.vue_vue_type_style_index_0_lang-e81392d8.js → label-wrapper.vue_vue_type_style_index_0_lang-270c6e23.js} +3 -3
  110. package/{link-widget-ad7f38d9.js → link-widget-46bb53ba.js} +25 -24
  111. package/{ltable-col-widget-dcd79046.js → ltable-col-widget-85158af5.js} +1 -1
  112. package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-d48e107e.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-d200a6a8.js} +9 -9
  113. package/{ltable-widget-80a365bc.js → ltable-widget-58330976.js} +11 -11
  114. package/{mask-bdcecc2d.js → mask-38100676.js} +1 -1
  115. package/{mention-widget-1d31da3b.js → mention-widget-6c235170.js} +25 -24
  116. package/{menu-widget-b47ae070.js → menu-widget-bd1fa158.js} +42 -41
  117. package/{model-widget-151836f0.js → model-widget-b4364744.js} +22 -21
  118. package/multirow-7d028dd0.js +182 -0
  119. package/{multirow-widget-b7c6bc11.js → multirow-widget-aeb02101.js} +87 -86
  120. package/{name-editor-9862d519.js → name-editor-3a3747f6.js} +52 -50
  121. package/nameCase-2134ee3e.js +33 -0
  122. package/object-751045cf.js +44 -0
  123. package/{optionItem-0afcf797.js → optionItem-8e1d0080.js} +809 -474
  124. package/package.json +1 -1
  125. package/{pagination-widget-4af8fa55.js → pagination-widget-bcbb95e0.js} +29 -28
  126. package/{picture-upload-widget-01d4477b.js → picture-upload-widget-1e2240d2.js} +47 -46
  127. package/{progress-widget-87bf7089.js → progress-widget-d3e2e116.js} +30 -29
  128. package/{property-base-9cb6f0af.js → property-base-eaed8cbe.js} +15 -16
  129. package/px-8e97b0e9.js +10 -0
  130. package/{qrcode-widget-e8a010b5.js → qrcode-widget-3ea4613b.js} +29 -28
  131. package/{radio-widget-d3d350f1.js → radio-widget-63540761.js} +33 -32
  132. package/{range-widget-0c8453ad.js → range-widget-e115e075.js} +30 -29
  133. package/{rate-widget-7c9f360b.js → rate-widget-2af29296.js} +24 -23
  134. package/{reg-editor.vue_vue_type_script_setup_true_lang-472581e2.js → reg-editor.vue_vue_type_script_setup_true_lang-420ed8ba.js} +4 -4
  135. package/{result-widget-c1ae2079.js → result-widget-e4217327.js} +23 -22
  136. package/{rich-editor-widget-31f4fd68.js → rich-editor-widget-e42dc6a2.js} +30 -29
  137. package/{router-widget-2889ec23.js → router-widget-7859980a.js} +22 -21
  138. package/{schemaData-7d14e9de.js → schemaData-602ab58d.js} +70 -69
  139. package/{segmented-widget-21f8a5c8.js → segmented-widget-4d90e11a.js} +40 -39
  140. package/{select-widget-f2e60d59.js → select-widget-268e6778.js} +24 -23
  141. package/{sfc-ca2f1573.js → sfc-c8bdbcc3.js} +32 -32
  142. package/{sfcview-79a20801.js → sfcview-7f974f98.js} +24 -23
  143. package/{share-editor-79be0fe3.js → share-editor-3caefde2.js} +55 -54
  144. package/{share-event-77717d69.js → share-event-0ac319f0.js} +2 -2
  145. package/share-field-f51ccb41.js +863 -0
  146. package/{share-file-bc8f56f8.js → share-file-ea94d84e.js} +20 -21
  147. package/size-editor-511e40a5.js +57 -0
  148. package/{skeleton-widget-c593fe7a.js → skeleton-widget-379c1a23.js} +25 -24
  149. package/{skeletonItem-widget-4550c4fe.js → skeletonItem-widget-70f95048.js} +22 -21
  150. package/{slider-widget-74a31030.js → slider-widget-e16ceea7.js} +24 -23
  151. package/{slot-2cdc3b54.js → slot-a11ba403.js} +5 -5
  152. package/{space-widget-ffc9eabc.js → space-widget-79e1ee5e.js} +40 -39
  153. package/{splitter-widget-fca00f2b.js → splitter-widget-6cde3a4c.js} +23 -22
  154. package/{static-text-widget-c682f482.js → static-text-widget-48a223a0.js} +23 -22
  155. package/{statistic-widget-1a8051c0.js → statistic-widget-04dbb84c.js} +25 -24
  156. package/{steps-widget-a445a201.js → steps-widget-ff9c8112.js} +22 -21
  157. package/{subMenu-widget-87d583a9.js → subMenu-widget-75b5b885.js} +10 -9
  158. package/{subMenu-widget.vue_vue_type_script_setup_true_lang-0255e3d5.js → subMenu-widget.vue_vue_type_script_setup_true_lang-dff950d1.js} +18 -18
  159. package/{switch-widget-de893bf9.js → switch-widget-b4dfb30f.js} +29 -28
  160. package/{tab-pane-widget-a7374d75.js → tab-pane-widget-12393cec.js} +1 -1
  161. package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-434f9cf7.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-07a3da71.js} +5 -5
  162. package/table-col-widget-565631d2.js +30 -0
  163. package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-8c799d0f.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-b83a4a39.js} +26 -27
  164. package/{table-widget-05b53a5f.js → table-widget-dba1ef32.js} +50 -48
  165. package/{tabs-widget-65ed6426.js → tabs-widget-8d497cb7.js} +8 -8
  166. package/{tag-widget-85bcce8f.js → tag-widget-7c023bb0.js} +25 -24
  167. package/{target-code-9a4699b1.js → target-code-24346bfc.js} +12 -11
  168. package/{target-datasource-94c64cbb.js → target-datasource-14df6047.js} +66 -65
  169. package/{target-link-88b4fd89.js → target-link-9472348b.js} +56 -55
  170. package/{target-saveForm-e1115d3f.js → target-saveForm-ddd0b24a.js} +71 -70
  171. package/{target-widget-5cf4403e.js → target-widget-426dbfe8.js} +2 -2
  172. package/{target-window-fb793bc8.js → target-window-bb03d3b5.js} +24 -23
  173. package/{text-widget-dd4f6b97.js → text-widget-e241f6be.js} +25 -24
  174. package/{textarea-widget-953b39e8.js → textarea-widget-5c288e26.js} +24 -23
  175. package/{time-picker-range-widget-30903551.js → time-picker-range-widget-4c18e0cf.js} +35 -35
  176. package/time-picker-widget-1e695b27.js +72 -0
  177. package/{time-select-widget-4dbe95ff.js → time-select-widget-055a902a.js} +24 -23
  178. package/{timeline-widget-476e9ea8.js → timeline-widget-881bf090.js} +23 -22
  179. package/{tmpl-widget-2cbd418b.js → tmpl-widget-f1bdf0a4.js} +36 -35
  180. package/{tooltip-widget-8b022a6d.js → tooltip-widget-32af6ae1.js} +23 -22
  181. package/{tour-widget-be2ef78d.js → tour-widget-18697c7d.js} +37 -36
  182. package/{transfer-widget-31ea801d.js → transfer-widget-04bb21a2.js} +25 -24
  183. package/{tree-select-widget-691c9cb6.js → tree-select-widget-4c63a180.js} +24 -23
  184. package/{tree-widget-15cddec7.js → tree-widget-9a8da624.js} +31 -30
  185. package/uuid-1013bfdd.js +16 -0
  186. package/{value-editor-676d7ca0.js → value-editor-ad4a9472.js} +29 -27
  187. package/{verifycode-widget-2cbb68e2.js → verifycode-widget-1e2f11f6.js} +49 -48
  188. package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-ddcbea59.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-b7eb5c4b.js} +30 -30
  189. package/{wrapper-widget-40c40291.js → wrapper-widget-03be4616.js} +7 -7
  190. package/avatar-widget-00d2f77a.js +0 -48
  191. package/common-editor-96af86ea.js +0 -28
  192. package/content-wrapper-feb05971.js +0 -18
  193. package/countdown-widget-87ab2577.js +0 -60
  194. package/cssIndex-77da0ec7.js +0 -185
  195. package/default-slot-widget-4be80302.js +0 -32
  196. package/dialog-widget-bae25ba7.js +0 -40
  197. package/divider-widget-643e5787.js +0 -54
  198. package/drawer-widget-73902c82.js +0 -40
  199. package/feedback-widget-90fe8e26.js +0 -33
  200. package/iframe-widget-c6d453cc.js +0 -137
  201. package/image-editor-1e8036ad.js +0 -53
  202. package/index-08436ce4.js +0 -1445
  203. package/index-1c33c886.js +0 -230
  204. package/index-54eed7c3.js +0 -334
  205. package/index-64486ab5.js +0 -43
  206. package/index-fa15e4c8.js +0 -240
  207. package/index-fc1c67a3.js +0 -46
  208. package/multirow-89ec2174.js +0 -183
  209. package/obj-cc64f79c.js +0 -230
  210. package/setView-de8aaf40.js +0 -84
  211. package/share-field-4f3d4a0b.js +0 -879
  212. package/size-editor-99257b84.js +0 -54
  213. package/table-col-widget-35d0c1ba.js +0 -29
  214. package/time-picker-widget-3398f837.js +0 -71
  215. package/uuid-2f7814e3.js +0 -203
package/index-08436ce4.js DELETED
@@ -1,1445 +0,0 @@
1
- var Lt = Object.defineProperty;
2
- var Et = (e, t, n) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var C = (e, t, n) => (Et(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { d as pe, h as W, o as xe, l as Te, i as at } from "./obj-cc64f79c.js";
5
- import { reactive as ct, computed as be, nextTick as Ft, watch as Pt } from "vue";
6
- import { e as _e, f as tt, c as x, a as K, j as We } from "./enum-type-eeb2dcbd.js";
7
- import { m as St, g as ke, n as Dt } from "./uuid-2f7814e3.js";
8
- import { e as E, C as U, f as Bt, h as he, i as Rt, L as $t, P as Ve, R as _t, j as Gt, k as Ht, l as Wt } from "./enum-type-e32f6d55.js";
9
- import { w as It, C as Vt, g as nt } from "./optionItem-0afcf797.js";
10
- import { B as $, h as Z, P as M, i as A, I as Mt } from "./baseImp-7f0c4121.js";
11
- import { b as N, r as st, o as xt, p as ft, d as it, a as kt } from "./expression-5df4780f.js";
12
- import { q as Pe } from "./index-e0d0fa2e.js";
13
- function Ut(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, l) {
23
- (e[n] || (e[n] = [])).push(l);
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, l) {
33
- e[n] && e[n].splice(e[n].indexOf(l) >>> 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, l) {
44
- (e[n] || []).map(function(c) {
45
- c(l);
46
- }), (e["*"] || []).map(function(c) {
47
- c(n, l);
48
- });
49
- }
50
- };
51
- }
52
- const Ie = new Ut(), lt = {
53
- $on: Ie.on,
54
- $off: Ie.off,
55
- $emit: Ie.emit
56
- };
57
- function qt(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 = ct((e == null ? void 0 : e.historyData) || t), l = `widget__list__backup__${e == null ? void 0 : e.key}`, c = `form__config__backup__${e == null ? void 0 : e.key}`, p = be({
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
- }), g = () => {
70
- const R = p == null ? void 0 : p.value;
71
- e.version = St(), e.widgetList = W(R == null ? void 0 : R.widgetList), e.pageConfig = W(R == null ? void 0 : R.pageConfig);
72
- }, v = (R) => {
73
- const m = p;
74
- m.value = W({
75
- detail: R,
76
- widgetList: e.widgetList,
77
- pageConfig: e.pageConfig
78
- });
79
- }, G = () => {
80
- le(), n.index = n.index + 1, v("initHistory");
81
- }, T = () => {
82
- e.historyData = t;
83
- }, F = (R) => {
84
- var m;
85
- n.index == n.maxStep - 1 ? (m = n.steps) == null || m.shift() : n.index = n.index + 1, O(R), n.index < n.steps.length - 1 && (n.steps = n.steps.slice(0, n.index + 1));
86
- }, O = (R) => {
87
- v(R), ee();
88
- }, D = () => {
89
- n.index !== 0 && n.index--, g();
90
- }, I = () => {
91
- var R;
92
- n.index !== ((R = n.steps) == null ? void 0 : R.length) - 1 && n.index++, g();
93
- }, Q = () => {
94
- var R;
95
- return n.index > 0 && ((R = n.steps) == null ? void 0 : R.length) > 0;
96
- }, ce = () => {
97
- var R;
98
- return n.index < ((R = n.steps) == null ? void 0 : R.length) - 1;
99
- }, ee = () => {
100
- _e.set(l, e.widgetList), _e.set(c, e.pageConfig);
101
- }, le = () => {
102
- let R = _e.get(l);
103
- R && pe(e.widgetList, tt(R));
104
- let m = _e.get(c);
105
- m && pe(e.pageConfig, tt(m));
106
- };
107
- return {
108
- clearHistoryData: T,
109
- initHistoryData: G,
110
- emitHistoryChange: F,
111
- saveCurrentHistoryStep: O,
112
- undoHistoryStep: D,
113
- redoHistoryStep: I,
114
- undoEnabled: Q,
115
- redoEnabled: ce,
116
- saveFormContentToStorage: ee,
117
- loadFormContentFromStorage: le
118
- };
119
- }
120
- const Jt = (e, t) => {
121
- var l;
122
- if (!e || !t)
123
- return !1;
124
- let n = ue(e == null ? void 0 : e.type);
125
- return !n || !(n != null && n.options) ? !1 : ((l = xe(n == null ? void 0 : n.options)) == null ? void 0 : l.indexOf(t)) > -1;
126
- }, ue = (e) => {
127
- var t;
128
- return (t = It.allWidgets) == null ? void 0 : t.find((n) => n.type === e);
129
- }, jt = (e) => {
130
- const t = e.id;
131
- if (!t)
132
- return null;
133
- const n = $.getName(e);
134
- return { id: t, name: n };
135
- }, w = (e, t, n) => {
136
- if (!e)
137
- return x(e);
138
- var l = e == null ? void 0 : e.id, c = e.type + ke(), p = c;
139
- n && (p = n(l, c));
140
- const g = jt(e);
141
- return zt(e, p, t), g && (t != null && t.recordSource) && pe(e, { _source: g }), x(e);
142
- }, zt = (e, t, n) => (Te(e, N.id) && (e.id = t), e.options = Kt(e.options, t, n), e), Kt = (e, t, n) => (Te(e, N.name) && (n == null ? void 0 : n.newName) != !1 && (e.name = st(t, "-", "")), Te(e, N.label) && !(e != null && e.label) && (n == null ? void 0 : n.newLabel) != !1 && (e.label = st(t, "-", "")), e), yn = (e) => {
143
- const t = "id@";
144
- return {
145
- idClass: `${t}${e == null ? void 0 : e.id}`,
146
- getIdByIdClass: (p) => p == null ? void 0 : p.substring(t.length),
147
- isIdClass: (p) => p == null ? void 0 : p.startsWith(t)
148
- };
149
- }, On = (e) => {
150
- var t = [];
151
- if (!e)
152
- return t;
153
- var n = Pe("$..widgetList[*]", e);
154
- return e.type == E.tabs ? (t = e.tabs, t = [...n, ...t]) : e.type == E.grid && (t = Pe("$..cols[*]", e), t = [...n, ...t]), t = [...n], t == null ? void 0 : t.filter((l) => !!(l != null && l.type));
155
- }, me = (e, t, n, l) => {
156
- e == null || e.forEach((c) => {
157
- c && (t == null || t.push(c), !(l != null && l(c)) && Qt(c, t, n, l));
158
- });
159
- }, Qt = (e, t, n, l) => {
160
- var c, p, g, v, G, T, F;
161
- if (e.type === E.tabs)
162
- (c = e.tabs) == null || c.forEach((O) => {
163
- t == null || t.push(O), me(O.widgetList, t, n, l);
164
- });
165
- else if (e.type === E.table)
166
- (p = e.rows) == null || p.forEach((O) => {
167
- var D;
168
- t == null || t.push(O), (D = O == null ? void 0 : O.cols) == null || D.forEach((I) => {
169
- t == null || t.push(I), me(I.widgetList, t, n, l);
170
- });
171
- });
172
- else if (e.type === E.grid)
173
- (g = e.cols) == null || g.forEach((O) => {
174
- t == null || t.push(O), me(O.widgetList, t, n, l);
175
- });
176
- else if (e.type === E.cont) {
177
- const O = (D) => {
178
- var I;
179
- me(D.widgetList, t, n, l), (I = D == null ? void 0 : D.children) == null || I.map((Q) => {
180
- O(Q);
181
- });
182
- };
183
- (v = e.cols) == null || v.forEach((D) => {
184
- O(D);
185
- });
186
- } else if (((G = e.widgetList) == null ? void 0 : G.length) > 0 && me(e.widgetList, t, n, l), !n) {
187
- const O = (F = (T = xe(e.options)) == null ? void 0 : T.filter((D) => {
188
- var I;
189
- return ((I = e.options[D]) == null ? void 0 : I.type) === U.slot;
190
- })) == null ? void 0 : F.map((D) => e.options[D]);
191
- O == null || O.forEach((D) => {
192
- me(D == null ? void 0 : D.widgetList, t, n, l);
193
- });
194
- }
195
- }, Ue = (e, t, n) => {
196
- let l = [];
197
- return pt(e, (p) => {
198
- l.push(p);
199
- }, t, n), l;
200
- }, pt = (e, t, n, l, c) => {
201
- if (!e)
202
- return;
203
- const p = [];
204
- me(e, p, l, c), p == null || p.forEach((g) => {
205
- n ? n(g) && t(g) : t(g);
206
- });
207
- }, Xt = (e, t) => {
208
- if (!e)
209
- return;
210
- const n = Ue(e, (l) => !!(l != null && l.formItemFlag), !0);
211
- return n == null || n.forEach((l) => t == null ? void 0 : t(l)), n;
212
- }, Yt = (e, t) => {
213
- if (!t || (e == null ? void 0 : e.length) <= 0)
214
- return;
215
- const n = Ue(e, (c) => (c == null ? void 0 : c.id) === t);
216
- return n == null ? void 0 : n[0];
217
- }, Ln = (e, t) => Ue(e, (n) => (n == null ? void 0 : n.type) === t), En = (e, t) => {
218
- var c;
219
- if (!e)
220
- return [];
221
- let n = [], l = (p) => {
222
- p && (n.find((g) => (g == null ? void 0 : g.name) === $.getName(p)) || n.push({
223
- type: p.type,
224
- name: $.getName(p),
225
- field: p
226
- }));
227
- };
228
- return t ? (c = Pe("$..*[?(@property === 'formItemFlag' && @ === true)]^", e)) == null || c.forEach((p) => {
229
- l(p);
230
- }) : Xt(e, l), n;
231
- }, ae = (e, t, n, l = !1, c = !1, p) => {
232
- var F, O, D, I, Q, ce, ee, le, R;
233
- if (!e)
234
- return;
235
- let g = {
236
- id: e.id,
237
- type: e.type,
238
- label: $.getOptions(e, "label") || $.getOptions(e, "name") || e.type,
239
- widget: l ? e : null,
240
- parent: t,
241
- children: [],
242
- selectable: !0,
243
- draggable: c,
244
- droppable: !1,
245
- matched: !p || (p == null ? void 0 : p(e))
246
- };
247
- if (Te(e, N.widgetList) && pe(g, {
248
- droppable: !0,
249
- addNode: (m, B = -1) => Ce(e, m, B),
250
- removeNode: (m, B = -1) => ge(e, B),
251
- moveNode: (m, B = -1, q = -1) => ve(e, B, q)
252
- }), n == null || n.push(g), e.category === void 0)
253
- return;
254
- if (g.children = [], e.type === E.grid)
255
- (F = e == null ? void 0 : e.cols) == null || F.map((m) => {
256
- var q, j;
257
- let B = {
258
- id: m.id,
259
- type: m.type,
260
- draggable: !0,
261
- droppable: !0,
262
- label: $.getOptions(m, "name") || m.id || m.type,
263
- children: [],
264
- parent: g,
265
- widget: l ? m : null,
266
- addNode: (_, H = -1) => Ce(m, _, H),
267
- removeNode: (_, H = -1) => ge(m, H),
268
- moveNode: (_, H = -1, J = -1) => ve(m, H, J)
269
- };
270
- (q = g.children) == null || q.push(B), (j = m.widgetList) == null || j.map((_) => {
271
- ae(_, B, B.children, l, !0, p);
272
- });
273
- });
274
- else if (e.type === E.table)
275
- (O = e == null ? void 0 : e.rows) == null || O.map((m) => {
276
- var q, j;
277
- let B = {
278
- id: m.id,
279
- type: E.tableRow,
280
- label: E.tableRow,
281
- selectable: !1,
282
- children: [],
283
- parent: g,
284
- widget: l ? m : null
285
- };
286
- (q = m == null ? void 0 : m.cols) == null || q.map((_) => {
287
- var oe;
288
- if (_.merged)
289
- return;
290
- let H = B.children, J = {
291
- id: _.id,
292
- type: E.tableCol,
293
- label: E.tableCol,
294
- draggable: !1,
295
- droppable: !0,
296
- children: [],
297
- parent: B,
298
- widget: l ? _ : null,
299
- addNode: (fe, te = -1) => Ce(_, fe, te),
300
- removeNode: (fe, te = -1) => ge(_, te),
301
- moveNode: (fe, te = -1, i = -1) => ve(_, te, i)
302
- };
303
- (oe = _.widgetList) == null || oe.map((fe) => {
304
- ae(fe, J, J.children, l, !0, p);
305
- }), H == null || H.push(J);
306
- }), (j = g.children) == null || j.push(B);
307
- });
308
- else if (e.type === E.tabs)
309
- (D = e == null ? void 0 : e.tabs) == null || D.map((m) => {
310
- var q, j;
311
- let B = {
312
- id: m.id,
313
- type: m.type,
314
- label: $.getOptions(m, "label") || m.type,
315
- selectable: !0,
316
- draggable: !1,
317
- droppable: !0,
318
- children: [],
319
- parent: g,
320
- widget: l ? m : null,
321
- addNode: (_, H = -1) => Ce(m, _, H),
322
- removeNode: (_, H = -1) => ge(m, H),
323
- moveNode: (_, H = -1, J = -1) => ve(m, H, J)
324
- };
325
- (q = g.children) == null || q.push(B), (j = m == null ? void 0 : m.widgetList) == null || j.map((_) => {
326
- ae(_, B, B.children, l, !0, p);
327
- });
328
- });
329
- else if (e.type === E.cont) {
330
- const m = (B) => {
331
- var q, j;
332
- (q = B.widgetList) == null || q.map((_) => {
333
- ae(_, g, g.children, l, !1, p);
334
- }), (j = B == null ? void 0 : B.children) == null || j.map((_) => m(_));
335
- };
336
- (I = e == null ? void 0 : e.cols) == null || I.map((B) => {
337
- m(B);
338
- });
339
- } else if ([E.eltable, E.collapse, E.carousel].includes(e.type)) {
340
- var v = Pe("$..widgetList[*]", (Q = e.options) == null ? void 0 : Q.optionItems.value);
341
- (v == null ? void 0 : v.length) > 0 && (v == null || v.map((m) => {
342
- ae(m, g, g.children, l, !1, p);
343
- }));
344
- } else
345
- e.category === Bt.container && ((ce = e == null ? void 0 : e.widgetList) == null ? void 0 : ce.length) > 0 && ((ee = e == null ? void 0 : e.widgetList) == null || ee.map((m) => {
346
- ae(m, g, g.children, l, !1, p);
347
- }));
348
- const G = $.getOptions(e, N.widgetList);
349
- G && (G == null || G.map((m) => {
350
- ae(m, g, g.children, l, !1, p);
351
- }));
352
- const T = (R = (le = xe(e.options)) == null ? void 0 : le.filter((m) => {
353
- var B;
354
- return ((B = e.options[m]) == null ? void 0 : B.type) === U.slot;
355
- })) == null ? void 0 : R.map((m) => e.options[m]);
356
- T == null || T.forEach((m) => {
357
- var B, q, j;
358
- if (((B = m == null ? void 0 : m.widgetList) == null ? void 0 : B.length) > 0) {
359
- let _ = {
360
- id: m.slotName + "_" + (e == null ? void 0 : e.id),
361
- type: m.type,
362
- label: m.slotName || m.type,
363
- children: [],
364
- parent: g,
365
- widget: l ? m : null,
366
- selectable: !1,
367
- draggable: !1,
368
- droppable: !0,
369
- addNode: (H, J = -1) => Ce(m, H, J),
370
- removeNode: (H, J = -1) => ge(m, J),
371
- moveNode: (H, J = -1, oe = -1) => ve(m, J, oe)
372
- };
373
- (q = g.children) == null || q.push(_), (j = m == null ? void 0 : m.widgetList) == null || j.map((H) => {
374
- ae(H, _, _.children, l, !0, p);
375
- });
376
- }
377
- });
378
- }, Ce = (e, t, n = -1) => {
379
- var l, c;
380
- return n < 0 || at(n) ? (l = e == null ? void 0 : e.widgetList) == null || l.push(t) : (c = e == null ? void 0 : e.widgetList) == null || c.splice(n, 0, t), !0;
381
- }, ge = (e, t = -1) => {
382
- var n;
383
- return at(t) || t < 0 ? !1 : ((n = e == null ? void 0 : e.widgetList) == null || n.splice(t, 1), !0);
384
- }, ve = (e, t = -1, n = -1) => {
385
- const l = e == null ? void 0 : e.widgetList, c = xt(l || [], t, n);
386
- return (c == null ? void 0 : c.length) != (l == null ? void 0 : l.length) ? !1 : (e.widgetList.splice(0, l == null ? void 0 : l.length), c == null || c.forEach((p) => {
387
- e == null || e.widgetList.push(p);
388
- }), !0);
389
- }, ut = (e, t = !1, n) => {
390
- const l = [];
391
- let c = {
392
- label: E.page,
393
- id: E.page,
394
- type: E.page,
395
- draggable: !1,
396
- droppable: !0,
397
- addNode(p, g) {
398
- return Ce({ widgetList: e }, p, g);
399
- },
400
- removeNode(p, g) {
401
- return ge({ widgetList: e }, g);
402
- },
403
- moveNode: (p, g = -1, v = -1) => ve({ widgetList: e }, g, v)
404
- };
405
- return e == null || e.forEach((p) => {
406
- ae(p, c, l, t, !0, n);
407
- }), pe(c, { children: l }), [c];
408
- }, ht = (e, t, n) => {
409
- !e || e.length <= 0 || e.forEach((l) => {
410
- l.id === t ? n == null || n(l) : ht(l == null ? void 0 : l.children, t, n);
411
- });
412
- }, Ge = (e, t) => {
413
- let n = null;
414
- return ht(e, t, (l) => {
415
- n = l;
416
- }), n;
417
- }, Me = (e, t) => {
418
- const n = Ge(e, t);
419
- let l = [];
420
- const c = (p) => {
421
- p && (l.push(p), p != null && p.parent && c(p == null ? void 0 : p.parent));
422
- };
423
- return c(n), l;
424
- }, Zt = (e, t, n) => {
425
- !e || e.length <= 0 || (t || (t = []), e.forEach((l) => {
426
- var c;
427
- n != null && n(l) && t.push(l), l != null && l.children && ((c = l == null ? void 0 : l.children) == null ? void 0 : c.length) > 0 && Zt(l == null ? void 0 : l.children, t, n);
428
- }));
429
- }, Se = (e, t, n, l) => {
430
- const c = W(e);
431
- return w(c, t, n), pt([c], (p) => {
432
- w(p, t, n);
433
- }, void 0, void 0, l), c;
434
- }, Fn = (e, t, n, l) => {
435
- var v;
436
- const c = Pe("$..widgetList[?(@.id==='" + e + "')]^", W(n)), p = (v = c == null ? void 0 : c[0]) == null ? void 0 : v.find((G) => {
437
- var T;
438
- return ((T = G == null ? void 0 : G._source) == null ? void 0 : T.name) === t;
439
- }), g = p == null ? void 0 : p.id;
440
- return l == null ? void 0 : l(g);
441
- };
442
- function Nt() {
443
- const e = (i) => $.getOptions(i, "rowspan") || 1, t = (i) => $.getOptions(i, "colspan") || 1, n = (i, a) => {
444
- $.setOptions(i, "rowspan", a);
445
- }, l = (i, a) => {
446
- $.setOptions(i, "colspan", a);
447
- }, c = (i, a, d) => {
448
- let b = W(i.rows[a]);
449
- return H(b), i.rows.splice(d, 0, b), !0;
450
- }, p = (i, a) => (i.rows.forEach((d) => {
451
- let b = J();
452
- d.cols.splice(a, 0, b);
453
- }), !0), g = (i) => {
454
- let a = i.rows.length;
455
- return c(i, a - 1, a), !0;
456
- }, v = (i) => {
457
- let a = i.rows[0].cols.length;
458
- return p(i, a), !0;
459
- }, G = (i, a, d, b, y) => {
460
- let f = y ? a : a + 1;
461
- if (!y) {
462
- let P = f, V = !1;
463
- for (; P < i.rows.length; )
464
- if (i.rows[P].cols[b].merged)
465
- P++;
466
- else {
467
- f = P, V = !0;
468
- break;
469
- }
470
- V && (f = i.rows.length);
471
- }
472
- c(i, d, f);
473
- let u = 0;
474
- for (; f < i.rows.length - 1 && u < i.rows[0].cols.length; ) {
475
- const P = i.rows[f + 1].cols[u];
476
- if (P.merged) {
477
- let k = i.rows, ne = {}, X = 0;
478
- for (let se = f; se >= 0; se--)
479
- if (!k[se].cols[u].merged && e(k[se].cols[u]) > 1) {
480
- X = se, ne = k[se].cols[u];
481
- break;
482
- }
483
- if (ne.options) {
484
- let se = e(ne) + 1;
485
- O(i.rows, X, u, t(ne), se), u += t(ne);
486
- } else
487
- u += 1;
488
- } else
489
- u += t(P);
490
- }
491
- return !0;
492
- }, T = (i, a, d, b) => {
493
- let y = b ? a : a + 1;
494
- if (!b) {
495
- let u = y, P = !1;
496
- for (; u < i.rows[d].cols.length; ) {
497
- if (i.rows[d].cols[u].merged)
498
- u++;
499
- else {
500
- y = u, P = !0;
501
- break;
502
- }
503
- P || (y = i.rows[d].cols.length);
504
- }
505
- }
506
- p(i, y);
507
- let f = 0;
508
- for (; y < i.rows[0].cols.length - 1 && f < i.rows.length; ) {
509
- const u = i.rows[f].cols[y + 1];
510
- if (u.merged) {
511
- let V = i.rows[f].cols, k = {}, ne = null;
512
- for (let X = y; X >= 0; X--)
513
- if (!V[X].merged && t(V[X]) > 1) {
514
- ne = X, k = V[X];
515
- break;
516
- }
517
- if (k.options) {
518
- let X = t(k) + 1;
519
- F(i.rows, f, ne, X, e(k)), f += e(k);
520
- } else
521
- f += 1;
522
- } else
523
- f += e(u);
524
- }
525
- return !0;
526
- }, F = (i, a, d, b, y) => {
527
- for (let f = a; f < a + y; f++)
528
- for (let u = d; u < d + b; u++) {
529
- if (f === a && u === d) {
530
- l(i[f].cols[u], b);
531
- continue;
532
- }
533
- i[f].cols[u].merged = !0, l(i[f].cols[u], b), i[f].cols[u].widgetList = [];
534
- }
535
- }, O = (i, a, d, b, y) => {
536
- for (let f = a; f < a + y; f++)
537
- for (let u = d; u < d + b; u++) {
538
- if (f === a && u === d) {
539
- n(i[f].cols[u], y);
540
- continue;
541
- }
542
- i[f].cols[u].merged = !0, n(i[f].cols[u], y), i[f].cols[u].widgetList = [];
543
- }
544
- }, D = (i, a, d, b, y) => {
545
- for (let f = a; f < a + y; f++)
546
- for (let u = d; u < d + b; u++)
547
- i[f].cols[u].merged = !1, n(i[f].cols[u], 1), l(i[f].cols[u], 1);
548
- }, I = (i, a, d, b, y) => {
549
- for (let f = a; f < a + y; f++)
550
- for (let u = d; u < d + b; u++)
551
- i[f].cols[u].merged = !1, n(i[f].cols[u], 1), l(i[f].cols[u], 1);
552
- }, Q = (i, a, d, b) => {
553
- let y = $.getOptions(i[d].cols[0], "rowspan"), f = !1;
554
- for (let P = 1; P < i[d].cols.length; P++)
555
- if (e(i[d].cols[P]) !== y) {
556
- f = !0;
557
- break;
558
- }
559
- if (f)
560
- return Z.info(K.i18nt("designer.hint.rowspanNotConsistentForMergeEntireRow")), !1;
561
- let u = a.filter((P) => !P.merged && !!P.widgetList && P.widgetList.length > 0);
562
- return u && u.length > 0 && u[0].id !== a[0].id && (!a[0].widgetList || a[0].widgetList.length <= 0) && (a[0].widgetList = W(u[0].widgetList)), F(i, d, 0, a.length, e(a[b])), !0;
563
- }, ce = (i, a, d, b, y) => {
564
- let f = b ? a : a + e(y), u = b ? a - 1 : a;
565
- if (b) {
566
- let V = u;
567
- for (; V >= 0; )
568
- if (i[V].cols[d].merged)
569
- V--;
570
- else {
571
- u = V;
572
- break;
573
- }
574
- }
575
- i[f].cols[d].widgetList && i[f].cols[d].widgetList.length > 0 && (!i[u].cols[d].widgetList || i[u].cols[d].widgetList.length === 0) && (i[u].cols[d].widgetList = W(i[f].cols[d].widgetList));
576
- let P = e(i[f].cols[d]) * 1 + e(i[u].cols[d]) * 1;
577
- return O(i, u, d, t(y), P), !0;
578
- }, ee = (i, a, d, b) => {
579
- let y = $.getOptions(i[0].cols[b], "colspan"), f = !1;
580
- for (let V = 1; V < i.length; V++)
581
- if (t(i[V].cols[b]) !== y) {
582
- f = !0;
583
- break;
584
- }
585
- if (f)
586
- return Z.info(K.i18nt("designer.hint.colspanNotConsistentForMergeEntireColumn")), !1;
587
- let u = [];
588
- i.forEach((V) => {
589
- let k = V.cols[b];
590
- !k.merged && k.widgetList && k.widgetList.length > 0 && u.push(k);
591
- });
592
- let P = i[0].cols[b];
593
- return u && u.length > 0 && u[0].id !== P.id && (!P.widgetList || P.widgetList.length <= 0) && (P.widgetList = W(u[0].widgetList)), O(i, 0, b, t(P), i.length), !0;
594
- }, le = (i, a, d, b, y, f) => {
595
- let u = y ? b : b + ($.getOptions(a[b], "colspan") || 1), P = y ? b - 1 : b;
596
- if (y) {
597
- let k = P;
598
- for (; k >= 0; )
599
- if (i[d].cols[k].merged)
600
- k--;
601
- else {
602
- P = k;
603
- break;
604
- }
605
- }
606
- a[u].widgetList && a[u].widgetList.length > 0 && (!a[P].widgetList || a[P].widgetList.length === 0) && (a[P].widgetList = W(a[u].widgetList));
607
- let V = t(a[u]) * 1 + t(a[P]) * 1;
608
- return F(i, d, P, V, e(f)), !0;
609
- }, R = (i, a, d, b, y) => (D(i, a, d, b, y), !0), m = (i, a, d, b, y) => (I(i, a, d, b, y), !0), B = (i, a) => {
610
- let d = !0;
611
- if (i.forEach((f) => {
612
- t(f.cols[0]) !== i[0].cols.length && (d = !1);
613
- }), d)
614
- return Z.info(K.i18nt("designer.hint.lastColCannotBeDeleted")), !1;
615
- let b = t(i[0].cols[a]), y = !1;
616
- for (let f = 1; f < i.length; f++)
617
- if (t(i[f].cols[a]) !== b) {
618
- y = !0;
619
- break;
620
- }
621
- return y ? (Z.info(K.i18nt("designer.hint.colspanNotConsistentForDeleteEntireColumn")), !1) : (i.forEach((f) => {
622
- f.cols.splice(a, b);
623
- }), !0);
624
- }, q = (i, a) => {
625
- let d = !0;
626
- if (i[0].cols.forEach((f) => {
627
- e(f) !== i.length && (d = !1);
628
- }), d)
629
- return Z.info(K.i18nt("designer.hint.lastRowCannotBeDeleted")), !1;
630
- let b = e(i[a].cols[0]), y = !1;
631
- for (let f = 1; f < i[a].cols.length; f++)
632
- if (e(i[a].cols[f]) !== b) {
633
- y = !0;
634
- break;
635
- }
636
- return y ? (Z.info(K.i18nt("designer.hint.rowspanNotConsistentForDeleteEntireRow")), !1) : (i.splice(a, b), !0);
637
- }, j = (i, a) => {
638
- var u;
639
- let d = e(i[a].cols[0]), b = !1;
640
- for (let P = 1; P < i[a].cols.length; P++)
641
- if (e(i[a].cols[P]) !== d) {
642
- b = !0;
643
- break;
644
- }
645
- if (b)
646
- return Z.info(K.i18nt("designer.hint.rowspanNotConsistentForDeleteEntireRow")), !1;
647
- let y = W(i[a]);
648
- var f = (u = y == null ? void 0 : y.cols) == null ? void 0 : u.map((P) => Se(P, { recordSource: !1 }));
649
- return y.cols = f, i.splice(a + 1, 0, y), !0;
650
- }, _ = (i, a) => {
651
- let d = t(i[0].cols[a]), b = !1;
652
- for (let y = 1; y < i.length; y++)
653
- if (t(i[y].cols[a]) !== d) {
654
- b = !0;
655
- break;
656
- }
657
- return b ? (Z.info(K.i18nt("designer.hint.colspanNotConsistentForDeleteEntireColumn")), !1) : (i.forEach((y) => {
658
- let f = W(y.cols[a]);
659
- f = Se(f, { recordSource: !1 }), y.cols.splice(a + 1, 0, f);
660
- }), !0);
661
- }, H = (i) => {
662
- let a = i || { cols: [] };
663
- return a = w({ ...a, type: E.tableRow, id: "" }), a.merged = !1, i ? a.cols.forEach((d) => {
664
- J(d);
665
- }) : a.cols.push(J()), a;
666
- }, J = (i) => {
667
- let a = i || W(ue(E.tableCol));
668
- return w(a), a.merged = !1, l(a, 1), n(a, 1), a.widgetList.length = 0, a;
669
- }, oe = (i) => {
670
- let a = i || W(ue(E.table));
671
- return w(a), a;
672
- };
673
- return {
674
- appendTableRow: g,
675
- appendTableCol: v,
676
- insertTableRow: G,
677
- insertTableCol: T,
678
- mergeTableWholeRow: Q,
679
- mergeTableRow: ce,
680
- mergeTableCol: le,
681
- mergeTableWholeCol: ee,
682
- undoMergeTableCol: R,
683
- undoMergeTableRow: m,
684
- deleteTableWholeCol: B,
685
- deleteTableWholeRow: q,
686
- copyTableWholeRow: j,
687
- copyTableWholeCol: _,
688
- initTableRow: H,
689
- initTable: oe,
690
- initCloneTable: (i) => {
691
- let a = oe();
692
- return x(i).rows.forEach((d) => {
693
- let b = x(W(d));
694
- w(b), b.cols.forEach((y) => {
695
- w(y), y.widgetList = [];
696
- }), x(a).rows.push(b);
697
- }), a;
698
- },
699
- isTable: (i) => (i == null ? void 0 : i.type) === E.table
700
- };
701
- }
702
- function At() {
703
- const e = () => {
704
- let T = x(W(ue(E.tabs)));
705
- return T = w(T), T;
706
- }, t = (T, F) => {
707
- let O = x(W(ue(E.tabPane)));
708
- var D = w(O);
709
- return T && $.setOptions(D, N.label, T), F !== void 0 && $.setOptions(D, N.isdefault, F), D;
710
- }, n = (T) => {
711
- var O;
712
- let F = e();
713
- return (O = x(T).tabs) == null || O.forEach((D) => {
714
- var Q;
715
- let I = l(D);
716
- (Q = x(F).tabs) == null || Q.push(I);
717
- }), F;
718
- }, l = (T) => {
719
- var F = W(T);
720
- return w(F), $.setOptions(F, N.isdefault, !1), F.widgetList = [], F;
721
- };
722
- return {
723
- initTab: e,
724
- initCloneTab: n,
725
- initTabPane: t,
726
- initCloneTabPane: l,
727
- addTabPaneOfTabs: (T, F) => {
728
- let O = T == null ? void 0 : T.tabs;
729
- return O || (O = []), F = F || t(), F && O.push(F), !0;
730
- },
731
- deleteTabPaneOfTabs: (T, F) => {
732
- var O;
733
- if (((O = T.tabs) == null ? void 0 : O.length) === 1) {
734
- Z.info(K.i18nt("designer.hint.lastPaneCannotBeDeleted"));
735
- return;
736
- }
737
- return T.tabs.splice(F, 1), !0;
738
- },
739
- // cloneTabPane,
740
- findTabPaneOfTabs: (T, F) => {
741
- var O;
742
- return (O = T.tabs) == null ? void 0 : O.findIndex((D) => $.getName(D) === F);
743
- },
744
- getActiveTab: (T) => {
745
- var O, D;
746
- let F = (O = T == null ? void 0 : T.tabs) == null ? void 0 : O[0];
747
- return (D = T == null ? void 0 : T.tabs) == null || D.forEach((I) => {
748
- $.getOptions(I, N.isdefault) && (F = I);
749
- }), F;
750
- },
751
- isTabs: (T) => (T == null ? void 0 : T.type) === E.tabs
752
- };
753
- }
754
- function wt() {
755
- const e = () => {
756
- let v = x(W(ue(E.grid)));
757
- return v = w(v), v;
758
- }, t = () => {
759
- let v = x(W(ue(E.gridCol)));
760
- return v = w(v), v;
761
- }, n = (v) => {
762
- let G = W(v);
763
- return Se(G);
764
- };
765
- return {
766
- initGrid: e,
767
- initCloneGrid: (v) => {
768
- var T;
769
- let G = e();
770
- return (T = x(v).cols) == null || T.forEach((F) => {
771
- let O = n(F);
772
- x(G).cols.push(O);
773
- }), G;
774
- },
775
- initGridCol: t,
776
- initCloneGridCol: n,
777
- // cloneGridCol,
778
- deleteColOfGrid: (v, G) => (v && v.cols && v.cols.splice(G, 1), !0),
779
- addNewColOfGrid: (v) => {
780
- const G = v.cols;
781
- let T = t();
782
- if (G && G.length > 0) {
783
- let F = 0;
784
- G.forEach((O) => {
785
- F += $.getOptions(O, "span") || 0;
786
- }), F >= 24 || $.setOptions(T, "span", 24 - F > 12 ? 12 : 24 - F), v.cols.push(T);
787
- } else
788
- v.cols = [T];
789
- return !0;
790
- },
791
- isGrid: (v) => (v == null ? void 0 : v.type) === E.grid
792
- };
793
- }
794
- function en() {
795
- return {
796
- initCloneContCell: (c) => {
797
- let p = W(c);
798
- return Se(p);
799
- },
800
- initContCell: (c = he.main, p) => {
801
- let g = new Vt();
802
- return pe(g, p), g.partName = new M(U.placer, c), g;
803
- },
804
- initCont: () => {
805
- let c = W(ue(E.cont));
806
- return c.id = c.type + ke(), $.setName(c, c.id), c;
807
- },
808
- isCont: (c) => (c == null ? void 0 : c.type) === E.cont
809
- };
810
- }
811
- class mt {
812
- constructor() {
813
- /**
814
- * 全局组件大小
815
- */
816
- C(this, "size", Rt.default);
817
- /**
818
- * 布局类型
819
- */
820
- C(this, "layoutType", $t.PC);
821
- /**
822
- * JSON版本号
823
- */
824
- C(this, "jsonVersion", ft.pageJsonVersion);
825
- /**
826
- * 自定义CSS样式
827
- */
828
- C(this, "customClass", new M(U.placer, []));
829
- /**
830
- * 组件容器css样式
831
- */
832
- C(this, "componentWrapperClass", new M(U.placer, []));
833
- /**
834
- * 是否正在加载
835
- */
836
- C(this, "showLoading", !1);
837
- /**
838
- * 加载提示
839
- */
840
- C(this, "loadingText", "");
841
- /**
842
- * 页面创建时事件
843
- */
844
- C(this, "pageCreated", new M(U.event, void 0, new A()));
845
- /**
846
- * 页面挂载完成后事件
847
- */
848
- C(this, "pageMounted", new M(U.event, void 0, new A()));
849
- /**
850
- * 自定义CSS代码
851
- */
852
- C(this, "cssCode", new M(U.placer, void 0, new A()));
853
- /**
854
- * 全局函数
855
- */
856
- C(this, "functions", new M(U.placer, void 0, new A()));
857
- /**
858
- * 请求发送前的处理函数
859
- */
860
- C(this, "willFetch", new M(U.hook, void 0, new A()));
861
- /**
862
- * 请求返回时的数据适配
863
- */
864
- C(this, "fitFetch", new M(U.hook, void 0, new A()));
865
- /**
866
- * 请求错误处理函数
867
- */
868
- C(this, "errorFetch", new M(U.hook, void 0, new A()));
869
- /**
870
- * 请求完成时的回调函数
871
- */
872
- C(this, "didFetch", new M(U.hook, void 0, new A()));
873
- /**
874
- * 数据源
875
- */
876
- C(this, "schema", new M(U.dataObject, [{
877
- protocal: Ve.URI,
878
- name: it.urlParams,
879
- description: K.i18nt("designer.hint.varibaleURL"),
880
- isReadonly: !0
881
- }, {
882
- protocal: Ve.CONFIG,
883
- name: it.compParams,
884
- description: K.i18nt("designer.hint.varibaleConfig"),
885
- isReadonly: !0
886
- }]));
887
- }
888
- //字段扩展声明
889
- }
890
- class tn extends Mt {
891
- constructor() {
892
- super(...arguments);
893
- C(this, "protocal", Ve.VALUE);
894
- // id: string = '';
895
- C(this, "name", "");
896
- C(this, "description", "");
897
- C(this, "isReadonly", !1);
898
- }
899
- }
900
- class nn extends tn {
901
- constructor() {
902
- super(...arguments);
903
- /**
904
- * URL
905
- */
906
- C(this, "url", "");
907
- /**
908
- * 数据
909
- */
910
- C(this, "data", "");
911
- /**
912
- * 加载方式
913
- */
914
- // loadType: LoadType = LoadType.auto;
915
- /**
916
- * URL参数
917
- */
918
- C(this, "params", []);
919
- /**
920
- * headers
921
- */
922
- C(this, "headers", []);
923
- /**
924
- * 允许的http请求内容的最大字节数
925
- */
926
- C(this, "maxBodyLength", 2e3);
927
- /**
928
- * 允许的HTTP响应内容的最大字节数
929
- */
930
- C(this, "maxContentLength", 2e3);
931
- /**
932
- * 指定请求超时的毫秒数。
933
- * 如果请求时间超过 `timeout` 的值,则请求会被中断
934
- */
935
- C(this, "timeout", 0);
936
- /**
937
- * 方法
938
- */
939
- C(this, "method", _t.jsonp);
940
- /**
941
- * 响应数据编码
942
- */
943
- C(this, "responseEncoding", Gt.UTF8);
944
- /**
945
- * 响应数据类型
946
- */
947
- C(this, "responseType", Ht.json);
948
- /**
949
- * 跨域请求时是否需要使用凭证
950
- */
951
- C(this, "withCredentials", !1);
952
- /**
953
- * 判断是否执行远程的表达式或变量
954
- */
955
- C(this, "shouldFetch", "");
956
- /**
957
- * 请求发送前的处理函数
958
- */
959
- C(this, "willFetch", new M(U.hook, void 0, new A()));
960
- /**
961
- * 请求返回时的数据适配
962
- */
963
- C(this, "fitFetch", new M(U.hook, void 0, new A()));
964
- /**
965
- * 请求错误处理函数
966
- */
967
- C(this, "errorFetch", new M(U.hook, void 0, new A()));
968
- /**
969
- * 请求完成时的回调函数
970
- */
971
- C(this, "didFetch", new M(U.hook, void 0, new A()));
972
- }
973
- }
974
- class Pn extends nn {
975
- //#endregion
976
- constructor(n) {
977
- super();
978
- //#region value
979
- C(this, "initialData", null);
980
- this.id = "source" + ke(), n && pe(this, n);
981
- }
982
- }
983
- function ot(e, t) {
984
- return {
985
- widgetTree: be(() => ct(ut(e, t)))
986
- };
987
- }
988
- function rt(e, t) {
989
- const n = be(() => {
990
- var v;
991
- const g = Me(e, t == null ? void 0 : t.id);
992
- return (g == null ? void 0 : g.length) <= 0 && (t != null && t._source) ? Me(e, (v = t == null ? void 0 : t._source) == null ? void 0 : v.id) : g;
993
- }), l = be(() => {
994
- var g;
995
- return (g = n.value) == null ? void 0 : g.map((v) => ({ id: v == null ? void 0 : v.id, selectable: v.selectable, label: $.getWidgetTypeName(x(v.type)) })).filter((v) => v.id !== (t == null ? void 0 : t.id));
996
- }), { parentForm: c, parentFormId: p } = sn(n.value);
997
- return {
998
- widgetTree: e,
999
- parentForm: c,
1000
- parentFormId: p,
1001
- parentTree: l,
1002
- pathNodes: n
1003
- };
1004
- }
1005
- const sn = (e) => {
1006
- const t = be(() => {
1007
- var l;
1008
- return (l = e == null ? void 0 : e.find((c) => c.type === E.form)) == null ? void 0 : l.widget;
1009
- }), n = be(() => {
1010
- var l;
1011
- return (l = t == null ? void 0 : t.value) == null ? void 0 : l.id;
1012
- });
1013
- return {
1014
- parentForm: t,
1015
- parentFormId: n
1016
- };
1017
- };
1018
- class Sn {
1019
- constructor() {
1020
- /**
1021
- * 是否显示语言切换菜单
1022
- */
1023
- C(this, "languageMenu", !0);
1024
- /**
1025
- * 是否显示GitHub、文档等外部链接
1026
- */
1027
- C(this, "externalLink", !0);
1028
- /**
1029
- * 是否显示表单模板
1030
- */
1031
- C(this, "pageTemplates", !0);
1032
- /**
1033
- * 是否显示组件事件属性折叠面板
1034
- */
1035
- C(this, "eventCollapse", !0);
1036
- /**
1037
- * 禁止修改组件名称
1038
- */
1039
- C(this, "widgetNameReadonly", !1);
1040
- /**
1041
- * 是否显示清空设计器按钮
1042
- */
1043
- C(this, "clearDesignerButton", !0);
1044
- /**
1045
- * 是否显示预览表单按钮
1046
- */
1047
- C(this, "previewFormButton", !0);
1048
- /**
1049
- * 是否显示导入JSON按钮
1050
- */
1051
- C(this, "importJsonButton", !0);
1052
- /**
1053
- * 是否显示导出JSON器按钮
1054
- */
1055
- C(this, "exportJsonButton", !0);
1056
- /**
1057
- * 是否显示保存JSON按钮
1058
- */
1059
- C(this, "saveJsonButton", !0);
1060
- /**
1061
- * 是否显示保存SFC按钮
1062
- */
1063
- C(this, "saveSFCButton", !0);
1064
- /**
1065
- * 是否显示导出代码按钮
1066
- */
1067
- C(this, "exportCodeButton", !0);
1068
- /**
1069
- * 是否显示生成SFC按钮
1070
- */
1071
- C(this, "generateSFCButton", !0);
1072
- /**
1073
- * 设计器工具按钮栏最大宽度(单位像素)
1074
- */
1075
- // toolbarMaxWidth: Number = 450;
1076
- /**
1077
- * 设计器工具按钮栏最小宽度(单位像素)
1078
- */
1079
- // toolbarMinWidth: Number = 300;
1080
- /**
1081
- * 设计器预设CSS样式代码
1082
- */
1083
- C(this, "presetCssCode", "");
1084
- /**
1085
- * 设计器主题颜色
1086
- */
1087
- C(this, "themeColor", "");
1088
- /**
1089
- * 是否在设计器初始化时将表单内容重置为空
1090
- */
1091
- C(this, "resetPageJson", !1);
1092
- /**
1093
- * 是否为设计器定制缓存key
1094
- */
1095
- C(this, "radomKey", !1);
1096
- /**
1097
- * 常用工具
1098
- */
1099
- C(this, "toolButton", !0);
1100
- }
1101
- }
1102
- class ln {
1103
- constructor() {
1104
- /**
1105
- * 当前版本号
1106
- */
1107
- C(this, "version", "");
1108
- C(this, "key", "");
1109
- /**
1110
- * 当前应用实例
1111
- */
1112
- // vueInstance?: any;
1113
- /**
1114
- * 操作历史记录
1115
- */
1116
- C(this, "historyData");
1117
- /**
1118
- * 组件列表
1119
- */
1120
- C(this, "widgetList", []);
1121
- /**
1122
- * 表单配置项集
1123
- */
1124
- C(this, "pageConfig", new mt());
1125
- /**
1126
- * 表单设计容器Ref
1127
- * 主要用于调用设计组件的函数
1128
- */
1129
- C(this, "pageWidget");
1130
- /**
1131
- * 自定义样式列表
1132
- */
1133
- C(this, "cssClassList", []);
1134
- /**
1135
- * 选中组件唯一ID
1136
- */
1137
- //selectedId?: string | null | undefined;
1138
- /**
1139
- * 选中组件名称(唯一)
1140
- */
1141
- //selectedWidgetName?: string | null | undefined;
1142
- /**
1143
- * 选中组件
1144
- */
1145
- C(this, "selectedWidget");
1146
- }
1147
- }
1148
- function Dn(e, t = !1, n = !1) {
1149
- const l = !e;
1150
- var c = l ? new ln() : e;
1151
- if (n && (c.key = Dt().toString()), l) {
1152
- const { initDesigner: p } = on(c);
1153
- p(t);
1154
- }
1155
- return c;
1156
- }
1157
- function on(e) {
1158
- const t = qt(e), { initHistoryData: n, clearHistoryData: l, emitHistoryChange: c, saveCurrentHistoryStep: p, saveFormContentToStorage: g } = t, { initGridCol: v, isGrid: G } = wt(), { initContCell: T, isCont: F } = en(), { initTabPane: O, getActiveTab: D, isTabs: I } = At(), { initTableRow: Q, isTable: ce } = Nt(), ee = new mt(), le = (s = !0) => {
1159
- e.widgetList = [], e.pageConfig = W(ee), s || n();
1160
- }, R = (s) => {
1161
- var o, S;
1162
- let r = e.widgetList.length === 0;
1163
- (S = e.widgetList) == null || S.splice(0, (o = e.widgetList) == null ? void 0 : o.length), e.pageConfig = ee, u(), l(), s || (r ? p("clearDesigner") : c("clearDesigner"));
1164
- }, m = (s) => {
1165
- e.pageWidget = s;
1166
- }, B = (s) => Yt(e.widgetList, s), q = (s, r) => {
1167
- s && c(r);
1168
- }, j = () => ({
1169
- widgetList: [],
1170
- pageConfig: We(ee)
1171
- }), _ = () => ({
1172
- widgetList: We(e.widgetList),
1173
- pageConfig: We(e.pageConfig)
1174
- }), H = (s) => {
1175
- let r = !1;
1176
- return R(), s && s.widgetList && (e.widgetList = s.widgetList, r = !0), s && s.pageConfig && (pe(e.pageConfig, s.pageConfig), r = !0), r && d(ft.pageJsonImported, []), r;
1177
- }, J = (s) => {
1178
- e && (e.cssClassList = s);
1179
- }, oe = () => e == null ? void 0 : e.cssClassList, fe = (s) => {
1180
- M.getValue(e.pageConfig.cssCode) === "" && s && M.setValue(e.pageConfig, "cssCode", s);
1181
- }, te = (s = !1, r) => ut(e.widgetList, s, r), i = () => {
1182
- var s = te(!1, (h) => !!(h != null && h.formItemFlag));
1183
- const r = (h, L) => {
1184
- [
1185
- E.page,
1186
- E.form,
1187
- U.slot,
1188
- E.grid,
1189
- E.gridCol,
1190
- E.table,
1191
- E.tableRow,
1192
- E.tableCol,
1193
- E.card,
1194
- E.wrapper,
1195
- E.cont,
1196
- E.contCell
1197
- ].includes(L == null ? void 0 : L.type) || L != null && L.label && (h == null || h.push((L == null ? void 0 : L.label) || "")), L != null && L.parent && r(h, L.parent);
1198
- };
1199
- let o = [];
1200
- const S = (h) => {
1201
- h == null || h.forEach((L) => {
1202
- if (L.matched) {
1203
- const z = [];
1204
- r(z, L);
1205
- const ie = Object.assign({}, L);
1206
- ie.label = `${z.reverse().join(".")}`, delete ie.children, delete ie.parent, o.push(ie);
1207
- }
1208
- S(L.children);
1209
- });
1210
- };
1211
- return S(s), o;
1212
- }, a = (s, r) => {
1213
- var ie, ye, Oe, Le, Ee, Fe, re, de, Xe, Ye, Ze, Be, Ne, Ae, we, Re, et;
1214
- const o = B(s == null ? void 0 : s.id);
1215
- if (!o)
1216
- return;
1217
- const S = te(), h = Ge(S, s.id), L = Ge(S, r.id);
1218
- if (((ie = h == null ? void 0 : h.parent) == null ? void 0 : ie.id) === ((ye = L == null ? void 0 : L.parent) == null ? void 0 : ye.id)) {
1219
- const $e = (Le = (Oe = h == null ? void 0 : h.parent) == null ? void 0 : Oe.children) == null ? void 0 : Le.findIndex((Y) => (Y == null ? void 0 : Y.id) === (h == null ? void 0 : h.id)), Ot = (Fe = (Ee = h == null ? void 0 : h.parent) == null ? void 0 : Ee.children) == null ? void 0 : Fe.findIndex((Y) => (Y == null ? void 0 : Y.id) === (L == null ? void 0 : L.id));
1220
- var z = (de = (re = h == null ? void 0 : h.parent) == null ? void 0 : re.moveNode) == null ? void 0 : de.call(re, h, $e, Ot);
1221
- z && c(`moveNode ${s == null ? void 0 : s.id}`);
1222
- } else {
1223
- const $e = (Ye = (Xe = L == null ? void 0 : L.parent) == null ? void 0 : Xe.children) == null ? void 0 : Ye.findIndex((Y) => (Y == null ? void 0 : Y.id) === (L == null ? void 0 : L.id));
1224
- var z = !1;
1225
- if (z = (Ze = L == null ? void 0 : L.addNode) == null ? void 0 : Ze.call(L, o, $e), z || (z = (Ne = (Be = L == null ? void 0 : L.parent) == null ? void 0 : Be.addNode) == null ? void 0 : Ne.call(Be, o, $e)), z) {
1226
- const Y = (we = (Ae = h == null ? void 0 : h.parent) == null ? void 0 : Ae.children) == null ? void 0 : we.findIndex((He) => (He == null ? void 0 : He.id) === (h == null ? void 0 : h.id));
1227
- (et = (Re = h == null ? void 0 : h.parent) == null ? void 0 : Re.removeNode) == null || et.call(Re, h, Y), c(`moveNode ${s == null ? void 0 : s.id}`);
1228
- }
1229
- }
1230
- }, d = (s, r) => {
1231
- lt.$emit(s, r);
1232
- }, b = (s, r) => {
1233
- lt.$on(s, (o) => r(o));
1234
- }, y = (s, r, o) => {
1235
- s && (o && Te(s.options, "label") ? $.setOptions(s, "label", o) : o && Te(s.options, "content") && $.setOptions(s, "content", o));
1236
- }, f = (s) => {
1237
- if (!s) {
1238
- u();
1239
- return;
1240
- }
1241
- e.selectedWidget = s;
1242
- }, u = () => {
1243
- e.selectedWidget = void 0;
1244
- }, P = (s, r, o) => {
1245
- const S = s == null ? void 0 : s.newIndex, h = r == null ? void 0 : r[S];
1246
- h && f(h), c(`drag add ${h == null ? void 0 : h.id}`), o == null || o(r);
1247
- }, V = (s, r) => {
1248
- }, k = (s, r, o) => {
1249
- c("drag update"), o == null || o(r);
1250
- }, ne = (s, r, o) => {
1251
- c("drag remove"), o == null || o(r);
1252
- }, X = (s) => !0, se = (s) => {
1253
- const r = (o, S, h) => {
1254
- if (!Jt(s, o) || h != null && !(h != null && h(s)))
1255
- return;
1256
- const L = $.getOrgOption(s, o);
1257
- $.setOptions(s, o, S(s, L));
1258
- };
1259
- r(N.name, (o) => o.id), r(N.label, (o) => {
1260
- var S;
1261
- return $.getOptions(o, "label") || ((S = o.type) == null ? void 0 : S.toLowerCase());
1262
- }), r(N.content, (o) => {
1263
- var S;
1264
- return $.getOptions(o, "content") || ((S = o.type) == null ? void 0 : S.toLowerCase());
1265
- }, (o) => (o == null ? void 0 : o.type) !== E.tooltip), r(N.optionItems, (o, S) => {
1266
- var h = M.getValue(S);
1267
- return h == null || h.splice(1, 0, nt(o.type)), h;
1268
- }, (o) => (o == null ? void 0 : o.type) !== E.image), r("repeatOptionItems", (o, S) => {
1269
- var h = M.getValue(S);
1270
- return h == null || h.splice(1, 0, nt(o.type)), h;
1271
- }, (o) => (o == null ? void 0 : o.type) === E.timeline);
1272
- }, qe = (s) => {
1273
- let r = x(W(s));
1274
- return r ? (r.id = $.newId(r.type), se(r), r) : null;
1275
- }, Je = () => {
1276
- var r, o, S;
1277
- let s = e.widgetList;
1278
- return e.selectedWidget && (I(e.selectedWidget) ? s = (r = D(x(e.selectedWidget))) == null ? void 0 : r.widgetList : (o = x(e.selectedWidget)) != null && o.widgetList && (s = (S = e.selectedWidget) == null ? void 0 : S.widgetList)), s;
1279
- }, dt = (s) => {
1280
- let r = qe(s);
1281
- if (!r)
1282
- return;
1283
- const o = Je();
1284
- o == null || o.push(r), f(r), c(`addFieldByDbClick ${s == null ? void 0 : s.id}`);
1285
- }, Ct = (s, r) => {
1286
- var o = De(s, r);
1287
- if (s) {
1288
- if (o === 0) {
1289
- Z.info(K.i18nt("designer.hint.moveUpFirstChildHint"));
1290
- return;
1291
- }
1292
- let S = s[o];
1293
- s.splice(o, 1), s.splice(o - 1, 0, S);
1294
- }
1295
- c(`moveUpWidget ${r == null ? void 0 : r.id}`);
1296
- }, gt = (s, r) => {
1297
- var o = De(s, r);
1298
- if (s) {
1299
- if (o === s.length - 1) {
1300
- Z.info(K.i18nt("designer.hint.moveDownLastChildHint"));
1301
- return;
1302
- }
1303
- let S = s[o];
1304
- s.splice(o, 1), s.splice(o + 1, 0, S);
1305
- }
1306
- c(`moveDownWidget ${r == null ? void 0 : r.id}`);
1307
- }, je = (s) => {
1308
- var S, h, L, z, ie, ye, Oe, Le, Ee, Fe;
1309
- let r = null, o = W(s);
1310
- if (G(s))
1311
- r = x(o), (S = r.cols) == null || S.push(v()), (h = r.cols) == null || h.push(v());
1312
- else if (F(s)) {
1313
- r = x(o);
1314
- const re = T(he.container);
1315
- (L = re.children) == null || L.push(T(he.header));
1316
- let de = T(he.container, { direction: Wt.horizontal });
1317
- (z = de.children) == null || z.push(T(he.aside, { cellWidth: new M(U.placer, "20%") })), (ie = de.children) == null || ie.push(T(he.main, { cellWidth: new M(U.placer, "80%") })), (ye = re.children) == null || ye.push(de), (Oe = re.children) == null || Oe.push(T(he.footer)), (Le = r.cols) == null || Le.push(re);
1318
- } else
1319
- ce(s) ? (r = x(o), (Ee = r.rows) == null || Ee.push(Q())) : I(s) ? (r = x(o), (Fe = r.tabs) == null || Fe.push(O(void 0, !0))) : r = x(o);
1320
- return r.id = $.newId(r.type), $.setName(r, r.id), r;
1321
- }, vt = (s) => {
1322
- let r = je(s);
1323
- const o = Je();
1324
- o == null || o.push(r), f(r), c(`addContainerByDbClick ${s == null ? void 0 : s.id}`);
1325
- }, ze = (s, r) => {
1326
- var o = null;
1327
- if (s) {
1328
- o = Se(s, { recordSource: !1 });
1329
- var S = De(r, s);
1330
- return r == null || r.splice(S + 1, 0, o), f(o), c(`cloneWidget ${s == null ? void 0 : s.id}`), o;
1331
- }
1332
- }, Ke = (s, r, o) => {
1333
- var S = De(o, s);
1334
- if (o) {
1335
- let h = null;
1336
- o.length === 1 ? r && (h = r) : o.length === 1 + S ? h = o[S - 1] : h = o[S + 1], Ft(() => {
1337
- o.splice(S, 1), f(h), c(`removeWidget ${s == null ? void 0 : s.id}`);
1338
- });
1339
- }
1340
- }, De = (s, r) => !r || !s ? -1 : s == null ? void 0 : s.indexOf(r), Tt = (s, r, o) => {
1341
- e && (f(s), d(kt.fieldSelected, r));
1342
- }, bt = (s) => {
1343
- s ? f(s) : u();
1344
- }, yt = (s) => {
1345
- var h;
1346
- const { widgetTree: r } = ot(e.widgetList, !0), { pathNodes: o } = rt(r.value, s);
1347
- return (h = o.value) == null ? void 0 : h[1].widget;
1348
- }, Qe = (s) => {
1349
- var h, L, z;
1350
- const { widgetTree: r } = ot(e.widgetList, !0), { pathNodes: o } = rt(r.value, s);
1351
- return ((z = (L = (h = o.value) == null ? void 0 : h[1]) == null ? void 0 : L.widget) == null ? void 0 : z.widgetList) || e.widgetList;
1352
- };
1353
- return {
1354
- ...t,
1355
- initDesigner: le,
1356
- clearDesigner: R,
1357
- registerPageWidget: m,
1358
- setSelected: f,
1359
- clearSelected: u,
1360
- updateSelectedWidgetLabel: y,
1361
- copyNewFieldWidget: qe,
1362
- copyNewContainerWidget: je,
1363
- addContainerByDbClick: vt,
1364
- addFieldByDbClick: dt,
1365
- selectWidget: Tt,
1366
- removeSelectedWidget: () => {
1367
- const s = e.selectedWidget;
1368
- if (!s)
1369
- return !1;
1370
- if (s != null && s.internal)
1371
- return Z.info(K.i18nt("designer.hint.currentNodeCannotBeSelected")), !1;
1372
- const r = yt(s), o = Qe(s);
1373
- return Ke(s, r, o), !0;
1374
- },
1375
- cloneSelectedWidget: () => {
1376
- var s;
1377
- if ((s = e.selectedWidget) != null && s.internal) {
1378
- Z.info(K.i18nt("designer.hint.currentNodeCannotBeSelected"));
1379
- return;
1380
- }
1381
- return e.selectedWidget;
1382
- },
1383
- pasteSelectedWidget: (s) => {
1384
- const r = e.selectedWidget, o = Qe(r);
1385
- return ze(s, o), !0;
1386
- },
1387
- selectParentWidget: bt,
1388
- moveUpWidget: Ct,
1389
- moveDownWidget: gt,
1390
- cloneWidget: ze,
1391
- removeWidget: Ke,
1392
- checkWidgetMove: X,
1393
- onWidgetDragAdd: P,
1394
- onWidgetDragEnd: V,
1395
- onWidgetDragUpdate: k,
1396
- onWidgetDragRemove: ne,
1397
- setCssClassList: J,
1398
- getCssClassList: oe,
1399
- getImportTemplate: j,
1400
- emitEvent: d,
1401
- handleEvent: b,
1402
- loadPageJson: H,
1403
- getPageJson: _,
1404
- loadPresetCssCode: fe,
1405
- getNodeTree: te,
1406
- findTreeNode: Ge,
1407
- findWidgetById: B,
1408
- findToRootFromNode: Me,
1409
- buildFormItemList: i,
1410
- moveNode: a,
1411
- emitHistoryChangeAfter: q,
1412
- watchPropAndSaveHistory: (s) => {
1413
- s && Pt(() => {
1414
- var r;
1415
- return (r = e == null ? void 0 : e.selectedWidget) == null ? void 0 : r[s];
1416
- }, (r) => {
1417
- g();
1418
- }, { deep: !0 });
1419
- }
1420
- };
1421
- }
1422
- export {
1423
- Sn as D,
1424
- Pn as S,
1425
- At as a,
1426
- yn as b,
1427
- Dn as c,
1428
- Nt as d,
1429
- Fn as e,
1430
- Ue as f,
1431
- En as g,
1432
- Jt as h,
1433
- ot as i,
1434
- rt as j,
1435
- wt as k,
1436
- ue as l,
1437
- Ln as m,
1438
- On as n,
1439
- me as o,
1440
- Qt as p,
1441
- Zt as q,
1442
- Se as r,
1443
- pt as t,
1444
- on as u
1445
- };