@farris/ui-vue 1.7.1 → 1.7.2-beta.2

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 (431) hide show
  1. package/components/accordion/index.esm.js +312 -61
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +1492 -59
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +752 -8
  6. package/components/binding-selector/index.umd.cjs +1 -1
  7. package/components/button-edit/index.esm.js +1 -1
  8. package/components/button-edit/index.umd.cjs +1 -1
  9. package/components/button-group/index.esm.js +266 -110
  10. package/components/button-group/index.umd.cjs +1 -1
  11. package/components/calendar/index.esm.js +344 -341
  12. package/components/calendar/index.umd.cjs +3 -3
  13. package/components/code-editor/index.esm.js +237 -169
  14. package/components/code-editor/index.umd.cjs +3 -3
  15. package/components/collection-property-editor/index.esm.js +302 -299
  16. package/components/collection-property-editor/index.umd.cjs +2 -2
  17. package/components/color-picker/index.esm.js +812 -502
  18. package/components/color-picker/index.umd.cjs +1 -1
  19. package/components/combo-list/index.esm.js +329 -292
  20. package/components/combo-list/index.umd.cjs +1 -1
  21. package/components/combo-tree/index.esm.js +355 -174
  22. package/components/combo-tree/index.umd.cjs +1 -1
  23. package/components/comment/index.esm.js +294 -291
  24. package/components/comment/index.umd.cjs +6 -6
  25. package/components/common/index.esm.js +1 -1
  26. package/components/common/index.umd.cjs +1 -1
  27. package/components/component/index.esm.js +4390 -2708
  28. package/components/component/index.umd.cjs +8 -1
  29. package/components/condition/index.esm.js +3140 -487
  30. package/components/condition/index.umd.cjs +8 -1
  31. package/components/data-grid/index.esm.js +4 -2
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.esm.js +1859 -1832
  34. package/components/data-view/index.umd.cjs +1 -1
  35. package/components/date-picker/index.esm.js +1 -1
  36. package/components/date-picker/index.umd.cjs +1 -1
  37. package/components/designer-canvas/index.esm.js +3731 -2717
  38. package/components/designer-canvas/index.umd.cjs +1 -1
  39. package/components/drawer/index.esm.js +417 -405
  40. package/components/drawer/index.umd.cjs +2 -2
  41. package/components/dropdown/index.esm.js +373 -124
  42. package/components/dropdown/index.umd.cjs +2 -2
  43. package/components/dynamic-form/index.esm.js +1245 -1895
  44. package/components/dynamic-form/index.umd.cjs +1 -1
  45. package/components/dynamic-resolver/index.esm.js +275 -271
  46. package/components/dynamic-resolver/index.umd.cjs +2 -2
  47. package/components/dynamic-view/index.esm.js +529 -450
  48. package/components/dynamic-view/index.umd.cjs +1 -1
  49. package/components/event-parameter/index.esm.js +1 -1
  50. package/components/event-parameter/index.umd.cjs +1 -1
  51. package/components/events-editor/index.esm.js +2613 -1544
  52. package/components/events-editor/index.umd.cjs +3 -3
  53. package/components/expression-editor/index.css +1 -1
  54. package/components/expression-editor/index.esm.js +7376 -2
  55. package/components/expression-editor/index.umd.cjs +427 -1
  56. package/components/fieldset/index.esm.js +1 -1
  57. package/components/fieldset/index.umd.cjs +1 -1
  58. package/components/filter-bar/index.esm.js +423 -415
  59. package/components/filter-bar/index.umd.cjs +2 -2
  60. package/components/filter-condition-editor/index.css +1 -1
  61. package/components/filter-condition-editor/index.esm.js +9049 -425
  62. package/components/filter-condition-editor/index.umd.cjs +427 -1
  63. package/components/html-template/index.esm.js +33 -36
  64. package/components/html-template/index.umd.cjs +1 -1
  65. package/components/image/index.esm.js +364 -355
  66. package/components/image/index.umd.cjs +2 -2
  67. package/components/image-cropper/index.esm.js +615 -361
  68. package/components/image-cropper/index.umd.cjs +1 -1
  69. package/components/json-editor/index.esm.js +325 -247
  70. package/components/json-editor/index.umd.cjs +1 -1
  71. package/components/language-textbox/index.esm.js +411 -409
  72. package/components/language-textbox/index.umd.cjs +2 -2
  73. package/components/layout/index.esm.js +549 -163
  74. package/components/layout/index.umd.cjs +1 -1
  75. package/components/list-nav/index.esm.js +837 -39
  76. package/components/list-nav/index.umd.cjs +1 -1
  77. package/components/list-view/index.esm.js +427 -646
  78. package/components/list-view/index.umd.cjs +6 -6
  79. package/components/lookup/index.esm.js +3624 -3625
  80. package/components/lookup/index.umd.cjs +1 -1
  81. package/components/mapping-editor/index.esm.js +5 -3
  82. package/components/mapping-editor/index.umd.cjs +1 -1
  83. package/components/menu-lookup/index.esm.js +577 -536
  84. package/components/menu-lookup/index.umd.cjs +6 -6
  85. package/components/nav/index.esm.js +311 -31
  86. package/components/nav/index.umd.cjs +1 -1
  87. package/components/number-range/index.esm.js +1641 -189
  88. package/components/number-range/index.umd.cjs +1 -1
  89. package/components/number-spinner/index.esm.js +82 -82
  90. package/components/number-spinner/index.umd.cjs +1 -1
  91. package/components/order/index.esm.js +1196 -851
  92. package/components/order/index.umd.cjs +6 -6
  93. package/components/page-footer/index.esm.js +331 -48
  94. package/components/page-footer/index.umd.cjs +1 -1
  95. package/components/page-header/index.esm.js +110 -116
  96. package/components/page-header/index.umd.cjs +1 -1
  97. package/components/pagination/index.esm.js +509 -232
  98. package/components/pagination/index.umd.cjs +1 -1
  99. package/components/progress/index.esm.js +353 -148
  100. package/components/progress/index.umd.cjs +3 -3
  101. package/components/property-editor/index.esm.js +157 -153
  102. package/components/property-editor/index.umd.cjs +1 -1
  103. package/components/property-panel/index.esm.js +1817 -854
  104. package/components/property-panel/index.umd.cjs +12 -5
  105. package/components/query-solution/index.css +1 -1
  106. package/components/query-solution/index.esm.js +6858 -3984
  107. package/components/query-solution/index.umd.cjs +13 -6
  108. package/components/response-layout/index.esm.js +1 -1
  109. package/components/response-layout/index.umd.cjs +1 -1
  110. package/components/schema-selector/index.esm.js +2448 -2222
  111. package/components/schema-selector/index.umd.cjs +7 -7
  112. package/components/search-box/index.esm.js +244 -72
  113. package/components/search-box/index.umd.cjs +1 -1
  114. package/components/section/index.esm.js +212 -209
  115. package/components/section/index.umd.cjs +2 -2
  116. package/components/smoke-detector/index.esm.js +179 -8
  117. package/components/smoke-detector/index.umd.cjs +1 -1
  118. package/components/sort-condition-editor/index.css +1 -0
  119. package/components/sort-condition-editor/index.esm.js +9493 -4
  120. package/components/sort-condition-editor/index.umd.cjs +427 -1
  121. package/components/splitter/index.esm.js +1172 -142
  122. package/components/splitter/index.umd.cjs +1 -1
  123. package/components/step/index.esm.js +47 -48
  124. package/components/step/index.umd.cjs +1 -1
  125. package/components/tabs/index.esm.js +490 -419
  126. package/components/tabs/index.umd.cjs +1 -1
  127. package/components/text/index.esm.js +217 -73
  128. package/components/text/index.umd.cjs +1 -1
  129. package/components/textarea/index.esm.js +29 -27
  130. package/components/textarea/index.umd.cjs +2 -2
  131. package/components/transfer/index.esm.js +760 -543
  132. package/components/transfer/index.umd.cjs +5 -5
  133. package/components/tree-grid/index.esm.js +129 -128
  134. package/components/tree-grid/index.umd.cjs +1 -1
  135. package/components/tree-view/index.esm.js +320 -153
  136. package/components/tree-view/index.umd.cjs +1 -1
  137. package/components/uploader/index.esm.js +1112 -607
  138. package/components/uploader/index.umd.cjs +2 -2
  139. package/components/verify-detail/index.esm.js +359 -106
  140. package/components/verify-detail/index.umd.cjs +1 -1
  141. package/components/video/index.esm.js +222 -89
  142. package/components/video/index.umd.cjs +1 -1
  143. package/components/weather/index.esm.js +290 -199
  144. package/components/weather/index.umd.cjs +1 -1
  145. package/designer/data-grid/index.esm.js +5301 -4507
  146. package/designer/data-grid/index.umd.cjs +17 -10
  147. package/designer/drawer/index.esm.js +626 -615
  148. package/designer/drawer/index.umd.cjs +2 -2
  149. package/designer/dynamic-form/index.esm.js +2043 -1290
  150. package/designer/dynamic-form/index.umd.cjs +8 -1
  151. package/designer/farris-designer.all.esm.js +14263 -12505
  152. package/designer/farris-designer.all.umd.cjs +16 -16
  153. package/designer/list-view/index.esm.js +327 -327
  154. package/designer/list-view/index.umd.cjs +3 -3
  155. package/designer/modal/index.esm.js +29 -137
  156. package/designer/modal/index.umd.cjs +1 -1
  157. package/designer/radio-group/index.esm.js +238 -232
  158. package/designer/radio-group/index.umd.cjs +1 -1
  159. package/designer/response-layout-editor/index.esm.js +178 -171
  160. package/designer/response-layout-editor/index.umd.cjs +1 -1
  161. package/designer/response-toolbar/index.esm.js +1 -1
  162. package/designer/response-toolbar/index.umd.cjs +1 -1
  163. package/designer/section/index.esm.js +1 -6
  164. package/designer/section/index.umd.cjs +1 -1
  165. package/designer/tabs/index.esm.js +3431 -2493
  166. package/designer/tabs/index.umd.cjs +2 -2
  167. package/designer/time-picker/index.esm.js +195 -188
  168. package/designer/time-picker/index.umd.cjs +1 -1
  169. package/designer/tree-grid/index.esm.js +822 -464
  170. package/designer/tree-grid/index.umd.cjs +1 -1
  171. package/farris.all.esm.js +77525 -74884
  172. package/farris.all.umd.cjs +93 -93
  173. package/index.css +1 -1
  174. package/package.json +1 -1
  175. package/types/accordion/src/accordion.props.d.ts +1 -0
  176. package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
  177. package/types/avatar/src/avatar.props.d.ts +1 -0
  178. package/types/binding-selector/index.d.ts +54 -0
  179. package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
  180. package/types/button-group/index.d.ts +0 -15
  181. package/types/button-group/src/button-group.props.d.ts +1 -0
  182. package/types/code-editor/index.d.ts +1 -0
  183. package/types/code-editor/src/code-textbox.component.d.ts +6 -6
  184. package/types/code-editor/src/code-textbox.props.d.ts +2 -0
  185. package/types/color-picker/index.d.ts +15 -0
  186. package/types/color-picker/src/color-picker.props.d.ts +1 -0
  187. package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
  188. package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
  189. package/types/component/index.d.ts +2 -0
  190. package/types/component/src/component.props.d.ts +8 -0
  191. package/types/components.d.ts +8 -1
  192. package/types/condition/index.d.ts +55 -0
  193. package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
  194. package/types/data-view/composition/types.d.ts +1 -1
  195. package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
  196. package/types/designer-toolbox/index.d.ts +3 -0
  197. package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
  198. package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
  199. package/types/designer-toolbox/src/types.d.ts +21 -0
  200. package/types/designer.d.ts +13 -0
  201. package/types/dropdown/index.d.ts +6 -27
  202. package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
  203. package/types/dropdown/src/dropdown.props.d.ts +1 -0
  204. package/types/dynamic-form/designer.d.ts +1 -4
  205. package/types/dynamic-form/index.d.ts +6 -11
  206. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
  207. package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
  208. package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
  209. package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
  210. package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
  211. package/types/dynamic-form/src/response-form.props.d.ts +13 -1
  212. package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
  213. package/types/dynamic-form/src/types.d.ts +1 -0
  214. package/types/dynamic-resolver/index.d.ts +0 -3
  215. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
  216. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
  217. package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
  218. package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
  219. package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
  220. package/types/dynamic-resolver/src/types.d.ts +1 -0
  221. package/types/dynamic-view/index.d.ts +43 -3
  222. package/types/dynamic-view/src/components/maps.d.ts +110 -98
  223. package/types/dynamic-view/src/composition/index.d.ts +5 -0
  224. package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
  225. package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
  226. package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
  227. package/types/filter-condition-editor/index.d.ts +9 -0
  228. package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
  229. package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
  230. package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
  231. package/types/flow-canvas/index.d.ts +3 -0
  232. package/types/flow-canvas/src/components/flow-node-item.component.d.ts +8 -0
  233. package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
  234. package/types/flow-canvas/src/composition/types.d.ts +42 -0
  235. package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
  236. package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
  237. package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
  238. package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
  239. package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
  240. package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
  241. package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
  242. package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
  243. package/types/index.d.ts +1 -0
  244. package/types/json-editor/src/json-editor.props.d.ts +1 -0
  245. package/types/language-textbox/index.d.ts +3 -3
  246. package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
  247. package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
  248. package/types/layout/index.d.ts +0 -1
  249. package/types/layout/src/components/layout-pane.props.d.ts +1 -0
  250. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +2 -0
  251. package/types/layout/src/designer/layout-pane.design.component.d.ts +8 -0
  252. package/types/layout/src/designer/layout-use-designer-rules.d.ts +2 -0
  253. package/types/layout/src/designer/layout.design.component.d.ts +8 -0
  254. package/types/layout/src/layout.props.d.ts +1 -0
  255. package/types/layout/src/schema/schema-mapper.d.ts +2 -0
  256. package/types/layout/src/schema/schema-resolver.d.ts +2 -0
  257. package/types/list-nav/index.d.ts +5 -24
  258. package/types/list-nav/src/designer/use-designer-rules.d.ts +2 -0
  259. package/types/list-nav/src/list-nav.props.d.ts +1 -0
  260. package/types/list-nav/src/property-config/list-nav.property-config.d.ts +8 -0
  261. package/types/list-nav/src/schema/schema-mapper.d.ts +2 -0
  262. package/types/list-nav/src/schema/schema-resolver.d.ts +2 -0
  263. package/types/list-view/index.d.ts +0 -1
  264. package/types/list-view/src/composition/use-draggable.d.ts +1 -1
  265. package/types/lookup/index.d.ts +1 -1
  266. package/types/lookup/src/components/popup-container.component.d.ts +3 -3
  267. package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
  268. package/types/modal/designer.d.ts +0 -2
  269. package/types/nav/index.d.ts +20 -24
  270. package/types/nav/src/nav.props.d.ts +1 -0
  271. package/types/number-range/src/number-range.props.d.ts +1 -0
  272. package/types/order/index.d.ts +5 -36
  273. package/types/order/src/designer/order.design.component.d.ts +1 -1
  274. package/types/order/src/order.props.d.ts +1 -0
  275. package/types/page-footer/index.d.ts +2 -0
  276. package/types/page-footer/src/page-footer.props.d.ts +1 -0
  277. package/types/pagination/index.d.ts +0 -15
  278. package/types/pagination/src/pagination.props.d.ts +1 -0
  279. package/types/progress/src/progress.props.d.ts +1 -0
  280. package/types/property-panel/src/property-panel.component.d.ts +3 -3
  281. package/types/query-solution/index.d.ts +2 -1
  282. package/types/radio-group/designer.d.ts +1 -2
  283. package/types/search-box/index.d.ts +17 -1
  284. package/types/search-box/src/search-box.props.d.ts +1 -0
  285. package/types/section/designer.d.ts +0 -1
  286. package/types/smoke-detector/index.d.ts +2 -0
  287. package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
  288. package/types/sort-condition-editor/index.d.ts +7 -2
  289. package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
  290. package/types/splitter/index.d.ts +0 -1
  291. package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
  292. package/types/splitter/src/splitter.props.d.ts +1 -0
  293. package/types/tabs/designer.d.ts +0 -1
  294. package/types/tabs/index.d.ts +1 -0
  295. package/types/text/index.d.ts +20 -24
  296. package/types/text/src/text.props.d.ts +1 -0
  297. package/types/transfer/src/transfer.props.d.ts +1 -0
  298. package/types/tree-view/src/tree-view.props.d.ts +1 -0
  299. package/types/uploader/src/uploader.props.d.ts +1 -0
  300. package/types/verify-detail/index.d.ts +5 -58
  301. package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
  302. package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
  303. package/types/video/index.d.ts +20 -24
  304. package/types/video/src/video.props.d.ts +1 -0
  305. package/components/dynamic-form/index.css +0 -1
  306. package/designer/accordion/index.esm.js +0 -257
  307. package/designer/accordion/index.umd.cjs +0 -1
  308. package/designer/avatar/index.esm.js +0 -1460
  309. package/designer/avatar/index.umd.cjs +0 -1
  310. package/designer/binding-selector/index.esm.js +0 -792
  311. package/designer/binding-selector/index.umd.cjs +0 -1
  312. package/designer/button-group/index.esm.js +0 -282
  313. package/designer/button-group/index.umd.cjs +0 -1
  314. package/designer/code-editor/index.esm.js +0 -75
  315. package/designer/code-editor/index.umd.cjs +0 -1
  316. package/designer/color-picker/index.esm.js +0 -1096
  317. package/designer/color-picker/index.umd.cjs +0 -1
  318. package/designer/combo-list/index.esm.js +0 -1095
  319. package/designer/combo-list/index.umd.cjs +0 -1
  320. package/designer/combo-tree/index.esm.js +0 -186
  321. package/designer/combo-tree/index.umd.cjs +0 -1
  322. package/designer/component/index.css +0 -1
  323. package/designer/component/index.esm.js +0 -5002
  324. package/designer/component/index.umd.cjs +0 -1
  325. package/designer/condition/index.esm.js +0 -1899
  326. package/designer/condition/index.umd.cjs +0 -1
  327. package/designer/dropdown/index.esm.js +0 -261
  328. package/designer/dropdown/index.umd.cjs +0 -1
  329. package/designer/expression-editor/index.css +0 -1
  330. package/designer/expression-editor/index.esm.js +0 -7006
  331. package/designer/expression-editor/index.umd.cjs +0 -427
  332. package/designer/filter-condition-editor/index.css +0 -1
  333. package/designer/filter-condition-editor/index.esm.js +0 -4795
  334. package/designer/filter-condition-editor/index.umd.cjs +0 -1
  335. package/designer/html-template/index.esm.js +0 -718
  336. package/designer/html-template/index.umd.cjs +0 -1
  337. package/designer/image-cropper/index.esm.js +0 -765
  338. package/designer/image-cropper/index.umd.cjs +0 -1
  339. package/designer/json-editor/index.esm.js +0 -83
  340. package/designer/json-editor/index.umd.cjs +0 -1
  341. package/designer/language-textbox/index.esm.js +0 -783
  342. package/designer/language-textbox/index.umd.cjs +0 -8
  343. package/designer/layout/index.esm.js +0 -430
  344. package/designer/layout/index.umd.cjs +0 -1
  345. package/designer/list-nav/index.esm.js +0 -802
  346. package/designer/list-nav/index.umd.cjs +0 -1
  347. package/designer/lookup/index.esm.js +0 -2083
  348. package/designer/lookup/index.umd.cjs +0 -1
  349. package/designer/menu-lookup/index.esm.js +0 -46
  350. package/designer/menu-lookup/index.umd.cjs +0 -1
  351. package/designer/nav/index.esm.js +0 -284
  352. package/designer/nav/index.umd.cjs +0 -1
  353. package/designer/number-range/index.esm.js +0 -1616
  354. package/designer/number-range/index.umd.cjs +0 -1
  355. package/designer/order/index.css +0 -1
  356. package/designer/order/index.esm.js +0 -2196
  357. package/designer/order/index.umd.cjs +0 -18
  358. package/designer/page-footer/index.esm.js +0 -290
  359. package/designer/page-footer/index.umd.cjs +0 -1
  360. package/designer/page-header/index.esm.js +0 -1003
  361. package/designer/page-header/index.umd.cjs +0 -1
  362. package/designer/pagination/index.esm.js +0 -591
  363. package/designer/pagination/index.umd.cjs +0 -1
  364. package/designer/progress/index.esm.js +0 -213
  365. package/designer/progress/index.umd.cjs +0 -1
  366. package/designer/search-box/index.esm.js +0 -245
  367. package/designer/search-box/index.umd.cjs +0 -1
  368. package/designer/smoke-detector/index.css +0 -1
  369. package/designer/smoke-detector/index.esm.js +0 -178
  370. package/designer/smoke-detector/index.umd.cjs +0 -1
  371. package/designer/sort-condition-editor/index.esm.js +0 -138
  372. package/designer/sort-condition-editor/index.umd.cjs +0 -1
  373. package/designer/splitter/index.esm.js +0 -1120
  374. package/designer/splitter/index.umd.cjs +0 -1
  375. package/designer/step/index.esm.js +0 -226
  376. package/designer/step/index.umd.cjs +0 -1
  377. package/designer/text/index.esm.js +0 -147
  378. package/designer/text/index.umd.cjs +0 -1
  379. package/designer/transfer/index.esm.js +0 -254
  380. package/designer/transfer/index.umd.cjs +0 -1
  381. package/designer/tree-view/index.esm.js +0 -313
  382. package/designer/tree-view/index.umd.cjs +0 -1
  383. package/designer/uploader/index.esm.js +0 -1190
  384. package/designer/uploader/index.umd.cjs +0 -2
  385. package/designer/verify-detail/index.esm.js +0 -258
  386. package/designer/verify-detail/index.umd.cjs +0 -1
  387. package/designer/video/index.esm.js +0 -136
  388. package/designer/video/index.umd.cjs +0 -1
  389. package/designer/weather/index.css +0 -1
  390. package/designer/weather/index.esm.js +0 -6244
  391. package/designer/weather/index.umd.cjs +0 -14
  392. package/types/accordion/designer.d.ts +0 -44
  393. package/types/avatar/designer.d.ts +0 -29
  394. package/types/button-group/designer.d.ts +0 -29
  395. package/types/code-editor/designer.d.ts +0 -5
  396. package/types/color-picker/designer.d.ts +0 -29
  397. package/types/combo-list/designer.d.ts +0 -29
  398. package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
  399. package/types/combo-tree/designer.d.ts +0 -5
  400. package/types/component/designer.d.ts +0 -35
  401. package/types/condition/designer.d.ts +0 -56
  402. package/types/dropdown/designer.d.ts +0 -6
  403. package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
  404. package/types/expression-editor/designer.d.ts +0 -9
  405. package/types/filter-condition-editor/designer.d.ts +0 -10
  406. package/types/html-template/designer.d.ts +0 -31
  407. package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
  408. package/types/image-cropper/designer.d.ts +0 -4
  409. package/types/json-editor/designer.d.ts +0 -5
  410. package/types/menu-lookup/designer.d.ts +0 -5
  411. package/types/nav/designer.d.ts +0 -6
  412. package/types/number-range/designer.d.ts +0 -29
  413. package/types/order/designer.d.ts +0 -6
  414. package/types/page-footer/designer.d.ts +0 -6
  415. package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
  416. package/types/pagination/designer.d.ts +0 -29
  417. package/types/progress/designer.d.ts +0 -29
  418. package/types/search-box/designer.d.ts +0 -52
  419. package/types/smoke-detector/designer.d.ts +0 -6
  420. package/types/sort-condition-editor/designer.d.ts +0 -9
  421. package/types/splitter/designer.d.ts +0 -32
  422. package/types/step/designer.d.ts +0 -6
  423. package/types/text/designer.d.ts +0 -6
  424. package/types/transfer/designer.d.ts +0 -35
  425. package/types/tree-view/designer.d.ts +0 -29
  426. package/types/uploader/designer.d.ts +0 -141
  427. package/types/verify-detail/designer.d.ts +0 -6
  428. package/types/video/designer.d.ts +0 -6
  429. /package/{designer → components}/condition/index.css +0 -0
  430. /package/{designer → components}/uploader/index.css +0 -0
  431. /package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → list-nav/src/designer/list-nav.design.component.d.ts} +0 -0
@@ -1 +1 @@
1
- (function(w,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("../../components/response-layout-editor/index.umd.js"),require("vue"),require("../../components/modal/index.umd.js"),require("../../components/designer-canvas/index.umd.js"),require("lodash-es"),require("../../components/capsule/index.umd.js"),require("../../components/switch/index.umd.js"),require("../../components/combo-list/index.umd.js"),require("../../components/radio-button/index.umd.js"),require("../../components/rate/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/response-layout-editor/index.umd.js","vue","../../components/modal/index.umd.js","../../components/designer-canvas/index.umd.js","lodash-es","../../components/capsule/index.umd.js","../../components/switch/index.umd.js","../../components/combo-list/index.umd.js","../../components/radio-button/index.umd.js","../../components/rate/index.umd.js","../../components/dynamic-resolver/index.umd.js"],F):(w=typeof globalThis<"u"?globalThis:w||self,F(w["response-layout-editor"]={},w.responseLayoutEditor,w.Vue,w.modal,w.designerCanvas,w.LodashES,w.FCapsule,w.FSwitch,w.FComboList,w.FRadioButton,w.FRate,w.dynamicResolver))})(this,function(w,F,e,z,P,j,H,X,_,Y,J,U){"use strict";var ve=Object.defineProperty;var Ce=(w,F,e)=>F in w?ve(w,F,{enumerable:!0,configurable:!0,writable:!0,value:e}):w[F]=e;var M=(w,F,e)=>Ce(w,typeof F!="symbol"?F+"":F,e);const K={initialState:{type:Object},height:{type:Number,default:0},width:{type:Number,default:0},modelValue:{type:Object},beforeOpen:{type:Object}},Q={initialState:{type:Object,default:{}}},Z={defaultStates:{type:Object,default:{mode:""}},onSwitchInStandardModeChanged:{type:Function,default:()=>{}},onCurrentScreenResolutionChanged:{type:Function,default:()=>{}},onScreenNameChanged:{type:Function,default:()=>{}}},ee=e.defineComponent({name:"FScreenResolutionSelector",props:Z,emits:["screenNameChanged","currentScreenResolutionChanged","switchInStandardModeChanged"],setup(o,h){const i=e.ref([{name:"小屏幕",code:"SM",value:"SM",active:!1},{name:"中等屏幕",code:"MD",value:"MD",active:!0},{name:"大屏幕",code:"LG",value:"LG",active:!1},{name:"极大屏幕",code:"EL",value:"EL",active:!1}]),l=e.ref(o.defaultStates),n=e.ref("MD"),S=e.ref("中等屏幕"),p=e.ref(!0);function y(m){i.value.forEach(t=>{t.active=t.code===m,t.active&&(n.value=t.code,S.value=t.name,h.emit("screenNameChanged",S.value),h.emit("currentScreenResolutionChanged",n.value))})}function N(){h.emit("switchInStandardModeChanged",p.value)}e.watch(p,()=>{}),e.onBeforeMount(()=>{l.value.model==="standard"?p.value=!0:(p.value=!1,N())});function v(){return e.createVNode(H,{class:"f-layout-editor-screen-resolution-selector-frame",items:i.value,modelValue:n.value,"onUpdate:modelValue":m=>n.value=m,onChange:y},null)}return()=>e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-header"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-form"},[e.createTextVNode("表单布局配置")])]),v(),e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-switch"},[e.createVNode(X,{class:"f-layout-editor-show-switch",modelValue:p.value,"onUpdate:modelValue":m=>p.value=m,onModelValueChanged:N},null),p.value?e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("标准模式")]):e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("自定义模式")])])])}}),te={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},currentArea:{type:Object,default:[]},twoDimensionalArray:{type:Array,default:[]}},ne={item:{type:Object,default:{}},currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1}},oe=e.defineComponent({name:"FColumnWidthView",props:ne,emits:[],setup(o,h){const i=e.ref(o.item),l=e.ref(o.currentScreenResolution),n=e.computed(()=>`col-${i.value[`columnIn${l.value}`]}`);return e.watch([()=>o.item,()=>o.currentScreenResolution],([S,p],[y,N])=>{S!==y&&(i.value=S),p!==N&&(l.value=p)}),()=>e.createVNode("div",{class:n.value},[e.createVNode("div",{class:"f-layout-editor-column-width-view",title:i.value.label},[e.createVNode("div",{class:"f-layout-editor-column-width-view-label"},[i.value.label])])])}}),ae=e.defineComponent({name:"FPreview",props:te,emits:["update:twoDimensionalArray"],setup(o,h){const i=e.ref(o.currentScreenResolution),l=e.ref(o.switchInStandardMode),n=e.ref(o.currentArea),S=e.ref(o.twoDimensionalArray),p=e.ref([]);e.watch([()=>o.currentArea,()=>o.switchInStandardMode,()=>o.currentScreenResolution],([t,a,s],[c,f,C])=>{t!==c&&(n.value=t),a!==f&&(l.value=a),s!==C&&(i.value=s)});function y(t,a){const s=[];let c=[];return t.forEach(f=>{a!==f.componentRow&&(a+=1,s.push(c),c=[]),c.push(f)}),s.push(c),s}function N(){const t=[];let a=1;return p.value.forEach(s=>{const c=y(s,a);a+=c.length,t.push(c)}),t}function v(){p.value=j.cloneDeep(S.value),p.value=N()}e.watch(()=>o.twoDimensionalArray,()=>{S.value=o.twoDimensionalArray,v()}),e.onMounted(()=>{v()});function m(){if(l.value)return"";const t=Array.from({length:12},()=>e.createVNode("div",{class:"col-1"},[e.createVNode("div",{class:"f-layout-editor-preview-customize-single-background"},[e.createTextVNode(" ")])]));return e.createVNode("div",{class:"f-layout-editor-preview-customize-whole-background"},[t])}return()=>e.createVNode("div",{class:"f-layout-editor-preview f-utils-fill-flex-column"},[e.createVNode("div",{class:"f-layout-editor-preview-header"},[e.createTextVNode("预览区")]),m(),e.createVNode("div",{class:"f-layout-editor-preview-view f-utils-overflow-xhya"},[e.createVNode("div",{class:"f-layout-editor-preview-row-group"},[p.value.map(t=>{var a,s;return((a=t[0][0])==null?void 0:a.group.toString())===((s=n.value[0])==null?void 0:s.id)&&t.map(c=>e.createVNode("div",{class:"f-layout-editor-row"},[c.map(f=>e.createVNode(oe,{item:f,"onUpdate:item":C=>f=C,currentScreenResolution:i.value,switchInStandardMode:l.value},null))]))})])])])}}),re={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},originalData:{type:Array,default:[]},originalDataCopy:{type:Array,default:[]},defaultStates:{type:Object,default:{}},onTwoDimensionalArrayChanged:{type:Function,default:()=>{}},onOriginalDataChanged:{type:Function,default:()=>{}}};function le(o,h){const i=e.ref(-1),l=e.ref(!1);function n(t){if(t.target.offsetParent){const a=t.target.offsetParent,s=a.offsetWidth-t.target.offsetWidth/2-4,c=a.offsetHeight/2;t.dataTransfer&&t.dataTransfer.setDragImage(a,s,c)}}function S(t){if(t){const a=o.value.findIndex(s=>s.label===t.label);setTimeout(()=>{i.value=a,l.value=!0,t.moving=!0})}}function p(t,a){t.stopPropagation(),n(t),S(a)}function y(t){const a=o.value.findIndex(s=>s.label===t.label);if(i.value!==a){const s=o.value[i.value],c=o.value;c.splice(i.value,1),c.splice(a,0,s),i.value=a,h&&h()}}function N(t,a){t.preventDefault(),y(a)}function v(t){t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move")}function m(t,a){a&&(a.moving=!1),l.value=!1}return{dragstart:p,dragenter:N,dragover:v,dragend:m,isDragging:l}}const ie={currentScreenResolution:{type:String,default:""},field:{type:Object,default:{}},switchInStandardMode:{type:Boolean,default:!1},fieldChanged:{type:Function,default:()=>{}}},se=e.defineComponent({name:"FColumnWidthEditor",props:ie,emits:["fieldChanged"],setup(o,h){const i={SM:["1"],MD:["1","2"],LG:["1","2","3","4"],EL:["1","2","3","4","5","6"]},l=e.ref(o.currentScreenResolution),n=e.ref(o.field),S=e.ref(o.switchInStandardMode),p=e.ref(),y=e.ref(""),N=e.ref(),v=e.ref("customize"),m=e.ref(),t=e.inject("ResponseLayoutEditorDraggableComposition"),{dragstart:a,dragenter:s,dragover:c,dragend:f}=t;function C(){p.value=i==null?void 0:i[l.value],S.value?(y.value=`displayWidthIn${l.value}`,v.value=`${n.value[y.value]}`):(y.value=`columnIn${l.value}`,m.value=n.value[y.value])}function I(g){if(S.value===!0){const V=Number(g==null?void 0:g.text);N.value=V;const T=n.value[`columnIn${l.value}`]/n.value[`displayWidthIn${l.value}`];n.value[`columnIn${l.value}`]=V*T,n.value[`displayWidthIn${l.value}`]=Number(V),h.emit("fieldChanged",n.value)}}function D(g){m.value=g;const V=n.value[`columnIn${l.value}`]/n.value[`displayWidthIn${l.value}`];n.value[`columnIn${l.value}`]=m.value,n.value[`displayWidthIn${l.value}`]=m.value/V,h.emit("fieldChanged",n.value)}function x(){return e.createVNode(J,{enableHalf:!0,size:"extraLarge",pointSystem:12,numOfStar:6,lightColor:"#5D89FE",darkColor:"#e7e9f3",iconClass:"f-icon-column-rectangle",modelValue:m.value,"onUpdate:modelValue":g=>m.value=g,enableScore:!1,onSelectedValue:()=>D(m.value)},null)}function E(){const g=[];p.value=i==null?void 0:i[l.value];const V=n.value[`displayWidthIn${l.value}`];return p.value.forEach(T=>{const L={text:T,active:V.toString()===T};g.push(L)}),g}function A(){const g=E();return e.createVNode(Y,{enumData:g,suffixValue:"列",onSelectedValueChanged:I},{default:()=>[e.createTextVNode(" ")]})}function $(){var g;if(((g=n==null?void 0:n.value)==null?void 0:g.showTopBorder)===1)return e.createVNode("div",{class:"f-layout-editor-column-width-editor-row"},[e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-left"},null),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-middle"},[e.createTextVNode("第"),n.value.componentRow,e.createTextVNode("行")]),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-right"},null)])}function d(){return S.value?e.createVNode("div",{class:"f-column-width-editor-switch-standard"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-click-button"},[A()])]):e.createVNode("div",{class:"f-column-width-editor-switch-customize",onDragenter:g=>s(g,n.value),onDragend:g=>f(g,n.value),onDragover:g=>c(g)},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-rectangle"},[x(),e.createVNode("div",{class:"f-layout-editor-rate-show-column"},[m.value,e.createTextVNode("列")]),e.createVNode("span",{class:"f-layout-editor-drag-handler f-icon f-icon-drag-vertical",draggable:"true",onDragstart:g=>a(g,n.value)},null)])])}function R(){var g,V;return e.createVNode("div",{class:"f-layout-editor-column-width-editor-component"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-label",title:(g=n==null?void 0:n.value)==null?void 0:g.label},[(V=n==null?void 0:n.value)==null?void 0:V.label]),d()])}return e.watch(()=>[o.field,o.switchInStandardMode,o.currentScreenResolution],([g,V,T],[L,k,r])=>{T!==r&&(l.value=T,p.value=i[l.value],C()),V!==k&&(S.value=V),S.value===!1&&C(),g!==L&&(n.value=g)}),e.onMounted(()=>{C()}),()=>e.createVNode("div",{class:"f-layout-editor-column-width-editor"},[$(),R()])}}),ce=e.defineComponent({name:"FFieldList",props:re,emits:["update:currentArea","twoDimensionalArrayChanged","originalDataChanged"],setup(o,h){const i=e.ref(o.currentScreenResolution),l=e.ref(o.switchInStandardMode),n=e.ref(o.originalData),S=e.ref(o.originalDataCopy),p=e.ref(o.defaultStates),y=e.ref(""),N=e.ref([]),v=e.ref(o.currentArea),m=e.ref(0),t=e.ref(),a=e.ref(0),s=e.ref("1"),c=e.ref([]);function f(){const r=[];return n.value.forEach(u=>{r.indexOf(u.group)===-1&&r.push(u.group)}),r}function C(){s.value=p.value.defaultGroupNumber.toString(),y.value=`区域${s.value}`,v.value=[N.value[Number(s.value)-1]],h.emit("update:currentArea",v.value)}function I(){var u;const r=f();for(let b=0;b<r.length;b++){const W={id:(u=r[b])==null?void 0:u.toString(),label:"区域"+r[b]};N.value.push(W)}C()}function D(){let r=[];t.value=[];let u=1;n.value.forEach(b=>{b.group===u||(u+=1,t.value.push(r),r=[]),r.push(b)}),t.value.push(r)}function x(r,u){let W=12;return m.value=1+u,r.forEach(B=>{B.showTopBorder=0;const q=B[`columnIn${i.value}`];W>=q?(B.componentRow=m.value,W-=q):(m.value+=1,B.componentRow=m.value,W=12-q,B.showTopBorder=1)}),r[0].showTopBorder=1,r}function E(r){let u=[];for(const b of r)u=u.concat(b);n.value=j.cloneDeep(u),a.value=0}function A(){t.value[v.value[0].id-1]=j.cloneDeep(c.value);const r=[];a.value=0,t.value.forEach(u=>{const b=x(u,a.value);r.push(b),a.value=b[b.length-1].componentRow}),E(r)}function $(){D();const r=[];return a.value=0,t.value.forEach(u=>{const b=x(u,a.value);r.push(b),a.value=b[b.length-1].componentRow}),h.emit("twoDimensionalArrayChanged",t.value),E(r),n.value}function d(){c.value=[],n.value.forEach(r=>{r.group===Number(v.value[0].id)&&c.value.push(r)})}function R(){n.value=j.cloneDeep($()),h.emit("originalDataChanged",n.value)}function g(r){c.value.forEach(u=>{u.id===r.id&&Object.assign(u,r)}),A(),R(),d()}function V(r){for(let u=0;u<r.length;u++)v.value=[{id:r[u].id,label:r[u].label}];h.emit("update:currentArea",v.value),d(),A()}function T(){return e.createVNode("div",{class:"f-layout-editor-field-list-top"},[e.createVNode("div",{class:"f-layout-editor-field-list-header"},[e.createTextVNode("组件列表")]),e.createVNode("div",{class:"f-layout-editor-choose-group"},[e.createVNode(_,{modelValue:s.value,"onUpdate:modelValue":r=>s.value=r,placeholder:"当前可编辑组",enableClear:!1,"id-field":"id","text-field":"label",data:N.value,editable:!1,onChange:V},null)])])}function L(){return e.createVNode("div",{class:"f-layout-editor-field-list-content f-utils-overflow-xhya"},[c.value.map(r=>e.createVNode(se,{key:r.label,currentScreenResolution:i.value,field:r,"onUpdate:field":u=>r=u,switchInStandardMode:l.value,"onUpdate:switchInStandardMode":u=>l.value=u,onFieldChanged:g},null))])}const k=le(c,()=>{A(),R(),d()});return e.provide("ResponseLayoutEditorDraggableComposition",k),e.watch(()=>o.currentArea,(r,u)=>{r!==u&&(v.value=o.currentArea,d())}),e.watch(v,(r,u)=>{r!==u&&d()}),e.watch(()=>o.currentGroup,(r,u)=>{r!==u&&(y.value=o.currentGroup)}),e.watch(()=>o.currentScreenResolution,(r,u)=>{r!==u&&(i.value=o.currentScreenResolution,R(),D(),v.value[0]&&(c.value=j.cloneDeep(t.value[Number(v.value[0].id)-1])))}),e.watch(()=>o.switchInStandardMode,(r,u)=>{r!==u&&(l.value=o.switchInStandardMode,n.value=j.cloneDeep(S.value))}),e.watch(p,(r,u)=>{r!==u&&R()}),e.onBeforeMount(()=>{I(),$(),d()}),()=>e.createVNode("div",{class:"f-layout-editor-field-list f-utils-fill-flex-column"},[l.value?e.createVNode("div",{class:"f-layout-editor-field-list-standard f-utils-fill-flex-column"},[T(),L()]):e.createVNode("div",{class:"f-layout-editor-field-list-customize f-utils-fill-flex-column"},[T(),L()])])}}),de=e.defineComponent({name:"FResponseLayoutEditor",props:Q,emits:["close","submit"],setup(o,h){const i=e.ref(o.initialState),l=e.ref(),n=e.ref(),S=e.ref(""),p=e.ref(""),y=e.ref(!0),N=e.ref([{id:"1",label:"区域1"}]),v=e.ref([]),m=e.ref();e.ref(o.width),e.ref(o.height),e.watch(()=>o.initialState,d=>{i.value=d}),e.watch([()=>o.currentArea,()=>o.switchInStandardMode],([d,R],[g,V])=>{d!==g&&(N.value=d),R!==V&&(y.value=R)});function t(d){S.value=d}function a(d){p.value=d}function s(d){y.value=d}function c(d){N.value=[].concat(d)}function f(d){l.value=j.cloneDeep(d)}function C(d){v.value=d}function I(){h.emit("close")}function D(){h.emit("submit",l.value)}function x(){return e.createVNode(ce,{class:"f-utils-fill-flex-column",defaultStates:n.value,originalDataCopy:m.value,currentScreenResolution:p.value,"onUpdate:currentScreenResolution":d=>p.value=d,originalData:l.value,"onUpdate:originalData":d=>l.value=d,switchInStandardMode:y.value,"onUpdate:switchInStandardMode":d=>y.value=d,currentArea:N.value,"onUpdate:currentArea":d=>N.value=d,onCurrentAreaChanged:c,onTwoDimensionalArrayChanged:C,onOriginalDataChanged:f},null)}function E(){return e.createVNode(ae,{class:"f-utils-fill-flex-column",currentArea:N.value,"onUpdate:currentArea":d=>N.value=d,currentScreenResolution:p.value,"onUpdate:currentScreenResolution":d=>p.value=d,switchInStandardMode:y.value,twoDimensionalArray:v.value,"onUpdate:twoDimensionalArray":d=>v.value=d},null)}const A=e.computed(()=>y.value?"f-layout-editor-left-standard f-utils-fill-flex-column":"f-layout-editor-left-customize f-utils-fill-flex-column"),$=e.computed(()=>y.value?"f-layout-editor-right-standard f-utils-fill-flex-column":"f-layout-editor-right-customize f-utils-fill-flex-column");return e.onBeforeMount(()=>{l.value=j.cloneDeep(i.value.importData),m.value=j.cloneDeep(i.value.importData),n.value=i.value.defaultState,S.value="中等屏幕",p.value="MD"}),d=>e.createVNode("div",{class:"f-layout-editor f-utils-flex-column"},[e.createVNode("div",{class:"f-layout-editor-top"},[e.createVNode(ee,{defaultStates:n.value,onScreenNameChanged:t,onCurrentScreenResolutionChanged:a,onSwitchInStandardModeChanged:s},null)]),e.createVNode("div",{class:"f-layout-editor-content f-utils-fill"},[e.createVNode("div",{class:"f-layout-editor-left f-utils-fill-flex-column"},[e.createVNode("div",{class:A.value},[x()])]),e.createVNode("div",{class:"f-layout-editor-right f-utils-fill-flex-column"},[e.createVNode("div",{class:$.value},[E()])])]),e.createVNode("div",{class:"f-layout-editor-bottom"},[e.createVNode("div",{class:"f-layout-editor-button"},[e.createVNode("div",{class:"f-layout-editor-cancel-btn",onClick:I},[e.createVNode("span",{class:"f-layout-editor-text-cancel"},[e.createTextVNode("取消")])]),e.createVNode("div",{class:"f-layout-editor-sure-btn",onClick:D},[e.createVNode("span",{class:"f-layout-editor-text-sure"},[e.createTextVNode("确认")])])])])])}}),G=e.defineComponent({name:"FResponseLayoutEditorSettingDesign",props:K,emits:[],setup(o,h){const i=e.ref(o.initialState),l=e.ref(o.width),n=e.ref(o.height),S=e.ref(),p=e.inject("design-item-context"),y=P.useDesignerComponent(S,p);e.onMounted(()=>{S.value.componentInstance=y}),h.expose(y.value);function N(){const v=z.FModalService.show({render:()=>e.createVNode(de,{initialState:i,width:l,height:n},null),width:900,height:500,buttons:[{class:"btn btn-primary",text:"确定",iconClass:"f-icon f-icon-check",handle:()=>{v.destroy()}},{class:"btn btn-light",text:"取消",iconClass:"f-icon f-icon-close",handle:()=>{v.destroy()}}]})}return()=>e.createVNode("div",{ref:S,class:"f-column-width-setting-button",onClick:N},[e.createVNode("div",{class:"f-icon f-icon-add"},null),e.createVNode("div",{class:"f-column-width-setting-button-name"},[e.createVNode("span",{class:"f-column-width-setting-button-center"},[e.createTextVNode("高级设置")])])])}}),ue=new Map([["appearance",U.resolveAppearance]]);function fe(o,h,i,l){const n=o.getSchemaByType("section");return n.id=`${l}-section`,n.appearance={class:"f-section-form f-section-in-main"},n.mainTitle="标题",n.contents=[h],n}function pe(o,h,i,l){const n=o.getSchemaByType("component");return n.id=`${l}-component`,n.componentType="form-col-1",n.appearance={class:"f-struct-form f-struct-wrapper"},n.contents=[h],n}function me(o,h,i){h.appearance={class:"f-form-layout farris-form farris-form-controls-inline"};const l=fe(o,h,i,h.id);return pe(o,l,i,h.id)}const he={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout-editor-setting.schema.json",title:"response-layout-editor-setting",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for response layout editor",type:"string"},type:{description:"The type string of response layout editor component",type:"string",default:"response-layout-editor-setting"},initialState:{description:"",type:"object",default:{}},height:{description:"",type:"number",default:0},width:{description:"",type:"number",default:0},beforeOpen:{description:"",type:"function"}},required:["id","type"]},ge={title:"response-form",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}};class ye{constructor(){M(this,"label","");M(this,"id","");M(this,"columnInSM",12);M(this,"columnInMD",6);M(this,"columnInLG",3);M(this,"columnInEL",2);M(this,"displayWidthInSM",1);M(this,"displayWidthInMD",1);M(this,"displayWidthInLG",1);M(this,"displayWidthInEL",1);M(this,"displayColumnCountAtBreakPoint","md");M(this,"tagRow",0);M(this,"showTopBorder",0);M(this,"group",1);M(this,"isSupportedClass",!0);M(this,"fieldSetId","")}}function Se(o){let h,i;const l=new Map;let n=[];function S(m,t){const s=m.split(" ").filter(D=>D.startsWith("col-"));if(s.length===0){t.isSupportedClass=!1;return}let c=s.find(D=>/^col-([1-9]|10|11|12)$/.test(D)),f=s.find(D=>/^col-md-([1-9]|10|11|12)$/.test(D)),C=s.find(D=>/^col-xl-([1-9]|10|11|12)$/.test(D)),I=s.find(D=>/^col-el-([1-9]|10|11|12)$/.test(D));c=c||"col-12",t.columnInSM=parseInt(c.replace("col-",""),10),t.displayWidthInSM=t.columnInSM/12,t.displayWidthInSM!==1&&(t.isSupportedClass=!1),f=f||"col-md-"+t.columnInSM,t.columnInMD=parseInt(f.replace("col-md-",""),10),t.displayWidthInMD=t.columnInMD/6,[1,2].includes(t.displayWidthInMD)||(t.isSupportedClass=!1),C=C||"col-xl-"+t.columnInMD,t.columnInLG=parseInt(C.replace("col-xl-",""),10),t.displayWidthInLG=t.columnInLG/3,[1,2,3,4].includes(t.displayWidthInLG)||(t.isSupportedClass=!1),I=I||"col-el-"+t.columnInLG,t.columnInEL=parseInt(I.replace("col-el-",""),10),t.displayWidthInEL=t.columnInEL/2,[1,2,3,4,5,6].includes(t.displayWidthInEL)||(t.isSupportedClass=!1)}function p(m,t,a,s=!1){let c=!1;m.contents.forEach(f=>{if(f.type==="fieldset"){a+=1,p(f,t,a,!0),c=!0;return}c&&(a+=1,c=!1);const C=f.appearance&&f.appearance.class,I=new ye;C?S(C,I):I.isSupportedClass=!1,I.label=f.label||f.id,I.id=f.id,I.group=a,s&&(I.fieldSetId=m.id),i===f.id&&(h=a),l.set(f.id,f),t.push(I)})}function y(m){const t=o.getComponentById(m);if(!t||!t.componentType||!t.componentType.startsWith("form"))return{result:!1,message:"只可以在响应式表单组件中调整响应式布局配置"};const a=o.selectNode(t,s=>s.type===P.DgControl["response-form"].type);return!a||!a.contents||a.contents.length===0?{result:!1,message:"Form区域内没有控件,请先添加控件"}:{result:!0,message:"",formNode:a}}function N(m,t){t=t||m.id;const{result:a,message:s,formNode:c}=y(t);if(!a)return{result:a,message:s};i=m.id,n=[],l.clear();const f=c.contents[0].type===P.DgControl.fieldset.type?0:1;p(c,n,f);const C=n.find(D=>!D.isSupportedClass);return{defaultState:{defaultGroupNumber:h||1,model:C?"customize":"standard"},importData:n}}function v(m,t){t=t;const{result:a,formNode:s}=y(t);if(!a)return"";const c=[];return m.forEach(f=>{var D;const C=l.get(f.id),I=C.appearance&&C.appearance.class;if(I){const E=I.split(" ").filter(V=>!V.startsWith("col-")),A="col-"+f.columnInSM,$="col-md-"+f.columnInMD,d="col-xl-"+f.columnInLG,R="col-el-"+f.columnInEL,g=[A,$,d,R].concat(E);C.appearance.class=g.join(" ")}if(f.fieldSetId){const x=s.contents.find(A=>A.id===f.fieldSetId),E=c.find(A=>A.id===f.fieldSetId);E?(D=E.contents)==null||D.push(C):(c.push(x),x.contents=[C])}else c.push(C)}),s.contents=c,s.id}return{checkCanFindFormNode:y,checkCanOpenLayoutEditor:N,changeFormControlsByResponseLayoutConfig:v,getResonseFormLayoutConfig:p}}const O=U.createPropsResolver(F.responseLayoutEditorSettingProps,he,ue,me,ge);G.register=(o,h,i,l)=>{o["response-layout-editor-setting"]=F.ResponseLayoutEditorSetting,h["response-layout-editor-setting"]=O},G.registerDesigner=(o,h,i)=>{o["response-layout-editor-setting"]=G,h["response-layout-editor-setting"]=O},w.default=G,w.propsResolver=O,w.useResponseLayoutEditorSetting=Se,Object.defineProperties(w,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(C,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("../../components/response-layout-editor/index.umd.js"),require("vue"),require("../../components/modal/index.umd.js"),require("../../components/designer-canvas/index.umd.js"),require("lodash-es"),require("../../components/capsule/index.umd.js"),require("../../components/switch/index.umd.js"),require("../../components/combo-list/index.umd.js"),require("../../components/radio-button/index.umd.js"),require("../../components/rate/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/response-layout-editor/index.umd.js","vue","../../components/modal/index.umd.js","../../components/designer-canvas/index.umd.js","lodash-es","../../components/capsule/index.umd.js","../../components/switch/index.umd.js","../../components/combo-list/index.umd.js","../../components/radio-button/index.umd.js","../../components/rate/index.umd.js","../../components/dynamic-resolver/index.umd.js"],F):(C=typeof globalThis<"u"?globalThis:C||self,F(C["response-layout-editor"]={},C.responseLayoutEditor,C.Vue,C.modal,C.designerCanvas,C.LodashES,C.FCapsule,C.FSwitch,C.FComboList,C.FRadioButton,C.FRate,C.dynamicResolver))})(this,function(C,F,e,H,P,j,X,_,Y,J,K,U){"use strict";var ve=Object.defineProperty;var we=(C,F,e)=>F in C?ve(C,F,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[F]=e;var M=(C,F,e)=>we(C,typeof F!="symbol"?F+"":F,e);const Q={initialState:{type:Object},height:{type:Number,default:0},width:{type:Number,default:0},modelValue:{type:Object},beforeOpen:{type:Object}},Z={initialState:{type:Object,default:{}}},ee={defaultStates:{type:Object,default:{mode:""}},onSwitchInStandardModeChanged:{type:Function,default:()=>{}},onCurrentScreenResolutionChanged:{type:Function,default:()=>{}},onScreenNameChanged:{type:Function,default:()=>{}}},te=e.defineComponent({name:"FScreenResolutionSelector",props:ee,emits:["screenNameChanged","currentScreenResolutionChanged","switchInStandardModeChanged"],setup(o,h){const i=e.ref([{name:"小屏幕",code:"SM",value:"SM",active:!1},{name:"中等屏幕",code:"MD",value:"MD",active:!0},{name:"大屏幕",code:"LG",value:"LG",active:!1},{name:"极大屏幕",code:"EL",value:"EL",active:!1}]),l=e.ref(o.defaultStates),n=e.ref("MD"),S=e.ref("中等屏幕"),p=e.ref(!0);function y(u){i.value.forEach(t=>{t.active=t.code===u,t.active&&(n.value=t.code,S.value=t.name,h.emit("screenNameChanged",S.value),h.emit("currentScreenResolutionChanged",n.value))})}function N(){h.emit("switchInStandardModeChanged",p.value)}e.watch(p,()=>{}),e.onBeforeMount(()=>{l.value.model==="standard"?p.value=!0:(p.value=!1,N())});function v(){return e.createVNode(X,{class:"f-layout-editor-screen-resolution-selector-frame",items:i.value,modelValue:n.value,"onUpdate:modelValue":u=>n.value=u,onChange:y},null)}return()=>e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-header"},[e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-form"},[e.createTextVNode("表单布局配置")])]),v(),e.createVNode("div",{class:"f-layout-editor-screen-resolution-selector-switch"},[e.createVNode(_,{class:"f-layout-editor-show-switch",modelValue:p.value,"onUpdate:modelValue":u=>p.value=u,onModelValueChanged:N},null),p.value?e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("标准模式")]):e.createVNode("div",{class:"f-layout-editor-show-switch-label"},[e.createTextVNode("自定义模式")])])])}}),ne={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},currentArea:{type:Object,default:[]},twoDimensionalArray:{type:Array,default:[]}},oe={item:{type:Object,default:{}},currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1}},ae=e.defineComponent({name:"FColumnWidthView",props:oe,emits:[],setup(o,h){const i=e.ref(o.item),l=e.ref(o.currentScreenResolution),n=e.computed(()=>`col-${i.value[`columnIn${l.value}`]}`);return e.watch([()=>o.item,()=>o.currentScreenResolution],([S,p],[y,N])=>{S!==y&&(i.value=S),p!==N&&(l.value=p)}),()=>e.createVNode("div",{class:n.value},[e.createVNode("div",{class:"f-layout-editor-column-width-view",title:i.value.label},[e.createVNode("div",{class:"f-layout-editor-column-width-view-label"},[i.value.label])])])}}),re=e.defineComponent({name:"FPreview",props:ne,emits:["update:twoDimensionalArray"],setup(o,h){const i=e.ref(o.currentScreenResolution),l=e.ref(o.switchInStandardMode),n=e.ref(o.currentArea),S=e.ref(o.twoDimensionalArray),p=e.ref([]);e.watch([()=>o.currentArea,()=>o.switchInStandardMode,()=>o.currentScreenResolution],([t,a,s],[c,f,w])=>{t!==c&&(n.value=t),a!==f&&(l.value=a),s!==w&&(i.value=s)});function y(t,a){const s=[];let c=[];return t.forEach(f=>{a!==f.componentRow&&(a+=1,s.push(c),c=[]),c.push(f)}),s.push(c),s}function N(){const t=[];let a=1;return p.value.forEach(s=>{const c=y(s,a);a+=c.length,t.push(c)}),t}function v(){p.value=j.cloneDeep(S.value),p.value=N()}e.watch(()=>o.twoDimensionalArray,()=>{S.value=o.twoDimensionalArray,v()}),e.onMounted(()=>{v()});function u(){if(l.value)return"";const t=Array.from({length:12},()=>e.createVNode("div",{class:"col-1"},[e.createVNode("div",{class:"f-layout-editor-preview-customize-single-background"},[e.createTextVNode(" ")])]));return e.createVNode("div",{class:"f-layout-editor-preview-customize-whole-background"},[t])}return()=>e.createVNode("div",{class:"f-layout-editor-preview f-utils-fill-flex-column"},[e.createVNode("div",{class:"f-layout-editor-preview-header"},[e.createTextVNode("预览区")]),u(),e.createVNode("div",{class:"f-layout-editor-preview-view f-utils-overflow-xhya"},[e.createVNode("div",{class:"f-layout-editor-preview-row-group"},[p.value.map(t=>{var a,s;return((a=t[0][0])==null?void 0:a.group.toString())===((s=n.value[0])==null?void 0:s.id)&&t.map(c=>e.createVNode("div",{class:"f-layout-editor-row"},[c.map(f=>e.createVNode(ae,{item:f,"onUpdate:item":w=>f=w,currentScreenResolution:i.value,switchInStandardMode:l.value},null))]))})])])])}}),le={currentScreenResolution:{type:String,default:""},switchInStandardMode:{type:Boolean,default:!1},originalData:{type:Array,default:[]},originalDataCopy:{type:Array,default:[]},defaultStates:{type:Object,default:{}},onTwoDimensionalArrayChanged:{type:Function,default:()=>{}},onOriginalDataChanged:{type:Function,default:()=>{}}};function ie(o,h){const i=e.ref(-1),l=e.ref(!1);function n(t){if(t.target.offsetParent){const a=t.target.offsetParent,s=a.offsetWidth-t.target.offsetWidth/2-4,c=a.offsetHeight/2;t.dataTransfer&&t.dataTransfer.setDragImage(a,s,c)}}function S(t){if(t){const a=o.value.findIndex(s=>s.label===t.label);setTimeout(()=>{i.value=a,l.value=!0,t.moving=!0})}}function p(t,a){t.stopPropagation(),n(t),S(a)}function y(t){const a=o.value.findIndex(s=>s.label===t.label);if(i.value!==a){const s=o.value[i.value],c=o.value;c.splice(i.value,1),c.splice(a,0,s),i.value=a,h&&h()}}function N(t,a){t.preventDefault(),y(a)}function v(t){t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move")}function u(t,a){a&&(a.moving=!1),l.value=!1}return{dragstart:p,dragenter:N,dragover:v,dragend:u,isDragging:l}}const se={currentScreenResolution:{type:String,default:""},field:{type:Object,default:{}},switchInStandardMode:{type:Boolean,default:!1},fieldChanged:{type:Function,default:()=>{}}},ce=e.defineComponent({name:"FColumnWidthEditor",props:se,emits:["fieldChanged"],setup(o,h){const i={SM:["1"],MD:["1","2"],LG:["1","2","3","4"],EL:["1","2","3","4","5","6"]},l=e.ref(o.currentScreenResolution),n=e.ref(o.field),S=e.ref(o.switchInStandardMode),p=e.ref(),y=e.ref(""),N=e.ref(),v=e.ref("customize"),u=e.ref(),t=e.inject("ResponseLayoutEditorDraggableComposition"),{dragstart:a,dragenter:s,dragover:c,dragend:f}=t;function w(){p.value=i==null?void 0:i[l.value],S.value?(y.value=`displayWidthIn${l.value}`,v.value=`${n.value[y.value]}`):(y.value=`columnIn${l.value}`,u.value=n.value[y.value])}function I(g){if(S.value===!0){const V=Number(g==null?void 0:g.text);N.value=V;const T=n.value[`columnIn${l.value}`]/n.value[`displayWidthIn${l.value}`];n.value[`columnIn${l.value}`]=V*T,n.value[`displayWidthIn${l.value}`]=Number(V),h.emit("fieldChanged",n.value)}}function D(g){u.value=g;const V=n.value[`columnIn${l.value}`]/n.value[`displayWidthIn${l.value}`];n.value[`columnIn${l.value}`]=u.value,n.value[`displayWidthIn${l.value}`]=u.value/V,h.emit("fieldChanged",n.value)}function x(){return e.createVNode(K,{enableHalf:!0,size:"extraLarge",pointSystem:12,numOfStar:6,lightColor:"#5D89FE",darkColor:"#e7e9f3",iconClass:"f-icon-column-rectangle",modelValue:u.value,"onUpdate:modelValue":g=>u.value=g,enableScore:!1,onSelectedValue:()=>D(u.value)},null)}function E(){const g=[];p.value=i==null?void 0:i[l.value];const V=n.value[`displayWidthIn${l.value}`];return p.value.forEach(T=>{const $={text:T,active:V.toString()===T};g.push($)}),g}function A(){const g=E();return e.createVNode(J,{enumData:g,suffixValue:"列",onSelectedValueChanged:I},{default:()=>[e.createTextVNode(" ")]})}function L(){var g;if(((g=n==null?void 0:n.value)==null?void 0:g.showTopBorder)===1)return e.createVNode("div",{class:"f-layout-editor-column-width-editor-row"},[e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-left"},null),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-middle"},[e.createTextVNode("第"),n.value.componentRow,e.createTextVNode("行")]),e.createVNode("span",{class:"f-layout-editor-column-width-editor-row-right"},null)])}function d(){return S.value?e.createVNode("div",{class:"f-column-width-editor-switch-standard"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-click-button"},[A()])]):e.createVNode("div",{class:"f-column-width-editor-switch-customize",onDragenter:g=>s(g,n.value),onDragend:g=>f(g,n.value),onDragover:g=>c(g)},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-rectangle"},[x(),e.createVNode("div",{class:"f-layout-editor-rate-show-column"},[u.value,e.createTextVNode("列")]),e.createVNode("span",{class:"f-layout-editor-drag-handler f-icon f-icon-drag-vertical",draggable:"true",onDragstart:g=>a(g,n.value)},null)])])}function R(){var g,V;return e.createVNode("div",{class:"f-layout-editor-column-width-editor-component"},[e.createVNode("div",{class:"f-layout-editor-column-width-editor-label",title:(g=n==null?void 0:n.value)==null?void 0:g.label},[(V=n==null?void 0:n.value)==null?void 0:V.label]),d()])}return e.watch(()=>[o.field,o.switchInStandardMode,o.currentScreenResolution],([g,V,T],[$,k,r])=>{T!==r&&(l.value=T,p.value=i[l.value],w()),V!==k&&(S.value=V),S.value===!1&&w(),g!==$&&(n.value=g)}),e.onMounted(()=>{w()}),()=>e.createVNode("div",{class:"f-layout-editor-column-width-editor"},[L(),R()])}}),de=e.defineComponent({name:"FFieldList",props:le,emits:["update:currentArea","twoDimensionalArrayChanged","originalDataChanged"],setup(o,h){const i=e.ref(o.currentScreenResolution),l=e.ref(o.switchInStandardMode),n=e.ref(o.originalData),S=e.ref(o.originalDataCopy),p=e.ref(o.defaultStates),y=e.ref(""),N=e.ref([]),v=e.ref(o.currentArea),u=e.ref(0),t=e.ref(),a=e.ref(0),s=e.ref("1"),c=e.ref([]);function f(){const r=[];return n.value.forEach(m=>{r.indexOf(m.group)===-1&&r.push(m.group)}),r}function w(){s.value=p.value.defaultGroupNumber.toString(),y.value=`区域${s.value}`,v.value=[N.value[Number(s.value)-1]],h.emit("update:currentArea",v.value)}function I(){var m;const r=f();for(let b=0;b<r.length;b++){const W={id:(m=r[b])==null?void 0:m.toString(),label:"区域"+r[b]};N.value.push(W)}w()}function D(){let r=[];t.value=[];let m=1;n.value.forEach(b=>{b.group===m||(m+=1,t.value.push(r),r=[]),r.push(b)}),t.value.push(r)}function x(r,m){let W=12;return u.value=1+m,r.forEach(B=>{B.showTopBorder=0;const q=B[`columnIn${i.value}`];W>=q?(B.componentRow=u.value,W-=q):(u.value+=1,B.componentRow=u.value,W=12-q,B.showTopBorder=1)}),r[0].showTopBorder=1,r}function E(r){let m=[];for(const b of r)m=m.concat(b);n.value=j.cloneDeep(m),a.value=0}function A(){t.value[v.value[0].id-1]=j.cloneDeep(c.value);const r=[];a.value=0,t.value.forEach(m=>{const b=x(m,a.value);r.push(b),a.value=b[b.length-1].componentRow}),E(r)}function L(){D();const r=[];return a.value=0,t.value.forEach(m=>{const b=x(m,a.value);r.push(b),a.value=b[b.length-1].componentRow}),h.emit("twoDimensionalArrayChanged",t.value),E(r),n.value}function d(){c.value=[],n.value.forEach(r=>{r.group===Number(v.value[0].id)&&c.value.push(r)})}function R(){n.value=j.cloneDeep(L()),h.emit("originalDataChanged",n.value)}function g(r){c.value.forEach(m=>{m.id===r.id&&Object.assign(m,r)}),A(),R(),d()}function V(r){for(let m=0;m<r.length;m++)v.value=[{id:r[m].id,label:r[m].label}];h.emit("update:currentArea",v.value),d(),A()}function T(){return e.createVNode("div",{class:"f-layout-editor-field-list-top"},[e.createVNode("div",{class:"f-layout-editor-field-list-header"},[e.createTextVNode("组件列表")]),e.createVNode("div",{class:"f-layout-editor-choose-group"},[e.createVNode(Y,{modelValue:s.value,"onUpdate:modelValue":r=>s.value=r,placeholder:"当前可编辑组",enableClear:!1,"id-field":"id","text-field":"label",data:N.value,editable:!1,onChange:V},null)])])}function $(){return e.createVNode("div",{class:"f-layout-editor-field-list-content f-utils-overflow-xhya"},[c.value.map(r=>e.createVNode(ce,{key:r.label,currentScreenResolution:i.value,field:r,"onUpdate:field":m=>r=m,switchInStandardMode:l.value,"onUpdate:switchInStandardMode":m=>l.value=m,onFieldChanged:g},null))])}const k=ie(c,()=>{A(),R(),d()});return e.provide("ResponseLayoutEditorDraggableComposition",k),e.watch(()=>o.currentArea,(r,m)=>{r!==m&&(v.value=o.currentArea,d())}),e.watch(v,(r,m)=>{r!==m&&d()}),e.watch(()=>o.currentGroup,(r,m)=>{r!==m&&(y.value=o.currentGroup)}),e.watch(()=>o.currentScreenResolution,(r,m)=>{r!==m&&(i.value=o.currentScreenResolution,R(),D(),v.value[0]&&(c.value=j.cloneDeep(t.value[Number(v.value[0].id)-1])))}),e.watch(()=>o.switchInStandardMode,(r,m)=>{r!==m&&(l.value=o.switchInStandardMode,n.value=j.cloneDeep(S.value))}),e.watch(p,(r,m)=>{r!==m&&R()}),e.onBeforeMount(()=>{I(),L(),d()}),()=>e.createVNode("div",{class:"f-layout-editor-field-list f-utils-fill-flex-column"},[l.value?e.createVNode("div",{class:"f-layout-editor-field-list-standard f-utils-fill-flex-column"},[T(),$()]):e.createVNode("div",{class:"f-layout-editor-field-list-customize f-utils-fill-flex-column"},[T(),$()])])}}),ue=e.defineComponent({name:"FResponseLayoutEditor",props:Z,emits:["close","submit"],setup(o,h){const i=e.ref(o.initialState),l=e.ref(),n=e.ref(),S=e.ref(""),p=e.ref(""),y=e.ref(!0),N=e.ref([{id:"1",label:"区域1"}]),v=e.ref([]),u=e.ref();e.ref(o.width),e.ref(o.height),e.watch(()=>o.initialState,d=>{i.value=d}),e.watch([()=>o.currentArea,()=>o.switchInStandardMode],([d,R],[g,V])=>{d!==g&&(N.value=d),R!==V&&(y.value=R)});function t(d){S.value=d}function a(d){p.value=d}function s(d){y.value=d}function c(d){N.value=[].concat(d)}function f(d){l.value=j.cloneDeep(d)}function w(d){v.value=d}function I(){h.emit("close")}function D(){h.emit("submit",l.value)}function x(){return e.createVNode(de,{class:"f-utils-fill-flex-column",defaultStates:n.value,originalDataCopy:u.value,currentScreenResolution:p.value,"onUpdate:currentScreenResolution":d=>p.value=d,originalData:l.value,"onUpdate:originalData":d=>l.value=d,switchInStandardMode:y.value,"onUpdate:switchInStandardMode":d=>y.value=d,currentArea:N.value,"onUpdate:currentArea":d=>N.value=d,onCurrentAreaChanged:c,onTwoDimensionalArrayChanged:w,onOriginalDataChanged:f},null)}function E(){return e.createVNode(re,{class:"f-utils-fill-flex-column",currentArea:N.value,"onUpdate:currentArea":d=>N.value=d,currentScreenResolution:p.value,"onUpdate:currentScreenResolution":d=>p.value=d,switchInStandardMode:y.value,twoDimensionalArray:v.value,"onUpdate:twoDimensionalArray":d=>v.value=d},null)}const A=e.computed(()=>y.value?"f-layout-editor-left-standard f-utils-fill-flex-column":"f-layout-editor-left-customize f-utils-fill-flex-column"),L=e.computed(()=>y.value?"f-layout-editor-right-standard f-utils-fill-flex-column":"f-layout-editor-right-customize f-utils-fill-flex-column");return e.onBeforeMount(()=>{l.value=j.cloneDeep(i.value.importData),u.value=j.cloneDeep(i.value.importData),n.value=i.value.defaultState,S.value="中等屏幕",p.value="MD"}),d=>e.createVNode("div",{class:"f-layout-editor f-utils-flex-column"},[e.createVNode("div",{class:"f-layout-editor-top"},[e.createVNode(te,{defaultStates:n.value,onScreenNameChanged:t,onCurrentScreenResolutionChanged:a,onSwitchInStandardModeChanged:s},null)]),e.createVNode("div",{class:"f-layout-editor-content f-utils-fill"},[e.createVNode("div",{class:"f-layout-editor-left f-utils-fill-flex-column"},[e.createVNode("div",{class:A.value},[x()])]),e.createVNode("div",{class:"f-layout-editor-right f-utils-fill-flex-column"},[e.createVNode("div",{class:L.value},[E()])])]),e.createVNode("div",{class:"f-layout-editor-bottom"},[e.createVNode("div",{class:"f-layout-editor-button"},[e.createVNode("div",{class:"f-layout-editor-cancel-btn",onClick:I},[e.createVNode("span",{class:"f-layout-editor-text-cancel"},[e.createTextVNode("取消")])]),e.createVNode("div",{class:"f-layout-editor-sure-btn",onClick:D},[e.createVNode("span",{class:"f-layout-editor-text-sure"},[e.createTextVNode("确认")])])])])])}}),G=e.defineComponent({name:"FResponseLayoutEditorSettingDesign",props:Q,emits:[],setup(o,h){const i=e.ref(o.initialState),l=e.ref(o.width),n=e.ref(o.height),S=e.ref(),p=e.inject("design-item-context"),y=P.useDesignerComponent(S,p);e.onMounted(()=>{S.value.componentInstance=y}),h.expose(y.value);function N(){const v=H.FModalService.show({render:()=>e.createVNode(ue,{initialState:i,width:l,height:n},null),width:900,height:500,buttons:[{class:"btn btn-primary",text:"确定",iconClass:"f-icon f-icon-check",handle:()=>{v.destroy()}},{class:"btn btn-light",text:"取消",iconClass:"f-icon f-icon-close",handle:()=>{v.destroy()}}]})}return()=>e.createVNode("div",{ref:S,class:"f-column-width-setting-button",onClick:N},[e.createVNode("div",{class:"f-icon f-icon-add"},null),e.createVNode("div",{class:"f-column-width-setting-button-name"},[e.createVNode("span",{class:"f-column-width-setting-button-center"},[e.createTextVNode("高级设置")])])])}}),fe=new Map([["appearance",U.resolveAppearance]]);function me(o,h,i,l){const n=o.getSchemaByType("section");return n.id=`${l}-section`,n.appearance={class:"f-section-form f-section-in-main"},n.mainTitle="标题",n.contents=[h],n}function pe(o,h,i,l){const n=o.getSchemaByType("component");return n.id=`${l}-component`,n.componentType="form-col-1",n.appearance={class:"f-struct-form f-struct-wrapper"},n.contents=[h],n}function he(o,h,i){h.appearance={class:"f-form-layout farris-form farris-form-controls-inline"};const l=me(o,h,i,h.id);return pe(o,l,i,h.id)}const ge={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-layout-editor-setting.schema.json",title:"response-layout-editor-setting",description:"A Farris Data Collection Component",type:"object",properties:{id:{description:"The unique identifier for response layout editor",type:"string"},type:{description:"The type string of response layout editor component",type:"string",default:"response-layout-editor-setting"},initialState:{description:"",type:"object",default:{}},height:{description:"",type:"number",default:0},width:{description:"",type:"number",default:0},beforeOpen:{description:"",type:"function"}},required:["id","type"]},ye={title:"response-form",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}};class z{constructor(){M(this,"label","");M(this,"id","");M(this,"columnInSM",12);M(this,"columnInMD",6);M(this,"columnInLG",3);M(this,"columnInEL",2);M(this,"displayWidthInSM",1);M(this,"displayWidthInMD",1);M(this,"displayWidthInLG",1);M(this,"displayWidthInEL",1);M(this,"displayColumnCountAtBreakPoint","md");M(this,"tagRow",0);M(this,"showTopBorder",0);M(this,"group",1);M(this,"isSupportedClass",!0);M(this,"fieldSetId","")}}function Se(o){let h,i;const l=new Map;let n=[];function S(u,t){const s=((u==null?void 0:u.split(" "))||[]).filter(D=>D.startsWith("col-"));if(s.length===0){t.isSupportedClass=!1;return}let c=s.find(D=>/^col-([1-9]|10|11|12)$/.test(D)),f=s.find(D=>/^col-md-([1-9]|10|11|12)$/.test(D)),w=s.find(D=>/^col-xl-([1-9]|10|11|12)$/.test(D)),I=s.find(D=>/^col-el-([1-9]|10|11|12)$/.test(D));c=c||"col-12",t.columnInSM=parseInt(c.replace("col-",""),10),t.displayWidthInSM=t.columnInSM/12,t.displayWidthInSM!==1&&(t.isSupportedClass=!1),f=f||"col-md-"+t.columnInSM,t.columnInMD=parseInt(f.replace("col-md-",""),10),t.displayWidthInMD=t.columnInMD/6,[1,2].includes(t.displayWidthInMD)||(t.isSupportedClass=!1),w=w||"col-xl-"+t.columnInMD,t.columnInLG=parseInt(w.replace("col-xl-",""),10),t.displayWidthInLG=t.columnInLG/3,[1,2,3,4].includes(t.displayWidthInLG)||(t.isSupportedClass=!1),I=I||"col-el-"+t.columnInLG,t.columnInEL=parseInt(I.replace("col-el-",""),10),t.displayWidthInEL=t.columnInEL/2,[1,2,3,4,5,6].includes(t.displayWidthInEL)||(t.isSupportedClass=!1)}function p(u,t,a,s=!1){let c=!1;if(!u.contents||u.contents.length===0){const f=new z;S(u.layout,f),t.push(f);return}u.contents.forEach(f=>{if(f.type==="fieldset"){a+=1,p(f,t,a,!0),c=!0;return}if(f.type==="dynamic-form")return;c&&(a+=1,c=!1);const w=f.appearance&&f.appearance.class,I=new z;w?S(w,I):I.isSupportedClass=!1,I.label=f.label||f.id,I.id=f.id,I.group=a,s&&(I.fieldSetId=u.id),i===f.id&&(h=a),l.set(f.id,f),t.push(I)})}function y(u){const t=o.getComponentById(u);if(!t||!t.componentType||!t.componentType.startsWith("form"))return{result:!1,message:"只可以在响应式表单组件中调整响应式布局配置"};const a=o.selectNode(t,s=>s.type===P.DgControl["response-form"].type);return!a||!a.contents||a.contents.length===0?{result:!1,message:"Form区域内没有控件,请先添加控件"}:{result:!0,message:"",formNode:a}}function N(u,t){t=t||u.id;const{result:a,message:s,formNode:c}=y(t);if(!a)return{result:a,message:s};i=u.id,n=[],l.clear();const f=c.contents[0].type===P.DgControl.fieldset.type?0:1;p(c,n,f);const w=n.find(D=>!D.isSupportedClass);return{defaultState:{defaultGroupNumber:h||1,model:w?"customize":"standard"},importData:n}}function v(u,t){t=t;const{result:a,formNode:s}=y(t);if(!a)return"";const c=[];return u.forEach(f=>{var D;const w=l.get(f.id),I=w.appearance&&w.appearance.class;if(I){const E=I.split(" ").filter(V=>!V.startsWith("col-")),A="col-"+f.columnInSM,L="col-md-"+f.columnInMD,d="col-xl-"+f.columnInLG,R="col-el-"+f.columnInEL,g=[A,L,d,R].concat(E);w.appearance.class=g.join(" ")}if(f.fieldSetId){const x=s.contents.find(A=>A.id===f.fieldSetId),E=c.find(A=>A.id===f.fieldSetId);E?(D=E.contents)==null||D.push(w):(c.push(x),x.contents=[w])}else c.push(w)}),s.contents=c,s.id}return{checkCanFindFormNode:y,checkCanOpenLayoutEditor:N,changeFormControlsByResponseLayoutConfig:v,getResonseFormLayoutConfig:p}}const O=U.createPropsResolver(F.responseLayoutEditorSettingProps,ge,fe,he,ye);G.register=(o,h,i,l)=>{o["response-layout-editor-setting"]=F.ResponseLayoutEditorSetting,h["response-layout-editor-setting"]=O},G.registerDesigner=(o,h,i)=>{o["response-layout-editor-setting"]=G,h["response-layout-editor-setting"]=O},C.default=G,C.propsResolver=O,C.useResponseLayoutEditorSetting=Se,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -9,7 +9,7 @@ import { LocaleService as Gt } from "../../components/locale/index.esm.js";
9
9
  import { canvasChanged as Fe, useDesignerInnerComponent as Ut, FDesignerInnerItem as Yt, useDesignerComponent as Xt, setPositionForSelectedElement as Ht } from "../../components/designer-canvas/index.esm.js";
10
10
  import { BaseControlProperty as dt } from "../../components/property-panel/index.esm.js";
11
11
  import { isPlainObject as nt, cloneDeep as Ce } from "lodash-es";
12
- import { TabToolbarItemProperty as Vt } from "../tabs/index.esm.js";
12
+ import { TabToolbarItemProperty as Vt } from "../../components/tabs/index.esm.js";
13
13
  const Qt = /* @__PURE__ */ new Map([
14
14
  ["buttons", "items"],
15
15
  ["appearance", Lt]
@@ -1 +1 @@
1
- (function(ee,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("../../components/common/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js"),require("../../components/response-toolbar/index.umd.js"),require("vue"),require("../../components/locale/index.umd.js"),require("../../components/designer-canvas/index.umd.js"),require("../../components/property-panel/index.umd.js"),require("lodash-es"),require("../tabs/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/common/index.umd.js","../../components/dynamic-resolver/index.umd.js","../../components/response-toolbar/index.umd.js","vue","../../components/locale/index.umd.js","../../components/designer-canvas/index.umd.js","../../components/property-panel/index.umd.js","lodash-es","../tabs/index.umd.js"],X):(ee=typeof globalThis<"u"?globalThis:ee||self,X(ee["response-toolbar"]={},ee.common,ee.dynamicResolver,ee.responseToolbar,ee.Vue,ee.locale,ee.designerCanvas,ee.propertyPanel,ee.LodashES,ee.designer$1))})(this,function(ee,X,ue,qe,a,lt,ye,Fe,we,at){"use strict";var Jt=Object.defineProperty;var Kt=(ee,X,ue)=>X in ee?Jt(ee,X,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ee[X]=ue;var K=(ee,X,ue)=>Kt(ee,typeof X!="symbol"?X+"":X,ue);const ct=new Map([["buttons","items"],["appearance",ue.resolveAppearance]]);function Ie(e,x,t){return x}const dt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-toolbar.schema.json",title:"response-toolbar",description:"A Farris Toolbar Component",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"response-toolbar"},appearance:{description:"",type:"object",properties:{class:{type:"string",default:""}}},alignment:{description:"The alignment of Response Toolbar Button.",type:"string",default:"right"},buttons:{description:"The items of Response Toolbar.",type:"array",default:[]},buttonSize:{type:"string",default:""},visible:{description:"",type:"boolean",default:!0}},required:["id","type","buttons"],events:{onClick:"点击事件"}},ut={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-toolbar-item.schema.json",title:"response-toolbar-item",description:"A Farris Toolbar Item Component",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"response-toolbar-item"},appearance:{description:"",type:"object",properties:{class:{type:"string",default:""}}},alignment:{description:"对齐",type:"string",default:"right"},text:{description:"文本",type:"string",default:"按钮"},icon:{description:"图标",type:"string",default:""},disabled:{description:"禁用",type:"boolean",default:!1},visible:{description:"是否可见",type:"boolean",default:!0},onClick:{description:"点击事件",type:"string",default:""},tipsEnable:{description:"",type:"boolean",default:!1},tipsText:{description:"",type:"string",default:""},dropdownClass:{description:"处于下拉菜单时的样式",type:"string",default:""},split:{description:"",type:"boolean",default:!1}},required:["id","type","text"],events:{onClick:"点击事件"}},ft=Object.assign({},qe.responseToolbarProps,{componentId:{type:String,default:""}}),Pe=ue.createPropsResolver(qe.responseToolbarProps,dt,ct,Ie),We={id:{type:String,default:""},item:{type:Object,default:{}},items:{type:Object,default:{}},class:{type:String,default:""},text:{type:String,default:""},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},componentId:{type:String,default:""},expanded:{type:Boolean,default:!1},alignment:{Type:String,default:"right"},split:{type:Boolean,default:!1},isDP:{type:Boolean,default:!1},isDPItem:{type:Boolean,default:!1}},ze=Object.assign({},We,{item:{type:Object,default:{}},items:{type:Object,default:{}},class:{type:String,default:"btn-secondary"},alignment:{Type:String,default:"right"}}),pt=ue.createPropsResolver(ze,ut,void 0,Ie),ht=ue.createResponseToolbarEventHandlerResolver(),gt={id:{type:String,default:""},customClass:{type:String,default:""},alignment:{Type:String,default:"right"},items:{Type:Array,default:[]},visible:{type:Boolean,default:!0}};class Ge{constructor(x){K(this,"id","");K(this,"class","btn-secondary");K(this,"icon","");K(this,"groupId","");K(this,"order",-1);K(this,"asDropDownTop",!1);K(this,"text","");K(this,"visible",!0);K(this,"shown",!0);K(this,"responsed",!1);K(this,"tipsEnable",!1);K(this,"tipsText","");K(this,"width",0);K(this,"dropdownClass","");K(this,"onClick",()=>{});K(this,"options");var g,d;this.options=x;const t=["id","class","icon","groupId","order","asDropDownTop","text","isDP","visible","responsed","width","tipsEnable","tipsText","dropdownClass","onClick"];Object.keys(x).filter(r=>t.indexOf(r)>-1).forEach(r=>{r==="visible"?this[r]=x[r]===void 0?!0:x[r]:this[r]=x[r]}),this.shown=this.visible,(g=x.appearance)!=null&&g.class&&(this.class=(d=x.appearance)==null?void 0:d.class)}get enable(){return Object.keys(this.options).indexOf("disabled")>-1?!this.options.disabled:a.computed(()=>!0)}setWidth(x){this.width=parseInt(x,10)}getWidth(){return this.visible?this.width:!1}}class bt extends Ge{constructor(x){super(x)}}function Ue(){function e(x){const t=[];return x.reduce((g,d)=>(d.children&&d.children.length>0?g.push(new De(d)):g.push(new bt(d)),g),t),t}return{buildResponseToolbarItems:e}}const{buildResponseToolbarItems:mt}=Ue();class De extends Ge{constructor(t){super(t);K(this,"placement","");K(this,"visible",!0);K(this,"dropdownClass","");K(this,"menuClass","");K(this,"split",!1);K(this,"children",[]);K(this,"expanded",!1);K(this,"shown",!0);const g=["visible","icon","isDP","class","dropdownClass","menuClass","placement","split","expanded"];Object.keys(t).filter(d=>g.indexOf(d)>-1).forEach(d=>{d==="visible"?this[d]=t[d]===void 0?!0:t[d]:this[d]=t[d]}),this.shown=this.visible,t.children&&t.children.length&&(this.children=mt(t.children))}}function Ee(){function e(t){const g={"f-icon":!0};if(t.icon){const d=t.icon.trim().split(" ");d&&d.length&&d.reduce((r,D)=>(r[D]=!0,r),g)}return g}function x(t){return!!(t.icon&&t.icon.trim())}return{iconClass:e,shouldShowIcon:x}}function vt(e,x){function t(h){const n={"dropdown-menu":!0};return X.getCustomClass(n,h.menuClass)}function g(h){const n={disabled:!h.enable,"dropdown-submenu":!0,"f-rt-dropdown":!0,"text-truncate":!0};return X.getCustomClass(n,h.dropdownClass)}function d(h){const n={disabled:!h.enable,"dropdown-item":!0,"f-rt-btn":!0,"text-truncate":!0};return X.getCustomClass(n,h.dropdownClass)}function r(h){const n={disabled:!h.enable,"dropdown-item":!0,"f-rt-btn":!0,"text-truncate":!0,"f-rt-toggle":!h.split,"btn-icontext":!!(h.icon&&h.icon.trim()),"dropdown-toggle":!h.split,"btn-secondary":!0};return X.getCustomClass(n,h.dropdownClass)}function D(h){const n={"f-rt-btn":!0,"text-truncate":!0,"btn-icontext":!!(h.icon&&h.icon.trim()),"d-block":!0};return X.getCustomClass(n,h.dropdownClass)}let C;const b=new Map;let M="";function E(h){M="#"+h}function u(h,n,L){h.stopPropagation();const P=L?L.id:"__top_item__";if(n.children&&n.children.length&&(n.expanded=!n.expanded,n.expanded)){if(b.has(P)&&b.get(P)!==n){const p=b.get(P);p&&(p.expanded=!1,b.delete(P))}b.set(P,n)}}function l(h,n){document.body.click(),n.enable&&(h.stopPropagation(),typeof n.onClick=="function"&&n.onClick(h,n.id),e.emit("click",h,n.id))}function f(h,n){const L=h.target;L.className.indexOf("dropdown-item")<0||(L.title=L.scrollWidth>L.clientWidth?n:"")}function i(h,n,L){if(n.tipsEnable&&n.tipsText){const P=a.reactive({content:n.tipsText,enable:n.tipsEnable});return a.withDirectives(a.createVNode("li",{class:d(n),id:n.id,key:n.id+"_"+L,onClick:p=>l(p,n)},[a.createVNode("span",{class:D(n)},[x.shouldShowIcon(n)&&a.createVNode("i",{class:x.iconClass(n)},null),n.text])]),[[a.resolveDirective("tooltip"),P]])}return a.createVNode("li",{class:d(n),id:n.id,onClick:P=>l(P,n)},[a.createVNode("span",{class:D(n),onMouseenter:P=>f(P,n.text)},[x.shouldShowIcon(n)&&a.createVNode("i",{class:x.iconClass(n)},null),n.text])])}function o(h,n,L){n.enable&&(typeof n.onClick=="function"&&L.onClick(h,n.id),e.emit("click",h,n.id),L.split||u(h,n,L))}function S(h,n,L){h&&h.stopPropagation(),u(h,n,L)}function B(h,n){h.stopPropagation();const L=n.id;if(n.children&&n.children.length&&n.expanded&&b.has(L)){const P=b.get(L);P&&(P.expanded=!1,b.delete(L))}}function z(h,n,L){if(n.tipsEnable&&n.tipsText){const P=a.reactive({content:n.tipsText,enable:n.tipsEnable});return a.createVNode("li",{class:g(n),id:n.id,key:n.id+"_"+L,onClick:p=>o(p,n,h)},[a.withDirectives(a.createVNode("span",{class:r(n)},[x.shouldShowIcon(n)&&a.createVNode("i",{class:x.iconClass(n)},null),n.text]),[[a.resolveDirective("tooltip"),P]]),n.split&&a.createVNode("span",{class:"dropdown-toggle dropdown-toggle-split f-rt-toggle",onClick:p=>S(p,n,h)},null),C(n,n)])}return a.createVNode("li",{class:g(n),id:n.id,onClick:P=>o(P,n,h),onMouseenter:P=>f(P,n.text)},[a.createVNode("span",{class:r(n)},[x.shouldShowIcon(n)&&a.createVNode("i",{class:x.iconClass(n)},null),n.text]),n.split&&a.createVNode("span",{class:"dropdown-toggle dropdown-toggle-split f-rt-toggle",onClick:P=>S(P,n,h)},null),C(n,n)])}function O(h){return h.children.filter(n=>n.visible).map((n,L)=>n.children&&n.children.length?z(h,n,L):i(h,n,L))}function k(h,n){if(!h)return 1080;let L=-1;const P=h.children.length;for(let p=0;p<P;p++)if(h.children[p].id===n){L=p;break}return 1080+P-L}function m(h,n,L){var q,U;const P={display:h.expanded?"block":"none",position:"fixed",maxWidth:"300px",minWidth:"120px",zIndex:1080,overflowY:"auto",maxHeight:"none"},p=document.querySelector(M);if(!p)return P;const y=a.getCurrentInstance();let s=(U=(q=y==null?void 0:y.exposed)==null?void 0:q.elementRef.value)==null?void 0:U.querySelector("#"+n);if(s||(s=p==null?void 0:p.querySelector("#"+n)),!s)return P;const v=window.innerWidth,I=window.innerHeight,N=s==null?void 0:s.getClientRects();if(s&&N&&N.length){const{top:Y,width:$,left:V,right:Q,height:G}=N[0],H=Math.ceil(G+Y);P.top=`${H}px`,P.left=`${V}px`;const F=h.id+"_menu",oe=(s==null?void 0:s.querySelector("#"+F))||(p==null?void 0:p.querySelector("#"+F))||null;if(oe){oe.style.visibility="hidden",oe.style.display="block";const ae=oe.offsetHeight;P.zIndex=h.expanded?k(p,F):1080,P.display==="block"&&(oe.style.display="block");const w=oe.getBoundingClientRect();if(L){P.top=`${Y-6}px`;const T=Math.ceil($+V);P.left=`${T}px`}v-V-$<w.width&&(P.left=`${(L?V:Q)-w.width}px`),I-Y-G<ae?Y>ae?(P.top=`${Y-ae-6}px`,P.maxHeight=`${Y-16}px`):(P.maxHeight=`${I-H}px`,Y>I-Y-G&&(P.top="10px",P.maxHeight=`${Y-16}px`)):P.maxHeight=`${I-H}px`,oe.style.visibility="visible"}}return P}C=function(h,n){const L=n?n.id:h.id;return a.createVNode(a.Teleport,{to:M,disabled:!h.expanded},{default:()=>[a.createVNode("ul",{class:t(h),style:m(h,L,n),id:h.id+"_menu",onWheel:P=>B(P,h)},[O(h)])]})};function R(){b.forEach(h=>{h.expanded=!1}),b.clear()}return{renderDropdownMenu:C,clearAllDropDownMenu:R,updateContainerId:E}}function yt(e,x,t){const g=a.ref(e.alignment),{renderDropdownMenu:d,clearAllDropDownMenu:r,updateContainerId:D}=vt(x,t);function C(o){const S={"btn-group":!0,"f-rt-dropdown":!0,"f-btn-ml":g.value==="right"||g.value==="center","f-btn-mr":g.value==="left"};return X.getCustomClass(S,o.dropdownClass)}function b(o){const S={btn:!0,disabled:!o.enable,"f-rt-btn":!0,"btn-icontext":!!(o.icon&&o.icon.trim())&&o.text,"f-rt-toggle":!o.split,"dropdown-toggle":!o.split,"f-btn-icon":o.icon&&!o.text};return X.getCustomClass(S,o.class)}function M(o){const S={btn:!0,"dropdown-toggle":!0,"dropdown-toggle-split":!0};return X.getCustomClass(S,o.class)}function E(o){return o.split?{display:"flex"}:{display:"flex","border-radius":"6px"}}function u(o,S){o.stopPropagation();const B=S.expanded;document.body.click(),typeof S.onClick=="function"&&S.onClick(o,S.id),x.emit("click",o,S.id),S.split||(S.expanded=!B)}function l(o,S){o.stopPropagation();const B=S.expanded;document.body.click(),S.expanded=!B}function f(o,S=!0){if(o.tipsEnable&&o.tipsText){const B=a.reactive({content:o.tipsText,enable:o.tipsEnable});return a.createVNode("div",{id:o.id,class:C(o)},[a.withDirectives(a.createVNode("div",{class:b(o),style:E(o),onClick:z=>o.enable&&u(z,o)},[t.shouldShowIcon(o)&&a.createVNode("i",{class:t.iconClass(o)},null),o.text&&a.createVNode("span",null,[o.text])]),[[a.resolveDirective("tooltip"),B]]),o.split&&a.createVNode("button",{class:M(o),style:"border-radius:0 6px 6px 0;",onClick:z=>l(z,o)},null),S&&d(o)])}return a.createVNode("div",{id:o.id,class:C(o)},[a.createVNode("div",{class:b(o),style:E(o),onClick:B=>o.enable&&u(B,o)},[t.shouldShowIcon(o)&&a.createVNode("i",{class:t.iconClass(o)},null),o.text&&a.createVNode("span",null,[o.text])]),o.split&&a.createVNode("button",{class:M(o),style:"border-radius:0 6px 6px 0;",onClick:B=>l(B,o)},null),S&&d(o)])}function i(){r()}return{renderToolbarDropdown:f,clearAllDropDown:i,updateContainerId:D}}const{buildResponseToolbarItems:Ye}=Ue(),wt=a.defineComponent({name:"FResponseToolbar",props:gt,emits:["click"],setup(e,x){const t=a.ref(Ye(e.items)),g=a.ref(),d=a.ref(),r=a.ref(),D=X.isMobilePhone(),C={id:"__more_buttons__",text:D?"":lt.LocaleService.getLocaleValue("responseToolbar.more"),icon:D?"f-icon-more-horizontal":""},b=a.ref(new De(C)),M=Object.assign({},C,{id:C.id+"width"}),E=a.ref(-1),u=Ee();let l=!1;const{guid:f,uuid:i}=X.useGuid(),o=e.id?e.id:"toolbar-"+f(),S=a.ref(),B="dropdown-container-"+o+"-"+i(4),{renderToolbarDropdown:z,clearAllDropDown:O,updateContainerId:k}=yt(e,x,u);k(B);const m=a.computed(()=>b.value.children.length>0),R=a.computed(()=>e.visible?b.value.children.length>0?!0:t.value.findIndex(w=>w.shown&&w.children&&w.children.length>0)>-1:!1);function h(){e.visible&&!S.value&&document&&(S.value=document.createElement("div"),S.value.id=B,document.body.appendChild(S.value))}h();function n(){S.value&&document.body.contains(S.value)&&(document.body.removeChild(S.value),S.value=null)}a.watch(R,(w,T)=>{w?h():n()});const L=a.computed(()=>{const w={"f-toolbar":!0,"f-response-toolbar":!0,"position-relative":!0,"f-response-toolbar-sm":e.buttonSize==="sm","f-response-toolbar-lg":e.buttonSize==="lg","d-none":!e.visible};return X.getCustomClass(w,e.customClass)}),P=a.computed(()=>({"w-100":!0,"d-flex":!0,"flex-nowrap":!0,"justify-content-end":e.alignment==="right","justify-content-start":e.alignment==="left","justify-content-center":e.alignment==="center"}));function p(w){w&&w.target.closest("ul.dropdown-menu")&&w.type==="wheel"||(t.value.filter(T=>T.children&&T.children.length>0).forEach(T=>{T.expanded=!1}),b.value.expanded=!1,O())}function y(w,T){var ne;const A={btn:!0,"f-rt-btn":!0,"f-btn-ml":e.alignment==="right"||T>0&&e.alignment==="center","f-btn-mr":e.alignment==="left","btn-icontext":!!(w.icon&&w.icon.trim())},te=((ne=w==null?void 0:w.appearance)==null?void 0:ne.class)||w.class||"btn-secondary";return X.getCustomClass(A,te)}function s(w,T){document.body.click(),typeof T.onClick=="function"&&T.onClick(w,T.id),x.emit("click",w,T.id)}function v(w,T){if(w.tipsEnable&&w.tipsText){const A=a.reactive({content:w.tipsText,enable:w.tipsEnable});return a.withDirectives(a.createVNode("button",{type:"button",class:y(w,T),id:w.id,disabled:!w.enable,onClick:te=>s(te,w)},[u.shouldShowIcon(w)&&a.createVNode("i",{class:u.iconClass(w)},null),w.text]),[[a.resolveDirective("tooltip"),A]])}return a.createVNode("button",{type:"button",class:y(w,T),id:w.id,disabled:!w.enable,onClick:A=>s(A,w)},[u.shouldShowIcon(w)&&a.createVNode("i",{class:u.iconClass(w)},null),w.text])}let I=new Map,N=[];function q(w){const T=Math.ceil(parseFloat(getComputedStyle(w).getPropertyValue("margin-left"))),A=Math.ceil(parseFloat(getComputedStyle(w).getPropertyValue("margin-right")));return(T||0)+w.getBoundingClientRect().width+(A||0)}function U(w,T,A){if(T<E.value){let te=A-1;for(;te>=0;te--){const ne=w[te],re=q(ne);if(T+=re,T>=E.value)break}A=te}return T-=E.value,A=A<0?0:A,{start:A,space:T}}function Y(w){const T=r.value;let A=w;const ne=Array.from(T.children).filter(ce=>ce.id!=="__more_buttons__"),re=ne.length;let Ce=!1,se=0;for(;se<re;se++){const ce=ne[se],xe=q(ce);if(xe<=A)A-=xe;else{const he=U(ne,A,se);se=he.start,A=he.space,Ce=!0;break}}if(!Ce&&N.length>0){const ce=U(ne,A,se);se=ce.start,A=ce.space}const ke=N.length>0;for(;se<re;se++){const ce=ne[se],xe=q(ce);I.set(ce.id,!0);const he=N.find(Re=>Re.id===ce.id);he?he.width=xe:N[ke?"unshift":"push"]({id:ce.id,width:xe})}return A}function $(){I=new Map,N=[]}function V(w=!1){const T=Object.assign({},b.value);T.children=[];const A=new De(T),te=t.value.reduce((ne,re)=>{const Ce=e.items.find(se=>se.id===re.id);return w?(A.children.push(re),re.shown=!1,ne):(I.has(re.id)?(A.children.push(re),re.shown=!1):re.shown=Ce.visible!==!1,ne.push(re),ne)},[]);b.value=A,t.value=te}function Q(w){if(D){$(),V(!0);return}let T=Y(w);if(N.length){let A=0;for(;A<N.length;A++){const te=e.items.find(ne=>ne.id===N[A].id);if(te&&te.visible!==!1){const ne=N[A].width;if(T>=ne||A===N.length-1&&T+E.value>=ne)T-=ne;else break}}for(let te=0;te<A;te++)I.delete(N[te].id);N.splice(0,A-1)}V()}function G(){if(g.value&&E.value<0){const w=g.value.querySelector("#"+M.id);if(!w)return;w.getBoundingClientRect().width===0?E.value=-1:E.value=q(w)}}function H(w=-1){if(w===0||!r.value||!d.value)return;w<0&&(w=d.value.getBoundingClientRect().width);const T=r.value.getBoundingClientRect().width;if(D){Q(w),p();return}(w>=0&&w<T||N.length)&&(G(),Q(w),p())}function F(){return E.value<0&&a.createVNode("div",{style:"position:fixed;top:-40px;visibility:hidden;"},[z(new De(M))])}const oe=new ResizeObserver(w=>{if(w.length){if(D)return;const A=w[0].contentRect.width;H(A)}});function ae(){d.value&&!l&&(oe.observe(d.value),l=!0)}return a.onMounted(()=>{G(),H(),ae(),document.body.addEventListener("click",p),document.body.addEventListener("wheel",p)}),a.onUnmounted(()=>{oe.disconnect(),n(),document.body.removeEventListener("click",p),document.body.removeEventListener("wheel",p)}),a.watch(()=>e.items,()=>{t.value=Ye(e.items),b.value.children=[],a.nextTick(()=>{G(),$(),H()})},{deep:!0}),a.watch(()=>e.visible,w=>{w&&a.nextTick(()=>{G(),H(),ae()})}),x.expose({elementRef:g}),()=>a.createVNode("div",{class:L.value,id:o,ref:g,style:{"overflow-y":E.value<0?"hidden":"initial"}},[e.visible&&F(),e.visible&&a.createVNode("div",{ref:d,class:P.value},[a.createVNode("div",{ref:r,class:"d-inline-block f-response-content",style:"white-space: nowrap;"},[t.value.filter(w=>w.shown).map((w,T)=>w.children&&w.children.length>0?z(w):v(w,T)),m.value&&z(b.value)])])])}});class Ct extends Fe.BaseControlProperty{constructor(t,g,d="response-toolbar"){super(t,g);K(this,"toolbarType","response-toolbar");this.toolbarType=d}getPropertyConfig(t){return this.propertyConfig.categories.basic=this.getBasicPropConfig(t),this.toolbarType!=="tab-toolbar"&&this.getAppearancePropConfig(t),this.propertyConfig.categories.behavior=this.getBehaviorConfig(t),this.propertyConfig}getAppearancePropConfig(t){this.propertyConfig.categories.appearance={title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:"组件的CSS样式",$converter:"/converter/appearance.converter",parentPropertyID:"appearance"}}}}getBehaviorProperties(t){this.propertyConfig.categories.behavior={title:"行为",description:"",properties:{alignment:{title:"对齐方式",description:"在工具栏区域内按钮组的位置",type:"enum",editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中"},{value:"right",name:"右对齐"}]}}}}}}function xt(e,x,t){const g=e.schema;function d(){var o,S,B;let i=((o=e.parent)==null?void 0:o.schema.type)||"";i==="drawer"&&(((S=e.parent)==null?void 0:S.schema.headerToolbar.id)===g.id?i="drawer-header-toolbar":((B=e.parent)==null?void 0:B.schema.footerToolbar.id)===g.id&&(i="drawer-footer-toolbar")),["page-header","tabs","section","drawer-header-toolbar","drawer-footer-toolbar"].findIndex(z=>z===i)===-1&&(i=""),t.toolbarPosition=i}d();function r(i){return!1}function D(i,o){return o.text=i.label,o}function C(){return!1}function b(){return!1}function M(){return!1}function E(){return!0}function u(i){return new Ct(i,x,g.type).getPropertyConfig(g)}function l(i){var z;i&&(i.stopPropagation(),i.preventDefault());const{schema:o}=e;o.buttons||(o.buttons=[]);let S="";if(o.type)S=o.type+"-item";else switch((z=e.parent)==null?void 0:z.schema.type){case"tabs":S="tab-toolbar-item";break;case"section":S="section-toolbar-item";break;case"drawer":S="drawer-toolbar-item";break;default:S="response-toolbar-item"}const B=ue.getSchemaByType(S);B.id=`toolbar_item_${Math.random().toString().slice(2,6)}`,o.buttons.push(B),t.updateToolbarItems(),t.changeSelectedId("")}function f(){return[{id:"appendItem",title:"新增按钮",text:"",icon:"f-icon f-icon-plus-circle text-white",onClick:i=>l(i)}]}return{canAccepts:r,checkCanAddComponent:M,checkCanDeleteComponent:b,checkCanMoveComponent:C,hideNestedPaddingInDesginerView:E,onResolveNewComponentSchema:D,getPropsConfig:u,getCustomButtons:f}}var be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Se(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Xe={exports:{}};(function(e,x){(function(t){e.exports=t()})(function(){return function(){function t(g,d,r){function D(M,E){if(!d[M]){if(!g[M]){var u=typeof Se=="function"&&Se;if(!E&&u)return u(M,!0);if(C)return C(M,!0);var l=new Error("Cannot find module '"+M+"'");throw l.code="MODULE_NOT_FOUND",l}var f=d[M]={exports:{}};g[M][0].call(f.exports,function(i){var o=g[M][1][i];return D(o||i)},f,f.exports,t,g,d,r)}return d[M].exports}for(var C=typeof Se=="function"&&Se,b=0;b<r.length;b++)D(r[b]);return D}return t}()({1:[function(t,g,d){var r={},D="(?:^|\\s)",C="(?:\\s|$)";function b(u){var l=r[u];return l?l.lastIndex=0:r[u]=l=new RegExp(D+u+C,"g"),l}function M(u,l){var f=u.className;f.length?b(l).test(f)||(u.className+=" "+l):u.className=l}function E(u,l){u.className=u.className.replace(b(l)," ").trim()}g.exports={add:M,rm:E}},{}],2:[function(t,g,d){(function(r){var D=t("contra/emitter"),C=t("crossvent"),b=t("./classes"),M=document,E=M.documentElement;function u(p,y){var s=arguments.length;s===1&&Array.isArray(p)===!1&&(y=p,p=[]);var v,I,N,q,U,Y,$,V,Q,G=null,H,F,oe=!1,ae=0,w,T=y||{};T.moves===void 0&&(T.moves=z),T.accepts===void 0&&(T.accepts=z),T.invalid===void 0&&(T.invalid=$t),T.containers===void 0&&(T.containers=p||[]),T.isContainer===void 0&&(T.isContainer=B),T.copy===void 0&&(T.copy=!1),T.copySortSource===void 0&&(T.copySortSource=!1),T.revertOnSpill===void 0&&(T.revertOnSpill=!1),T.removeOnSpill===void 0&&(T.removeOnSpill=!1),T.direction===void 0&&(T.direction="vertical"),T.ignoreInputTextSelection===void 0&&(T.ignoreInputTextSelection=!0),T.mirrorContainer===void 0&&(T.mirrorContainer=M.body);var A=D({containers:T.containers,start:At,end:Ke,cancel:ot,remove:nt,destroy:se,canMove:Re,dragging:!1});return T.removeOnSpill===!0&&A.on("over",Lt).on("out",qt),ne(),A;function te(c){return A.containers.indexOf(c)!==-1||T.isContainer(c)}function ne(c){var j=c?"remove":"add";i(E,j,"mousedown",ce),i(E,j,"mouseup",Be)}function re(c){var j=c?"remove":"add";i(E,j,"mousemove",xe)}function Ce(c){var j=c?"remove":"add";C[j](E,"selectstart",ke),C[j](E,"click",ke)}function se(){ne(!0),Be({})}function ke(c){H&&c.preventDefault()}function ce(c){q=c.clientX,U=c.clientY;var j=o(c)!==1||c.metaKey||c.ctrlKey;if(!j){var _=c.target,W=he(_);W&&(H=W,re(),c.type==="mousedown"&&(R(_)?_.focus():c.preventDefault()))}}function xe(c){if(H){if(o(c)===0){Be({});return}if(!(c.clientX!==void 0&&Math.abs(c.clientX-q)<=(T.slideFactorX||0)&&c.clientY!==void 0&&Math.abs(c.clientY-U)<=(T.slideFactorY||0))){if(T.ignoreInputTextSelection){var j=P("clientX",c)||0,_=P("clientY",c)||0,W=M.elementFromPoint(j,_);if(R(W))return}var Z=H;re(!0),Ce(),Ke(),Je(Z),b.add(V||N,"gu-transit"),Wt(),Ft(),ae=0,Ae(c)}}}function he(c){if(!(A.dragging&&v)&&!te(c)){for(var j=c;m(c)&&te(m(c))===!1;)if(T.invalid(c,j)||(c=m(c),!c))return;var _=m(c);if(_&&!T.invalid(c,j)){var W=T.moves(c,_,j,n(c));if(W)return{item:c,source:_}}}}function Re(c){return!!he(c)}function At(c){var j=he(c);j&&Je(j)}function Je(c){Zt(c.item,c.source)&&(V=c.item.cloneNode(!0),A.emit("cloned",V,c.item,"copy")),I=c.source,N=c.item,Y=$=n(c.item),A.dragging=!0,A.emit("drag",N,I)}function $t(){return!1}function Ke(){if(A.dragging){var c=V||N;tt(c,m(c))}}function et(){H=!1,re(!0),Ce(!0)}function Be(c){if(et(),!!A.dragging){var j=V||N,_=P("clientX",c)||0,W=P("clientY",c)||0,Z=S(v,_,W),J=rt(Z,_,W);J&&(V&&T.copySortSource||!V||J!==I)?tt(j,J):T.removeOnSpill?nt():ot()}}function tt(c,j){var _=m(c);V&&T.copySortSource&&j===I&&_.removeChild(N),_e(j)?A.emit("cancel",c,I):A.emit("drop",c,j,I,$),Oe()}function nt(){if(A.dragging){var c=V||N,j=m(c);j&&j.removeChild(c),A.emit(V?"cancel":"remove",c,j,I),Oe()}}function ot(c){if(A.dragging){var j=arguments.length>0?c:T.revertOnSpill,_=V||N,W=m(_),Z=_e(W);Z===!1&&j&&(V?W&&W.removeChild(V):I.insertBefore(_,Y)),Z||j?A.emit("cancel",_,I,I):A.emit("drop",_,W,I,$),Oe()}}function Oe(){var c=V||N;et(),zt(),Gt(),c&&b.rm(c,"gu-transit"),Q&&clearTimeout(Q),A.dragging=!1,G&&A.emit("out",c,G,I),A.emit("dragend",c,ae),I=N=V=Y=$=Q=G=null}function _e(c,j){var _;return j!==void 0?_=j:v?_=$:_=n(V||N),c===I&&_===Y}function rt(c,j,_){for(var W=c;W&&!Z();)W=m(W);return W;function Z(){var J=te(W);if(J===!1)return!1;var ge=it(W,c),de=st(W,ge,j,_),pe=_e(W,de);return pe?!0:T.accepts(N,W,I,de)}}function Ae(c){if(!v)return;c.preventDefault();var j=P("clientX",c)||0,_=P("clientY",c)||0;v.style.left=j-2+"px",v.style.top=_-2+"px";var W=V||N,Z=S(v,j,_),J=rt(Z,j,_),ge=J!==null&&J!==G;(ge||J===null)&&(fe(),G=J,ve()),Qt(Z,_);var de=m(W);if(J===I&&V&&!T.copySortSource){de&&de.removeChild(W);return}var pe,me=it(J,Z);if(oe=Ut(me,J),me!==null)pe=st(J,me,j,_);else if(T.revertOnSpill===!0&&!V)pe=Y,J=I;else{V&&de&&de.removeChild(W),V&&F&&(F.style.display="none");return}F.style.display="block",Vt(pe,W,ge),pe?Xt(me,pe):Ht(J);function ie(le){A.emit(le,W,G,I)}function ve(){ge&&ie("over")}function fe(){G&&ie("out")}}function Vt(c,j,_){(c===j||c===n(j))&&($=n(j)),(c===null&&_||c!==j&&c!==n(j))&&($=c)}function Lt(c){b.rm(c,"gu-hide")}function qt(c){A.dragging&&b.add(c,"gu-hide")}function Ft(){v||(v=document.createElement("div"),v.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",v.innerHTML=T.getMirrorText&&T.getMirrorText(N)||"控件",b.add(v,"gu-mirror"),T.mirrorContainer.appendChild(v),i(E,"add","mousemove",Ae),b.add(T.mirrorContainer,"gu-unselectable"),A.emit("cloned",v,N,"mirror"))}function Wt(){if(F=document.createElement("div"),b.add(F,"gu-insertion"),N){var c=N.getBoundingClientRect();F.style.left=c.left+"px",F.style.top=c.top+"px"}oe=!1,T.mirrorContainer.appendChild(F)}function zt(){v&&(b.rm(T.mirrorContainer,"gu-unselectable"),i(E,"remove","mousemove",Ae),m(v).removeChild(v),v=null)}function Gt(){F&&(m(F).removeChild(F),F=null)}function it(c,j){for(var _=j;_!==c&&m(_)!==c;)_=m(_);return _===E?null:_}function Ut(c,j){if(!j)return oe;var _=c||j&&j.lastElementChild;if(!_)return!0;var W=getComputedStyle(c),Z=/^inline/.test(W.getPropertyValue("display"))||/^(left|right)$/.test(W.getPropertyValue("float"));if(Z)return!0;if(j){var J=getComputedStyle(j),ge=J.getPropertyValue("display");if(/flex$/.test(ge)){var de=J.getPropertyValue("flex-direction")||"row";if(de==="row"||de==="row-reverse")return!Yt(j)}return!1}return!0}function Yt(c){if(!c.children||!c.children.length)return!1;for(const j of Array.from(c.children)){const W=(j.className&&j.className.split(" ")||[]).filter(Z=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Z));if(!W.length)return!1;for(const Z of W){const J=Z.slice(Z.lastIndexOf("-")+1);if(parseInt(J,10)!==12)return!1}}return!0}function Xt(c,j){const _=j.getBoundingClientRect();if(F.style.left=_.left+"px",F.style.top=_.top+"px",oe){if(F.style.height=_.height+"px",F.style.width="4px",c){const W=c.getBoundingClientRect();W.top!==_.top&&(F.style.left=W.right+"px",F.style.top=W.top+"px",F.style.height=W.height+"px")}}else if(F.style.height="4px",F.style.width=_.width+"px",w){const W=w.getBoundingClientRect();_.top<W.top&&(F.style.display="none")}j===N&&N&&(F.style.display="none")}function Ht(c){$=null;var j=c.lastElementChild;if(j){var _=j.getBoundingClientRect();oe?(F.style.left=_.right+"px",F.style.top=_.top+"px",F.style.height=_.height+"px",F.style.width="4px"):(F.style.left=_.left+"px",F.style.top=_.bottom+"px",F.style.height="4px",F.style.width=_.width+"px"),j===N&&N&&(F.style.display="none")}else F.style.display="none"}function Qt(c,j){if(!T.mirrorContainer.contains(c)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(w=l(c),!w||!w.contains(c)))return;const _=document.querySelector(".dgComponentSelected"),W=w.getBoundingClientRect();if(j-30<W.top&&w.scrollTop>0){let Z=w.scrollTop<10?w.scrollTop:10;w.scrollBy(0,-1*Z),_&&w.contains(_)&&(ae=ae+-1*Z)}if(j+30>W.bottom&&w.scrollTop<w.scrollHeight-w.clientHeight){const Z=w.scrollHeight-w.clientHeight-w.scrollTop;let J=Z<10?Z:10;w.scrollBy(0,J),_&&w.contains(_)&&(ae=ae+J)}}function st(c,j,_,W){var Z=T.direction==="horizontal",J=T.direction==="mixed",ge=j!==c?pe():de();return ge;function de(){var ie=c.children.length,ve,fe,le;for(ve=0;ve<ie;ve++)if(fe=c.children[ve],le=fe.getBoundingClientRect(),Z&&le.left+le.width/2>_||!J&&!Z&&le.top+le.height/2>W||J&&le.left+le.width>_&&le.top+le.height>W)return fe;return null}function pe(){var ie=j.getBoundingClientRect();if(J){var ve=W-ie.top,fe=_-ie.left,le=ie.bottom-W,$e=ie.right-_,Ve=Math.min(fe,$e,ve,le),Le;return oe?Le=$e<fe:Le=le===Ve||$e===Ve||fe===Ve,me(Le)}return me(Z?_>ie.left+O(ie)/2:W>ie.top+k(ie)/2)}function me(ie){return ie?n(j):j}}function Zt(c,j){return typeof T.copy=="boolean"?T.copy:T.copy(c,j)}}function l(p){const y=Array.from(window.scrollContainerList);if(y.length===1){const v=Array.from(window.scrollContainerList)[0];return document.getElementById(v)}const s=f(y);for(const v of s)if(v.contains(p))return v;return null}function f(p){const y=[];return p.forEach(s=>{const v=document.getElementById(s);v&&y.push(v)}),y.sort((s,v)=>s.contains(v)?1:v.contains(s)?-1:0),y}function i(p,y,s,v){var I={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},N={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},q={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};r.navigator.pointerEnabled?C[y](p,N[s],v):r.navigator.msPointerEnabled?C[y](p,q[s],v):(C[y](p,I[s],v),C[y](p,s,v))}function o(p){if(p.touches!==void 0)return p.touches.length;if(p.which!==void 0&&p.which!==0)return p.which;if(p.buttons!==void 0)return p.buttons;var y=p.button;if(y!==void 0)return y&1?1:y&2?3:y&4?2:0}function S(p,y,s){p=p||{};var v=p.className||"",I;return p.className+=" gu-hide",I=M.elementFromPoint(y,s),p.className=v,I}function B(){return!1}function z(){return!0}function O(p){return p.width||p.right-p.left}function k(p){return p.height||p.bottom-p.top}function m(p){return p.parentNode===M?null:p.parentNode}function R(p){return p.tagName==="INPUT"||p.tagName==="TEXTAREA"||p.tagName==="SELECT"||h(p)}function h(p){return!p||p.contentEditable==="false"?!1:p.contentEditable==="true"?!0:h(m(p))}function n(p){return p.nextElementSibling||y();function y(){var s=p;do s=s.nextSibling;while(s&&s.nodeType!==1);return s}}function L(p){return p.targetTouches&&p.targetTouches.length?p.targetTouches[0]:p.changedTouches&&p.changedTouches.length?p.changedTouches[0]:p}function P(p,y){var s=L(y),v={pageX:"clientX",pageY:"clientY"};return p in v&&!(p in s)&&v[p]in s&&(p=v[p]),s[p]}g.exports=u}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(t,g,d){g.exports=function(D,C){return Array.prototype.slice.call(D,C)}},{}],4:[function(t,g,d){var r=t("ticky");g.exports=function(C,b,M){C&&r(function(){C.apply(M||null,b||[])})}},{ticky:10}],5:[function(t,g,d){var r=t("atoa"),D=t("./debounce");g.exports=function(b,M){var E=M||{},u={};return b===void 0&&(b={}),b.on=function(l,f){return u[l]?u[l].push(f):u[l]=[f],b},b.once=function(l,f){return f._once=!0,b.on(l,f),b},b.off=function(l,f){var i=arguments.length;if(i===1)delete u[l];else if(i===0)u={};else{var o=u[l];if(!o)return b;o.splice(o.indexOf(f),1)}return b},b.emit=function(){var l=r(arguments);return b.emitterSnapshot(l.shift()).apply(this,l)},b.emitterSnapshot=function(l){var f=(u[l]||[]).slice(0);return function(){var i=r(arguments),o=this||b;if(l==="error"&&E.throws!==!1&&!f.length)throw i.length===1?i[0]:i;return f.forEach(function(B){E.async?D(B,i,o):B.apply(o,i),B._once&&b.off(l,B)}),b}},b}},{"./debounce":4,atoa:3}],6:[function(t,g,d){(function(r){var D=t("custom-event"),C=t("./eventmap"),b=r.document,M=l,E=i,u=[];r.addEventListener||(M=f,E=o),g.exports={add:M,remove:E,fabricate:S};function l(m,R,h,n){return m.addEventListener(R,h,n)}function f(m,R,h){return m.attachEvent("on"+R,z(m,R,h))}function i(m,R,h,n){return m.removeEventListener(R,h,n)}function o(m,R,h){var n=O(m,R,h);if(n)return m.detachEvent("on"+R,n)}function S(m,R,h){var n=C.indexOf(R)===-1?P():L();m.dispatchEvent?m.dispatchEvent(n):m.fireEvent("on"+R,n);function L(){var p;return b.createEvent?(p=b.createEvent("Event"),p.initEvent(R,!0,!0)):b.createEventObject&&(p=b.createEventObject()),p}function P(){return new D(R,{detail:h})}}function B(m,R,h){return function(L){var P=L||r.event;P.target=P.target||P.srcElement,P.preventDefault=P.preventDefault||function(){P.returnValue=!1},P.stopPropagation=P.stopPropagation||function(){P.cancelBubble=!0},P.which=P.which||P.keyCode,h.call(m,P)}}function z(m,R,h){var n=O(m,R,h)||B(m,R,h);return u.push({wrapper:n,element:m,type:R,fn:h}),n}function O(m,R,h){var n=k(m,R,h);if(n){var L=u[n].wrapper;return u.splice(n,1),L}}function k(m,R,h){var n,L;for(n=0;n<u.length;n++)if(L=u[n],L.element===m&&L.type===R&&L.fn===h)return n}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(t,g,d){(function(r){var D=[],C="",b=/^on/;for(C in r)b.test(C)&&D.push(C.slice(2));g.exports=D}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(t,g,d){(function(r){var D=r.CustomEvent;function C(){try{var b=new D("cat",{detail:{foo:"bar"}});return b.type==="cat"&&b.detail.foo==="bar"}catch{}return!1}g.exports=C()?D:typeof document<"u"&&typeof document.createEvent=="function"?function(M,E){var u=document.createEvent("CustomEvent");return E?u.initCustomEvent(M,E.bubbles,E.cancelable,E.detail):u.initCustomEvent(M,!1,!1,void 0),u}:function(M,E){var u=document.createEventObject();return u.type=M,E?(u.bubbles=!!E.bubbles,u.cancelable=!!E.cancelable,u.detail=E.detail):(u.bubbles=!1,u.cancelable=!1,u.detail=void 0),u}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(t,g,d){var r=g.exports={},D,C;function b(){throw new Error("setTimeout has not been defined")}function M(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?D=setTimeout:D=b}catch{D=b}try{typeof clearTimeout=="function"?C=clearTimeout:C=M}catch{C=M}})();function E(k){if(D===setTimeout)return setTimeout(k,0);if((D===b||!D)&&setTimeout)return D=setTimeout,setTimeout(k,0);try{return D(k,0)}catch{try{return D.call(null,k,0)}catch{return D.call(this,k,0)}}}function u(k){if(C===clearTimeout)return clearTimeout(k);if((C===M||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(k);try{return C(k)}catch{try{return C.call(null,k)}catch{return C.call(this,k)}}}var l=[],f=!1,i,o=-1;function S(){!f||!i||(f=!1,i.length?l=i.concat(l):o=-1,l.length&&B())}function B(){if(!f){var k=E(S);f=!0;for(var m=l.length;m;){for(i=l,l=[];++o<m;)i&&i[o].run();o=-1,m=l.length}i=null,f=!1,u(k)}}r.nextTick=function(k){var m=new Array(arguments.length-1);if(arguments.length>1)for(var R=1;R<arguments.length;R++)m[R-1]=arguments[R];l.push(new z(k,m)),l.length===1&&!f&&E(B)};function z(k,m){this.fun=k,this.array=m}z.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={};function O(){}r.on=O,r.addListener=O,r.once=O,r.off=O,r.removeListener=O,r.removeAllListeners=O,r.emit=O,r.prependListener=O,r.prependOnceListener=O,r.listeners=function(k){return[]},r.binding=function(k){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(k){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],10:[function(t,g,d){(function(r){var D=typeof r=="function",C;D?C=function(b){r(b)}:C=function(b){setTimeout(b,0)},g.exports=C}).call(this,t("timers").setImmediate)},{timers:11}],11:[function(t,g,d){(function(r,D){var C=t("process/browser.js").nextTick,b=Function.prototype.apply,M=Array.prototype.slice,E={},u=0;d.setTimeout=function(){return new l(b.call(setTimeout,window,arguments),clearTimeout)},d.setInterval=function(){return new l(b.call(setInterval,window,arguments),clearInterval)},d.clearTimeout=d.clearInterval=function(f){f.close()};function l(f,i){this._id=f,this._clearFn=i}l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},d.enroll=function(f,i){clearTimeout(f._idleTimeoutId),f._idleTimeout=i},d.unenroll=function(f){clearTimeout(f._idleTimeoutId),f._idleTimeout=-1},d._unrefActive=d.active=function(f){clearTimeout(f._idleTimeoutId);var i=f._idleTimeout;i>=0&&(f._idleTimeoutId=setTimeout(function(){f._onTimeout&&f._onTimeout()},i))},d.setImmediate=typeof r=="function"?r:function(f){var i=u++,o=arguments.length<2?!1:M.call(arguments,1);return E[i]=!0,C(function(){E[i]&&(o?f.apply(null,o):f.call(null),d.clearImmediate(i))}),i},d.clearImmediate=typeof D=="function"?D:function(f){delete E[f]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Xe);var Dt=Xe.exports;const He=Tt(Dt);function St(e){let x;function t(d,r,D,C){const b=e.schema;if(!(b!=null&&b.buttons))return;let M;if(D){const f=D.getAttribute("id");M=Array.from(r.children).findIndex(i=>i.getAttribute("id")===f)}else M=Array.from(r.children).length;const E=d.getAttribute("id"),u=Array.from(r.children).findIndex(f=>f.getAttribute("id")===E),l=b.buttons[u];u!==M&&u>-1&&M>-1&&(u<M&&(M=M-1),b.buttons.splice(u,1),b.buttons.splice(M,0,l),C(),a.nextTick(()=>{const f=r.querySelector(".dgComponentSelected");f!=null&&f.className.includes("dgComponentSelected")&&(f.classList.remove("dgComponentSelected"),f.classList.remove("dgComponentFocused"),f.click()),ye.canvasChanged.value++}))}function g(d,r,D){x&&x.destroy(),!(!He||!d||!r)&&(x=He([d],{mirrorContainer:r,direction:"horizontal",getMirrorText(C){return C.innerText},moves(C,b,M){let E=!0;return M.classList.contains("dropdown-item")?(E=!1,E):(C.classList.contains("no-drag")&&(E=!1),E)}}).on("drop",(C,b,M,E)=>t(C,b,E,D)))}return{dragulaInstance:x,initDragula:g}}function kt(e,x,t){const{renderToolbarItemDesigner:g,actionHandlers:d}=t;let r;function D(O){r=O}function C(O,k=null){const m=x.value.find(R=>R.id===O.id);if(m.isDP)if(document.body.click(),typeof k=="boolean")m.expanded=k;else{const R=O.expanded;m.expanded=!R}}d.toggleDropdownMenu=C;function b(O){var m;const k={"dropdown-menu":!0};if(O.class){const R=(m=O.menuClass)==null?void 0:m.split(" ");R&&R.length&&R.reduce((h,n)=>(h[n]=!0,h),k)}return k}function M(O){var R;const k={disabled:O.disabled===!1,"dropdown-submenu":!0,"f-rt-dropdown":!0,"text-truncate":!0},m=(R=O.dropdownClass)==null?void 0:R.split(" ");return m&&m.length&&m.reduce((h,n)=>(h[n]=!0,h),k),k}function E(O){const k={disabled:!1,"dropdown-item":!0,"f-rt-btn":!0,"position-relative":!0,"farris-component":!0,"text-truncate":!0},m=(O.class||"").split(" ");return m&&m.length&&m.reduce((R,h)=>(R[h]=!0,R),k),k}let u;const l=new Map;function f(O,k,m){O.stopPropagation();const R=m?m.id:"__top_item__";if(k.children&&k.children.length&&(k.expanded=!k.expanded,k.expanded)){if(l.has(R)&&l.get(R)!==k){const h=l.get(R);h&&(h.expanded=!1,l.delete(R))}l.set(R,k)}}function i(O){var k;return(k=O.children)==null?void 0:k.map((m,R)=>m.children&&m.children.length?a.createVNode("li",{class:M(m),id:m.id},[a.createVNode("span",{class:E(m),onClick:h=>f(h,m,O)},[m.text,a.createVNode("i",{class:"f-icon f-icon-arrow-chevron-right",style:"display: inline-block;float: right;line-height: 1.25rem;"},null)]),u(m,m)]):g(m,R,!0))}function o(O){return O==="page-header"||O==="drawer-header-toolbar"}function S(O,k,m,R){const{height:L,left:P,top:p}=R[0],{width:y,height:s}=m.getBoundingClientRect(),{marginTop:v,marginBottom:I}=getComputedStyle(m),N=Math.ceil(parseFloat(v))+Math.ceil(parseFloat(I)),q=p+L,U=k==null?void 0:k.getBoundingClientRect();function Y(){let G=0,H="left";const F=U?U.right:window.innerWidth,oe=U?U.left:0;return G=F-P-10,F-P<y&&P-oe>F-P&&(H="right",G=P-oe-10),{hposition:H,maxWidth:Math.min(G,300)}}let $=0,V="bottom";if(O==="tabs"||O==="section")$=k.getBoundingClientRect().bottom-q-N-10;else{const G=U?U.bottom:window.innerHeight;$=o(O)?G-q:p,$=$-N-10,V=o(O)?"bottom":"top"}const Q=Y();return{position:V+"-"+Q.hposition,maxWidth:Q.maxWidth,maxHeight:$}}function B(O){var n,L,P,p;const k="300px",m={display:O.expanded===!0?"block":"none",position:"absolute",maxWidth:k,minWidth:"120px"};if(!(r!=null&&r.value))return m;const R=r.value.querySelector("#"+O.id),h=R==null?void 0:R.getClientRects();if(R&&h&&h.length>0){const y=R?R.querySelector("#"+O.id+"_menu"):null;if(!y||O.expanded!==!0)return m;y.style.visibility="hidden",y.style.display="block",y.style.maxHeight="auto",y.style.maxWidth=k;let s;switch(d.toolbarPosition){case"tabs":s=(n=r.value)==null?void 0:n.closest(".farris-tabs");break;case"section":s=(L=r.value)==null?void 0:L.closest(".f-section");break;case"drawer-header-toolbar":case"drawer-footer-toolbar":s=(P=r.value)==null?void 0:P.closest(".f-drawer-container");break;default:s=(p=r.value)==null?void 0:p.closest(".f-page")}const v=S(d.toolbarPosition,s,y,h),{position:I,maxHeight:N,maxWidth:q}=v;y.style.visibility="visible";const U={left:I.indexOf("left")>-1?0:"unset",right:I.indexOf("left")>-1?"unset":0,bottom:I.indexOf("bottom")>-1?"unset":"100%",top:I.indexOf("bottom")>-1?"!00%":"unset",maxWidth:q?q+"px":"300px",maxHeight:N?N+"px":"auto",overflowY:N?"auto":"unset"};Object.assign(m,U)}return m}d.changeMenuPosition=B,u=function(O,k){return a.createVNode("ul",{class:b(O),style:B(O),id:O.id+"_menu"},[i(O)])};function z(O=""){O&&l.has(O)?l.forEach((k,m)=>{m!==O&&(k.expanded=!1,l.delete(m))}):(l.forEach(k=>{k.expanded=!1}),l.clear())}return{renderDropdownMenu:u,clearAllDropDownMenu:z,setResponseToolbarRef:D}}class It extends Fe.BaseControlProperty{constructor(t,g,d="response-toolbar-item"){super(t,g);K(this,"toolbarType","response-toolbar-item");this.toolbarType=d}getPropertyConfig(t,g=!1){this.propertyConfig.categories.basic=this.getBasicPropConfig(t),this.propertyConfig.categories.basic.properties.text={title:"文本",type:"string",description:"",refreshPanelAfterChanged:!0},this.propertyConfig.categories.basic.setPropertyRelates=r=>{if(r)switch(r&&r.propertyID){case"text":{r.needRefreshControlTree=!0;break}}},this.getAppearanceProperties(t,g);const d=this.getPropertyEditorParams(t,["Const","Variable","StateMachine","Expression"],"disabled");return this.propertyConfig.categories.behavior=this.getBehaviorConfig(t,"",{disabled:{title:"禁用",type:"boolean",description:"按钮禁用状态",refreshPanelAfterChanged:!0,editor:d}}),this.getEventPropConfig(t),this.propertyConfig}getAppearanceProperties(t,g=!1){this.propertyConfig.categories.appearance={title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:"",$converter:"/converter/appearance.converter",parentPropertyID:"appearance",visible:!g},icon:{title:"图标",type:"string",description:""},split:{title:"下拉按钮分离",type:"boolean",description:"启用下拉按钮分离,可以单独点击按钮。单独点击下拉按钮展开下拉面板",visible:!!(t.children&&t.children.length>0)},tipsEnable:{title:"启用提示",type:"boolean",description:"当启用提示时,鼠标滑过按钮会有消息提示框",refreshPanelAfterChanged:!0,visible:this.toolbarType==="response-toolbar-item"},tipsText:{title:"提示消息内容",type:"string",description:"消息提示框内的展示内容",visible:t.tipsEnable===!0}}}}getEventPropConfig(t){const g=[{label:"onClick",name:"点击事件"}],d=this,r=d.eventsEditorUtils.formProperties(t,d.viewModelId,g),D=d.createBaseEventProperty(r);this.propertyConfig.categories.eventsEditor={title:"事件",hideTitle:!0,properties:D,refreshPanelAfterChanged:!0,tabId:"commands",tabName:"交互",setPropertyRelates(C,b){const M=C.propertyValue;delete t[d.viewModelId],M&&(M.setPropertyRelates=this.setPropertyRelates,d.eventsEditorUtils.saveRelatedParameters(t,d.viewModelId,M.events,M))}}}}function Me(e,x){if(!e)return!1;const t=x||[];return(t==null?void 0:t.findIndex(d=>d.id===e))===-1}function Qe(e,x){const t=x||[];let g={parentIndex:-1,itemIndex:-1};return t.some((d,r)=>{if(d.children&&d.children.length>0){const D=d.children.findIndex(C=>C.id===e);return D>-1?(g={parentIndex:r,itemIndex:D},!0):!1}}),g}function Ze(e,x){const t=x||[];let g={parentIndex:-1,itemIndex:-1};const d=t==null?void 0:t.findIndex(r=>r.id===e);return d>-1?{parent:null,item:t[d]}:(t.some((r,D)=>{if(r.children&&r.children.length>0){const C=r.children.findIndex(b=>b.id===e);return C>-1?(g={parentIndex:D,itemIndex:C},!0):!1}}),g.parentIndex<0?{parent:null,item:null}:{parent:t[g.parentIndex],item:t[g.parentIndex].children[g.itemIndex]})}function Pt(e,x){const t=x||[],g=t==null?void 0:t.findIndex(d=>d.id===e);return g>-1&&t[g].children&&t[g].children.length>0?t[g].expanded===!0:!1}function Et(e,x){let t;function g(u){const{properties:l,title:f,ignore:i}=u,o=i&&Array.isArray(i),S=Object.keys(l).reduce((B,z)=>((!o||!i.find(O=>O===z))&&(B[z]=l[z].type==="object"&&l[z].properties?g(l[z]):we.cloneDeep(l[z].default)),B),{});if(f&&(!o||!i.find(B=>B==="id"))){const B=f.toLowerCase().replace(/-/g,"_");S.id=`${B}_${Math.random().toString().slice(2,6)}`}return S}function d(u){const{properties:l,title:f,required:i}=u;if(i&&Array.isArray(i)){const o=i.reduce((S,B)=>(S[B]=l[B].type==="object"&&l[B].properties?g(l[B]):we.cloneDeep(l[B].default),S),{});if(f&&i.find(S=>S==="id")){const S=f.toLowerCase().replace(/-/g,"_");o.id=`${S}_${Math.random().toString().slice(2,6)}`}return o}return{type:f}}function r(u,l={},f){const i=e[u];if(i){let o=d(i);const S=x[u];return o=S?S({getSchemaByType:r},o,l,f):o,t!=null&&t.appendIdentifyForNewControl&&t.appendIdentifyForNewControl(o),o}return null}function D(u,l){const f=g(l);return Object.keys(f).reduce((i,o)=>(Object.prototype.hasOwnProperty.call(u,o)&&(i[o]&&we.isPlainObject(i[o])&&we.isPlainObject(u[o]||!u[o])?Object.assign(i[o],u[o]||{}):i[o]=u[o]),i),f),f}function C(u,l){return Object.keys(u).filter(i=>u[i]!=null).reduce((i,o)=>{if(l.has(o)){const S=l.get(o);if(typeof S=="string")i[S]=u[o];else{const B=S(o,u[o],u);Object.assign(i,B)}}else i[o]=u[o];return i},{})}function b(u,l,f=new Map){const i=D(u,l);return C(i,f)}function M(u){var f;const l=u.type;if(l){const i=e[l];if(!i)return u;const o=D(u,i),S=((f=u.editor)==null?void 0:f.type)||"";if(S){const B=e[S],z=D(u.editor,B);o.editor=z}return o}return u}function E(u){t=u}return{getSchemaByType:r,resolveSchemaWithDefaultValue:M,resolveSchemaToProps:b,mappingSchemaToProps:C,setDesignerContext:E}}const Mt={},Nt={},{getSchemaByType:jt}=Et(Mt,Nt);function Rt(e,x,t){function g(y){return!1}function d(){return!1}function r(){return!1}function D(){return!1}function C(){return t.toolbarContext.schema.buttons||[]}function b(y,s=""){setTimeout(()=>{var q,U;const v=(q=e.parent)==null?void 0:q.designerItemElementRef.value;let I;s&&(I=v==null?void 0:v.querySelector("#"+s));const N=(U=I||v)==null?void 0:U.querySelector("#"+y);N==null||N.click()},0)}function M(y,s){s.disabled&&s.disabled.expressionId&&(s.disabled.expressionId=`${s.id}_disabled`),s.visible&&s.visible.expressionId&&(s.visible.expressionId=`${s.id}_visible`);const v=x.formSchemaUtils.getExpressions(),I=v.find(q=>q.target===y.id);if(!I||!I.rules||!I.rules.length)return;const N={target:s.id,rules:[],targetType:"Button"};I.rules.forEach(q=>{const U=Object.assign(we.cloneDeep(q),{id:`${s.id}_${q.type}`});N.rules.push(U)}),v.push(N)}function E(){var I;const y=e.schema,s=Object.assign(we.cloneDeep(y),{id:`${e.schema.type}-cloned-${Math.random().toString(36).slice(2,6)}`,onClick:null});(I=x==null?void 0:x.designerContext)!=null&&I.appendIdentifyForNewControl&&x.designerContext.appendIdentifyForNewControl(s);let v=[];return s.children&&s.children.length&&(v=s.children.map(N=>{var U;const q=we.cloneDeep(N);return Object.assign(q,{id:`${e.schema.type}-cloned-${Math.random().toString(36).slice(2,6)}`,onClick:null}),(U=x==null?void 0:x.designerContext)!=null&&U.appendIdentifyForNewControl&&x.designerContext.appendIdentifyForNewControl(q),M(N,q),q}),s.children=v),M(y,s),s}function u(){const y=e.schema.type||"response-toolbar-item",s=jt(y),v=y.toLowerCase().replace("-","_");return s&&!s.id&&s.type===y&&(s.id=`${v}_${Math.random().toString().slice(2,6)}`,s.text="按钮"),s}function l(y){const s=C(),v=s==null?void 0:s.findIndex(N=>N.id===y),I=v===-1?null:s[v];return{index:v,toolbarItem:I}}function f(){const y=e.schema.id,s=C();return Me(y,s)}function i(y){const s=x.formSchemaUtils.getExpressions();if(!s||!s.length)return;const v=I=>{const N=s&&s.findIndex(q=>q.target===I.id);N>-1&&s.splice(N,1)};v(y),y.children&&y.children.length&&y.children.forEach(I=>{v(I)})}function o(y){t.changeSelectedId(y)}function S(y){x.formSchemaUtils.removeCommunicationInComponent(y),y.children&&y.children.length&&y.children.forEach(s=>{x.formSchemaUtils.removeCommunicationInComponent(s)})}function B(){var I,N,q;if((I=x==null?void 0:x.designerContext)!=null&&I.checkCanDeleteControl&&!x.designerContext.checkCanDeleteControl(e.schema))return;const y=C(),{parentIndex:s,itemIndex:v}=Qe(e.schema.id,y);s===-1||v===-1||(i(e.schema),S(e.schema),y[s].children.splice(v,1),t.updateToolbarItems(),(N=e.setupContext)==null||N.emit("removeComponent"),(q=e.setupContext)==null||q.emit("selectionChange"),ye.canvasChanged.value++)}function z(){var I,N,q;if((I=x==null?void 0:x.designerContext)!=null&&I.checkCanDeleteControl&&!x.designerContext.checkCanDeleteControl(e.schema))return;const y=e.schema.id,s=C(),v=s==null?void 0:s.findIndex(U=>U.id===y);v!==-1&&(i(s[v]),S(s[v]),s==null||s.splice(v,1),t.updateToolbarItems(),(N=e.setupContext)==null||N.emit("removeComponent"),(q=e.setupContext)==null||q.emit("selectionChange"),ye.canvasChanged.value++)}function O(y="Append"){var U;const s=C(),{parentIndex:v,itemIndex:I}=Qe(e.schema.id,s);if(v===-1||I===-1)return;const N=u(),q=y==="Copy"?E():Object.assign({},N);s[v].children.splice(I+1,0,q),t.updateToolbarItems(),o(q.id),(U=e.setupContext)==null||U.emit("addComponent")}function k(y,s){const{index:v}=l(s);if(v===-1)return{index:v,schema:null};const I=u(),N=y==="Copy"?E():Object.assign({},I);return{index:v,schema:N}}function m(){var I;const y=e.schema.id,{index:s,schema:v}=k("Copy",y);v&&(C().splice(s+1,0,v),t.updateToolbarItems(),b(v.id),(I=e.setupContext)==null||I.emit("addComponent"))}function R(){var I;const y=e.schema.id,{index:s,schema:v}=k("Append",y);if(v&&e.parent){const q=C()[s].children||[];q.push(v);const U=C();U[s].children=q,t.updateToolbarItems(),o(v.id),(I=e.setupContext)==null||I.emit("addComponent")}}function h(y){let s;switch(e.schema.type){case"tab-toolbar-item":s=new at.TabToolbarItemProperty(y,x);break;default:s=new It(y,x,e.schema.type)}return s.getPropertyConfig(e.schema,f())}function n(y){y.stopPropagation(),y.stopImmediatePropagation()}function L(){const y=[{id:"delete",title:"删除",text:"",icon:"f-icon-yxs_delete",onClick:s=>{n(s),f()?B():z()}},{id:"copy",title:"复制",icon:"f-icon-yxs_copy",onClick:s=>{n(s);const{activeElement:v}=document,I=v?v.tagName.toLowerCase():"";I&&I==="input"||I==="textarea"?(v==null||v.blur(),a.nextTick(()=>{f()?O("Copy"):m()})):f()?O("Copy"):m()}}];return y.push(f()?{id:"appendSiblingButton",title:"",text:"新增同级",icon:"f-icon-plus-circle",onClick:s=>{n(s),O()}}:{id:"appendChildButton",title:"",text:"新增子级",icon:"f-icon-plus-circle",onClick:s=>{n(s),R()}}),y}function P(){const{schema:y}=e;i(y)}function p(){var y,s,v,I;if(e&&x){const{formSchemaUtils:N}=x,{schema:q}=e;switch(q.type){case"response-toolbar-item":{N.getControlBasicInfoMap().set(q.id,{componentTitle:q.text,parentPathName:q.text});break}case"tab-toolbar-item":case"section-toolbar-item":case"drawer-toolbar-item":{let U;const Y=(y=e.parent)==null?void 0:y.parent;(Y==null?void 0:Y.schema.type)==="tabs"||(Y==null?void 0:Y.schema.type)==="section"||(Y==null?void 0:Y.schema.type)==="drawer"?U=(s=Y.componentInstance)==null?void 0:s.value:U=(I=(v=Y==null?void 0:Y.parent)==null?void 0:v.componentInstance)==null?void 0:I.value,U!=null&&U.setComponentBasicInfoMap&&U.setComponentBasicInfoMap()}}}}return{canAccepts:g,checkCanMoveComponent:d,checkCanDeleteComponent:r,checkCanAddComponent:D,getPropsConfig:h,getCustomButtons:L,onRemoveComponent:P,setComponentBasicInfoMap:p}}const Ne=a.defineComponent({name:"FResponseToolbarItemDesign",props:ze,emits:["Click","dropdown","clearAll"],setup(e,x){const t=a.ref(e.alignment),g=Ee(),d=a.ref(),r=a.inject("designer-host-service"),D=a.inject("design-item-context"),C=a.inject("toolbar-item-action"),b=Rt(D,r,C),M=ye.useDesignerInnerComponent(d,D,b);a.onMounted(()=>{d.value.componentInstance=M}),x.expose(M.value);function E(){const k={"f-icon":!0},m=e.icon?e.icon.trim():"";return X.getCustomClass(k,m)}function u(){return!!(e.icon&&e.icon.trim())}const l=a.computed(()=>{const k={btn:!0,"f-rt-btn":!0,"f-btn-ml":!e.isDP&&(t.value==="right"||t.value==="center"),"f-btn-mr":!e.isDP&&t.value==="left","btn-icontext":!!(e.icon&&e.icon.trim()),disabled:e.disabled===!0,"no-drag":!0,"text-truncate":!0};return X.getCustomClass(k,e.class)}),f=a.computed(()=>e.split?{display:"flex","align-items":"center"}:{display:"flex","align-items":"center","border-radius":"6px","padding-right":"0.1rem","border-top-right-radius":"6px","border-bottom-right-radius":"6px"}),i=a.computed(()=>{const k={btn:!0,"dropdown-toggle":!0,"f-btn-mr":t.value==="left","dropdown-toggle-split":!0,"no-drag":!0};return X.getCustomClass(k,e.class)}),o=a.computed(()=>{let k={btn:!e.isDPItem,disabled:e.disabled===!0,"dropdown-item":e.isDPItem,"f-rt-btn":!0,"text-truncate":!0,"btn-icontext":!e.isDPItem&&!!(e.icon&&e.icon.trim()),"dropdown-item-icontext":e.isDPItem&&!!(e.icon&&e.icon.trim()),"no-drag":!0};return e.isDPItem||(k=X.getCustomClass(k,e.class||"")),e.isDP&&(k=X.getCustomClass(k,e.dropdownClass||"")),k});function S(k,m){m&&m.stopPropagation(),x.emit(k,{id:e.id,isDP:e.isDP})}function B(){return{"btn-group":!0,"no-drag":!0,"f-rt-dropdown":!0,"f-btn-ml":t.value==="right"||t.value==="center","f-btn-mr":t.value==="left"}}function z(){return a.createVNode("div",{ref:d,"data-dragref":`${D.schema.id}-container`,class:"farris-component position-relative",style:"display:inline-block!important;"},[a.createVNode("div",{class:B(),id:e.id},[a.createVNode("div",{class:l.value,style:f.value,onClick:()=>S("clearAll")},[g.shouldShowIcon(e)&&a.createVNode("i",{class:g.iconClass(e)},null),a.createVNode("span",null,[e.text]),!e.split&&a.createVNode("span",{class:"f-icon f-icon-arrow-chevron-down",style:"margin:0 0.5rem 0 0.25rem;",onClick:k=>S("dropdown",k)},null)]),e.split&&a.createVNode("button",{class:i.value,style:"border-radius:0 6px 6px 0;",onClick:k=>S("dropdown",k)},null),C.renderDropdownMenu(e.item,e.item)])])}function O(){return a.createVNode("li",{ref:d,"data-dragref":`${D.schema.id}-container`,id:e.id,class:o.value},[g.shouldShowIcon(e)&&a.createVNode("i",{class:g.iconClass(e)},null),e.text])}return()=>e.isDP?z():e.isDPItem?O():a.createVNode("div",{ref:d,"data-dragref":`${D.schema.id}-container`,class:"farris-component position-relative",style:"display:inline-block!important;"},[a.createVNode("button",{type:"button",class:l.value,id:e.id,onClick:()=>S("clearAll")},[u()&&a.createVNode("i",{class:E()},null),e.text])])}});function Bt(e,x,t,g){function d(l,f,i,o){g.changeSelectedId((f==null?void 0:f.id)||""),t&&t.setupContext&&t.setupContext.emit("selectionChange",l,f,i,o)}function r(){}function D(l){const f=l.expanded;g.clearAllDropdown(),g.toggleDropdownMenu(l,!f)}function C(l){g.clearAllDropdown(l.isDP?l.id:"")}function b(l,f=""){const i=e.items||[],o=f||l,S=i.find(B=>B.id===o);return f?S.children.find(B=>B.id===l):S}function M(l,f=!1){if(!f)return;const i=l.target;i!=null&&i.classList.contains("dgComponentFocused")&&(i==null||i.classList.add("dgComponentSelected"))}function E(l,f=!1){if(!f)return;const i=l.target;i!=null&&i.classList.contains("dgComponentFocused")&&(i==null||i.classList.remove("dgComponentSelected"))}function u(l,f,i=!1){const o=b(l.id,l.parent),S=a.ref(o);return a.createVNode(ye.FDesignerInnerItem,{key:o.id,class:["p-0",i?"d-block no-drag":"d-inline-block"],modelValue:S.value,"onUpdate:modelValue":B=>S.value=B,canMove:!1,childType:"response-toolbar-item",childLabel:"按钮",contentKey:"buttons",componentId:e.componentId,id:o.id,onSelectionChange:d,onRemoveComponent:r,onMouseenter:B=>M(B,i),onMouseleave:B=>E(B,i)},{default:()=>{var B;return[a.createVNode(Ne,{id:o.id,disabled:o.disabled,text:o.text,icon:o.icon,isDP:l.isDP,item:l,split:o.split,isDPItem:l.isDPItem,class:((B=l.appearance)==null?void 0:B.class)||"btn-secondary",alignment:e.alignment||"right",onDropdown:()=>D(l),onClearAll:z=>C(z),componentId:e.componentId},null)]}})}return{renderToolbarItemDesigner:u,actionHandlers:g}}function je(e,x=!1,t=""){const g=[];return e.reduce((d,r)=>{if(r.children&&r.children.length>0){const D=je(r.children,!0,r.id);d.push(Object.assign({},r,{children:D,isDPItem:!1,isDP:!0,parent:"",expanded:!1}))}else d.push(Object.assign({},r,{isDPItem:x,isDP:!1,parent:t}));return d},g),g}const Te=a.defineComponent({name:"FResponseToolbarDesign",props:ft,emits:["Click"],setup(e,x){const t=a.ref(je(e.items)),g=a.ref(),d=a.ref(),r=a.ref(),D=a.ref("");let C=0;const b=15,M=a.inject("designer-host-service"),E=a.inject("design-item-context"),u={clearAllDropdown:$=>{},toggleDropdownMenu:$=>{},updateToolbarItems:()=>{},changeSelectedId:$=>{D.value=$},renderDropdownMenu:($,V)=>{},toolbarContext:E,changeMenuPosition:($,V,Q)=>({}),toolbarPosition:""},l=xt(E,M,u),f=ye.useDesignerComponent(r,E,l),i=a.inject("toolbar-item-handler"),{initDragula:o,dragulaInstance:S}=St(E),B=Ee(),z=Bt(e,d,E,u),O=kt(B,t,z),{renderToolbarItemDesigner:k}=z,{clearAllDropDownMenu:m,renderDropdownMenu:R,setResponseToolbarRef:h}=O;a.provide("toolbar-item-action",u),u.renderDropdownMenu=R,h(r),i&&(i.changeSelectedId=function($){D.value=$});function n(){const $=d.value.querySelector(".dgComponentSelected");$&&ye.setPositionForSelectedElement($)}function L(){if(D.value)if(Me(D.value,t.value)){const{parent:$,item:V}=Ze(D.value,t.value);$&&(u.toggleDropdownMenu($,!0),setTimeout(()=>{var H;const Q=r.value.querySelector("#"+$.id),G=Q==null?void 0:Q.querySelector("#"+V.id);(((H=G==null?void 0:G.parentElement)==null?void 0:H.className)||"").indexOf("dgComponentFocused")<0&&(G==null||G.click())},0))}else n()}function P($=""){t.value.filter(V=>V.id!==$&&V.children&&V.children.length>0).forEach(V=>{V.expanded=!1}),m($)}u.clearAllDropdown=P;function p(){i&&i.updateToolbarItems&&i.updateToolbarItems()}u.updateToolbarItems=p;function y($){if($){const V=r.value.querySelector("#"+$.id),Q=V.querySelector("#"+$.id+"_menu"),G=u.changeMenuPosition($,V);Object.keys(G).forEach(H=>{Q.style[H]=G[H]})}}function s(){const Q=d.value.clientWidth,G=d.value.querySelectorAll(".farris-component>.f-rt-btn");G&&G.forEach(F=>{F.style.maxWidth=Q-12+"px"});const H=d.value.querySelectorAll(".farris-component>.f-rt-dropdown");H&&H.forEach(F=>{F.querySelector(".dropdown-toggle-split")?F.querySelector(".f-rt-btn").style.maxWidth=Q-38+"px":F.style.maxWidth=Q-12+"px"})}const v=new ResizeObserver($=>{var V;if($.length){const G=$[0].contentRect.width;if(G===0){C=0;return}if(Math.abs(G-C)>b){if(C=G,Me(D.value,t.value)){const{parent:H,item:F}=Ze(D.value,t.value);y(H)}else if(Pt(D.value,t.value)){const H=(V=t.value)==null?void 0:V.find(F=>F.id===D.value);y(H)}else P();s()}}});a.onMounted(()=>{v.observe(r.value),C=r.value.clientWidth,r.value.componentInstance=f,o(d.value,g.value,p)}),a.onUnmounted(()=>{v.disconnect(),S&&S.destroy&&S.destroy()}),x.expose(f.value);const I=a.computed(()=>{const $={"f-toolbar":!0,"f-response-toolbar":!0,"position-relative":!0,"f-response-toolbar-sm":e.buttonSize==="sm","f-response-toolbar-lg":e.buttonSize==="lg"};return X.getCustomClass($,e.customClass)}),N=a.computed(()=>({"text-left":e.alignment==="left","text-right":e.alignment==="right","justify-content-end":e.alignment==="right","justify-content-start":e.alignment==="left","justify-content-center":e.alignment==="center","no-drag":!0,"w-100":!0}));a.watch(()=>e.items,()=>{t.value=je(e.items),a.nextTick(()=>{L(),s()})},{deep:!0});function q($){$&&($.stopPropagation(),$.preventDefault());const{schema:V}=E;V.buttons||(V.buttons=[]);let Q="";switch(u.toolbarPosition){case"drawer-header-toolbar":case"drawer-footer-toolbar":Q="drawer-toolbar-item";break;case"tabs":Q="tab-toolbar-item";break;case"section":Q="section-toolbar-item";break;default:Q="response-toolbar-item"}const G=ue.getSchemaByType(Q);G.id=`toolbar_item_${Math.random().toString().slice(2,6)}`,V.buttons.push(G)}function U(){return a.createVNode("li",{style:"border-width: 1px;border-style: dashed;display: inline-block;padding: 0 8px;line-height: 24px; border-radius: 3px; cursor: default;color: #B4BCCC;",onClick:q},[a.createVNode("span",{class:"f-icon f-icon-amplification mr-1",style:"font-size: 12px;"},null),a.createVNode("span",{class:"farris-tag-add-text"},[a.createTextVNode("添加按钮")])])}function Y(){return t.value.map(($,V)=>k($,V))}return()=>{var $;return a.createVNode("div",{ref:r,"data-dragref":`${E.schema.id}-container`,class:I.value,id:e.id},[a.createVNode("div",{ref:g,class:N.value,onClick:V=>P(V)},[a.createVNode("div",{ref:d,class:"d-block f-response-content"},[($=t.value)!=null&&$.length?Y():U()])])])}}}),Ot=Pe;Te.register=(e,x,t,g)=>{e["response-toolbar"]=wt,x["response-toolbar"]=Pe,g["response-toolbar"]={eventHandlerResolver:ht}},Te.registerDesigner=(e,x,t)=>{e["response-toolbar"]=Te,x["response-toolbar"]=Pe,e["response-toolbar-item"]=Ne,x["response-toolbar-item"]=pt};const _t=X.withInstall(Te);ee.FResponseToolbarDesign=Te,ee.FResponseToolbarItemDesign=Ne,ee.commonToolbarItemDesignProps=We,ee.default=_t,ee.responseToolbarResolver=Ot,ee.schemaResolver=Ie,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(ee,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("../../components/common/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js"),require("../../components/response-toolbar/index.umd.js"),require("vue"),require("../../components/locale/index.umd.js"),require("../../components/designer-canvas/index.umd.js"),require("../../components/property-panel/index.umd.js"),require("lodash-es"),require("../../components/tabs/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/common/index.umd.js","../../components/dynamic-resolver/index.umd.js","../../components/response-toolbar/index.umd.js","vue","../../components/locale/index.umd.js","../../components/designer-canvas/index.umd.js","../../components/property-panel/index.umd.js","lodash-es","../../components/tabs/index.umd.js"],X):(ee=typeof globalThis<"u"?globalThis:ee||self,X(ee["response-toolbar"]={},ee.common,ee.dynamicResolver,ee.responseToolbar,ee.Vue,ee.locale,ee.designerCanvas,ee.propertyPanel,ee.LodashES,ee.tabs))})(this,function(ee,X,ue,qe,a,lt,ye,Fe,we,at){"use strict";var Jt=Object.defineProperty;var Kt=(ee,X,ue)=>X in ee?Jt(ee,X,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ee[X]=ue;var K=(ee,X,ue)=>Kt(ee,typeof X!="symbol"?X+"":X,ue);const ct=new Map([["buttons","items"],["appearance",ue.resolveAppearance]]);function Ie(e,x,t){return x}const dt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-toolbar.schema.json",title:"response-toolbar",description:"A Farris Toolbar Component",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"response-toolbar"},appearance:{description:"",type:"object",properties:{class:{type:"string",default:""}}},alignment:{description:"The alignment of Response Toolbar Button.",type:"string",default:"right"},buttons:{description:"The items of Response Toolbar.",type:"array",default:[]},buttonSize:{type:"string",default:""},visible:{description:"",type:"boolean",default:!0}},required:["id","type","buttons"],events:{onClick:"点击事件"}},ut={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/response-toolbar-item.schema.json",title:"response-toolbar-item",description:"A Farris Toolbar Item Component",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"response-toolbar-item"},appearance:{description:"",type:"object",properties:{class:{type:"string",default:""}}},alignment:{description:"对齐",type:"string",default:"right"},text:{description:"文本",type:"string",default:"按钮"},icon:{description:"图标",type:"string",default:""},disabled:{description:"禁用",type:"boolean",default:!1},visible:{description:"是否可见",type:"boolean",default:!0},onClick:{description:"点击事件",type:"string",default:""},tipsEnable:{description:"",type:"boolean",default:!1},tipsText:{description:"",type:"string",default:""},dropdownClass:{description:"处于下拉菜单时的样式",type:"string",default:""},split:{description:"",type:"boolean",default:!1}},required:["id","type","text"],events:{onClick:"点击事件"}},ft=Object.assign({},qe.responseToolbarProps,{componentId:{type:String,default:""}}),Pe=ue.createPropsResolver(qe.responseToolbarProps,dt,ct,Ie),We={id:{type:String,default:""},item:{type:Object,default:{}},items:{type:Object,default:{}},class:{type:String,default:""},text:{type:String,default:""},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},componentId:{type:String,default:""},expanded:{type:Boolean,default:!1},alignment:{Type:String,default:"right"},split:{type:Boolean,default:!1},isDP:{type:Boolean,default:!1},isDPItem:{type:Boolean,default:!1}},ze=Object.assign({},We,{item:{type:Object,default:{}},items:{type:Object,default:{}},class:{type:String,default:"btn-secondary"},alignment:{Type:String,default:"right"}}),pt=ue.createPropsResolver(ze,ut,void 0,Ie),ht=ue.createResponseToolbarEventHandlerResolver(),gt={id:{type:String,default:""},customClass:{type:String,default:""},alignment:{Type:String,default:"right"},items:{Type:Array,default:[]},visible:{type:Boolean,default:!0}};class Ge{constructor(x){K(this,"id","");K(this,"class","btn-secondary");K(this,"icon","");K(this,"groupId","");K(this,"order",-1);K(this,"asDropDownTop",!1);K(this,"text","");K(this,"visible",!0);K(this,"shown",!0);K(this,"responsed",!1);K(this,"tipsEnable",!1);K(this,"tipsText","");K(this,"width",0);K(this,"dropdownClass","");K(this,"onClick",()=>{});K(this,"options");var g,d;this.options=x;const t=["id","class","icon","groupId","order","asDropDownTop","text","isDP","visible","responsed","width","tipsEnable","tipsText","dropdownClass","onClick"];Object.keys(x).filter(r=>t.indexOf(r)>-1).forEach(r=>{r==="visible"?this[r]=x[r]===void 0?!0:x[r]:this[r]=x[r]}),this.shown=this.visible,(g=x.appearance)!=null&&g.class&&(this.class=(d=x.appearance)==null?void 0:d.class)}get enable(){return Object.keys(this.options).indexOf("disabled")>-1?!this.options.disabled:a.computed(()=>!0)}setWidth(x){this.width=parseInt(x,10)}getWidth(){return this.visible?this.width:!1}}class bt extends Ge{constructor(x){super(x)}}function Ue(){function e(x){const t=[];return x.reduce((g,d)=>(d.children&&d.children.length>0?g.push(new De(d)):g.push(new bt(d)),g),t),t}return{buildResponseToolbarItems:e}}const{buildResponseToolbarItems:mt}=Ue();class De extends Ge{constructor(t){super(t);K(this,"placement","");K(this,"visible",!0);K(this,"dropdownClass","");K(this,"menuClass","");K(this,"split",!1);K(this,"children",[]);K(this,"expanded",!1);K(this,"shown",!0);const g=["visible","icon","isDP","class","dropdownClass","menuClass","placement","split","expanded"];Object.keys(t).filter(d=>g.indexOf(d)>-1).forEach(d=>{d==="visible"?this[d]=t[d]===void 0?!0:t[d]:this[d]=t[d]}),this.shown=this.visible,t.children&&t.children.length&&(this.children=mt(t.children))}}function Ee(){function e(t){const g={"f-icon":!0};if(t.icon){const d=t.icon.trim().split(" ");d&&d.length&&d.reduce((r,D)=>(r[D]=!0,r),g)}return g}function x(t){return!!(t.icon&&t.icon.trim())}return{iconClass:e,shouldShowIcon:x}}function vt(e,x){function t(h){const n={"dropdown-menu":!0};return X.getCustomClass(n,h.menuClass)}function g(h){const n={disabled:!h.enable,"dropdown-submenu":!0,"f-rt-dropdown":!0,"text-truncate":!0};return X.getCustomClass(n,h.dropdownClass)}function d(h){const n={disabled:!h.enable,"dropdown-item":!0,"f-rt-btn":!0,"text-truncate":!0};return X.getCustomClass(n,h.dropdownClass)}function r(h){const n={disabled:!h.enable,"dropdown-item":!0,"f-rt-btn":!0,"text-truncate":!0,"f-rt-toggle":!h.split,"btn-icontext":!!(h.icon&&h.icon.trim()),"dropdown-toggle":!h.split,"btn-secondary":!0};return X.getCustomClass(n,h.dropdownClass)}function D(h){const n={"f-rt-btn":!0,"text-truncate":!0,"btn-icontext":!!(h.icon&&h.icon.trim()),"d-block":!0};return X.getCustomClass(n,h.dropdownClass)}let C;const b=new Map;let M="";function E(h){M="#"+h}function u(h,n,L){h.stopPropagation();const P=L?L.id:"__top_item__";if(n.children&&n.children.length&&(n.expanded=!n.expanded,n.expanded)){if(b.has(P)&&b.get(P)!==n){const p=b.get(P);p&&(p.expanded=!1,b.delete(P))}b.set(P,n)}}function l(h,n){document.body.click(),n.enable&&(h.stopPropagation(),typeof n.onClick=="function"&&n.onClick(h,n.id),e.emit("click",h,n.id))}function f(h,n){const L=h.target;L.className.indexOf("dropdown-item")<0||(L.title=L.scrollWidth>L.clientWidth?n:"")}function i(h,n,L){if(n.tipsEnable&&n.tipsText){const P=a.reactive({content:n.tipsText,enable:n.tipsEnable});return a.withDirectives(a.createVNode("li",{class:d(n),id:n.id,key:n.id+"_"+L,onClick:p=>l(p,n)},[a.createVNode("span",{class:D(n)},[x.shouldShowIcon(n)&&a.createVNode("i",{class:x.iconClass(n)},null),n.text])]),[[a.resolveDirective("tooltip"),P]])}return a.createVNode("li",{class:d(n),id:n.id,onClick:P=>l(P,n)},[a.createVNode("span",{class:D(n),onMouseenter:P=>f(P,n.text)},[x.shouldShowIcon(n)&&a.createVNode("i",{class:x.iconClass(n)},null),n.text])])}function o(h,n,L){n.enable&&(typeof n.onClick=="function"&&L.onClick(h,n.id),e.emit("click",h,n.id),L.split||u(h,n,L))}function S(h,n,L){h&&h.stopPropagation(),u(h,n,L)}function B(h,n){h.stopPropagation();const L=n.id;if(n.children&&n.children.length&&n.expanded&&b.has(L)){const P=b.get(L);P&&(P.expanded=!1,b.delete(L))}}function z(h,n,L){if(n.tipsEnable&&n.tipsText){const P=a.reactive({content:n.tipsText,enable:n.tipsEnable});return a.createVNode("li",{class:g(n),id:n.id,key:n.id+"_"+L,onClick:p=>o(p,n,h)},[a.withDirectives(a.createVNode("span",{class:r(n)},[x.shouldShowIcon(n)&&a.createVNode("i",{class:x.iconClass(n)},null),n.text]),[[a.resolveDirective("tooltip"),P]]),n.split&&a.createVNode("span",{class:"dropdown-toggle dropdown-toggle-split f-rt-toggle",onClick:p=>S(p,n,h)},null),C(n,n)])}return a.createVNode("li",{class:g(n),id:n.id,onClick:P=>o(P,n,h),onMouseenter:P=>f(P,n.text)},[a.createVNode("span",{class:r(n)},[x.shouldShowIcon(n)&&a.createVNode("i",{class:x.iconClass(n)},null),n.text]),n.split&&a.createVNode("span",{class:"dropdown-toggle dropdown-toggle-split f-rt-toggle",onClick:P=>S(P,n,h)},null),C(n,n)])}function O(h){return h.children.filter(n=>n.visible).map((n,L)=>n.children&&n.children.length?z(h,n,L):i(h,n,L))}function k(h,n){if(!h)return 1080;let L=-1;const P=h.children.length;for(let p=0;p<P;p++)if(h.children[p].id===n){L=p;break}return 1080+P-L}function m(h,n,L){var q,U;const P={display:h.expanded?"block":"none",position:"fixed",maxWidth:"300px",minWidth:"120px",zIndex:1080,overflowY:"auto",maxHeight:"none"},p=document.querySelector(M);if(!p)return P;const y=a.getCurrentInstance();let s=(U=(q=y==null?void 0:y.exposed)==null?void 0:q.elementRef.value)==null?void 0:U.querySelector("#"+n);if(s||(s=p==null?void 0:p.querySelector("#"+n)),!s)return P;const v=window.innerWidth,I=window.innerHeight,N=s==null?void 0:s.getClientRects();if(s&&N&&N.length){const{top:Y,width:V,left:$,right:Q,height:G}=N[0],H=Math.ceil(G+Y);P.top=`${H}px`,P.left=`${$}px`;const F=h.id+"_menu",oe=(s==null?void 0:s.querySelector("#"+F))||(p==null?void 0:p.querySelector("#"+F))||null;if(oe){oe.style.visibility="hidden",oe.style.display="block";const ae=oe.offsetHeight;P.zIndex=h.expanded?k(p,F):1080,P.display==="block"&&(oe.style.display="block");const w=oe.getBoundingClientRect();if(L){P.top=`${Y-6}px`;const T=Math.ceil(V+$);P.left=`${T}px`}v-$-V<w.width&&(P.left=`${(L?$:Q)-w.width}px`),I-Y-G<ae?Y>ae?(P.top=`${Y-ae-6}px`,P.maxHeight=`${Y-16}px`):(P.maxHeight=`${I-H}px`,Y>I-Y-G&&(P.top="10px",P.maxHeight=`${Y-16}px`)):P.maxHeight=`${I-H}px`,oe.style.visibility="visible"}}return P}C=function(h,n){const L=n?n.id:h.id;return a.createVNode(a.Teleport,{to:M,disabled:!h.expanded},{default:()=>[a.createVNode("ul",{class:t(h),style:m(h,L,n),id:h.id+"_menu",onWheel:P=>B(P,h)},[O(h)])]})};function R(){b.forEach(h=>{h.expanded=!1}),b.clear()}return{renderDropdownMenu:C,clearAllDropDownMenu:R,updateContainerId:E}}function yt(e,x,t){const g=a.ref(e.alignment),{renderDropdownMenu:d,clearAllDropDownMenu:r,updateContainerId:D}=vt(x,t);function C(o){const S={"btn-group":!0,"f-rt-dropdown":!0,"f-btn-ml":g.value==="right"||g.value==="center","f-btn-mr":g.value==="left"};return X.getCustomClass(S,o.dropdownClass)}function b(o){const S={btn:!0,disabled:!o.enable,"f-rt-btn":!0,"btn-icontext":!!(o.icon&&o.icon.trim())&&o.text,"f-rt-toggle":!o.split,"dropdown-toggle":!o.split,"f-btn-icon":o.icon&&!o.text};return X.getCustomClass(S,o.class)}function M(o){const S={btn:!0,"dropdown-toggle":!0,"dropdown-toggle-split":!0};return X.getCustomClass(S,o.class)}function E(o){return o.split?{display:"flex"}:{display:"flex","border-radius":"6px"}}function u(o,S){o.stopPropagation();const B=S.expanded;document.body.click(),typeof S.onClick=="function"&&S.onClick(o,S.id),x.emit("click",o,S.id),S.split||(S.expanded=!B)}function l(o,S){o.stopPropagation();const B=S.expanded;document.body.click(),S.expanded=!B}function f(o,S=!0){if(o.tipsEnable&&o.tipsText){const B=a.reactive({content:o.tipsText,enable:o.tipsEnable});return a.createVNode("div",{id:o.id,class:C(o)},[a.withDirectives(a.createVNode("div",{class:b(o),style:E(o),onClick:z=>o.enable&&u(z,o)},[t.shouldShowIcon(o)&&a.createVNode("i",{class:t.iconClass(o)},null),o.text&&a.createVNode("span",null,[o.text])]),[[a.resolveDirective("tooltip"),B]]),o.split&&a.createVNode("button",{class:M(o),style:"border-radius:0 6px 6px 0;",onClick:z=>l(z,o)},null),S&&d(o)])}return a.createVNode("div",{id:o.id,class:C(o)},[a.createVNode("div",{class:b(o),style:E(o),onClick:B=>o.enable&&u(B,o)},[t.shouldShowIcon(o)&&a.createVNode("i",{class:t.iconClass(o)},null),o.text&&a.createVNode("span",null,[o.text])]),o.split&&a.createVNode("button",{class:M(o),style:"border-radius:0 6px 6px 0;",onClick:B=>l(B,o)},null),S&&d(o)])}function i(){r()}return{renderToolbarDropdown:f,clearAllDropDown:i,updateContainerId:D}}const{buildResponseToolbarItems:Ye}=Ue(),wt=a.defineComponent({name:"FResponseToolbar",props:gt,emits:["click"],setup(e,x){const t=a.ref(Ye(e.items)),g=a.ref(),d=a.ref(),r=a.ref(),D=X.isMobilePhone(),C={id:"__more_buttons__",text:D?"":lt.LocaleService.getLocaleValue("responseToolbar.more"),icon:D?"f-icon-more-horizontal":""},b=a.ref(new De(C)),M=Object.assign({},C,{id:C.id+"width"}),E=a.ref(-1),u=Ee();let l=!1;const{guid:f,uuid:i}=X.useGuid(),o=e.id?e.id:"toolbar-"+f(),S=a.ref(),B="dropdown-container-"+o+"-"+i(4),{renderToolbarDropdown:z,clearAllDropDown:O,updateContainerId:k}=yt(e,x,u);k(B);const m=a.computed(()=>b.value.children.length>0),R=a.computed(()=>e.visible?b.value.children.length>0?!0:t.value.findIndex(w=>w.shown&&w.children&&w.children.length>0)>-1:!1);function h(){e.visible&&!S.value&&document&&(S.value=document.createElement("div"),S.value.id=B,document.body.appendChild(S.value))}h();function n(){S.value&&document.body.contains(S.value)&&(document.body.removeChild(S.value),S.value=null)}a.watch(R,(w,T)=>{w?h():n()});const L=a.computed(()=>{const w={"f-toolbar":!0,"f-response-toolbar":!0,"position-relative":!0,"f-response-toolbar-sm":e.buttonSize==="sm","f-response-toolbar-lg":e.buttonSize==="lg","d-none":!e.visible};return X.getCustomClass(w,e.customClass)}),P=a.computed(()=>({"w-100":!0,"d-flex":!0,"flex-nowrap":!0,"justify-content-end":e.alignment==="right","justify-content-start":e.alignment==="left","justify-content-center":e.alignment==="center"}));function p(w){w&&w.target.closest("ul.dropdown-menu")&&w.type==="wheel"||(t.value.filter(T=>T.children&&T.children.length>0).forEach(T=>{T.expanded=!1}),b.value.expanded=!1,O())}function y(w,T){var ne;const A={btn:!0,"f-rt-btn":!0,"f-btn-ml":e.alignment==="right"||T>0&&e.alignment==="center","f-btn-mr":e.alignment==="left","btn-icontext":!!(w.icon&&w.icon.trim())},te=((ne=w==null?void 0:w.appearance)==null?void 0:ne.class)||w.class||"btn-secondary";return X.getCustomClass(A,te)}function s(w,T){document.body.click(),typeof T.onClick=="function"&&T.onClick(w,T.id),x.emit("click",w,T.id)}function v(w,T){if(w.tipsEnable&&w.tipsText){const A=a.reactive({content:w.tipsText,enable:w.tipsEnable});return a.withDirectives(a.createVNode("button",{type:"button",class:y(w,T),id:w.id,disabled:!w.enable,onClick:te=>s(te,w)},[u.shouldShowIcon(w)&&a.createVNode("i",{class:u.iconClass(w)},null),w.text]),[[a.resolveDirective("tooltip"),A]])}return a.createVNode("button",{type:"button",class:y(w,T),id:w.id,disabled:!w.enable,onClick:A=>s(A,w)},[u.shouldShowIcon(w)&&a.createVNode("i",{class:u.iconClass(w)},null),w.text])}let I=new Map,N=[];function q(w){const T=Math.ceil(parseFloat(getComputedStyle(w).getPropertyValue("margin-left"))),A=Math.ceil(parseFloat(getComputedStyle(w).getPropertyValue("margin-right")));return(T||0)+w.getBoundingClientRect().width+(A||0)}function U(w,T,A){if(T<E.value){let te=A-1;for(;te>=0;te--){const ne=w[te],re=q(ne);if(T+=re,T>=E.value)break}A=te}return T-=E.value,A=A<0?0:A,{start:A,space:T}}function Y(w){const T=r.value;let A=w;const ne=Array.from(T.children).filter(ce=>ce.id!=="__more_buttons__"),re=ne.length;let Ce=!1,se=0;for(;se<re;se++){const ce=ne[se],xe=q(ce);if(xe<=A)A-=xe;else{const he=U(ne,A,se);se=he.start,A=he.space,Ce=!0;break}}if(!Ce&&N.length>0){const ce=U(ne,A,se);se=ce.start,A=ce.space}const ke=N.length>0;for(;se<re;se++){const ce=ne[se],xe=q(ce);I.set(ce.id,!0);const he=N.find(Re=>Re.id===ce.id);he?he.width=xe:N[ke?"unshift":"push"]({id:ce.id,width:xe})}return A}function V(){I=new Map,N=[]}function $(w=!1){const T=Object.assign({},b.value);T.children=[];const A=new De(T),te=t.value.reduce((ne,re)=>{const Ce=e.items.find(se=>se.id===re.id);return w?(A.children.push(re),re.shown=!1,ne):(I.has(re.id)?(A.children.push(re),re.shown=!1):re.shown=Ce.visible!==!1,ne.push(re),ne)},[]);b.value=A,t.value=te}function Q(w){if(D){V(),$(!0);return}let T=Y(w);if(N.length){let A=0;for(;A<N.length;A++){const te=e.items.find(ne=>ne.id===N[A].id);if(te&&te.visible!==!1){const ne=N[A].width;if(T>=ne||A===N.length-1&&T+E.value>=ne)T-=ne;else break}}for(let te=0;te<A;te++)I.delete(N[te].id);N.splice(0,A-1)}$()}function G(){if(g.value&&E.value<0){const w=g.value.querySelector("#"+M.id);if(!w)return;w.getBoundingClientRect().width===0?E.value=-1:E.value=q(w)}}function H(w=-1){if(w===0||!r.value||!d.value)return;w<0&&(w=d.value.getBoundingClientRect().width);const T=r.value.getBoundingClientRect().width;if(D){Q(w),p();return}(w>=0&&w<T||N.length)&&(G(),Q(w),p())}function F(){return E.value<0&&a.createVNode("div",{style:"position:fixed;top:-40px;visibility:hidden;"},[z(new De(M))])}const oe=new ResizeObserver(w=>{if(w.length){if(D)return;const A=w[0].contentRect.width;H(A)}});function ae(){d.value&&!l&&(oe.observe(d.value),l=!0)}return a.onMounted(()=>{G(),H(),ae(),document.body.addEventListener("click",p),document.body.addEventListener("wheel",p)}),a.onUnmounted(()=>{oe.disconnect(),n(),document.body.removeEventListener("click",p),document.body.removeEventListener("wheel",p)}),a.watch(()=>e.items,()=>{t.value=Ye(e.items),b.value.children=[],a.nextTick(()=>{G(),V(),H()})},{deep:!0}),a.watch(()=>e.visible,w=>{w&&a.nextTick(()=>{G(),H(),ae()})}),x.expose({elementRef:g}),()=>a.createVNode("div",{class:L.value,id:o,ref:g,style:{"overflow-y":E.value<0?"hidden":"initial"}},[e.visible&&F(),e.visible&&a.createVNode("div",{ref:d,class:P.value},[a.createVNode("div",{ref:r,class:"d-inline-block f-response-content",style:"white-space: nowrap;"},[t.value.filter(w=>w.shown).map((w,T)=>w.children&&w.children.length>0?z(w):v(w,T)),m.value&&z(b.value)])])])}});class Ct extends Fe.BaseControlProperty{constructor(t,g,d="response-toolbar"){super(t,g);K(this,"toolbarType","response-toolbar");this.toolbarType=d}getPropertyConfig(t){return this.propertyConfig.categories.basic=this.getBasicPropConfig(t),this.toolbarType!=="tab-toolbar"&&this.getAppearancePropConfig(t),this.propertyConfig.categories.behavior=this.getBehaviorConfig(t),this.propertyConfig}getAppearancePropConfig(t){this.propertyConfig.categories.appearance={title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:"组件的CSS样式",$converter:"/converter/appearance.converter",parentPropertyID:"appearance"}}}}getBehaviorProperties(t){this.propertyConfig.categories.behavior={title:"行为",description:"",properties:{alignment:{title:"对齐方式",description:"在工具栏区域内按钮组的位置",type:"enum",editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中"},{value:"right",name:"右对齐"}]}}}}}}function xt(e,x,t){const g=e.schema;function d(){var o,S,B;let i=((o=e.parent)==null?void 0:o.schema.type)||"";i==="drawer"&&(((S=e.parent)==null?void 0:S.schema.headerToolbar.id)===g.id?i="drawer-header-toolbar":((B=e.parent)==null?void 0:B.schema.footerToolbar.id)===g.id&&(i="drawer-footer-toolbar")),["page-header","tabs","section","drawer-header-toolbar","drawer-footer-toolbar"].findIndex(z=>z===i)===-1&&(i=""),t.toolbarPosition=i}d();function r(i){return!1}function D(i,o){return o.text=i.label,o}function C(){return!1}function b(){return!1}function M(){return!1}function E(){return!0}function u(i){return new Ct(i,x,g.type).getPropertyConfig(g)}function l(i){var z;i&&(i.stopPropagation(),i.preventDefault());const{schema:o}=e;o.buttons||(o.buttons=[]);let S="";if(o.type)S=o.type+"-item";else switch((z=e.parent)==null?void 0:z.schema.type){case"tabs":S="tab-toolbar-item";break;case"section":S="section-toolbar-item";break;case"drawer":S="drawer-toolbar-item";break;default:S="response-toolbar-item"}const B=ue.getSchemaByType(S);B.id=`toolbar_item_${Math.random().toString().slice(2,6)}`,o.buttons.push(B),t.updateToolbarItems(),t.changeSelectedId("")}function f(){return[{id:"appendItem",title:"新增按钮",text:"",icon:"f-icon f-icon-plus-circle text-white",onClick:i=>l(i)}]}return{canAccepts:r,checkCanAddComponent:M,checkCanDeleteComponent:b,checkCanMoveComponent:C,hideNestedPaddingInDesginerView:E,onResolveNewComponentSchema:D,getPropsConfig:u,getCustomButtons:f}}var be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Se(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Xe={exports:{}};(function(e,x){(function(t){e.exports=t()})(function(){return function(){function t(g,d,r){function D(M,E){if(!d[M]){if(!g[M]){var u=typeof Se=="function"&&Se;if(!E&&u)return u(M,!0);if(C)return C(M,!0);var l=new Error("Cannot find module '"+M+"'");throw l.code="MODULE_NOT_FOUND",l}var f=d[M]={exports:{}};g[M][0].call(f.exports,function(i){var o=g[M][1][i];return D(o||i)},f,f.exports,t,g,d,r)}return d[M].exports}for(var C=typeof Se=="function"&&Se,b=0;b<r.length;b++)D(r[b]);return D}return t}()({1:[function(t,g,d){var r={},D="(?:^|\\s)",C="(?:\\s|$)";function b(u){var l=r[u];return l?l.lastIndex=0:r[u]=l=new RegExp(D+u+C,"g"),l}function M(u,l){var f=u.className;f.length?b(l).test(f)||(u.className+=" "+l):u.className=l}function E(u,l){u.className=u.className.replace(b(l)," ").trim()}g.exports={add:M,rm:E}},{}],2:[function(t,g,d){(function(r){var D=t("contra/emitter"),C=t("crossvent"),b=t("./classes"),M=document,E=M.documentElement;function u(p,y){var s=arguments.length;s===1&&Array.isArray(p)===!1&&(y=p,p=[]);var v,I,N,q,U,Y,V,$,Q,G=null,H,F,oe=!1,ae=0,w,T=y||{};T.moves===void 0&&(T.moves=z),T.accepts===void 0&&(T.accepts=z),T.invalid===void 0&&(T.invalid=Vt),T.containers===void 0&&(T.containers=p||[]),T.isContainer===void 0&&(T.isContainer=B),T.copy===void 0&&(T.copy=!1),T.copySortSource===void 0&&(T.copySortSource=!1),T.revertOnSpill===void 0&&(T.revertOnSpill=!1),T.removeOnSpill===void 0&&(T.removeOnSpill=!1),T.direction===void 0&&(T.direction="vertical"),T.ignoreInputTextSelection===void 0&&(T.ignoreInputTextSelection=!0),T.mirrorContainer===void 0&&(T.mirrorContainer=M.body);var A=D({containers:T.containers,start:At,end:Ke,cancel:ot,remove:nt,destroy:se,canMove:Re,dragging:!1});return T.removeOnSpill===!0&&A.on("over",Lt).on("out",qt),ne(),A;function te(c){return A.containers.indexOf(c)!==-1||T.isContainer(c)}function ne(c){var j=c?"remove":"add";i(E,j,"mousedown",ce),i(E,j,"mouseup",Be)}function re(c){var j=c?"remove":"add";i(E,j,"mousemove",xe)}function Ce(c){var j=c?"remove":"add";C[j](E,"selectstart",ke),C[j](E,"click",ke)}function se(){ne(!0),Be({})}function ke(c){H&&c.preventDefault()}function ce(c){q=c.clientX,U=c.clientY;var j=o(c)!==1||c.metaKey||c.ctrlKey;if(!j){var _=c.target,W=he(_);W&&(H=W,re(),c.type==="mousedown"&&(R(_)?_.focus():c.preventDefault()))}}function xe(c){if(H){if(o(c)===0){Be({});return}if(!(c.clientX!==void 0&&Math.abs(c.clientX-q)<=(T.slideFactorX||0)&&c.clientY!==void 0&&Math.abs(c.clientY-U)<=(T.slideFactorY||0))){if(T.ignoreInputTextSelection){var j=P("clientX",c)||0,_=P("clientY",c)||0,W=M.elementFromPoint(j,_);if(R(W))return}var Z=H;re(!0),Ce(),Ke(),Je(Z),b.add($||N,"gu-transit"),Wt(),Ft(),ae=0,Ae(c)}}}function he(c){if(!(A.dragging&&v)&&!te(c)){for(var j=c;m(c)&&te(m(c))===!1;)if(T.invalid(c,j)||(c=m(c),!c))return;var _=m(c);if(_&&!T.invalid(c,j)){var W=T.moves(c,_,j,n(c));if(W)return{item:c,source:_}}}}function Re(c){return!!he(c)}function At(c){var j=he(c);j&&Je(j)}function Je(c){Zt(c.item,c.source)&&($=c.item.cloneNode(!0),A.emit("cloned",$,c.item,"copy")),I=c.source,N=c.item,Y=V=n(c.item),A.dragging=!0,A.emit("drag",N,I)}function Vt(){return!1}function Ke(){if(A.dragging){var c=$||N;tt(c,m(c))}}function et(){H=!1,re(!0),Ce(!0)}function Be(c){if(et(),!!A.dragging){var j=$||N,_=P("clientX",c)||0,W=P("clientY",c)||0,Z=S(v,_,W),J=rt(Z,_,W);J&&($&&T.copySortSource||!$||J!==I)?tt(j,J):T.removeOnSpill?nt():ot()}}function tt(c,j){var _=m(c);$&&T.copySortSource&&j===I&&_.removeChild(N),_e(j)?A.emit("cancel",c,I):A.emit("drop",c,j,I,V),Oe()}function nt(){if(A.dragging){var c=$||N,j=m(c);j&&j.removeChild(c),A.emit($?"cancel":"remove",c,j,I),Oe()}}function ot(c){if(A.dragging){var j=arguments.length>0?c:T.revertOnSpill,_=$||N,W=m(_),Z=_e(W);Z===!1&&j&&($?W&&W.removeChild($):I.insertBefore(_,Y)),Z||j?A.emit("cancel",_,I,I):A.emit("drop",_,W,I,V),Oe()}}function Oe(){var c=$||N;et(),zt(),Gt(),c&&b.rm(c,"gu-transit"),Q&&clearTimeout(Q),A.dragging=!1,G&&A.emit("out",c,G,I),A.emit("dragend",c,ae),I=N=$=Y=V=Q=G=null}function _e(c,j){var _;return j!==void 0?_=j:v?_=V:_=n($||N),c===I&&_===Y}function rt(c,j,_){for(var W=c;W&&!Z();)W=m(W);return W;function Z(){var J=te(W);if(J===!1)return!1;var ge=it(W,c),de=st(W,ge,j,_),pe=_e(W,de);return pe?!0:T.accepts(N,W,I,de)}}function Ae(c){if(!v)return;c.preventDefault();var j=P("clientX",c)||0,_=P("clientY",c)||0;v.style.left=j-2+"px",v.style.top=_-2+"px";var W=$||N,Z=S(v,j,_),J=rt(Z,j,_),ge=J!==null&&J!==G;(ge||J===null)&&(fe(),G=J,ve()),Qt(Z,_);var de=m(W);if(J===I&&$&&!T.copySortSource){de&&de.removeChild(W);return}var pe,me=it(J,Z);if(oe=Ut(me,J),me!==null)pe=st(J,me,j,_);else if(T.revertOnSpill===!0&&!$)pe=Y,J=I;else{$&&de&&de.removeChild(W),$&&F&&(F.style.display="none");return}F.style.display="block",$t(pe,W,ge),pe?Xt(me,pe):Ht(J);function ie(le){A.emit(le,W,G,I)}function ve(){ge&&ie("over")}function fe(){G&&ie("out")}}function $t(c,j,_){(c===j||c===n(j))&&(V=n(j)),(c===null&&_||c!==j&&c!==n(j))&&(V=c)}function Lt(c){b.rm(c,"gu-hide")}function qt(c){A.dragging&&b.add(c,"gu-hide")}function Ft(){v||(v=document.createElement("div"),v.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",v.innerHTML=T.getMirrorText&&T.getMirrorText(N)||"控件",b.add(v,"gu-mirror"),T.mirrorContainer.appendChild(v),i(E,"add","mousemove",Ae),b.add(T.mirrorContainer,"gu-unselectable"),A.emit("cloned",v,N,"mirror"))}function Wt(){if(F=document.createElement("div"),b.add(F,"gu-insertion"),N){var c=N.getBoundingClientRect();F.style.left=c.left+"px",F.style.top=c.top+"px"}oe=!1,T.mirrorContainer.appendChild(F)}function zt(){v&&(b.rm(T.mirrorContainer,"gu-unselectable"),i(E,"remove","mousemove",Ae),m(v).removeChild(v),v=null)}function Gt(){F&&(m(F).removeChild(F),F=null)}function it(c,j){for(var _=j;_!==c&&m(_)!==c;)_=m(_);return _===E?null:_}function Ut(c,j){if(!j)return oe;var _=c||j&&j.lastElementChild;if(!_)return!0;var W=getComputedStyle(c),Z=/^inline/.test(W.getPropertyValue("display"))||/^(left|right)$/.test(W.getPropertyValue("float"));if(Z)return!0;if(j){var J=getComputedStyle(j),ge=J.getPropertyValue("display");if(/flex$/.test(ge)){var de=J.getPropertyValue("flex-direction")||"row";if(de==="row"||de==="row-reverse")return!Yt(j)}return!1}return!0}function Yt(c){if(!c.children||!c.children.length)return!1;for(const j of Array.from(c.children)){const W=(j.className&&j.className.split(" ")||[]).filter(Z=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(Z));if(!W.length)return!1;for(const Z of W){const J=Z.slice(Z.lastIndexOf("-")+1);if(parseInt(J,10)!==12)return!1}}return!0}function Xt(c,j){const _=j.getBoundingClientRect();if(F.style.left=_.left+"px",F.style.top=_.top+"px",oe){if(F.style.height=_.height+"px",F.style.width="4px",c){const W=c.getBoundingClientRect();W.top!==_.top&&(F.style.left=W.right+"px",F.style.top=W.top+"px",F.style.height=W.height+"px")}}else if(F.style.height="4px",F.style.width=_.width+"px",w){const W=w.getBoundingClientRect();_.top<W.top&&(F.style.display="none")}j===N&&N&&(F.style.display="none")}function Ht(c){V=null;var j=c.lastElementChild;if(j){var _=j.getBoundingClientRect();oe?(F.style.left=_.right+"px",F.style.top=_.top+"px",F.style.height=_.height+"px",F.style.width="4px"):(F.style.left=_.left+"px",F.style.top=_.bottom+"px",F.style.height="4px",F.style.width=_.width+"px"),j===N&&N&&(F.style.display="none")}else F.style.display="none"}function Qt(c,j){if(!T.mirrorContainer.contains(c)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(w=l(c),!w||!w.contains(c)))return;const _=document.querySelector(".dgComponentSelected"),W=w.getBoundingClientRect();if(j-30<W.top&&w.scrollTop>0){let Z=w.scrollTop<10?w.scrollTop:10;w.scrollBy(0,-1*Z),_&&w.contains(_)&&(ae=ae+-1*Z)}if(j+30>W.bottom&&w.scrollTop<w.scrollHeight-w.clientHeight){const Z=w.scrollHeight-w.clientHeight-w.scrollTop;let J=Z<10?Z:10;w.scrollBy(0,J),_&&w.contains(_)&&(ae=ae+J)}}function st(c,j,_,W){var Z=T.direction==="horizontal",J=T.direction==="mixed",ge=j!==c?pe():de();return ge;function de(){var ie=c.children.length,ve,fe,le;for(ve=0;ve<ie;ve++)if(fe=c.children[ve],le=fe.getBoundingClientRect(),Z&&le.left+le.width/2>_||!J&&!Z&&le.top+le.height/2>W||J&&le.left+le.width>_&&le.top+le.height>W)return fe;return null}function pe(){var ie=j.getBoundingClientRect();if(J){var ve=W-ie.top,fe=_-ie.left,le=ie.bottom-W,Ve=ie.right-_,$e=Math.min(fe,Ve,ve,le),Le;return oe?Le=Ve<fe:Le=le===$e||Ve===$e||fe===$e,me(Le)}return me(Z?_>ie.left+O(ie)/2:W>ie.top+k(ie)/2)}function me(ie){return ie?n(j):j}}function Zt(c,j){return typeof T.copy=="boolean"?T.copy:T.copy(c,j)}}function l(p){const y=Array.from(window.scrollContainerList);if(y.length===1){const v=Array.from(window.scrollContainerList)[0];return document.getElementById(v)}const s=f(y);for(const v of s)if(v.contains(p))return v;return null}function f(p){const y=[];return p.forEach(s=>{const v=document.getElementById(s);v&&y.push(v)}),y.sort((s,v)=>s.contains(v)?1:v.contains(s)?-1:0),y}function i(p,y,s,v){var I={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},N={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},q={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};r.navigator.pointerEnabled?C[y](p,N[s],v):r.navigator.msPointerEnabled?C[y](p,q[s],v):(C[y](p,I[s],v),C[y](p,s,v))}function o(p){if(p.touches!==void 0)return p.touches.length;if(p.which!==void 0&&p.which!==0)return p.which;if(p.buttons!==void 0)return p.buttons;var y=p.button;if(y!==void 0)return y&1?1:y&2?3:y&4?2:0}function S(p,y,s){p=p||{};var v=p.className||"",I;return p.className+=" gu-hide",I=M.elementFromPoint(y,s),p.className=v,I}function B(){return!1}function z(){return!0}function O(p){return p.width||p.right-p.left}function k(p){return p.height||p.bottom-p.top}function m(p){return p.parentNode===M?null:p.parentNode}function R(p){return p.tagName==="INPUT"||p.tagName==="TEXTAREA"||p.tagName==="SELECT"||h(p)}function h(p){return!p||p.contentEditable==="false"?!1:p.contentEditable==="true"?!0:h(m(p))}function n(p){return p.nextElementSibling||y();function y(){var s=p;do s=s.nextSibling;while(s&&s.nodeType!==1);return s}}function L(p){return p.targetTouches&&p.targetTouches.length?p.targetTouches[0]:p.changedTouches&&p.changedTouches.length?p.changedTouches[0]:p}function P(p,y){var s=L(y),v={pageX:"clientX",pageY:"clientY"};return p in v&&!(p in s)&&v[p]in s&&(p=v[p]),s[p]}g.exports=u}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(t,g,d){g.exports=function(D,C){return Array.prototype.slice.call(D,C)}},{}],4:[function(t,g,d){var r=t("ticky");g.exports=function(C,b,M){C&&r(function(){C.apply(M||null,b||[])})}},{ticky:10}],5:[function(t,g,d){var r=t("atoa"),D=t("./debounce");g.exports=function(b,M){var E=M||{},u={};return b===void 0&&(b={}),b.on=function(l,f){return u[l]?u[l].push(f):u[l]=[f],b},b.once=function(l,f){return f._once=!0,b.on(l,f),b},b.off=function(l,f){var i=arguments.length;if(i===1)delete u[l];else if(i===0)u={};else{var o=u[l];if(!o)return b;o.splice(o.indexOf(f),1)}return b},b.emit=function(){var l=r(arguments);return b.emitterSnapshot(l.shift()).apply(this,l)},b.emitterSnapshot=function(l){var f=(u[l]||[]).slice(0);return function(){var i=r(arguments),o=this||b;if(l==="error"&&E.throws!==!1&&!f.length)throw i.length===1?i[0]:i;return f.forEach(function(B){E.async?D(B,i,o):B.apply(o,i),B._once&&b.off(l,B)}),b}},b}},{"./debounce":4,atoa:3}],6:[function(t,g,d){(function(r){var D=t("custom-event"),C=t("./eventmap"),b=r.document,M=l,E=i,u=[];r.addEventListener||(M=f,E=o),g.exports={add:M,remove:E,fabricate:S};function l(m,R,h,n){return m.addEventListener(R,h,n)}function f(m,R,h){return m.attachEvent("on"+R,z(m,R,h))}function i(m,R,h,n){return m.removeEventListener(R,h,n)}function o(m,R,h){var n=O(m,R,h);if(n)return m.detachEvent("on"+R,n)}function S(m,R,h){var n=C.indexOf(R)===-1?P():L();m.dispatchEvent?m.dispatchEvent(n):m.fireEvent("on"+R,n);function L(){var p;return b.createEvent?(p=b.createEvent("Event"),p.initEvent(R,!0,!0)):b.createEventObject&&(p=b.createEventObject()),p}function P(){return new D(R,{detail:h})}}function B(m,R,h){return function(L){var P=L||r.event;P.target=P.target||P.srcElement,P.preventDefault=P.preventDefault||function(){P.returnValue=!1},P.stopPropagation=P.stopPropagation||function(){P.cancelBubble=!0},P.which=P.which||P.keyCode,h.call(m,P)}}function z(m,R,h){var n=O(m,R,h)||B(m,R,h);return u.push({wrapper:n,element:m,type:R,fn:h}),n}function O(m,R,h){var n=k(m,R,h);if(n){var L=u[n].wrapper;return u.splice(n,1),L}}function k(m,R,h){var n,L;for(n=0;n<u.length;n++)if(L=u[n],L.element===m&&L.type===R&&L.fn===h)return n}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(t,g,d){(function(r){var D=[],C="",b=/^on/;for(C in r)b.test(C)&&D.push(C.slice(2));g.exports=D}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(t,g,d){(function(r){var D=r.CustomEvent;function C(){try{var b=new D("cat",{detail:{foo:"bar"}});return b.type==="cat"&&b.detail.foo==="bar"}catch{}return!1}g.exports=C()?D:typeof document<"u"&&typeof document.createEvent=="function"?function(M,E){var u=document.createEvent("CustomEvent");return E?u.initCustomEvent(M,E.bubbles,E.cancelable,E.detail):u.initCustomEvent(M,!1,!1,void 0),u}:function(M,E){var u=document.createEventObject();return u.type=M,E?(u.bubbles=!!E.bubbles,u.cancelable=!!E.cancelable,u.detail=E.detail):(u.bubbles=!1,u.cancelable=!1,u.detail=void 0),u}}).call(this,typeof be<"u"?be:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(t,g,d){var r=g.exports={},D,C;function b(){throw new Error("setTimeout has not been defined")}function M(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?D=setTimeout:D=b}catch{D=b}try{typeof clearTimeout=="function"?C=clearTimeout:C=M}catch{C=M}})();function E(k){if(D===setTimeout)return setTimeout(k,0);if((D===b||!D)&&setTimeout)return D=setTimeout,setTimeout(k,0);try{return D(k,0)}catch{try{return D.call(null,k,0)}catch{return D.call(this,k,0)}}}function u(k){if(C===clearTimeout)return clearTimeout(k);if((C===M||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(k);try{return C(k)}catch{try{return C.call(null,k)}catch{return C.call(this,k)}}}var l=[],f=!1,i,o=-1;function S(){!f||!i||(f=!1,i.length?l=i.concat(l):o=-1,l.length&&B())}function B(){if(!f){var k=E(S);f=!0;for(var m=l.length;m;){for(i=l,l=[];++o<m;)i&&i[o].run();o=-1,m=l.length}i=null,f=!1,u(k)}}r.nextTick=function(k){var m=new Array(arguments.length-1);if(arguments.length>1)for(var R=1;R<arguments.length;R++)m[R-1]=arguments[R];l.push(new z(k,m)),l.length===1&&!f&&E(B)};function z(k,m){this.fun=k,this.array=m}z.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={};function O(){}r.on=O,r.addListener=O,r.once=O,r.off=O,r.removeListener=O,r.removeAllListeners=O,r.emit=O,r.prependListener=O,r.prependOnceListener=O,r.listeners=function(k){return[]},r.binding=function(k){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(k){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],10:[function(t,g,d){(function(r){var D=typeof r=="function",C;D?C=function(b){r(b)}:C=function(b){setTimeout(b,0)},g.exports=C}).call(this,t("timers").setImmediate)},{timers:11}],11:[function(t,g,d){(function(r,D){var C=t("process/browser.js").nextTick,b=Function.prototype.apply,M=Array.prototype.slice,E={},u=0;d.setTimeout=function(){return new l(b.call(setTimeout,window,arguments),clearTimeout)},d.setInterval=function(){return new l(b.call(setInterval,window,arguments),clearInterval)},d.clearTimeout=d.clearInterval=function(f){f.close()};function l(f,i){this._id=f,this._clearFn=i}l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},d.enroll=function(f,i){clearTimeout(f._idleTimeoutId),f._idleTimeout=i},d.unenroll=function(f){clearTimeout(f._idleTimeoutId),f._idleTimeout=-1},d._unrefActive=d.active=function(f){clearTimeout(f._idleTimeoutId);var i=f._idleTimeout;i>=0&&(f._idleTimeoutId=setTimeout(function(){f._onTimeout&&f._onTimeout()},i))},d.setImmediate=typeof r=="function"?r:function(f){var i=u++,o=arguments.length<2?!1:M.call(arguments,1);return E[i]=!0,C(function(){E[i]&&(o?f.apply(null,o):f.call(null),d.clearImmediate(i))}),i},d.clearImmediate=typeof D=="function"?D:function(f){delete E[f]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Xe);var Dt=Xe.exports;const He=Tt(Dt);function St(e){let x;function t(d,r,D,C){const b=e.schema;if(!(b!=null&&b.buttons))return;let M;if(D){const f=D.getAttribute("id");M=Array.from(r.children).findIndex(i=>i.getAttribute("id")===f)}else M=Array.from(r.children).length;const E=d.getAttribute("id"),u=Array.from(r.children).findIndex(f=>f.getAttribute("id")===E),l=b.buttons[u];u!==M&&u>-1&&M>-1&&(u<M&&(M=M-1),b.buttons.splice(u,1),b.buttons.splice(M,0,l),C(),a.nextTick(()=>{const f=r.querySelector(".dgComponentSelected");f!=null&&f.className.includes("dgComponentSelected")&&(f.classList.remove("dgComponentSelected"),f.classList.remove("dgComponentFocused"),f.click()),ye.canvasChanged.value++}))}function g(d,r,D){x&&x.destroy(),!(!He||!d||!r)&&(x=He([d],{mirrorContainer:r,direction:"horizontal",getMirrorText(C){return C.innerText},moves(C,b,M){let E=!0;return M.classList.contains("dropdown-item")?(E=!1,E):(C.classList.contains("no-drag")&&(E=!1),E)}}).on("drop",(C,b,M,E)=>t(C,b,E,D)))}return{dragulaInstance:x,initDragula:g}}function kt(e,x,t){const{renderToolbarItemDesigner:g,actionHandlers:d}=t;let r;function D(O){r=O}function C(O,k=null){const m=x.value.find(R=>R.id===O.id);if(m.isDP)if(document.body.click(),typeof k=="boolean")m.expanded=k;else{const R=O.expanded;m.expanded=!R}}d.toggleDropdownMenu=C;function b(O){var m;const k={"dropdown-menu":!0};if(O.class){const R=(m=O.menuClass)==null?void 0:m.split(" ");R&&R.length&&R.reduce((h,n)=>(h[n]=!0,h),k)}return k}function M(O){var R;const k={disabled:O.disabled===!1,"dropdown-submenu":!0,"f-rt-dropdown":!0,"text-truncate":!0},m=(R=O.dropdownClass)==null?void 0:R.split(" ");return m&&m.length&&m.reduce((h,n)=>(h[n]=!0,h),k),k}function E(O){const k={disabled:!1,"dropdown-item":!0,"f-rt-btn":!0,"position-relative":!0,"farris-component":!0,"text-truncate":!0},m=(O.class||"").split(" ");return m&&m.length&&m.reduce((R,h)=>(R[h]=!0,R),k),k}let u;const l=new Map;function f(O,k,m){O.stopPropagation();const R=m?m.id:"__top_item__";if(k.children&&k.children.length&&(k.expanded=!k.expanded,k.expanded)){if(l.has(R)&&l.get(R)!==k){const h=l.get(R);h&&(h.expanded=!1,l.delete(R))}l.set(R,k)}}function i(O){var k;return(k=O.children)==null?void 0:k.map((m,R)=>m.children&&m.children.length?a.createVNode("li",{class:M(m),id:m.id},[a.createVNode("span",{class:E(m),onClick:h=>f(h,m,O)},[m.text,a.createVNode("i",{class:"f-icon f-icon-arrow-chevron-right",style:"display: inline-block;float: right;line-height: 1.25rem;"},null)]),u(m,m)]):g(m,R,!0))}function o(O){return O==="page-header"||O==="drawer-header-toolbar"}function S(O,k,m,R){const{height:L,left:P,top:p}=R[0],{width:y,height:s}=m.getBoundingClientRect(),{marginTop:v,marginBottom:I}=getComputedStyle(m),N=Math.ceil(parseFloat(v))+Math.ceil(parseFloat(I)),q=p+L,U=k==null?void 0:k.getBoundingClientRect();function Y(){let G=0,H="left";const F=U?U.right:window.innerWidth,oe=U?U.left:0;return G=F-P-10,F-P<y&&P-oe>F-P&&(H="right",G=P-oe-10),{hposition:H,maxWidth:Math.min(G,300)}}let V=0,$="bottom";if(O==="tabs"||O==="section")V=k.getBoundingClientRect().bottom-q-N-10;else{const G=U?U.bottom:window.innerHeight;V=o(O)?G-q:p,V=V-N-10,$=o(O)?"bottom":"top"}const Q=Y();return{position:$+"-"+Q.hposition,maxWidth:Q.maxWidth,maxHeight:V}}function B(O){var n,L,P,p;const k="300px",m={display:O.expanded===!0?"block":"none",position:"absolute",maxWidth:k,minWidth:"120px"};if(!(r!=null&&r.value))return m;const R=r.value.querySelector("#"+O.id),h=R==null?void 0:R.getClientRects();if(R&&h&&h.length>0){const y=R?R.querySelector("#"+O.id+"_menu"):null;if(!y||O.expanded!==!0)return m;y.style.visibility="hidden",y.style.display="block",y.style.maxHeight="auto",y.style.maxWidth=k;let s;switch(d.toolbarPosition){case"tabs":s=(n=r.value)==null?void 0:n.closest(".farris-tabs");break;case"section":s=(L=r.value)==null?void 0:L.closest(".f-section");break;case"drawer-header-toolbar":case"drawer-footer-toolbar":s=(P=r.value)==null?void 0:P.closest(".f-drawer-container");break;default:s=(p=r.value)==null?void 0:p.closest(".f-page")}const v=S(d.toolbarPosition,s,y,h),{position:I,maxHeight:N,maxWidth:q}=v;y.style.visibility="visible";const U={left:I.indexOf("left")>-1?0:"unset",right:I.indexOf("left")>-1?"unset":0,bottom:I.indexOf("bottom")>-1?"unset":"100%",top:I.indexOf("bottom")>-1?"!00%":"unset",maxWidth:q?q+"px":"300px",maxHeight:N?N+"px":"auto",overflowY:N?"auto":"unset"};Object.assign(m,U)}return m}d.changeMenuPosition=B,u=function(O,k){return a.createVNode("ul",{class:b(O),style:B(O),id:O.id+"_menu"},[i(O)])};function z(O=""){O&&l.has(O)?l.forEach((k,m)=>{m!==O&&(k.expanded=!1,l.delete(m))}):(l.forEach(k=>{k.expanded=!1}),l.clear())}return{renderDropdownMenu:u,clearAllDropDownMenu:z,setResponseToolbarRef:D}}class It extends Fe.BaseControlProperty{constructor(t,g,d="response-toolbar-item"){super(t,g);K(this,"toolbarType","response-toolbar-item");this.toolbarType=d}getPropertyConfig(t,g=!1){this.propertyConfig.categories.basic=this.getBasicPropConfig(t),this.propertyConfig.categories.basic.properties.text={title:"文本",type:"string",description:"",refreshPanelAfterChanged:!0},this.propertyConfig.categories.basic.setPropertyRelates=r=>{if(r)switch(r&&r.propertyID){case"text":{r.needRefreshControlTree=!0;break}}},this.getAppearanceProperties(t,g);const d=this.getPropertyEditorParams(t,["Const","Variable","StateMachine","Expression"],"disabled");return this.propertyConfig.categories.behavior=this.getBehaviorConfig(t,"",{disabled:{title:"禁用",type:"boolean",description:"按钮禁用状态",refreshPanelAfterChanged:!0,editor:d}}),this.getEventPropConfig(t),this.propertyConfig}getAppearanceProperties(t,g=!1){this.propertyConfig.categories.appearance={title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:"",$converter:"/converter/appearance.converter",parentPropertyID:"appearance",visible:!g},icon:{title:"图标",type:"string",description:""},split:{title:"下拉按钮分离",type:"boolean",description:"启用下拉按钮分离,可以单独点击按钮。单独点击下拉按钮展开下拉面板",visible:!!(t.children&&t.children.length>0)},tipsEnable:{title:"启用提示",type:"boolean",description:"当启用提示时,鼠标滑过按钮会有消息提示框",refreshPanelAfterChanged:!0,visible:this.toolbarType==="response-toolbar-item"},tipsText:{title:"提示消息内容",type:"string",description:"消息提示框内的展示内容",visible:t.tipsEnable===!0}}}}getEventPropConfig(t){const g=[{label:"onClick",name:"点击事件"}],d=this,r=d.eventsEditorUtils.formProperties(t,d.viewModelId,g),D=d.createBaseEventProperty(r);this.propertyConfig.categories.eventsEditor={title:"事件",hideTitle:!0,properties:D,refreshPanelAfterChanged:!0,tabId:"commands",tabName:"交互",setPropertyRelates(C,b){const M=C.propertyValue;delete t[d.viewModelId],M&&(M.setPropertyRelates=this.setPropertyRelates,d.eventsEditorUtils.saveRelatedParameters(t,d.viewModelId,M.events,M))}}}}function Me(e,x){if(!e)return!1;const t=x||[];return(t==null?void 0:t.findIndex(d=>d.id===e))===-1}function Qe(e,x){const t=x||[];let g={parentIndex:-1,itemIndex:-1};return t.some((d,r)=>{if(d.children&&d.children.length>0){const D=d.children.findIndex(C=>C.id===e);return D>-1?(g={parentIndex:r,itemIndex:D},!0):!1}}),g}function Ze(e,x){const t=x||[];let g={parentIndex:-1,itemIndex:-1};const d=t==null?void 0:t.findIndex(r=>r.id===e);return d>-1?{parent:null,item:t[d]}:(t.some((r,D)=>{if(r.children&&r.children.length>0){const C=r.children.findIndex(b=>b.id===e);return C>-1?(g={parentIndex:D,itemIndex:C},!0):!1}}),g.parentIndex<0?{parent:null,item:null}:{parent:t[g.parentIndex],item:t[g.parentIndex].children[g.itemIndex]})}function Pt(e,x){const t=x||[],g=t==null?void 0:t.findIndex(d=>d.id===e);return g>-1&&t[g].children&&t[g].children.length>0?t[g].expanded===!0:!1}function Et(e,x){let t;function g(u){const{properties:l,title:f,ignore:i}=u,o=i&&Array.isArray(i),S=Object.keys(l).reduce((B,z)=>((!o||!i.find(O=>O===z))&&(B[z]=l[z].type==="object"&&l[z].properties?g(l[z]):we.cloneDeep(l[z].default)),B),{});if(f&&(!o||!i.find(B=>B==="id"))){const B=f.toLowerCase().replace(/-/g,"_");S.id=`${B}_${Math.random().toString().slice(2,6)}`}return S}function d(u){const{properties:l,title:f,required:i}=u;if(i&&Array.isArray(i)){const o=i.reduce((S,B)=>(S[B]=l[B].type==="object"&&l[B].properties?g(l[B]):we.cloneDeep(l[B].default),S),{});if(f&&i.find(S=>S==="id")){const S=f.toLowerCase().replace(/-/g,"_");o.id=`${S}_${Math.random().toString().slice(2,6)}`}return o}return{type:f}}function r(u,l={},f){const i=e[u];if(i){let o=d(i);const S=x[u];return o=S?S({getSchemaByType:r},o,l,f):o,t!=null&&t.appendIdentifyForNewControl&&t.appendIdentifyForNewControl(o),o}return null}function D(u,l){const f=g(l);return Object.keys(f).reduce((i,o)=>(Object.prototype.hasOwnProperty.call(u,o)&&(i[o]&&we.isPlainObject(i[o])&&we.isPlainObject(u[o]||!u[o])?Object.assign(i[o],u[o]||{}):i[o]=u[o]),i),f),f}function C(u,l){return Object.keys(u).filter(i=>u[i]!=null).reduce((i,o)=>{if(l.has(o)){const S=l.get(o);if(typeof S=="string")i[S]=u[o];else{const B=S(o,u[o],u);Object.assign(i,B)}}else i[o]=u[o];return i},{})}function b(u,l,f=new Map){const i=D(u,l);return C(i,f)}function M(u){var f;const l=u.type;if(l){const i=e[l];if(!i)return u;const o=D(u,i),S=((f=u.editor)==null?void 0:f.type)||"";if(S){const B=e[S],z=D(u.editor,B);o.editor=z}return o}return u}function E(u){t=u}return{getSchemaByType:r,resolveSchemaWithDefaultValue:M,resolveSchemaToProps:b,mappingSchemaToProps:C,setDesignerContext:E}}const Mt={},Nt={},{getSchemaByType:jt}=Et(Mt,Nt);function Rt(e,x,t){function g(y){return!1}function d(){return!1}function r(){return!1}function D(){return!1}function C(){return t.toolbarContext.schema.buttons||[]}function b(y,s=""){setTimeout(()=>{var q,U;const v=(q=e.parent)==null?void 0:q.designerItemElementRef.value;let I;s&&(I=v==null?void 0:v.querySelector("#"+s));const N=(U=I||v)==null?void 0:U.querySelector("#"+y);N==null||N.click()},0)}function M(y,s){s.disabled&&s.disabled.expressionId&&(s.disabled.expressionId=`${s.id}_disabled`),s.visible&&s.visible.expressionId&&(s.visible.expressionId=`${s.id}_visible`);const v=x.formSchemaUtils.getExpressions(),I=v.find(q=>q.target===y.id);if(!I||!I.rules||!I.rules.length)return;const N={target:s.id,rules:[],targetType:"Button"};I.rules.forEach(q=>{const U=Object.assign(we.cloneDeep(q),{id:`${s.id}_${q.type}`});N.rules.push(U)}),v.push(N)}function E(){var I;const y=e.schema,s=Object.assign(we.cloneDeep(y),{id:`${e.schema.type}-cloned-${Math.random().toString(36).slice(2,6)}`,onClick:null});(I=x==null?void 0:x.designerContext)!=null&&I.appendIdentifyForNewControl&&x.designerContext.appendIdentifyForNewControl(s);let v=[];return s.children&&s.children.length&&(v=s.children.map(N=>{var U;const q=we.cloneDeep(N);return Object.assign(q,{id:`${e.schema.type}-cloned-${Math.random().toString(36).slice(2,6)}`,onClick:null}),(U=x==null?void 0:x.designerContext)!=null&&U.appendIdentifyForNewControl&&x.designerContext.appendIdentifyForNewControl(q),M(N,q),q}),s.children=v),M(y,s),s}function u(){const y=e.schema.type||"response-toolbar-item",s=jt(y),v=y.toLowerCase().replace("-","_");return s&&!s.id&&s.type===y&&(s.id=`${v}_${Math.random().toString().slice(2,6)}`,s.text="按钮"),s}function l(y){const s=C(),v=s==null?void 0:s.findIndex(N=>N.id===y),I=v===-1?null:s[v];return{index:v,toolbarItem:I}}function f(){const y=e.schema.id,s=C();return Me(y,s)}function i(y){const s=x.formSchemaUtils.getExpressions();if(!s||!s.length)return;const v=I=>{const N=s&&s.findIndex(q=>q.target===I.id);N>-1&&s.splice(N,1)};v(y),y.children&&y.children.length&&y.children.forEach(I=>{v(I)})}function o(y){t.changeSelectedId(y)}function S(y){x.formSchemaUtils.removeCommunicationInComponent(y),y.children&&y.children.length&&y.children.forEach(s=>{x.formSchemaUtils.removeCommunicationInComponent(s)})}function B(){var I,N,q;if((I=x==null?void 0:x.designerContext)!=null&&I.checkCanDeleteControl&&!x.designerContext.checkCanDeleteControl(e.schema))return;const y=C(),{parentIndex:s,itemIndex:v}=Qe(e.schema.id,y);s===-1||v===-1||(i(e.schema),S(e.schema),y[s].children.splice(v,1),t.updateToolbarItems(),(N=e.setupContext)==null||N.emit("removeComponent"),(q=e.setupContext)==null||q.emit("selectionChange"),ye.canvasChanged.value++)}function z(){var I,N,q;if((I=x==null?void 0:x.designerContext)!=null&&I.checkCanDeleteControl&&!x.designerContext.checkCanDeleteControl(e.schema))return;const y=e.schema.id,s=C(),v=s==null?void 0:s.findIndex(U=>U.id===y);v!==-1&&(i(s[v]),S(s[v]),s==null||s.splice(v,1),t.updateToolbarItems(),(N=e.setupContext)==null||N.emit("removeComponent"),(q=e.setupContext)==null||q.emit("selectionChange"),ye.canvasChanged.value++)}function O(y="Append"){var U;const s=C(),{parentIndex:v,itemIndex:I}=Qe(e.schema.id,s);if(v===-1||I===-1)return;const N=u(),q=y==="Copy"?E():Object.assign({},N);s[v].children.splice(I+1,0,q),t.updateToolbarItems(),o(q.id),(U=e.setupContext)==null||U.emit("addComponent")}function k(y,s){const{index:v}=l(s);if(v===-1)return{index:v,schema:null};const I=u(),N=y==="Copy"?E():Object.assign({},I);return{index:v,schema:N}}function m(){var I;const y=e.schema.id,{index:s,schema:v}=k("Copy",y);v&&(C().splice(s+1,0,v),t.updateToolbarItems(),b(v.id),(I=e.setupContext)==null||I.emit("addComponent"))}function R(){var I;const y=e.schema.id,{index:s,schema:v}=k("Append",y);if(v&&e.parent){const q=C()[s].children||[];q.push(v);const U=C();U[s].children=q,t.updateToolbarItems(),o(v.id),(I=e.setupContext)==null||I.emit("addComponent")}}function h(y){let s;switch(e.schema.type){case"tab-toolbar-item":s=new at.TabToolbarItemProperty(y,x);break;default:s=new It(y,x,e.schema.type)}return s.getPropertyConfig(e.schema,f())}function n(y){y.stopPropagation(),y.stopImmediatePropagation()}function L(){const y=[{id:"delete",title:"删除",text:"",icon:"f-icon-yxs_delete",onClick:s=>{n(s),f()?B():z()}},{id:"copy",title:"复制",icon:"f-icon-yxs_copy",onClick:s=>{n(s);const{activeElement:v}=document,I=v?v.tagName.toLowerCase():"";I&&I==="input"||I==="textarea"?(v==null||v.blur(),a.nextTick(()=>{f()?O("Copy"):m()})):f()?O("Copy"):m()}}];return y.push(f()?{id:"appendSiblingButton",title:"",text:"新增同级",icon:"f-icon-plus-circle",onClick:s=>{n(s),O()}}:{id:"appendChildButton",title:"",text:"新增子级",icon:"f-icon-plus-circle",onClick:s=>{n(s),R()}}),y}function P(){const{schema:y}=e;i(y)}function p(){var y,s,v,I;if(e&&x){const{formSchemaUtils:N}=x,{schema:q}=e;switch(q.type){case"response-toolbar-item":{N.getControlBasicInfoMap().set(q.id,{componentTitle:q.text,parentPathName:q.text});break}case"tab-toolbar-item":case"section-toolbar-item":case"drawer-toolbar-item":{let U;const Y=(y=e.parent)==null?void 0:y.parent;(Y==null?void 0:Y.schema.type)==="tabs"||(Y==null?void 0:Y.schema.type)==="section"||(Y==null?void 0:Y.schema.type)==="drawer"?U=(s=Y.componentInstance)==null?void 0:s.value:U=(I=(v=Y==null?void 0:Y.parent)==null?void 0:v.componentInstance)==null?void 0:I.value,U!=null&&U.setComponentBasicInfoMap&&U.setComponentBasicInfoMap()}}}}return{canAccepts:g,checkCanMoveComponent:d,checkCanDeleteComponent:r,checkCanAddComponent:D,getPropsConfig:h,getCustomButtons:L,onRemoveComponent:P,setComponentBasicInfoMap:p}}const Ne=a.defineComponent({name:"FResponseToolbarItemDesign",props:ze,emits:["Click","dropdown","clearAll"],setup(e,x){const t=a.ref(e.alignment),g=Ee(),d=a.ref(),r=a.inject("designer-host-service"),D=a.inject("design-item-context"),C=a.inject("toolbar-item-action"),b=Rt(D,r,C),M=ye.useDesignerInnerComponent(d,D,b);a.onMounted(()=>{d.value.componentInstance=M}),x.expose(M.value);function E(){const k={"f-icon":!0},m=e.icon?e.icon.trim():"";return X.getCustomClass(k,m)}function u(){return!!(e.icon&&e.icon.trim())}const l=a.computed(()=>{const k={btn:!0,"f-rt-btn":!0,"f-btn-ml":!e.isDP&&(t.value==="right"||t.value==="center"),"f-btn-mr":!e.isDP&&t.value==="left","btn-icontext":!!(e.icon&&e.icon.trim()),disabled:e.disabled===!0,"no-drag":!0,"text-truncate":!0};return X.getCustomClass(k,e.class)}),f=a.computed(()=>e.split?{display:"flex","align-items":"center"}:{display:"flex","align-items":"center","border-radius":"6px","padding-right":"0.1rem","border-top-right-radius":"6px","border-bottom-right-radius":"6px"}),i=a.computed(()=>{const k={btn:!0,"dropdown-toggle":!0,"f-btn-mr":t.value==="left","dropdown-toggle-split":!0,"no-drag":!0};return X.getCustomClass(k,e.class)}),o=a.computed(()=>{let k={btn:!e.isDPItem,disabled:e.disabled===!0,"dropdown-item":e.isDPItem,"f-rt-btn":!0,"text-truncate":!0,"btn-icontext":!e.isDPItem&&!!(e.icon&&e.icon.trim()),"dropdown-item-icontext":e.isDPItem&&!!(e.icon&&e.icon.trim()),"no-drag":!0};return e.isDPItem||(k=X.getCustomClass(k,e.class||"")),e.isDP&&(k=X.getCustomClass(k,e.dropdownClass||"")),k});function S(k,m){m&&m.stopPropagation(),x.emit(k,{id:e.id,isDP:e.isDP})}function B(){return{"btn-group":!0,"no-drag":!0,"f-rt-dropdown":!0,"f-btn-ml":t.value==="right"||t.value==="center","f-btn-mr":t.value==="left"}}function z(){return a.createVNode("div",{ref:d,"data-dragref":`${D.schema.id}-container`,class:"farris-component position-relative",style:"display:inline-block!important;"},[a.createVNode("div",{class:B(),id:e.id},[a.createVNode("div",{class:l.value,style:f.value,onClick:()=>S("clearAll")},[g.shouldShowIcon(e)&&a.createVNode("i",{class:g.iconClass(e)},null),a.createVNode("span",null,[e.text]),!e.split&&a.createVNode("span",{class:"f-icon f-icon-arrow-chevron-down",style:"margin:0 0.5rem 0 0.25rem;",onClick:k=>S("dropdown",k)},null)]),e.split&&a.createVNode("button",{class:i.value,style:"border-radius:0 6px 6px 0;",onClick:k=>S("dropdown",k)},null),C.renderDropdownMenu(e.item,e.item)])])}function O(){return a.createVNode("li",{ref:d,"data-dragref":`${D.schema.id}-container`,id:e.id,class:o.value},[g.shouldShowIcon(e)&&a.createVNode("i",{class:g.iconClass(e)},null),e.text])}return()=>e.isDP?z():e.isDPItem?O():a.createVNode("div",{ref:d,"data-dragref":`${D.schema.id}-container`,class:"farris-component position-relative",style:"display:inline-block!important;"},[a.createVNode("button",{type:"button",class:l.value,id:e.id,onClick:()=>S("clearAll")},[u()&&a.createVNode("i",{class:E()},null),e.text])])}});function Bt(e,x,t,g){function d(l,f,i,o){g.changeSelectedId((f==null?void 0:f.id)||""),t&&t.setupContext&&t.setupContext.emit("selectionChange",l,f,i,o)}function r(){}function D(l){const f=l.expanded;g.clearAllDropdown(),g.toggleDropdownMenu(l,!f)}function C(l){g.clearAllDropdown(l.isDP?l.id:"")}function b(l,f=""){const i=e.items||[],o=f||l,S=i.find(B=>B.id===o);return f?S.children.find(B=>B.id===l):S}function M(l,f=!1){if(!f)return;const i=l.target;i!=null&&i.classList.contains("dgComponentFocused")&&(i==null||i.classList.add("dgComponentSelected"))}function E(l,f=!1){if(!f)return;const i=l.target;i!=null&&i.classList.contains("dgComponentFocused")&&(i==null||i.classList.remove("dgComponentSelected"))}function u(l,f,i=!1){const o=b(l.id,l.parent),S=a.ref(o);return a.createVNode(ye.FDesignerInnerItem,{key:o.id,class:["p-0",i?"d-block no-drag":"d-inline-block"],modelValue:S.value,"onUpdate:modelValue":B=>S.value=B,canMove:!1,childType:"response-toolbar-item",childLabel:"按钮",contentKey:"buttons",componentId:e.componentId,id:o.id,onSelectionChange:d,onRemoveComponent:r,onMouseenter:B=>M(B,i),onMouseleave:B=>E(B,i)},{default:()=>{var B;return[a.createVNode(Ne,{id:o.id,disabled:o.disabled,text:o.text,icon:o.icon,isDP:l.isDP,item:l,split:o.split,isDPItem:l.isDPItem,class:((B=l.appearance)==null?void 0:B.class)||"btn-secondary",alignment:e.alignment||"right",onDropdown:()=>D(l),onClearAll:z=>C(z),componentId:e.componentId},null)]}})}return{renderToolbarItemDesigner:u,actionHandlers:g}}function je(e,x=!1,t=""){const g=[];return e.reduce((d,r)=>{if(r.children&&r.children.length>0){const D=je(r.children,!0,r.id);d.push(Object.assign({},r,{children:D,isDPItem:!1,isDP:!0,parent:"",expanded:!1}))}else d.push(Object.assign({},r,{isDPItem:x,isDP:!1,parent:t}));return d},g),g}const Te=a.defineComponent({name:"FResponseToolbarDesign",props:ft,emits:["Click"],setup(e,x){const t=a.ref(je(e.items)),g=a.ref(),d=a.ref(),r=a.ref(),D=a.ref("");let C=0;const b=15,M=a.inject("designer-host-service"),E=a.inject("design-item-context"),u={clearAllDropdown:V=>{},toggleDropdownMenu:V=>{},updateToolbarItems:()=>{},changeSelectedId:V=>{D.value=V},renderDropdownMenu:(V,$)=>{},toolbarContext:E,changeMenuPosition:(V,$,Q)=>({}),toolbarPosition:""},l=xt(E,M,u),f=ye.useDesignerComponent(r,E,l),i=a.inject("toolbar-item-handler"),{initDragula:o,dragulaInstance:S}=St(E),B=Ee(),z=Bt(e,d,E,u),O=kt(B,t,z),{renderToolbarItemDesigner:k}=z,{clearAllDropDownMenu:m,renderDropdownMenu:R,setResponseToolbarRef:h}=O;a.provide("toolbar-item-action",u),u.renderDropdownMenu=R,h(r),i&&(i.changeSelectedId=function(V){D.value=V});function n(){const V=d.value.querySelector(".dgComponentSelected");V&&ye.setPositionForSelectedElement(V)}function L(){if(D.value)if(Me(D.value,t.value)){const{parent:V,item:$}=Ze(D.value,t.value);V&&(u.toggleDropdownMenu(V,!0),setTimeout(()=>{var H;const Q=r.value.querySelector("#"+V.id),G=Q==null?void 0:Q.querySelector("#"+$.id);(((H=G==null?void 0:G.parentElement)==null?void 0:H.className)||"").indexOf("dgComponentFocused")<0&&(G==null||G.click())},0))}else n()}function P(V=""){t.value.filter($=>$.id!==V&&$.children&&$.children.length>0).forEach($=>{$.expanded=!1}),m(V)}u.clearAllDropdown=P;function p(){i&&i.updateToolbarItems&&i.updateToolbarItems()}u.updateToolbarItems=p;function y(V){if(V){const $=r.value.querySelector("#"+V.id),Q=$.querySelector("#"+V.id+"_menu"),G=u.changeMenuPosition(V,$);Object.keys(G).forEach(H=>{Q.style[H]=G[H]})}}function s(){const Q=d.value.clientWidth,G=d.value.querySelectorAll(".farris-component>.f-rt-btn");G&&G.forEach(F=>{F.style.maxWidth=Q-12+"px"});const H=d.value.querySelectorAll(".farris-component>.f-rt-dropdown");H&&H.forEach(F=>{F.querySelector(".dropdown-toggle-split")?F.querySelector(".f-rt-btn").style.maxWidth=Q-38+"px":F.style.maxWidth=Q-12+"px"})}const v=new ResizeObserver(V=>{var $;if(V.length){const G=V[0].contentRect.width;if(G===0){C=0;return}if(Math.abs(G-C)>b){if(C=G,Me(D.value,t.value)){const{parent:H,item:F}=Ze(D.value,t.value);y(H)}else if(Pt(D.value,t.value)){const H=($=t.value)==null?void 0:$.find(F=>F.id===D.value);y(H)}else P();s()}}});a.onMounted(()=>{v.observe(r.value),C=r.value.clientWidth,r.value.componentInstance=f,o(d.value,g.value,p)}),a.onUnmounted(()=>{v.disconnect(),S&&S.destroy&&S.destroy()}),x.expose(f.value);const I=a.computed(()=>{const V={"f-toolbar":!0,"f-response-toolbar":!0,"position-relative":!0,"f-response-toolbar-sm":e.buttonSize==="sm","f-response-toolbar-lg":e.buttonSize==="lg"};return X.getCustomClass(V,e.customClass)}),N=a.computed(()=>({"text-left":e.alignment==="left","text-right":e.alignment==="right","justify-content-end":e.alignment==="right","justify-content-start":e.alignment==="left","justify-content-center":e.alignment==="center","no-drag":!0,"w-100":!0}));a.watch(()=>e.items,()=>{t.value=je(e.items),a.nextTick(()=>{L(),s()})},{deep:!0});function q(V){V&&(V.stopPropagation(),V.preventDefault());const{schema:$}=E;$.buttons||($.buttons=[]);let Q="";switch(u.toolbarPosition){case"drawer-header-toolbar":case"drawer-footer-toolbar":Q="drawer-toolbar-item";break;case"tabs":Q="tab-toolbar-item";break;case"section":Q="section-toolbar-item";break;default:Q="response-toolbar-item"}const G=ue.getSchemaByType(Q);G.id=`toolbar_item_${Math.random().toString().slice(2,6)}`,$.buttons.push(G)}function U(){return a.createVNode("li",{style:"border-width: 1px;border-style: dashed;display: inline-block;padding: 0 8px;line-height: 24px; border-radius: 3px; cursor: default;color: #B4BCCC;",onClick:q},[a.createVNode("span",{class:"f-icon f-icon-amplification mr-1",style:"font-size: 12px;"},null),a.createVNode("span",{class:"farris-tag-add-text"},[a.createTextVNode("添加按钮")])])}function Y(){return t.value.map((V,$)=>k(V,$))}return()=>{var V;return a.createVNode("div",{ref:r,"data-dragref":`${E.schema.id}-container`,class:I.value,id:e.id},[a.createVNode("div",{ref:g,class:N.value,onClick:$=>P($)},[a.createVNode("div",{ref:d,class:"d-block f-response-content"},[(V=t.value)!=null&&V.length?Y():U()])])])}}}),Ot=Pe;Te.register=(e,x,t,g)=>{e["response-toolbar"]=wt,x["response-toolbar"]=Pe,g["response-toolbar"]={eventHandlerResolver:ht}},Te.registerDesigner=(e,x,t)=>{e["response-toolbar"]=Te,x["response-toolbar"]=Pe,e["response-toolbar-item"]=Ne,x["response-toolbar-item"]=pt};const _t=X.withInstall(Te);ee.FResponseToolbarDesign=Te,ee.FResponseToolbarItemDesign=Ne,ee.commonToolbarItemDesignProps=We,ee.default=_t,ee.responseToolbarResolver=Ot,ee.schemaResolver=Ie,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -941,10 +941,5 @@ F.registerDesigner = (t, e, n) => {
941
941
  };
942
942
  const ot = K(F);
943
943
  export {
944
- ot as default,
945
- Ge as eventHandlerResolver,
946
- Ve as propsDesignResolver,
947
- qe as propsResolver,
948
- U as sectionDesignProps,
949
- Ue as sectionToolbarPropsResolver
944
+ ot as default
950
945
  };