@farris/ui-vue 1.3.0 → 1.3.3

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 (305) hide show
  1. package/components/accordion/index.esm.js +103 -99
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +454 -398
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +444 -0
  6. package/components/binding-selector/index.umd.cjs +1 -0
  7. package/components/binding-selector/package.json +8 -0
  8. package/components/border-editor/index.esm.js +5 -3
  9. package/components/border-editor/index.umd.cjs +1 -1
  10. package/components/button-edit/index.esm.js +143 -139
  11. package/components/button-edit/index.umd.cjs +1 -1
  12. package/components/calendar/index.esm.js +479 -476
  13. package/components/calendar/index.umd.cjs +1 -1
  14. package/components/capsule/index.esm.js +255 -252
  15. package/components/capsule/index.umd.cjs +1 -1
  16. package/components/checkbox/index.esm.js +652 -567
  17. package/components/checkbox/index.umd.cjs +1 -1
  18. package/components/color-picker/index.esm.js +518 -521
  19. package/components/color-picker/index.umd.cjs +2 -2
  20. package/components/combo-list/index.esm.js +659 -553
  21. package/components/combo-list/index.umd.cjs +1 -1
  22. package/components/combo-tree/index.esm.js +162 -155
  23. package/components/combo-tree/index.umd.cjs +1 -1
  24. package/components/common/index.esm.js +866 -747
  25. package/components/common/index.umd.cjs +1 -1
  26. package/components/component/index.esm.js +371 -998
  27. package/components/component/index.umd.cjs +1 -1
  28. package/components/condition/index.esm.js +1174 -1280
  29. package/components/condition/index.umd.cjs +1 -1
  30. package/components/content-container/index.esm.js +340 -991
  31. package/components/content-container/index.umd.cjs +1 -1
  32. package/components/data-grid/index.esm.js +6066 -5847
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +3400 -3486
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2328 -2446
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/designer-canvas/index.css +1 -1
  39. package/components/designer-canvas/index.esm.js +9551 -1200
  40. package/components/designer-canvas/index.umd.cjs +1 -1
  41. package/components/designer-outline/index.esm.js +2 -1
  42. package/components/designer-outline/index.umd.cjs +1 -1
  43. package/components/drawer/index.esm.js +34 -38
  44. package/components/drawer/index.umd.cjs +1 -1
  45. package/components/dropdown/index.esm.js +234 -231
  46. package/components/dropdown/index.umd.cjs +2 -2
  47. package/components/dynamic-form/index.esm.js +1996 -2630
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +138 -123
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +218 -218
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/event-parameter/index.esm.js +311 -0
  54. package/components/event-parameter/index.umd.cjs +1 -0
  55. package/components/event-parameter/package.json +8 -0
  56. package/components/events-editor/index.css +1 -1
  57. package/components/events-editor/index.esm.js +548 -586
  58. package/components/events-editor/index.umd.cjs +1 -1
  59. package/components/expression-editor/index.esm.js +95 -91
  60. package/components/expression-editor/index.umd.cjs +1 -1
  61. package/components/external-container/index.esm.js +2871 -3736
  62. package/components/external-container/index.umd.cjs +1 -1
  63. package/components/field-selector/index.esm.js +3380 -3645
  64. package/components/field-selector/index.umd.cjs +1 -1
  65. package/components/filter-bar/index.css +1 -1
  66. package/components/filter-bar/index.esm.js +10543 -3207
  67. package/components/filter-bar/index.umd.cjs +1 -1
  68. package/components/flow-canvas/index.css +1 -1
  69. package/components/flow-canvas/index.esm.js +9775 -1312
  70. package/components/flow-canvas/index.umd.cjs +1 -1
  71. package/components/image-cropper/index.esm.js +442 -438
  72. package/components/image-cropper/index.umd.cjs +1 -1
  73. package/components/input-group/index.esm.js +587 -807
  74. package/components/input-group/index.umd.cjs +1 -1
  75. package/components/layout/index.esm.js +415 -381
  76. package/components/layout/index.umd.cjs +1 -1
  77. package/components/list-nav/index.esm.js +361 -1024
  78. package/components/list-nav/index.umd.cjs +1 -1
  79. package/components/list-view/index.esm.js +2265 -2371
  80. package/components/list-view/index.umd.cjs +1 -1
  81. package/components/lookup/index.esm.js +6425 -6257
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.esm.js +6164 -5946
  84. package/components/mapping-editor/index.umd.cjs +1 -1
  85. package/components/message-box/index.esm.js +252 -252
  86. package/components/message-box/index.umd.cjs +1 -1
  87. package/components/modal/index.esm.js +70 -70
  88. package/components/modal/index.umd.cjs +1 -1
  89. package/components/nav/index.esm.js +524 -1474
  90. package/components/nav/index.umd.cjs +3 -3
  91. package/components/number-range/index.esm.js +547 -502
  92. package/components/number-range/index.umd.cjs +1 -1
  93. package/components/number-spinner/index.esm.js +646 -574
  94. package/components/number-spinner/index.umd.cjs +1 -1
  95. package/components/order/index.esm.js +1181 -2028
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +134 -131
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +1185 -2027
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +442 -1368
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/progress/index.esm.js +238 -235
  104. package/components/progress/index.umd.cjs +3 -3
  105. package/components/property-editor/index.esm.js +1635 -1713
  106. package/components/property-editor/index.umd.cjs +2 -2
  107. package/components/property-panel/index.esm.js +791 -716
  108. package/components/property-panel/index.umd.cjs +1 -1
  109. package/components/query-solution/index.css +1 -1
  110. package/components/query-solution/index.esm.js +12203 -5274
  111. package/components/query-solution/index.umd.cjs +6 -1
  112. package/components/radio-button/index.esm.js +97 -97
  113. package/components/radio-button/index.umd.cjs +1 -1
  114. package/components/radio-group/index.css +1 -1
  115. package/components/radio-group/index.esm.js +1873 -520
  116. package/components/radio-group/index.umd.cjs +1 -1
  117. package/components/rate/index.esm.js +299 -300
  118. package/components/rate/index.umd.cjs +1 -1
  119. package/components/response-layout/index.esm.js +176 -173
  120. package/components/response-layout/index.umd.cjs +1 -1
  121. package/components/response-layout-editor/index.esm.js +715 -659
  122. package/components/response-layout-editor/index.umd.cjs +1 -1
  123. package/components/response-toolbar/index.esm.js +1032 -1883
  124. package/components/response-toolbar/index.umd.cjs +1 -1
  125. package/components/schema-selector/index.esm.js +4767 -5693
  126. package/components/schema-selector/index.umd.cjs +2 -2
  127. package/components/search-box/index.esm.js +169 -161
  128. package/components/search-box/index.umd.cjs +1 -1
  129. package/components/section/index.esm.js +490 -1167
  130. package/components/section/index.umd.cjs +1 -1
  131. package/components/smoke-detector/index.esm.js +154 -151
  132. package/components/smoke-detector/index.umd.cjs +1 -1
  133. package/components/splitter/index.esm.js +575 -1204
  134. package/components/splitter/index.umd.cjs +1 -1
  135. package/components/splitter/style.js +2 -0
  136. package/components/step/index.esm.js +279 -276
  137. package/components/step/index.umd.cjs +1 -1
  138. package/components/switch/index.esm.js +478 -428
  139. package/components/switch/index.umd.cjs +1 -1
  140. package/components/tabs/index.esm.js +2591 -3326
  141. package/components/tabs/index.umd.cjs +1 -1
  142. package/components/tags/index.esm.js +442 -439
  143. package/components/tags/index.umd.cjs +1 -1
  144. package/components/text/index.esm.js +309 -307
  145. package/components/text/index.umd.cjs +1 -1
  146. package/components/textarea/index.esm.js +500 -430
  147. package/components/textarea/index.umd.cjs +1 -1
  148. package/components/time-picker/index.esm.js +1391 -1341
  149. package/components/time-picker/index.umd.cjs +1 -1
  150. package/components/transfer/index.esm.js +574 -575
  151. package/components/transfer/index.umd.cjs +1 -1
  152. package/components/tree-grid/index.esm.js +3422 -3536
  153. package/components/tree-grid/index.umd.cjs +1 -1
  154. package/components/tree-view/index.esm.js +2661 -2764
  155. package/components/tree-view/index.umd.cjs +1 -1
  156. package/components/uploader/index.esm.js +675 -674
  157. package/components/uploader/index.umd.cjs +2 -2
  158. package/components/verify-detail/index.esm.js +300 -297
  159. package/components/verify-detail/index.umd.cjs +1 -1
  160. package/components/video/index.esm.js +454 -1089
  161. package/components/video/index.umd.cjs +1 -1
  162. package/components/weather/index.esm.js +709 -706
  163. package/components/weather/index.umd.cjs +5 -5
  164. package/farris.all.esm.js +54780 -52757
  165. package/farris.all.umd.cjs +14 -9
  166. package/index.css +1 -1
  167. package/package.json +1 -1
  168. package/types/binding-selector/index.d.ts +55 -0
  169. package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
  170. package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
  171. package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
  172. package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
  173. package/types/combo-list/src/components/list-container.component.d.ts +6 -6
  174. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  175. package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
  176. package/types/common/directive/area-response.d.ts +10 -0
  177. package/types/common/entity/entity-schema.d.ts +26 -11
  178. package/types/common/index.d.ts +9 -0
  179. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  180. package/types/common/types.d.ts +2 -2
  181. package/types/common/utils/resolve-field.d.ts +2 -0
  182. package/types/common/utils/use-class.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  184. package/types/condition/src/condition-fields.design.component.d.ts +18 -0
  185. package/types/condition/src/types.d.ts +5 -4
  186. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  187. package/types/data-grid/index.d.ts +8 -5
  188. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
  189. package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
  190. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  191. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  192. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  193. package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
  194. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
  196. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  197. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  198. package/types/data-view/composition/types.d.ts +9 -11
  199. package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
  200. package/types/date-picker/src/components/month/month.component.d.ts +3 -3
  201. package/types/date-picker/src/components/year/year.component.d.ts +3 -3
  202. package/types/designer-canvas/index.d.ts +3 -1
  203. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  204. package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
  205. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  206. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  207. package/types/designer-canvas/src/composition/types.d.ts +49 -41
  208. package/types/designer-canvas/src/types.d.ts +10 -21
  209. package/types/dynamic-form/index.d.ts +1 -1
  210. package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
  211. package/types/dynamic-form/src/designer/response-form-use-designer-rules.d.ts +3 -0
  212. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  213. package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
  214. package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
  215. package/types/dynamic-form/src/types.d.ts +1 -1
  216. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +6 -1
  217. package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
  218. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
  219. package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
  220. package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
  221. package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
  222. package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
  223. package/types/event-parameter/index.d.ts +31 -0
  224. package/types/event-parameter/src/composition/type.d.ts +77 -0
  225. package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
  226. package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
  227. package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
  228. package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
  229. package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
  230. package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
  231. package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
  232. package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
  233. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  234. package/types/field-selector/src/field-selector.component.d.ts +1 -2
  235. package/types/field-selector/src/field-selector.props.d.ts +0 -9
  236. package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
  237. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  238. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  239. package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
  240. package/types/list-view/src/list-view-table.component.d.ts +15 -0
  241. package/types/lookup/src/composition/use-user-data.d.ts +2 -2
  242. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
  243. package/types/modal/src/composition/modal.service.d.ts +2 -1
  244. package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
  245. package/types/page-header/src/page-header.component.d.ts +1 -1
  246. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  247. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  248. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  249. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  250. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  251. package/types/property-panel/index.d.ts +3 -1
  252. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  253. package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
  254. package/types/property-panel/src/composition/type.d.ts +0 -13
  255. package/types/query-solution/src/composition/types.d.ts +35 -4
  256. package/types/query-solution/src/composition/use-header.d.ts +21 -0
  257. package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
  258. package/types/query-solution/src/composition/use-solution.d.ts +20 -0
  259. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +43 -35
  260. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  262. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  264. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +12 -0
  266. package/types/query-solution/src/query-solution.d.ts +10 -2
  267. package/types/query-solution/src/solutions.d.ts +108 -509
  268. package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
  269. package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
  270. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
  271. package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
  272. package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
  273. package/types/response-layout-editor/index.d.ts +3 -1
  274. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  275. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  276. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
  277. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  278. package/types/section/src/property-config/section.property-config.d.ts +17 -17
  279. package/types/section/src/schema/schema-resolver.d.ts +1 -2
  280. package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
  281. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  282. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  283. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  284. package/types/tabs/src/composition/types.d.ts +4 -1
  285. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  286. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  287. package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
  288. package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
  289. package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
  290. package/types/text/src/composition/types.d.ts +4 -4
  291. package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
  292. package/types/tree-grid/index.d.ts +3 -3
  293. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  294. package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
  295. package/types/weather/src/composition/use-weather-color.d.ts +15 -0
  296. package/types/weather/src/composition/use-weather-data.d.ts +15 -0
  297. package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
  298. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  299. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  300. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
  301. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  302. package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
  303. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  304. package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
  305. package/types/weather/src/composition/types.d.ts +0 -2
@@ -1,40 +1,40 @@
1
- var Re = Object.defineProperty;
2
- var Se = (s, e, o) => e in s ? Re(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
- var B = (s, e, o) => Se(s, typeof e != "symbol" ? e + "" : e, o);
4
- import { computed as W, getCurrentInstance as fe, createVNode as w, ref as S, defineComponent as X, onMounted as z, onUnmounted as ne, watch as H, inject as L, createTextVNode as ge, provide as Me, onBeforeUnmount as ke, withModifiers as Ae } from "vue";
5
- import { isPlainObject as pe, cloneDeep as me } from "lodash-es";
6
- import { getCustomClass as J, withInstall as Be } from "../common/index.esm.js";
7
- import { useDesignerInnerComponent as he } from "../designer-canvas/index.esm.js";
8
- class be {
1
+ var Ie = Object.defineProperty;
2
+ var Se = (s, e, n) => e in s ? Ie(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n;
3
+ var D = (s, e, n) => Se(s, typeof e != "symbol" ? e + "" : e, n);
4
+ import { computed as V, getCurrentInstance as ae, createVNode as y, ref as M, defineComponent as Y, onMounted as H, onUnmounted as de, watch as Q, inject as L, createTextVNode as ue, provide as De, onBeforeUnmount as Me, withModifiers as Ee } from "vue";
5
+ import { isPlainObject as ie, cloneDeep as pe } from "lodash-es";
6
+ import { getCustomClass as J, withInstall as Re } from "../common/index.esm.js";
7
+ import { useDesignerInnerComponent as fe } from "../designer-canvas/index.esm.js";
8
+ class ge {
9
9
  constructor(e) {
10
10
  /** 工具栏项标识 */
11
- B(this, "id", "");
11
+ D(this, "id", "");
12
12
  /** 工具栏项自定义样式 */
13
- B(this, "class", "btn-secondary");
13
+ D(this, "class", "btn-secondary");
14
14
  /** 图标 */
15
- B(this, "icon", "");
15
+ D(this, "icon", "");
16
16
  /** 所属分组 */
17
- B(this, "groupId", "");
17
+ D(this, "groupId", "");
18
18
  /** 收藏顺序 */
19
- B(this, "order", -1);
19
+ D(this, "order", -1);
20
20
  /** 是否作为下拉菜单的顶层按钮 */
21
- B(this, "asDropDownTop", !1);
21
+ D(this, "asDropDownTop", !1);
22
22
  /** 文本 */
23
- B(this, "text", "");
23
+ D(this, "text", "");
24
24
  /** 是否可见 */
25
- B(this, "visible", !0);
26
- B(this, "responsed", !1);
25
+ D(this, "visible", !0);
26
+ D(this, "responsed", !1);
27
27
  /** 是否启用提示消息 */
28
- B(this, "tipsEnable", !1);
28
+ D(this, "tipsEnable", !1);
29
29
  /** 提示消息内容 */
30
- B(this, "tipsText", "");
30
+ D(this, "tipsText", "");
31
31
  /** 记录宽度 */
32
- B(this, "width", 0);
33
- B(this, "onClick", () => {
32
+ D(this, "width", 0);
33
+ D(this, "onClick", () => {
34
34
  });
35
- B(this, "options");
35
+ D(this, "options");
36
36
  this.options = e;
37
- const o = [
37
+ const n = [
38
38
  "id",
39
39
  "class",
40
40
  "icon",
@@ -50,13 +50,13 @@ class be {
50
50
  "tipsText",
51
51
  "onClick"
52
52
  ];
53
- Object.keys(e).filter((c) => o.indexOf(c) > -1).forEach((c) => {
54
- this[c] = e[c];
53
+ Object.keys(e).filter((i) => n.indexOf(i) > -1).forEach((i) => {
54
+ this[i] = e[i];
55
55
  });
56
56
  }
57
57
  /** 是否可用 */
58
58
  get enable() {
59
- return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : W(() => !0);
59
+ return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : V(() => !0);
60
60
  }
61
61
  /** 设置宽度 */
62
62
  setWidth(e) {
@@ -67,49 +67,49 @@ class be {
67
67
  return this.visible ? this.width : !1;
68
68
  }
69
69
  }
70
- class Oe extends be {
70
+ class ke extends ge {
71
71
  constructor(e) {
72
72
  super(e);
73
73
  }
74
74
  }
75
- function ye() {
75
+ function me() {
76
76
  function s(e) {
77
- const o = [];
78
- return e.reduce((c, d) => (d.children && d.children.length > 0 ? c.push(new G(d)) : c.push(new Oe(d)), c), o), o;
77
+ const n = [];
78
+ return e.reduce((i, d) => (d.children && d.children.length > 0 ? i.push(new z(d)) : i.push(new ke(d)), i), n), n;
79
79
  }
80
80
  return { buildResponseToolbarItems: s };
81
81
  }
82
- const { buildResponseToolbarItems: _e } = ye();
83
- class G extends be {
84
- constructor(o) {
85
- super(o);
86
- B(this, "placement", "");
82
+ const { buildResponseToolbarItems: Pe } = me();
83
+ class z extends ge {
84
+ constructor(n) {
85
+ super(n);
86
+ D(this, "placement", "");
87
87
  // 下拉位置
88
88
  /** 下拉class */
89
- B(this, "dropdownClass", "");
89
+ D(this, "dropdownClass", "");
90
90
  /** 下拉菜单class */
91
- B(this, "menuClass", "");
91
+ D(this, "menuClass", "");
92
92
  /** 是否用分开的下拉按钮 */
93
- B(this, "split", !1);
94
- B(this, "children", []);
95
- B(this, "expanded", !1);
96
- const c = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
97
- Object.keys(o).filter((d) => c.indexOf(d) > -1).forEach((d) => {
98
- this[d] = o[d];
99
- }), o.children && o.children.length && (this.children = _e(o.children));
93
+ D(this, "split", !1);
94
+ D(this, "children", []);
95
+ D(this, "expanded", !1);
96
+ const i = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
97
+ Object.keys(n).filter((d) => i.indexOf(d) > -1).forEach((d) => {
98
+ this[d] = n[d];
99
+ }), n.children && n.children.length && (this.children = Pe(n.children));
100
100
  }
101
101
  }
102
- class Vt {
103
- constructor(e, o) {
104
- B(this, "id");
105
- B(this, "name");
102
+ class Dt {
103
+ constructor(e, n) {
104
+ D(this, "id");
105
+ D(this, "name");
106
106
  /** 记录元素的Id */
107
- B(this, "presetId", []);
107
+ D(this, "presetId", []);
108
108
  /** 记录转变为下拉时元素的位置 */
109
- B(this, "responsedIndex", []);
109
+ D(this, "responsedIndex", []);
110
110
  /** 记录宽度 */
111
- B(this, "width");
112
- this.id = e, this.name = o, this.width = 0;
111
+ D(this, "width");
112
+ this.id = e, this.name = n, this.width = 0;
113
113
  }
114
114
  // 设置宽度
115
115
  setWidth(e) {
@@ -144,98 +144,102 @@ class Vt {
144
144
  return this.presetId.length === this.responsedIndex.length;
145
145
  }
146
146
  }
147
- const oe = {}, ve = {};
148
- function se(s) {
149
- const { properties: e, title: o, ignore: c } = s, d = c && Array.isArray(c), b = Object.keys(e).reduce((m, D) => ((!d || !c.find((P) => P == D)) && (m[D] = e[D].type === "object" && e[D].properties ? se(e[D]) : me(e[D].default)), m), {});
150
- return (!d || !c.find((m) => m == "id")) && (b.id = `${o}-${Date.now()}`), b;
147
+ const he = {}, be = {};
148
+ function ee(s) {
149
+ const { properties: e, title: n, ignore: i } = s, d = i && Array.isArray(i), m = Object.keys(e).reduce((p, T) => ((!d || !i.find((x) => x === T)) && (p[T] = e[T].type === "object" && e[T].properties ? ee(e[T]) : pe(e[T].default)), p), {});
150
+ if (n && (!d || !i.find((p) => p === "id"))) {
151
+ const p = n.toLowerCase().replace(/-/g, "_");
152
+ m.id = `${p}_${Math.random().toString().slice(2, 6)}`;
153
+ }
154
+ return m;
151
155
  }
152
- function q(s, e = {}, o) {
153
- const c = oe[s];
154
- if (c) {
155
- let d = se(c);
156
- const b = ve[s];
157
- return d = b ? b({ getSchemaByType: q }, d, e, o) : d, d;
156
+ function Z(s, e = {}, n) {
157
+ const i = he[s];
158
+ if (i) {
159
+ let d = ee(i);
160
+ const m = be[s];
161
+ return d = m ? m({ getSchemaByType: Z }, d, e, n) : d, d;
158
162
  }
159
163
  return null;
160
164
  }
161
- function Ne(s, e) {
162
- const o = se(e);
163
- return Object.keys(s).reduce((c, d) => (c[d] && pe(c[d]) && pe(s[d]) ? Object.assign(c[d], s[d]) : c[d] = s[d], c), o), o;
165
+ function Be(s, e) {
166
+ const n = ee(e);
167
+ return Object.keys(n).reduce((i, d) => (i[d] && ie(i[d]) && ie(s[d] || !s[d]) ? Object.assign(i[d], s[d] || {}) : i[d] = s[d], i), n), n;
164
168
  }
165
- function $e(s, e) {
166
- return Object.keys(s).filter((c) => s[c] != null).reduce((c, d) => {
169
+ function Ae(s, e) {
170
+ return Object.keys(s).filter((i) => s[i] != null).reduce((i, d) => {
167
171
  if (e.has(d)) {
168
- const b = e.get(d);
169
- if (typeof b == "string")
170
- c[b] = s[d];
172
+ const m = e.get(d);
173
+ if (typeof m == "string")
174
+ i[m] = s[d];
171
175
  else {
172
- const m = b(d, s[d], s);
173
- Object.assign(c, m);
176
+ const p = m(d, s[d], s);
177
+ Object.assign(i, p);
174
178
  }
175
179
  } else
176
- c[d] = s[d];
177
- return c;
180
+ i[d] = s[d];
181
+ return i;
178
182
  }, {});
179
183
  }
180
- function Fe(s, e, o = /* @__PURE__ */ new Map()) {
181
- const c = Ne(s, e);
182
- return $e(c, o);
184
+ function Oe(s, e, n = /* @__PURE__ */ new Map()) {
185
+ const i = Be(s, e);
186
+ return Ae(i, n);
183
187
  }
184
- function Le(s = {}) {
185
- function e(g, C, p, i) {
186
- if (typeof p == "number")
187
- return i[g].length === p;
188
- if (typeof p == "object") {
189
- const f = Object.keys(p)[0], a = p[f];
190
- if (f === "not")
191
- return Number(i[g].length) !== Number(a);
192
- if (f === "moreThan")
193
- return Number(i[g].length) >= Number(a);
194
- if (f === "lessThan")
195
- return Number(i[g].length) <= Number(a);
188
+ function _e(s = {}) {
189
+ function e(f, g, l, c) {
190
+ if (typeof l == "number")
191
+ return c[f].length === l;
192
+ if (typeof l == "object") {
193
+ const u = Object.keys(l)[0], b = l[u];
194
+ if (u === "not")
195
+ return Number(c[f].length) !== Number(b);
196
+ if (u === "moreThan")
197
+ return Number(c[f].length) >= Number(b);
198
+ if (u === "lessThan")
199
+ return Number(c[f].length) <= Number(b);
196
200
  }
197
201
  return !1;
198
202
  }
199
- function o(g, C, p, i) {
200
- return i[g] && i[g].propertyValue && String(i[g].propertyValue.value) === String(p);
203
+ function n(f, g, l, c) {
204
+ return c[f] && c[f].propertyValue && String(c[f].propertyValue.value) === String(l);
201
205
  }
202
- const c = /* @__PURE__ */ new Map([
206
+ const i = /* @__PURE__ */ new Map([
203
207
  ["length", e],
204
- ["getProperty", o]
208
+ ["getProperty", n]
205
209
  ]);
206
- Object.keys(s).reduce((g, C) => (g.set(C, s[C]), g), c);
207
- function d(g, C) {
208
- const p = g;
209
- return typeof C == "number" ? [{ target: p, operator: "length", param: null, value: Number(C) }] : typeof C == "boolean" ? [{ target: p, operator: "getProperty", param: g, value: !!C }] : typeof C == "object" ? Object.keys(C).map((i) => {
210
- if (i === "length")
211
- return { target: p, operator: "length", param: null, value: C[i] };
212
- const f = i, a = C[i];
213
- return { target: p, operator: "getProperty", param: f, value: a };
210
+ Object.keys(s).reduce((f, g) => (f.set(g, s[g]), f), i);
211
+ function d(f, g) {
212
+ const l = f;
213
+ return typeof g == "number" ? [{ target: l, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: l, operator: "getProperty", param: f, value: !!g }] : typeof g == "object" ? Object.keys(g).map((c) => {
214
+ if (c === "length")
215
+ return { target: l, operator: "length", param: null, value: g[c] };
216
+ const u = c, b = g[c];
217
+ return { target: l, operator: "getProperty", param: u, value: b };
214
218
  }) : [];
215
219
  }
216
- function b(g) {
217
- return Object.keys(g).reduce((p, i) => {
218
- const f = d(i, g[i]);
219
- return p.push(...f), p;
220
+ function m(f) {
221
+ return Object.keys(f).reduce((l, c) => {
222
+ const u = d(c, f[c]);
223
+ return l.push(...u), l;
220
224
  }, []);
221
225
  }
222
- function m(g, C) {
223
- if (c.has(g.operator)) {
224
- const p = c.get(g.operator);
225
- return p && p(g.target, g.param, g.value, C) || !1;
226
+ function p(f, g) {
227
+ if (i.has(f.operator)) {
228
+ const l = i.get(f.operator);
229
+ return l && l(f.target, f.param, f.value, g) || !1;
226
230
  }
227
231
  return !1;
228
232
  }
229
- function D(g, C) {
230
- return b(g).reduce((f, a) => f && m(a, C), !0);
233
+ function T(f, g) {
234
+ return m(f).reduce((u, b) => u && p(b, g), !0);
231
235
  }
232
- function P(g, C) {
233
- const p = Object.keys(g), i = p.includes("allOf"), f = p.includes("anyOf"), a = i || f, T = (a ? g[a ? i ? "allOf" : "anyOf" : "allOf"] : [g]).map((E) => D(E, C));
234
- return i ? !T.includes(!1) : T.includes(!0);
236
+ function x(f, g) {
237
+ const l = Object.keys(f), c = l.includes("allOf"), u = l.includes("anyOf"), b = c || u, O = (b ? f[b ? c ? "allOf" : "anyOf" : "allOf"] : [f]).map((j) => T(j, g));
238
+ return c ? !O.includes(!1) : O.includes(!0);
235
239
  }
236
- return { parseValueSchema: P };
240
+ return { parseValueSchema: x };
237
241
  }
238
- const re = {
242
+ const te = {
239
243
  button: { type: "button", name: "按钮", icon: "Button" },
240
244
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
241
245
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -273,31 +277,33 @@ const re = {
273
277
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
274
278
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
275
279
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
276
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
277
- }, Ce = {}, Ve = {};
278
- Le();
279
- function we(s, e, o = /* @__PURE__ */ new Map(), c = (m, D, P) => D, d = {}, b = (m) => m) {
280
- return oe[e.title] = e, ve[e.title] = c, Ce[e.title] = d, Ve[e.title] = b, (m = {}) => {
281
- const D = Fe(m, e, o), P = Object.keys(s).reduce((g, C) => (g[C] = s[C].default, g), {});
282
- return Object.assign(P, D);
280
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
281
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
282
+ }, je = {}, $e = {};
283
+ _e();
284
+ function ye(s, e, n = /* @__PURE__ */ new Map(), i = (p, T, x, f) => T, d = {}, m = (p) => p) {
285
+ return he[e.title] = e, be[e.title] = i, je[e.title] = d, $e[e.title] = m, (p = {}) => {
286
+ const T = Oe(p, e, n), x = Object.keys(s).reduce((f, g) => (f[g] = s[g].default, f), {});
287
+ return Object.assign(x, T);
283
288
  };
284
289
  }
285
- function We(s, e) {
290
+ function Fe(s, e) {
286
291
  return { customClass: e.class, customStyle: e.style };
287
292
  }
288
- const Ue = /* @__PURE__ */ new Map([
293
+ const Ne = /* @__PURE__ */ new Map([
289
294
  ["buttons", "items"],
290
- ["appearance", We]
291
- ]), qe = /* @__PURE__ */ new Map([
292
- ["appearance", ze]
295
+ ["appearance", Fe]
293
296
  ]);
294
- function ze(s, e) {
297
+ function Le(s, e) {
295
298
  return { class: e.class, style: e.style };
296
299
  }
297
- function xe(s, e, o) {
300
+ const Ve = /* @__PURE__ */ new Map([
301
+ ["appearance", Le]
302
+ ]);
303
+ function ve(s, e, n) {
298
304
  return e;
299
305
  }
300
- const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-design.gitee.io/response-toolbar.schema.json", Je = "response-toolbar", Qe = "A Farris Toolbar Component", Xe = "object", Ye = {
306
+ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-design.gitee.io/response-toolbar.schema.json", qe = "response-toolbar", ze = "A Farris Toolbar Component", Ge = "object", He = {
301
307
  id: {
302
308
  description: "The unique identifier for a Response Toolbar",
303
309
  type: "string"
@@ -312,13 +318,10 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
312
318
  type: "object",
313
319
  properties: {
314
320
  class: {
315
- type: "string"
316
- },
317
- style: {
318
- type: "string"
321
+ type: "string",
322
+ default: ""
319
323
  }
320
- },
321
- default: {}
324
+ }
322
325
  },
323
326
  alignment: {
324
327
  description: "The alignment of Response Toolbar Button.",
@@ -330,19 +333,19 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
330
333
  type: "array",
331
334
  default: []
332
335
  }
333
- }, Ze = [
336
+ }, Qe = [
334
337
  "id",
335
338
  "type",
336
339
  "buttons"
337
- ], Ke = {
338
- $schema: Ge,
339
- $id: He,
340
- title: Je,
341
- description: Qe,
342
- type: Xe,
343
- properties: Ye,
344
- required: Ze
345
- }, et = "https://json-schema.org/draft/2020-12/schema", tt = "https://farris-design.gitee.io/response-toolbar-item.schema.json", nt = "response-toolbar-item", ot = "A Farris Toolbar Item Component", st = "object", rt = {
340
+ ], Je = {
341
+ $schema: Ue,
342
+ $id: We,
343
+ title: qe,
344
+ description: ze,
345
+ type: Ge,
346
+ properties: He,
347
+ required: Qe
348
+ }, Xe = "https://json-schema.org/draft/2020-12/schema", Ye = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Ze = "response-toolbar-item", Ke = "A Farris Toolbar Item Component", et = "object", tt = {
346
349
  id: {
347
350
  description: "The unique identifier for a Response Toolbar",
348
351
  type: "string"
@@ -358,13 +361,9 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
358
361
  properties: {
359
362
  class: {
360
363
  type: "string",
361
- default: "btn-primary"
362
- },
363
- style: {
364
- type: "string"
364
+ default: "btn-secondary"
365
365
  }
366
- },
367
- default: {}
366
+ }
368
367
  },
369
368
  alignment: {
370
369
  description: "对齐",
@@ -374,69 +373,36 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
374
373
  text: {
375
374
  description: "文本",
376
375
  type: "string",
377
- default: "新增"
376
+ default: "按钮"
378
377
  },
379
378
  icon: {
380
379
  description: "图标",
381
380
  type: "string",
382
381
  default: ""
383
382
  },
383
+ disabled: {
384
+ description: "禁用",
385
+ type: "boolean",
386
+ default: !1
387
+ },
384
388
  onClick: {
385
389
  description: "点击事件",
386
390
  type: "string",
387
391
  default: ""
388
392
  }
389
- }, it = [
393
+ }, nt = [
390
394
  "id",
391
395
  "type",
392
396
  "text"
393
- ], te = {
394
- $schema: et,
395
- $id: tt,
396
- title: nt,
397
- description: ot,
398
- type: st,
399
- properties: rt,
400
- required: it
401
- }, ct = "response-toolbar-item", at = "A Farris Container Component", lt = "object", pt = {
402
- basic: {
403
- title: "基本信息",
404
- description: "Basic Infomation",
405
- properties: {
406
- id: {
407
- title: "标识",
408
- type: "string",
409
- description: "The identifier of a component.",
410
- readonly: !0
411
- },
412
- type: {
413
- title: "类型",
414
- type: "enum",
415
- description: "The type of a component.",
416
- editor: {
417
- type: "combo-list",
418
- data: []
419
- }
420
- },
421
- text: {
422
- title: "文本",
423
- type: "string",
424
- description: "",
425
- refreshPanelAfterChanged: !0
426
- },
427
- icon: {
428
- title: "图标",
429
- type: "string",
430
- description: ""
431
- }
432
- }
433
- }
434
- }, de = {
435
- title: ct,
436
- description: at,
437
- type: lt,
438
- categories: pt
439
- }, ie = {
397
+ ], ot = {
398
+ $schema: Xe,
399
+ $id: Ye,
400
+ title: Ze,
401
+ description: Ke,
402
+ type: et,
403
+ properties: tt,
404
+ required: nt
405
+ }, ne = {
440
406
  /** 组件自定义样式 */
441
407
  customClass: { type: String, default: "" },
442
408
  alignment: { Type: String, default: "right" },
@@ -444,17 +410,14 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
444
410
  Type: Array,
445
411
  default: []
446
412
  }
447
- };
448
- oe[te.title] = te;
449
- Ce[de.title] = de;
450
- const dt = Object.assign({}, ie, {
413
+ }, st = Object.assign({}, ne, {
451
414
  componentId: { type: String, default: "" }
452
- }), ce = we(
453
- ie,
454
- Ke,
455
- Ue,
456
- xe
457
- ), Te = {
415
+ }), oe = ye(
416
+ ne,
417
+ Je,
418
+ Ne,
419
+ ve
420
+ ), Ce = {
458
421
  id: { type: String, default: "" },
459
422
  items: { type: Object, default: {} },
460
423
  class: { type: String, default: "" },
@@ -463,1528 +426,773 @@ const dt = Object.assign({}, ie, {
463
426
  icon: { type: String, default: "" },
464
427
  componentId: { type: String, default: "" },
465
428
  alignment: { Type: String, default: "right" }
466
- }, ut = we(
467
- Te,
468
- te,
469
- qe,
470
- xe
429
+ }, rt = ye(
430
+ Ce,
431
+ ot,
432
+ Ve,
433
+ ve
471
434
  );
472
- function je() {
473
- function s(o) {
474
- const c = {
435
+ function we() {
436
+ function s(n) {
437
+ const i = {
475
438
  "f-icon": !0
476
439
  };
477
- if (o.icon) {
478
- const d = o.icon.trim().split(" ");
479
- d && d.length && d.reduce((b, m) => (b[m] = !0, b), c);
440
+ if (n.icon) {
441
+ const d = n.icon.trim().split(" ");
442
+ d && d.length && d.reduce((m, p) => (m[p] = !0, m), i);
480
443
  }
481
- return c;
444
+ return i;
482
445
  }
483
- function e(o) {
484
- return !!(o.icon && o.icon.trim());
446
+ function e(n) {
447
+ return !!(n.icon && n.icon.trim());
485
448
  }
486
449
  return { iconClass: s, shouldShowIcon: e };
487
450
  }
488
- function ft(s) {
489
- function e(p) {
490
- const i = {
451
+ function it(s) {
452
+ function e(l) {
453
+ const c = {
491
454
  "dropdown-menu": !0
492
455
  };
493
- if (p.class) {
494
- const f = p.menuClass.split(" ");
495
- f && f.length && f.reduce((a, y) => (a[y] = !0, a), i);
456
+ if (l.class) {
457
+ const u = l.menuClass.split(" ");
458
+ u && u.length && u.reduce((b, I) => (b[I] = !0, b), c);
496
459
  }
497
- return i;
460
+ return c;
498
461
  }
499
- function o(p) {
500
- const i = {
501
- disabled: !p.enable,
462
+ function n(l) {
463
+ const c = {
464
+ disabled: !l.enable,
502
465
  "dropdown-submenu": !0,
503
466
  "f-rt-dropdown": !0
504
- }, f = p.dropdownClass.split(" ");
505
- return f && f.length && f.reduce((a, y) => (a[y] = !0, a), i), i;
467
+ }, u = l.dropdownClass.split(" ");
468
+ return u && u.length && u.reduce((b, I) => (b[I] = !0, b), c), c;
506
469
  }
507
- function c(p) {
508
- const i = {
509
- disabled: !p.enable,
470
+ function i(l) {
471
+ const c = {
472
+ disabled: !l.enable,
510
473
  "dropdown-item": !0,
511
474
  "f-rt-btn": !0
512
- }, f = p.class.split(" ");
513
- return f && f.length && f.reduce((a, y) => (a[y] = !0, a), i), i;
475
+ }, u = l.class.split(" ");
476
+ return u && u.length && u.reduce((b, I) => (b[I] = !0, b), c), c;
514
477
  }
515
478
  let d;
516
- const b = /* @__PURE__ */ new Map();
517
- function m(p, i, f) {
518
- var y;
519
- ((y = p.target) == null ? void 0 : y.id) === i.id && p.stopPropagation();
520
- const a = f ? f.id : "__top_item__";
521
- if (i.children && i.children.length && (i.expanded = !i.expanded, i.expanded ? b.set(a, i) : b.delete(a)), b.has(a) && b.get(a) !== i) {
522
- const v = b.get(a);
523
- v && (v.expanded = !1);
479
+ const m = /* @__PURE__ */ new Map();
480
+ function p(l, c, u) {
481
+ var I;
482
+ ((I = l.target) == null ? void 0 : I.id) === c.id && l.stopPropagation();
483
+ const b = u ? u.id : "__top_item__";
484
+ if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? m.set(b, c) : m.delete(b)), m.has(b) && m.get(b) !== c) {
485
+ const B = m.get(b);
486
+ B && (B.expanded = !1);
524
487
  }
525
488
  }
526
- function D(p, i) {
527
- document.body.click(), i.enable && i.onClick(p, i.id);
528
- }
529
- function P(p) {
530
- return p.children.map((i) => i.children && i.children.length ? w("li", {
531
- class: o(i),
532
- id: i.id,
533
- onClick: (f) => i.enable && m(f, i, p)
534
- }, [w("span", {
535
- id: i.id,
536
- class: c(i),
537
- onMouseover: (f) => i.enable && m(f, i, p)
538
- }, [i.text, w("i", {
489
+ function T(l, c) {
490
+ document.body.click(), c.enable && c.onClick(l, c.id);
491
+ }
492
+ function x(l) {
493
+ return l.children.map((c) => c.children && c.children.length ? y("li", {
494
+ class: n(c),
495
+ id: c.id,
496
+ onClick: (u) => c.enable && p(u, c, l)
497
+ }, [y("span", {
498
+ id: c.id,
499
+ class: i(c),
500
+ onMouseover: (u) => c.enable && p(u, c, l)
501
+ }, [c.text, y("i", {
539
502
  class: "f-icon f-icon-arrow-chevron-right",
540
503
  style: "display: inline-block;float: right;line-height: 1.25rem;"
541
- }, null)]), d(i, i)]) : w("li", {
542
- class: c(i),
543
- id: i.id,
544
- onClick: (f) => D(f, i),
545
- onMouseover: (f) => i.enable && m(f, i, p)
546
- }, [s.shouldShowIcon(i) && w("i", {
547
- class: s.iconClass(i)
548
- }, null), i.text]));
549
- }
550
- function g(p, i, f) {
551
- const a = {
552
- display: p.expanded ? "block" : "none",
504
+ }, null)]), d(c, c)]) : y("li", {
505
+ class: i(c),
506
+ id: c.id,
507
+ onClick: (u) => T(u, c),
508
+ onMouseover: (u) => c.enable && p(u, c, l)
509
+ }, [s.shouldShowIcon(c) && y("i", {
510
+ class: s.iconClass(c)
511
+ }, null), c.text]));
512
+ }
513
+ function f(l, c, u) {
514
+ const b = {
515
+ display: l.expanded ? "block" : "none",
553
516
  position: "fixed",
554
517
  maxWidth: "300px",
555
518
  width: "auto",
556
519
  minWidth: "120px"
557
- }, y = document.getElementsByTagName("body")[0].getClientRects()[0].width, v = i, T = v == null ? void 0 : v.getClientRects();
558
- if (v && T && T.length) {
520
+ }, I = document.getElementsByTagName("body")[0].getClientRects()[0].width, B = c, O = B == null ? void 0 : B.getClientRects();
521
+ if (B && O && O.length) {
559
522
  const {
560
- top: O,
561
- width: E,
562
- left: k,
563
- right: N,
564
- height: j
565
- } = T[0], h = Math.ceil(j + O);
566
- a.top = `${h}px`, a.left = `${k}px`;
567
- const I = p.id + "_menu", A = i ? i.querySelector("#" + I) : null;
568
- if (A) {
569
- a.display === "block" && (A.style.display = "block");
570
- const l = A.getBoundingClientRect();
571
- if (f) {
572
- a.top = `${O - 6}px`;
573
- const n = Math.ceil(E + k);
574
- a.left = `${n}px`;
523
+ top: F,
524
+ width: j,
525
+ left: A,
526
+ right: k,
527
+ height: R
528
+ } = O[0], v = Math.ceil(R + F);
529
+ b.top = `${v}px`, b.left = `${A}px`;
530
+ const E = l.id + "_menu", P = c ? c.querySelector("#" + E) : null;
531
+ if (P) {
532
+ b.display === "block" && (P.style.display = "block");
533
+ const h = P.getBoundingClientRect();
534
+ if (u) {
535
+ b.top = `${F - 6}px`;
536
+ const o = Math.ceil(j + A);
537
+ b.left = `${o}px`;
575
538
  }
576
- y - k - E < l.width && (a.left = `${(f ? k : N) - l.width}px`);
539
+ I - A - j < h.width && (b.left = `${(u ? A : k) - h.width}px`);
577
540
  }
578
541
  }
579
- return a;
580
- }
581
- d = function(p, i) {
582
- var v, T;
583
- const f = fe(), a = i ? i.id : p.id, y = (T = (v = f == null ? void 0 : f.exposed) == null ? void 0 : v.elementRef.value) == null ? void 0 : T.querySelector("#" + a);
584
- return w("ul", {
585
- class: e(p),
586
- style: g(p, y, i),
587
- id: p.id + "_menu"
588
- }, [P(p)]);
542
+ return b;
543
+ }
544
+ d = function(l, c) {
545
+ var B, O;
546
+ const u = ae(), b = c ? c.id : l.id, I = (O = (B = u == null ? void 0 : u.exposed) == null ? void 0 : B.elementRef.value) == null ? void 0 : O.querySelector("#" + b);
547
+ return y("ul", {
548
+ class: e(l),
549
+ style: f(l, I, c),
550
+ id: l.id + "_menu"
551
+ }, [x(l)]);
589
552
  };
590
- function C() {
591
- b.forEach((p) => {
592
- p.expanded = !1;
593
- }), b.clear();
553
+ function g() {
554
+ m.forEach((l) => {
555
+ l.expanded = !1;
556
+ }), m.clear();
594
557
  }
595
558
  return {
596
559
  renderDropdownMenu: d,
597
- clearAllDropDownMenu: C
560
+ clearAllDropDownMenu: g
598
561
  };
599
562
  }
600
- function gt(s, e) {
601
- const o = S(s.alignment), {
602
- renderDropdownMenu: c,
563
+ function ct(s, e) {
564
+ const n = M(s.alignment), {
565
+ renderDropdownMenu: i,
603
566
  clearAllDropDownMenu: d
604
- } = ft(e);
605
- function b(C) {
606
- const p = {
567
+ } = it(e);
568
+ function m(g) {
569
+ const l = {
607
570
  "btn-group": !0,
608
571
  "f-rt-dropdown": !0,
609
- "f-btn-ml": o.value === "right",
610
- "f-btn-mr": o.value === "left"
611
- }, i = C.dropdownClass.split(" ");
612
- return i && i.length && i.reduce((f, a) => (f[a] = !0, f), p), p;
572
+ "f-btn-ml": n.value === "right",
573
+ "f-btn-mr": n.value === "left"
574
+ }, c = g.dropdownClass.split(" ");
575
+ return c && c.length && c.reduce((u, b) => (u[b] = !0, u), l), l;
613
576
  }
614
- function m(C) {
615
- const p = {
577
+ function p(g) {
578
+ const l = {
616
579
  btn: !0,
617
- disabled: !C.enable,
580
+ disabled: !g.enable,
618
581
  "f-rt-btn": !0,
619
- "btn-icontext": !!(C.icon && C.icon.trim())
582
+ "btn-icontext": !!(g.icon && g.icon.trim())
620
583
  };
621
- if (C.class) {
622
- const i = C.class.split(" ");
623
- i && i.length && i.reduce((f, a) => (f[a] = !0, f), p);
584
+ if (g.class) {
585
+ const c = g.class.split(" ");
586
+ c && c.length && c.reduce((u, b) => (u[b] = !0, u), l);
624
587
  }
625
- return p;
626
- }
627
- function D(C, p) {
628
- C.stopPropagation();
629
- const i = p.expanded;
630
- document.body.click(), p.expanded = !i;
631
- }
632
- function P(C) {
633
- return w("div", {
634
- id: C.id,
635
- class: b(C)
636
- }, [w("div", {
637
- class: m(C),
588
+ return l;
589
+ }
590
+ function T(g, l) {
591
+ g.stopPropagation();
592
+ const c = l.expanded;
593
+ document.body.click(), l.expanded = !c;
594
+ }
595
+ function x(g) {
596
+ return y("div", {
597
+ id: g.id,
598
+ class: m(g)
599
+ }, [y("div", {
600
+ class: p(g),
638
601
  style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
639
- onClick: (p) => C.enable && D(p, C)
640
- }, [e.shouldShowIcon(C) && w("i", {
641
- class: e.iconClass(C)
642
- }, null), w("span", null, [C.text]), w("i", {
602
+ onClick: (l) => g.enable && T(l, g)
603
+ }, [e.shouldShowIcon(g) && y("i", {
604
+ class: e.iconClass(g)
605
+ }, null), y("span", null, [g.text]), y("i", {
643
606
  class: "f-icon f-icon-arrow-chevron-down",
644
607
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
645
- }, null)]), c(C)]);
608
+ }, null)]), i(g)]);
646
609
  }
647
- function g() {
610
+ function f() {
648
611
  d();
649
612
  }
650
613
  return {
651
- renderToolbarDropdown: P,
652
- clearAllDropDown: g
614
+ renderToolbarDropdown: x,
615
+ clearAllDropDown: f
653
616
  };
654
617
  }
655
618
  const {
656
- buildResponseToolbarItems: ue
657
- } = ye(), Q = /* @__PURE__ */ X({
619
+ buildResponseToolbarItems: ce
620
+ } = me(), X = /* @__PURE__ */ Y({
658
621
  name: "FResponseToolbar",
659
- props: ie,
622
+ props: ne,
660
623
  emits: ["click"],
661
624
  setup(s, e) {
662
- const o = S(ue(s.items)), c = S(), d = S(), b = S(), m = S(s.alignment), D = {
625
+ const n = M(ce(s.items)), i = M(), d = M(), m = M(), p = M(s.alignment), T = {
663
626
  id: "__more_buttons__",
664
627
  text: "更多"
665
- }, P = S(new G(D)), g = je(), C = W(() => P.value.children.length > 0), p = W(() => J({
628
+ }, x = M(new z(T)), f = we(), g = V(() => x.value.children.length > 0), l = V(() => J({
666
629
  "f-toolbar": !0,
667
630
  "f-response-toolbar": !0,
668
631
  "position-relative": !0
669
- }, s.customClass)), i = W(() => ({
632
+ }, s.customClass)), c = V(() => ({
670
633
  "w-100": !0,
671
634
  "d-flex": !0,
672
635
  "flex-nowrap": !0,
673
- "justify-content-end": m.value === "right",
674
- "justify-content-start": m.value === "left"
636
+ "justify-content-end": p.value === "right",
637
+ "justify-content-start": p.value === "left"
675
638
  })), {
676
- renderToolbarDropdown: f,
677
- clearAllDropDown: a
678
- } = gt(s, g);
679
- function y() {
680
- o.value.filter((h) => h.children && h.children.length > 0).forEach((h) => {
681
- h.expanded = !1;
682
- }), P.value.expanded = !1, a();
639
+ renderToolbarDropdown: u,
640
+ clearAllDropDown: b
641
+ } = ct(s, f);
642
+ function I() {
643
+ n.value.filter((v) => v.children && v.children.length > 0).forEach((v) => {
644
+ v.expanded = !1;
645
+ }), x.value.expanded = !1, b();
683
646
  }
684
- function v(h) {
685
- const I = {
647
+ function B(v) {
648
+ const E = {
686
649
  btn: !0,
687
650
  "f-rt-btn": !0,
688
- "f-btn-ml": m.value === "right",
689
- "f-btn-mr": m.value === "left",
690
- "btn-icontext": !!(h.icon && h.icon.trim())
651
+ "f-btn-ml": p.value === "right",
652
+ "f-btn-mr": p.value === "left",
653
+ "btn-icontext": !!(v.icon && v.icon.trim())
691
654
  };
692
- if (h.class) {
693
- const A = h.class.split(" ");
694
- A && A.length && A.reduce((l, n) => (l[n] = !0, l), I);
655
+ if (v.class) {
656
+ const P = v.class.split(" ");
657
+ P && P.length && P.reduce((h, o) => (h[o] = !0, h), E);
695
658
  }
696
- return I;
659
+ return E;
697
660
  }
698
- function T(h, I) {
699
- document.body.click(), typeof I.onClick == "function" && I.onClick(h, I.id), e.emit("click", h, I.id);
661
+ function O(v, E) {
662
+ document.body.click(), typeof E.onClick == "function" && E.onClick(v, E.id), e.emit("click", v, E.id);
700
663
  }
701
- function O(h) {
702
- return w("button", {
664
+ function F(v) {
665
+ return y("button", {
703
666
  type: "button",
704
- class: v(h),
705
- id: h.id,
706
- disabled: !h.enable,
707
- onClick: (I) => T(I, h)
708
- }, [g.shouldShowIcon(h) && w("i", {
709
- class: g.iconClass(h)
710
- }, null), h.text]);
667
+ class: B(v),
668
+ id: v.id,
669
+ disabled: !v.enable,
670
+ onClick: (E) => O(E, v)
671
+ }, [f.shouldShowIcon(v) && y("i", {
672
+ class: f.iconClass(v)
673
+ }, null), v.text]);
711
674
  }
712
- const E = /* @__PURE__ */ new Map(), k = [];
713
- function N(h) {
714
- const I = b.value;
715
- let A = h;
716
- const l = Array.from(I.children), n = l[l.length - 1].id === "__more_buttons__" ? l[l.length - 1] : null;
717
- if (n) {
718
- const x = n.computedStyleMap().get("margin-left"), M = n.computedStyleMap().get("margin-right"), F = (x ? x.value : 0) + n.getBoundingClientRect().width + (M ? M.value : 0);
719
- A -= F;
675
+ const j = /* @__PURE__ */ new Map(), A = [];
676
+ function k(v) {
677
+ const E = m.value;
678
+ let P = v;
679
+ const h = Array.from(E.children), o = h[h.length - 1].id === "__more_buttons__" ? h[h.length - 1] : null;
680
+ if (o) {
681
+ const C = o.computedStyleMap().get("margin-left"), S = o.computedStyleMap().get("margin-right"), $ = (C ? C.value : 0) + o.getBoundingClientRect().width + (S ? S.value : 0);
682
+ P -= $;
720
683
  }
721
- const t = l.filter((x) => x.id !== "__more_buttons__");
722
- for (const x of t) {
723
- const M = x.computedStyleMap().get("margin-left"), F = x.computedStyleMap().get("margin-right"), _ = (M ? M.value : 0) + x.getBoundingClientRect().width + (F ? F.value : 0);
724
- A < _ ? (E.set(x.id, !0), k.push({
725
- id: x.id,
726
- width: _
727
- })) : A -= _;
684
+ const t = h.filter((C) => C.id !== "__more_buttons__");
685
+ for (const C of t) {
686
+ const S = C.computedStyleMap().get("margin-left"), $ = C.computedStyleMap().get("margin-right"), U = (S ? S.value : 0) + C.getBoundingClientRect().width + ($ ? $.value : 0);
687
+ P < U ? (j.set(C.id, !0), A.push({
688
+ id: C.id,
689
+ width: U
690
+ })) : P -= U;
728
691
  }
729
- if (k.length)
730
- for (let x = k.length - 1; x >= 0; x--) {
731
- const M = k[x].width;
732
- if (A >= M)
733
- A -= M, E.delete(k[x].id), k.pop();
692
+ if (A.length)
693
+ for (let C = A.length - 1; C >= 0; C--) {
694
+ const S = A[C].width;
695
+ if (P >= S)
696
+ P -= S, j.delete(A[C].id), A.pop();
734
697
  else
735
698
  break;
736
699
  }
737
- const r = Object.assign({}, P.value);
700
+ const r = Object.assign({}, x.value);
738
701
  r.children = [];
739
- const u = new G(r), R = o.value.reduce((x, M) => (E.has(M.id) && u.children.push(M), M.visible = !E.has(M.id), x.push(M), x), []);
740
- P.value = u, o.value = R;
702
+ const a = new z(r), w = n.value.reduce((C, S) => (j.has(S.id) && a.children.push(S), S.visible = !j.has(S.id), C.push(S), C), []);
703
+ x.value = a, n.value = w;
741
704
  }
742
- const j = new ResizeObserver((h) => {
743
- if (h.length) {
744
- const A = h[0].contentRect.width, n = b.value.getBoundingClientRect().width;
745
- (A < n || k.length) && (N(A), y());
705
+ const R = new ResizeObserver((v) => {
706
+ if (v.length) {
707
+ const P = v[0].contentRect.width, o = m.value.getBoundingClientRect().width;
708
+ (P < o || A.length) && (k(P), I());
746
709
  }
747
710
  });
748
- return z(() => {
749
- const h = d.value;
750
- j.observe(h), document.body.addEventListener("click", y), document.body.addEventListener("wheel", y);
751
- }), ne(() => {
752
- j.disconnect(), document.body.removeEventListener("click", y), document.body.removeEventListener("wheel", y);
753
- }), H(() => s.items, () => {
754
- o.value = ue(s.items);
711
+ return H(() => {
712
+ const v = d.value;
713
+ R.observe(v), document.body.addEventListener("click", I), document.body.addEventListener("wheel", I);
714
+ }), de(() => {
715
+ R.disconnect(), document.body.removeEventListener("click", I), document.body.removeEventListener("wheel", I);
716
+ }), Q(() => s.items, () => {
717
+ n.value = ce(s.items);
755
718
  }, {
756
719
  deep: !0
757
720
  }), e.expose({
758
- elementRef: c
759
- }), () => w("div", {
760
- class: p.value,
761
- ref: c
762
- }, [w("div", {
721
+ elementRef: i
722
+ }), () => y("div", {
723
+ class: l.value,
724
+ ref: i
725
+ }, [y("div", {
763
726
  ref: d,
764
- class: i.value
765
- }, [w("div", {
766
- ref: b,
727
+ class: c.value
728
+ }, [y("div", {
729
+ ref: m,
767
730
  class: "d-inline-block f-response-content",
768
731
  style: "white-space: nowrap;"
769
- }, [o.value.filter((h) => h.visible).map((h) => h.children && h.children.length > 0 ? f(h) : O(h)), C.value && f(P.value)])])]);
732
+ }, [n.value.filter((v) => v.visible).map((v) => v.children && v.children.length > 0 ? u(v) : F(v)), g.value && u(x.value)])])]);
770
733
  }
771
734
  });
772
- function mt(s, e) {
773
- const o = L("design-item-context"), c = L("toolbar-item-handler", () => {
735
+ function lt(s, e) {
736
+ const n = L("design-item-context"), i = L("toolbar-item-handler", () => {
774
737
  });
775
738
  function d() {
776
- c && c();
739
+ i && i();
777
740
  }
778
- function b(n) {
741
+ function m(o) {
779
742
  const t = {
780
743
  "dropdown-menu": !0
781
744
  };
782
- if (n.class) {
783
- const r = n.menuClass.split(" ");
784
- r && r.length && r.reduce((u, R) => (u[R] = !0, u), t);
745
+ if (o.class) {
746
+ const r = o.menuClass.split(" ");
747
+ r && r.length && r.reduce((a, w) => (a[w] = !0, a), t);
785
748
  }
786
749
  return t;
787
750
  }
788
- function m(n) {
751
+ function p(o) {
789
752
  const t = {
790
- disabled: !n.enable,
753
+ disabled: !o.enable,
791
754
  "dropdown-submenu": !0,
792
755
  "f-rt-dropdown": !0
793
- }, r = n.dropdownClass.split(" ");
794
- return r && r.length && r.reduce((u, R) => (u[R] = !0, u), t), t;
756
+ }, r = o.dropdownClass.split(" ");
757
+ return r && r.length && r.reduce((a, w) => (a[w] = !0, a), t), t;
795
758
  }
796
- function D(n) {
759
+ function T(o) {
797
760
  const t = {
798
- disabled: !n.enable,
761
+ disabled: !o.enable,
799
762
  "dropdown-item": !0,
800
763
  "f-rt-btn": !0,
801
764
  "position-relative": !0,
802
765
  "farris-component": !0
803
- }, r = n.class.split(" ");
804
- return r && r.length && r.reduce((u, R) => (u[R] = !0, u), t), t;
805
- }
806
- let P;
807
- const g = /* @__PURE__ */ new Map();
808
- function C(n, t, r) {
809
- var R;
810
- ((R = n.target) == null ? void 0 : R.id) === t.id && n.stopPropagation();
811
- const u = r ? r.id : "__top_item__";
812
- if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? g.set(u, t) : g.delete(u)), g.has(u) && g.get(u) !== t) {
813
- const x = g.get(u);
814
- x && (x.expanded = !1);
766
+ }, r = o.class.split(" ");
767
+ return r && r.length && r.reduce((a, w) => (a[w] = !0, a), t), t;
768
+ }
769
+ let x;
770
+ const f = /* @__PURE__ */ new Map();
771
+ function g(o, t, r) {
772
+ var w;
773
+ ((w = o.target) == null ? void 0 : w.id) === t.id && o.stopPropagation();
774
+ const a = r ? r.id : "__top_item__";
775
+ if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? f.set(a, t) : f.delete(a)), f.has(a) && f.get(a) !== t) {
776
+ const C = f.get(a);
777
+ C && (C.expanded = !1);
815
778
  }
816
779
  }
817
- function p(n) {
818
- n && (n.stopPropagation(), n.preventDefault());
780
+ function l(o) {
781
+ o && (o.stopPropagation(), o.preventDefault());
819
782
  }
820
- function i() {
783
+ function c() {
821
784
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((t) => t.classList.remove("dgComponentFocused"));
822
- const n = document.getElementsByClassName("dgComponentSelected");
823
- Array.from(n).forEach((t) => t.classList.remove("dgComponentSelected"));
785
+ const o = document.getElementsByClassName("dgComponentSelected");
786
+ Array.from(o).forEach((t) => t.classList.remove("dgComponentSelected"));
824
787
  }
825
- function f(n) {
826
- n.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
788
+ function u(o) {
789
+ o.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
827
790
  }
828
- function a(n) {
791
+ function b(o) {
829
792
  const {
830
793
  buttons: t = []
831
- } = o.schema;
794
+ } = n.schema;
832
795
  let r = [];
833
- t.forEach((x) => {
834
- r = r.concat(x.children || []);
796
+ t.forEach((C) => {
797
+ r = r.concat(C.children || []);
835
798
  });
836
- const u = r.findIndex((x) => x.id === n), R = u === -1 ? null : r[u];
799
+ const a = r.findIndex((C) => C.id === o), w = a === -1 ? null : r[a];
837
800
  return {
838
- index: u,
839
- item: R
801
+ index: a,
802
+ item: w
840
803
  };
841
804
  }
842
- function y(n) {
805
+ function I(o) {
843
806
  const {
844
807
  buttons: t = []
845
- } = o.schema, r = t.findIndex((R) => R.id === n), u = r === -1 ? null : t[r];
808
+ } = n.schema, r = t.findIndex((w) => w.id === o), a = r === -1 ? null : t[r];
846
809
  return {
847
810
  index: r,
848
- item: u
811
+ item: a
849
812
  };
850
813
  }
851
- function v(n) {
852
- var u;
853
- o.schema;
814
+ function B(o) {
815
+ var a;
816
+ n.schema;
854
817
  const {
855
818
  index: t,
856
819
  item: r
857
- } = a(n);
858
- (u = o == null ? void 0 : o.setupContext) == null || u.emit("selectionChange", r == null ? void 0 : r.type, r);
820
+ } = b(o);
821
+ (a = n == null ? void 0 : n.setupContext) == null || a.emit("selectionChange", r == null ? void 0 : r.type, r);
859
822
  }
860
- const T = function(n) {
823
+ const O = function(o) {
861
824
  const {
862
825
  componentType: t
863
- } = n, r = q(t, n), u = t.toLowerCase().replace("-", "_");
864
- return r && !r.id && r.type === t && (r.id = `${u}_${Math.random().toString().slice(2, 6)}`), r;
865
- }, O = function() {
866
- const n = {
826
+ } = o, r = Z(t, o), a = t.toLowerCase().replace("-", "_");
827
+ return r && !r.id && r.type === t && (r.id = `${a}_${Math.random().toString().slice(2, 6)}`), r;
828
+ }, F = function() {
829
+ const o = {
867
830
  componentType: "response-toolbar-item",
868
831
  parentComponentInstance: e.value,
869
832
  targetPosition: -1
870
833
  };
871
- return T(n);
834
+ return O(o);
872
835
  };
873
- function E(n, t) {
874
- p(n), i(), f(n), v(t.id);
875
- }
876
- function k(n, t, r) {
877
- p(n);
878
- const u = t.id, R = r && r.id, {
879
- buttons: x = []
880
- } = o.schema;
881
- if (!R)
836
+ function j(o, t) {
837
+ l(o), c(), u(o), B(t.id);
838
+ }
839
+ function A(o, t, r) {
840
+ l(o);
841
+ const a = t.id, w = r && r.id, {
842
+ buttons: C = []
843
+ } = n.schema;
844
+ if (!w)
882
845
  return;
883
846
  const {
884
- index: M
885
- } = y(R);
886
- if (M === -1)
847
+ index: S
848
+ } = I(w);
849
+ if (S === -1)
887
850
  return;
888
851
  const {
889
- index: F
890
- } = a(u);
891
- F !== -1 && (x[M].children.splice(F, 1), d());
892
- }
893
- function N(n, t, r) {
894
- p(n);
895
- const u = r && r.id, {
896
- buttons: R = []
897
- } = o.schema;
898
- if (!u)
852
+ index: $
853
+ } = b(a);
854
+ $ !== -1 && (C[S].children.splice($, 1), d());
855
+ }
856
+ function k(o, t, r) {
857
+ l(o);
858
+ const a = r && r.id, {
859
+ buttons: w = []
860
+ } = n.schema;
861
+ if (!a)
899
862
  return;
900
863
  const {
901
- index: x
902
- } = y(u);
903
- if (x === -1)
864
+ index: C
865
+ } = I(a);
866
+ if (C === -1)
904
867
  return;
905
- const M = O(), F = Object.assign({}, M, {
868
+ const S = F(), $ = Object.assign({}, S, {
906
869
  text: t.text
907
870
  });
908
- R[x].children.push(F), d();
909
- }
910
- function j(n, t, r) {
911
- p(n);
912
- const u = r && r.id, {
913
- buttons: R = []
914
- } = o.schema;
915
- if (!u)
871
+ w[C].children.push($), d();
872
+ }
873
+ function R(o, t, r) {
874
+ l(o);
875
+ const a = r && r.id, {
876
+ buttons: w = []
877
+ } = n.schema;
878
+ if (!a)
916
879
  return;
917
880
  const {
918
- index: x
919
- } = y(u);
920
- if (x === -1)
881
+ index: C
882
+ } = I(a);
883
+ if (C === -1)
921
884
  return;
922
- const M = O(), F = Object.assign({}, M, {
885
+ const S = F(), $ = Object.assign({}, S, {
923
886
  text: "按钮"
924
887
  });
925
- R[x].children.push(F), d();
888
+ w[C].children.push($), d();
926
889
  }
927
- function h(n, t) {
928
- return w("div", {
890
+ function v(o, t) {
891
+ return y("div", {
929
892
  class: "component-btn-group"
930
- }, [w("div", null, [w("div", {
893
+ }, [y("div", null, [y("div", {
931
894
  role: "button",
932
895
  class: "btn component-settings-button",
933
896
  title: "删除",
934
897
  ref: "removeButton",
935
898
  style: "position:static;",
936
- onClick: (r) => k(r, n, t)
937
- }, [w("i", {
899
+ onClick: (r) => A(r, o, t)
900
+ }, [y("i", {
938
901
  class: "f-icon f-icon-yxs_delete"
939
- }, null)]), w("div", {
902
+ }, null)]), y("div", {
940
903
  role: "button",
941
904
  class: "btn component-settings-button",
942
905
  title: "复制",
943
906
  ref: "copyButton",
944
907
  style: "position:static;",
945
- onClick: (r) => N(r, n, t)
946
- }, [w("i", {
908
+ onClick: (r) => k(r, o, t)
909
+ }, [y("i", {
947
910
  class: "f-icon f-icon-yxs_copy"
948
- }, null)]), w("div", {
911
+ }, null)]), y("div", {
949
912
  role: "button",
950
913
  class: "btn component-settings-button",
951
914
  title: "新增同级",
952
915
  ref: "appendSame",
953
916
  style: "width:85px!important;padding:0 5px;position:static;",
954
- onClick: (r) => j(r, n, t)
955
- }, [w("i", {
917
+ onClick: (r) => R(r, o, t)
918
+ }, [y("i", {
956
919
  class: "f-icon f-icon-plus-circle text-white mr-1"
957
- }, null), w("span", {
920
+ }, null), y("span", {
958
921
  style: "font-size:13px;margin:auto"
959
- }, [ge("新增同级")])])])]);
922
+ }, [ue("新增同级")])])])]);
960
923
  }
961
- function I(n) {
962
- return n.children.map((t) => t.children && t.children.length ? w("li", {
963
- class: m(t),
924
+ function E(o) {
925
+ return o.children.map((t) => t.children && t.children.length ? y("li", {
926
+ class: p(t),
964
927
  id: t.id,
965
- onClick: (r) => t.enable && C(r, t, n)
966
- }, [w("span", {
928
+ onClick: (r) => t.enable && g(r, t, o)
929
+ }, [y("span", {
967
930
  id: t.id,
968
- class: D(t),
969
- onMouseover: (r) => t.enable && C(r, t, n)
970
- }, [t.text, w("i", {
931
+ class: T(t),
932
+ onMouseover: (r) => t.enable && g(r, t, o)
933
+ }, [t.text, y("i", {
971
934
  class: "f-icon f-icon-arrow-chevron-right",
972
935
  style: "display: inline-block;float: right;line-height: 1.25rem;"
973
- }, null)]), P(t, t)]) : w("li", {
974
- class: D(t),
936
+ }, null)]), x(t, t)]) : y("li", {
937
+ class: T(t),
975
938
  id: t.id,
976
- onClick: (r) => E(r, t)
977
- }, [h(t, n), s.shouldShowIcon(t) && w("i", {
939
+ onClick: (r) => j(r, t)
940
+ }, [v(t, o), s.shouldShowIcon(t) && y("i", {
978
941
  class: s.iconClass(t)
979
942
  }, null), t.text]));
980
943
  }
981
- function A(n, t, r) {
982
- const u = {
983
- display: n.expanded ? "block" : "none",
944
+ function P(o, t, r) {
945
+ const a = {
946
+ display: o.expanded ? "block" : "none",
984
947
  position: "fixed",
985
948
  maxWidth: "300px",
986
949
  width: "auto",
987
950
  minWidth: "120px"
988
- }, R = document.getElementsByTagName("body")[0].getClientRects()[0].width, x = t, M = x == null ? void 0 : x.getClientRects();
989
- if (x && M && M.length) {
951
+ }, w = document.getElementsByTagName("body")[0].getClientRects()[0].width, C = t, S = C == null ? void 0 : C.getClientRects();
952
+ if (C && S && S.length) {
990
953
  const {
991
- top: F,
992
- width: _,
993
- left: $,
994
- right: V,
995
- height: U
996
- } = M[0], Y = Math.ceil(U + F);
997
- u.top = `${Y}px`, u.left = `${$}px`;
998
- const Ie = n.id + "_menu", Z = t ? t.querySelector("#" + Ie) : null;
999
- if (Z) {
1000
- u.display === "block" && (Z.style.display = "block");
1001
- const le = Z.getBoundingClientRect();
954
+ top: $,
955
+ width: U,
956
+ left: W,
957
+ right: _,
958
+ height: N
959
+ } = S[0], q = Math.ceil(N + $);
960
+ a.top = `${q}px`, a.left = `${W}px`;
961
+ const G = o.id + "_menu", K = t ? t.querySelector("#" + G) : null;
962
+ if (K) {
963
+ a.display === "block" && (K.style.display = "block");
964
+ const re = K.getBoundingClientRect();
1002
965
  if (r) {
1003
- u.top = `${F - 6}px`;
1004
- const Ee = Math.ceil(_ + $);
1005
- u.left = `${Ee}px`;
966
+ a.top = `${$ - 6}px`;
967
+ const Te = Math.ceil(U + W);
968
+ a.left = `${Te}px`;
1006
969
  }
1007
- R - $ - _ < le.width && (u.left = `${(r ? $ : V) - le.width}px`);
970
+ w - W - U < re.width && (a.left = `${(r ? W : _) - re.width}px`);
1008
971
  }
1009
972
  }
1010
- return u;
1011
- }
1012
- P = function(n, t) {
1013
- var x, M;
1014
- const r = fe(), u = t ? t.id : n.id, R = (M = (x = r == null ? void 0 : r.exposed) == null ? void 0 : x.elementRef.value) == null ? void 0 : M.querySelector("#" + u);
1015
- return w("ul", {
1016
- class: b(n),
1017
- style: A(n, R, t),
1018
- id: n.id + "_menu"
1019
- }, [I(n)]);
973
+ return a;
974
+ }
975
+ x = function(o, t) {
976
+ var C, S;
977
+ const r = ae(), a = t ? t.id : o.id, w = (S = (C = r == null ? void 0 : r.exposed) == null ? void 0 : C.elementRef.value) == null ? void 0 : S.querySelector("#" + a);
978
+ return y("ul", {
979
+ class: m(o),
980
+ style: P(o, w, t),
981
+ id: o.id + "_menu"
982
+ }, [E(o)]);
1020
983
  };
1021
- function l() {
1022
- g.forEach((n) => {
1023
- n.expanded = !1;
1024
- }), g.clear();
984
+ function h() {
985
+ f.forEach((o) => {
986
+ o.expanded = !1;
987
+ }), f.clear();
1025
988
  }
1026
989
  return {
1027
- renderDropdownMenu: P,
1028
- clearAllDropDownMenu: l
990
+ renderDropdownMenu: x,
991
+ clearAllDropDownMenu: h
1029
992
  };
1030
993
  }
1031
- function ht(s, e, o) {
1032
- const c = S(s.alignment), {
994
+ function at(s, e, n) {
995
+ const i = M(s.alignment), {
1033
996
  renderDropdownMenu: d,
1034
- clearAllDropDownMenu: b
1035
- } = mt(e, o), m = L("design-item-context"), D = L("toolbar-item-handler", () => {
997
+ clearAllDropDownMenu: m
998
+ } = lt(e, n), p = L("design-item-context"), T = L("toolbar-item-handler", () => {
1036
999
  });
1037
- function P() {
1038
- D && D();
1000
+ function x() {
1001
+ T && T();
1039
1002
  }
1040
- function g(l) {
1041
- const n = {
1003
+ function f(h) {
1004
+ const o = {
1042
1005
  "btn-group": !0,
1043
1006
  "f-rt-dropdown": !0,
1044
- "f-btn-ml": c.value === "right",
1045
- "f-btn-mr": c.value === "left"
1046
- }, t = l.dropdownClass.split(" ");
1047
- return t && t.length && t.reduce((r, u) => (r[u] = !0, r), n), n;
1007
+ "f-btn-ml": i.value === "right",
1008
+ "f-btn-mr": i.value === "left"
1009
+ }, t = h.dropdownClass.split(" ");
1010
+ return t && t.length && t.reduce((r, a) => (r[a] = !0, r), o), o;
1048
1011
  }
1049
- function C(l) {
1050
- const n = {
1012
+ function g(h) {
1013
+ const o = {
1051
1014
  btn: !0,
1052
- disabled: !l.enable,
1015
+ disabled: !h.enable,
1053
1016
  "position-relative": !0,
1054
1017
  "farris-component": !0,
1055
1018
  "f-rt-btn": !0,
1056
- "btn-icontext": !!(l.icon && l.icon.trim())
1019
+ "btn-icontext": !!(h.icon && h.icon.trim())
1057
1020
  };
1058
- if (l.class) {
1059
- const t = l.class.split(" ");
1060
- t && t.length && t.reduce((r, u) => (r[u] = !0, r), n);
1021
+ if (h.class) {
1022
+ const t = h.class.split(" ");
1023
+ t && t.length && t.reduce((r, a) => (r[a] = !0, r), o);
1061
1024
  }
1062
- return n;
1025
+ return o;
1063
1026
  }
1064
- function p(l) {
1065
- l && (l.stopPropagation(), l.preventDefault());
1027
+ function l(h) {
1028
+ h && (h.stopPropagation(), h.preventDefault());
1066
1029
  }
1067
- function i(l, n) {
1068
- p(l);
1069
- const t = n.expanded;
1070
- document.body.click(), n.expanded = !t;
1030
+ function c(h, o) {
1031
+ l(h);
1032
+ const t = o.expanded;
1033
+ document.body.click(), o.expanded = !t;
1071
1034
  }
1072
- const f = function(l) {
1035
+ const u = function(h) {
1073
1036
  const {
1074
- componentType: n
1075
- } = l, t = q(n, l), r = n.toLowerCase().replace("-", "_");
1076
- return t && !t.id && t.type === n && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
1077
- }, a = function() {
1078
- const l = {
1037
+ componentType: o
1038
+ } = h, t = Z(o, h), r = o.toLowerCase().replace("-", "_");
1039
+ return t && !t.id && t.type === o && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
1040
+ }, b = function() {
1041
+ const h = {
1079
1042
  componentType: "response-toolbar-item",
1080
- parentComponentInstance: o.value,
1043
+ parentComponentInstance: n.value,
1081
1044
  targetPosition: -1
1082
1045
  };
1083
- return f(l);
1046
+ return u(h);
1084
1047
  };
1085
- function y(l) {
1086
- const n = m.schema.buttons || m.schema.contents, t = n == null ? void 0 : n.findIndex((u) => u.id === l), r = t === -1 ? null : n[t];
1048
+ function I(h) {
1049
+ const o = p.schema.buttons || p.schema.contents, t = o == null ? void 0 : o.findIndex((a) => a.id === h), r = t === -1 ? null : o[t];
1087
1050
  return {
1088
1051
  index: t,
1089
1052
  toolbarItem: r
1090
1053
  };
1091
1054
  }
1092
- function v(l, n) {
1093
- var M;
1055
+ function B(h, o) {
1056
+ var S;
1094
1057
  const {
1095
1058
  index: t,
1096
1059
  toolbarItem: r
1097
- } = y(n);
1060
+ } = I(o);
1098
1061
  if (t === -1)
1099
1062
  return;
1100
- const u = r.text || "按钮", R = a(), x = Object.assign({}, R, {
1101
- text: u
1063
+ const a = r.text || "按钮", w = b(), C = Object.assign({}, w, {
1064
+ text: a
1102
1065
  });
1103
- (M = m.schema.buttons) == null || M.push(x), P();
1066
+ (S = p.schema.buttons) == null || S.push(C), x();
1104
1067
  }
1105
- function T(l, n) {
1068
+ function O(h, o) {
1106
1069
  const {
1107
1070
  index: t,
1108
1071
  toolbarItem: r
1109
- } = y(n);
1072
+ } = I(o);
1110
1073
  if (t === -1)
1111
1074
  return;
1112
- const u = r.text || "按钮", R = a(), x = Object.assign({}, R, {
1113
- text: u
1114
- }), M = m.schema.buttons[t].children || [];
1115
- M.push(x), m.schema.buttons[t].children = M, P();
1075
+ const a = r.text || "按钮", w = b(), C = Object.assign({}, w, {
1076
+ text: a
1077
+ }), S = p.schema.buttons[t].children || [];
1078
+ S.push(C), p.schema.buttons[t].children = S, x();
1116
1079
  }
1117
- function O(l, n) {
1118
- const t = m.schema.buttons || m.schema.contents, r = t == null ? void 0 : t.findIndex((u) => u.id === n);
1119
- r !== -1 && (t.splice(r, 1), P());
1080
+ function F(h, o) {
1081
+ const t = p.schema.buttons || p.schema.contents, r = t == null ? void 0 : t.findIndex((a) => a.id === o);
1082
+ r !== -1 && (t.splice(r, 1), x());
1120
1083
  }
1121
- function E(l) {
1122
- return w("div", {
1084
+ function j(h) {
1085
+ return y("div", {
1123
1086
  class: "component-btn-group"
1124
- }, [w("div", null, [w("div", {
1087
+ }, [y("div", null, [y("div", {
1125
1088
  role: "button",
1126
1089
  class: "btn component-settings-button",
1127
1090
  title: "删除",
1128
1091
  ref: "removeButton",
1129
1092
  style: "position:static;",
1130
- onClick: (n) => O(n, l)
1131
- }, [w("i", {
1093
+ onClick: (o) => F(o, h)
1094
+ }, [y("i", {
1132
1095
  class: "f-icon f-icon-yxs_delete"
1133
- }, null)]), w("div", {
1096
+ }, null)]), y("div", {
1134
1097
  role: "button",
1135
1098
  class: "btn component-settings-button",
1136
1099
  title: "复制",
1137
1100
  ref: "copyButton",
1138
1101
  style: "position:static;",
1139
- onClick: (n) => v(n, l)
1140
- }, [w("i", {
1102
+ onClick: (o) => B(o, h)
1103
+ }, [y("i", {
1141
1104
  class: "f-icon f-icon-yxs_copy"
1142
- }, null)]), w("div", {
1105
+ }, null)]), y("div", {
1143
1106
  role: "button",
1144
1107
  class: "btn component-settings-button",
1145
1108
  title: "新增子级",
1146
1109
  ref: "appendChildButton",
1147
1110
  style: "width:85px!important;padding:0 5px;position:static;",
1148
- onClick: (n) => T(n, l)
1149
- }, [w("i", {
1111
+ onClick: (o) => O(o, h)
1112
+ }, [y("i", {
1150
1113
  class: "f-icon f-icon-plus-circle text-white mr-1"
1151
- }, null), w("span", {
1114
+ }, null), y("span", {
1152
1115
  style: "font-size:13px;margin:auto"
1153
- }, [ge("新增子级")])])])]);
1116
+ }, [ue("新增子级")])])])]);
1154
1117
  }
1155
- function k() {
1156
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((n) => n.classList.remove("dgComponentFocused"));
1157
- const l = document.getElementsByClassName("dgComponentSelected");
1158
- Array.from(l).forEach((n) => n.classList.remove("dgComponentSelected"));
1118
+ function A() {
1119
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
1120
+ const h = document.getElementsByClassName("dgComponentSelected");
1121
+ Array.from(h).forEach((o) => o.classList.remove("dgComponentSelected"));
1159
1122
  }
1160
- function N(l) {
1161
- l.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1123
+ function k(h) {
1124
+ h.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1162
1125
  }
1163
- function j(l) {
1164
- var u;
1165
- const n = m.schema.buttons || m.schema.contents, t = n == null ? void 0 : n.findIndex((R) => R.id === l);
1126
+ function R(h) {
1127
+ var a;
1128
+ const o = p.schema.buttons || p.schema.contents, t = o == null ? void 0 : o.findIndex((w) => w.id === h);
1166
1129
  if (t === -1)
1167
1130
  return;
1168
- const r = n[t];
1169
- (u = m == null ? void 0 : m.setupContext) == null || u.emit("selectionChange", "response-toolbar-item", r);
1170
- }
1171
- function h(l, n) {
1172
- p(l), k(), N(l), p(l), i(l, n), j(n.id);
1173
- }
1174
- function I(l) {
1175
- return w("div", {
1176
- id: l.id,
1177
- class: g(l)
1178
- }, [w("div", {
1179
- class: C(l),
1131
+ const r = o[t];
1132
+ (a = p == null ? void 0 : p.setupContext) == null || a.emit("selectionChange", "response-toolbar-item", r);
1133
+ }
1134
+ function v(h, o) {
1135
+ l(h), A(), k(h), l(h), c(h, o), R(o.id);
1136
+ }
1137
+ function E(h) {
1138
+ return y("div", {
1139
+ id: h.id,
1140
+ class: f(h)
1141
+ }, [y("div", {
1142
+ class: g(h),
1180
1143
  style: "display: flex;padding-right: 0.1rem;",
1181
- onClick: (n) => l.enable && h(n, l)
1182
- }, [E(l.id), e.shouldShowIcon(l) && w("i", {
1183
- class: e.iconClass(l)
1184
- }, null), w("span", null, [l.text]), w("i", {
1144
+ onClick: (o) => h.enable && v(o, h)
1145
+ }, [j(h.id), e.shouldShowIcon(h) && y("i", {
1146
+ class: e.iconClass(h)
1147
+ }, null), y("span", null, [h.text]), y("i", {
1185
1148
  class: "f-icon f-icon-arrow-chevron-down",
1186
1149
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
1187
- }, null)]), d(l)]);
1188
- }
1189
- function A() {
1190
- b();
1150
+ }, null)]), d(h)]);
1191
1151
  }
1192
- return {
1193
- renderToolbarDropdown: I,
1194
- clearAllDropDown: A
1195
- };
1196
- }
1197
- function bt() {
1198
- function s(e) {
1199
- var d, b;
1200
- if (!e)
1201
- return !1;
1202
- const o = ((d = e.targetContainer) == null ? void 0 : d.componentInstance) && e.targetContainer.componentInstance.value;
1203
- if (!o)
1204
- return !1;
1205
- const c = (b = o.schema.appearance) == null ? void 0 : b.class;
1206
- if (e.controlCategory === "input" || e.controlType === "form-group") {
1207
- const m = o.schema.type, D = (m === "response-form" || m === "content-container") && c && c.includes("farris-form");
1208
- if (o.schema.type !== "response-layout-item" && !D)
1209
- return !1;
1210
- }
1211
- return e.controlType !== "field-set";
1152
+ function P() {
1153
+ m();
1212
1154
  }
1213
1155
  return {
1214
- basalDragulaRuleForContainer: s
1156
+ renderToolbarDropdown: E,
1157
+ clearAllDropDown: P
1215
1158
  };
1216
1159
  }
1217
- const yt = "https://json-schema.org/draft/2020-12/schema", vt = "https://farris-design.gitee.io/dragging-rules.schema.json", Ct = "Dragging Rules", wt = "The rules of designer canvas", xt = "object", Tt = {
1218
- "f-page": {
1219
- description: "The root class of page designed by farris.",
1220
- type: "object",
1221
- properties: {
1222
- contents: {
1223
- type: "object",
1224
- properties: {
1225
- "f-page-header": {
1226
- description: "The class of page header designed by farris.",
1227
- type: "string"
1228
- },
1229
- "f-page-main": {
1230
- description: "The class of page body designed by farris.",
1231
- type: "object",
1232
- properties: {
1233
- contents: {
1234
- type: "object",
1235
- properties: {
1236
- "f-struct-like-card": {
1237
- description: "",
1238
- type: "object",
1239
- properties: {
1240
- contents: {
1241
- type: "object",
1242
- properties: {
1243
- "f-struct-form": {
1244
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
1245
- type: "object",
1246
- properties: {
1247
- contents: {
1248
- type: "object",
1249
- properties: {
1250
- "f-section-form": {
1251
- description: "The class of section which has wrapped a reponse-form component.",
1252
- type: "object",
1253
- properties: {
1254
- contents: {
1255
- type: "object",
1256
- properties: {
1257
- "f-form-layout": {
1258
- description: "The class of reponse form",
1259
- type: "object",
1260
- properties: {
1261
- rules: {
1262
- type: "object",
1263
- properties: {
1264
- canAccept: {
1265
- type: "boolean",
1266
- const: !0
1267
- },
1268
- fixed: {
1269
- type: "boolean",
1270
- const: !0
1271
- },
1272
- hidePadding: {
1273
- type: "boolean",
1274
- const: !1
1275
- }
1276
- }
1277
- }
1278
- }
1279
- }
1280
- }
1281
- },
1282
- rules: {
1283
- type: "object",
1284
- properties: {
1285
- canAccept: {
1286
- type: "boolean",
1287
- const: !1
1288
- },
1289
- fixed: {
1290
- type: "boolean",
1291
- const: !0
1292
- },
1293
- hidePadding: {
1294
- type: "boolean",
1295
- const: !0
1296
- }
1297
- }
1298
- }
1299
- }
1300
- }
1301
- }
1302
- },
1303
- rules: {
1304
- type: "object",
1305
- properties: {
1306
- canAccept: {
1307
- type: "boolean",
1308
- const: !1
1309
- },
1310
- fixed: {
1311
- type: "boolean",
1312
- const: !1
1313
- },
1314
- hidePadding: {
1315
- type: "boolean",
1316
- const: !0
1317
- }
1318
- }
1319
- }
1320
- }
1321
- },
1322
- "f-struct-wrapper": {
1323
- description: "",
1324
- type: "object",
1325
- properties: {
1326
- contents: {
1327
- type: "object",
1328
- properties: {
1329
- "f-section-tabs": {
1330
- description: "The class of section which has wrapped sub-grid tabs.",
1331
- type: "object",
1332
- properties: {
1333
- contents: {
1334
- type: "object",
1335
- properties: {
1336
- "f-tabs-in-card": {
1337
- description: "The class of tabs which contains sub-grid.",
1338
- type: "object",
1339
- properties: {
1340
- contents: {
1341
- type: "object",
1342
- properties: {
1343
- "f-struct-data-grid-in-card": {
1344
- description: "The class of sub-grid component",
1345
- type: "object",
1346
- properties: {
1347
- contents: {
1348
- type: "object",
1349
- properties: {
1350
- "f-grid-is-sub": {
1351
- description: "The class of sub-grid",
1352
- type: "object",
1353
- properties: {
1354
- rules: {
1355
- type: "object",
1356
- properties: {
1357
- canAccept: {
1358
- type: "boolean",
1359
- const: !0
1360
- },
1361
- fixed: {
1362
- type: "boolean",
1363
- const: !0
1364
- },
1365
- hidePadding: {
1366
- type: "boolean",
1367
- const: !1
1368
- }
1369
- }
1370
- }
1371
- }
1372
- }
1373
- }
1374
- },
1375
- rules: {
1376
- type: "object",
1377
- properties: {
1378
- canAccept: {
1379
- type: "boolean",
1380
- const: !1
1381
- },
1382
- fixed: {
1383
- type: "boolean",
1384
- const: !1
1385
- },
1386
- hidePadding: {
1387
- type: "boolean",
1388
- const: !0
1389
- }
1390
- }
1391
- }
1392
- }
1393
- }
1394
- }
1395
- },
1396
- rules: {
1397
- type: "object",
1398
- properties: {
1399
- canAccept: {
1400
- type: "boolean",
1401
- const: !1
1402
- },
1403
- fixed: {
1404
- type: "boolean",
1405
- const: !0
1406
- },
1407
- hidePadding: {
1408
- type: "boolean",
1409
- const: !0
1410
- }
1411
- }
1412
- }
1413
- }
1414
- }
1415
- }
1416
- },
1417
- rules: {
1418
- type: "object",
1419
- properties: {
1420
- canAccept: {
1421
- type: "boolean",
1422
- const: !1
1423
- },
1424
- fixed: {
1425
- type: "boolean",
1426
- const: !0
1427
- },
1428
- hidePadding: {
1429
- type: "boolean",
1430
- const: !0
1431
- }
1432
- }
1433
- }
1434
- }
1435
- },
1436
- "f-section-in-main": {
1437
- description: "The class of section which has wrapped a reponse-form component.",
1438
- type: "object",
1439
- properties: {
1440
- rules: {
1441
- type: "object",
1442
- properties: {
1443
- canAccept: {
1444
- type: "boolean",
1445
- const: !0
1446
- },
1447
- fixed: {
1448
- type: "boolean",
1449
- const: !0
1450
- },
1451
- hidePadding: {
1452
- type: "boolean",
1453
- const: !1
1454
- }
1455
- }
1456
- }
1457
- }
1458
- }
1459
- }
1460
- },
1461
- rules: {
1462
- type: "object",
1463
- properties: {
1464
- canAccept: {
1465
- type: "boolean",
1466
- const: !1
1467
- },
1468
- fixed: {
1469
- type: "boolean",
1470
- const: !1
1471
- },
1472
- hidePadding: {
1473
- type: "boolean",
1474
- const: !0
1475
- }
1476
- }
1477
- }
1478
- }
1479
- }
1480
- }
1481
- },
1482
- rules: {
1483
- type: "object",
1484
- properties: {
1485
- canAccept: {
1486
- type: "boolean",
1487
- const: !0
1488
- },
1489
- fixed: {
1490
- type: "boolean",
1491
- const: !0
1492
- },
1493
- hidePadding: {
1494
- type: "object",
1495
- const: {
1496
- allOf: [
1497
- {
1498
- sibling: 0,
1499
- parent: {
1500
- "f-page-main": !0
1501
- }
1502
- }
1503
- ]
1504
- }
1505
- }
1506
- }
1507
- }
1508
- }
1509
- },
1510
- "f-struct-data-grid": {
1511
- description: "",
1512
- type: "object",
1513
- properties: {
1514
- rules: {
1515
- type: "object",
1516
- properties: {
1517
- canAccept: {
1518
- type: "object",
1519
- const: !0
1520
- },
1521
- fixed: {
1522
- type: "boolean",
1523
- const: !0
1524
- },
1525
- hidePadding: {
1526
- type: "boolean",
1527
- const: !0
1528
- }
1529
- }
1530
- }
1531
- }
1532
- },
1533
- "f-page-main-content": {
1534
- description: "",
1535
- type: "object",
1536
- properties: {
1537
- contents: {
1538
- type: "object",
1539
- properties: {
1540
- "f-page-content-nav": {
1541
- description: "",
1542
- type: "object",
1543
- properties: {
1544
- contents: {
1545
- type: "object",
1546
- properties: {
1547
- "f-struct-data-grid-in-nav": {
1548
- description: "",
1549
- type: "object",
1550
- properties: {
1551
- contents: {
1552
- type: "object",
1553
- properties: {
1554
- "f-page-content-nav-extend": {
1555
- description: "",
1556
- type: "object"
1557
- },
1558
- "f-section-in-nav": {
1559
- description: "",
1560
- type: "object",
1561
- properties: {
1562
- rules: {
1563
- type: "object",
1564
- properties: {
1565
- canAccept: {
1566
- type: "boolean",
1567
- const: !1
1568
- },
1569
- fixed: {
1570
- type: "boolean",
1571
- const: !0
1572
- },
1573
- hidePadding: {
1574
- type: "boolean",
1575
- const: !1
1576
- }
1577
- }
1578
- }
1579
- }
1580
- }
1581
- }
1582
- },
1583
- rules: {
1584
- type: "object",
1585
- properties: {
1586
- canAccept: {
1587
- type: "boolean",
1588
- const: !0
1589
- },
1590
- fixed: {
1591
- type: "boolean",
1592
- const: !1
1593
- },
1594
- hidePadding: {
1595
- type: "boolean",
1596
- const: !0
1597
- }
1598
- }
1599
- }
1600
- }
1601
- }
1602
- }
1603
- }
1604
- }
1605
- },
1606
- "f-page-content-main": {
1607
- description: "",
1608
- type: "object",
1609
- properties: {}
1610
- }
1611
- }
1612
- }
1613
- }
1614
- },
1615
- "f-page-content": {
1616
- description: "",
1617
- type: "object",
1618
- properties: {
1619
- contents: {
1620
- type: "object",
1621
- properties: {
1622
- "f-page-content-nav": {
1623
- description: "",
1624
- type: "object",
1625
- properties: {
1626
- contents: {
1627
- type: "object",
1628
- properties: {
1629
- "f-list-nav": {
1630
- description: "",
1631
- type: "object"
1632
- },
1633
- "f-list-nav-left": {
1634
- description: "",
1635
- type: "object"
1636
- },
1637
- "f-struct-data-grid-in-nav": {
1638
- description: "",
1639
- type: "object",
1640
- properties: {
1641
- contents: {
1642
- type: "object",
1643
- properties: {
1644
- "f-section-form": {
1645
- description: "",
1646
- type: "object",
1647
- properties: {
1648
- rules: {
1649
- type: "object",
1650
- properties: {
1651
- canAccept: {
1652
- type: "boolean",
1653
- const: !1
1654
- },
1655
- fixed: {
1656
- type: "boolean",
1657
- const: !0
1658
- },
1659
- hidePadding: {
1660
- type: "boolean",
1661
- const: !0
1662
- }
1663
- }
1664
- }
1665
- }
1666
- },
1667
- "f-section-grid": {
1668
- description: "",
1669
- type: "object",
1670
- properties: {
1671
- rules: {
1672
- type: "object",
1673
- properties: {
1674
- canAccept: {
1675
- type: "boolean",
1676
- const: !1
1677
- },
1678
- fixed: {
1679
- type: "boolean",
1680
- const: !0
1681
- },
1682
- hidePadding: {
1683
- type: "boolean",
1684
- const: !0
1685
- }
1686
- }
1687
- }
1688
- }
1689
- }
1690
- }
1691
- },
1692
- rules: {
1693
- type: "object",
1694
- properties: {
1695
- canAccept: {
1696
- type: "boolean",
1697
- const: !1
1698
- },
1699
- fixed: {
1700
- type: "boolean",
1701
- const: !0
1702
- },
1703
- hidePadding: {
1704
- type: "boolean",
1705
- const: !0
1706
- }
1707
- }
1708
- }
1709
- }
1710
- }
1711
- }
1712
- }
1713
- },
1714
- rules: {
1715
- type: "object",
1716
- properties: {
1717
- canAccept: {
1718
- type: "boolean",
1719
- const: !1
1720
- },
1721
- fixed: {
1722
- type: "boolean",
1723
- const: !0
1724
- },
1725
- hidePadding: {
1726
- type: "boolean",
1727
- const: !0
1728
- }
1729
- }
1730
- }
1731
- },
1732
- "f-page-content-main": {
1733
- description: "",
1734
- type: "object",
1735
- properties: {
1736
- rules: {
1737
- type: "object",
1738
- properties: {
1739
- canAccept: {
1740
- type: "boolean",
1741
- const: !1
1742
- },
1743
- fixed: {
1744
- type: "boolean",
1745
- const: !1
1746
- },
1747
- hidePadding: {
1748
- type: "boolean",
1749
- const: !0
1750
- }
1751
- }
1752
- }
1753
- }
1754
- }
1755
- }
1756
- },
1757
- rules: {
1758
- type: "object",
1759
- properties: {
1760
- canAccept: {
1761
- type: "boolean",
1762
- const: !1
1763
- },
1764
- fixed: {
1765
- type: "boolean",
1766
- const: !0
1767
- },
1768
- hidePadding: {
1769
- type: "boolean",
1770
- const: !0
1771
- }
1772
- }
1773
- }
1774
- }
1775
- }
1776
- }
1777
- },
1778
- rules: {
1779
- type: "object",
1780
- properties: {
1781
- canAccept: {
1782
- type: "object",
1783
- const: {
1784
- anyOf: [
1785
- {
1786
- children: 0
1787
- },
1788
- {
1789
- children: {
1790
- length: {
1791
- not: 1
1792
- },
1793
- "f-struct-like-card": !0
1794
- }
1795
- },
1796
- {
1797
- children: {
1798
- "scroll-spy": !1,
1799
- "f-page-content": !1,
1800
- "f-struct-like-card": !1
1801
- }
1802
- }
1803
- ]
1804
- }
1805
- },
1806
- fixed: {
1807
- type: "boolean",
1808
- const: !0
1809
- },
1810
- hidePadding: {
1811
- type: "boolean",
1812
- const: !0
1813
- }
1814
- }
1815
- }
1816
- }
1817
- },
1818
- "f-page-footer": {
1819
- description: "The class of page footer designed by farris.",
1820
- type: "string"
1821
- }
1822
- }
1823
- },
1824
- rules: {
1825
- type: "object",
1826
- properties: {
1827
- canAccept: {
1828
- type: "boolean",
1829
- const: !1
1830
- },
1831
- fixed: {
1832
- type: "boolean",
1833
- const: !0
1834
- },
1835
- hidePadding: {
1836
- type: "boolean",
1837
- const: !0
1838
- }
1839
- }
1840
- }
1841
- }
1842
- },
1843
- "f-page-is-managelist": {
1844
- description: "The root class of mangement list page.",
1845
- type: "string"
1846
- },
1847
- "f-page-card": {
1848
- description: "",
1849
- type: "object"
1850
- },
1851
- "f-page-is-mainsubcard": {
1852
- description: "",
1853
- type: "object"
1854
- }
1855
- }, jt = {
1856
- $schema: yt,
1857
- $id: vt,
1858
- title: Ct,
1859
- description: wt,
1860
- type: xt,
1861
- properties: Tt
1862
- }, K = /* @__PURE__ */ new Map();
1863
- function Pe() {
1864
- function s(a, y, v, T) {
1865
- var O;
1866
- if (typeof v == "number")
1867
- return ((O = T[a]) == null ? void 0 : O.length) === v;
1868
- if (typeof v == "object") {
1869
- const E = Object.keys(v)[0], k = v[E];
1870
- if (E === "not")
1871
- return Number(T[a].length) !== Number(k);
1872
- if (E === "moreThan")
1873
- return Number(T[a].length) >= Number(k);
1874
- if (E === "lessThan")
1875
- return Number(T[a].length) <= Number(k);
1876
- }
1877
- return !1;
1878
- }
1879
- function e(a, y, v, T) {
1880
- return typeof v == "boolean" ? T.childrenClassList.includes(y) === !!v : !1;
1881
- }
1882
- function o(a, y, v, T) {
1883
- return typeof v == "boolean" ? T.parentClassList.includes(y) === !!v : !1;
1884
- }
1885
- function c(a, y, v, T) {
1886
- return typeof v == "boolean" ? T.parentClassList.includes(y) === !!v : !1;
1887
- }
1888
- const d = /* @__PURE__ */ new Map([
1889
- ["length", s],
1890
- ["hasChildren", e],
1891
- ["hasSibling", c],
1892
- ["hasParent", o]
1893
- ]);
1894
- function b(a, y) {
1895
- const v = a;
1896
- return typeof y == "number" ? [{ target: v, operator: "length", param: null, value: Number(y) }] : typeof y == "object" ? Object.keys(y).map((T) => {
1897
- if (T === "length")
1898
- return { target: v, operator: "length", param: null, value: y[T] };
1899
- const O = T, E = y[T];
1900
- return { target: v, operator: a === "children" ? "hasChildren" : a === "parent" ? "hasParent" : "hasSibling", param: O, value: E };
1901
- }) : [];
1902
- }
1903
- function m(a, y) {
1904
- if (d.has(a.operator)) {
1905
- const v = d.get(a.operator);
1906
- return v && v(a.target, a.param, a.value, y) || !1;
1907
- }
1908
- return !1;
1909
- }
1910
- function D(a, y) {
1911
- return Object.keys(a).reduce((E, k) => {
1912
- const N = b(k, a[k]);
1913
- return E.push(...N), E;
1914
- }, []).reduce((E, k) => E && m(k, y), !0);
1915
- }
1916
- function P(a, y) {
1917
- const v = Object.keys(a), T = v.includes("allOf"), O = v.includes("anyOf"), E = T || O, j = (E ? a[E ? T ? "allOf" : "anyOf" : "allOf"] : [a]).map((I) => D(I, y));
1918
- return T ? !j.includes(!1) : j.includes(!0);
1919
- }
1920
- function g(a, y) {
1921
- const v = a.const;
1922
- return v ? typeof v == "boolean" ? v : typeof v == "object" ? P(v, y) : !1 : !1;
1923
- }
1924
- function C(a) {
1925
- return (y) => {
1926
- const v = { canAccept: !0, fixed: !1, hidePadding: !1 };
1927
- return a && a.properties && Object.keys(a.properties).reduce((T, O) => {
1928
- const E = a.properties[O];
1929
- return T[O] = g(E, y), T;
1930
- }, v), v;
1931
- };
1932
- }
1933
- function p(a, y, v) {
1934
- if (y.type === "object" && y.properties) {
1935
- const { rules: T, contents: O } = y.properties;
1936
- v.set(a, C(T)), O && Object.keys(O.properties).forEach(
1937
- (E) => p(E, O.properties[E], v)
1938
- );
1939
- }
1940
- }
1941
- function i() {
1942
- const { properties: a } = jt;
1943
- Object.keys(a).forEach((y) => {
1944
- p(y, a[y], K);
1945
- });
1946
- }
1947
- function f(a, y) {
1948
- const v = { canAccept: !0, fixed: !1, hidePadding: !0 };
1949
- return K.has(a) ? K.get(a)(y) : v;
1950
- }
1951
- return i(), { getRuleValue: f };
1952
- }
1953
- class ae {
1954
- constructor(e, o) {
1955
- B(this, "componentId");
1956
- B(this, "viewModelId");
1957
- B(this, "eventsEditorUtils");
1958
- B(this, "formSchemaUtils");
1959
- B(this, "formMetadataConverter");
1960
- B(this, "designViewModelUtils");
1961
- B(this, "designViewModelField");
1962
- B(this, "controlCreatorUtils");
1963
- B(this, "designerHostService");
1964
- B(this, "schemaService", null);
1965
- B(this, "metadataService", null);
1966
- B(this, "propertyConfig", {
1160
+ class se {
1161
+ constructor(e, n) {
1162
+ D(this, "componentId");
1163
+ D(this, "viewModelId");
1164
+ D(this, "eventsEditorUtils");
1165
+ D(this, "formSchemaUtils");
1166
+ D(this, "formMetadataConverter");
1167
+ D(this, "designViewModelUtils");
1168
+ D(this, "designViewModelField");
1169
+ D(this, "controlCreatorUtils");
1170
+ D(this, "designerHostService");
1171
+ D(this, "schemaService", null);
1172
+ D(this, "metadataService", null);
1173
+ D(this, "propertyConfig", {
1967
1174
  type: "object",
1968
1175
  categories: {}
1969
1176
  });
1970
- var c;
1971
- this.componentId = e, this.designerHostService = o, this.eventsEditorUtils = o.eventsEditorUtils, this.formSchemaUtils = o.formSchemaUtils, this.formMetadataConverter = o.formMetadataConverter, this.viewModelId = ((c = this.formSchemaUtils) == null ? void 0 : c.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = o.designViewModelUtils, this.controlCreatorUtils = o.controlCreatorUtils, this.metadataService = o.metadataService, this.schemaService = o.schemaService;
1177
+ var i;
1178
+ this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
1972
1179
  }
1973
1180
  getTableInfo() {
1974
1181
  var e;
1975
1182
  return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
1976
1183
  }
1977
1184
  setDesignViewModelField(e) {
1978
- const o = e.binding && e.binding.type === "Form" && e.binding.field;
1979
- if (o) {
1185
+ var i;
1186
+ const n = e.binding && e.binding.type === "Form" && e.binding.field;
1187
+ if (n) {
1980
1188
  if (!this.designViewModelField) {
1981
- const c = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1982
- this.designViewModelField = c.fields.find((d) => d.id === o);
1189
+ const d = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1190
+ this.designViewModelField = d.fields.find((m) => m.id === n);
1983
1191
  }
1984
- e.updateOn = this.designViewModelField.updateOn;
1192
+ e.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
1985
1193
  }
1986
1194
  }
1987
- changeFieldEditorType(e, o) {
1195
+ changeFieldEditorType(e, n) {
1988
1196
  }
1989
1197
  getBasicPropConfig(e) {
1990
1198
  return {
@@ -2005,7 +1213,7 @@ class ae {
2005
1213
  type: "combo-list",
2006
1214
  textField: "name",
2007
1215
  valueField: "value",
2008
- data: [{ value: e.type, name: re[e.type].name }]
1216
+ data: [{ value: e.type, name: te[e.type].name }]
2009
1217
  }
2010
1218
  }
2011
1219
  }
@@ -2037,20 +1245,34 @@ class ae {
2037
1245
  * @param componentInstance
2038
1246
  * @returns
2039
1247
  */
2040
- updateElementByParentContainer(e, o) {
2041
- const c = o && o.parent && o.parent.schema;
2042
- if (!c)
1248
+ updateElementByParentContainer(e, n) {
1249
+ const i = n && n.parent && n.parent.schema;
1250
+ if (!i)
2043
1251
  return;
2044
- const d = c.contents.findIndex((m) => m.id === e), b = me(c.contents[d]);
2045
- c.contents.splice(d, 1), c.contents.splice(d, 0, b);
1252
+ const d = i.contents.findIndex((p) => p.id === e), m = pe(i.contents[d]);
1253
+ i.contents.splice(d, 1), i.contents.splice(d, 0, m);
2046
1254
  }
2047
1255
  }
2048
- class Pt extends ae {
2049
- constructor(e, o) {
2050
- super(e, o);
1256
+ class dt extends se {
1257
+ constructor(e, n) {
1258
+ super(e, n);
2051
1259
  }
2052
1260
  getPropertyConfig(e) {
2053
- return this.getBasicPropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
1261
+ return this.getBasicPropConfig(e), this.getAppearancePropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
1262
+ }
1263
+ getAppearancePropConfig(e) {
1264
+ this.propertyConfig.categories.appearance = {
1265
+ title: "样式",
1266
+ description: "Appearance",
1267
+ properties: {
1268
+ class: {
1269
+ title: "class样式",
1270
+ type: "string",
1271
+ description: "组件的CSS样式",
1272
+ $converter: "/converter/appearance.converter"
1273
+ }
1274
+ }
1275
+ };
2054
1276
  }
2055
1277
  getBasicPropConfig(e) {
2056
1278
  this.propertyConfig.categories.basic = {
@@ -2071,7 +1293,7 @@ class Pt extends ae {
2071
1293
  type: "combo-list",
2072
1294
  textField: "value",
2073
1295
  valueField: "key",
2074
- data: [{ key: "response-toolbar", value: re["response-toolbar"].name }]
1296
+ data: [{ key: "response-toolbar", value: te["response-toolbar"].name }]
2075
1297
  }
2076
1298
  }
2077
1299
  }
@@ -2102,7 +1324,7 @@ class Pt extends ae {
2102
1324
  ]
2103
1325
  }
2104
1326
  },
2105
- buttons: {
1327
+ items: {
2106
1328
  title: "按钮",
2107
1329
  description: "The items of Response Toolbar.",
2108
1330
  type: "array",
@@ -2114,85 +1336,40 @@ class Pt extends ae {
2114
1336
  };
2115
1337
  }
2116
1338
  }
2117
- function Dt(s, e, o, c) {
2118
- const d = Pe(), b = S(!1), m = S(!1);
2119
- let D = !0, P = !1, g;
2120
- function C(j) {
2121
- return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ? j.sourceType === "control" && j.controlCategory === "input" || j.sourceType === "move" && j.controlType === "form-group" : !0;
2122
- }
2123
- function p(j) {
2124
- return !bt().basalDragulaRuleForContainer(j) || !D || !C(j), !1;
2125
- }
2126
- function i() {
2127
- b.value = !1, m.value = !1;
2128
- const j = s, h = j.appearance && j.appearance.class || "", I = h.split(" "), A = j.buttons || [], l = A.length ? A[0] : null, n = l && l.appearance ? l.appearance.class : "", t = n ? n.split(" ") : [], r = A.length ? A.reduce(($, V) => {
2129
- const U = V && V.appearance ? V.appearance.class : "", Y = U ? U.split(" ") : [];
2130
- return $.push(...Y), $;
2131
- }, []) : [], u = o == null ? void 0 : o.schema, R = u && u.appearance && u.appearance.class || "", x = R ? R.split(" ") : [];
2132
- g = {
2133
- componentClass: h,
2134
- componentClassList: I,
2135
- childContents: A,
2136
- firstChildContent: l,
2137
- firstChildClass: n,
2138
- firstChildClassList: t,
2139
- parent: u,
2140
- parentClass: R,
2141
- parentClassList: x,
2142
- children: A,
2143
- childrenClassList: r
2144
- };
2145
- const { canAccept: M, fixed: F, hidePadding: _ } = d.getRuleValue(I[0], g);
2146
- return D = M, P = _, !0;
2147
- }
2148
- function f(j) {
2149
- }
2150
- function a() {
2151
- return s.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
2152
- }
2153
- function y(j, h) {
2154
- return h.text = j.label, h;
1339
+ function ut(s, e) {
1340
+ const n = s.schema;
1341
+ function i(g) {
1342
+ return !1;
2155
1343
  }
2156
- function v(j, h, I) {
2157
- const A = s;
2158
- if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
2159
- const t = String(j.innerText), r = q("form-group");
2160
- return r.editor = I, r.label = t, r;
2161
- }
2162
- return I;
1344
+ function d(g, l) {
1345
+ return l.text = g.label, l;
2163
1346
  }
2164
- function T() {
1347
+ function m() {
2165
1348
  return !1;
2166
1349
  }
2167
- function O() {
1350
+ function p() {
2168
1351
  return !1;
2169
1352
  }
2170
- function E() {
1353
+ function T() {
2171
1354
  return !0;
2172
1355
  }
2173
- function k() {
2174
- return P;
1356
+ function x() {
1357
+ return !0;
2175
1358
  }
2176
- function N(j) {
2177
- return new Pt(j, e).getPropertyConfig(s);
1359
+ function f(g) {
1360
+ return new dt(g, e).getPropertyConfig(n);
2178
1361
  }
2179
1362
  return {
2180
- canAccepts: p,
2181
- checkCanAddComponent: E,
2182
- checkCanDeleteComponent: O,
2183
- checkCanMoveComponent: T,
2184
- getStyles: a,
2185
- hideNestedPaddingInDesginerView: k,
2186
- onAcceptNewChildElement: v,
2187
- onAcceptMovedChildElement: f,
2188
- onResolveNewComponentSchema: y,
2189
- resolveComponentContext: i,
2190
- getPropsConfig: N,
2191
- triggerBelongedComponentToMoveWhenMoved: b,
2192
- triggerBelongedComponentToDeleteWhenDeleted: m
1363
+ canAccepts: i,
1364
+ checkCanAddComponent: T,
1365
+ checkCanDeleteComponent: p,
1366
+ checkCanMoveComponent: m,
1367
+ hideNestedPaddingInDesginerView: x,
1368
+ onResolveNewComponentSchema: d,
1369
+ getPropsConfig: f
2193
1370
  };
2194
1371
  }
2195
- const It = {
1372
+ const pt = {
2196
1373
  id: { type: String, default: "" },
2197
1374
  componentId: { type: String, default: "" },
2198
1375
  canAdd: { type: Boolean, default: !1 },
@@ -2205,256 +1382,247 @@ const It = {
2205
1382
  * 组件值
2206
1383
  */
2207
1384
  modelValue: { type: Object }
2208
- }, ee = S(0);
2209
- function Et(s, e) {
2210
- const o = e.getBoundingClientRect(), c = s.getBoundingClientRect(), d = c.top >= o.top, b = c.top <= o.bottom;
2211
- return d && b;
1385
+ }, le = M(0);
1386
+ function ft(s, e) {
1387
+ const n = e.getBoundingClientRect(), i = s.getBoundingClientRect(), d = i.top >= n.top, m = i.top <= n.bottom;
1388
+ return d && m;
2212
1389
  }
2213
- function Rt(s) {
1390
+ function gt(s) {
2214
1391
  if (!s)
2215
1392
  return;
2216
1393
  let e;
2217
1394
  if (s.className.includes("dgComponentSelected") ? e = s : e = s.querySelector(".dgComponentSelected"), !e)
2218
1395
  return;
2219
- const o = e.getBoundingClientRect();
2220
- if (o.width === 0 && o.height === 0)
1396
+ const n = e.getBoundingClientRect();
1397
+ if (n.width === 0 && n.height === 0)
2221
1398
  return;
2222
- const c = e.querySelector(".component-btn-group");
2223
- if (c) {
2224
- if (!Et(e, s)) {
2225
- c.style.display = "none";
1399
+ const i = e.querySelector(".component-btn-group");
1400
+ if (i) {
1401
+ if (!ft(e, s)) {
1402
+ i.style.display = "none";
2226
1403
  return;
2227
1404
  }
2228
- c.style.display = "";
2229
- const b = c.getBoundingClientRect(), m = c.querySelector("div");
2230
- if (m) {
2231
- const D = m.getBoundingClientRect();
2232
- m.style.top = b.top + "px", m.style.left = b.left - D.width + "px";
1405
+ i.style.display = "";
1406
+ const m = i.getBoundingClientRect(), p = i.querySelector("div");
1407
+ if (p) {
1408
+ const T = p.getBoundingClientRect();
1409
+ p.style.top = m.top + "px", p.style.left = m.left - T.width + "px";
2233
1410
  }
2234
1411
  }
2235
1412
  }
2236
- function St(s, e, o) {
2237
- var N;
2238
- function c() {
2239
- }
2240
- const d = "", b = S();
1413
+ function mt(s, e, n) {
1414
+ var A;
1415
+ const i = "", d = M();
2241
1416
  function m() {
2242
1417
  return !0;
2243
1418
  }
2244
- function D() {
1419
+ function p() {
2245
1420
  return !1;
2246
1421
  }
2247
- function P() {
1422
+ function T() {
2248
1423
  return !0;
2249
1424
  }
2250
- function g() {
1425
+ function x() {
2251
1426
  return !0;
2252
1427
  }
2253
- function C() {
1428
+ function f() {
2254
1429
  return !0;
2255
1430
  }
2256
- function p(j) {
2257
- if (!j || !j.value)
1431
+ function g(k) {
1432
+ if (!k || !k.value)
2258
1433
  return null;
2259
- const h = S(j == null ? void 0 : j.value.parent), I = p(h);
2260
- return I || null;
1434
+ const R = M(k == null ? void 0 : k.value.parent), v = g(R);
1435
+ return v || null;
2261
1436
  }
2262
- function i(j = e) {
2263
- const { componentInstance: h, designerItemElementRef: I } = j;
2264
- return !h || !h.value ? null : h.value.canMove || h.value.canAdd || h.value.canDelete ? I : i(j.parent);
1437
+ function l(k = e) {
1438
+ const { componentInstance: R, designerItemElementRef: v } = k;
1439
+ return !R || !R.value ? null : R.value.canMove || R.value.canAdd || R.value.canDelete ? v : l(k.parent);
2265
1440
  }
2266
- function f(j) {
2267
- return !!o;
1441
+ function c(k) {
1442
+ return !!n;
2268
1443
  }
2269
- function a() {
1444
+ function u() {
2270
1445
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
2271
1446
  }
2272
- function y() {
2273
- }
2274
- function v(j, h) {
1447
+ function b() {
2275
1448
  }
2276
- function T(j) {
2277
- const { componentType: h } = j;
2278
- let I = q(h, j);
2279
- const A = h.toLowerCase().replace("-", "_");
2280
- return I && !I.id && I.type === h && (I.id = `${A}_${Math.random().toString().slice(2, 6)}`), I;
1449
+ function I(k, R) {
2281
1450
  }
2282
- function O(j, h) {
2283
- const I = String(j.getAttribute("data-controltype")), A = j.getAttribute("data-feature"), l = A ? JSON.parse(A) : {};
2284
- l.parentComponentInstance = b.value;
2285
- let n = q(I, l);
2286
- const t = I.toLowerCase().replace("-", "_");
2287
- return n && !n.id && n.type === I && (n.id = `${t}_${Math.random().toString().slice(2, 6)}`), n;
1451
+ function B(k) {
1452
+ const { componentType: R } = k, v = L("designer-host-service");
1453
+ let E = Z(R, k, v);
1454
+ const P = R.toLowerCase().replace(/-/g, "_");
1455
+ return E && !E.id && E.type === R && (E.id = `${P}_${Math.random().toString().slice(2, 6)}`), E;
2288
1456
  }
2289
- function E(j) {
1457
+ function O(k) {
2290
1458
  }
2291
- function k(...j) {
1459
+ function F(...k) {
2292
1460
  return [];
2293
1461
  }
2294
- return b.value = {
1462
+ function j() {
1463
+ }
1464
+ return d.value = {
2295
1465
  canMove: m(),
2296
- canSelectParent: D(),
2297
- canAdd: g(),
2298
- canDelete: P(),
2299
- canNested: !C(),
1466
+ canSelectParent: p(),
1467
+ canAdd: x(),
1468
+ canDelete: T(),
1469
+ canNested: !f(),
2300
1470
  contents: [],
2301
1471
  elementRef: s,
2302
- parent: (N = e.parent) == null ? void 0 : N.componentInstance,
1472
+ parent: (A = e.parent) == null ? void 0 : A.componentInstance,
2303
1473
  schema: e.schema,
2304
- styles: d,
2305
- canAccepts: f,
2306
- getBelongedComponentInstance: p,
2307
- getDraggableDesignItemElement: i,
2308
- getDraggingDisplayText: a,
2309
- getPropConfig: k,
2310
- getDragScopeElement: y,
2311
- onAcceptMovedChildElement: v,
2312
- onAcceptNewChildElement: O,
2313
- onChildElementMovedOut: E,
2314
- addNewChildComponentSchema: T,
2315
- updateDragAndDropRules: c,
2316
- triggerBelongedComponentToMoveWhenMoved: S(!1),
2317
- triggerBelongedComponentToDeleteWhenDeleted: S(!1)
2318
- }, b;
1474
+ styles: i,
1475
+ canAccepts: c,
1476
+ getBelongedComponentInstance: g,
1477
+ getDraggableDesignItemElement: l,
1478
+ getDraggingDisplayText: u,
1479
+ getPropConfig: F,
1480
+ getDragScopeElement: b,
1481
+ onAcceptMovedChildElement: I,
1482
+ onChildElementMovedOut: O,
1483
+ addNewChildComponentSchema: B,
1484
+ onRemoveComponent: j,
1485
+ triggerBelongedComponentToMoveWhenMoved: M(!1),
1486
+ triggerBelongedComponentToDeleteWhenDeleted: M(!1)
1487
+ }, d;
2319
1488
  }
2320
- const Mt = /* @__PURE__ */ X({
1489
+ const ht = /* @__PURE__ */ Y({
2321
1490
  name: "FDesignerInnerItem",
2322
- props: It,
1491
+ props: pt,
2323
1492
  emits: ["selectionChange", "addComponent", "removeComponent"],
2324
1493
  setup(s, e) {
2325
- const o = S(s.canMove), c = S(s.canAdd), d = S(s.canDelete), b = S(!1), m = S(s.contentKey), D = S(s.childType), P = S(s.childLabel), g = S(s.modelValue), C = S(""), p = S(), i = L("canvas-dragula"), f = S(), a = L("design-item-context"), y = {
2326
- designerItemElementRef: p,
2327
- componentInstance: f,
2328
- schema: g.value,
2329
- parent: a,
1494
+ const n = M(s.canMove), i = M(s.canAdd), d = M(s.canDelete), m = M(!1), p = M(s.contentKey), T = M(s.childType), x = M(s.childLabel), f = M(s.modelValue), g = M(""), l = M(), c = L("canvas-dragula"), u = M(), b = L("design-item-context"), I = {
1495
+ designerItemElementRef: l,
1496
+ componentInstance: u,
1497
+ schema: f.value,
1498
+ parent: b,
2330
1499
  setupContext: e
2331
1500
  };
2332
- Me("design-item-context", y);
2333
- const v = W(() => ({
1501
+ De("design-item-context", I);
1502
+ const B = V(() => ({
2334
1503
  "farris-component": !0,
2335
1504
  // 受position-relative影响,整个容器的高度不能被撑起
2336
- "flex-fill": s.id == "root-component",
2337
- "position-relative": o.value || d.value,
2338
- "farris-nested": b.value,
2339
- "can-move": o.value,
2340
- "d-none": p.value && p.value.classList.contains("d-none")
2341
- })), T = W(() => {
1505
+ "flex-fill": s.id === "root-component",
1506
+ "position-relative": n.value || d.value,
1507
+ "farris-nested": m.value,
1508
+ "can-move": n.value,
1509
+ "d-none": l.value && l.value.classList.contains("d-none")
1510
+ })), O = V(() => {
2342
1511
  const t = {};
2343
- return C.value && C.value.split(";").reduce((r, u) => {
2344
- const [R, x] = u.split(":");
2345
- return R && (r[R] = x), r;
1512
+ return g.value && g.value.split(";").reduce((r, a) => {
1513
+ const [w, C] = a.split(":");
1514
+ return w && (r[w] = C), r;
2346
1515
  }, t), t;
2347
1516
  });
2348
- function O(t, r) {
2349
- if (a && a.schema[m.value]) {
2350
- const u = a.schema[m.value].findIndex((R) => R.id === r.id);
2351
- if (u > -1) {
2352
- const R = a.schema[m.value].length, x = a.schema[m.value][u % R];
2353
- a.designerItemElementRef.value.querySelector(`#${x.id}-design-item`), a.schema[m.value].splice(u, 1), a.componentInstance.value.updateDragAndDropRules(), ee.value++, e.emit("removeComponent");
1517
+ function F(t, r) {
1518
+ if (b && b.schema[p.value]) {
1519
+ const a = b.schema[p.value].findIndex((w) => w.id === r.id);
1520
+ if (a > -1) {
1521
+ const w = b.schema[p.value].length, C = b.schema[p.value][a % w];
1522
+ b.designerItemElementRef.value.querySelector(`#${C.id}-design-item`), b.schema[p.value].splice(a, 1), le.value++, e.emit("removeComponent");
2354
1523
  }
2355
1524
  }
2356
1525
  }
2357
- function E(t) {
2358
- if (f.value.addNewChildComponentSchema) {
1526
+ function j(t) {
1527
+ if (u.value.addNewChildComponentSchema) {
2359
1528
  const r = {
2360
- componentType: D.value,
2361
- label: P.value,
2362
- parentComponentInstance: f.value,
1529
+ componentType: T.value,
1530
+ label: x.value,
1531
+ parentComponentInstance: u.value,
2363
1532
  targetPosition: -1
2364
- }, u = f.value.addNewChildComponentSchema(r);
2365
- g.value[m.value].push(u), e.emit("addComponent");
1533
+ }, a = u.value.addNewChildComponentSchema(r);
1534
+ f.value[p.value].push(a), e.emit("addComponent");
2366
1535
  }
2367
1536
  }
2368
- function k() {
2369
- return c.value && w("div", {
1537
+ function A() {
1538
+ return i.value && y("div", {
2370
1539
  role: "button",
2371
1540
  class: "btn component-settings-button",
2372
1541
  title: "新增",
2373
1542
  ref: "removeComponent",
2374
1543
  onClick: (t) => {
2375
- E();
1544
+ j();
2376
1545
  }
2377
- }, [w("i", {
1546
+ }, [y("i", {
2378
1547
  class: "f-icon f-icon-plus-circle"
2379
1548
  }, null)]);
2380
1549
  }
2381
- function N(t) {
2382
- return d.value && w("div", {
1550
+ function k(t) {
1551
+ return d.value && y("div", {
2383
1552
  role: "button",
2384
1553
  class: "btn component-settings-button",
2385
1554
  title: "删除",
2386
1555
  ref: "removeComponent",
2387
- onClick: Ae((r) => O(r, t), ["stop"])
2388
- }, [w("i", {
1556
+ onClick: Ee((r) => F(r, t), ["stop"])
1557
+ }, [y("i", {
2389
1558
  class: "f-icon f-icon-yxs_delete"
2390
1559
  }, null)]);
2391
1560
  }
2392
- function j() {
2393
- return o.value && w("div", {
1561
+ function R() {
1562
+ return n.value && y("div", {
2394
1563
  role: "button",
2395
1564
  class: "btn component-settings-button",
2396
1565
  title: "移动",
2397
1566
  ref: "moveComponent"
2398
- }, [w("i", {
1567
+ }, [y("i", {
2399
1568
  "data-dragging-icon": "true",
2400
1569
  class: "cmp_move f-icon f-icon-yxs_move"
2401
1570
  }, null)]);
2402
1571
  }
2403
- function h(t) {
2404
- return w("div", {
1572
+ function v(t) {
1573
+ return y("div", {
2405
1574
  class: "component-btn-group",
2406
1575
  "data-noattach": "true"
2407
- }, [w("div", null, [k(), j(), N(t)])]);
1576
+ }, [y("div", null, [A(), R(), k(t)])]);
2408
1577
  }
2409
- H(() => s.modelValue, (t) => {
2410
- g.value = t, y.schema = t;
1578
+ Q(() => s.modelValue, (t) => {
1579
+ f.value = t, I.schema = t;
2411
1580
  });
2412
- function I(t) {
1581
+ function E(t) {
2413
1582
  const r = t.target;
2414
- Rt(r);
1583
+ gt(r);
2415
1584
  }
2416
- function A() {
1585
+ function P() {
2417
1586
  var t, r;
2418
- (r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && p.value && p.value.addEventListener("scroll", I);
1587
+ (r = (t = f.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", E);
2419
1588
  }
2420
- function l() {
2421
- const t = p.value, r = S(t.children[1]);
2422
- return St(r, y).value;
1589
+ function h() {
1590
+ const t = l.value, r = M(t.children[1]);
1591
+ return mt(r, I).value;
2423
1592
  }
2424
- z(() => {
2425
- if (p.value) {
2426
- const t = p.value.querySelector(`[data-dragref='${g.value.id}-container']`);
2427
- f.value = t && t.componentInstance ? t.componentInstance.value : l(), i && t && i.attachComponents(t, g.value), b.value = f.value.canNested !== void 0 ? f.value.canNested : b.value, c.value = f.value.canAdd !== void 0 ? f.value.canAdd : c.value, d.value = f.value.canDelete !== void 0 ? f.value.canDelete : d.value, o.value = f.value.canMove !== void 0 ? f.value.canMove : o.value, C.value = f.value.styles || "", p.value && (p.value.componentInstance = f, p.value.designItemContext = y);
1593
+ H(() => {
1594
+ if (l.value) {
1595
+ const t = l.value.querySelector(`[data-dragref='${f.value.id}-container']`);
1596
+ u.value = t && t.componentInstance ? t.componentInstance.value : h(), c && t && c.attachComponents(t, f.value), m.value = u.value.canNested !== void 0 ? u.value.canNested : m.value, i.value = u.value.canAdd !== void 0 ? u.value.canAdd : i.value, d.value = u.value.canDelete !== void 0 ? u.value.canDelete : d.value, n.value = u.value.canMove !== void 0 ? u.value.canMove : n.value, g.value = u.value.styles || "", l.value && (l.value.componentInstance = u, l.value.designItemContext = I);
2428
1597
  }
2429
- A(), ee.value++;
2430
- }), ke(() => {
2431
- p.value && p.value.removeEventListener("scroll", I);
1598
+ P(), le.value++;
1599
+ }), Me(() => {
1600
+ l.value && l.value.removeEventListener("scroll", E);
2432
1601
  });
2433
- function n(t) {
2434
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((u) => u.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
2435
- const r = p.value;
2436
- if (r) {
2437
- const u = document.getElementsByClassName("dgComponentSelected");
2438
- if (!(u && u.length === 1 && u[0] === p.value)) {
2439
- Array.from(u).forEach((M) => M.classList.remove("dgComponentSelected")), r.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, s.componentId, f.value);
2440
- const x = f.value.getDraggableDesignItemElement(y);
2441
- x && x.value && x.value.classList.add("dgComponentSelected");
2442
- }
1602
+ function o(t) {
1603
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((w) => w.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
1604
+ let r = I.designerItemElementRef;
1605
+ const a = l.value;
1606
+ if (a) {
1607
+ const w = document.getElementsByClassName("dgComponentSelected");
1608
+ w && w.length === 1 && w[0] === l.value || (Array.from(w).forEach((S) => S.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", f.value.type, f.value, s.componentId, u.value), r = u.value.getDraggableDesignItemElement(I), r && r.value && r.value.classList.add("dgComponentSelected"));
2443
1609
  }
2444
- ee.value++;
1610
+ E({
1611
+ target: r == null ? void 0 : r.value
1612
+ });
2445
1613
  }
2446
- return () => w("div", {
1614
+ return () => y("div", {
2447
1615
  id: `${s.id}-design-item`,
2448
- ref: p,
2449
- class: v.value,
2450
- style: T.value,
2451
- onClick: n
2452
- }, [h(g.value), e.slots.default && e.slots.default()]);
1616
+ ref: l,
1617
+ class: B.value,
1618
+ style: O.value,
1619
+ onClick: o
1620
+ }, [v(f.value), e.slots.default && e.slots.default()]);
2453
1621
  }
2454
1622
  });
2455
- class kt extends ae {
2456
- constructor(e, o) {
2457
- super(e, o);
1623
+ class bt extends se {
1624
+ constructor(e, n) {
1625
+ super(e, n);
2458
1626
  }
2459
1627
  getPropertyConfig(e) {
2460
1628
  return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
@@ -2503,20 +1671,18 @@ class kt extends ae {
2503
1671
  title: "style样式"
2504
1672
  }
2505
1673
  },
2506
- setPropertyRelates(o, c) {
1674
+ setPropertyRelates(n, i) {
2507
1675
  }
2508
1676
  };
2509
1677
  }
2510
1678
  getEventPropConfig(e) {
2511
- const o = [
1679
+ const n = [
2512
1680
  {
2513
1681
  label: "onClick",
2514
1682
  name: "点击事件"
2515
1683
  }
2516
- ];
2517
- var c = this;
2518
- const d = c.eventsEditorUtils.formProperties(e, c.viewModelId, o), b = {};
2519
- b[c.viewModelId] = {
1684
+ ], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), m = {};
1685
+ m[i.viewModelId] = {
2520
1686
  type: "events-editor",
2521
1687
  editor: {
2522
1688
  initialData: d
@@ -2524,24 +1690,24 @@ class kt extends ae {
2524
1690
  }, this.propertyConfig.categories.eventsEditor = {
2525
1691
  title: "事件",
2526
1692
  hideTitle: !0,
2527
- properties: b,
1693
+ properties: m,
2528
1694
  // 这个属性,标记当属性变更得时候触发重新更新属性
2529
1695
  refreshPanelAfterChanged: !0,
2530
1696
  tabId: "commands",
2531
1697
  tabName: "交互",
2532
- setPropertyRelates(m, D) {
2533
- const P = m.propertyValue;
2534
- delete e[c.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(e, c.viewModelId, P.events, P));
1698
+ setPropertyRelates(p, T) {
1699
+ const x = p.propertyValue;
1700
+ delete e[i.viewModelId], x && (x.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, x.events, x));
2535
1701
  }
2536
1702
  };
2537
1703
  }
2538
1704
  }
2539
- class At extends ae {
2540
- constructor(e, o) {
2541
- super(e, o);
1705
+ class yt extends se {
1706
+ constructor(e, n) {
1707
+ super(e, n);
2542
1708
  }
2543
1709
  getPropertyConfig(e) {
2544
- return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
1710
+ return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getbBehaviorConfig(), this.getEventPropConfig(e), this.propertyConfig;
2545
1711
  }
2546
1712
  getBasicPropConfig() {
2547
1713
  this.propertyConfig.categories.basic = {
@@ -2562,7 +1728,7 @@ class At extends ae {
2562
1728
  type: "combo-list",
2563
1729
  textField: "value",
2564
1730
  valueField: "key",
2565
- data: [{ key: "response-toolbar-item", value: re["response-toolbar-item"].name }]
1731
+ data: [{ key: "response-toolbar-item", value: te["response-toolbar-item"].name }]
2566
1732
  }
2567
1733
  },
2568
1734
  text: {
@@ -2579,32 +1745,42 @@ class At extends ae {
2579
1745
  }
2580
1746
  };
2581
1747
  }
1748
+ getbBehaviorConfig() {
1749
+ this.propertyConfig.categories.behavior = {
1750
+ title: "行为",
1751
+ description: "Behavior",
1752
+ properties: {
1753
+ disabled: {
1754
+ title: "禁用",
1755
+ type: "boolean",
1756
+ description: "按钮禁用状态",
1757
+ refreshPanelAfterChanged: !0
1758
+ }
1759
+ }
1760
+ };
1761
+ }
2582
1762
  getAppearanceProperties(e) {
2583
1763
  this.propertyConfig.categories.appearance = {
2584
1764
  title: "样式",
2585
1765
  description: "Appearance",
2586
1766
  properties: {
2587
1767
  class: {
2588
- title: "class",
2589
- type: "string",
2590
- description: ""
2591
- },
2592
- style: {
2593
- title: "style",
1768
+ title: "class样式",
2594
1769
  type: "string",
2595
- description: ""
1770
+ description: "",
1771
+ $converter: "/converter/appearance.converter"
2596
1772
  }
2597
1773
  }
2598
1774
  };
2599
1775
  }
2600
1776
  getEventPropConfig(e) {
2601
- const o = [
1777
+ const n = [
2602
1778
  {
2603
1779
  label: "onClick",
2604
1780
  name: "点击事件"
2605
1781
  }
2606
- ], c = this, d = c.eventsEditorUtils.formProperties(e, c.viewModelId, o), b = {};
2607
- b[c.viewModelId] = {
1782
+ ], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), m = {};
1783
+ m[i.viewModelId] = {
2608
1784
  type: "events-editor",
2609
1785
  editor: {
2610
1786
  initialData: d
@@ -2612,272 +1788,245 @@ class At extends ae {
2612
1788
  }, this.propertyConfig.categories.eventsEditor = {
2613
1789
  title: "事件",
2614
1790
  hideTitle: !0,
2615
- properties: b,
1791
+ properties: m,
2616
1792
  // 这个属性,标记当属性变更得时候触发重新更新属性
2617
1793
  refreshPanelAfterChanged: !0,
2618
1794
  tabId: "commands",
2619
1795
  tabName: "交互",
2620
- setPropertyRelates(m, D) {
2621
- const P = m.propertyValue;
2622
- delete e[c.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(e, c.viewModelId, P.events, P));
1796
+ setPropertyRelates(p, T) {
1797
+ const x = p.propertyValue;
1798
+ delete e[i.viewModelId], x && (x.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, x.events, x));
2623
1799
  }
2624
1800
  };
2625
1801
  }
2626
1802
  }
2627
- function Bt(s, e) {
2628
- Pe();
2629
- const o = S(!1), c = S(!1);
2630
- let d = !1, b = !1;
2631
- function m(v) {
1803
+ function vt(s, e) {
1804
+ function n(T) {
2632
1805
  return !1;
2633
1806
  }
2634
- function D(v) {
2635
- }
2636
- function P() {
2637
- return "";
2638
- }
2639
- function g(v, T) {
2640
- return T.text = v.label, T;
2641
- }
2642
- function C(v, T, O) {
2643
- const E = s.schema;
2644
- if ((E.appearance && E.appearance.class || "").split(" ").includes("f-form-layout")) {
2645
- const j = String(v.innerText), h = q("form-group");
2646
- return h.editor = O, h.label = j, h;
2647
- }
2648
- return O;
2649
- }
2650
- function p() {
1807
+ function i() {
2651
1808
  return !1;
2652
1809
  }
2653
- function i() {
2654
- return !b;
1810
+ function d() {
1811
+ return !0;
2655
1812
  }
2656
- function f() {
1813
+ function m() {
2657
1814
  return !1;
2658
1815
  }
2659
- function a() {
2660
- return d;
2661
- }
2662
- function y(v) {
2663
- let T;
1816
+ function p(T) {
1817
+ let x;
2664
1818
  switch (s.schema.type) {
2665
1819
  case "tab-toolbar-item":
2666
- T = new kt(v, e);
1820
+ x = new bt(T, e);
2667
1821
  break;
2668
1822
  default:
2669
- T = new At(v, e);
1823
+ x = new yt(T, e);
2670
1824
  }
2671
- return T.getPropertyConfig(s.schema);
1825
+ return x.getPropertyConfig(s.schema);
2672
1826
  }
2673
1827
  return {
2674
- canAccepts: m,
2675
- checkCanAddComponent: f,
2676
- checkCanDeleteComponent: i,
2677
- checkCanMoveComponent: p,
2678
- getStyles: P,
2679
- hideNestedPaddingInDesginerView: a,
2680
- onAcceptNewChildElement: C,
2681
- onAcceptMovedChildElement: D,
2682
- onResolveNewComponentSchema: g,
2683
- getPropsConfig: y,
2684
- triggerBelongedComponentToMoveWhenMoved: o,
2685
- triggerBelongedComponentToDeleteWhenDeleted: c
1828
+ canAccepts: n,
1829
+ checkCanMoveComponent: i,
1830
+ checkCanDeleteComponent: d,
1831
+ checkCanAddComponent: m,
1832
+ getPropsConfig: p
2686
1833
  };
2687
1834
  }
2688
- const De = /* @__PURE__ */ X({
1835
+ const xe = /* @__PURE__ */ Y({
2689
1836
  name: "FResponseToolbarItemDesign",
2690
- props: Te,
1837
+ props: Ce,
2691
1838
  emits: ["Click"],
2692
1839
  setup(s, e) {
2693
- S(), S();
2694
- const o = S(s.alignment), c = {
1840
+ M(), M();
1841
+ const n = M(s.alignment), i = {
2695
1842
  id: "__more_buttons__",
2696
1843
  text: "More"
2697
- }, d = S(new G(c));
2698
- W(() => d.value.children.length > 0);
2699
- const b = S(), m = L("designer-host-service"), D = L("design-item-context"), P = Bt(D, m), g = he(b, D, P);
1844
+ }, d = M(new z(i));
1845
+ V(() => d.value.children.length > 0);
1846
+ const m = M(), p = L("designer-host-service"), T = L("design-item-context"), x = vt(T, p), f = fe(m, T, x);
2700
1847
  L("toolbar-item-handler", () => {
2701
- }), z(() => {
2702
- b.value.componentInstance = g;
2703
- }), e.expose(g.value);
2704
- function C() {
2705
- const f = {
1848
+ }), H(() => {
1849
+ m.value.componentInstance = f;
1850
+ }), e.expose(f.value);
1851
+ function g() {
1852
+ const u = {
2706
1853
  "f-icon": !0
2707
- }, a = s.icon ? s.icon.trim() : "";
2708
- return J(f, a);
1854
+ }, b = s.icon ? s.icon.trim() : "";
1855
+ return J(u, b);
2709
1856
  }
2710
- function p() {
1857
+ function l() {
2711
1858
  return !!(s.icon && s.icon.trim());
2712
1859
  }
2713
- function i() {
2714
- const f = {
1860
+ function c() {
1861
+ const u = {
2715
1862
  btn: !0,
2716
1863
  "f-rt-btn": !0,
2717
- "f-btn-ml": o.value === "right",
2718
- "f-btn-mr": o.value === "left",
2719
- "btn-icontext": !!(s.icon && s.icon.trim())
1864
+ "f-btn-ml": n.value === "right",
1865
+ "f-btn-mr": n.value === "left",
1866
+ "btn-icontext": !!(s.icon && s.icon.trim()),
1867
+ disabled: s.disabled === !0
2720
1868
  };
2721
- return J(f, s.class);
1869
+ return J(u, s.class);
2722
1870
  }
2723
- return z(() => {
2724
- }), ne(() => {
2725
- }), () => w("div", {
2726
- ref: b,
2727
- "data-dragref": `${D.schema.id}-container`,
1871
+ return () => y("div", {
1872
+ ref: m,
1873
+ "data-dragref": `${T.schema.id}-container`,
2728
1874
  class: "farris-component position-relative",
2729
1875
  style: "display:inline-block!important;"
2730
- }, [w("button", {
1876
+ }, [y("button", {
2731
1877
  type: "button",
2732
- class: i(),
1878
+ class: c(),
2733
1879
  id: s.id
2734
- }, [p() && w("i", {
2735
- class: C()
1880
+ }, [l() && y("i", {
1881
+ class: g()
2736
1882
  }, null), s.text])]);
2737
1883
  }
2738
- }), Ot = /* @__PURE__ */ X({
1884
+ }), Ct = /* @__PURE__ */ Y({
2739
1885
  name: "FResponseToolbarDesign",
2740
- props: dt,
1886
+ props: st,
2741
1887
  emits: ["Click"],
2742
1888
  setup(s, e) {
2743
- const o = S(s.items);
2744
- let c = new Array(o.value.length).fill(S());
2745
- const d = S(), b = S(), m = S(s.alignment), D = {
1889
+ const n = M(s.items);
1890
+ let i = new Array(n.value.length).fill(M());
1891
+ const d = M(), m = M(), p = M(s.alignment), T = {
2746
1892
  id: "__more_buttons__",
2747
1893
  text: "More"
2748
- }, P = S(new G(D)), g = je();
2749
- W(() => P.value.children.length > 0);
2750
- const C = S(), p = L("designer-host-service"), i = L("design-item-context"), f = Dt(i.schema, p, i), a = he(C, i, f);
2751
- L("toolbar-item-handler", () => {
2752
- }), z(() => {
2753
- C.value.componentInstance = a;
2754
- }), e.expose(a.value);
2755
- const y = W(() => J({
1894
+ }, x = M(new z(T)), f = we();
1895
+ V(() => x.value.children.length > 0);
1896
+ const g = M(), l = L("designer-host-service"), c = L("design-item-context"), u = ut(c, l), b = fe(g, c, u), I = L("toolbar-item-handler", () => {
1897
+ });
1898
+ H(() => {
1899
+ g.value.componentInstance = b;
1900
+ }), e.expose(b.value);
1901
+ function B() {
1902
+ I && I();
1903
+ }
1904
+ const O = V(() => J({
2756
1905
  "f-toolbar": !0,
2757
1906
  "f-response-toolbar": !0,
2758
1907
  "position-relative": !0
2759
- }, s.customClass)), v = W(() => ({
1908
+ }, s.customClass)), F = V(() => ({
2760
1909
  "d-flex": !0,
2761
1910
  "flex-nowrap": !0,
2762
- "justify-content-end": m.value === "right",
2763
- "justify-content-start": m.value === "left"
1911
+ "justify-content-end": p.value === "right",
1912
+ "justify-content-start": p.value === "left"
2764
1913
  })), {
2765
- renderToolbarDropdown: T,
2766
- clearAllDropDown: O
2767
- } = ht(s, g, a);
2768
- function E() {
2769
- o.value.filter((l) => l.children && l.children.length > 0).forEach((l) => {
2770
- l.expanded = !1;
2771
- }), P.value.expanded = !1, O();
1914
+ renderToolbarDropdown: j,
1915
+ clearAllDropDown: A
1916
+ } = at(s, f, b);
1917
+ function k() {
1918
+ n.value.filter((t) => t.children && t.children.length > 0).forEach((t) => {
1919
+ t.expanded = !1;
1920
+ }), x.value.expanded = !1, A();
2772
1921
  }
2773
- const k = /* @__PURE__ */ new Map(), N = [];
2774
- function j(l) {
2775
- const n = b.value;
2776
- let t = l;
2777
- const r = Array.from(n.children), u = r[r.length - 1].id === "__more_buttons__" ? r[r.length - 1] : null;
2778
- if (u) {
2779
- const _ = u.computedStyleMap().get("margin-left"), $ = u.computedStyleMap().get("margin-right"), V = (_ ? _.value : 0) + u.getBoundingClientRect().width + ($ ? $.value : 0);
2780
- t -= V;
1922
+ const R = /* @__PURE__ */ new Map(), v = [];
1923
+ function E(t) {
1924
+ const r = m.value;
1925
+ let a = t;
1926
+ const w = Array.from(r.children), C = w[w.length - 1].id === "__more_buttons__" ? w[w.length - 1] : null;
1927
+ if (C) {
1928
+ const _ = C.computedStyleMap().get("margin-left"), N = C.computedStyleMap().get("margin-right"), q = (_ ? _.value : 0) + C.getBoundingClientRect().width + (N ? N.value : 0);
1929
+ a -= q;
2781
1930
  }
2782
- const R = r.filter((_) => _.id !== "__more_buttons__");
2783
- for (const _ of R) {
2784
- const $ = _.computedStyleMap().get("margin-left"), V = _.computedStyleMap().get("margin-right"), U = ($ ? $.value : 0) + _.getBoundingClientRect().width + (V ? V.value : 0);
2785
- t < U ? (k.set(_.id, !0), N.push({
1931
+ const S = w.filter((_) => _.id !== "__more_buttons__");
1932
+ for (const _ of S) {
1933
+ const N = _.computedStyleMap().get("margin-left"), q = _.computedStyleMap().get("margin-right"), G = (N ? N.value : 0) + _.getBoundingClientRect().width + (q ? q.value : 0);
1934
+ a < G ? (R.set(_.id, !0), v.push({
2786
1935
  id: _.id,
2787
- width: U
2788
- })) : t -= U;
1936
+ width: G
1937
+ })) : a -= G;
2789
1938
  }
2790
- if (N.length)
2791
- for (let _ = N.length - 1; _ >= 0; _--) {
2792
- const $ = N[_].width;
2793
- if (t >= $)
2794
- t -= $, k.delete(N[_].id), N.pop();
1939
+ if (v.length)
1940
+ for (let _ = v.length - 1; _ >= 0; _--) {
1941
+ const N = v[_].width;
1942
+ if (a >= N)
1943
+ a -= N, R.delete(v[_].id), v.pop();
2795
1944
  else
2796
1945
  break;
2797
1946
  }
2798
- const x = Object.assign({}, P.value);
2799
- x.children = [];
2800
- const M = new G(x), F = o.value.reduce((_, $) => (k.has($.id) && M.children.push($), $.visible = !k.has($.id), _.push($), _), []);
2801
- P.value = M, o.value = F;
1947
+ const $ = Object.assign({}, x.value);
1948
+ $.children = [];
1949
+ const U = new z($), W = n.value.reduce((_, N) => (R.has(N.id) && U.children.push(N), N.visible = !R.has(N.id), _.push(N), _), []);
1950
+ x.value = U, n.value = W;
2802
1951
  }
2803
- const h = new ResizeObserver((l) => {
2804
- if (l.length) {
2805
- const t = l[0].contentRect.width, u = b.value.getBoundingClientRect().width;
2806
- (t < u || N.length) && j(t);
1952
+ const P = new ResizeObserver((t) => {
1953
+ if (t.length) {
1954
+ const a = t[0].contentRect.width, C = m.value.getBoundingClientRect().width;
1955
+ (a < C || v.length) && E(a);
2807
1956
  }
2808
1957
  });
2809
- z(() => {
2810
- const l = d.value;
2811
- h.observe(l), document.body.addEventListener("click", E);
2812
- }), ne(() => {
2813
- h.disconnect(), document.body.removeEventListener("click", E);
2814
- }), H(() => s.items, () => {
2815
- o.value = s.items;
1958
+ H(() => {
1959
+ const t = d.value;
1960
+ P.observe(t), document.body.addEventListener("click", k);
1961
+ }), de(() => {
1962
+ P.disconnect(), document.body.removeEventListener("click", k);
1963
+ }), Q(() => s.items, () => {
1964
+ n.value = s.items;
2816
1965
  }, {
2817
1966
  deep: !0
2818
- }), H(o, (l) => {
2819
- c = new Array(o.value.length).fill(S());
1967
+ }), Q(n, (t) => {
1968
+ i = new Array(n.value.length).fill(M());
2820
1969
  });
2821
- function I(l, n, t, r) {
2822
- i && i.setupContext && i.setupContext.emit("selectionChange", l, n, t, r);
1970
+ function h(t, r, a, w) {
1971
+ c && c.setupContext && c.setupContext.emit("selectionChange", t, r, a, w);
2823
1972
  }
2824
- function A() {
2825
- const l = b.value.querySelector(".dgComponentFocused.dgComponentSelected");
2826
- l == null || l.classList.remove("dgComponentSelected"), l == null || l.classList.remove("dgComponentFocused");
1973
+ function o() {
1974
+ const t = m.value.querySelector(".dgComponentFocused.dgComponentSelected");
1975
+ t == null || t.classList.remove("dgComponentSelected"), t == null || t.classList.remove("dgComponentFocused"), B();
2827
1976
  }
2828
- return () => w("div", {
2829
- ref: C,
2830
- "data-dragref": `${i.schema.id}-container`,
2831
- class: y.value
2832
- }, [w("div", {
1977
+ return () => y("div", {
1978
+ ref: g,
1979
+ "data-dragref": `${c.schema.id}-container`,
1980
+ class: O.value
1981
+ }, [y("div", {
2833
1982
  ref: d,
2834
- class: v.value
2835
- }, [w("div", {
2836
- ref: b,
1983
+ class: F.value
1984
+ }, [y("div", {
1985
+ ref: m,
2837
1986
  class: "d-inline-block f-response-content",
2838
1987
  style: "white-space: nowrap;"
2839
- }, [o.value.map((l, n) => w(Mt, {
2840
- ref: c[n],
1988
+ }, [n.value.map((t, r) => y(ht, {
1989
+ ref: i[r],
2841
1990
  class: "p-0 display-inline-block",
2842
- modelValue: l,
2843
- "onUpdate:modelValue": (t) => l = t,
1991
+ modelValue: t,
1992
+ "onUpdate:modelValue": (a) => t = a,
2844
1993
  canMove: !0,
2845
1994
  childType: "response-toolbar-item",
2846
1995
  childLabel: "按钮",
2847
1996
  contentKey: "buttons",
2848
1997
  componentId: s.componentId,
2849
- id: l.id,
1998
+ id: t.id,
2850
1999
  style: "padding:0 !important;display:inline-block",
2851
- onSelectionChange: I,
2852
- onRemoveComponent: A
2000
+ onSelectionChange: h,
2001
+ onRemoveComponent: o
2853
2002
  }, {
2854
2003
  default: () => {
2855
- var t;
2856
- return [w(De, {
2857
- id: l.id,
2858
- disable: l.disable,
2859
- text: l.text,
2860
- icon: l.icon,
2861
- class: ((t = l.appearance) == null ? void 0 : t.class) || "btn-secondary",
2004
+ var a;
2005
+ return [y(xe, {
2006
+ id: t.id,
2007
+ disabled: t.disabled,
2008
+ text: t.text,
2009
+ icon: t.icon,
2010
+ class: ((a = t.appearance) == null ? void 0 : a.class) || "btn-secondary",
2862
2011
  alignment: s.alignment || "right",
2863
2012
  componentId: s.componentId
2864
2013
  }, null)];
2865
2014
  }
2866
2015
  }))])])]);
2867
2016
  }
2868
- }), Wt = ce;
2869
- Q.register = (s, e, o) => {
2870
- s["response-toolbar"] = Q, e["response-toolbar"] = ce;
2017
+ }), Mt = oe;
2018
+ X.register = (s, e, n) => {
2019
+ s["response-toolbar"] = X, e["response-toolbar"] = oe;
2871
2020
  };
2872
- Q.registerDesigner = (s, e, o) => {
2873
- s["response-toolbar"] = Ot, e["response-toolbar"] = ce, s["response-toolbar-item"] = De, e["response-toolbar-item"] = ut;
2021
+ X.registerDesigner = (s, e, n) => {
2022
+ s["response-toolbar"] = Ct, e["response-toolbar"] = oe, s["response-toolbar-item"] = xe, e["response-toolbar-item"] = rt;
2874
2023
  };
2875
- const Ut = Be(Q);
2024
+ const Et = Re(X);
2876
2025
  export {
2877
- Q as FResponseToolbar,
2878
- G as ResponseToolbarDropDownItem,
2879
- Vt as ResponseToolbarGroup,
2880
- Oe as ResponseToolbarItem,
2881
- Ut as default,
2882
- Wt as responseToolbarResolver
2026
+ X as FResponseToolbar,
2027
+ z as ResponseToolbarDropDownItem,
2028
+ Dt as ResponseToolbarGroup,
2029
+ ke as ResponseToolbarItem,
2030
+ Et as default,
2031
+ Mt as responseToolbarResolver
2883
2032
  };