@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,103 +1,107 @@
1
- var Ne = Object.defineProperty;
2
- var _e = (n, e, t) => e in n ? Ne(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var O = (n, e, t) => _e(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as z, ref as M, computed as F, watch as G, createVNode as b, createTextVNode as Q, getCurrentInstance as Ce, onMounted as H, onUnmounted as ie, inject as V, provide as Fe, onBeforeUnmount as Le, withModifiers as Ve } from "vue";
5
- import { isPlainObject as ge, cloneDeep as we } from "lodash-es";
6
- import We from "../response-toolbar/index.esm.js";
7
- import { getCustomClass as Y, withInstall as Ue } from "../common/index.esm.js";
8
- import { useDesignerInnerComponent as Pe } from "../designer-canvas/index.esm.js";
9
- const ae = {}, Te = {};
10
- function ce(n) {
11
- const { properties: e, title: t, ignore: s } = n, c = s && Array.isArray(s), g = Object.keys(e).reduce((d, P) => ((!c || !s.find((S) => S == P)) && (d[P] = e[P].type === "object" && e[P].properties ? ce(e[P]) : we(e[P].default)), d), {});
12
- return (!c || !s.find((d) => d == "id")) && (g.id = `${t}-${Date.now()}`), g;
1
+ var Ie = Object.defineProperty;
2
+ var Ae = (o, e, t) => e in o ? Ie(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var R = (o, e, t) => Ae(o, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as W, ref as M, computed as F, watch as z, createVNode as m, createTextVNode as X, getCurrentInstance as he, onMounted as G, onUnmounted as be, inject as V, provide as Oe, onBeforeUnmount as je, withModifiers as _e } from "vue";
5
+ import { isPlainObject as ue, cloneDeep as ye } from "lodash-es";
6
+ import $e from "../response-toolbar/index.esm.js";
7
+ import { getCustomClass as Z, withInstall as Fe } from "../common/index.esm.js";
8
+ import { useDesignerInnerComponent as ve } from "../designer-canvas/index.esm.js";
9
+ const Ce = {}, we = {};
10
+ function re(o) {
11
+ const { properties: e, title: t, ignore: s } = o, i = s && Array.isArray(s), u = Object.keys(e).reduce((d, g) => ((!i || !s.find((w) => w === g)) && (d[g] = e[g].type === "object" && e[g].properties ? re(e[g]) : ye(e[g].default)), d), {});
12
+ if (t && (!i || !s.find((d) => d === "id"))) {
13
+ const d = t.toLowerCase().replace(/-/g, "_");
14
+ u.id = `${d}_${Math.random().toString().slice(2, 6)}`;
15
+ }
16
+ return u;
13
17
  }
14
- function U(n, e = {}, t) {
15
- const s = ae[n];
18
+ function Y(o, e = {}, t) {
19
+ const s = Ce[o];
16
20
  if (s) {
17
- let c = ce(s);
18
- const g = Te[n];
19
- return c = g ? g({ getSchemaByType: U }, c, e, t) : c, c;
21
+ let i = re(s);
22
+ const u = we[o];
23
+ return i = u ? u({ getSchemaByType: Y }, i, e, t) : i, i;
20
24
  }
21
25
  return null;
22
26
  }
23
- function qe(n, e) {
24
- const t = ce(e);
25
- return Object.keys(n).reduce((s, c) => (s[c] && ge(s[c]) && ge(n[c]) ? Object.assign(s[c], n[c]) : s[c] = n[c], s), t), t;
27
+ function Ne(o, e) {
28
+ const t = re(e);
29
+ return Object.keys(t).reduce((s, i) => (s[i] && ue(s[i]) && ue(o[i] || !o[i]) ? Object.assign(s[i], o[i] || {}) : s[i] = o[i], s), t), t;
26
30
  }
27
- function He(n, e) {
28
- return Object.keys(n).filter((s) => n[s] != null).reduce((s, c) => {
29
- if (e.has(c)) {
30
- const g = e.get(c);
31
- if (typeof g == "string")
32
- s[g] = n[c];
31
+ function Le(o, e) {
32
+ return Object.keys(o).filter((s) => o[s] != null).reduce((s, i) => {
33
+ if (e.has(i)) {
34
+ const u = e.get(i);
35
+ if (typeof u == "string")
36
+ s[u] = o[i];
33
37
  else {
34
- const d = g(c, n[c], n);
38
+ const d = u(i, o[i], o);
35
39
  Object.assign(s, d);
36
40
  }
37
41
  } else
38
- s[c] = n[c];
42
+ s[i] = o[i];
39
43
  return s;
40
44
  }, {});
41
45
  }
42
- function ze(n, e, t = /* @__PURE__ */ new Map()) {
43
- const s = qe(n, e);
44
- return He(s, t);
46
+ function Ve(o, e, t = /* @__PURE__ */ new Map()) {
47
+ const s = Ne(o, e);
48
+ return Le(s, t);
45
49
  }
46
- function Ge(n = {}) {
47
- function e(y, T, p, i) {
48
- if (typeof p == "number")
49
- return i[y].length === p;
50
- if (typeof p == "object") {
51
- const f = Object.keys(p)[0], l = p[f];
50
+ function Ue(o = {}) {
51
+ function e(h, b, c, l) {
52
+ if (typeof c == "number")
53
+ return l[h].length === c;
54
+ if (typeof c == "object") {
55
+ const f = Object.keys(c)[0], v = c[f];
52
56
  if (f === "not")
53
- return Number(i[y].length) !== Number(l);
57
+ return Number(l[h].length) !== Number(v);
54
58
  if (f === "moreThan")
55
- return Number(i[y].length) >= Number(l);
59
+ return Number(l[h].length) >= Number(v);
56
60
  if (f === "lessThan")
57
- return Number(i[y].length) <= Number(l);
61
+ return Number(l[h].length) <= Number(v);
58
62
  }
59
63
  return !1;
60
64
  }
61
- function t(y, T, p, i) {
62
- return i[y] && i[y].propertyValue && String(i[y].propertyValue.value) === String(p);
65
+ function t(h, b, c, l) {
66
+ return l[h] && l[h].propertyValue && String(l[h].propertyValue.value) === String(c);
63
67
  }
64
68
  const s = /* @__PURE__ */ new Map([
65
69
  ["length", e],
66
70
  ["getProperty", t]
67
71
  ]);
68
- Object.keys(n).reduce((y, T) => (y.set(T, n[T]), y), s);
69
- function c(y, T) {
70
- const p = y;
71
- return typeof T == "number" ? [{ target: p, operator: "length", param: null, value: Number(T) }] : typeof T == "boolean" ? [{ target: p, operator: "getProperty", param: y, value: !!T }] : typeof T == "object" ? Object.keys(T).map((i) => {
72
- if (i === "length")
73
- return { target: p, operator: "length", param: null, value: T[i] };
74
- const f = i, l = T[i];
75
- return { target: p, operator: "getProperty", param: f, value: l };
72
+ Object.keys(o).reduce((h, b) => (h.set(b, o[b]), h), s);
73
+ function i(h, b) {
74
+ const c = h;
75
+ return typeof b == "number" ? [{ target: c, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: c, operator: "getProperty", param: h, value: !!b }] : typeof b == "object" ? Object.keys(b).map((l) => {
76
+ if (l === "length")
77
+ return { target: c, operator: "length", param: null, value: b[l] };
78
+ const f = l, v = b[l];
79
+ return { target: c, operator: "getProperty", param: f, value: v };
76
80
  }) : [];
77
81
  }
78
- function g(y) {
79
- return Object.keys(y).reduce((p, i) => {
80
- const f = c(i, y[i]);
81
- return p.push(...f), p;
82
+ function u(h) {
83
+ return Object.keys(h).reduce((c, l) => {
84
+ const f = i(l, h[l]);
85
+ return c.push(...f), c;
82
86
  }, []);
83
87
  }
84
- function d(y, T) {
85
- if (s.has(y.operator)) {
86
- const p = s.get(y.operator);
87
- return p && p(y.target, y.param, y.value, T) || !1;
88
+ function d(h, b) {
89
+ if (s.has(h.operator)) {
90
+ const c = s.get(h.operator);
91
+ return c && c(h.target, h.param, h.value, b) || !1;
88
92
  }
89
93
  return !1;
90
94
  }
91
- function P(y, T) {
92
- return g(y).reduce((f, l) => f && d(l, T), !0);
95
+ function g(h, b) {
96
+ return u(h).reduce((f, v) => f && d(v, b), !0);
93
97
  }
94
- function S(y, T) {
95
- const p = Object.keys(y), i = p.includes("allOf"), f = p.includes("anyOf"), l = i || f, j = (l ? y[l ? i ? "allOf" : "anyOf" : "allOf"] : [y]).map((D) => P(D, T));
96
- return i ? !j.includes(!1) : j.includes(!0);
98
+ function w(h, b) {
99
+ const c = Object.keys(h), l = c.includes("allOf"), f = c.includes("anyOf"), v = l || f, j = (v ? h[v ? l ? "allOf" : "anyOf" : "allOf"] : [h]).map((D) => g(D, b));
100
+ return l ? !j.includes(!1) : j.includes(!0);
97
101
  }
98
- return { parseValueSchema: S };
102
+ return { parseValueSchema: w };
99
103
  }
100
- const K = {
104
+ const ee = {
101
105
  button: { type: "button", name: "按钮", icon: "Button" },
102
106
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
103
107
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -135,38 +139,47 @@ const K = {
135
139
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
136
140
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
137
141
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
138
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
139
- }, De = {}, Je = {};
140
- Ge();
141
- function le(n, e, t = /* @__PURE__ */ new Map(), s = (d, P, S) => P, c = {}, g = (d) => d) {
142
- return ae[e.title] = e, Te[e.title] = s, De[e.title] = c, Je[e.title] = g, (d = {}) => {
143
- const P = ze(d, e, t), S = Object.keys(n).reduce((y, T) => (y[T] = n[T].default, y), {});
144
- return Object.assign(S, P);
142
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
143
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
144
+ }, We = {}, qe = {};
145
+ Ue();
146
+ function ie(o, e, t = /* @__PURE__ */ new Map(), s = (d, g, w, h) => g, i = {}, u = (d) => d) {
147
+ return Ce[e.title] = e, we[e.title] = s, We[e.title] = i, qe[e.title] = u, (d = {}) => {
148
+ const g = Ve(d, e, t), w = Object.keys(o).reduce((h, b) => (h[b] = o[b].default, h), {});
149
+ return Object.assign(w, g);
145
150
  };
146
151
  }
147
- function Se(n, e) {
152
+ function Pe(o, e) {
148
153
  return { customClass: e.class, customStyle: e.style };
149
154
  }
150
- function Qe(n, e) {
151
- return { buttons: e.buttons };
155
+ function He(o, e) {
156
+ var s, i;
157
+ const t = [];
158
+ return e == null || e.buttons.map((u) => {
159
+ const d = {};
160
+ Object.keys(u).map((g) => {
161
+ var w;
162
+ g === "appearance" ? d.class = ((w = u[g]) == null ? void 0 : w.class) || "" : d[g] = u[g];
163
+ }), t.push(d);
164
+ }), (s = e.appearance) != null && s.class ? { buttons: t, buttonClass: (i = e.appearance) == null ? void 0 : i.class } : { buttons: t };
152
165
  }
153
- function Xe() {
154
- function n(e, t) {
155
- var P;
156
- const s = (P = e.toolbar) == null ? void 0 : P.buttons;
166
+ function ze() {
167
+ function o(e, t) {
168
+ var g;
169
+ const s = (g = e.toolbar) == null ? void 0 : g.buttons;
157
170
  if (!s || s.length < 1)
158
171
  return null;
159
- const [c, g] = t.payloads, d = s.find((S) => S.id === g);
172
+ const [i, u] = t.payloads, d = s.find((w) => w.id === u);
160
173
  return d ? d.onClick || d.click : null;
161
174
  }
162
175
  return {
163
- resolve: n
176
+ resolve: o
164
177
  };
165
178
  }
166
- const Ye = /* @__PURE__ */ new Map([
167
- ["appearance", Se],
168
- ["toolbar", Qe]
169
- ]), Ze = "https://json-schema.org/draft/2020-12/schema", Ke = "https://farris-design.gitee.io/page-header.schema.json", et = "page-header", tt = "A Farris Container Component", nt = "object", ot = {
179
+ const Ge = /* @__PURE__ */ new Map([
180
+ ["appearance", Pe],
181
+ ["toolbar", He]
182
+ ]), Qe = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-design.gitee.io/page-header.schema.json", Xe = "page-header", Ye = "A Farris Container Component", Ze = "object", Ke = {
170
183
  id: {
171
184
  description: "The unique identifier for a Page Header",
172
185
  type: "string"
@@ -218,12 +231,22 @@ const Ye = /* @__PURE__ */ new Map([
218
231
  description: "",
219
232
  type: "object",
220
233
  properties: {
234
+ appearance: {
235
+ description: "",
236
+ type: "object",
237
+ properties: {
238
+ class: {
239
+ type: "string",
240
+ default: "col-6"
241
+ }
242
+ }
243
+ },
221
244
  id: {
222
- description: "The unique identifier for a Response Toolbar",
245
+ description: "",
223
246
  type: "string"
224
247
  },
225
248
  type: {
226
- description: "The type string of Response Toolbar",
249
+ description: "",
227
250
  type: "string",
228
251
  default: "response-toolbar"
229
252
  },
@@ -274,18 +297,18 @@ const Ye = /* @__PURE__ */ new Map([
274
297
  type: "boolean",
275
298
  default: !1
276
299
  }
277
- }, rt = {
278
- $schema: Ze,
279
- $id: Ke,
280
- title: et,
281
- description: tt,
282
- type: nt,
283
- properties: ot
300
+ }, et = {
301
+ $schema: Qe,
302
+ $id: Je,
303
+ title: Xe,
304
+ description: Ye,
305
+ type: Ze,
306
+ properties: Ke
284
307
  };
285
- function st(n, e, t) {
308
+ function tt(o, e, t) {
286
309
  return e.title = "标题", e;
287
310
  }
288
- const pe = {
311
+ const ae = {
289
312
  /** 组件自定义样式 */
290
313
  customClass: { type: String, default: "" },
291
314
  /** 是否显示图标 */
@@ -314,217 +337,213 @@ const pe = {
314
337
  prePaginationDisabled: { type: Boolean, default: !0 },
315
338
  /** 向后翻页是否禁用 */
316
339
  nextPaginationDisabled: { type: Boolean, default: !1 }
317
- }, it = Object.assign({}, pe, {
340
+ }, nt = Object.assign({}, ae, {
318
341
  componentId: { type: String, default: "" }
319
- }), me = le(pe, rt, Ye, st), at = Xe(), oe = /* @__PURE__ */ z({
342
+ }), pe = ie(ae, et, Ge, tt), ot = ze(), oe = /* @__PURE__ */ W({
320
343
  name: "FPageHeader",
321
- props: pe,
322
- emits: ["Click", "PrePaginationClick", "NextPaginationClick"],
323
- setup(n, e) {
324
- const t = M(n.buttons), s = (D, A) => {
325
- e.emit("Click", D, A);
344
+ props: ae,
345
+ emits: ["click", "prePaginationClick", "nextPaginationClick"],
346
+ setup(o, e) {
347
+ const t = M(o.buttons), s = (D, I) => {
348
+ e.emit("click", D, I);
326
349
  };
327
- function c(D, A) {
328
- D && A && A.split(" ").reduce((v, m) => (v[m] = !0, v), D);
350
+ function i(D, I) {
351
+ D && I && I.split(" ").reduce((k, y) => (k[y] = !0, k), D);
329
352
  }
330
- const g = F(() => {
353
+ const u = F(() => {
331
354
  const D = {
332
355
  "f-page-header": !0
333
356
  };
334
- return c(D, n.customClass), D;
357
+ return i(D, o.customClass), D;
335
358
  }), d = F(() => {
336
359
  const D = {
337
360
  "f-title-icon": !0
338
361
  };
339
- return c(D, n.iconClass), D;
340
- }), P = F(() => {
362
+ return i(D, o.iconClass), D;
363
+ }), g = F(() => {
341
364
  const D = {
342
365
  "f-icon": !0
343
366
  };
344
- return c(D, n.icon), D;
345
- }), S = F(() => {
367
+ return i(D, o.icon), D;
368
+ }), w = F(() => {
346
369
  const D = {
347
370
  "f-title": !0
348
371
  };
349
- return c(D, n.titleContentClass), D;
350
- }), y = F(() => {
372
+ return i(D, o.titleContentClass), D;
373
+ }), h = F(() => {
351
374
  const D = {
352
375
  "f-content": !0
353
376
  };
354
- return c(D, n.contentClass), D;
355
- }), T = F(() => {
377
+ return i(D, o.contentClass), D;
378
+ }), b = F(() => {
356
379
  const D = {
357
380
  "f-content": !0
358
381
  };
359
- return c(D, n.downContentClass), D;
360
- }), p = F(() => ({
382
+ return i(D, o.downContentClass), D;
383
+ }), c = F(() => ({
361
384
  "f-icon f-icon-arrow-w": !0,
362
- "f-state-disabled": n.prePaginationDisabled
363
- })), i = F(() => ({
385
+ "f-state-disabled": o.prePaginationDisabled
386
+ })), l = F(() => ({
364
387
  "f-icon f-icon-arrow-e": !0,
365
- "f-state-disabled": n.nextPaginationDisabled
388
+ "f-state-disabled": o.nextPaginationDisabled
366
389
  }));
367
390
  function f(D) {
368
- n.prePaginationDisabled || e.emit("PrePaginationClick", D);
391
+ o.prePaginationDisabled || e.emit("prePaginationClick", D);
369
392
  }
370
- function l(D) {
371
- n.nextPaginationDisabled || e.emit("NextPaginationClick", D);
393
+ function v(D) {
394
+ o.nextPaginationDisabled || e.emit("nextPaginationClick", D);
372
395
  }
373
- function C() {
374
- return e.slots.titleContent ? b("div", {
375
- class: S.value
376
- }, [Q(" "), e.slots.titleContent()]) : b("div", {
396
+ function E() {
397
+ return e.slots.titleContent ? m("div", {
398
+ class: w.value
399
+ }, [X(" "), e.slots.titleContent()]) : m("div", {
377
400
  class: "f-title"
378
- }, [n.showIcon && n.icon ? b("span", {
401
+ }, [o.showIcon && o.icon ? m("span", {
379
402
  class: d.value
380
- }, [b("i", {
381
- class: P.value
382
- }, null)]) : "", b("h4", {
403
+ }, [m("i", {
404
+ class: g.value
405
+ }, null)]) : "", m("h4", {
383
406
  class: "f-title-text"
384
- }, [n.title]), n.subTitle ? b("h5", {
407
+ }, [o.title]), o.subTitle ? m("h5", {
385
408
  class: "f-title-subtitle"
386
- }, [n.subTitle]) : "", n.showPagination ? b("div", {
409
+ }, [o.subTitle]) : "", o.showPagination ? m("div", {
387
410
  class: "f-title-pagination"
388
- }, [b("span", {
389
- class: p.value,
411
+ }, [m("span", {
412
+ class: c.value,
390
413
  onClick: f
391
- }, null), b("span", {
392
- class: i.value,
393
- onClick: l
414
+ }, null), m("span", {
415
+ class: l.value,
416
+ onClick: v
394
417
  }, null)]) : ""]);
395
418
  }
396
- function w() {
397
- return e.slots.content ? b("div", {
398
- class: y.value
399
- }, [Q(" "), e.slots.content()]) : "";
419
+ function O() {
420
+ return e.slots.content ? m("div", {
421
+ class: h.value
422
+ }, [X(" "), e.slots.content()]) : "";
400
423
  }
401
424
  function j() {
402
- if (n.buttons && n.buttons.length > 0)
403
- return b(We, {
404
- customClass: n.buttonClass,
425
+ if (o.buttons && o.buttons.length > 0)
426
+ return m($e, {
427
+ customClass: o.buttonClass,
405
428
  items: t.value,
406
429
  onClick: s
407
430
  }, null);
408
431
  }
409
- function I() {
410
- return e.slots.downContent ? b("div", {
411
- class: T.value
412
- }, [Q(" "), e.slots.downContent()]) : "";
432
+ function _() {
433
+ return e.slots.downContent ? m("div", {
434
+ class: b.value
435
+ }, [X(" "), e.slots.downContent()]) : "";
413
436
  }
414
- return G(() => n.buttons, (D) => {
437
+ return z(() => o.buttons, (D) => {
415
438
  t.value = D;
416
439
  }, {
417
440
  deep: !0
418
- }), () => b("div", {
419
- class: g.value
420
- }, [b("nav", {
441
+ }), () => m("div", {
442
+ class: u.value
443
+ }, [m("nav", {
421
444
  class: "f-page-header-base"
422
- }, [C(), w(), j()]), I()]);
445
+ }, [E(), O(), j()]), _()]);
423
446
  }
424
447
  });
425
- function ct(n, e, t) {
426
- var $;
427
- function s() {
428
- t != null && t.resolveComponentContext && t.resolveComponentContext();
429
- }
430
- s();
431
- const c = t && t.getStyles && t.getStyles() || "", g = t && t.getDesignerClass && t.getDesignerClass() || "", d = M();
432
- function P() {
448
+ function st(o, e, t) {
449
+ var I;
450
+ const s = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", u = M();
451
+ function d() {
433
452
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
434
453
  }
435
- function S() {
454
+ function g() {
436
455
  return !1;
437
456
  }
438
- function y() {
457
+ function w() {
439
458
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
440
459
  }
441
- function T() {
460
+ function h() {
442
461
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
443
462
  }
444
- function p(v) {
445
- if (!v || !v.value)
463
+ function b(S) {
464
+ if (!S || !S.value)
446
465
  return null;
447
- if (v.value.schema && v.value.schema.type === "component")
448
- return v.value;
449
- const m = M(v == null ? void 0 : v.value.parent), x = p(m);
450
- return x || null;
466
+ if (S.value.schema && S.value.schema.type === "component")
467
+ return S.value;
468
+ const k = M(S == null ? void 0 : S.value.parent), y = b(k);
469
+ return y || null;
451
470
  }
452
- function i(v = e) {
453
- const { componentInstance: m, designerItemElementRef: x } = v;
454
- return !m || !m.value ? null : m.value.canMove ? x : i(v.parent);
471
+ function c(S = e) {
472
+ const { componentInstance: k, designerItemElementRef: y } = S;
473
+ return !k || !k.value ? null : k.value.canMove ? y : c(S.parent);
455
474
  }
456
- function f(v) {
457
- return !!t && t.canAccepts(v);
475
+ function l(S) {
476
+ return !!t && t.canAccepts(S);
458
477
  }
459
- function l() {
478
+ function f() {
460
479
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
461
480
  }
462
- function C() {
463
- }
464
- function w(v, m) {
465
- m && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(m);
481
+ function v() {
466
482
  }
467
- function j(v, m) {
468
- const { componentType: x } = v;
469
- let k = U(x, v, m);
470
- t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(v, k));
471
- const u = x.toLowerCase().replace("-", "_");
472
- return k && !k.id && k.type === x && (k.id = `${u}_${Math.random().toString().slice(2, 6)}`), k;
483
+ function E(S, k) {
484
+ k && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(k);
473
485
  }
474
- function I(v, m) {
475
- const x = String(v.getAttribute("data-controltype")), k = v.getAttribute("data-feature"), u = k ? JSON.parse(k) : {};
476
- u.parentComponentInstance = d.value;
477
- let r = U(x, u);
478
- t && t.onAcceptNewChildElement && (r = t.onAcceptNewChildElement(v, m, r));
479
- const o = x.toLowerCase().replace("-", "_");
480
- return r && !r.id && r.type === x && (r.id = `${o}_${Math.random().toString().slice(2, 6)}`), r;
486
+ function O(S, k) {
487
+ const { componentType: y } = S;
488
+ let x = Y(y, S, k);
489
+ t && t.onResolveNewComponentSchema && (x = t.onResolveNewComponentSchema(S, x));
490
+ const A = y.toLowerCase().replace(/-/g, "_");
491
+ return x && !x.id && x.type === y && (x.id = `${A}_${Math.random().toString().slice(2, 6)}`), x;
481
492
  }
482
- function D(v) {
493
+ function j(S) {
483
494
  }
484
- function A(...v) {
495
+ function _(...S) {
485
496
  if (t && t.getPropsConfig)
486
- return t.getPropsConfig(...v);
497
+ return t.getPropsConfig(...S);
498
+ }
499
+ function D() {
500
+ t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((S) => {
501
+ var x;
502
+ let k = S.id;
503
+ S.type === "component-ref" && (k = S.component);
504
+ const y = o.value.querySelector(`#${k}-design-item`);
505
+ (x = y == null ? void 0 : y.componentInstance) != null && x.value.onRemoveComponent && y.componentInstance.value.onRemoveComponent();
506
+ });
487
507
  }
488
- return d.value = {
489
- canMove: P(),
490
- canSelectParent: S(),
491
- canDelete: y(),
492
- canNested: !T(),
508
+ return u.value = {
509
+ canMove: d(),
510
+ canSelectParent: g(),
511
+ canDelete: w(),
512
+ canNested: !h(),
493
513
  contents: e == null ? void 0 : e.schema.contents,
494
- elementRef: n,
495
- parent: ($ = e == null ? void 0 : e.parent) == null ? void 0 : $.componentInstance,
514
+ elementRef: o,
515
+ parent: (I = e == null ? void 0 : e.parent) == null ? void 0 : I.componentInstance,
496
516
  schema: e == null ? void 0 : e.schema,
497
- styles: c,
498
- designerClass: g,
499
- canAccepts: f,
500
- getBelongedComponentInstance: p,
501
- getDraggableDesignItemElement: i,
502
- getDraggingDisplayText: l,
503
- getPropConfig: A,
504
- getDragScopeElement: C,
505
- onAcceptMovedChildElement: w,
506
- onAcceptNewChildElement: I,
507
- onChildElementMovedOut: D,
508
- addNewChildComponentSchema: j,
509
- updateDragAndDropRules: s,
517
+ styles: s,
518
+ designerClass: i,
519
+ canAccepts: l,
520
+ getBelongedComponentInstance: b,
521
+ getDraggableDesignItemElement: c,
522
+ getDraggingDisplayText: f,
523
+ getPropConfig: _,
524
+ getDragScopeElement: v,
525
+ onAcceptMovedChildElement: E,
526
+ onChildElementMovedOut: j,
527
+ addNewChildComponentSchema: O,
510
528
  triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
511
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
512
- }, d;
529
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1),
530
+ onRemoveComponent: D
531
+ }, u;
513
532
  }
514
- class ee {
533
+ class te {
515
534
  constructor(e, t) {
516
- O(this, "componentId");
517
- O(this, "viewModelId");
518
- O(this, "eventsEditorUtils");
519
- O(this, "formSchemaUtils");
520
- O(this, "formMetadataConverter");
521
- O(this, "designViewModelUtils");
522
- O(this, "designViewModelField");
523
- O(this, "controlCreatorUtils");
524
- O(this, "designerHostService");
525
- O(this, "schemaService", null);
526
- O(this, "metadataService", null);
527
- O(this, "propertyConfig", {
535
+ R(this, "componentId");
536
+ R(this, "viewModelId");
537
+ R(this, "eventsEditorUtils");
538
+ R(this, "formSchemaUtils");
539
+ R(this, "formMetadataConverter");
540
+ R(this, "designViewModelUtils");
541
+ R(this, "designViewModelField");
542
+ R(this, "controlCreatorUtils");
543
+ R(this, "designerHostService");
544
+ R(this, "schemaService", null);
545
+ R(this, "metadataService", null);
546
+ R(this, "propertyConfig", {
528
547
  type: "object",
529
548
  categories: {}
530
549
  });
@@ -536,13 +555,14 @@ class ee {
536
555
  return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
537
556
  }
538
557
  setDesignViewModelField(e) {
558
+ var s;
539
559
  const t = e.binding && e.binding.type === "Form" && e.binding.field;
540
560
  if (t) {
541
561
  if (!this.designViewModelField) {
542
- const s = this.designViewModelUtils.getDgViewModel(this.viewModelId);
543
- this.designViewModelField = s.fields.find((c) => c.id === t);
562
+ const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
563
+ this.designViewModelField = i.fields.find((u) => u.id === t);
544
564
  }
545
- e.updateOn = this.designViewModelField.updateOn;
565
+ e.updateOn = (s = this.designViewModelField) == null ? void 0 : s.updateOn;
546
566
  }
547
567
  }
548
568
  changeFieldEditorType(e, t) {
@@ -566,7 +586,7 @@ class ee {
566
586
  type: "combo-list",
567
587
  textField: "name",
568
588
  valueField: "value",
569
- data: [{ value: e.type, name: K[e.type].name }]
589
+ data: [{ value: e.type, name: ee[e.type].name }]
570
590
  }
571
591
  }
572
592
  }
@@ -602,11 +622,11 @@ class ee {
602
622
  const s = t && t.parent && t.parent.schema;
603
623
  if (!s)
604
624
  return;
605
- const c = s.contents.findIndex((d) => d.id === e), g = we(s.contents[c]);
606
- s.contents.splice(c, 1), s.contents.splice(c, 0, g);
625
+ const i = s.contents.findIndex((d) => d.id === e), u = ye(s.contents[i]);
626
+ s.contents.splice(i, 1), s.contents.splice(i, 0, u);
607
627
  }
608
628
  }
609
- class lt extends ee {
629
+ class rt extends te {
610
630
  constructor(e, t) {
611
631
  super(e, t);
612
632
  }
@@ -632,7 +652,7 @@ class lt extends ee {
632
652
  type: "combo-list",
633
653
  textField: "value",
634
654
  valueField: "key",
635
- data: [{ key: "page-header", value: K["page-header"].name }]
655
+ data: [{ key: "page-header", value: ee["page-header"].name }]
636
656
  }
637
657
  },
638
658
  icon: {
@@ -663,12 +683,7 @@ class lt extends ee {
663
683
  description: "Appearance",
664
684
  properties: {
665
685
  class: {
666
- title: "class",
667
- type: "string",
668
- description: ""
669
- },
670
- style: {
671
- title: "style",
686
+ title: "class样式",
672
687
  type: "string",
673
688
  description: ""
674
689
  }
@@ -681,7 +696,7 @@ class lt extends ee {
681
696
  label: "click",
682
697
  name: "点击事件"
683
698
  }
684
- ], s = this, c = s.eventsEditorUtils.formProperties(e, s.viewModelId, t);
699
+ ], s = this, i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t);
685
700
  this.propertyConfig.categories.eventsEditor = {
686
701
  title: "事件",
687
702
  hideTitle: !0,
@@ -689,7 +704,7 @@ class lt extends ee {
689
704
  "data-grid-component-viewmodel": {
690
705
  type: "events-editor",
691
706
  editor: {
692
- initialData: c
707
+ initialData: i
693
708
  }
694
709
  }
695
710
  },
@@ -697,65 +712,65 @@ class lt extends ee {
697
712
  refreshPanelAfterChanged: !0,
698
713
  tabId: "commands",
699
714
  tabName: "交互",
700
- setPropertyRelates(g, d) {
701
- const P = g.propertyValue;
702
- delete e[s.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, P.events, P));
715
+ setPropertyRelates(u, d) {
716
+ const g = u.propertyValue;
717
+ delete e[s.viewModelId], g && (g.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, g.events, g));
703
718
  }
704
719
  };
705
720
  }
706
721
  }
707
- function pt(n, e) {
708
- function t(P) {
722
+ function it(o, e) {
723
+ function t(g) {
709
724
  return !1;
710
725
  }
711
726
  function s() {
712
727
  return !1;
713
728
  }
714
- function c() {
729
+ function i() {
715
730
  return !1;
716
731
  }
717
- function g() {
732
+ function u() {
718
733
  return !0;
719
734
  }
720
- function d(P) {
721
- return new lt(P, e).getPropertyConfig(n);
735
+ function d(g) {
736
+ return new rt(g, e).getPropertyConfig(o);
722
737
  }
723
738
  return {
724
739
  canAccepts: t,
725
- hideNestedPaddingInDesginerView: g,
740
+ hideNestedPaddingInDesginerView: u,
726
741
  getPropsConfig: d,
727
742
  checkCanDeleteComponent: s,
728
- checkCanMoveComponent: c
743
+ checkCanMoveComponent: i
729
744
  };
730
745
  }
731
- class je {
746
+ class Se {
732
747
  constructor(e) {
733
748
  /** 工具栏项标识 */
734
- O(this, "id", "");
749
+ R(this, "id", "");
735
750
  /** 工具栏项自定义样式 */
736
- O(this, "class", "btn-secondary");
751
+ R(this, "class", "btn-secondary");
737
752
  /** 图标 */
738
- O(this, "icon", "");
753
+ R(this, "icon", "");
739
754
  /** 所属分组 */
740
- O(this, "groupId", "");
755
+ R(this, "groupId", "");
741
756
  /** 收藏顺序 */
742
- O(this, "order", -1);
757
+ R(this, "order", -1);
743
758
  /** 是否作为下拉菜单的顶层按钮 */
744
- O(this, "asDropDownTop", !1);
759
+ R(this, "asDropDownTop", !1);
745
760
  /** 文本 */
746
- O(this, "text", "");
761
+ R(this, "text", "");
747
762
  /** 是否可见 */
748
- O(this, "visible", !0);
749
- O(this, "responsed", !1);
763
+ R(this, "visible", !0);
764
+ R(this, "responsed", !1);
750
765
  /** 是否启用提示消息 */
751
- O(this, "tipsEnable", !1);
766
+ R(this, "tipsEnable", !1);
752
767
  /** 提示消息内容 */
753
- O(this, "tipsText", "");
768
+ R(this, "tipsText", "");
754
769
  /** 记录宽度 */
755
- O(this, "width", 0);
756
- O(this, "onClick", () => {
770
+ R(this, "width", 0);
771
+ R(this, "onClick", () => {
757
772
  });
758
- O(this, "options");
773
+ R(this, "options");
759
774
  this.options = e;
760
775
  const t = [
761
776
  "id",
@@ -779,7 +794,7 @@ class je {
779
794
  }
780
795
  /** 是否可用 */
781
796
  get enable() {
782
- return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : F(() => !0);
797
+ return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : F(() => !0);
783
798
  }
784
799
  /** 设置宽度 */
785
800
  setWidth(e) {
@@ -790,51 +805,52 @@ class je {
790
805
  return this.visible ? this.width : !1;
791
806
  }
792
807
  }
793
- class ut extends je {
808
+ class at extends Se {
794
809
  constructor(e) {
795
810
  super(e);
796
811
  }
797
812
  }
798
- function xe() {
799
- function n(e) {
813
+ function Te() {
814
+ function o(e) {
800
815
  const t = [];
801
- return e.reduce((s, c) => (c.children && c.children.length > 0 ? s.push(new J(c)) : s.push(new ut(c)), s), t), t;
816
+ return e.reduce((s, i) => (i.children && i.children.length > 0 ? s.push(new Q(i)) : s.push(new at(i)), s), t), t;
802
817
  }
803
- return { buildResponseToolbarItems: n };
818
+ return { buildResponseToolbarItems: o };
804
819
  }
805
- const { buildResponseToolbarItems: dt } = xe();
806
- class J extends je {
820
+ const { buildResponseToolbarItems: ct } = Te();
821
+ class Q extends Se {
807
822
  constructor(t) {
808
823
  super(t);
809
- O(this, "placement", "");
824
+ R(this, "placement", "");
810
825
  // 下拉位置
811
826
  /** 下拉class */
812
- O(this, "dropdownClass", "");
827
+ R(this, "dropdownClass", "");
813
828
  /** 下拉菜单class */
814
- O(this, "menuClass", "");
829
+ R(this, "menuClass", "");
815
830
  /** 是否用分开的下拉按钮 */
816
- O(this, "split", !1);
817
- O(this, "children", []);
818
- O(this, "expanded", !1);
831
+ R(this, "split", !1);
832
+ R(this, "children", []);
833
+ R(this, "expanded", !1);
819
834
  const s = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
820
- Object.keys(t).filter((c) => s.indexOf(c) > -1).forEach((c) => {
821
- this[c] = t[c];
822
- }), t.children && t.children.length && (this.children = dt(t.children));
835
+ Object.keys(t).filter((i) => s.indexOf(i) > -1).forEach((i) => {
836
+ this[i] = t[i];
837
+ }), t.children && t.children.length && (this.children = ct(t.children));
823
838
  }
824
839
  }
825
- const ft = /* @__PURE__ */ new Map([
840
+ const lt = /* @__PURE__ */ new Map([
826
841
  ["buttons", "items"],
827
- ["appearance", Se]
828
- ]), gt = /* @__PURE__ */ new Map([
829
- ["appearance", mt]
842
+ ["appearance", Pe]
830
843
  ]);
831
- function mt(n, e) {
844
+ function dt(o, e) {
832
845
  return { class: e.class, style: e.style };
833
846
  }
834
- function Ee(n, e, t) {
847
+ const ut = /* @__PURE__ */ new Map([
848
+ ["appearance", dt]
849
+ ]);
850
+ function De(o, e, t) {
835
851
  return e;
836
852
  }
837
- const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-design.gitee.io/response-toolbar.schema.json", yt = "response-toolbar", vt = "A Farris Toolbar Component", Ct = "object", wt = {
853
+ const pt = "https://json-schema.org/draft/2020-12/schema", ft = "https://farris-design.gitee.io/response-toolbar.schema.json", mt = "response-toolbar", gt = "A Farris Toolbar Component", ht = "object", bt = {
838
854
  id: {
839
855
  description: "The unique identifier for a Response Toolbar",
840
856
  type: "string"
@@ -849,13 +865,10 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
849
865
  type: "object",
850
866
  properties: {
851
867
  class: {
852
- type: "string"
853
- },
854
- style: {
855
- type: "string"
868
+ type: "string",
869
+ default: ""
856
870
  }
857
- },
858
- default: {}
871
+ }
859
872
  },
860
873
  alignment: {
861
874
  description: "The alignment of Response Toolbar Button.",
@@ -867,19 +880,19 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
867
880
  type: "array",
868
881
  default: []
869
882
  }
870
- }, Pt = [
883
+ }, yt = [
871
884
  "id",
872
885
  "type",
873
886
  "buttons"
874
- ], Tt = {
875
- $schema: ht,
876
- $id: bt,
877
- title: yt,
878
- description: vt,
879
- type: Ct,
880
- properties: wt,
881
- required: Pt
882
- }, Dt = "https://json-schema.org/draft/2020-12/schema", St = "https://farris-design.gitee.io/response-toolbar-item.schema.json", jt = "response-toolbar-item", xt = "A Farris Toolbar Item Component", Et = "object", Mt = {
887
+ ], vt = {
888
+ $schema: pt,
889
+ $id: ft,
890
+ title: mt,
891
+ description: gt,
892
+ type: ht,
893
+ properties: bt,
894
+ required: yt
895
+ }, Ct = "https://json-schema.org/draft/2020-12/schema", wt = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Pt = "response-toolbar-item", St = "A Farris Toolbar Item Component", Tt = "object", Dt = {
883
896
  id: {
884
897
  description: "The unique identifier for a Response Toolbar",
885
898
  type: "string"
@@ -895,13 +908,9 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
895
908
  properties: {
896
909
  class: {
897
910
  type: "string",
898
- default: "btn-primary"
899
- },
900
- style: {
901
- type: "string"
911
+ default: "btn-secondary"
902
912
  }
903
- },
904
- default: {}
913
+ }
905
914
  },
906
915
  alignment: {
907
916
  description: "对齐",
@@ -911,69 +920,36 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
911
920
  text: {
912
921
  description: "文本",
913
922
  type: "string",
914
- default: "新增"
923
+ default: "按钮"
915
924
  },
916
925
  icon: {
917
926
  description: "图标",
918
927
  type: "string",
919
928
  default: ""
920
929
  },
930
+ disabled: {
931
+ description: "禁用",
932
+ type: "boolean",
933
+ default: !1
934
+ },
921
935
  onClick: {
922
936
  description: "点击事件",
923
937
  type: "string",
924
938
  default: ""
925
939
  }
926
- }, kt = [
940
+ }, Mt = [
927
941
  "id",
928
942
  "type",
929
943
  "text"
930
- ], se = {
931
- $schema: Dt,
932
- $id: St,
933
- title: jt,
934
- description: xt,
935
- type: Et,
936
- properties: Mt,
937
- required: kt
938
- }, At = "response-toolbar-item", Bt = "A Farris Container Component", Rt = "object", It = {
939
- basic: {
940
- title: "基本信息",
941
- description: "Basic Infomation",
942
- properties: {
943
- id: {
944
- title: "标识",
945
- type: "string",
946
- description: "The identifier of a component.",
947
- readonly: !0
948
- },
949
- type: {
950
- title: "类型",
951
- type: "enum",
952
- description: "The type of a component.",
953
- editor: {
954
- type: "combo-list",
955
- data: []
956
- }
957
- },
958
- text: {
959
- title: "文本",
960
- type: "string",
961
- description: "",
962
- refreshPanelAfterChanged: !0
963
- },
964
- icon: {
965
- title: "图标",
966
- type: "string",
967
- description: ""
968
- }
969
- }
970
- }
971
- }, he = {
972
- title: At,
973
- description: Bt,
974
- type: Rt,
975
- categories: It
976
- }, ue = {
944
+ ], kt = {
945
+ $schema: Ct,
946
+ $id: wt,
947
+ title: Pt,
948
+ description: St,
949
+ type: Tt,
950
+ properties: Dt,
951
+ required: Mt
952
+ }, ce = {
977
953
  /** 组件自定义样式 */
978
954
  customClass: { type: String, default: "" },
979
955
  alignment: { Type: String, default: "right" },
@@ -981,16 +957,13 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
981
957
  Type: Array,
982
958
  default: []
983
959
  }
984
- };
985
- ae[se.title] = se;
986
- De[he.title] = he;
987
- const Ot = Object.assign({}, ue, {
960
+ }, Et = Object.assign({}, ce, {
988
961
  componentId: { type: String, default: "" }
989
- }), de = le(
990
- ue,
991
- Tt,
992
- ft,
993
- Ee
962
+ }), le = ie(
963
+ ce,
964
+ vt,
965
+ lt,
966
+ De
994
967
  ), Me = {
995
968
  id: { type: String, default: "" },
996
969
  items: { type: Object, default: {} },
@@ -1000,210 +973,210 @@ const Ot = Object.assign({}, ue, {
1000
973
  icon: { type: String, default: "" },
1001
974
  componentId: { type: String, default: "" },
1002
975
  alignment: { Type: String, default: "right" }
1003
- }, $t = le(
976
+ }, xt = ie(
1004
977
  Me,
1005
- se,
1006
- gt,
1007
- Ee
978
+ kt,
979
+ ut,
980
+ De
1008
981
  );
1009
982
  function ke() {
1010
- function n(t) {
983
+ function o(t) {
1011
984
  const s = {
1012
985
  "f-icon": !0
1013
986
  };
1014
987
  if (t.icon) {
1015
- const c = t.icon.trim().split(" ");
1016
- c && c.length && c.reduce((g, d) => (g[d] = !0, g), s);
988
+ const i = t.icon.trim().split(" ");
989
+ i && i.length && i.reduce((u, d) => (u[d] = !0, u), s);
1017
990
  }
1018
991
  return s;
1019
992
  }
1020
993
  function e(t) {
1021
994
  return !!(t.icon && t.icon.trim());
1022
995
  }
1023
- return { iconClass: n, shouldShowIcon: e };
996
+ return { iconClass: o, shouldShowIcon: e };
1024
997
  }
1025
- function Nt(n) {
1026
- function e(p) {
1027
- const i = {
998
+ function Bt(o) {
999
+ function e(c) {
1000
+ const l = {
1028
1001
  "dropdown-menu": !0
1029
1002
  };
1030
- if (p.class) {
1031
- const f = p.menuClass.split(" ");
1032
- f && f.length && f.reduce((l, C) => (l[C] = !0, l), i);
1003
+ if (c.class) {
1004
+ const f = c.menuClass.split(" ");
1005
+ f && f.length && f.reduce((v, E) => (v[E] = !0, v), l);
1033
1006
  }
1034
- return i;
1007
+ return l;
1035
1008
  }
1036
- function t(p) {
1037
- const i = {
1038
- disabled: !p.enable,
1009
+ function t(c) {
1010
+ const l = {
1011
+ disabled: !c.enable,
1039
1012
  "dropdown-submenu": !0,
1040
1013
  "f-rt-dropdown": !0
1041
- }, f = p.dropdownClass.split(" ");
1042
- return f && f.length && f.reduce((l, C) => (l[C] = !0, l), i), i;
1014
+ }, f = c.dropdownClass.split(" ");
1015
+ return f && f.length && f.reduce((v, E) => (v[E] = !0, v), l), l;
1043
1016
  }
1044
- function s(p) {
1045
- const i = {
1046
- disabled: !p.enable,
1017
+ function s(c) {
1018
+ const l = {
1019
+ disabled: !c.enable,
1047
1020
  "dropdown-item": !0,
1048
1021
  "f-rt-btn": !0
1049
- }, f = p.class.split(" ");
1050
- return f && f.length && f.reduce((l, C) => (l[C] = !0, l), i), i;
1051
- }
1052
- let c;
1053
- const g = /* @__PURE__ */ new Map();
1054
- function d(p, i, f) {
1055
- var C;
1056
- ((C = p.target) == null ? void 0 : C.id) === i.id && p.stopPropagation();
1057
- const l = f ? f.id : "__top_item__";
1058
- if (i.children && i.children.length && (i.expanded = !i.expanded, i.expanded ? g.set(l, i) : g.delete(l)), g.has(l) && g.get(l) !== i) {
1059
- const w = g.get(l);
1060
- w && (w.expanded = !1);
1022
+ }, f = c.class.split(" ");
1023
+ return f && f.length && f.reduce((v, E) => (v[E] = !0, v), l), l;
1024
+ }
1025
+ let i;
1026
+ const u = /* @__PURE__ */ new Map();
1027
+ function d(c, l, f) {
1028
+ var E;
1029
+ ((E = c.target) == null ? void 0 : E.id) === l.id && c.stopPropagation();
1030
+ const v = f ? f.id : "__top_item__";
1031
+ if (l.children && l.children.length && (l.expanded = !l.expanded, l.expanded ? u.set(v, l) : u.delete(v)), u.has(v) && u.get(v) !== l) {
1032
+ const O = u.get(v);
1033
+ O && (O.expanded = !1);
1061
1034
  }
1062
1035
  }
1063
- function P(p, i) {
1064
- document.body.click(), i.enable && i.onClick(p, i.id);
1065
- }
1066
- function S(p) {
1067
- return p.children.map((i) => i.children && i.children.length ? b("li", {
1068
- class: t(i),
1069
- id: i.id,
1070
- onClick: (f) => i.enable && d(f, i, p)
1071
- }, [b("span", {
1072
- id: i.id,
1073
- class: s(i),
1074
- onMouseover: (f) => i.enable && d(f, i, p)
1075
- }, [i.text, b("i", {
1036
+ function g(c, l) {
1037
+ document.body.click(), l.enable && l.onClick(c, l.id);
1038
+ }
1039
+ function w(c) {
1040
+ return c.children.map((l) => l.children && l.children.length ? m("li", {
1041
+ class: t(l),
1042
+ id: l.id,
1043
+ onClick: (f) => l.enable && d(f, l, c)
1044
+ }, [m("span", {
1045
+ id: l.id,
1046
+ class: s(l),
1047
+ onMouseover: (f) => l.enable && d(f, l, c)
1048
+ }, [l.text, m("i", {
1076
1049
  class: "f-icon f-icon-arrow-chevron-right",
1077
1050
  style: "display: inline-block;float: right;line-height: 1.25rem;"
1078
- }, null)]), c(i, i)]) : b("li", {
1079
- class: s(i),
1080
- id: i.id,
1081
- onClick: (f) => P(f, i),
1082
- onMouseover: (f) => i.enable && d(f, i, p)
1083
- }, [n.shouldShowIcon(i) && b("i", {
1084
- class: n.iconClass(i)
1085
- }, null), i.text]));
1086
- }
1087
- function y(p, i, f) {
1088
- const l = {
1089
- display: p.expanded ? "block" : "none",
1051
+ }, null)]), i(l, l)]) : m("li", {
1052
+ class: s(l),
1053
+ id: l.id,
1054
+ onClick: (f) => g(f, l),
1055
+ onMouseover: (f) => l.enable && d(f, l, c)
1056
+ }, [o.shouldShowIcon(l) && m("i", {
1057
+ class: o.iconClass(l)
1058
+ }, null), l.text]));
1059
+ }
1060
+ function h(c, l, f) {
1061
+ const v = {
1062
+ display: c.expanded ? "block" : "none",
1090
1063
  position: "fixed",
1091
1064
  maxWidth: "300px",
1092
1065
  width: "auto",
1093
1066
  minWidth: "120px"
1094
- }, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w = i, j = w == null ? void 0 : w.getClientRects();
1095
- if (w && j && j.length) {
1067
+ }, E = document.getElementsByTagName("body")[0].getClientRects()[0].width, O = l, j = O == null ? void 0 : O.getClientRects();
1068
+ if (O && j && j.length) {
1096
1069
  const {
1097
- top: I,
1070
+ top: _,
1098
1071
  width: D,
1099
- left: A,
1100
- right: $,
1101
- height: v
1102
- } = j[0], m = Math.ceil(v + I);
1103
- l.top = `${m}px`, l.left = `${A}px`;
1104
- const x = p.id + "_menu", k = i ? i.querySelector("#" + x) : null;
1105
- if (k) {
1106
- l.display === "block" && (k.style.display = "block");
1107
- const u = k.getBoundingClientRect();
1072
+ left: I,
1073
+ right: S,
1074
+ height: k
1075
+ } = j[0], y = Math.ceil(k + _);
1076
+ v.top = `${y}px`, v.left = `${I}px`;
1077
+ const x = c.id + "_menu", A = l ? l.querySelector("#" + x) : null;
1078
+ if (A) {
1079
+ v.display === "block" && (A.style.display = "block");
1080
+ const C = A.getBoundingClientRect();
1108
1081
  if (f) {
1109
- l.top = `${I - 6}px`;
1110
- const r = Math.ceil(D + A);
1111
- l.left = `${r}px`;
1082
+ v.top = `${_ - 6}px`;
1083
+ const r = Math.ceil(D + I);
1084
+ v.left = `${r}px`;
1112
1085
  }
1113
- C - A - D < u.width && (l.left = `${(f ? A : $) - u.width}px`);
1086
+ E - I - D < C.width && (v.left = `${(f ? I : S) - C.width}px`);
1114
1087
  }
1115
1088
  }
1116
- return l;
1117
- }
1118
- c = function(p, i) {
1119
- var w, j;
1120
- const f = Ce(), l = i ? i.id : p.id, C = (j = (w = f == null ? void 0 : f.exposed) == null ? void 0 : w.elementRef.value) == null ? void 0 : j.querySelector("#" + l);
1121
- return b("ul", {
1122
- class: e(p),
1123
- style: y(p, C, i),
1124
- id: p.id + "_menu"
1125
- }, [S(p)]);
1089
+ return v;
1090
+ }
1091
+ i = function(c, l) {
1092
+ var O, j;
1093
+ const f = he(), v = l ? l.id : c.id, E = (j = (O = f == null ? void 0 : f.exposed) == null ? void 0 : O.elementRef.value) == null ? void 0 : j.querySelector("#" + v);
1094
+ return m("ul", {
1095
+ class: e(c),
1096
+ style: h(c, E, l),
1097
+ id: c.id + "_menu"
1098
+ }, [w(c)]);
1126
1099
  };
1127
- function T() {
1128
- g.forEach((p) => {
1129
- p.expanded = !1;
1130
- }), g.clear();
1100
+ function b() {
1101
+ u.forEach((c) => {
1102
+ c.expanded = !1;
1103
+ }), u.clear();
1131
1104
  }
1132
1105
  return {
1133
- renderDropdownMenu: c,
1134
- clearAllDropDownMenu: T
1106
+ renderDropdownMenu: i,
1107
+ clearAllDropDownMenu: b
1135
1108
  };
1136
1109
  }
1137
- function _t(n, e) {
1138
- const t = M(n.alignment), {
1110
+ function Rt(o, e) {
1111
+ const t = M(o.alignment), {
1139
1112
  renderDropdownMenu: s,
1140
- clearAllDropDownMenu: c
1141
- } = Nt(e);
1142
- function g(T) {
1143
- const p = {
1113
+ clearAllDropDownMenu: i
1114
+ } = Bt(e);
1115
+ function u(b) {
1116
+ const c = {
1144
1117
  "btn-group": !0,
1145
1118
  "f-rt-dropdown": !0,
1146
1119
  "f-btn-ml": t.value === "right",
1147
1120
  "f-btn-mr": t.value === "left"
1148
- }, i = T.dropdownClass.split(" ");
1149
- return i && i.length && i.reduce((f, l) => (f[l] = !0, f), p), p;
1121
+ }, l = b.dropdownClass.split(" ");
1122
+ return l && l.length && l.reduce((f, v) => (f[v] = !0, f), c), c;
1150
1123
  }
1151
- function d(T) {
1152
- const p = {
1124
+ function d(b) {
1125
+ const c = {
1153
1126
  btn: !0,
1154
- disabled: !T.enable,
1127
+ disabled: !b.enable,
1155
1128
  "f-rt-btn": !0,
1156
- "btn-icontext": !!(T.icon && T.icon.trim())
1129
+ "btn-icontext": !!(b.icon && b.icon.trim())
1157
1130
  };
1158
- if (T.class) {
1159
- const i = T.class.split(" ");
1160
- i && i.length && i.reduce((f, l) => (f[l] = !0, f), p);
1131
+ if (b.class) {
1132
+ const l = b.class.split(" ");
1133
+ l && l.length && l.reduce((f, v) => (f[v] = !0, f), c);
1161
1134
  }
1162
- return p;
1135
+ return c;
1163
1136
  }
1164
- function P(T, p) {
1165
- T.stopPropagation();
1166
- const i = p.expanded;
1167
- document.body.click(), p.expanded = !i;
1168
- }
1169
- function S(T) {
1170
- return b("div", {
1171
- id: T.id,
1172
- class: g(T)
1173
- }, [b("div", {
1174
- class: d(T),
1137
+ function g(b, c) {
1138
+ b.stopPropagation();
1139
+ const l = c.expanded;
1140
+ document.body.click(), c.expanded = !l;
1141
+ }
1142
+ function w(b) {
1143
+ return m("div", {
1144
+ id: b.id,
1145
+ class: u(b)
1146
+ }, [m("div", {
1147
+ class: d(b),
1175
1148
  style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
1176
- onClick: (p) => T.enable && P(p, T)
1177
- }, [e.shouldShowIcon(T) && b("i", {
1178
- class: e.iconClass(T)
1179
- }, null), b("span", null, [T.text]), b("i", {
1149
+ onClick: (c) => b.enable && g(c, b)
1150
+ }, [e.shouldShowIcon(b) && m("i", {
1151
+ class: e.iconClass(b)
1152
+ }, null), m("span", null, [b.text]), m("i", {
1180
1153
  class: "f-icon f-icon-arrow-chevron-down",
1181
1154
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
1182
- }, null)]), s(T)]);
1155
+ }, null)]), s(b)]);
1183
1156
  }
1184
- function y() {
1185
- c();
1157
+ function h() {
1158
+ i();
1186
1159
  }
1187
1160
  return {
1188
- renderToolbarDropdown: S,
1189
- clearAllDropDown: y
1161
+ renderToolbarDropdown: w,
1162
+ clearAllDropDown: h
1190
1163
  };
1191
1164
  }
1192
1165
  const {
1193
- buildResponseToolbarItems: be
1194
- } = xe(), Z = /* @__PURE__ */ z({
1166
+ buildResponseToolbarItems: fe
1167
+ } = Te(), K = /* @__PURE__ */ W({
1195
1168
  name: "FResponseToolbar",
1196
- props: ue,
1169
+ props: ce,
1197
1170
  emits: ["click"],
1198
- setup(n, e) {
1199
- const t = M(be(n.items)), s = M(), c = M(), g = M(), d = M(n.alignment), P = {
1171
+ setup(o, e) {
1172
+ const t = M(fe(o.items)), s = M(), i = M(), u = M(), d = M(o.alignment), g = {
1200
1173
  id: "__more_buttons__",
1201
1174
  text: "更多"
1202
- }, S = M(new J(P)), y = ke(), T = F(() => S.value.children.length > 0), p = F(() => Y({
1175
+ }, w = M(new Q(g)), h = ke(), b = F(() => w.value.children.length > 0), c = F(() => Z({
1203
1176
  "f-toolbar": !0,
1204
1177
  "f-response-toolbar": !0,
1205
1178
  "position-relative": !0
1206
- }, n.customClass)), i = F(() => ({
1179
+ }, o.customClass)), l = F(() => ({
1207
1180
  "w-100": !0,
1208
1181
  "d-flex": !0,
1209
1182
  "flex-nowrap": !0,
@@ -1211,195 +1184,195 @@ const {
1211
1184
  "justify-content-start": d.value === "left"
1212
1185
  })), {
1213
1186
  renderToolbarDropdown: f,
1214
- clearAllDropDown: l
1215
- } = _t(n, y);
1216
- function C() {
1217
- t.value.filter((m) => m.children && m.children.length > 0).forEach((m) => {
1218
- m.expanded = !1;
1219
- }), S.value.expanded = !1, l();
1187
+ clearAllDropDown: v
1188
+ } = Rt(o, h);
1189
+ function E() {
1190
+ t.value.filter((y) => y.children && y.children.length > 0).forEach((y) => {
1191
+ y.expanded = !1;
1192
+ }), w.value.expanded = !1, v();
1220
1193
  }
1221
- function w(m) {
1194
+ function O(y) {
1222
1195
  const x = {
1223
1196
  btn: !0,
1224
1197
  "f-rt-btn": !0,
1225
1198
  "f-btn-ml": d.value === "right",
1226
1199
  "f-btn-mr": d.value === "left",
1227
- "btn-icontext": !!(m.icon && m.icon.trim())
1200
+ "btn-icontext": !!(y.icon && y.icon.trim())
1228
1201
  };
1229
- if (m.class) {
1230
- const k = m.class.split(" ");
1231
- k && k.length && k.reduce((u, r) => (u[r] = !0, u), x);
1202
+ if (y.class) {
1203
+ const A = y.class.split(" ");
1204
+ A && A.length && A.reduce((C, r) => (C[r] = !0, C), x);
1232
1205
  }
1233
1206
  return x;
1234
1207
  }
1235
- function j(m, x) {
1236
- document.body.click(), typeof x.onClick == "function" && x.onClick(m, x.id), e.emit("click", m, x.id);
1208
+ function j(y, x) {
1209
+ document.body.click(), typeof x.onClick == "function" && x.onClick(y, x.id), e.emit("click", y, x.id);
1237
1210
  }
1238
- function I(m) {
1239
- return b("button", {
1211
+ function _(y) {
1212
+ return m("button", {
1240
1213
  type: "button",
1241
- class: w(m),
1242
- id: m.id,
1243
- disabled: !m.enable,
1244
- onClick: (x) => j(x, m)
1245
- }, [y.shouldShowIcon(m) && b("i", {
1246
- class: y.iconClass(m)
1247
- }, null), m.text]);
1214
+ class: O(y),
1215
+ id: y.id,
1216
+ disabled: !y.enable,
1217
+ onClick: (x) => j(x, y)
1218
+ }, [h.shouldShowIcon(y) && m("i", {
1219
+ class: h.iconClass(y)
1220
+ }, null), y.text]);
1248
1221
  }
1249
- const D = /* @__PURE__ */ new Map(), A = [];
1250
- function $(m) {
1251
- const x = g.value;
1252
- let k = m;
1253
- const u = Array.from(x.children), r = u[u.length - 1].id === "__more_buttons__" ? u[u.length - 1] : null;
1222
+ const D = /* @__PURE__ */ new Map(), I = [];
1223
+ function S(y) {
1224
+ const x = u.value;
1225
+ let A = y;
1226
+ const C = Array.from(x.children), r = C[C.length - 1].id === "__more_buttons__" ? C[C.length - 1] : null;
1254
1227
  if (r) {
1255
- const E = r.computedStyleMap().get("margin-left"), R = r.computedStyleMap().get("margin-right"), L = (E ? E.value : 0) + r.getBoundingClientRect().width + (R ? R.value : 0);
1256
- k -= L;
1228
+ const P = r.computedStyleMap().get("margin-left"), B = r.computedStyleMap().get("margin-right"), N = (P ? P.value : 0) + r.getBoundingClientRect().width + (B ? B.value : 0);
1229
+ A -= N;
1257
1230
  }
1258
- const o = u.filter((E) => E.id !== "__more_buttons__");
1259
- for (const E of o) {
1260
- const R = E.computedStyleMap().get("margin-left"), L = E.computedStyleMap().get("margin-right"), N = (R ? R.value : 0) + E.getBoundingClientRect().width + (L ? L.value : 0);
1261
- k < N ? (D.set(E.id, !0), A.push({
1262
- id: E.id,
1263
- width: N
1264
- })) : k -= N;
1231
+ const n = C.filter((P) => P.id !== "__more_buttons__");
1232
+ for (const P of n) {
1233
+ const B = P.computedStyleMap().get("margin-left"), N = P.computedStyleMap().get("margin-right"), U = (B ? B.value : 0) + P.getBoundingClientRect().width + (N ? N.value : 0);
1234
+ A < U ? (D.set(P.id, !0), I.push({
1235
+ id: P.id,
1236
+ width: U
1237
+ })) : A -= U;
1265
1238
  }
1266
- if (A.length)
1267
- for (let E = A.length - 1; E >= 0; E--) {
1268
- const R = A[E].width;
1269
- if (k >= R)
1270
- k -= R, D.delete(A[E].id), A.pop();
1239
+ if (I.length)
1240
+ for (let P = I.length - 1; P >= 0; P--) {
1241
+ const B = I[P].width;
1242
+ if (A >= B)
1243
+ A -= B, D.delete(I[P].id), I.pop();
1271
1244
  else
1272
1245
  break;
1273
1246
  }
1274
- const a = Object.assign({}, S.value);
1247
+ const a = Object.assign({}, w.value);
1275
1248
  a.children = [];
1276
- const h = new J(a), B = t.value.reduce((E, R) => (D.has(R.id) && h.children.push(R), R.visible = !D.has(R.id), E.push(R), E), []);
1277
- S.value = h, t.value = B;
1249
+ const p = new Q(a), T = t.value.reduce((P, B) => (D.has(B.id) && p.children.push(B), B.visible = !D.has(B.id), P.push(B), P), []);
1250
+ w.value = p, t.value = T;
1278
1251
  }
1279
- const v = new ResizeObserver((m) => {
1280
- if (m.length) {
1281
- const k = m[0].contentRect.width, r = g.value.getBoundingClientRect().width;
1282
- (k < r || A.length) && ($(k), C());
1252
+ const k = new ResizeObserver((y) => {
1253
+ if (y.length) {
1254
+ const A = y[0].contentRect.width, r = u.value.getBoundingClientRect().width;
1255
+ (A < r || I.length) && (S(A), E());
1283
1256
  }
1284
1257
  });
1285
- return H(() => {
1286
- const m = c.value;
1287
- v.observe(m), document.body.addEventListener("click", C), document.body.addEventListener("wheel", C);
1288
- }), ie(() => {
1289
- v.disconnect(), document.body.removeEventListener("click", C), document.body.removeEventListener("wheel", C);
1290
- }), G(() => n.items, () => {
1291
- t.value = be(n.items);
1258
+ return G(() => {
1259
+ const y = i.value;
1260
+ k.observe(y), document.body.addEventListener("click", E), document.body.addEventListener("wheel", E);
1261
+ }), be(() => {
1262
+ k.disconnect(), document.body.removeEventListener("click", E), document.body.removeEventListener("wheel", E);
1263
+ }), z(() => o.items, () => {
1264
+ t.value = fe(o.items);
1292
1265
  }, {
1293
1266
  deep: !0
1294
1267
  }), e.expose({
1295
1268
  elementRef: s
1296
- }), () => b("div", {
1297
- class: p.value,
1269
+ }), () => m("div", {
1270
+ class: c.value,
1298
1271
  ref: s
1299
- }, [b("div", {
1300
- ref: c,
1301
- class: i.value
1302
- }, [b("div", {
1303
- ref: g,
1272
+ }, [m("div", {
1273
+ ref: i,
1274
+ class: l.value
1275
+ }, [m("div", {
1276
+ ref: u,
1304
1277
  class: "d-inline-block f-response-content",
1305
1278
  style: "white-space: nowrap;"
1306
- }, [t.value.filter((m) => m.visible).map((m) => m.children && m.children.length > 0 ? f(m) : I(m)), T.value && f(S.value)])])]);
1279
+ }, [t.value.filter((y) => y.visible).map((y) => y.children && y.children.length > 0 ? f(y) : _(y)), b.value && f(w.value)])])]);
1307
1280
  }
1308
1281
  });
1309
- function Ft(n, e) {
1282
+ function It(o, e) {
1310
1283
  const t = V("design-item-context"), s = V("toolbar-item-handler", () => {
1311
1284
  });
1312
- function c() {
1285
+ function i() {
1313
1286
  s && s();
1314
1287
  }
1315
- function g(r) {
1316
- const o = {
1288
+ function u(r) {
1289
+ const n = {
1317
1290
  "dropdown-menu": !0
1318
1291
  };
1319
1292
  if (r.class) {
1320
1293
  const a = r.menuClass.split(" ");
1321
- a && a.length && a.reduce((h, B) => (h[B] = !0, h), o);
1294
+ a && a.length && a.reduce((p, T) => (p[T] = !0, p), n);
1322
1295
  }
1323
- return o;
1296
+ return n;
1324
1297
  }
1325
1298
  function d(r) {
1326
- const o = {
1299
+ const n = {
1327
1300
  disabled: !r.enable,
1328
1301
  "dropdown-submenu": !0,
1329
1302
  "f-rt-dropdown": !0
1330
1303
  }, a = r.dropdownClass.split(" ");
1331
- return a && a.length && a.reduce((h, B) => (h[B] = !0, h), o), o;
1304
+ return a && a.length && a.reduce((p, T) => (p[T] = !0, p), n), n;
1332
1305
  }
1333
- function P(r) {
1334
- const o = {
1306
+ function g(r) {
1307
+ const n = {
1335
1308
  disabled: !r.enable,
1336
1309
  "dropdown-item": !0,
1337
1310
  "f-rt-btn": !0,
1338
1311
  "position-relative": !0,
1339
1312
  "farris-component": !0
1340
1313
  }, a = r.class.split(" ");
1341
- return a && a.length && a.reduce((h, B) => (h[B] = !0, h), o), o;
1342
- }
1343
- let S;
1344
- const y = /* @__PURE__ */ new Map();
1345
- function T(r, o, a) {
1346
- var B;
1347
- ((B = r.target) == null ? void 0 : B.id) === o.id && r.stopPropagation();
1348
- const h = a ? a.id : "__top_item__";
1349
- if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ? y.set(h, o) : y.delete(h)), y.has(h) && y.get(h) !== o) {
1350
- const E = y.get(h);
1351
- E && (E.expanded = !1);
1314
+ return a && a.length && a.reduce((p, T) => (p[T] = !0, p), n), n;
1315
+ }
1316
+ let w;
1317
+ const h = /* @__PURE__ */ new Map();
1318
+ function b(r, n, a) {
1319
+ var T;
1320
+ ((T = r.target) == null ? void 0 : T.id) === n.id && r.stopPropagation();
1321
+ const p = a ? a.id : "__top_item__";
1322
+ if (n.children && n.children.length && (n.expanded = !n.expanded, n.expanded ? h.set(p, n) : h.delete(p)), h.has(p) && h.get(p) !== n) {
1323
+ const P = h.get(p);
1324
+ P && (P.expanded = !1);
1352
1325
  }
1353
1326
  }
1354
- function p(r) {
1327
+ function c(r) {
1355
1328
  r && (r.stopPropagation(), r.preventDefault());
1356
1329
  }
1357
- function i() {
1358
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
1330
+ function l() {
1331
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((n) => n.classList.remove("dgComponentFocused"));
1359
1332
  const r = document.getElementsByClassName("dgComponentSelected");
1360
- Array.from(r).forEach((o) => o.classList.remove("dgComponentSelected"));
1333
+ Array.from(r).forEach((n) => n.classList.remove("dgComponentSelected"));
1361
1334
  }
1362
1335
  function f(r) {
1363
1336
  r.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1364
1337
  }
1365
- function l(r) {
1338
+ function v(r) {
1366
1339
  const {
1367
- buttons: o = []
1340
+ buttons: n = []
1368
1341
  } = t.schema;
1369
1342
  let a = [];
1370
- o.forEach((E) => {
1371
- a = a.concat(E.children || []);
1343
+ n.forEach((P) => {
1344
+ a = a.concat(P.children || []);
1372
1345
  });
1373
- const h = a.findIndex((E) => E.id === r), B = h === -1 ? null : a[h];
1346
+ const p = a.findIndex((P) => P.id === r), T = p === -1 ? null : a[p];
1374
1347
  return {
1375
- index: h,
1376
- item: B
1348
+ index: p,
1349
+ item: T
1377
1350
  };
1378
1351
  }
1379
- function C(r) {
1352
+ function E(r) {
1380
1353
  const {
1381
- buttons: o = []
1382
- } = t.schema, a = o.findIndex((B) => B.id === r), h = a === -1 ? null : o[a];
1354
+ buttons: n = []
1355
+ } = t.schema, a = n.findIndex((T) => T.id === r), p = a === -1 ? null : n[a];
1383
1356
  return {
1384
1357
  index: a,
1385
- item: h
1358
+ item: p
1386
1359
  };
1387
1360
  }
1388
- function w(r) {
1389
- var h;
1361
+ function O(r) {
1362
+ var p;
1390
1363
  t.schema;
1391
1364
  const {
1392
- index: o,
1365
+ index: n,
1393
1366
  item: a
1394
- } = l(r);
1395
- (h = t == null ? void 0 : t.setupContext) == null || h.emit("selectionChange", a == null ? void 0 : a.type, a);
1367
+ } = v(r);
1368
+ (p = t == null ? void 0 : t.setupContext) == null || p.emit("selectionChange", a == null ? void 0 : a.type, a);
1396
1369
  }
1397
1370
  const j = function(r) {
1398
1371
  const {
1399
- componentType: o
1400
- } = r, a = U(o, r), h = o.toLowerCase().replace("-", "_");
1401
- return a && !a.id && a.type === o && (a.id = `${h}_${Math.random().toString().slice(2, 6)}`), a;
1402
- }, I = function() {
1372
+ componentType: n
1373
+ } = r, a = Y(n, r), p = n.toLowerCase().replace("-", "_");
1374
+ return a && !a.id && a.type === n && (a.id = `${p}_${Math.random().toString().slice(2, 6)}`), a;
1375
+ }, _ = function() {
1403
1376
  const r = {
1404
1377
  componentType: "response-toolbar-item",
1405
1378
  parentComponentInstance: e.value,
@@ -1407,1092 +1380,350 @@ function Ft(n, e) {
1407
1380
  };
1408
1381
  return j(r);
1409
1382
  };
1410
- function D(r, o) {
1411
- p(r), i(), f(r), w(o.id);
1383
+ function D(r, n) {
1384
+ c(r), l(), f(r), O(n.id);
1412
1385
  }
1413
- function A(r, o, a) {
1414
- p(r);
1415
- const h = o.id, B = a && a.id, {
1416
- buttons: E = []
1386
+ function I(r, n, a) {
1387
+ c(r);
1388
+ const p = n.id, T = a && a.id, {
1389
+ buttons: P = []
1417
1390
  } = t.schema;
1418
- if (!B)
1391
+ if (!T)
1419
1392
  return;
1420
1393
  const {
1421
- index: R
1422
- } = C(B);
1423
- if (R === -1)
1394
+ index: B
1395
+ } = E(T);
1396
+ if (B === -1)
1424
1397
  return;
1425
1398
  const {
1426
- index: L
1427
- } = l(h);
1428
- L !== -1 && (E[R].children.splice(L, 1), c());
1429
- }
1430
- function $(r, o, a) {
1431
- p(r);
1432
- const h = a && a.id, {
1433
- buttons: B = []
1399
+ index: N
1400
+ } = v(p);
1401
+ N !== -1 && (P[B].children.splice(N, 1), i());
1402
+ }
1403
+ function S(r, n, a) {
1404
+ c(r);
1405
+ const p = a && a.id, {
1406
+ buttons: T = []
1434
1407
  } = t.schema;
1435
- if (!h)
1408
+ if (!p)
1436
1409
  return;
1437
1410
  const {
1438
- index: E
1439
- } = C(h);
1440
- if (E === -1)
1411
+ index: P
1412
+ } = E(p);
1413
+ if (P === -1)
1441
1414
  return;
1442
- const R = I(), L = Object.assign({}, R, {
1443
- text: o.text
1415
+ const B = _(), N = Object.assign({}, B, {
1416
+ text: n.text
1444
1417
  });
1445
- B[E].children.push(L), c();
1418
+ T[P].children.push(N), i();
1446
1419
  }
1447
- function v(r, o, a) {
1448
- p(r);
1449
- const h = a && a.id, {
1450
- buttons: B = []
1420
+ function k(r, n, a) {
1421
+ c(r);
1422
+ const p = a && a.id, {
1423
+ buttons: T = []
1451
1424
  } = t.schema;
1452
- if (!h)
1425
+ if (!p)
1453
1426
  return;
1454
1427
  const {
1455
- index: E
1456
- } = C(h);
1457
- if (E === -1)
1428
+ index: P
1429
+ } = E(p);
1430
+ if (P === -1)
1458
1431
  return;
1459
- const R = I(), L = Object.assign({}, R, {
1432
+ const B = _(), N = Object.assign({}, B, {
1460
1433
  text: "按钮"
1461
1434
  });
1462
- B[E].children.push(L), c();
1435
+ T[P].children.push(N), i();
1463
1436
  }
1464
- function m(r, o) {
1465
- return b("div", {
1437
+ function y(r, n) {
1438
+ return m("div", {
1466
1439
  class: "component-btn-group"
1467
- }, [b("div", null, [b("div", {
1440
+ }, [m("div", null, [m("div", {
1468
1441
  role: "button",
1469
1442
  class: "btn component-settings-button",
1470
1443
  title: "删除",
1471
1444
  ref: "removeButton",
1472
1445
  style: "position:static;",
1473
- onClick: (a) => A(a, r, o)
1474
- }, [b("i", {
1446
+ onClick: (a) => I(a, r, n)
1447
+ }, [m("i", {
1475
1448
  class: "f-icon f-icon-yxs_delete"
1476
- }, null)]), b("div", {
1449
+ }, null)]), m("div", {
1477
1450
  role: "button",
1478
1451
  class: "btn component-settings-button",
1479
1452
  title: "复制",
1480
1453
  ref: "copyButton",
1481
1454
  style: "position:static;",
1482
- onClick: (a) => $(a, r, o)
1483
- }, [b("i", {
1455
+ onClick: (a) => S(a, r, n)
1456
+ }, [m("i", {
1484
1457
  class: "f-icon f-icon-yxs_copy"
1485
- }, null)]), b("div", {
1458
+ }, null)]), m("div", {
1486
1459
  role: "button",
1487
1460
  class: "btn component-settings-button",
1488
1461
  title: "新增同级",
1489
1462
  ref: "appendSame",
1490
1463
  style: "width:85px!important;padding:0 5px;position:static;",
1491
- onClick: (a) => v(a, r, o)
1492
- }, [b("i", {
1464
+ onClick: (a) => k(a, r, n)
1465
+ }, [m("i", {
1493
1466
  class: "f-icon f-icon-plus-circle text-white mr-1"
1494
- }, null), b("span", {
1467
+ }, null), m("span", {
1495
1468
  style: "font-size:13px;margin:auto"
1496
- }, [Q("新增同级")])])])]);
1469
+ }, [X("新增同级")])])])]);
1497
1470
  }
1498
1471
  function x(r) {
1499
- return r.children.map((o) => o.children && o.children.length ? b("li", {
1500
- class: d(o),
1501
- id: o.id,
1502
- onClick: (a) => o.enable && T(a, o, r)
1503
- }, [b("span", {
1504
- id: o.id,
1505
- class: P(o),
1506
- onMouseover: (a) => o.enable && T(a, o, r)
1507
- }, [o.text, b("i", {
1472
+ return r.children.map((n) => n.children && n.children.length ? m("li", {
1473
+ class: d(n),
1474
+ id: n.id,
1475
+ onClick: (a) => n.enable && b(a, n, r)
1476
+ }, [m("span", {
1477
+ id: n.id,
1478
+ class: g(n),
1479
+ onMouseover: (a) => n.enable && b(a, n, r)
1480
+ }, [n.text, m("i", {
1508
1481
  class: "f-icon f-icon-arrow-chevron-right",
1509
1482
  style: "display: inline-block;float: right;line-height: 1.25rem;"
1510
- }, null)]), S(o, o)]) : b("li", {
1511
- class: P(o),
1512
- id: o.id,
1513
- onClick: (a) => D(a, o)
1514
- }, [m(o, r), n.shouldShowIcon(o) && b("i", {
1515
- class: n.iconClass(o)
1516
- }, null), o.text]));
1517
- }
1518
- function k(r, o, a) {
1519
- const h = {
1483
+ }, null)]), w(n, n)]) : m("li", {
1484
+ class: g(n),
1485
+ id: n.id,
1486
+ onClick: (a) => D(a, n)
1487
+ }, [y(n, r), o.shouldShowIcon(n) && m("i", {
1488
+ class: o.iconClass(n)
1489
+ }, null), n.text]));
1490
+ }
1491
+ function A(r, n, a) {
1492
+ const p = {
1520
1493
  display: r.expanded ? "block" : "none",
1521
1494
  position: "fixed",
1522
1495
  maxWidth: "300px",
1523
1496
  width: "auto",
1524
1497
  minWidth: "120px"
1525
- }, B = document.getElementsByTagName("body")[0].getClientRects()[0].width, E = o, R = E == null ? void 0 : E.getClientRects();
1526
- if (E && R && R.length) {
1498
+ }, T = document.getElementsByTagName("body")[0].getClientRects()[0].width, P = n, B = P == null ? void 0 : P.getClientRects();
1499
+ if (P && B && B.length) {
1527
1500
  const {
1528
- top: L,
1529
- width: N,
1530
- left: _,
1531
- right: W,
1532
- height: q
1533
- } = R[0], te = Math.ceil(q + L);
1534
- h.top = `${te}px`, h.left = `${_}px`;
1535
- const Oe = r.id + "_menu", ne = o ? o.querySelector("#" + Oe) : null;
1501
+ top: N,
1502
+ width: U,
1503
+ left: q,
1504
+ right: $,
1505
+ height: L
1506
+ } = B[0], H = Math.ceil(L + N);
1507
+ p.top = `${H}px`, p.left = `${q}px`;
1508
+ const J = r.id + "_menu", ne = n ? n.querySelector("#" + J) : null;
1536
1509
  if (ne) {
1537
- h.display === "block" && (ne.style.display = "block");
1538
- const fe = ne.getBoundingClientRect();
1510
+ p.display === "block" && (ne.style.display = "block");
1511
+ const de = ne.getBoundingClientRect();
1539
1512
  if (a) {
1540
- h.top = `${L - 6}px`;
1541
- const $e = Math.ceil(N + _);
1542
- h.left = `${$e}px`;
1513
+ p.top = `${N - 6}px`;
1514
+ const Re = Math.ceil(U + q);
1515
+ p.left = `${Re}px`;
1543
1516
  }
1544
- B - _ - N < fe.width && (h.left = `${(a ? _ : W) - fe.width}px`);
1517
+ T - q - U < de.width && (p.left = `${(a ? q : $) - de.width}px`);
1545
1518
  }
1546
1519
  }
1547
- return h;
1548
- }
1549
- S = function(r, o) {
1550
- var E, R;
1551
- const a = Ce(), h = o ? o.id : r.id, B = (R = (E = a == null ? void 0 : a.exposed) == null ? void 0 : E.elementRef.value) == null ? void 0 : R.querySelector("#" + h);
1552
- return b("ul", {
1553
- class: g(r),
1554
- style: k(r, B, o),
1520
+ return p;
1521
+ }
1522
+ w = function(r, n) {
1523
+ var P, B;
1524
+ const a = he(), p = n ? n.id : r.id, T = (B = (P = a == null ? void 0 : a.exposed) == null ? void 0 : P.elementRef.value) == null ? void 0 : B.querySelector("#" + p);
1525
+ return m("ul", {
1526
+ class: u(r),
1527
+ style: A(r, T, n),
1555
1528
  id: r.id + "_menu"
1556
1529
  }, [x(r)]);
1557
1530
  };
1558
- function u() {
1559
- y.forEach((r) => {
1531
+ function C() {
1532
+ h.forEach((r) => {
1560
1533
  r.expanded = !1;
1561
- }), y.clear();
1534
+ }), h.clear();
1562
1535
  }
1563
1536
  return {
1564
- renderDropdownMenu: S,
1565
- clearAllDropDownMenu: u
1537
+ renderDropdownMenu: w,
1538
+ clearAllDropDownMenu: C
1566
1539
  };
1567
1540
  }
1568
- function Lt(n, e, t) {
1569
- const s = M(n.alignment), {
1570
- renderDropdownMenu: c,
1571
- clearAllDropDownMenu: g
1572
- } = Ft(e, t), d = V("design-item-context"), P = V("toolbar-item-handler", () => {
1541
+ function At(o, e, t) {
1542
+ const s = M(o.alignment), {
1543
+ renderDropdownMenu: i,
1544
+ clearAllDropDownMenu: u
1545
+ } = It(e, t), d = V("design-item-context"), g = V("toolbar-item-handler", () => {
1573
1546
  });
1574
- function S() {
1575
- P && P();
1547
+ function w() {
1548
+ g && g();
1576
1549
  }
1577
- function y(u) {
1550
+ function h(C) {
1578
1551
  const r = {
1579
1552
  "btn-group": !0,
1580
1553
  "f-rt-dropdown": !0,
1581
1554
  "f-btn-ml": s.value === "right",
1582
1555
  "f-btn-mr": s.value === "left"
1583
- }, o = u.dropdownClass.split(" ");
1584
- return o && o.length && o.reduce((a, h) => (a[h] = !0, a), r), r;
1556
+ }, n = C.dropdownClass.split(" ");
1557
+ return n && n.length && n.reduce((a, p) => (a[p] = !0, a), r), r;
1585
1558
  }
1586
- function T(u) {
1559
+ function b(C) {
1587
1560
  const r = {
1588
1561
  btn: !0,
1589
- disabled: !u.enable,
1562
+ disabled: !C.enable,
1590
1563
  "position-relative": !0,
1591
1564
  "farris-component": !0,
1592
1565
  "f-rt-btn": !0,
1593
- "btn-icontext": !!(u.icon && u.icon.trim())
1566
+ "btn-icontext": !!(C.icon && C.icon.trim())
1594
1567
  };
1595
- if (u.class) {
1596
- const o = u.class.split(" ");
1597
- o && o.length && o.reduce((a, h) => (a[h] = !0, a), r);
1568
+ if (C.class) {
1569
+ const n = C.class.split(" ");
1570
+ n && n.length && n.reduce((a, p) => (a[p] = !0, a), r);
1598
1571
  }
1599
1572
  return r;
1600
1573
  }
1601
- function p(u) {
1602
- u && (u.stopPropagation(), u.preventDefault());
1574
+ function c(C) {
1575
+ C && (C.stopPropagation(), C.preventDefault());
1603
1576
  }
1604
- function i(u, r) {
1605
- p(u);
1606
- const o = r.expanded;
1607
- document.body.click(), r.expanded = !o;
1577
+ function l(C, r) {
1578
+ c(C);
1579
+ const n = r.expanded;
1580
+ document.body.click(), r.expanded = !n;
1608
1581
  }
1609
- const f = function(u) {
1582
+ const f = function(C) {
1610
1583
  const {
1611
1584
  componentType: r
1612
- } = u, o = U(r, u), a = r.toLowerCase().replace("-", "_");
1613
- return o && !o.id && o.type === r && (o.id = `${a}_${Math.random().toString().slice(2, 6)}`), o;
1614
- }, l = function() {
1615
- const u = {
1585
+ } = C, n = Y(r, C), a = r.toLowerCase().replace("-", "_");
1586
+ return n && !n.id && n.type === r && (n.id = `${a}_${Math.random().toString().slice(2, 6)}`), n;
1587
+ }, v = function() {
1588
+ const C = {
1616
1589
  componentType: "response-toolbar-item",
1617
1590
  parentComponentInstance: t.value,
1618
1591
  targetPosition: -1
1619
1592
  };
1620
- return f(u);
1593
+ return f(C);
1621
1594
  };
1622
- function C(u) {
1623
- const r = d.schema.buttons || d.schema.contents, o = r == null ? void 0 : r.findIndex((h) => h.id === u), a = o === -1 ? null : r[o];
1595
+ function E(C) {
1596
+ const r = d.schema.buttons || d.schema.contents, n = r == null ? void 0 : r.findIndex((p) => p.id === C), a = n === -1 ? null : r[n];
1624
1597
  return {
1625
- index: o,
1598
+ index: n,
1626
1599
  toolbarItem: a
1627
1600
  };
1628
1601
  }
1629
- function w(u, r) {
1630
- var R;
1602
+ function O(C, r) {
1603
+ var B;
1631
1604
  const {
1632
- index: o,
1605
+ index: n,
1633
1606
  toolbarItem: a
1634
- } = C(r);
1635
- if (o === -1)
1607
+ } = E(r);
1608
+ if (n === -1)
1636
1609
  return;
1637
- const h = a.text || "按钮", B = l(), E = Object.assign({}, B, {
1638
- text: h
1610
+ const p = a.text || "按钮", T = v(), P = Object.assign({}, T, {
1611
+ text: p
1639
1612
  });
1640
- (R = d.schema.buttons) == null || R.push(E), S();
1613
+ (B = d.schema.buttons) == null || B.push(P), w();
1641
1614
  }
1642
- function j(u, r) {
1615
+ function j(C, r) {
1643
1616
  const {
1644
- index: o,
1617
+ index: n,
1645
1618
  toolbarItem: a
1646
- } = C(r);
1647
- if (o === -1)
1619
+ } = E(r);
1620
+ if (n === -1)
1648
1621
  return;
1649
- const h = a.text || "按钮", B = l(), E = Object.assign({}, B, {
1650
- text: h
1651
- }), R = d.schema.buttons[o].children || [];
1652
- R.push(E), d.schema.buttons[o].children = R, S();
1622
+ const p = a.text || "按钮", T = v(), P = Object.assign({}, T, {
1623
+ text: p
1624
+ }), B = d.schema.buttons[n].children || [];
1625
+ B.push(P), d.schema.buttons[n].children = B, w();
1653
1626
  }
1654
- function I(u, r) {
1655
- const o = d.schema.buttons || d.schema.contents, a = o == null ? void 0 : o.findIndex((h) => h.id === r);
1656
- a !== -1 && (o.splice(a, 1), S());
1627
+ function _(C, r) {
1628
+ const n = d.schema.buttons || d.schema.contents, a = n == null ? void 0 : n.findIndex((p) => p.id === r);
1629
+ a !== -1 && (n.splice(a, 1), w());
1657
1630
  }
1658
- function D(u) {
1659
- return b("div", {
1631
+ function D(C) {
1632
+ return m("div", {
1660
1633
  class: "component-btn-group"
1661
- }, [b("div", null, [b("div", {
1634
+ }, [m("div", null, [m("div", {
1662
1635
  role: "button",
1663
1636
  class: "btn component-settings-button",
1664
1637
  title: "删除",
1665
1638
  ref: "removeButton",
1666
1639
  style: "position:static;",
1667
- onClick: (r) => I(r, u)
1668
- }, [b("i", {
1640
+ onClick: (r) => _(r, C)
1641
+ }, [m("i", {
1669
1642
  class: "f-icon f-icon-yxs_delete"
1670
- }, null)]), b("div", {
1643
+ }, null)]), m("div", {
1671
1644
  role: "button",
1672
1645
  class: "btn component-settings-button",
1673
1646
  title: "复制",
1674
1647
  ref: "copyButton",
1675
1648
  style: "position:static;",
1676
- onClick: (r) => w(r, u)
1677
- }, [b("i", {
1649
+ onClick: (r) => O(r, C)
1650
+ }, [m("i", {
1678
1651
  class: "f-icon f-icon-yxs_copy"
1679
- }, null)]), b("div", {
1652
+ }, null)]), m("div", {
1680
1653
  role: "button",
1681
1654
  class: "btn component-settings-button",
1682
1655
  title: "新增子级",
1683
1656
  ref: "appendChildButton",
1684
1657
  style: "width:85px!important;padding:0 5px;position:static;",
1685
- onClick: (r) => j(r, u)
1686
- }, [b("i", {
1658
+ onClick: (r) => j(r, C)
1659
+ }, [m("i", {
1687
1660
  class: "f-icon f-icon-plus-circle text-white mr-1"
1688
- }, null), b("span", {
1661
+ }, null), m("span", {
1689
1662
  style: "font-size:13px;margin:auto"
1690
- }, [Q("新增子级")])])])]);
1663
+ }, [X("新增子级")])])])]);
1691
1664
  }
1692
- function A() {
1665
+ function I() {
1693
1666
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((r) => r.classList.remove("dgComponentFocused"));
1694
- const u = document.getElementsByClassName("dgComponentSelected");
1695
- Array.from(u).forEach((r) => r.classList.remove("dgComponentSelected"));
1667
+ const C = document.getElementsByClassName("dgComponentSelected");
1668
+ Array.from(C).forEach((r) => r.classList.remove("dgComponentSelected"));
1696
1669
  }
1697
- function $(u) {
1698
- u.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1670
+ function S(C) {
1671
+ C.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1699
1672
  }
1700
- function v(u) {
1701
- var h;
1702
- const r = d.schema.buttons || d.schema.contents, o = r == null ? void 0 : r.findIndex((B) => B.id === u);
1703
- if (o === -1)
1673
+ function k(C) {
1674
+ var p;
1675
+ const r = d.schema.buttons || d.schema.contents, n = r == null ? void 0 : r.findIndex((T) => T.id === C);
1676
+ if (n === -1)
1704
1677
  return;
1705
- const a = r[o];
1706
- (h = d == null ? void 0 : d.setupContext) == null || h.emit("selectionChange", "response-toolbar-item", a);
1707
- }
1708
- function m(u, r) {
1709
- p(u), A(), $(u), p(u), i(u, r), v(r.id);
1710
- }
1711
- function x(u) {
1712
- return b("div", {
1713
- id: u.id,
1714
- class: y(u)
1715
- }, [b("div", {
1716
- class: T(u),
1678
+ const a = r[n];
1679
+ (p = d == null ? void 0 : d.setupContext) == null || p.emit("selectionChange", "response-toolbar-item", a);
1680
+ }
1681
+ function y(C, r) {
1682
+ c(C), I(), S(C), c(C), l(C, r), k(r.id);
1683
+ }
1684
+ function x(C) {
1685
+ return m("div", {
1686
+ id: C.id,
1687
+ class: h(C)
1688
+ }, [m("div", {
1689
+ class: b(C),
1717
1690
  style: "display: flex;padding-right: 0.1rem;",
1718
- onClick: (r) => u.enable && m(r, u)
1719
- }, [D(u.id), e.shouldShowIcon(u) && b("i", {
1720
- class: e.iconClass(u)
1721
- }, null), b("span", null, [u.text]), b("i", {
1691
+ onClick: (r) => C.enable && y(r, C)
1692
+ }, [D(C.id), e.shouldShowIcon(C) && m("i", {
1693
+ class: e.iconClass(C)
1694
+ }, null), m("span", null, [C.text]), m("i", {
1722
1695
  class: "f-icon f-icon-arrow-chevron-down",
1723
1696
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
1724
- }, null)]), c(u)]);
1697
+ }, null)]), i(C)]);
1725
1698
  }
1726
- function k() {
1727
- g();
1699
+ function A() {
1700
+ u();
1728
1701
  }
1729
1702
  return {
1730
1703
  renderToolbarDropdown: x,
1731
- clearAllDropDown: k
1704
+ clearAllDropDown: A
1732
1705
  };
1733
1706
  }
1734
- function Vt() {
1735
- function n(e) {
1736
- var c, g;
1737
- if (!e)
1738
- return !1;
1739
- const t = ((c = e.targetContainer) == null ? void 0 : c.componentInstance) && e.targetContainer.componentInstance.value;
1740
- if (!t)
1741
- return !1;
1742
- const s = (g = t.schema.appearance) == null ? void 0 : g.class;
1743
- if (e.controlCategory === "input" || e.controlType === "form-group") {
1744
- const d = t.schema.type, P = (d === "response-form" || d === "content-container") && s && s.includes("farris-form");
1745
- if (t.schema.type !== "response-layout-item" && !P)
1746
- return !1;
1747
- }
1748
- return e.controlType !== "field-set";
1749
- }
1750
- return {
1751
- basalDragulaRuleForContainer: n
1752
- };
1753
- }
1754
- const Wt = "https://json-schema.org/draft/2020-12/schema", Ut = "https://farris-design.gitee.io/dragging-rules.schema.json", qt = "Dragging Rules", Ht = "The rules of designer canvas", zt = "object", Gt = {
1755
- "f-page": {
1756
- description: "The root class of page designed by farris.",
1757
- type: "object",
1758
- properties: {
1759
- contents: {
1760
- type: "object",
1761
- properties: {
1762
- "f-page-header": {
1763
- description: "The class of page header designed by farris.",
1764
- type: "string"
1765
- },
1766
- "f-page-main": {
1767
- description: "The class of page body designed by farris.",
1768
- type: "object",
1769
- properties: {
1770
- contents: {
1771
- type: "object",
1772
- properties: {
1773
- "f-struct-like-card": {
1774
- description: "",
1775
- type: "object",
1776
- properties: {
1777
- contents: {
1778
- type: "object",
1779
- properties: {
1780
- "f-struct-form": {
1781
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
1782
- type: "object",
1783
- properties: {
1784
- contents: {
1785
- type: "object",
1786
- properties: {
1787
- "f-section-form": {
1788
- description: "The class of section which has wrapped a reponse-form component.",
1789
- type: "object",
1790
- properties: {
1791
- contents: {
1792
- type: "object",
1793
- properties: {
1794
- "f-form-layout": {
1795
- description: "The class of reponse form",
1796
- type: "object",
1797
- properties: {
1798
- rules: {
1799
- type: "object",
1800
- properties: {
1801
- canAccept: {
1802
- type: "boolean",
1803
- const: !0
1804
- },
1805
- fixed: {
1806
- type: "boolean",
1807
- const: !0
1808
- },
1809
- hidePadding: {
1810
- type: "boolean",
1811
- const: !1
1812
- }
1813
- }
1814
- }
1815
- }
1816
- }
1817
- }
1818
- },
1819
- rules: {
1820
- type: "object",
1821
- properties: {
1822
- canAccept: {
1823
- type: "boolean",
1824
- const: !1
1825
- },
1826
- fixed: {
1827
- type: "boolean",
1828
- const: !0
1829
- },
1830
- hidePadding: {
1831
- type: "boolean",
1832
- const: !0
1833
- }
1834
- }
1835
- }
1836
- }
1837
- }
1838
- }
1839
- },
1840
- rules: {
1841
- type: "object",
1842
- properties: {
1843
- canAccept: {
1844
- type: "boolean",
1845
- const: !1
1846
- },
1847
- fixed: {
1848
- type: "boolean",
1849
- const: !1
1850
- },
1851
- hidePadding: {
1852
- type: "boolean",
1853
- const: !0
1854
- }
1855
- }
1856
- }
1857
- }
1858
- },
1859
- "f-struct-wrapper": {
1860
- description: "",
1861
- type: "object",
1862
- properties: {
1863
- contents: {
1864
- type: "object",
1865
- properties: {
1866
- "f-section-tabs": {
1867
- description: "The class of section which has wrapped sub-grid tabs.",
1868
- type: "object",
1869
- properties: {
1870
- contents: {
1871
- type: "object",
1872
- properties: {
1873
- "f-tabs-in-card": {
1874
- description: "The class of tabs which contains sub-grid.",
1875
- type: "object",
1876
- properties: {
1877
- contents: {
1878
- type: "object",
1879
- properties: {
1880
- "f-struct-data-grid-in-card": {
1881
- description: "The class of sub-grid component",
1882
- type: "object",
1883
- properties: {
1884
- contents: {
1885
- type: "object",
1886
- properties: {
1887
- "f-grid-is-sub": {
1888
- description: "The class of sub-grid",
1889
- type: "object",
1890
- properties: {
1891
- rules: {
1892
- type: "object",
1893
- properties: {
1894
- canAccept: {
1895
- type: "boolean",
1896
- const: !0
1897
- },
1898
- fixed: {
1899
- type: "boolean",
1900
- const: !0
1901
- },
1902
- hidePadding: {
1903
- type: "boolean",
1904
- const: !1
1905
- }
1906
- }
1907
- }
1908
- }
1909
- }
1910
- }
1911
- },
1912
- rules: {
1913
- type: "object",
1914
- properties: {
1915
- canAccept: {
1916
- type: "boolean",
1917
- const: !1
1918
- },
1919
- fixed: {
1920
- type: "boolean",
1921
- const: !1
1922
- },
1923
- hidePadding: {
1924
- type: "boolean",
1925
- const: !0
1926
- }
1927
- }
1928
- }
1929
- }
1930
- }
1931
- }
1932
- },
1933
- rules: {
1934
- type: "object",
1935
- properties: {
1936
- canAccept: {
1937
- type: "boolean",
1938
- const: !1
1939
- },
1940
- fixed: {
1941
- type: "boolean",
1942
- const: !0
1943
- },
1944
- hidePadding: {
1945
- type: "boolean",
1946
- const: !0
1947
- }
1948
- }
1949
- }
1950
- }
1951
- }
1952
- }
1953
- },
1954
- rules: {
1955
- type: "object",
1956
- properties: {
1957
- canAccept: {
1958
- type: "boolean",
1959
- const: !1
1960
- },
1961
- fixed: {
1962
- type: "boolean",
1963
- const: !0
1964
- },
1965
- hidePadding: {
1966
- type: "boolean",
1967
- const: !0
1968
- }
1969
- }
1970
- }
1971
- }
1972
- },
1973
- "f-section-in-main": {
1974
- description: "The class of section which has wrapped a reponse-form component.",
1975
- type: "object",
1976
- properties: {
1977
- rules: {
1978
- type: "object",
1979
- properties: {
1980
- canAccept: {
1981
- type: "boolean",
1982
- const: !0
1983
- },
1984
- fixed: {
1985
- type: "boolean",
1986
- const: !0
1987
- },
1988
- hidePadding: {
1989
- type: "boolean",
1990
- const: !1
1991
- }
1992
- }
1993
- }
1994
- }
1995
- }
1996
- }
1997
- },
1998
- rules: {
1999
- type: "object",
2000
- properties: {
2001
- canAccept: {
2002
- type: "boolean",
2003
- const: !1
2004
- },
2005
- fixed: {
2006
- type: "boolean",
2007
- const: !1
2008
- },
2009
- hidePadding: {
2010
- type: "boolean",
2011
- const: !0
2012
- }
2013
- }
2014
- }
2015
- }
2016
- }
2017
- }
2018
- },
2019
- rules: {
2020
- type: "object",
2021
- properties: {
2022
- canAccept: {
2023
- type: "boolean",
2024
- const: !0
2025
- },
2026
- fixed: {
2027
- type: "boolean",
2028
- const: !0
2029
- },
2030
- hidePadding: {
2031
- type: "object",
2032
- const: {
2033
- allOf: [
2034
- {
2035
- sibling: 0,
2036
- parent: {
2037
- "f-page-main": !0
2038
- }
2039
- }
2040
- ]
2041
- }
2042
- }
2043
- }
2044
- }
2045
- }
2046
- },
2047
- "f-struct-data-grid": {
2048
- description: "",
2049
- type: "object",
2050
- properties: {
2051
- rules: {
2052
- type: "object",
2053
- properties: {
2054
- canAccept: {
2055
- type: "object",
2056
- const: !0
2057
- },
2058
- fixed: {
2059
- type: "boolean",
2060
- const: !0
2061
- },
2062
- hidePadding: {
2063
- type: "boolean",
2064
- const: !0
2065
- }
2066
- }
2067
- }
2068
- }
2069
- },
2070
- "f-page-main-content": {
2071
- description: "",
2072
- type: "object",
2073
- properties: {
2074
- contents: {
2075
- type: "object",
2076
- properties: {
2077
- "f-page-content-nav": {
2078
- description: "",
2079
- type: "object",
2080
- properties: {
2081
- contents: {
2082
- type: "object",
2083
- properties: {
2084
- "f-struct-data-grid-in-nav": {
2085
- description: "",
2086
- type: "object",
2087
- properties: {
2088
- contents: {
2089
- type: "object",
2090
- properties: {
2091
- "f-page-content-nav-extend": {
2092
- description: "",
2093
- type: "object"
2094
- },
2095
- "f-section-in-nav": {
2096
- description: "",
2097
- type: "object",
2098
- properties: {
2099
- rules: {
2100
- type: "object",
2101
- properties: {
2102
- canAccept: {
2103
- type: "boolean",
2104
- const: !1
2105
- },
2106
- fixed: {
2107
- type: "boolean",
2108
- const: !0
2109
- },
2110
- hidePadding: {
2111
- type: "boolean",
2112
- const: !1
2113
- }
2114
- }
2115
- }
2116
- }
2117
- }
2118
- }
2119
- },
2120
- rules: {
2121
- type: "object",
2122
- properties: {
2123
- canAccept: {
2124
- type: "boolean",
2125
- const: !0
2126
- },
2127
- fixed: {
2128
- type: "boolean",
2129
- const: !1
2130
- },
2131
- hidePadding: {
2132
- type: "boolean",
2133
- const: !0
2134
- }
2135
- }
2136
- }
2137
- }
2138
- }
2139
- }
2140
- }
2141
- }
2142
- },
2143
- "f-page-content-main": {
2144
- description: "",
2145
- type: "object",
2146
- properties: {}
2147
- }
2148
- }
2149
- }
2150
- }
2151
- },
2152
- "f-page-content": {
2153
- description: "",
2154
- type: "object",
2155
- properties: {
2156
- contents: {
2157
- type: "object",
2158
- properties: {
2159
- "f-page-content-nav": {
2160
- description: "",
2161
- type: "object",
2162
- properties: {
2163
- contents: {
2164
- type: "object",
2165
- properties: {
2166
- "f-list-nav": {
2167
- description: "",
2168
- type: "object"
2169
- },
2170
- "f-list-nav-left": {
2171
- description: "",
2172
- type: "object"
2173
- },
2174
- "f-struct-data-grid-in-nav": {
2175
- description: "",
2176
- type: "object",
2177
- properties: {
2178
- contents: {
2179
- type: "object",
2180
- properties: {
2181
- "f-section-form": {
2182
- description: "",
2183
- type: "object",
2184
- properties: {
2185
- rules: {
2186
- type: "object",
2187
- properties: {
2188
- canAccept: {
2189
- type: "boolean",
2190
- const: !1
2191
- },
2192
- fixed: {
2193
- type: "boolean",
2194
- const: !0
2195
- },
2196
- hidePadding: {
2197
- type: "boolean",
2198
- const: !0
2199
- }
2200
- }
2201
- }
2202
- }
2203
- },
2204
- "f-section-grid": {
2205
- description: "",
2206
- type: "object",
2207
- properties: {
2208
- rules: {
2209
- type: "object",
2210
- properties: {
2211
- canAccept: {
2212
- type: "boolean",
2213
- const: !1
2214
- },
2215
- fixed: {
2216
- type: "boolean",
2217
- const: !0
2218
- },
2219
- hidePadding: {
2220
- type: "boolean",
2221
- const: !0
2222
- }
2223
- }
2224
- }
2225
- }
2226
- }
2227
- }
2228
- },
2229
- rules: {
2230
- type: "object",
2231
- properties: {
2232
- canAccept: {
2233
- type: "boolean",
2234
- const: !1
2235
- },
2236
- fixed: {
2237
- type: "boolean",
2238
- const: !0
2239
- },
2240
- hidePadding: {
2241
- type: "boolean",
2242
- const: !0
2243
- }
2244
- }
2245
- }
2246
- }
2247
- }
2248
- }
2249
- }
2250
- },
2251
- rules: {
2252
- type: "object",
2253
- properties: {
2254
- canAccept: {
2255
- type: "boolean",
2256
- const: !1
2257
- },
2258
- fixed: {
2259
- type: "boolean",
2260
- const: !0
2261
- },
2262
- hidePadding: {
2263
- type: "boolean",
2264
- const: !0
2265
- }
2266
- }
2267
- }
2268
- },
2269
- "f-page-content-main": {
2270
- description: "",
2271
- type: "object",
2272
- properties: {
2273
- rules: {
2274
- type: "object",
2275
- properties: {
2276
- canAccept: {
2277
- type: "boolean",
2278
- const: !1
2279
- },
2280
- fixed: {
2281
- type: "boolean",
2282
- const: !1
2283
- },
2284
- hidePadding: {
2285
- type: "boolean",
2286
- const: !0
2287
- }
2288
- }
2289
- }
2290
- }
2291
- }
2292
- }
2293
- },
2294
- rules: {
2295
- type: "object",
2296
- properties: {
2297
- canAccept: {
2298
- type: "boolean",
2299
- const: !1
2300
- },
2301
- fixed: {
2302
- type: "boolean",
2303
- const: !0
2304
- },
2305
- hidePadding: {
2306
- type: "boolean",
2307
- const: !0
2308
- }
2309
- }
2310
- }
2311
- }
2312
- }
2313
- }
2314
- },
2315
- rules: {
2316
- type: "object",
2317
- properties: {
2318
- canAccept: {
2319
- type: "object",
2320
- const: {
2321
- anyOf: [
2322
- {
2323
- children: 0
2324
- },
2325
- {
2326
- children: {
2327
- length: {
2328
- not: 1
2329
- },
2330
- "f-struct-like-card": !0
2331
- }
2332
- },
2333
- {
2334
- children: {
2335
- "scroll-spy": !1,
2336
- "f-page-content": !1,
2337
- "f-struct-like-card": !1
2338
- }
2339
- }
2340
- ]
2341
- }
2342
- },
2343
- fixed: {
2344
- type: "boolean",
2345
- const: !0
2346
- },
2347
- hidePadding: {
2348
- type: "boolean",
2349
- const: !0
2350
- }
2351
- }
2352
- }
2353
- }
2354
- },
2355
- "f-page-footer": {
2356
- description: "The class of page footer designed by farris.",
2357
- type: "string"
2358
- }
2359
- }
2360
- },
2361
- rules: {
2362
- type: "object",
2363
- properties: {
2364
- canAccept: {
2365
- type: "boolean",
2366
- const: !1
2367
- },
2368
- fixed: {
2369
- type: "boolean",
2370
- const: !0
2371
- },
2372
- hidePadding: {
2373
- type: "boolean",
2374
- const: !0
2375
- }
2376
- }
2377
- }
2378
- }
2379
- },
2380
- "f-page-is-managelist": {
2381
- description: "The root class of mangement list page.",
2382
- type: "string"
2383
- },
2384
- "f-page-card": {
2385
- description: "",
2386
- type: "object"
2387
- },
2388
- "f-page-is-mainsubcard": {
2389
- description: "",
2390
- type: "object"
2391
- }
2392
- }, Jt = {
2393
- $schema: Wt,
2394
- $id: Ut,
2395
- title: qt,
2396
- description: Ht,
2397
- type: zt,
2398
- properties: Gt
2399
- }, re = /* @__PURE__ */ new Map();
2400
- function Ae() {
2401
- function n(l, C, w, j) {
2402
- var I;
2403
- if (typeof w == "number")
2404
- return ((I = j[l]) == null ? void 0 : I.length) === w;
2405
- if (typeof w == "object") {
2406
- const D = Object.keys(w)[0], A = w[D];
2407
- if (D === "not")
2408
- return Number(j[l].length) !== Number(A);
2409
- if (D === "moreThan")
2410
- return Number(j[l].length) >= Number(A);
2411
- if (D === "lessThan")
2412
- return Number(j[l].length) <= Number(A);
2413
- }
2414
- return !1;
2415
- }
2416
- function e(l, C, w, j) {
2417
- return typeof w == "boolean" ? j.childrenClassList.includes(C) === !!w : !1;
2418
- }
2419
- function t(l, C, w, j) {
2420
- return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
2421
- }
2422
- function s(l, C, w, j) {
2423
- return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
2424
- }
2425
- const c = /* @__PURE__ */ new Map([
2426
- ["length", n],
2427
- ["hasChildren", e],
2428
- ["hasSibling", s],
2429
- ["hasParent", t]
2430
- ]);
2431
- function g(l, C) {
2432
- const w = l;
2433
- return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((j) => {
2434
- if (j === "length")
2435
- return { target: w, operator: "length", param: null, value: C[j] };
2436
- const I = j, D = C[j];
2437
- return { target: w, operator: l === "children" ? "hasChildren" : l === "parent" ? "hasParent" : "hasSibling", param: I, value: D };
2438
- }) : [];
2439
- }
2440
- function d(l, C) {
2441
- if (c.has(l.operator)) {
2442
- const w = c.get(l.operator);
2443
- return w && w(l.target, l.param, l.value, C) || !1;
2444
- }
2445
- return !1;
2446
- }
2447
- function P(l, C) {
2448
- return Object.keys(l).reduce((D, A) => {
2449
- const $ = g(A, l[A]);
2450
- return D.push(...$), D;
2451
- }, []).reduce((D, A) => D && d(A, C), !0);
2452
- }
2453
- function S(l, C) {
2454
- const w = Object.keys(l), j = w.includes("allOf"), I = w.includes("anyOf"), D = j || I, v = (D ? l[D ? j ? "allOf" : "anyOf" : "allOf"] : [l]).map((x) => P(x, C));
2455
- return j ? !v.includes(!1) : v.includes(!0);
2456
- }
2457
- function y(l, C) {
2458
- const w = l.const;
2459
- return w ? typeof w == "boolean" ? w : typeof w == "object" ? S(w, C) : !1 : !1;
2460
- }
2461
- function T(l) {
2462
- return (C) => {
2463
- const w = { canAccept: !0, fixed: !1, hidePadding: !1 };
2464
- return l && l.properties && Object.keys(l.properties).reduce((j, I) => {
2465
- const D = l.properties[I];
2466
- return j[I] = y(D, C), j;
2467
- }, w), w;
2468
- };
2469
- }
2470
- function p(l, C, w) {
2471
- if (C.type === "object" && C.properties) {
2472
- const { rules: j, contents: I } = C.properties;
2473
- w.set(l, T(j)), I && Object.keys(I.properties).forEach(
2474
- (D) => p(D, I.properties[D], w)
2475
- );
2476
- }
2477
- }
2478
- function i() {
2479
- const { properties: l } = Jt;
2480
- Object.keys(l).forEach((C) => {
2481
- p(C, l[C], re);
2482
- });
2483
- }
2484
- function f(l, C) {
2485
- const w = { canAccept: !0, fixed: !1, hidePadding: !0 };
2486
- return re.has(l) ? re.get(l)(C) : w;
2487
- }
2488
- return i(), { getRuleValue: f };
2489
- }
2490
- class Qt extends ee {
1707
+ class Ot extends te {
2491
1708
  constructor(e, t) {
2492
1709
  super(e, t);
2493
1710
  }
2494
1711
  getPropertyConfig(e) {
2495
- return this.getBasicPropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
1712
+ return this.getBasicPropConfig(e), this.getAppearancePropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
1713
+ }
1714
+ getAppearancePropConfig(e) {
1715
+ this.propertyConfig.categories.appearance = {
1716
+ title: "样式",
1717
+ description: "Appearance",
1718
+ properties: {
1719
+ class: {
1720
+ title: "class样式",
1721
+ type: "string",
1722
+ description: "组件的CSS样式",
1723
+ $converter: "/converter/appearance.converter"
1724
+ }
1725
+ }
1726
+ };
2496
1727
  }
2497
1728
  getBasicPropConfig(e) {
2498
1729
  this.propertyConfig.categories.basic = {
@@ -2513,7 +1744,7 @@ class Qt extends ee {
2513
1744
  type: "combo-list",
2514
1745
  textField: "value",
2515
1746
  valueField: "key",
2516
- data: [{ key: "response-toolbar", value: K["response-toolbar"].name }]
1747
+ data: [{ key: "response-toolbar", value: ee["response-toolbar"].name }]
2517
1748
  }
2518
1749
  }
2519
1750
  }
@@ -2544,7 +1775,7 @@ class Qt extends ee {
2544
1775
  ]
2545
1776
  }
2546
1777
  },
2547
- buttons: {
1778
+ items: {
2548
1779
  title: "按钮",
2549
1780
  description: "The items of Response Toolbar.",
2550
1781
  type: "array",
@@ -2556,85 +1787,40 @@ class Qt extends ee {
2556
1787
  };
2557
1788
  }
2558
1789
  }
2559
- function Xt(n, e, t, s) {
2560
- const c = Ae(), g = M(!1), d = M(!1);
2561
- let P = !0, S = !1, y;
2562
- function T(v) {
2563
- return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ? v.sourceType === "control" && v.controlCategory === "input" || v.sourceType === "move" && v.controlType === "form-group" : !0;
2564
- }
2565
- function p(v) {
2566
- return !Vt().basalDragulaRuleForContainer(v) || !P || !T(v), !1;
2567
- }
2568
- function i() {
2569
- g.value = !1, d.value = !1;
2570
- const v = n, m = v.appearance && v.appearance.class || "", x = m.split(" "), k = v.buttons || [], u = k.length ? k[0] : null, r = u && u.appearance ? u.appearance.class : "", o = r ? r.split(" ") : [], a = k.length ? k.reduce((_, W) => {
2571
- const q = W && W.appearance ? W.appearance.class : "", te = q ? q.split(" ") : [];
2572
- return _.push(...te), _;
2573
- }, []) : [], h = t == null ? void 0 : t.schema, B = h && h.appearance && h.appearance.class || "", E = B ? B.split(" ") : [];
2574
- y = {
2575
- componentClass: m,
2576
- componentClassList: x,
2577
- childContents: k,
2578
- firstChildContent: u,
2579
- firstChildClass: r,
2580
- firstChildClassList: o,
2581
- parent: h,
2582
- parentClass: B,
2583
- parentClassList: E,
2584
- children: k,
2585
- childrenClassList: a
2586
- };
2587
- const { canAccept: R, fixed: L, hidePadding: N } = c.getRuleValue(x[0], y);
2588
- return P = R, S = N, !0;
2589
- }
2590
- function f(v) {
2591
- }
2592
- function l() {
2593
- return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
2594
- }
2595
- function C(v, m) {
2596
- return m.text = v.label, m;
1790
+ function jt(o, e) {
1791
+ const t = o.schema;
1792
+ function s(b) {
1793
+ return !1;
2597
1794
  }
2598
- function w(v, m, x) {
2599
- const k = n;
2600
- if ((k.appearance && k.appearance.class || "").split(" ").includes("f-form-layout")) {
2601
- const o = String(v.innerText), a = U("form-group");
2602
- return a.editor = x, a.label = o, a;
2603
- }
2604
- return x;
1795
+ function i(b, c) {
1796
+ return c.text = b.label, c;
2605
1797
  }
2606
- function j() {
1798
+ function u() {
2607
1799
  return !1;
2608
1800
  }
2609
- function I() {
1801
+ function d() {
2610
1802
  return !1;
2611
1803
  }
2612
- function D() {
1804
+ function g() {
2613
1805
  return !0;
2614
1806
  }
2615
- function A() {
2616
- return S;
1807
+ function w() {
1808
+ return !0;
2617
1809
  }
2618
- function $(v) {
2619
- return new Qt(v, e).getPropertyConfig(n);
1810
+ function h(b) {
1811
+ return new Ot(b, e).getPropertyConfig(t);
2620
1812
  }
2621
1813
  return {
2622
- canAccepts: p,
2623
- checkCanAddComponent: D,
2624
- checkCanDeleteComponent: I,
2625
- checkCanMoveComponent: j,
2626
- getStyles: l,
2627
- hideNestedPaddingInDesginerView: A,
2628
- onAcceptNewChildElement: w,
2629
- onAcceptMovedChildElement: f,
2630
- onResolveNewComponentSchema: C,
2631
- resolveComponentContext: i,
2632
- getPropsConfig: $,
2633
- triggerBelongedComponentToMoveWhenMoved: g,
2634
- triggerBelongedComponentToDeleteWhenDeleted: d
1814
+ canAccepts: s,
1815
+ checkCanAddComponent: g,
1816
+ checkCanDeleteComponent: d,
1817
+ checkCanMoveComponent: u,
1818
+ hideNestedPaddingInDesginerView: w,
1819
+ onResolveNewComponentSchema: i,
1820
+ getPropsConfig: h
2635
1821
  };
2636
1822
  }
2637
- const Yt = {
1823
+ const _t = {
2638
1824
  id: { type: String, default: "" },
2639
1825
  componentId: { type: String, default: "" },
2640
1826
  canAdd: { type: Boolean, default: !1 },
@@ -2647,254 +1833,245 @@ const Yt = {
2647
1833
  * 组件值
2648
1834
  */
2649
1835
  modelValue: { type: Object }
2650
- }, X = M(0);
2651
- function Zt(n, e) {
2652
- const t = e.getBoundingClientRect(), s = n.getBoundingClientRect(), c = s.top >= t.top, g = s.top <= t.bottom;
2653
- return c && g;
1836
+ }, se = M(0);
1837
+ function $t(o, e) {
1838
+ const t = e.getBoundingClientRect(), s = o.getBoundingClientRect(), i = s.top >= t.top, u = s.top <= t.bottom;
1839
+ return i && u;
2654
1840
  }
2655
- function Kt(n) {
2656
- if (!n)
1841
+ function Ft(o) {
1842
+ if (!o)
2657
1843
  return;
2658
1844
  let e;
2659
- if (n.className.includes("dgComponentSelected") ? e = n : e = n.querySelector(".dgComponentSelected"), !e)
1845
+ if (o.className.includes("dgComponentSelected") ? e = o : e = o.querySelector(".dgComponentSelected"), !e)
2660
1846
  return;
2661
1847
  const t = e.getBoundingClientRect();
2662
1848
  if (t.width === 0 && t.height === 0)
2663
1849
  return;
2664
1850
  const s = e.querySelector(".component-btn-group");
2665
1851
  if (s) {
2666
- if (!Zt(e, n)) {
1852
+ if (!$t(e, o)) {
2667
1853
  s.style.display = "none";
2668
1854
  return;
2669
1855
  }
2670
1856
  s.style.display = "";
2671
- const g = s.getBoundingClientRect(), d = s.querySelector("div");
1857
+ const u = s.getBoundingClientRect(), d = s.querySelector("div");
2672
1858
  if (d) {
2673
- const P = d.getBoundingClientRect();
2674
- d.style.top = g.top + "px", d.style.left = g.left - P.width + "px";
1859
+ const g = d.getBoundingClientRect();
1860
+ d.style.top = u.top + "px", d.style.left = u.left - g.width + "px";
2675
1861
  }
2676
1862
  }
2677
1863
  }
2678
- function en(n, e, t) {
2679
- var $;
2680
- function s() {
2681
- }
2682
- const c = "", g = M();
2683
- function d() {
1864
+ function Nt(o, e, t) {
1865
+ var I;
1866
+ const s = "", i = M();
1867
+ function u() {
2684
1868
  return !0;
2685
1869
  }
2686
- function P() {
1870
+ function d() {
2687
1871
  return !1;
2688
1872
  }
2689
- function S() {
1873
+ function g() {
2690
1874
  return !0;
2691
1875
  }
2692
- function y() {
1876
+ function w() {
2693
1877
  return !0;
2694
1878
  }
2695
- function T() {
1879
+ function h() {
2696
1880
  return !0;
2697
1881
  }
2698
- function p(v) {
2699
- if (!v || !v.value)
1882
+ function b(S) {
1883
+ if (!S || !S.value)
2700
1884
  return null;
2701
- const m = M(v == null ? void 0 : v.value.parent), x = p(m);
2702
- return x || null;
1885
+ const k = M(S == null ? void 0 : S.value.parent), y = b(k);
1886
+ return y || null;
2703
1887
  }
2704
- function i(v = e) {
2705
- const { componentInstance: m, designerItemElementRef: x } = v;
2706
- return !m || !m.value ? null : m.value.canMove || m.value.canAdd || m.value.canDelete ? x : i(v.parent);
1888
+ function c(S = e) {
1889
+ const { componentInstance: k, designerItemElementRef: y } = S;
1890
+ return !k || !k.value ? null : k.value.canMove || k.value.canAdd || k.value.canDelete ? y : c(S.parent);
2707
1891
  }
2708
- function f(v) {
1892
+ function l(S) {
2709
1893
  return !!t;
2710
1894
  }
2711
- function l() {
1895
+ function f() {
2712
1896
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
2713
1897
  }
2714
- function C() {
2715
- }
2716
- function w(v, m) {
1898
+ function v() {
2717
1899
  }
2718
- function j(v) {
2719
- const { componentType: m } = v;
2720
- let x = U(m, v);
2721
- const k = m.toLowerCase().replace("-", "_");
2722
- return x && !x.id && x.type === m && (x.id = `${k}_${Math.random().toString().slice(2, 6)}`), x;
1900
+ function E(S, k) {
2723
1901
  }
2724
- function I(v, m) {
2725
- const x = String(v.getAttribute("data-controltype")), k = v.getAttribute("data-feature"), u = k ? JSON.parse(k) : {};
2726
- u.parentComponentInstance = g.value;
2727
- let r = U(x, u);
2728
- const o = x.toLowerCase().replace("-", "_");
2729
- return r && !r.id && r.type === x && (r.id = `${o}_${Math.random().toString().slice(2, 6)}`), r;
1902
+ function O(S) {
1903
+ const { componentType: k } = S, y = V("designer-host-service");
1904
+ let x = Y(k, S, y);
1905
+ const A = k.toLowerCase().replace(/-/g, "_");
1906
+ return x && !x.id && x.type === k && (x.id = `${A}_${Math.random().toString().slice(2, 6)}`), x;
2730
1907
  }
2731
- function D(v) {
1908
+ function j(S) {
2732
1909
  }
2733
- function A(...v) {
1910
+ function _(...S) {
2734
1911
  return [];
2735
1912
  }
2736
- return g.value = {
2737
- canMove: d(),
2738
- canSelectParent: P(),
2739
- canAdd: y(),
2740
- canDelete: S(),
2741
- canNested: !T(),
1913
+ function D() {
1914
+ }
1915
+ return i.value = {
1916
+ canMove: u(),
1917
+ canSelectParent: d(),
1918
+ canAdd: w(),
1919
+ canDelete: g(),
1920
+ canNested: !h(),
2742
1921
  contents: [],
2743
- elementRef: n,
2744
- parent: ($ = e.parent) == null ? void 0 : $.componentInstance,
1922
+ elementRef: o,
1923
+ parent: (I = e.parent) == null ? void 0 : I.componentInstance,
2745
1924
  schema: e.schema,
2746
- styles: c,
2747
- canAccepts: f,
2748
- getBelongedComponentInstance: p,
2749
- getDraggableDesignItemElement: i,
2750
- getDraggingDisplayText: l,
2751
- getPropConfig: A,
2752
- getDragScopeElement: C,
2753
- onAcceptMovedChildElement: w,
2754
- onAcceptNewChildElement: I,
2755
- onChildElementMovedOut: D,
2756
- addNewChildComponentSchema: j,
2757
- updateDragAndDropRules: s,
1925
+ styles: s,
1926
+ canAccepts: l,
1927
+ getBelongedComponentInstance: b,
1928
+ getDraggableDesignItemElement: c,
1929
+ getDraggingDisplayText: f,
1930
+ getPropConfig: _,
1931
+ getDragScopeElement: v,
1932
+ onAcceptMovedChildElement: E,
1933
+ onChildElementMovedOut: j,
1934
+ addNewChildComponentSchema: O,
1935
+ onRemoveComponent: D,
2758
1936
  triggerBelongedComponentToMoveWhenMoved: M(!1),
2759
1937
  triggerBelongedComponentToDeleteWhenDeleted: M(!1)
2760
- }, g;
1938
+ }, i;
2761
1939
  }
2762
- const Be = /* @__PURE__ */ z({
1940
+ const Ee = /* @__PURE__ */ W({
2763
1941
  name: "FDesignerInnerItem",
2764
- props: Yt,
1942
+ props: _t,
2765
1943
  emits: ["selectionChange", "addComponent", "removeComponent"],
2766
- setup(n, e) {
2767
- const t = M(n.canMove), s = M(n.canAdd), c = M(n.canDelete), g = M(!1), d = M(n.contentKey), P = M(n.childType), S = M(n.childLabel), y = M(n.modelValue), T = M(""), p = M(), i = V("canvas-dragula"), f = M(), l = V("design-item-context"), C = {
2768
- designerItemElementRef: p,
1944
+ setup(o, e) {
1945
+ const t = M(o.canMove), s = M(o.canAdd), i = M(o.canDelete), u = M(!1), d = M(o.contentKey), g = M(o.childType), w = M(o.childLabel), h = M(o.modelValue), b = M(""), c = M(), l = V("canvas-dragula"), f = M(), v = V("design-item-context"), E = {
1946
+ designerItemElementRef: c,
2769
1947
  componentInstance: f,
2770
- schema: y.value,
2771
- parent: l,
1948
+ schema: h.value,
1949
+ parent: v,
2772
1950
  setupContext: e
2773
1951
  };
2774
- Fe("design-item-context", C);
2775
- const w = F(() => ({
1952
+ Oe("design-item-context", E);
1953
+ const O = F(() => ({
2776
1954
  "farris-component": !0,
2777
1955
  // 受position-relative影响,整个容器的高度不能被撑起
2778
- "flex-fill": n.id == "root-component",
2779
- "position-relative": t.value || c.value,
2780
- "farris-nested": g.value,
1956
+ "flex-fill": o.id === "root-component",
1957
+ "position-relative": t.value || i.value,
1958
+ "farris-nested": u.value,
2781
1959
  "can-move": t.value,
2782
- "d-none": p.value && p.value.classList.contains("d-none")
1960
+ "d-none": c.value && c.value.classList.contains("d-none")
2783
1961
  })), j = F(() => {
2784
- const o = {};
2785
- return T.value && T.value.split(";").reduce((a, h) => {
2786
- const [B, E] = h.split(":");
2787
- return B && (a[B] = E), a;
2788
- }, o), o;
1962
+ const n = {};
1963
+ return b.value && b.value.split(";").reduce((a, p) => {
1964
+ const [T, P] = p.split(":");
1965
+ return T && (a[T] = P), a;
1966
+ }, n), n;
2789
1967
  });
2790
- function I(o, a) {
2791
- if (l && l.schema[d.value]) {
2792
- const h = l.schema[d.value].findIndex((B) => B.id === a.id);
2793
- if (h > -1) {
2794
- const B = l.schema[d.value].length, E = l.schema[d.value][h % B];
2795
- l.designerItemElementRef.value.querySelector(`#${E.id}-design-item`), l.schema[d.value].splice(h, 1), l.componentInstance.value.updateDragAndDropRules(), X.value++, e.emit("removeComponent");
1968
+ function _(n, a) {
1969
+ if (v && v.schema[d.value]) {
1970
+ const p = v.schema[d.value].findIndex((T) => T.id === a.id);
1971
+ if (p > -1) {
1972
+ const T = v.schema[d.value].length, P = v.schema[d.value][p % T];
1973
+ v.designerItemElementRef.value.querySelector(`#${P.id}-design-item`), v.schema[d.value].splice(p, 1), se.value++, e.emit("removeComponent");
2796
1974
  }
2797
1975
  }
2798
1976
  }
2799
- function D(o) {
1977
+ function D(n) {
2800
1978
  if (f.value.addNewChildComponentSchema) {
2801
1979
  const a = {
2802
- componentType: P.value,
2803
- label: S.value,
1980
+ componentType: g.value,
1981
+ label: w.value,
2804
1982
  parentComponentInstance: f.value,
2805
1983
  targetPosition: -1
2806
- }, h = f.value.addNewChildComponentSchema(a);
2807
- y.value[d.value].push(h), e.emit("addComponent");
1984
+ }, p = f.value.addNewChildComponentSchema(a);
1985
+ h.value[d.value].push(p), e.emit("addComponent");
2808
1986
  }
2809
1987
  }
2810
- function A() {
2811
- return s.value && b("div", {
1988
+ function I() {
1989
+ return s.value && m("div", {
2812
1990
  role: "button",
2813
1991
  class: "btn component-settings-button",
2814
1992
  title: "新增",
2815
1993
  ref: "removeComponent",
2816
- onClick: (o) => {
1994
+ onClick: (n) => {
2817
1995
  D();
2818
1996
  }
2819
- }, [b("i", {
1997
+ }, [m("i", {
2820
1998
  class: "f-icon f-icon-plus-circle"
2821
1999
  }, null)]);
2822
2000
  }
2823
- function $(o) {
2824
- return c.value && b("div", {
2001
+ function S(n) {
2002
+ return i.value && m("div", {
2825
2003
  role: "button",
2826
2004
  class: "btn component-settings-button",
2827
2005
  title: "删除",
2828
2006
  ref: "removeComponent",
2829
- onClick: Ve((a) => I(a, o), ["stop"])
2830
- }, [b("i", {
2007
+ onClick: _e((a) => _(a, n), ["stop"])
2008
+ }, [m("i", {
2831
2009
  class: "f-icon f-icon-yxs_delete"
2832
2010
  }, null)]);
2833
2011
  }
2834
- function v() {
2835
- return t.value && b("div", {
2012
+ function k() {
2013
+ return t.value && m("div", {
2836
2014
  role: "button",
2837
2015
  class: "btn component-settings-button",
2838
2016
  title: "移动",
2839
2017
  ref: "moveComponent"
2840
- }, [b("i", {
2018
+ }, [m("i", {
2841
2019
  "data-dragging-icon": "true",
2842
2020
  class: "cmp_move f-icon f-icon-yxs_move"
2843
2021
  }, null)]);
2844
2022
  }
2845
- function m(o) {
2846
- return b("div", {
2023
+ function y(n) {
2024
+ return m("div", {
2847
2025
  class: "component-btn-group",
2848
2026
  "data-noattach": "true"
2849
- }, [b("div", null, [A(), v(), $(o)])]);
2027
+ }, [m("div", null, [I(), k(), S(n)])]);
2850
2028
  }
2851
- G(() => n.modelValue, (o) => {
2852
- y.value = o, C.schema = o;
2029
+ z(() => o.modelValue, (n) => {
2030
+ h.value = n, E.schema = n;
2853
2031
  });
2854
- function x(o) {
2855
- const a = o.target;
2856
- Kt(a);
2032
+ function x(n) {
2033
+ const a = n.target;
2034
+ Ft(a);
2857
2035
  }
2858
- function k() {
2859
- var o, a;
2860
- (a = (o = y.value) == null ? void 0 : o.contents) != null && a.length && p.value && p.value.addEventListener("scroll", x);
2036
+ function A() {
2037
+ var n, a;
2038
+ (a = (n = h.value) == null ? void 0 : n.contents) != null && a.length && c.value && c.value.addEventListener("scroll", x);
2861
2039
  }
2862
- function u() {
2863
- const o = p.value, a = M(o.children[1]);
2864
- return en(a, C).value;
2040
+ function C() {
2041
+ const n = c.value, a = M(n.children[1]);
2042
+ return Nt(a, E).value;
2865
2043
  }
2866
- H(() => {
2867
- if (p.value) {
2868
- const o = p.value.querySelector(`[data-dragref='${y.value.id}-container']`);
2869
- f.value = o && o.componentInstance ? o.componentInstance.value : u(), i && o && i.attachComponents(o, y.value), g.value = f.value.canNested !== void 0 ? f.value.canNested : g.value, s.value = f.value.canAdd !== void 0 ? f.value.canAdd : s.value, c.value = f.value.canDelete !== void 0 ? f.value.canDelete : c.value, t.value = f.value.canMove !== void 0 ? f.value.canMove : t.value, T.value = f.value.styles || "", p.value && (p.value.componentInstance = f, p.value.designItemContext = C);
2044
+ G(() => {
2045
+ if (c.value) {
2046
+ const n = c.value.querySelector(`[data-dragref='${h.value.id}-container']`);
2047
+ f.value = n && n.componentInstance ? n.componentInstance.value : C(), l && n && l.attachComponents(n, h.value), u.value = f.value.canNested !== void 0 ? f.value.canNested : u.value, s.value = f.value.canAdd !== void 0 ? f.value.canAdd : s.value, i.value = f.value.canDelete !== void 0 ? f.value.canDelete : i.value, t.value = f.value.canMove !== void 0 ? f.value.canMove : t.value, b.value = f.value.styles || "", c.value && (c.value.componentInstance = f, c.value.designItemContext = E);
2870
2048
  }
2871
- k(), X.value++;
2872
- }), Le(() => {
2873
- p.value && p.value.removeEventListener("scroll", x);
2049
+ A(), se.value++;
2050
+ }), je(() => {
2051
+ c.value && c.value.removeEventListener("scroll", x);
2874
2052
  });
2875
- function r(o) {
2876
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((h) => h.classList.remove("dgComponentFocused")), o && (o.preventDefault(), o.stopPropagation());
2877
- const a = p.value;
2878
- if (a) {
2879
- const h = document.getElementsByClassName("dgComponentSelected");
2880
- if (!(h && h.length === 1 && h[0] === p.value)) {
2881
- Array.from(h).forEach((R) => R.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", y.value.type, y.value, n.componentId, f.value);
2882
- const E = f.value.getDraggableDesignItemElement(C);
2883
- E && E.value && E.value.classList.add("dgComponentSelected");
2884
- }
2053
+ function r(n) {
2054
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((T) => T.classList.remove("dgComponentFocused")), n && (n.preventDefault(), n.stopPropagation());
2055
+ let a = E.designerItemElementRef;
2056
+ const p = c.value;
2057
+ if (p) {
2058
+ const T = document.getElementsByClassName("dgComponentSelected");
2059
+ T && T.length === 1 && T[0] === c.value || (Array.from(T).forEach((B) => B.classList.remove("dgComponentSelected")), p.classList.add("dgComponentFocused"), e.emit("selectionChange", h.value.type, h.value, o.componentId, f.value), a = f.value.getDraggableDesignItemElement(E), a && a.value && a.value.classList.add("dgComponentSelected"));
2885
2060
  }
2886
- X.value++;
2061
+ x({
2062
+ target: a == null ? void 0 : a.value
2063
+ });
2887
2064
  }
2888
- return () => b("div", {
2889
- id: `${n.id}-design-item`,
2890
- ref: p,
2891
- class: w.value,
2065
+ return () => m("div", {
2066
+ id: `${o.id}-design-item`,
2067
+ ref: c,
2068
+ class: O.value,
2892
2069
  style: j.value,
2893
2070
  onClick: r
2894
- }, [m(y.value), e.slots.default && e.slots.default()]);
2071
+ }, [y(h.value), e.slots.default && e.slots.default()]);
2895
2072
  }
2896
2073
  });
2897
- class tn extends ee {
2074
+ class Lt extends te {
2898
2075
  constructor(e, t) {
2899
2076
  super(e, t);
2900
2077
  }
@@ -2955,35 +2132,33 @@ class tn extends ee {
2955
2132
  label: "onClick",
2956
2133
  name: "点击事件"
2957
2134
  }
2958
- ];
2959
- var s = this;
2960
- const c = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), g = {};
2961
- g[s.viewModelId] = {
2135
+ ], s = this, i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), u = {};
2136
+ u[s.viewModelId] = {
2962
2137
  type: "events-editor",
2963
2138
  editor: {
2964
- initialData: c
2139
+ initialData: i
2965
2140
  }
2966
2141
  }, this.propertyConfig.categories.eventsEditor = {
2967
2142
  title: "事件",
2968
2143
  hideTitle: !0,
2969
- properties: g,
2144
+ properties: u,
2970
2145
  // 这个属性,标记当属性变更得时候触发重新更新属性
2971
2146
  refreshPanelAfterChanged: !0,
2972
2147
  tabId: "commands",
2973
2148
  tabName: "交互",
2974
- setPropertyRelates(d, P) {
2975
- const S = d.propertyValue;
2976
- delete e[s.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, S.events, S));
2149
+ setPropertyRelates(d, g) {
2150
+ const w = d.propertyValue;
2151
+ delete e[s.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, w.events, w));
2977
2152
  }
2978
2153
  };
2979
2154
  }
2980
2155
  }
2981
- class nn extends ee {
2156
+ class Vt extends te {
2982
2157
  constructor(e, t) {
2983
2158
  super(e, t);
2984
2159
  }
2985
2160
  getPropertyConfig(e) {
2986
- return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
2161
+ return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getbBehaviorConfig(), this.getEventPropConfig(e), this.propertyConfig;
2987
2162
  }
2988
2163
  getBasicPropConfig() {
2989
2164
  this.propertyConfig.categories.basic = {
@@ -3004,7 +2179,7 @@ class nn extends ee {
3004
2179
  type: "combo-list",
3005
2180
  textField: "value",
3006
2181
  valueField: "key",
3007
- data: [{ key: "response-toolbar-item", value: K["response-toolbar-item"].name }]
2182
+ data: [{ key: "response-toolbar-item", value: ee["response-toolbar-item"].name }]
3008
2183
  }
3009
2184
  },
3010
2185
  text: {
@@ -3021,20 +2196,30 @@ class nn extends ee {
3021
2196
  }
3022
2197
  };
3023
2198
  }
2199
+ getbBehaviorConfig() {
2200
+ this.propertyConfig.categories.behavior = {
2201
+ title: "行为",
2202
+ description: "Behavior",
2203
+ properties: {
2204
+ disabled: {
2205
+ title: "禁用",
2206
+ type: "boolean",
2207
+ description: "按钮禁用状态",
2208
+ refreshPanelAfterChanged: !0
2209
+ }
2210
+ }
2211
+ };
2212
+ }
3024
2213
  getAppearanceProperties(e) {
3025
2214
  this.propertyConfig.categories.appearance = {
3026
2215
  title: "样式",
3027
2216
  description: "Appearance",
3028
2217
  properties: {
3029
2218
  class: {
3030
- title: "class",
3031
- type: "string",
3032
- description: ""
3033
- },
3034
- style: {
3035
- title: "style",
2219
+ title: "class样式",
3036
2220
  type: "string",
3037
- description: ""
2221
+ description: "",
2222
+ $converter: "/converter/appearance.converter"
3038
2223
  }
3039
2224
  }
3040
2225
  };
@@ -3045,277 +2230,250 @@ class nn extends ee {
3045
2230
  label: "onClick",
3046
2231
  name: "点击事件"
3047
2232
  }
3048
- ], s = this, c = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), g = {};
3049
- g[s.viewModelId] = {
2233
+ ], s = this, i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), u = {};
2234
+ u[s.viewModelId] = {
3050
2235
  type: "events-editor",
3051
2236
  editor: {
3052
- initialData: c
2237
+ initialData: i
3053
2238
  }
3054
2239
  }, this.propertyConfig.categories.eventsEditor = {
3055
2240
  title: "事件",
3056
2241
  hideTitle: !0,
3057
- properties: g,
2242
+ properties: u,
3058
2243
  // 这个属性,标记当属性变更得时候触发重新更新属性
3059
2244
  refreshPanelAfterChanged: !0,
3060
2245
  tabId: "commands",
3061
2246
  tabName: "交互",
3062
- setPropertyRelates(d, P) {
3063
- const S = d.propertyValue;
3064
- delete e[s.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, S.events, S));
2247
+ setPropertyRelates(d, g) {
2248
+ const w = d.propertyValue;
2249
+ delete e[s.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, w.events, w));
3065
2250
  }
3066
2251
  };
3067
2252
  }
3068
2253
  }
3069
- function on(n, e) {
3070
- Ae();
3071
- const t = M(!1), s = M(!1);
3072
- let c = !1, g = !1;
3073
- function d(w) {
2254
+ function Ut(o, e) {
2255
+ function t(g) {
3074
2256
  return !1;
3075
2257
  }
3076
- function P(w) {
3077
- }
3078
- function S() {
3079
- return "";
3080
- }
3081
- function y(w, j) {
3082
- return j.text = w.label, j;
3083
- }
3084
- function T(w, j, I) {
3085
- const D = n.schema;
3086
- if ((D.appearance && D.appearance.class || "").split(" ").includes("f-form-layout")) {
3087
- const v = String(w.innerText), m = U("form-group");
3088
- return m.editor = I, m.label = v, m;
3089
- }
3090
- return I;
3091
- }
3092
- function p() {
2258
+ function s() {
3093
2259
  return !1;
3094
2260
  }
3095
2261
  function i() {
3096
- return !g;
2262
+ return !0;
3097
2263
  }
3098
- function f() {
2264
+ function u() {
3099
2265
  return !1;
3100
2266
  }
3101
- function l() {
3102
- return c;
3103
- }
3104
- function C(w) {
3105
- let j;
3106
- switch (n.schema.type) {
2267
+ function d(g) {
2268
+ let w;
2269
+ switch (o.schema.type) {
3107
2270
  case "tab-toolbar-item":
3108
- j = new tn(w, e);
2271
+ w = new Lt(g, e);
3109
2272
  break;
3110
2273
  default:
3111
- j = new nn(w, e);
2274
+ w = new Vt(g, e);
3112
2275
  }
3113
- return j.getPropertyConfig(n.schema);
2276
+ return w.getPropertyConfig(o.schema);
3114
2277
  }
3115
2278
  return {
3116
- canAccepts: d,
3117
- checkCanAddComponent: f,
2279
+ canAccepts: t,
2280
+ checkCanMoveComponent: s,
3118
2281
  checkCanDeleteComponent: i,
3119
- checkCanMoveComponent: p,
3120
- getStyles: S,
3121
- hideNestedPaddingInDesginerView: l,
3122
- onAcceptNewChildElement: T,
3123
- onAcceptMovedChildElement: P,
3124
- onResolveNewComponentSchema: y,
3125
- getPropsConfig: C,
3126
- triggerBelongedComponentToMoveWhenMoved: t,
3127
- triggerBelongedComponentToDeleteWhenDeleted: s
2282
+ checkCanAddComponent: u,
2283
+ getPropsConfig: d
3128
2284
  };
3129
2285
  }
3130
- const Re = /* @__PURE__ */ z({
2286
+ const xe = /* @__PURE__ */ W({
3131
2287
  name: "FResponseToolbarItemDesign",
3132
2288
  props: Me,
3133
2289
  emits: ["Click"],
3134
- setup(n, e) {
2290
+ setup(o, e) {
3135
2291
  M(), M();
3136
- const t = M(n.alignment), s = {
2292
+ const t = M(o.alignment), s = {
3137
2293
  id: "__more_buttons__",
3138
2294
  text: "More"
3139
- }, c = M(new J(s));
3140
- F(() => c.value.children.length > 0);
3141
- const g = M(), d = V("designer-host-service"), P = V("design-item-context"), S = on(P, d), y = Pe(g, P, S);
2295
+ }, i = M(new Q(s));
2296
+ F(() => i.value.children.length > 0);
2297
+ const u = M(), d = V("designer-host-service"), g = V("design-item-context"), w = Ut(g, d), h = ve(u, g, w);
3142
2298
  V("toolbar-item-handler", () => {
3143
- }), H(() => {
3144
- g.value.componentInstance = y;
3145
- }), e.expose(y.value);
3146
- function T() {
2299
+ }), G(() => {
2300
+ u.value.componentInstance = h;
2301
+ }), e.expose(h.value);
2302
+ function b() {
3147
2303
  const f = {
3148
2304
  "f-icon": !0
3149
- }, l = n.icon ? n.icon.trim() : "";
3150
- return Y(f, l);
2305
+ }, v = o.icon ? o.icon.trim() : "";
2306
+ return Z(f, v);
3151
2307
  }
3152
- function p() {
3153
- return !!(n.icon && n.icon.trim());
2308
+ function c() {
2309
+ return !!(o.icon && o.icon.trim());
3154
2310
  }
3155
- function i() {
2311
+ function l() {
3156
2312
  const f = {
3157
2313
  btn: !0,
3158
2314
  "f-rt-btn": !0,
3159
2315
  "f-btn-ml": t.value === "right",
3160
2316
  "f-btn-mr": t.value === "left",
3161
- "btn-icontext": !!(n.icon && n.icon.trim())
2317
+ "btn-icontext": !!(o.icon && o.icon.trim()),
2318
+ disabled: o.disabled === !0
3162
2319
  };
3163
- return Y(f, n.class);
2320
+ return Z(f, o.class);
3164
2321
  }
3165
- return H(() => {
3166
- }), ie(() => {
3167
- }), () => b("div", {
3168
- ref: g,
3169
- "data-dragref": `${P.schema.id}-container`,
2322
+ return () => m("div", {
2323
+ ref: u,
2324
+ "data-dragref": `${g.schema.id}-container`,
3170
2325
  class: "farris-component position-relative",
3171
2326
  style: "display:inline-block!important;"
3172
- }, [b("button", {
2327
+ }, [m("button", {
3173
2328
  type: "button",
3174
- class: i(),
3175
- id: n.id
3176
- }, [p() && b("i", {
3177
- class: T()
3178
- }, null), n.text])]);
2329
+ class: l(),
2330
+ id: o.id
2331
+ }, [c() && m("i", {
2332
+ class: b()
2333
+ }, null), o.text])]);
3179
2334
  }
3180
- }), Ie = /* @__PURE__ */ z({
2335
+ }), Be = /* @__PURE__ */ W({
3181
2336
  name: "FResponseToolbarDesign",
3182
- props: Ot,
2337
+ props: Et,
3183
2338
  emits: ["Click"],
3184
- setup(n, e) {
3185
- const t = M(n.items);
2339
+ setup(o, e) {
2340
+ const t = M(o.items);
3186
2341
  let s = new Array(t.value.length).fill(M());
3187
- const c = M(), g = M(), d = M(n.alignment), P = {
2342
+ const i = M(), u = M(), d = M(o.alignment), g = {
3188
2343
  id: "__more_buttons__",
3189
2344
  text: "More"
3190
- }, S = M(new J(P)), y = ke();
3191
- F(() => S.value.children.length > 0);
3192
- const T = M(), p = V("designer-host-service"), i = V("design-item-context"), f = Xt(i.schema, p, i), l = Pe(T, i, f);
3193
- V("toolbar-item-handler", () => {
3194
- }), H(() => {
3195
- T.value.componentInstance = l;
3196
- }), e.expose(l.value);
3197
- const C = F(() => Y({
2345
+ }, w = M(new Q(g)), h = ke();
2346
+ F(() => w.value.children.length > 0);
2347
+ const b = M(), c = V("designer-host-service"), l = V("design-item-context"), f = jt(l, c), v = ve(b, l, f), E = V("toolbar-item-handler", () => {
2348
+ });
2349
+ G(() => {
2350
+ b.value.componentInstance = v;
2351
+ }), e.expose(v.value);
2352
+ function O() {
2353
+ E && E();
2354
+ }
2355
+ const j = F(() => Z({
3198
2356
  "f-toolbar": !0,
3199
2357
  "f-response-toolbar": !0,
3200
2358
  "position-relative": !0
3201
- }, n.customClass)), w = F(() => ({
2359
+ }, o.customClass)), _ = F(() => ({
3202
2360
  "d-flex": !0,
3203
2361
  "flex-nowrap": !0,
3204
2362
  "justify-content-end": d.value === "right",
3205
2363
  "justify-content-start": d.value === "left"
3206
2364
  })), {
3207
- renderToolbarDropdown: j,
2365
+ renderToolbarDropdown: D,
3208
2366
  clearAllDropDown: I
3209
- } = Lt(n, y, l);
3210
- function D() {
3211
- t.value.filter((u) => u.children && u.children.length > 0).forEach((u) => {
3212
- u.expanded = !1;
3213
- }), S.value.expanded = !1, I();
2367
+ } = At(o, h, v);
2368
+ function S() {
2369
+ t.value.filter((n) => n.children && n.children.length > 0).forEach((n) => {
2370
+ n.expanded = !1;
2371
+ }), w.value.expanded = !1, I();
3214
2372
  }
3215
- const A = /* @__PURE__ */ new Map(), $ = [];
3216
- function v(u) {
3217
- const r = g.value;
3218
- let o = u;
3219
- const a = Array.from(r.children), h = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
3220
- if (h) {
3221
- const N = h.computedStyleMap().get("margin-left"), _ = h.computedStyleMap().get("margin-right"), W = (N ? N.value : 0) + h.getBoundingClientRect().width + (_ ? _.value : 0);
3222
- o -= W;
2373
+ const k = /* @__PURE__ */ new Map(), y = [];
2374
+ function x(n) {
2375
+ const a = u.value;
2376
+ let p = n;
2377
+ const T = Array.from(a.children), P = T[T.length - 1].id === "__more_buttons__" ? T[T.length - 1] : null;
2378
+ if (P) {
2379
+ const $ = P.computedStyleMap().get("margin-left"), L = P.computedStyleMap().get("margin-right"), H = ($ ? $.value : 0) + P.getBoundingClientRect().width + (L ? L.value : 0);
2380
+ p -= H;
3223
2381
  }
3224
- const B = a.filter((N) => N.id !== "__more_buttons__");
3225
- for (const N of B) {
3226
- const _ = N.computedStyleMap().get("margin-left"), W = N.computedStyleMap().get("margin-right"), q = (_ ? _.value : 0) + N.getBoundingClientRect().width + (W ? W.value : 0);
3227
- o < q ? (A.set(N.id, !0), $.push({
3228
- id: N.id,
3229
- width: q
3230
- })) : o -= q;
2382
+ const B = T.filter(($) => $.id !== "__more_buttons__");
2383
+ for (const $ of B) {
2384
+ const L = $.computedStyleMap().get("margin-left"), H = $.computedStyleMap().get("margin-right"), J = (L ? L.value : 0) + $.getBoundingClientRect().width + (H ? H.value : 0);
2385
+ p < J ? (k.set($.id, !0), y.push({
2386
+ id: $.id,
2387
+ width: J
2388
+ })) : p -= J;
3231
2389
  }
3232
- if ($.length)
3233
- for (let N = $.length - 1; N >= 0; N--) {
3234
- const _ = $[N].width;
3235
- if (o >= _)
3236
- o -= _, A.delete($[N].id), $.pop();
2390
+ if (y.length)
2391
+ for (let $ = y.length - 1; $ >= 0; $--) {
2392
+ const L = y[$].width;
2393
+ if (p >= L)
2394
+ p -= L, k.delete(y[$].id), y.pop();
3237
2395
  else
3238
2396
  break;
3239
2397
  }
3240
- const E = Object.assign({}, S.value);
3241
- E.children = [];
3242
- const R = new J(E), L = t.value.reduce((N, _) => (A.has(_.id) && R.children.push(_), _.visible = !A.has(_.id), N.push(_), N), []);
3243
- S.value = R, t.value = L;
2398
+ const N = Object.assign({}, w.value);
2399
+ N.children = [];
2400
+ const U = new Q(N), q = t.value.reduce(($, L) => (k.has(L.id) && U.children.push(L), L.visible = !k.has(L.id), $.push(L), $), []);
2401
+ w.value = U, t.value = q;
3244
2402
  }
3245
- const m = new ResizeObserver((u) => {
3246
- if (u.length) {
3247
- const o = u[0].contentRect.width, h = g.value.getBoundingClientRect().width;
3248
- (o < h || $.length) && v(o);
2403
+ const A = new ResizeObserver((n) => {
2404
+ if (n.length) {
2405
+ const p = n[0].contentRect.width, P = u.value.getBoundingClientRect().width;
2406
+ (p < P || y.length) && x(p);
3249
2407
  }
3250
2408
  });
3251
- H(() => {
3252
- const u = c.value;
3253
- m.observe(u), document.body.addEventListener("click", D);
3254
- }), ie(() => {
3255
- m.disconnect(), document.body.removeEventListener("click", D);
3256
- }), G(() => n.items, () => {
3257
- t.value = n.items;
2409
+ G(() => {
2410
+ const n = i.value;
2411
+ A.observe(n), document.body.addEventListener("click", S);
2412
+ }), be(() => {
2413
+ A.disconnect(), document.body.removeEventListener("click", S);
2414
+ }), z(() => o.items, () => {
2415
+ t.value = o.items;
3258
2416
  }, {
3259
2417
  deep: !0
3260
- }), G(t, (u) => {
2418
+ }), z(t, (n) => {
3261
2419
  s = new Array(t.value.length).fill(M());
3262
2420
  });
3263
- function x(u, r, o, a) {
3264
- i && i.setupContext && i.setupContext.emit("selectionChange", u, r, o, a);
2421
+ function C(n, a, p, T) {
2422
+ l && l.setupContext && l.setupContext.emit("selectionChange", n, a, p, T);
3265
2423
  }
3266
- function k() {
3267
- const u = g.value.querySelector(".dgComponentFocused.dgComponentSelected");
3268
- u == null || u.classList.remove("dgComponentSelected"), u == null || u.classList.remove("dgComponentFocused");
2424
+ function r() {
2425
+ const n = u.value.querySelector(".dgComponentFocused.dgComponentSelected");
2426
+ n == null || n.classList.remove("dgComponentSelected"), n == null || n.classList.remove("dgComponentFocused"), O();
3269
2427
  }
3270
- return () => b("div", {
3271
- ref: T,
3272
- "data-dragref": `${i.schema.id}-container`,
3273
- class: C.value
3274
- }, [b("div", {
3275
- ref: c,
3276
- class: w.value
3277
- }, [b("div", {
3278
- ref: g,
2428
+ return () => m("div", {
2429
+ ref: b,
2430
+ "data-dragref": `${l.schema.id}-container`,
2431
+ class: j.value
2432
+ }, [m("div", {
2433
+ ref: i,
2434
+ class: _.value
2435
+ }, [m("div", {
2436
+ ref: u,
3279
2437
  class: "d-inline-block f-response-content",
3280
2438
  style: "white-space: nowrap;"
3281
- }, [t.value.map((u, r) => b(Be, {
3282
- ref: s[r],
2439
+ }, [t.value.map((n, a) => m(Ee, {
2440
+ ref: s[a],
3283
2441
  class: "p-0 display-inline-block",
3284
- modelValue: u,
3285
- "onUpdate:modelValue": (o) => u = o,
2442
+ modelValue: n,
2443
+ "onUpdate:modelValue": (p) => n = p,
3286
2444
  canMove: !0,
3287
2445
  childType: "response-toolbar-item",
3288
2446
  childLabel: "按钮",
3289
2447
  contentKey: "buttons",
3290
- componentId: n.componentId,
3291
- id: u.id,
2448
+ componentId: o.componentId,
2449
+ id: n.id,
3292
2450
  style: "padding:0 !important;display:inline-block",
3293
- onSelectionChange: x,
3294
- onRemoveComponent: k
2451
+ onSelectionChange: C,
2452
+ onRemoveComponent: r
3295
2453
  }, {
3296
2454
  default: () => {
3297
- var o;
3298
- return [b(Re, {
3299
- id: u.id,
3300
- disable: u.disable,
3301
- text: u.text,
3302
- icon: u.icon,
3303
- class: ((o = u.appearance) == null ? void 0 : o.class) || "btn-secondary",
3304
- alignment: n.alignment || "right",
3305
- componentId: n.componentId
2455
+ var p;
2456
+ return [m(xe, {
2457
+ id: n.id,
2458
+ disabled: n.disabled,
2459
+ text: n.text,
2460
+ icon: n.icon,
2461
+ class: ((p = n.appearance) == null ? void 0 : p.class) || "btn-secondary",
2462
+ alignment: o.alignment || "right",
2463
+ componentId: o.componentId
3306
2464
  }, null)];
3307
2465
  }
3308
2466
  }))])])]);
3309
2467
  }
3310
- }), ye = de;
3311
- Z.register = (n, e, t) => {
3312
- n["response-toolbar"] = Z, e["response-toolbar"] = de;
2468
+ }), me = le;
2469
+ K.register = (o, e, t) => {
2470
+ o["response-toolbar"] = K, e["response-toolbar"] = le;
3313
2471
  };
3314
- Z.registerDesigner = (n, e, t) => {
3315
- n["response-toolbar"] = Ie, e["response-toolbar"] = de, n["response-toolbar-item"] = Re, e["response-toolbar-item"] = $t;
2472
+ K.registerDesigner = (o, e, t) => {
2473
+ o["response-toolbar"] = Be, e["response-toolbar"] = le, o["response-toolbar-item"] = xe, e["response-toolbar-item"] = xt;
3316
2474
  };
3317
- Ue(Z);
3318
- const rn = {
2475
+ Fe(K);
2476
+ const Wt = {
3319
2477
  id: { type: String, default: "" },
3320
2478
  componentId: { type: String, default: "" },
3321
2479
  type: { type: String, default: "" },
@@ -3330,104 +2488,104 @@ const rn = {
3330
2488
  */
3331
2489
  modelValue: { type: Object },
3332
2490
  ignore: { type: Boolean, default: !1 }
3333
- }, ve = /* @__PURE__ */ z({
2491
+ }, ge = /* @__PURE__ */ W({
3334
2492
  name: "FDesignerTemplateItem",
3335
- props: rn,
2493
+ props: Wt,
3336
2494
  emits: ["selectionChange"],
3337
- setup(n, e) {
2495
+ setup(o, e) {
3338
2496
  const t = M(), s = F(() => ({
3339
2497
  "farris-component": !0
3340
2498
  }));
3341
- function c(g) {
3342
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((P) => P.classList.remove("dgComponentFocused")), g && (g.preventDefault(), g.stopPropagation());
2499
+ function i(u) {
2500
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((g) => g.classList.remove("dgComponentFocused")), u && (u.preventDefault(), u.stopPropagation());
3343
2501
  const d = t.value;
3344
2502
  if (d) {
3345
- const P = document.getElementsByClassName("dgComponentSelected");
3346
- P && P.length === 1 && P[0] === t.value || (Array.from(P).forEach((y) => y.classList.remove("dgComponentSelected")), d.classList.add("dgComponentFocused"));
2503
+ const g = document.getElementsByClassName("dgComponentSelected");
2504
+ g && g.length === 1 && g[0] === t.value || (Array.from(g).forEach((h) => h.classList.remove("dgComponentSelected")), d.classList.add("dgComponentFocused"));
3347
2505
  }
3348
- X.value++;
2506
+ se.value++;
3349
2507
  }
3350
- return () => b("div", {
3351
- id: `${n.id}-design-item`,
2508
+ return () => m("div", {
2509
+ id: `${o.id}-design-item`,
3352
2510
  ref: t,
3353
2511
  class: s.value,
3354
- onClick: c
2512
+ onClick: i
3355
2513
  }, [e.slots.default && e.slots.default()]);
3356
2514
  }
3357
- }), sn = /* @__PURE__ */ z({
2515
+ }), qt = /* @__PURE__ */ W({
3358
2516
  name: "FPageHeaderDesign",
3359
- props: it,
3360
- emits: ["Click"],
3361
- setup(n, e) {
3362
- const t = M(), s = V("designer-host-service"), c = V("design-item-context"), g = pt(c.schema, s), d = ct(t, c, g), P = M(c.schema.toolbar || {
2517
+ props: nt,
2518
+ emits: ["click"],
2519
+ setup(o, e) {
2520
+ const t = M(), s = V("designer-host-service"), i = V("design-item-context"), u = it(i.schema, s), d = st(t, i, u), g = M(i.schema.toolbar || {
3363
2521
  type: "response-toolbar",
3364
2522
  buttons: []
3365
- }), S = M(ye(P.value));
3366
- H(() => {
2523
+ }), w = M(me(g.value));
2524
+ G(() => {
3367
2525
  t.value.componentInstance = d;
3368
- }), G(() => c.schema.toolbar, () => {
3369
- P.value = c.schema.toolbar || {
2526
+ }), z(() => i.schema.toolbar, () => {
2527
+ g.value = i.schema.toolbar || {
3370
2528
  type: "response-toolbar",
3371
2529
  buttons: []
3372
- }, S.value = ye(P.value);
2530
+ }, w.value = me(g.value);
3373
2531
  }, {
3374
2532
  deep: !0
3375
2533
  });
3376
- const y = F(() => [...S.value.items]);
3377
- function T(p, i, f, l) {
3378
- c && c.setupContext && c.setupContext.emit("selectionChange", p, i, f, l);
2534
+ const h = F(() => [...w.value.items]);
2535
+ function b(c, l, f, v) {
2536
+ i && i.setupContext && i.setupContext.emit("selectionChange", c, l, f, v);
3379
2537
  }
3380
- return e.expose(d.value), () => b("div", {
2538
+ return e.expose(d.value), () => m("div", {
3381
2539
  ref: t
3382
- }, [b("nav", {
2540
+ }, [m("nav", {
3383
2541
  class: "f-page-header-base"
3384
- }, [b("div", {
2542
+ }, [m("div", {
3385
2543
  class: "f-title"
3386
- }, [b(ve, null, {
3387
- default: () => [b("span", {
2544
+ }, [m(ge, null, {
2545
+ default: () => [m("span", {
3388
2546
  class: "f-title-icon f-text-orna-manage"
3389
- }, [b("i", {
3390
- class: n.icon
2547
+ }, [m("i", {
2548
+ class: o.icon
3391
2549
  }, null)])]
3392
- }), b(ve, null, {
3393
- default: () => [b("h4", {
2550
+ }), m(ge, null, {
2551
+ default: () => [m("h4", {
3394
2552
  class: "f-title-text"
3395
- }, [n.title])]
3396
- })]), b(Be, {
2553
+ }, [o.title])]
2554
+ })]), m(Ee, {
3397
2555
  class: "col-6 text-right",
3398
- modelValue: P.value,
3399
- "onUpdate:modelValue": (p) => P.value = p,
2556
+ modelValue: g.value,
2557
+ "onUpdate:modelValue": (c) => g.value = c,
3400
2558
  canAdd: !0,
3401
2559
  childType: "response-toolbar-item",
3402
2560
  childLabel: "按钮",
3403
2561
  contentKey: "buttons",
3404
- id: P.value.id,
3405
- componentId: n.componentId,
3406
- onSelectionChange: T
2562
+ id: g.value.id,
2563
+ componentId: o.componentId,
2564
+ onSelectionChange: b
3407
2565
  }, {
3408
- default: () => [b(Ie, {
2566
+ default: () => [m(Be, {
3409
2567
  customClass: "w-100",
3410
- items: y.value,
3411
- componentId: n.componentId
2568
+ items: h.value,
2569
+ componentId: o.componentId
3412
2570
  }, null)]
3413
2571
  })])]);
3414
2572
  }
3415
- }), fn = {
3416
- install(n) {
3417
- n.component(oe.name, oe);
2573
+ }), Yt = {
2574
+ install(o) {
2575
+ o.component(oe.name, oe);
3418
2576
  },
3419
- register(n, e, t, s) {
3420
- n["page-header"] = oe, e["page-header"] = me, s["page-header"] = { eventHandlerResolver: at };
2577
+ register(o, e, t, s) {
2578
+ o["page-header"] = oe, e["page-header"] = pe, s["page-header"] = { eventHandlerResolver: ot };
3421
2579
  },
3422
- registerDesigner(n, e, t) {
3423
- n["page-header"] = sn, e["page-header"] = me;
2580
+ registerDesigner(o, e, t) {
2581
+ o["page-header"] = qt, e["page-header"] = pe;
3424
2582
  }
3425
2583
  };
3426
2584
  export {
3427
2585
  oe as PageHeader,
3428
- fn as default,
3429
- at as eventHandlerResolver,
3430
- it as pageHeaderDesignerProps,
3431
- pe as pageHeaderProps,
3432
- me as propsResolver
2586
+ Yt as default,
2587
+ ot as eventHandlerResolver,
2588
+ nt as pageHeaderDesignerProps,
2589
+ ae as pageHeaderProps,
2590
+ pe as propsResolver
3433
2591
  };