@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,109 +1,111 @@
1
- var Te = Object.defineProperty;
2
- var Oe = (e, t, n) => t in e ? Te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var x = (e, t, n) => Oe(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { ref as v, computed as V, createVNode as h, Fragment as K, watch as N, withModifiers as Pe, withDirectives as Ve, vModelText as Ae, defineComponent as R, Teleport as De, createApp as Le, onUnmounted as Ee, inject as q, nextTick as Z, onMounted as ee, mergeProps as $e } from "vue";
5
- import { isPlainObject as se, cloneDeep as fe } from "lodash-es";
6
- import { useIdentify as xe, useHierarchy as Re, useGroupData as Ne, usePagination as Ue, useDataView as qe, useSelection as He, useEdit as Ge, useVisualDataBound as We, useVisualDataCell as _e, useVisualDataRow as ze, useVisualGroupRow as Xe, useVisualSummaryRow as Je, useVisualData as Qe } from "../data-view/index.esm.js";
7
- import { FCheckBox as te } from "../checkbox/index.esm.js";
8
- import Ye from "../list-view/index.esm.js";
9
- import Ze from "../button-edit/index.esm.js";
10
- import { resolveAppearance as Ke, getSchemaByType as ce } from "../dynamic-resolver/index.esm.js";
11
- import { useDesignerComponent as me } from "../designer-canvas/index.esm.js";
12
- import { useResponseLayoutEditorSetting as ye } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
13
- import { BaseControlProperty as et } from "../property-panel/index.esm.js/src/composition/entity/base-property";
14
- import { DgControl as tt } from "../designer-canvas/index.esm.js/src/composition/dg-control";
15
- const ge = {}, he = {};
16
- function ne(e) {
17
- const { properties: t, title: n, ignore: o } = e, a = o && Array.isArray(o), r = Object.keys(t).reduce((s, f) => ((!a || !o.find((c) => c == f)) && (s[f] = t[f].type === "object" && t[f].properties ? ne(t[f]) : fe(t[f].default)), s), {});
18
- return (!a || !o.find((s) => s == "id")) && (r.id = `${n}-${Date.now()}`), r;
1
+ var ve = Object.defineProperty;
2
+ var be = (e, t, n) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var T = (e, t, n) => be(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { ref as b, computed as B, createVNode as h, Fragment as X, watch as H, withModifiers as Ce, withDirectives as Se, vModelText as we, defineComponent as x, Teleport as Fe, createApp as ke, onUnmounted as Ie, inject as N, nextTick as te, onMounted as J, mergeProps as Me } from "vue";
5
+ import { isPlainObject as ne, cloneDeep as re } from "lodash-es";
6
+ import { useIdentify as Be, useHierarchy as Ve, useGroupData as Oe, usePagination as Te, useDataView as Pe, useSelection as Le, useEdit as Ee, useVisualDataBound as $e, useVisualDataCell as De, useVisualDataRow as Ae, useVisualGroupRow as je, useVisualSummaryRow as Re, useVisualData as xe } from "../data-view/index.esm.js";
7
+ import { FCheckBox as Q } from "../checkbox/index.esm.js";
8
+ import He from "../list-view/index.esm.js";
9
+ import Ge from "../button-edit/index.esm.js";
10
+ import { resolveAppearance as Ne } from "../dynamic-resolver/index.esm.js";
11
+ import { useDesignerComponent as se, DgControl as oe } from "../designer-canvas/index.esm.js";
12
+ import { withInstall as Ue } from "../common/index.esm.js";
13
+ const ce = {}, ue = {};
14
+ function Y(e) {
15
+ const { properties: t, title: n, ignore: l } = e, i = l && Array.isArray(l), a = Object.keys(t).reduce((r, c) => ((!i || !l.find((m) => m === c)) && (r[c] = t[c].type === "object" && t[c].properties ? Y(t[c]) : re(t[c].default)), r), {});
16
+ if (n && (!i || !l.find((r) => r === "id"))) {
17
+ const r = n.toLowerCase().replace(/-/g, "_");
18
+ a.id = `${r}_${Math.random().toString().slice(2, 6)}`;
19
+ }
20
+ return a;
19
21
  }
20
- function H(e, t = {}, n) {
21
- const o = ge[e];
22
- if (o) {
23
- let a = ne(o);
24
- const r = he[e];
25
- return a = r ? r({ getSchemaByType: H }, a, t, n) : a, a;
22
+ function de(e, t = {}, n) {
23
+ const l = ce[e];
24
+ if (l) {
25
+ let i = Y(l);
26
+ const a = ue[e];
27
+ return i = a ? a({ getSchemaByType: de }, i, t, n) : i, i;
26
28
  }
27
29
  return null;
28
30
  }
29
- function nt(e, t) {
30
- const n = ne(t);
31
- return Object.keys(e).reduce((o, a) => (o[a] && se(o[a]) && se(e[a]) ? Object.assign(o[a], e[a]) : o[a] = e[a], o), n), n;
31
+ function qe(e, t) {
32
+ const n = Y(t);
33
+ return Object.keys(n).reduce((l, i) => (l[i] && ne(l[i]) && ne(e[i] || !e[i]) ? Object.assign(l[i], e[i] || {}) : l[i] = e[i], l), n), n;
32
34
  }
33
- function ot(e, t) {
34
- return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
35
- if (t.has(a)) {
36
- const r = t.get(a);
37
- if (typeof r == "string")
38
- o[r] = e[a];
35
+ function We(e, t) {
36
+ return Object.keys(e).filter((l) => e[l] != null).reduce((l, i) => {
37
+ if (t.has(i)) {
38
+ const a = t.get(i);
39
+ if (typeof a == "string")
40
+ l[a] = e[i];
39
41
  else {
40
- const s = r(a, e[a], e);
41
- Object.assign(o, s);
42
+ const r = a(i, e[i], e);
43
+ Object.assign(l, r);
42
44
  }
43
45
  } else
44
- o[a] = e[a];
45
- return o;
46
+ l[i] = e[i];
47
+ return l;
46
48
  }, {});
47
49
  }
48
- function at(e, t, n = /* @__PURE__ */ new Map()) {
49
- const o = nt(e, t);
50
- return ot(o, n);
50
+ function _e(e, t, n = /* @__PURE__ */ new Map()) {
51
+ const l = qe(e, t);
52
+ return We(l, n);
51
53
  }
52
- function rt(e = {}) {
53
- function t(l, g, i, d) {
54
- if (typeof i == "number")
55
- return d[l].length === i;
56
- if (typeof i == "object") {
57
- const C = Object.keys(i)[0], u = i[C];
58
- if (C === "not")
59
- return Number(d[l].length) !== Number(u);
60
- if (C === "moreThan")
61
- return Number(d[l].length) >= Number(u);
62
- if (C === "lessThan")
63
- return Number(d[l].length) <= Number(u);
54
+ function ze(e = {}) {
55
+ function t(p, u, o, s) {
56
+ if (typeof o == "number")
57
+ return s[p].length === o;
58
+ if (typeof o == "object") {
59
+ const g = Object.keys(o)[0], y = o[g];
60
+ if (g === "not")
61
+ return Number(s[p].length) !== Number(y);
62
+ if (g === "moreThan")
63
+ return Number(s[p].length) >= Number(y);
64
+ if (g === "lessThan")
65
+ return Number(s[p].length) <= Number(y);
64
66
  }
65
67
  return !1;
66
68
  }
67
- function n(l, g, i, d) {
68
- return d[l] && d[l].propertyValue && String(d[l].propertyValue.value) === String(i);
69
+ function n(p, u, o, s) {
70
+ return s[p] && s[p].propertyValue && String(s[p].propertyValue.value) === String(o);
69
71
  }
70
- const o = /* @__PURE__ */ new Map([
72
+ const l = /* @__PURE__ */ new Map([
71
73
  ["length", t],
72
74
  ["getProperty", n]
73
75
  ]);
74
- Object.keys(e).reduce((l, g) => (l.set(g, e[g]), l), o);
75
- function a(l, g) {
76
- const i = l;
77
- return typeof g == "number" ? [{ target: i, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: i, operator: "getProperty", param: l, value: !!g }] : typeof g == "object" ? Object.keys(g).map((d) => {
78
- if (d === "length")
79
- return { target: i, operator: "length", param: null, value: g[d] };
80
- const C = d, u = g[d];
81
- return { target: i, operator: "getProperty", param: C, value: u };
76
+ Object.keys(e).reduce((p, u) => (p.set(u, e[u]), p), l);
77
+ function i(p, u) {
78
+ const o = p;
79
+ return typeof u == "number" ? [{ target: o, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: o, operator: "getProperty", param: p, value: !!u }] : typeof u == "object" ? Object.keys(u).map((s) => {
80
+ if (s === "length")
81
+ return { target: o, operator: "length", param: null, value: u[s] };
82
+ const g = s, y = u[s];
83
+ return { target: o, operator: "getProperty", param: g, value: y };
82
84
  }) : [];
83
85
  }
84
- function r(l) {
85
- return Object.keys(l).reduce((i, d) => {
86
- const C = a(d, l[d]);
87
- return i.push(...C), i;
86
+ function a(p) {
87
+ return Object.keys(p).reduce((o, s) => {
88
+ const g = i(s, p[s]);
89
+ return o.push(...g), o;
88
90
  }, []);
89
91
  }
90
- function s(l, g) {
91
- if (o.has(l.operator)) {
92
- const i = o.get(l.operator);
93
- return i && i(l.target, l.param, l.value, g) || !1;
92
+ function r(p, u) {
93
+ if (l.has(p.operator)) {
94
+ const o = l.get(p.operator);
95
+ return o && o(p.target, p.param, p.value, u) || !1;
94
96
  }
95
97
  return !1;
96
98
  }
97
- function f(l, g) {
98
- return r(l).reduce((C, u) => C && s(u, g), !0);
99
+ function c(p, u) {
100
+ return a(p).reduce((g, y) => g && r(y, u), !0);
99
101
  }
100
- function c(l, g) {
101
- const i = Object.keys(l), d = i.includes("allOf"), C = i.includes("anyOf"), u = d || C, y = (u ? l[u ? d ? "allOf" : "anyOf" : "allOf"] : [l]).map((k) => f(k, g));
102
- return d ? !y.includes(!1) : y.includes(!0);
102
+ function m(p, u) {
103
+ const o = Object.keys(p), s = o.includes("allOf"), g = o.includes("anyOf"), y = s || g, v = (y ? p[y ? s ? "allOf" : "anyOf" : "allOf"] : [p]).map((w) => c(w, u));
104
+ return s ? !v.includes(!1) : v.includes(!0);
103
105
  }
104
- return { parseValueSchema: c };
106
+ return { parseValueSchema: m };
105
107
  }
106
- const B = {
108
+ const I = {
107
109
  button: { type: "button", name: "按钮", icon: "Button" },
108
110
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
109
111
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -141,21 +143,22 @@ const B = {
141
143
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
142
144
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
143
145
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
144
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
145
- }, it = {}, lt = {};
146
- rt();
147
- function z(e, t, n = /* @__PURE__ */ new Map(), o = (s, f, c) => f, a = {}, r = (s) => s) {
148
- return ge[t.title] = t, he[t.title] = o, it[t.title] = a, lt[t.title] = r, (s = {}) => {
149
- const f = at(s, t, n), c = Object.keys(e).reduce((l, g) => (l[g] = e[g].default, l), {});
150
- return Object.assign(c, f);
146
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
147
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
148
+ }, Xe = {}, Je = {};
149
+ ze();
150
+ function _(e, t, n = /* @__PURE__ */ new Map(), l = (r, c, m, p) => c, i = {}, a = (r) => r) {
151
+ return ce[t.title] = t, ue[t.title] = l, Xe[t.title] = i, Je[t.title] = a, (r = {}) => {
152
+ const c = _e(r, t, n), m = Object.keys(e).reduce((p, u) => (p[u] = e[u].default, p), {});
153
+ return Object.assign(m, c);
151
154
  };
152
155
  }
153
- function oe(e, t) {
156
+ function Z(e, t) {
154
157
  return { customClass: t.class, customStyle: t.style };
155
158
  }
156
- const st = /* @__PURE__ */ new Map([
157
- ["appearance", oe]
158
- ]), ct = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-design.gitee.io/order.schema.json", dt = "order", pt = "A Farris Component", ft = "object", mt = {
159
+ const Qe = /* @__PURE__ */ new Map([
160
+ ["appearance", Z]
161
+ ]), Ye = "https://json-schema.org/draft/2020-12/schema", Ze = "https://farris-design.gitee.io/order.schema.json", Ke = "order", et = "A Farris Component", tt = "object", nt = {
159
162
  id: {
160
163
  description: "The unique identifier for a order",
161
164
  type: "string"
@@ -247,22 +250,22 @@ const st = /* @__PURE__ */ new Map([
247
250
  type: "sting",
248
251
  default: ""
249
252
  }
250
- }, yt = [
253
+ }, ot = [
251
254
  "id",
252
255
  "type"
253
- ], gt = {
254
- $schema: ct,
255
- $id: ut,
256
- title: dt,
257
- description: pt,
258
- type: ft,
259
- properties: mt,
260
- required: yt
256
+ ], lt = {
257
+ $schema: Ye,
258
+ $id: Ze,
259
+ title: Ke,
260
+ description: et,
261
+ type: tt,
262
+ properties: nt,
263
+ required: ot
261
264
  };
262
- function ht(e, t, n) {
265
+ function it(e, t, n) {
263
266
  return t;
264
267
  }
265
- const bt = "order", vt = "A Farris Component", Ct = "object", wt = {
268
+ const at = "order", rt = "A Farris Component", st = "object", ct = {
266
269
  basic: {
267
270
  description: "Basic Infomation",
268
271
  title: "基本信息",
@@ -333,7 +336,7 @@ const bt = "order", vt = "A Farris Component", Ct = "object", wt = {
333
336
  },
334
337
  {
335
338
  value: "center",
336
- name: "居中对齐"
339
+ name: "居中"
337
340
  },
338
341
  {
339
342
  value: "right",
@@ -344,12 +347,12 @@ const bt = "order", vt = "A Farris Component", Ct = "object", wt = {
344
347
  }
345
348
  }
346
349
  }
347
- }, St = {
348
- title: bt,
349
- description: vt,
350
- type: Ct,
351
- categories: wt
352
- }, ae = {
350
+ }, ut = {
351
+ title: at,
352
+ description: rt,
353
+ type: st,
354
+ categories: ct
355
+ }, K = {
353
356
  dataSource: {
354
357
  type: Array,
355
358
  default: [
@@ -368,13 +371,13 @@ const bt = "order", vt = "A Farris Component", Ct = "object", wt = {
368
371
  { id: "3", name: "开票日期", order: "asc" }
369
372
  ]
370
373
  }
371
- }, ue = z(ae, gt, st, ht, St), kt = /* @__PURE__ */ new Map([
372
- ["appearance", oe]
374
+ }, le = _(K, lt, Qe, it, ut), dt = /* @__PURE__ */ new Map([
375
+ ["appearance", Z]
373
376
  ]);
374
- function Ft(e, t, n) {
377
+ function pt(e, t, n) {
375
378
  return t;
376
379
  }
377
- const It = "https://json-schema.org/draft/2020-12/schema", Mt = "https://farris-design.gitee.io/list-view.schema.json", jt = "list-view", Bt = "A Farris Component", Tt = "object", Ot = {
380
+ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-design.gitee.io/list-view.schema.json", yt = "list-view", gt = "A Farris Component", ht = "object", vt = {
378
381
  id: {
379
382
  description: "The unique identifier for list-view",
380
383
  type: "string"
@@ -436,18 +439,18 @@ const It = "https://json-schema.org/draft/2020-12/schema", Mt = "https://farris-
436
439
  type: "boolean",
437
440
  default: !0
438
441
  }
439
- }, Pt = [
442
+ }, bt = [
440
443
  "id",
441
444
  "type"
442
- ], Vt = {
443
- $schema: It,
444
- $id: Mt,
445
- title: jt,
446
- description: Bt,
447
- type: Tt,
448
- properties: Ot,
449
- required: Pt
450
- }, At = "list-view", Dt = "A Farris Component", Lt = "object", Et = {
445
+ ], Ct = {
446
+ $schema: ft,
447
+ $id: mt,
448
+ title: yt,
449
+ description: gt,
450
+ type: ht,
451
+ properties: vt,
452
+ required: bt
453
+ }, St = "list-view", wt = "A Farris Component", Ft = "object", kt = {
451
454
  basic: {
452
455
  description: "Basic Infomation",
453
456
  title: "基本信息",
@@ -469,12 +472,12 @@ const It = "https://json-schema.org/draft/2020-12/schema", Mt = "https://farris-
469
472
  }
470
473
  }
471
474
  }
472
- }, $t = {
473
- title: At,
474
- description: Dt,
475
- type: Lt,
476
- categories: Et
477
- }, be = {
475
+ }, It = {
476
+ title: St,
477
+ description: wt,
478
+ type: Ft,
479
+ categories: kt
480
+ }, pe = {
478
481
  /** 列集合 */
479
482
  columns: {
480
483
  type: Array,
@@ -516,193 +519,193 @@ const It = "https://json-schema.org/draft/2020-12/schema", Mt = "https://farris-
516
519
  // 搜索启用高亮
517
520
  enableHighlightSearch: { type: Boolean, default: !0 }
518
521
  };
519
- z(be, Vt, kt, Ft, $t);
520
- function xt(e, t) {
521
- function n(r) {
522
- const s = [];
523
- let f = r.nextNode();
524
- for (; f; )
525
- s.push(f), f = r.nextNode();
526
- return s;
527
- }
528
- function o(r, s) {
529
- const f = document.createTreeWalker(r, NodeFilter.SHOW_TEXT);
530
- return n(f).map((i) => ({ textNode: i, text: (i.textContent || "").toLocaleLowerCase() })).map(({ textNode: i, text: d }) => {
531
- const C = [];
532
- let u = 0;
533
- for (; u < d.length; ) {
534
- const m = d.indexOf(s, u);
535
- if (m === -1)
522
+ _(pe, Ct, dt, pt, It);
523
+ function Mt(e, t) {
524
+ function n(a) {
525
+ const r = [];
526
+ let c = a.nextNode();
527
+ for (; c; )
528
+ r.push(c), c = a.nextNode();
529
+ return r;
530
+ }
531
+ function l(a, r) {
532
+ const c = document.createTreeWalker(a, NodeFilter.SHOW_TEXT);
533
+ return n(c).map((o) => ({ textNode: o, text: (o.textContent || "").toLocaleLowerCase() })).map(({ textNode: o, text: s }) => {
534
+ const g = [];
535
+ let y = 0;
536
+ for (; y < s.length; ) {
537
+ const d = s.indexOf(r, y);
538
+ if (d === -1)
536
539
  break;
537
- C.push(m), u = m + s.length;
540
+ g.push(d), y = d + r.length;
538
541
  }
539
- return C.map((m) => {
540
- const p = new Range();
541
- return p.setStart(i, m), p.setEnd(i, m + s.length), p;
542
+ return g.map((d) => {
543
+ const f = new Range();
544
+ return f.setStart(o, d), f.setEnd(o, d + r.length), f;
542
545
  });
543
546
  }).flat();
544
547
  }
545
- function a(r) {
546
- if (!CSS.highlights || (CSS.highlights.clear(), !r || !t))
548
+ function i(a) {
549
+ if (!CSS.highlights || (CSS.highlights.clear(), !a || !t))
547
550
  return;
548
- const s = o(t.value, r.toLocaleLowerCase()), f = new Highlight(...s);
549
- CSS.highlights.set("search-result", f);
551
+ const r = l(t.value, a.toLocaleLowerCase()), c = new Highlight(...r);
552
+ CSS.highlights.set("search-result", c);
550
553
  }
551
- return { search: a };
554
+ return { search: i };
552
555
  }
553
- function de(e, t, n, o, a, r, s, f, c, l) {
554
- const g = v(e.size), i = v(e.textField), d = v(e.titleField), C = v(e.disableField), u = V(() => {
555
- var F, I;
556
- return ((F = e.selection) == null ? void 0 : F.multiSelect) && ((I = e.selection) == null ? void 0 : I.showCheckbox);
556
+ function ie(e, t, n, l, i, a, r, c, m, p) {
557
+ const u = b(e.size), o = b(e.textField), s = b(e.titleField), g = b(e.disableField), y = B(() => {
558
+ var F, L;
559
+ return ((F = e.selection) == null ? void 0 : F.multiSelect) && ((L = e.selection) == null ? void 0 : L.showCheckbox);
557
560
  }), {
558
- onMouseenterItem: m,
559
- onMouseoverItem: p,
560
- onMouseoutItem: y
561
- } = r, {
561
+ onMouseenterItem: d,
562
+ onMouseoverItem: f,
563
+ onMouseoutItem: v
564
+ } = a, {
562
565
  getKey: S,
563
- listViewItemClass: k,
564
- onCheckItem: j,
565
- onClickItem: w
566
- } = s, b = V(() => ({
567
- margin: g.value === "small" ? "0.25rem 0" : "10px 0"
566
+ listViewItemClass: w,
567
+ onCheckItem: M,
568
+ onClickItem: C
569
+ } = r, k = B(() => ({
570
+ margin: u.value === "small" ? "0.25rem 0" : "10px 0"
568
571
  }));
569
- function T(F, I, O) {
570
- return F.checked = f.findIndexInSelectedItems(F) > -1, h("li", {
571
- class: k(F, I),
572
- id: S(F, I),
573
- key: S(F, I),
574
- onClick: (M) => w(M, F, I),
575
- onMouseenter: (M) => m(M, F, I),
576
- onMouseover: (M) => p(M, F, I),
577
- onMouseout: (M) => y(M, F, I)
578
- }, [u.value && h("div", {
572
+ function O(F, L, D) {
573
+ return F.checked = c.findIndexInSelectedItems(F) > -1, h("li", {
574
+ class: w(F, L),
575
+ id: S(F, L),
576
+ key: S(F, L),
577
+ onClick: (V) => C(V, F, L),
578
+ onMouseenter: (V) => d(V, F, L),
579
+ onMouseover: (V) => f(V, F, L),
580
+ onMouseout: (V) => v(V, F, L)
581
+ }, [y.value && h("div", {
579
582
  class: "f-list-select",
580
- onClick: (M) => M.stopPropagation()
581
- }, [h(te, {
582
- id: "list-" + S(F, I),
583
+ onClick: (V) => V.stopPropagation()
584
+ }, [h(Q, {
585
+ id: "list-" + S(F, L),
583
586
  customClass: "listview-checkbox",
584
- disabled: F[C.value],
587
+ disabled: F[g.value],
585
588
  checked: F.checked,
586
- "onUpdate:checked": (M) => F.checked = M,
587
- onChange: (M) => {
588
- j(F, I, !M.checked);
589
+ "onUpdate:checked": (V) => F.checked = V,
590
+ onChange: (V) => {
591
+ M(F, L, !V.checked);
589
592
  }
590
593
  }, null)]), h("div", {
591
594
  class: "f-list-content"
592
595
  }, [h("div", {
593
- style: b.value,
594
- title: F.raw[d.value] || F.raw[i.value]
595
- }, [F.raw[i.value]])])]);
596
+ style: k.value,
597
+ title: F.raw[s.value] || F.raw[o.value]
598
+ }, [F.raw[o.value]])])]);
596
599
  }
597
600
  return {
598
- renderItem: T
601
+ renderItem: O
599
602
  };
600
603
  }
601
- function Rt(e, t, n, o, a, r, s, f, c, l) {
602
- const g = v(e.multiSelect), i = v(e.disableField), {
603
- onMouseenterItem: d,
604
- onMouseoverItem: C,
605
- onMouseoutItem: u
606
- } = r, {
607
- getKey: m,
608
- listViewItemClass: p,
609
- onCheckItem: y,
604
+ function Bt(e, t, n, l, i, a, r, c, m, p) {
605
+ const u = b(e.multiSelect), o = b(e.disableField), {
606
+ onMouseenterItem: s,
607
+ onMouseoverItem: g,
608
+ onMouseoutItem: y
609
+ } = a, {
610
+ getKey: d,
611
+ listViewItemClass: f,
612
+ onCheckItem: v,
610
613
  onClickItem: S
611
- } = s;
612
- function k(w, b, T) {
613
- return t.slots.content ? h(K, null, [t.slots.content && t.slots.content({
614
- item: w.raw,
615
- index: b,
616
- selectedItem: T
614
+ } = r;
615
+ function w(C, k, O) {
616
+ return t.slots.content ? h(X, null, [t.slots.content && t.slots.content({
617
+ item: C.raw,
618
+ index: k,
619
+ selectedItem: O
617
620
  })]) : h("div", {
618
621
  style: "margin: 10px 0;"
619
- }, [w.raw.name]);
622
+ }, [C.raw.name]);
620
623
  }
621
- function j(w, b, T) {
624
+ function M(C, k, O) {
622
625
  return h("li", {
623
- class: p(w, b),
624
- id: m(w, b),
625
- key: m(w, b),
626
- onClick: (F) => S(F, w, b),
627
- onMouseenter: (F) => d(F, w, b),
628
- onMouseover: (F) => C(F, w, b),
629
- onMouseout: (F) => u(F, w, b)
630
- }, [g.value && h("div", {
626
+ class: f(C, k),
627
+ id: d(C, k),
628
+ key: d(C, k),
629
+ onClick: (F) => S(F, C, k),
630
+ onMouseenter: (F) => s(F, C, k),
631
+ onMouseover: (F) => g(F, C, k),
632
+ onMouseout: (F) => y(F, C, k)
633
+ }, [u.value && h("div", {
631
634
  class: "f-list-select",
632
635
  onClick: (F) => F.stopPropagation()
633
- }, [h(te, {
634
- id: "list-" + m(w, b),
636
+ }, [h(Q, {
637
+ id: "list-" + d(C, k),
635
638
  customClass: "listview-checkbox",
636
- disabled: w[i.value] || !w.checked,
637
- checked: w.checked,
638
- "onUpdate:checked": (F) => w.checked = F,
639
- onChange: (F) => y(w, b, !F.checked)
639
+ disabled: C[o.value] || !C.checked,
640
+ checked: C.checked,
641
+ "onUpdate:checked": (F) => C.checked = F,
642
+ onChange: (F) => v(C, k, !F.checked)
640
643
  }, null)]), h("div", {
641
644
  class: "f-list-content"
642
- }, [k(w, b, T)])]);
645
+ }, [w(C, k, O)])]);
643
646
  }
644
647
  return {
645
- renderItem: j
648
+ renderItem: M
646
649
  };
647
650
  }
648
- function Nt(e, t, n, o, a, r, s, f, c, l) {
649
- const g = v(e.multiSelect), i = v(e.disableField), {
650
- onMouseenterItem: d,
651
- onMouseoverItem: C,
652
- onMouseoutItem: u
653
- } = r, {
654
- getKey: m,
655
- listViewItemClass: p,
656
- onCheckItem: y,
651
+ function Vt(e, t, n, l, i, a, r, c, m, p) {
652
+ const u = b(e.multiSelect), o = b(e.disableField), {
653
+ onMouseenterItem: s,
654
+ onMouseoverItem: g,
655
+ onMouseoutItem: y
656
+ } = a, {
657
+ getKey: d,
658
+ listViewItemClass: f,
659
+ onCheckItem: v,
657
660
  onClickItem: S
658
- } = s, {
659
- dragstart: k,
660
- dragenter: j,
661
- dragover: w,
662
- dragend: b
663
- } = o, {
664
- removeItem: T
665
- } = c, F = V(() => ({
666
- margin: g.value ? "10px 0" : "10px 0px 10px 14px"
661
+ } = r, {
662
+ dragstart: w,
663
+ dragenter: M,
664
+ dragover: C,
665
+ dragend: k
666
+ } = l, {
667
+ removeItem: O
668
+ } = m, F = B(() => ({
669
+ margin: u.value ? "10px 0" : "10px 0px 10px 14px"
667
670
  }));
668
- function I(P) {
671
+ function L(P) {
669
672
  return h("div", {
670
673
  style: F.value
671
674
  }, [P.raw.name]);
672
675
  }
673
- function O() {
674
- return t.slots.itemContent ? t.slots.itemContent : I;
676
+ function D() {
677
+ return t.slots.itemContent ? t.slots.itemContent : L;
675
678
  }
676
- const M = O();
677
- function D(P, L, E) {
679
+ const V = D();
680
+ function A(P, $, R) {
678
681
  return h("li", {
679
- class: p(P, L),
680
- id: m(P, L),
681
- key: m(P, L),
682
- onClick: (A) => S(A, P, L),
683
- onMouseenter: (A) => d(A, P, L),
684
- onMouseover: (A) => C(A, P, L),
685
- onMouseout: (A) => u(A, P, L),
682
+ class: f(P, $),
683
+ id: d(P, $),
684
+ key: d(P, $),
685
+ onClick: (E) => S(E, P, $),
686
+ onMouseenter: (E) => s(E, P, $),
687
+ onMouseover: (E) => g(E, P, $),
688
+ onMouseout: (E) => y(E, P, $),
686
689
  draggable: "true",
687
- onDragstart: (A) => k(A, P, L),
688
- onDragenter: (A) => j(A, L),
689
- onDragend: (A) => b(A, P),
690
- onDragover: (A) => w(A, L)
691
- }, [g.value && h("div", {
690
+ onDragstart: (E) => w(E, P, $),
691
+ onDragenter: (E) => M(E, $),
692
+ onDragend: (E) => k(E, P),
693
+ onDragover: (E) => C(E, $)
694
+ }, [u.value && h("div", {
692
695
  class: "f-list-select",
693
- onClick: (A) => A.stopPropagation()
694
- }, [h(te, {
695
- id: "list-" + m(P, L),
696
+ onClick: (E) => E.stopPropagation()
697
+ }, [h(Q, {
698
+ id: "list-" + d(P, $),
696
699
  customClass: "listview-checkbox",
697
- disabled: P[i.value] || !P.checked,
700
+ disabled: P[o.value] || !P.checked,
698
701
  checked: P.checked,
699
- "onUpdate:checked": (A) => P.checked = A,
700
- onChange: (A) => y(P, L, !A.checked)
702
+ "onUpdate:checked": (E) => P.checked = E,
703
+ onChange: (E) => v(P, $, !E.checked)
701
704
  }, null)]), h("div", {
702
705
  class: "f-list-content"
703
- }, [M(P)]), h("div", {
706
+ }, [V(P)]), h("div", {
704
707
  class: "f-list-remove",
705
- onClick: (A) => T(L)
708
+ onClick: (E) => O($)
706
709
  }, [h("div", {
707
710
  class: "f-list-remove-icon"
708
711
  }, [h("i", {
@@ -714,299 +717,299 @@ function Nt(e, t, n, o, a, r, s, f, c, l) {
714
717
  }, null)])])]);
715
718
  }
716
719
  return {
717
- renderItem: D
720
+ renderItem: A
718
721
  };
719
722
  }
720
- function Ut(e, t, n, o, a, r, s, f, c, l) {
721
- var m;
722
- const g = v(((m = e.group) == null ? void 0 : m.groupFields) || []), {
723
- collpaseGroupIconClass: i
724
- } = a, {
725
- toggleGroupRow: d
726
- } = l;
727
- function C(p, y) {
728
- y.collapse = !y.collapse, n.value = d(y.collapse ? "collapse" : "expand", y, n.value);
729
- }
730
- function u(p, y, S) {
731
- return p.layer > -1 && h("div", {
723
+ function Ot(e, t, n, l, i, a, r, c, m, p) {
724
+ var d;
725
+ const u = b(((d = e.group) == null ? void 0 : d.groupFields) || []), {
726
+ collpaseGroupIconClass: o
727
+ } = i, {
728
+ toggleGroupRow: s
729
+ } = p;
730
+ function g(f, v) {
731
+ v.collapse = !v.collapse, n.value = s(v.collapse ? "collapse" : "expand", v, n.value);
732
+ }
733
+ function y(f, v, S) {
734
+ return f.layer > -1 && h("div", {
732
735
  class: "f-navlookup-recentHeader",
733
- onClick: (k) => C(k, p)
736
+ onClick: (w) => g(w, f)
734
737
  }, [h("div", {
735
738
  class: "fv-grid-group-row-icon"
736
739
  }, [h("span", {
737
- class: i(p)
740
+ class: o(f)
738
741
  }, null)]), h("div", {
739
742
  class: "f-navlookup-recommandLabel"
740
- }, [p.raw[g.value[p.layer]]])]);
743
+ }, [f.raw[u.value[f.layer]]])]);
741
744
  }
742
745
  return {
743
- renderItem: u
746
+ renderItem: y
744
747
  };
745
748
  }
746
- function qt() {
747
- const e = v(-1), t = v(""), n = v(-1), o = v(!1);
748
- function a(l, g, i) {
749
- n.value = i;
749
+ function Tt() {
750
+ const e = b(-1), t = b(""), n = b(-1), l = b(!1);
751
+ function i(p, u, o) {
752
+ n.value = o;
750
753
  }
751
- function r(l, g, i) {
752
- o.value || (n.value = i);
754
+ function a(p, u, o) {
755
+ l.value || (n.value = o);
753
756
  }
754
- function s(l, g, i) {
757
+ function r(p, u, o) {
755
758
  n.value = -1;
756
759
  }
757
- function f() {
758
- o.value = !0;
759
- }
760
760
  function c() {
761
- o.value = !1;
761
+ l.value = !0;
762
+ }
763
+ function m() {
764
+ l.value = !1;
762
765
  }
763
766
  return {
764
767
  activeIndex: e,
765
768
  focusedItemId: t,
766
769
  hoverIndex: n,
767
- onMouseenterItem: a,
768
- onMouseoverItem: r,
769
- onMouseoutItem: s,
770
- resumeHover: c,
771
- suspendHover: f
770
+ onMouseenterItem: i,
771
+ onMouseoverItem: a,
772
+ onMouseoutItem: r,
773
+ resumeHover: m,
774
+ suspendHover: c
772
775
  };
773
776
  }
774
- function Ht(e, t, n, o) {
775
- const a = v(e.idField), { dataView: r } = n, s = v(-1), f = v(!1), { activeIndex: c, focusedItemId: l, hoverIndex: g, resumeHover: i, suspendHover: d } = o;
776
- function C(y, S, k) {
777
- y.stopPropagation(), d(), S && setTimeout(() => {
778
- s.value = k, f.value = !0, S.moving = !0;
777
+ function Pt(e, t, n, l) {
778
+ const i = b(e.idField), { dataView: a } = n, r = b(-1), c = b(!1), { activeIndex: m, focusedItemId: p, hoverIndex: u, resumeHover: o, suspendHover: s } = l;
779
+ function g(v, S, w) {
780
+ v.stopPropagation(), s(), S && setTimeout(() => {
781
+ r.value = w, c.value = !0, S.moving = !0;
779
782
  });
780
783
  }
781
- function u(y, S) {
782
- if (y.preventDefault(), s.value !== S) {
783
- const k = r.value[s.value], j = r.value;
784
- j.splice(s.value, 1), j.splice(S, 0, k), s.value = S;
784
+ function y(v, S) {
785
+ if (v.preventDefault(), r.value !== S) {
786
+ const w = a.value[r.value], M = a.value;
787
+ M.splice(r.value, 1), M.splice(S, 0, w), r.value = S;
785
788
  }
786
789
  }
787
- function m(y, S) {
788
- y.preventDefault(), y.dataTransfer && (y.dataTransfer.dropEffect = "move");
790
+ function d(v, S) {
791
+ v.preventDefault(), v.dataTransfer && (v.dataTransfer.dropEffect = "move");
789
792
  }
790
- function p(y, S) {
791
- S && (S.moving = !1), r.value.forEach((k, j) => {
792
- k.__fv_index__ = j;
793
- }), f.value = !1, i(), g.value = S.raw.__fv_index__, c.value = S.raw.__fv_index__, l.value = S.raw[a.value], t.emit("change", r.value), t.emit("activeChange", S);
793
+ function f(v, S) {
794
+ S && (S.moving = !1), a.value.forEach((w, M) => {
795
+ w.__fv_index__ = M;
796
+ }), c.value = !1, o(), u.value = S.raw.__fv_index__, m.value = S.raw.__fv_index__, p.value = S.raw[i.value], t.emit("change", a.value), t.emit("activeChange", S);
794
797
  }
795
798
  return {
796
- dragstart: C,
797
- dragenter: u,
798
- dragover: m,
799
- dragend: p,
800
- isDragging: f
799
+ dragstart: g,
800
+ dragenter: y,
801
+ dragover: d,
802
+ dragend: f,
803
+ isDragging: c
801
804
  };
802
805
  }
803
- function Gt(e, t, n) {
804
- const { dataView: o } = n;
805
- function a(r) {
806
- if (r > -1 && r < o.value.length) {
807
- const s = o.value.splice(r, 1);
808
- t.emit("removeItem", s[0]);
806
+ function Lt(e, t, n) {
807
+ const { dataView: l } = n;
808
+ function i(a) {
809
+ if (a > -1 && a < l.value.length) {
810
+ const r = l.value.splice(a, 1);
811
+ t.emit("removeItem", r[0]);
809
812
  }
810
813
  }
811
- return { removeItem: a };
814
+ return { removeItem: i };
812
815
  }
813
- function Wt(e, t, n, o, a, r) {
814
- const s = v(e.idField), f = v(e.disableField), c = v(e.draggable), l = v(e.itemClass), g = v(e.selection.multiSelect ?? !1), i = v(e.selection.multiSelectMode), { isDragging: d } = o, { activeIndex: C, focusedItemId: u, hoverIndex: m } = a, { clearSelection: p, getSelectedItems: y, toggleSelectItem: S } = r, k = v(y());
815
- function j(M, D) {
816
+ function Et(e, t, n, l, i, a) {
817
+ const r = b(e.idField), c = b(e.disableField), m = b(e.draggable), p = b(e.itemClass), u = b(e.selection.multiSelect ?? !1), o = b(e.selection.multiSelectMode), { isDragging: s } = l, { activeIndex: g, focusedItemId: y, hoverIndex: d } = i, { clearSelection: f, getSelectedItems: v, toggleSelectItem: S } = a, w = b(v());
818
+ function M(V, A) {
816
819
  const P = {
817
820
  "f-listview-item": !0,
818
821
  "f-list-view-group-item": !0,
819
- "f-list-view-draggable-item": c.value,
820
- "f-un-click": !M.checked,
821
- "f-un-select": !!M.raw[f.value],
822
+ "f-list-view-draggable-item": m.value,
823
+ "f-un-click": !V.checked,
824
+ "f-un-select": !!V.raw[c.value],
822
825
  // 'f-listview-active': item.raw.__fv_index__ === activeIndex.value,
823
826
  // 多选
824
- "f-listview-active": k.value.findIndex(
825
- (E) => E[s.value] === M.raw[s.value]
827
+ "f-listview-active": w.value.findIndex(
828
+ (R) => R[r.value] === V.raw[r.value]
826
829
  ) > -1,
827
- "f-listview-item-active": k.value.findIndex(
828
- (E) => E[s.value] === M.raw[s.value]
830
+ "f-listview-item-active": w.value.findIndex(
831
+ (R) => R[r.value] === V.raw[r.value]
829
832
  ) > -1,
830
- "f-listview-hover": !d.value && D === m.value,
831
- "f-listview-item-hover": !d.value && D === m.value,
832
- moving: !!M.moving
833
+ "f-listview-hover": !s.value && A === d.value,
834
+ "f-listview-item-hover": !s.value && A === d.value,
835
+ moving: !!V.moving
833
836
  };
834
- return l.value.split(" ").reduce((E, A) => (E[A] = !0, E), P), P;
837
+ return p.value.split(" ").reduce((R, E) => (R[E] = !0, R), P), P;
835
838
  }
836
- function w(M, D) {
837
- return M.raw[s.value] || "";
839
+ function C(V, A) {
840
+ return V.raw[r.value] || "";
838
841
  }
839
- const b = V(() => !g.value);
840
- function T(M, D, P) {
841
- M.checked = P, !M.raw[f.value] && (b.value && (u.value = M.raw[s.value]), S(M));
842
+ const k = B(() => !u.value);
843
+ function O(V, A, P) {
844
+ V.checked = P, !V.raw[c.value] && (k.value && (y.value = V.raw[r.value]), S(V));
842
845
  }
843
- const F = V(() => g.value && i.value === "OnCheckClearByClick"), I = V(() => !g.value || g.value && (i.value === "OnCheckAndClick" || i.value === "OnClick"));
844
- function O(M, D, P) {
845
- if (D.raw[f.value]) {
846
- M.preventDefault(), M.stopPropagation();
846
+ const F = B(() => u.value && o.value === "OnCheckClearByClick"), L = B(() => !u.value || u.value && (o.value === "OnCheckAndClick" || o.value === "OnClick"));
847
+ function D(V, A, P) {
848
+ if (A.raw[c.value]) {
849
+ V.preventDefault(), V.stopPropagation();
847
850
  return;
848
851
  }
849
- u.value = D.raw[s.value], C.value = P, F.value && p(n.value), I.value && (S(D), k.value = y()), t.emit("clickItem", { data: k.value, index: P }), t.emit("activeChange", k.value);
852
+ y.value = A.raw[r.value], g.value = P, F.value && f(), L.value && (S(A), w.value = v()), t.emit("clickItem", { data: w.value, index: P }), t.emit("activeChange", w.value);
850
853
  }
851
854
  return {
852
- getKey: w,
853
- listViewItemClass: j,
854
- onCheckItem: T,
855
- onClickItem: O
855
+ getKey: C,
856
+ listViewItemClass: M,
857
+ onCheckItem: O,
858
+ onClickItem: D
856
859
  };
857
860
  }
858
- function _t(e, t, n, o, a, r, s) {
859
- const f = v(e.view), c = v(e.view === "CardView"), l = v({}), g = v("暂无数据"), i = qt(), d = Ht(e, t, o, i), C = Gt(e, t, o), u = Wt(e, t, n, d, i, r), m = V(() => ({
861
+ function $t(e, t, n, l, i, a, r) {
862
+ const c = b(e.view), m = b(e.view === "CardView"), p = b({}), u = b("暂无数据"), o = Tt(), s = Pt(e, t, l, o), g = Lt(e, t, l), y = Et(e, t, n, s, o, a), d = B(() => ({
860
863
  "f-list-view-group": !0,
861
- "d-flex": c.value,
862
- "flex-wrap": c.value
863
- })), p = V(() => !!n.value && n.value.length > 0), y = V(() => n.value.length === 0);
864
- V(() => y.value && !t.slots.empty);
864
+ "d-flex": m.value,
865
+ "flex-wrap": m.value
866
+ })), f = B(() => !!n.value && n.value.length > 0), v = B(() => n.value.length === 0);
867
+ B(() => v.value && !t.slots.empty);
865
868
  function S() {
866
- return f.value === "SingleView" ? de : f.value === "DraggableView" ? Nt : (f.value === "ContentView" || f.value === "CardView") && t.slots.content ? Rt : de;
869
+ return c.value === "SingleView" ? ie : c.value === "DraggableView" ? Vt : (c.value === "ContentView" || c.value === "CardView") && t.slots.content ? Bt : ie;
867
870
  }
868
- const k = S(), {
869
- renderItem: j
870
- } = k(e, t, n, d, a, i, u, r, C, s), {
871
- renderItem: w
872
- } = Ut(e, t, n, d, a, i, u, r, C, s), b = [j, w];
873
- function T() {
874
- return n.value.filter((O) => O.visible !== !1).map((O, M) => b[O.type](O, M, l));
871
+ const w = S(), {
872
+ renderItem: M
873
+ } = w(e, t, n, s, i, o, y, a, g, r), {
874
+ renderItem: C
875
+ } = Ot(e, t, n, s, i, o, y, a, g, r), k = [M, C];
876
+ function O() {
877
+ return n.value.filter((D) => D.visible !== !1).map((D, V) => k[D.type](D, V, p));
875
878
  }
876
879
  function F() {
877
880
  return h("div", {
878
881
  class: "f-list-view-emptydata"
879
882
  }, [h("p", {
880
883
  class: "f-empty-title"
881
- }, [t.slots.empty ? t.slots.empty() : g.value])]);
884
+ }, [t.slots.empty ? t.slots.empty() : u.value])]);
882
885
  }
883
- function I() {
886
+ function L() {
884
887
  return h("ul", {
885
- class: m.value,
888
+ class: d.value,
886
889
  style: "list-style: none;"
887
- }, [p.value && T(), y.value && F()]);
890
+ }, [f.value && O(), v.value && F()]);
888
891
  }
889
892
  return {
890
- renderListArea: I
893
+ renderListArea: L
891
894
  };
892
895
  }
893
- function zt(e, t, n) {
894
- function o() {
896
+ function Dt(e, t, n) {
897
+ function l() {
895
898
  return t.slots.header && h("div", {
896
899
  class: "f-list-view-header"
897
900
  }, [t.slots.header()]);
898
901
  }
899
902
  return {
900
- renderHeader: o
903
+ renderHeader: l
901
904
  };
902
905
  }
903
- function pe(e, t, n) {
904
- const o = v(e.headerClass), a = v(e.placeholder), r = v(""), s = V(() => !r.value), f = V(() => !!r.value);
905
- function c(d) {
906
- r.value = "";
906
+ function ae(e, t, n) {
907
+ const l = b(e.headerClass), i = b(e.placeholder), a = b(""), r = B(() => !a.value), c = B(() => !!a.value);
908
+ function m(s) {
909
+ a.value = "";
907
910
  }
908
- N(r, (d) => {
909
- e.enableHighlightSearch && n.search(d), t.emit("afterSearch", d);
911
+ H(a, (s) => {
912
+ e.enableHighlightSearch && n.search(s), t.emit("afterSearch", s);
910
913
  });
911
- const l = V(() => {
912
- const d = {
914
+ const p = B(() => {
915
+ const s = {
913
916
  "form-group": !0,
914
917
  "farris-form-group": !0
915
918
  };
916
- return o.value && o.value.split(" ").reduce((u, m) => (u[m] = !0, u), d), d;
919
+ return l.value && l.value.split(" ").reduce((y, d) => (y[d] = !0, y), s), s;
917
920
  });
918
- function g(d) {
921
+ function u(s) {
919
922
  }
920
- function i() {
923
+ function o() {
921
924
  return h("div", {
922
925
  class: "f-list-view-header",
923
- onClick: Pe(() => g, ["prevent", "stop"])
926
+ onClick: Ce(() => u, ["prevent", "stop"])
924
927
  }, [h("div", {
925
- class: l.value
928
+ class: p.value
926
929
  }, [h("div", {
927
930
  class: "farris-input-wrap"
928
931
  }, [h("div", {
929
932
  class: "f-cmp-inputgroup"
930
933
  }, [h("div", {
931
934
  class: "input-group f-state-editable"
932
- }, [Ve(h("input", {
935
+ }, [Se(h("input", {
933
936
  class: "form-control f-utils-fill text-left",
934
- "onUpdate:modelValue": (d) => r.value = d,
937
+ "onUpdate:modelValue": (s) => a.value = s,
935
938
  name: "input-group-value",
936
939
  type: "text",
937
- placeholder: a.value,
940
+ placeholder: i.value,
938
941
  autocomplete: "off"
939
- }, null), [[Ae, r.value]]), h("div", {
942
+ }, null), [[we, a.value]]), h("div", {
940
943
  class: "input-group-append"
941
- }, [f.value && h("span", {
944
+ }, [c.value && h("span", {
942
945
  class: "input-group-text input-group-clear",
943
- onClick: (d) => c()
946
+ onClick: (s) => m()
944
947
  }, [h("i", {
945
948
  class: "f-icon f-icon-close-circle"
946
- }, null)]), s.value && h("span", {
949
+ }, null)]), r.value && h("span", {
947
950
  class: "input-group-text"
948
951
  }, [h("span", {
949
952
  class: "f-icon f-icon-search"
950
953
  }, null)])])])])])])]);
951
954
  }
952
955
  return {
953
- renderHeader: i
956
+ renderHeader: o
954
957
  };
955
958
  }
956
- const ve = /* @__PURE__ */ R({
959
+ const fe = /* @__PURE__ */ x({
957
960
  name: "FListView",
958
- props: be,
961
+ props: pe,
959
962
  emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
960
963
  setup(e, t) {
961
- const n = v(), o = v(!0), a = v(!1), r = v([]), s = 0, f = v(e.columns), c = xe(e), l = Re(e), g = Ne(e, c), i = Ue(e), d = qe(e, /* @__PURE__ */ new Map(), l, c, i), C = He(e, d, c, r, t), u = xt(e, n), m = V(() => d.dataView.value.length), p = Ge(e, t, c), y = We(), S = _e(e, {}, y), k = ze(e, p, l, c, y, S), j = Xe(e, c, S, k), w = Je(e, c, S, k), b = Qe(e, f, d, m, s, k, j, w), {
962
- getVisualData: T
963
- } = b;
964
- r.value = T(0, m.value + s - 1);
965
- const F = V(() => {
966
- const $ = {
964
+ const n = b(), l = b(!0), i = b(!1), a = b([]), r = 0, c = b(e.columns), m = Be(e), p = Ve(e), u = Oe(e, m), o = Te(e), s = Pe(e, /* @__PURE__ */ new Map(), p, m, o), g = Le(e, s, m, a, t), y = Mt(e, n), d = B(() => s.dataView.value.length), f = Ee(e, t, m), v = $e(), S = De(e, {}, v), w = Ae(e, f, p, m, v, S), M = je(e, m, S, w), C = Re(e, m, S, w), k = xe(e, c, s, d, r, w, M, C), {
965
+ getVisualData: O
966
+ } = k;
967
+ a.value = O(0, d.value + r - 1);
968
+ const F = B(() => {
969
+ const j = {
967
970
  "f-list-view": !0,
968
971
  "f-list-view-multiple": e.multiSelect
969
972
  };
970
- return e.size !== "default" && ($[`${e.size}-item`] = !0), $;
971
- }), I = V(() => !!t.slots.footer || o.value);
972
- function O() {
973
- return e.header === "SearchBar" ? pe : e.header === "ContentHeader" ? zt : pe;
973
+ return e.size !== "default" && (j[`${e.size}-item`] = !0), j;
974
+ }), L = B(() => !!t.slots.footer || l.value);
975
+ function D() {
976
+ return e.header === "SearchBar" ? ae : e.header === "ContentHeader" ? Dt : ae;
974
977
  }
975
- const M = O(), {
976
- renderHeader: D
977
- } = M(e, t, u), {
978
+ const V = D(), {
979
+ renderHeader: A
980
+ } = V(e, t, y), {
978
981
  renderListArea: P
979
- } = _t(e, t, r, d, g, C, b);
980
- function L($) {
981
- u.search($);
982
+ } = $t(e, t, a, s, u, g, k);
983
+ function $(j) {
984
+ y.search(j);
982
985
  }
983
- function E($) {
984
- $ && (d.load($), r.value = T(0, m.value + s - 1));
986
+ function R(j) {
987
+ j && (s.load(j), a.value = O(0, d.value + r - 1));
985
988
  }
986
989
  t.expose({
987
- search: L,
988
- updateDataSource: E
990
+ search: $,
991
+ updateDataSource: R
989
992
  });
990
- function A($) {
991
- e.multiSelect && ($.preventDefault(), $.stopPropagation());
993
+ function E(j) {
994
+ e.multiSelect && (j.preventDefault(), j.stopPropagation());
992
995
  }
993
996
  return () => h("div", {
994
997
  class: F.value,
995
- onClick: A
996
- }, [D(), h("div", {
998
+ onClick: E
999
+ }, [A(), h("div", {
997
1000
  ref: n,
998
1001
  class: "f-list-view-content",
999
1002
  onMouseover: () => {
1000
- a.value = !0;
1003
+ i.value = !0;
1001
1004
  },
1002
1005
  onMouseleave: () => {
1003
- a.value = !1;
1006
+ i.value = !1;
1004
1007
  }
1005
- }, [P()]), I.value && h("div", {
1008
+ }, [P()]), L.value && h("div", {
1006
1009
  class: "f-list-view-footer"
1007
1010
  }, [t.slots.footer && t.slots.footer()])]);
1008
1011
  }
1009
- }), Xt = {
1012
+ }), At = {
1010
1013
  /**
1011
1014
  * 组件标识
1012
1015
  */
@@ -1032,58 +1035,58 @@ const ve = /* @__PURE__ */ R({
1032
1035
  */
1033
1036
  customClass: { type: Object, default: {} }
1034
1037
  };
1035
- function Jt(e, t) {
1036
- function n(o) {
1037
- o.stopPropagation(), e.disabled || t.emit("click", o);
1038
+ function jt(e, t) {
1039
+ function n(l) {
1040
+ l.stopPropagation(), e.disabled || t.emit("click", l);
1038
1041
  }
1039
1042
  return {
1040
1043
  onClickButton: n
1041
1044
  };
1042
1045
  }
1043
- function Qt(e) {
1044
- const t = V(() => {
1045
- const o = {
1046
+ function Rt(e) {
1047
+ const t = B(() => {
1048
+ const l = {
1046
1049
  "f-icon": !0
1047
1050
  };
1048
1051
  if (e.icon) {
1049
- const a = e.icon.trim().split(" ");
1050
- a && a.length && a.reduce((r, s) => (r[s] = !0, r), o);
1052
+ const i = e.icon.trim().split(" ");
1053
+ i && i.length && i.reduce((a, r) => (a[r] = !0, a), l);
1051
1054
  }
1052
- return o;
1053
- }), n = V(() => !!(e.icon && e.icon.trim()));
1055
+ return l;
1056
+ }), n = B(() => !!(e.icon && e.icon.trim()));
1054
1057
  return { iconClass: t, shouldShowIcon: n };
1055
1058
  }
1056
- const Ce = /* @__PURE__ */ R({
1059
+ const me = /* @__PURE__ */ x({
1057
1060
  name: "FButton",
1058
- props: Xt,
1061
+ props: At,
1059
1062
  emits: ["click"],
1060
1063
  setup(e, t) {
1061
1064
  const {
1062
1065
  onClickButton: n
1063
- } = Jt(e, t), {
1064
- iconClass: o,
1065
- shouldShowIcon: a
1066
- } = Qt(e), r = V(() => {
1067
- const s = {
1066
+ } = jt(e, t), {
1067
+ iconClass: l,
1068
+ shouldShowIcon: i
1069
+ } = Rt(e), a = B(() => {
1070
+ const r = {
1068
1071
  btn: !0,
1069
1072
  "btn-lg": e.size === "large",
1070
1073
  "btn-md": e.size !== "large" && e.size !== "small",
1071
1074
  "btn-sm": e.size === "small",
1072
- "btn-icontext": a.value
1075
+ "btn-icontext": i.value
1073
1076
  };
1074
- return s[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((f, c) => (f[c] = e.customClass[c], f), s), s;
1077
+ return r[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((c, m) => (c[m] = e.customClass[m], c), r), r;
1075
1078
  });
1076
1079
  return () => h("button", {
1077
- class: r.value,
1080
+ class: a.value,
1078
1081
  disabled: e.disabled,
1079
- onClick: (s) => n(s)
1080
- }, [a.value && h("i", {
1081
- class: o.value
1082
+ onClick: (r) => n(r)
1083
+ }, [i.value && h("i", {
1084
+ class: l.value
1082
1085
  }, null), t.slots.default && t.slots.default()]);
1083
1086
  }
1084
- }), Yt = /* @__PURE__ */ new Map([
1085
- ["appearance", oe]
1086
- ]), Zt = "https://json-schema.org/draft/2020-12/schema", Kt = "https://farris-design.gitee.io/combo-list.schema.json", en = "combo-list", tn = "A Farris Input Component", nn = "object", on = {
1087
+ }), xt = /* @__PURE__ */ new Map([
1088
+ ["appearance", Z]
1089
+ ]), Ht = "https://json-schema.org/draft/2020-12/schema", Gt = "https://farris-design.gitee.io/combo-list.schema.json", Nt = "combo-list", Ut = "A Farris Input Component", qt = "object", Wt = {
1087
1090
  id: {
1088
1091
  description: "The unique identifier for a combo list",
1089
1092
  type: "string"
@@ -1116,6 +1119,11 @@ const Ce = /* @__PURE__ */ R({
1116
1119
  type: "boolean",
1117
1120
  default: !1
1118
1121
  },
1122
+ enableClear: {
1123
+ description: "",
1124
+ type: "boolean",
1125
+ default: !0
1126
+ },
1119
1127
  editable: {
1120
1128
  description: "",
1121
1129
  type: "boolean",
@@ -1140,6 +1148,11 @@ const Ce = /* @__PURE__ */ R({
1140
1148
  type: "string",
1141
1149
  default: ""
1142
1150
  },
1151
+ idField: {
1152
+ description: "",
1153
+ type: "string",
1154
+ default: "id"
1155
+ },
1143
1156
  valueField: {
1144
1157
  description: "",
1145
1158
  type: "string",
@@ -1199,27 +1212,28 @@ const Ce = /* @__PURE__ */ R({
1199
1212
  type: "sting",
1200
1213
  default: ""
1201
1214
  }
1202
- }, an = [
1215
+ }, _t = [
1203
1216
  "id",
1204
1217
  "type"
1205
- ], rn = [
1218
+ ], zt = [
1206
1219
  "id",
1207
1220
  "appearance",
1208
- "binding"
1209
- ], ln = {
1210
- $schema: Zt,
1211
- $id: Kt,
1212
- title: en,
1213
- description: tn,
1214
- type: nn,
1215
- properties: on,
1216
- required: an,
1217
- ignore: rn
1221
+ "binding",
1222
+ "visible"
1223
+ ], Xt = {
1224
+ $schema: Ht,
1225
+ $id: Gt,
1226
+ title: Nt,
1227
+ description: Ut,
1228
+ type: qt,
1229
+ properties: Wt,
1230
+ required: _t,
1231
+ ignore: zt
1218
1232
  };
1219
- function sn(e, t, n) {
1233
+ function Jt(e, t, n) {
1220
1234
  return t;
1221
1235
  }
1222
- const re = {
1236
+ const ee = {
1223
1237
  /**
1224
1238
  * 组件标识
1225
1239
  */
@@ -1380,12 +1394,12 @@ const re = {
1380
1394
  */
1381
1395
  beforeOpen: { type: Function, default: null },
1382
1396
  searchOption: {
1383
- type: Object,
1397
+ type: [Boolean, Function],
1384
1398
  default: !1
1385
1399
  },
1386
1400
  // 搜索启用高亮
1387
1401
  enableHighlightSearch: { type: Boolean, default: !0 }
1388
- }, we = z(re, ln, Yt, sn), cn = {
1402
+ }, ye = _(ee, Xt, xt, Jt), Qt = {
1389
1403
  dataSource: { type: Array, default: [] },
1390
1404
  enableSearch: { type: Boolean, default: !1 },
1391
1405
  idField: { type: String, default: "id" },
@@ -1401,201 +1415,204 @@ const re = {
1401
1415
  onSelectionChange: { type: Function, default: () => {
1402
1416
  } },
1403
1417
  searchOption: {
1404
- type: Object,
1418
+ type: [Boolean, Function],
1405
1419
  default: !1
1406
1420
  },
1407
1421
  // 搜索启用高亮
1408
1422
  enableHighlightSearch: { type: Boolean, default: !0 }
1409
- }, un = /* @__PURE__ */ R({
1423
+ }, Yt = /* @__PURE__ */ x({
1410
1424
  name: "FComboListContainer",
1411
- props: cn,
1425
+ props: Qt,
1412
1426
  emits: ["selectionChange"],
1413
1427
  setup(e, t) {
1414
- const n = v(), o = v(e.dataSource), a = v([]), r = v(e.separator), s = v(e.width), f = v(e.maxHeight), c = v(String(e.selectedValues).split(r.value)), l = V(() => e.multiSelect), g = V(() => ({
1428
+ const n = b(), l = b(e.dataSource), i = b([]), a = b(e.separator), r = b(e.width), c = b(e.maxHeight), m = b(String(e.selectedValues).split(a.value)), p = B(() => e.multiSelect), u = B(() => ({
1415
1429
  enableSelectRow: !0,
1416
1430
  multiSelect: e.multiSelect,
1417
1431
  multiSelectMode: "OnCheckAndClick",
1418
- showCheckbox: l.value,
1432
+ showCheckbox: p.value,
1419
1433
  showSelectAll: !1,
1420
1434
  showSelection: !0
1421
1435
  }));
1422
- N(e.dataSource, () => {
1423
- o.value = e.dataSource;
1436
+ H(e.dataSource, () => {
1437
+ l.value = e.dataSource;
1424
1438
  });
1425
- const i = V(() => e.enableSearch ? "SearchBar" : "ContentHeader"), d = V(() => {
1426
- const m = {};
1427
- return s.value !== void 0 && (m.width = `${s.value}px`), f.value !== void 0 && f.value > 0 && (m.maxHeight = `${f.value}px`), m;
1439
+ const o = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), s = B(() => {
1440
+ const d = {};
1441
+ return r.value !== void 0 && (d.width = `${r.value}px`), c.value !== void 0 && c.value > 0 && (d.maxHeight = `${c.value}px`), d;
1428
1442
  });
1429
- function C(m) {
1430
- a.value = m.map((p) => Object.assign({}, p)), c.value = m.map((p) => p[e.idField]), t.emit("selectionChange", a.value);
1443
+ function g(d) {
1444
+ i.value = d.map((f) => Object.assign({}, f)), m.value = d.map((f) => f[e.idField]), t.emit("selectionChange", i.value);
1431
1445
  }
1432
- function u(m) {
1446
+ function y(d) {
1433
1447
  if (e.enableHighlightSearch)
1434
1448
  return;
1435
- let p = [];
1436
- typeof e.searchOption == "function" ? p = o.value.filter((y) => e.searchOption(m, y)) : p = o.value.filter((y) => y[e.valueField].indexOf(m) > -1 || y[e.textField].indexOf(m) > -1), n.value.updateDataSource(p);
1449
+ let f = [];
1450
+ const {
1451
+ searchOption: v
1452
+ } = e;
1453
+ typeof v == "function" ? f = l.value.filter((S) => v(d, S)) : f = l.value.filter((S) => S[e.valueField].indexOf(d) > -1 || S[e.textField].indexOf(d) > -1), n.value.updateDataSource(f);
1437
1454
  }
1438
- return N([() => e.selectedValues], ([m]) => {
1439
- c.value = m.split(r.value);
1455
+ return H([() => e.selectedValues], ([d]) => {
1456
+ m.value = d.split(a.value);
1440
1457
  }), () => h("div", {
1441
1458
  class: "f-combo-list-container pl-1",
1442
- style: d.value
1443
- }, [h(Ye, {
1459
+ style: s.value
1460
+ }, [h(He, {
1444
1461
  ref: n,
1445
1462
  size: "small",
1446
1463
  itemClass: "f-combo-list-item",
1447
- header: i.value,
1464
+ header: o.value,
1448
1465
  headerClass: "f-combo-list-search-box",
1449
- data: o.value,
1466
+ data: l.value,
1450
1467
  idField: e.idField,
1451
1468
  textField: e.textField,
1452
1469
  titleField: e.titleField,
1453
1470
  multiSelect: e.multiSelect,
1454
- selection: g.value,
1471
+ selection: u.value,
1455
1472
  enableHighlightSearch: e.enableHighlightSearch,
1456
- selectionValues: c.value,
1457
- onSelectionChange: C,
1458
- onAfterSearch: u
1473
+ selectionValues: m.value,
1474
+ onSelectionChange: g,
1475
+ onAfterSearch: y
1459
1476
  }, null)]);
1460
1477
  }
1461
1478
  });
1462
- function dn(e) {
1463
- const t = v(""), n = v(e.modelValue), o = v(e.data || []), a = v(e.editable);
1464
- function r(i) {
1465
- const d = String(i).split(e.separator), C = d.map((p) => [p, !0]), u = new Map(C);
1466
- return o.value.filter((p) => u.has(String(p[e.valueField]))).sort((p, y) => {
1467
- const S = d.indexOf(p[e.valueField]), k = d.indexOf(y[e.valueField]);
1468
- return S - k;
1479
+ function Zt(e) {
1480
+ const t = b(""), n = b(e.modelValue), l = b(e.data || []), i = b(e.editable);
1481
+ function a(o) {
1482
+ const s = String(o).split(e.separator), g = s.map((f) => [f, !0]), y = new Map(g);
1483
+ return l.value.filter((f) => y.has(String(f[e.valueField]))).sort((f, v) => {
1484
+ const S = s.indexOf(f[e.valueField]), w = s.indexOf(v[e.valueField]);
1485
+ return S - w;
1469
1486
  });
1470
1487
  }
1471
- function s(i) {
1472
- const d = r(i).map((C) => C[e.textField]).join(e.separator);
1473
- t.value = a.value ? d || i : d;
1488
+ function r(o) {
1489
+ const s = a(o).map((g) => g[e.textField]).join(e.separator);
1490
+ t.value = i.value ? s || o : s;
1474
1491
  }
1475
- function f(i) {
1476
- const d = i.split(e.separator).map((u) => [u, !0]), C = new Map(d);
1477
- return o.value.filter((u) => C.has(u[e.textField]));
1492
+ function c(o) {
1493
+ const s = o.split(e.separator).map((y) => [y, !0]), g = new Map(s);
1494
+ return l.value.filter((y) => g.has(y[e.textField]));
1478
1495
  }
1479
- function c(i) {
1480
- const d = {};
1481
- return d[e.idField] = i, d[e.textField] = i, [d];
1496
+ function m(o) {
1497
+ const s = {};
1498
+ return s[e.idField] = o, s[e.textField] = o, [s];
1482
1499
  }
1483
- function l(i) {
1484
- let d = f(i);
1485
- const C = d && d.length > 0;
1486
- return a.value && !C && (d = c(i)), d;
1500
+ function p(o) {
1501
+ let s = c(o);
1502
+ const g = s && s.length > 0;
1503
+ return i.value && !g && (s = m(o)), s;
1487
1504
  }
1488
- function g() {
1489
- const { url: i, method: d = "GET", headers: C = {}, body: u = null } = e.remote, m = d.toLowerCase() == "get" ? { method: d, headers: C } : { method: d, headers: C, body: u };
1490
- let p = !1;
1491
- fetch(i, m).then((y) => {
1492
- var k, j;
1493
- if (y.status === 200)
1494
- return p = !!((j = (k = y.headers) == null ? void 0 : k.get("content-type")) != null && j.includes("application/json")), p ? y.text() : y.json();
1495
- throw new Error(y.statusText);
1496
- }).then((y) => {
1497
- o.value = p ? JSON.parse(y) : y;
1498
- }).catch((y) => {
1499
- console.error(y);
1505
+ function u() {
1506
+ const { url: o, method: s = "GET", headers: g = {}, body: y = null } = e.remote, d = s.toLowerCase() === "get" ? { method: s, headers: g } : { method: s, headers: g, body: y };
1507
+ let f = !1;
1508
+ fetch(o, d).then((v) => {
1509
+ var w, M;
1510
+ if (v.status === 200)
1511
+ return f = !!((M = (w = v.headers) == null ? void 0 : w.get("content-type")) != null && M.includes("application/json")), f ? v.text() : v.json();
1512
+ throw new Error(v.statusText);
1513
+ }).then((v) => {
1514
+ l.value = f ? JSON.parse(v) : v;
1515
+ }).catch((v) => {
1516
+ console.error(v);
1500
1517
  });
1501
1518
  }
1502
- return e.remote && g(), N(() => e.data, () => {
1503
- o.value = e.data;
1504
- }), N([o], ([i]) => {
1519
+ return e.remote && u(), H(() => e.data, () => {
1520
+ l.value = e.data;
1521
+ }), H([l], ([o]) => {
1505
1522
  if (e.modelValue != null) {
1506
- const d = i.find((C) => C[e.valueField] === e.modelValue);
1507
- d && (t.value = d[e.textField]);
1523
+ const s = o.find((g) => g[e.valueField] === e.modelValue);
1524
+ s && (t.value = s[e.textField]);
1508
1525
  }
1509
- }), N(() => e.modelValue, (i) => {
1510
- n.value = i, s(i);
1511
- }), s(e.modelValue), { dataSource: o, displayText: t, editable: a, modelValue: n, getItemsByDisplayText: f, getItemsByValue: r, getSelectedItemsByDisplayText: l };
1526
+ }), H(() => e.modelValue, (o) => {
1527
+ n.value = o, r(o);
1528
+ }), r(e.modelValue), { dataSource: l, displayText: t, editable: i, modelValue: n, getItemsByDisplayText: c, getItemsByValue: a, getSelectedItemsByDisplayText: p };
1512
1529
  }
1513
- const G = /* @__PURE__ */ R({
1530
+ const U = /* @__PURE__ */ x({
1514
1531
  name: "FComboList",
1515
- props: re,
1532
+ props: ee,
1516
1533
  emits: ["clear", "update:modelValue", "change", "input"],
1517
1534
  setup(e, t) {
1518
- const n = v(), o = v(e.disabled), a = v(e.enableClear), r = v(e.enableSearch), s = v(e.readonly), {
1519
- dataSource: f,
1520
- displayText: c,
1521
- editable: l,
1522
- modelValue: g,
1523
- getSelectedItemsByDisplayText: i
1524
- } = dn(e), d = V(() => e.multiSelect), C = V(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
1525
- function u() {
1526
- !d.value && n.value && n.value.hidePopup();
1535
+ const n = b(), l = b(e.disabled), i = b(e.enableClear), a = b(e.enableSearch), r = b(e.readonly), {
1536
+ dataSource: c,
1537
+ displayText: m,
1538
+ editable: p,
1539
+ modelValue: u,
1540
+ getSelectedItemsByDisplayText: o
1541
+ } = Zt(e), s = B(() => e.multiSelect), g = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
1542
+ function y() {
1543
+ !s.value && n.value && n.value.hidePopup();
1527
1544
  }
1528
- function m(w) {
1529
- c.value = w.map((b) => b[e.textField]).join(e.separator), w.length === 1 ? g.value = w[0][e.valueField] : g.value = w.map((b) => b[e.valueField]).join(e.separator), t.emit("update:modelValue", g.value), t.emit("change", w, g.value), u();
1545
+ function d(C) {
1546
+ m.value = C.map((k) => k[e.textField]).join(e.separator), C.length === 1 ? u.value = C[0][e.valueField] : u.value = C.map((k) => k[e.valueField]).join(e.separator), t.emit("update:modelValue", u.value), t.emit("change", C, u.value), y();
1530
1547
  }
1531
- function p() {
1532
- s.value || n.value.togglePopup();
1548
+ function f() {
1549
+ r.value || n.value.togglePopup();
1533
1550
  }
1534
- function y(w) {
1535
- g.value = "", t.emit("update:modelValue", ""), t.emit("clear");
1551
+ function v(C) {
1552
+ u.value = "", t.emit("update:modelValue", ""), t.emit("clear");
1536
1553
  }
1537
- function S(w) {
1538
- const b = i(w);
1539
- m(b);
1554
+ function S(C) {
1555
+ const k = o(C);
1556
+ d(k);
1540
1557
  }
1541
- function k() {
1542
- return c.value;
1558
+ function w() {
1559
+ return m.value;
1543
1560
  }
1544
- function j(w) {
1545
- t.emit("input", w);
1561
+ function M(C) {
1562
+ t.emit("input", C);
1546
1563
  }
1547
1564
  return t.expose({
1548
- getDisplayText: k
1549
- }), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([w, b, T, F, I]) => {
1550
- o.value = w, l.value = b, a.value = T, r.value = F, s.value = I;
1551
- }), () => h(Ze, {
1565
+ getDisplayText: w
1566
+ }), H([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([C, k, O, F, L]) => {
1567
+ l.value = C, p.value = k, i.value = O, a.value = F, r.value = L;
1568
+ }), () => h(Ge, {
1552
1569
  ref: n,
1553
1570
  id: e.id,
1554
- disable: o.value,
1555
- readonly: s.value,
1571
+ disable: l.value,
1572
+ readonly: r.value,
1556
1573
  forcePlaceholder: e.forcePlaceholder,
1557
- editable: l.value,
1574
+ editable: p.value,
1558
1575
  buttonContent: e.dropDownIcon,
1559
1576
  placeholder: e.placeholder,
1560
- enableClear: a.value,
1577
+ enableClear: i.value,
1561
1578
  maxLength: e.maxLength,
1562
1579
  tabIndex: e.tabIndex,
1563
1580
  enableTitle: e.enableTitle,
1564
1581
  multiSelect: e.multiSelect,
1565
1582
  inputType: e.multiSelect ? e.viewType : "text",
1566
- modelValue: c.value,
1567
- "onUpdate:modelValue": (w) => c.value = w,
1583
+ modelValue: m.value,
1584
+ "onUpdate:modelValue": (C) => m.value = C,
1568
1585
  focusOnCreated: e.focusOnCreated,
1569
1586
  selectOnCreated: e.selectOnCreated,
1570
- onClear: y,
1571
- onClick: p,
1587
+ onClear: v,
1588
+ onClick: f,
1572
1589
  onChange: S,
1573
- onInput: j,
1590
+ onInput: M,
1574
1591
  beforeOpen: e.beforeOpen
1575
1592
  }, {
1576
- default: () => [h(un, {
1593
+ default: () => [h(Yt, {
1577
1594
  idField: e.idField,
1578
1595
  valueField: e.valueField,
1579
1596
  textField: e.textField,
1580
1597
  titleField: e.titleField,
1581
- dataSource: f.value,
1582
- selectedValues: g.value,
1598
+ dataSource: c.value,
1599
+ selectedValues: u.value,
1583
1600
  multiSelect: e.multiSelect,
1584
- enableSearch: r.value,
1601
+ enableSearch: a.value,
1585
1602
  maxHeight: e.maxHeight,
1586
1603
  enableHighlightSearch: e.enableHighlightSearch,
1587
- width: e.fitEditor ? C.value : void 0,
1588
- onSelectionChange: m
1604
+ width: e.fitEditor ? g.value : void 0,
1605
+ onSelectionChange: d
1589
1606
  }, null)]
1590
1607
  });
1591
1608
  }
1592
- }), pn = /* @__PURE__ */ new Map([
1593
- ["appearance", Ke]
1609
+ }), Kt = /* @__PURE__ */ new Map([
1610
+ ["appearance", Ne]
1594
1611
  ]);
1595
- function fn(e, t, n) {
1612
+ function en(e, t, n) {
1596
1613
  return t;
1597
1614
  }
1598
- const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-design.gitee.io/button-edit.schema.json", gn = "button-edit", hn = "A Farris Input Component", bn = "object", vn = {
1615
+ const tn = "https://json-schema.org/draft/2020-12/schema", nn = "https://farris-design.gitee.io/button-edit.schema.json", on = "button-edit", ln = "A Farris Input Component", an = "object", rn = {
1599
1616
  id: {
1600
1617
  description: "The unique identifier for a Input Group",
1601
1618
  type: "string"
@@ -1779,18 +1796,18 @@ const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-
1779
1796
  type: "string",
1780
1797
  default: ""
1781
1798
  }
1782
- }, Cn = [
1799
+ }, sn = [
1783
1800
  "id",
1784
1801
  "type"
1785
- ], wn = {
1786
- $schema: mn,
1787
- $id: yn,
1788
- title: gn,
1789
- description: hn,
1790
- type: bn,
1791
- properties: vn,
1792
- required: Cn
1793
- }, Sn = "buttonEdit", kn = "A Farris Component", Fn = "object", In = {
1802
+ ], cn = {
1803
+ $schema: tn,
1804
+ $id: nn,
1805
+ title: on,
1806
+ description: ln,
1807
+ type: an,
1808
+ properties: rn,
1809
+ required: sn
1810
+ }, un = "buttonEdit", dn = "A Farris Component", pn = "object", fn = {
1794
1811
  basic: {
1795
1812
  description: "Basic Infomation",
1796
1813
  title: "基本信息",
@@ -1861,7 +1878,7 @@ const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-
1861
1878
  },
1862
1879
  {
1863
1880
  value: "center",
1864
- name: "居中对齐"
1881
+ name: "居中"
1865
1882
  },
1866
1883
  {
1867
1884
  value: "right",
@@ -1872,12 +1889,12 @@ const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-
1872
1889
  }
1873
1890
  }
1874
1891
  }
1875
- }, Mn = {
1876
- title: Sn,
1877
- description: kn,
1878
- type: Fn,
1879
- categories: In
1880
- }, Se = {
1892
+ }, mn = {
1893
+ title: un,
1894
+ description: dn,
1895
+ type: pn,
1896
+ categories: fn
1897
+ }, ge = {
1881
1898
  /**
1882
1899
  * 组件标识
1883
1900
  */
@@ -1986,295 +2003,262 @@ const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-
1986
2003
  /** 更新方式 blur | change */
1987
2004
  updateOn: { type: String, default: "change" }
1988
2005
  };
1989
- z(Se, wn, pn, fn, Mn);
1990
- const jn = {
2006
+ _(ge, cn, Kt, en, mn);
2007
+ const yn = {
1991
2008
  popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
1992
2009
  host: { type: Object },
1993
2010
  backgroundColor: { type: String, default: "" }
1994
- }, Bn = /* @__PURE__ */ R({
2011
+ }, gn = /* @__PURE__ */ x({
1995
2012
  name: "FOverlay",
1996
- props: jn,
2013
+ props: yn,
1997
2014
  emits: ["click"],
1998
2015
  setup(e, t) {
1999
- const n = v(e.popupContentPosition), o = v(e.host), a = V(() => ({
2016
+ const n = b(e.popupContentPosition), l = b(e.host), i = B(() => ({
2000
2017
  backgroundColor: e.backgroundColor || "",
2001
2018
  pointerEvents: "auto"
2002
2019
  }));
2003
- function r(f) {
2004
- t.emit("click"), f.preventDefault(), f.stopPropagation();
2020
+ function a(c) {
2021
+ t.emit("click"), c.preventDefault(), c.stopPropagation();
2005
2022
  }
2006
- V(() => {
2007
- const f = o.value;
2008
- if (f) {
2009
- const c = f.getBoundingClientRect(), {
2010
- left: l,
2011
- top: g,
2012
- height: i
2013
- } = c;
2023
+ B(() => {
2024
+ const c = l.value;
2025
+ if (c) {
2026
+ const m = c.getBoundingClientRect(), {
2027
+ left: p,
2028
+ top: u,
2029
+ height: o
2030
+ } = m;
2014
2031
  return {
2015
- left: l,
2016
- top: g + i
2032
+ left: p,
2033
+ top: u + o
2017
2034
  };
2018
2035
  }
2019
2036
  return n.value;
2020
2037
  });
2021
- const s = V(() => ({
2038
+ const r = B(() => ({
2022
2039
  // position: 'relative',
2023
2040
  // left: `${position.value.left}px`,
2024
2041
  // top: `${position.value.top}px`
2025
2042
  }));
2026
- return () => h(De, {
2043
+ return () => h(Fe, {
2027
2044
  to: "body"
2028
2045
  }, {
2029
2046
  default: () => {
2030
- var f, c;
2047
+ var c, m;
2031
2048
  return [h("div", {
2032
2049
  class: "overlay-container",
2033
- onClick: (l) => r(l),
2034
- style: a.value
2050
+ onClick: (p) => a(p),
2051
+ style: i.value
2035
2052
  }, [h("div", {
2036
- style: s.value
2037
- }, [(c = (f = t.slots).default) == null ? void 0 : c.call(f)])])];
2053
+ style: r.value
2054
+ }, [(m = (c = t.slots).default) == null ? void 0 : m.call(c)])])];
2038
2055
  }
2039
2056
  });
2040
2057
  }
2041
2058
  });
2042
- function Tn(e) {
2059
+ function hn(e) {
2043
2060
  if (e.content && e.content.render)
2044
2061
  return e.content.render;
2045
2062
  if (e.render && typeof e.render == "function")
2046
2063
  return e.render;
2047
2064
  }
2048
- function On(e) {
2065
+ function vn(e) {
2049
2066
  const t = document.createElement("div");
2050
2067
  t.style.display = "contents";
2051
2068
  let n;
2052
- const o = e.onClickCallback || (() => {
2053
- }), a = () => {
2054
- o(), n && n.unmount();
2069
+ const l = e.onClickCallback || (() => {
2070
+ }), i = () => {
2071
+ l(), n && n.unmount();
2055
2072
  };
2056
- return n = Le({
2073
+ return n = ke({
2057
2074
  setup() {
2058
- Ee(() => {
2075
+ Ie(() => {
2059
2076
  document.body.removeChild(t);
2060
2077
  });
2061
- const r = Tn(e);
2062
- return () => h(Bn, {
2078
+ const a = hn(e);
2079
+ return () => h(gn, {
2063
2080
  "popup-content-position": e.popupPosition,
2064
2081
  host: e.host,
2065
- onClick: a,
2082
+ onClick: i,
2066
2083
  backgroundColor: e.backgroundColor
2067
2084
  }, {
2068
- default: () => [r && r()]
2085
+ default: () => [a && a()]
2069
2086
  });
2070
2087
  }
2071
2088
  }), document.body.appendChild(t), n.mount(t), n;
2072
2089
  }
2073
- class Pn {
2090
+ class bn {
2074
2091
  static show(t) {
2075
- return On(t);
2092
+ return vn(t);
2076
2093
  }
2077
2094
  }
2078
- const Vn = Symbol("FModalService");
2079
- function ke(e, t) {
2095
+ const Cn = Symbol("FModalService");
2096
+ function he(e, t) {
2080
2097
  function n() {
2081
- const o = e.beforeOpen || e.beforeClickButton || null;
2082
- let a = Promise.resolve(!0);
2083
- if (o) {
2084
- const r = o(t.value);
2085
- if (typeof r > "u")
2086
- return a;
2087
- typeof r == "boolean" ? a = Promise.resolve(r) : a = r;
2098
+ const l = e.beforeOpen || e.beforeClickButton || null;
2099
+ let i = Promise.resolve(!0);
2100
+ if (l) {
2101
+ const a = l(t.value);
2102
+ if (typeof a > "u")
2103
+ return i;
2104
+ typeof a == "boolean" ? i = Promise.resolve(a) : i = a;
2088
2105
  }
2089
- return a;
2106
+ return i;
2090
2107
  }
2091
2108
  return { judgeCanOpen: n };
2092
2109
  }
2093
- function An(e, t, n, o, a) {
2094
- const r = v(e.buttonBehavior), s = v(e.popupOnInput), f = V(() => ({
2110
+ function Sn(e, t, n, l, i) {
2111
+ const a = b(e.buttonBehavior), r = b(e.popupOnInput), c = B(() => ({
2095
2112
  "input-group-append": !0,
2096
2113
  "append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
2097
- })), { judgeCanOpen: c } = ke(e, a), l = V(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), g = q(Vn, null), i = v();
2098
- async function d(m) {
2099
- if (await c() && l.value) {
2100
- const p = !!t.slots.default;
2101
- if (r.value === "Modal") {
2102
- const y = e.modalOptions, S = g == null ? void 0 : g.open({
2103
- ...y,
2114
+ })), { judgeCanOpen: m } = he(e, i), p = B(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), u = N(Cn, null), o = b();
2115
+ async function s(d) {
2116
+ if (await m() && p.value) {
2117
+ const f = !!t.slots.default;
2118
+ if (a.value === "Modal") {
2119
+ const v = e.modalOptions, S = u == null ? void 0 : u.open({
2120
+ ...v,
2104
2121
  render: () => t.slots.default && t.slots.default()
2105
2122
  });
2106
- i.value = S == null ? void 0 : S.modalRef;
2123
+ o.value = S == null ? void 0 : S.modalRef;
2107
2124
  }
2108
- r.value === "Overlay" && Pn.show({
2125
+ a.value === "Overlay" && bn.show({
2109
2126
  // host: buttonEditRef.value,
2110
2127
  host: document.body,
2111
2128
  backgroundColor: "rgba(0,0,0,.15)",
2112
2129
  render: () => t.slots.default && t.slots.default()
2113
- }), p && r.value === "Popup" && o.togglePopup(!0), p && s.value && o.hidePopup(), t.emit("clickButton", { origin: m, value: e.modelValue });
2130
+ }), f && a.value === "Popup" && l.togglePopup(!0), f && r.value && l.hidePopup(), t.emit("clickButton", { origin: d, value: e.modelValue });
2114
2131
  }
2115
2132
  }
2116
- function C(m) {
2117
- t.emit("mouseEnterIcon", m);
2133
+ function g(d) {
2134
+ t.emit("mouseEnterIcon", d);
2118
2135
  }
2119
- function u(m) {
2120
- t.emit("mouseLeaveIcon", m);
2136
+ function y(d) {
2137
+ t.emit("mouseLeaveIcon", d);
2121
2138
  }
2122
2139
  return {
2123
- buttonGroupClass: f,
2124
- onClickButton: d,
2125
- onMouseEnterButton: C,
2126
- onMouseLeaveButton: u,
2127
- modalRef: i
2140
+ buttonGroupClass: c,
2141
+ onClickButton: s,
2142
+ onMouseEnterButton: g,
2143
+ onMouseLeaveButton: y,
2144
+ modalRef: o
2128
2145
  };
2129
2146
  }
2130
- function Dn(e, t, n, o) {
2131
- const a = v(), r = v(!1), { judgeCanOpen: s } = ke(e, o);
2132
- function f() {
2133
- const i = a.value;
2134
- i && i.show(n.value);
2147
+ function wn(e, t, n, l) {
2148
+ const i = b(), a = b(!1), { judgeCanOpen: r } = he(e, l);
2149
+ function c() {
2150
+ const o = i.value;
2151
+ o && o.show(n.value);
2135
2152
  }
2136
- async function c(i = !1) {
2153
+ async function m(o = !1) {
2137
2154
  if (!!t.slots.default) {
2138
- if (!i && !r.value && !await s())
2155
+ if (!o && !a.value && !await r())
2139
2156
  return;
2140
- r.value = !r.value, await Z(), f();
2157
+ a.value = !a.value, await te(), c();
2141
2158
  }
2142
2159
  }
2143
- async function l(i = !1) {
2160
+ async function p(o = !1) {
2144
2161
  if (!!t.slots.default) {
2145
- if (!i && !await s())
2162
+ if (!o && !await r())
2146
2163
  return;
2147
- r.value = !0, await Z(), f();
2164
+ a.value = !0, await te(), c();
2148
2165
  }
2149
2166
  }
2150
- function g() {
2151
- r.value = !1;
2167
+ function u() {
2168
+ a.value = !1;
2152
2169
  }
2153
- return { hidePopup: g, popup: l, shouldPopupContent: r, togglePopup: c, popoverRef: a };
2170
+ return { hidePopup: u, popup: p, shouldPopupContent: a, togglePopup: m, popoverRef: i };
2154
2171
  }
2155
- function Ln(e, t, n) {
2172
+ function Fn(e, t, n) {
2156
2173
  const {
2157
- buttonGroupClass: o
2158
- } = n, a = v();
2174
+ buttonGroupClass: l
2175
+ } = n, i = b();
2159
2176
  return {
2160
2177
  renderButtonGroup: () => h("div", {
2161
2178
  id: `${e.id}-button-group`,
2162
- class: o.value
2179
+ class: l.value
2163
2180
  }, [t.slots.buttonContent ? h("span", {
2164
2181
  class: "input-group-text input-group-append-button"
2165
2182
  }, [t.slots.buttonContent()]) : e.buttonContent ? h("span", {
2166
2183
  class: "input-group-text input-group-append-button",
2167
2184
  innerHTML: e.buttonContent,
2168
- ref: a
2185
+ ref: i
2169
2186
  }, null) : null]),
2170
- buttonHandleElement: a
2187
+ buttonHandleElement: i
2171
2188
  };
2172
2189
  }
2173
- const En = /* @__PURE__ */ R({
2190
+ const kn = /* @__PURE__ */ x({
2174
2191
  name: "FButtonEdit",
2175
- props: Se,
2192
+ props: ge,
2176
2193
  emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
2177
2194
  setup(e, t) {
2178
- const n = v(), o = q("design-item-context"), a = me(n, o), r = v(e.customClass), s = v(e.modelValue), f = Dn(e, t, n, s), c = An(e, t, n, f, s), l = v(), g = V(() => ({
2195
+ const n = b(), l = N("design-item-context"), i = se(n, l), a = b(e.customClass), r = b(e.modelValue), c = wn(e, t, n, r), m = Sn(e, t, n, c, r), p = b(), u = B(() => ({
2179
2196
  "f-cmp-inputgroup": !0,
2180
2197
  "input-group": !0,
2181
2198
  "f-state-disable": !0,
2182
2199
  "f-state-editable": !1,
2183
2200
  "f-state-readonly": !0
2184
2201
  }));
2185
- ee(() => {
2186
- n.value.componentInstance = a;
2187
- }), t.expose(a.value);
2188
- const i = V(() => {
2189
- const C = {
2202
+ J(() => {
2203
+ n.value.componentInstance = i;
2204
+ }), t.expose(i.value);
2205
+ const o = B(() => {
2206
+ const g = {
2190
2207
  "f-button-edit": !0,
2191
2208
  "f-cmp-inputgroup": !0,
2192
2209
  "f-button-edit-nowrap": !e.wrapText
2193
2210
  };
2194
- return r.value && r.value.split(" ").reduce((u, m) => (u[m] = !0, u), C), C;
2211
+ return a.value && a.value.split(" ").reduce((y, d) => (y[d] = !0, y), g), g;
2195
2212
  }), {
2196
- renderButtonGroup: d
2197
- } = Ln(e, t, c);
2198
- return () => h("div", $e(t.attrs, {
2213
+ renderButtonGroup: s
2214
+ } = Fn(e, t, m);
2215
+ return () => h("div", Me(t.attrs, {
2199
2216
  ref: n,
2200
- class: i.value,
2217
+ class: o.value,
2201
2218
  id: e.id
2202
2219
  }), [h("div", {
2203
- class: g.value
2220
+ class: u.value
2204
2221
  }, [h("input", {
2205
- ref: l,
2222
+ ref: p,
2206
2223
  class: "form-control",
2207
2224
  readonly: !0,
2208
2225
  placeholder: e.placeholder
2209
- }, null), d()])]);
2226
+ }, null), s()])]);
2210
2227
  }
2211
2228
  });
2212
- function $n(e, t) {
2213
- e.schema;
2214
- const n = v(!0), o = v(!0);
2215
- function a(i) {
2216
- return !1;
2217
- }
2218
- function r() {
2219
- return !1;
2220
- }
2221
- function s() {
2222
- return !1;
2223
- }
2224
- function f() {
2225
- return !0;
2226
- }
2227
- function c(i) {
2228
- }
2229
- function l() {
2230
- }
2231
- function g(i) {
2232
- return null;
2233
- }
2234
- return {
2235
- canAccepts: a,
2236
- checkCanDeleteComponent: r,
2237
- checkCanMoveComponent: s,
2238
- hideNestedPaddingInDesginerView: f,
2239
- onAcceptMovedChildElement: c,
2240
- resolveComponentContext: l,
2241
- triggerBelongedComponentToMoveWhenMoved: n,
2242
- triggerBelongedComponentToDeleteWhenDeleted: o,
2243
- getPropsConfig: g
2244
- };
2245
- }
2246
- class xn {
2229
+ class In {
2247
2230
  constructor(t, n) {
2248
- x(this, "componentId");
2249
- x(this, "viewModelId");
2250
- x(this, "eventsEditorUtils");
2251
- x(this, "formSchemaUtils");
2252
- x(this, "formMetadataConverter");
2253
- x(this, "designViewModelUtils");
2254
- x(this, "designViewModelField");
2255
- x(this, "controlCreatorUtils");
2256
- x(this, "designerHostService");
2257
- x(this, "schemaService", null);
2258
- x(this, "metadataService", null);
2259
- x(this, "propertyConfig", {
2231
+ T(this, "componentId");
2232
+ T(this, "viewModelId");
2233
+ T(this, "eventsEditorUtils");
2234
+ T(this, "formSchemaUtils");
2235
+ T(this, "formMetadataConverter");
2236
+ T(this, "designViewModelUtils");
2237
+ T(this, "designViewModelField");
2238
+ T(this, "controlCreatorUtils");
2239
+ T(this, "designerHostService");
2240
+ T(this, "schemaService", null);
2241
+ T(this, "metadataService", null);
2242
+ T(this, "propertyConfig", {
2260
2243
  type: "object",
2261
2244
  categories: {}
2262
2245
  });
2263
- var o;
2264
- this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
2246
+ var l;
2247
+ this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((l = this.formSchemaUtils) == null ? void 0 : l.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
2265
2248
  }
2266
2249
  getTableInfo() {
2267
2250
  var t;
2268
2251
  return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
2269
2252
  }
2270
2253
  setDesignViewModelField(t) {
2254
+ var l;
2271
2255
  const n = t.binding && t.binding.type === "Form" && t.binding.field;
2272
2256
  if (n) {
2273
2257
  if (!this.designViewModelField) {
2274
- const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
2275
- this.designViewModelField = o.fields.find((a) => a.id === n);
2258
+ const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
2259
+ this.designViewModelField = i.fields.find((a) => a.id === n);
2276
2260
  }
2277
- t.updateOn = this.designViewModelField.updateOn;
2261
+ t.updateOn = (l = this.designViewModelField) == null ? void 0 : l.updateOn;
2278
2262
  }
2279
2263
  }
2280
2264
  changeFieldEditorType(t, n) {
@@ -2298,7 +2282,7 @@ class xn {
2298
2282
  type: "combo-list",
2299
2283
  textField: "name",
2300
2284
  valueField: "value",
2301
- data: [{ value: t.type, name: B[t.type].name }]
2285
+ data: [{ value: t.type, name: I[t.type].name }]
2302
2286
  }
2303
2287
  }
2304
2288
  }
@@ -2331,19 +2315,19 @@ class xn {
2331
2315
  * @returns
2332
2316
  */
2333
2317
  updateElementByParentContainer(t, n) {
2334
- const o = n && n.parent && n.parent.schema;
2335
- if (!o)
2318
+ const l = n && n.parent && n.parent.schema;
2319
+ if (!l)
2336
2320
  return;
2337
- const a = o.contents.findIndex((s) => s.id === t), r = fe(o.contents[a]);
2338
- o.contents.splice(a, 1), o.contents.splice(a, 0, r);
2321
+ const i = l.contents.findIndex((r) => r.id === t), a = re(l.contents[i]);
2322
+ l.contents.splice(i, 1), l.contents.splice(i, 0, a);
2339
2323
  }
2340
2324
  }
2341
- const U = class U {
2325
+ const G = class G {
2342
2326
  /**
2343
2327
  * 根据绑定字段类型获取可用的输入类控件
2344
2328
  */
2345
2329
  static getEditorTypesByMDataType(t) {
2346
- const n = U.fieldControlTypeMapping[t];
2330
+ const n = G.fieldControlTypeMapping[t];
2347
2331
  return n || [{ key: "", value: "" }];
2348
2332
  }
2349
2333
  /**
@@ -2351,9 +2335,9 @@ const U = class U {
2351
2335
  */
2352
2336
  static getAllInputTypes() {
2353
2337
  const t = [];
2354
- for (let n in U.fieldControlTypeMapping)
2355
- U.fieldControlTypeMapping[n].forEach((o) => {
2356
- t.find((a) => a.key === o.key && a.value === o.value) || t.push({ key: o.key, value: o.value });
2338
+ for (const n in G.fieldControlTypeMapping)
2339
+ G.fieldControlTypeMapping[n].forEach((l) => {
2340
+ t.find((i) => i.key === l.key && i.value === l.value) || t.push({ key: l.key, value: l.value });
2357
2341
  });
2358
2342
  return t;
2359
2343
  }
@@ -2361,69 +2345,174 @@ const U = class U {
2361
2345
  /**
2362
2346
  * <字段类型,可配置的控件类型列表>的映射
2363
2347
  */
2364
- x(U, "fieldControlTypeMapping", {
2348
+ T(G, "fieldControlTypeMapping", {
2365
2349
  String: [
2366
- { key: B["input-group"].type, value: B["input-group"].name },
2367
- { key: B.lookup.type, value: B.lookup.name },
2368
- { key: B["date-picker"].type, value: B["date-picker"].name },
2369
- { key: B["check-box"].type, value: B["check-box"].name },
2370
- { key: B["radio-group"].type, value: B["radio-group"].name },
2371
- { key: B["combo-list"].type, value: B["combo-list"].name },
2372
- { key: B.textarea.type, value: B.textarea.name }
2350
+ { key: I["input-group"].type, value: I["input-group"].name },
2351
+ { key: I.lookup.type, value: I.lookup.name },
2352
+ { key: I["date-picker"].type, value: I["date-picker"].name },
2353
+ { key: I["check-box"].type, value: I["check-box"].name },
2354
+ { key: I["check-group"].type, value: I["check-group"].name },
2355
+ { key: I["radio-group"].type, value: I["radio-group"].name },
2356
+ { key: I["combo-list"].type, value: I["combo-list"].name },
2357
+ { key: I.textarea.type, value: I.textarea.name }
2373
2358
  ],
2374
2359
  Text: [
2375
- { key: B.textarea.type, value: B.textarea.name },
2376
- { key: B.lookup.type, value: B.lookup.name }
2360
+ { key: I.textarea.type, value: I.textarea.name },
2361
+ { key: I.lookup.type, value: I.lookup.name }
2377
2362
  ],
2378
2363
  Decimal: [
2379
- { key: B["number-spinner"].type, value: B["number-spinner"].name }
2364
+ { key: I["number-spinner"].type, value: I["number-spinner"].name }
2380
2365
  ],
2381
2366
  Integer: [
2382
- { key: B["number-spinner"].type, value: B["number-spinner"].name }
2367
+ { key: I["number-spinner"].type, value: I["number-spinner"].name }
2383
2368
  ],
2384
2369
  Number: [
2385
- { key: B["number-spinner"].type, value: B["number-spinner"].name }
2370
+ { key: I["number-spinner"].type, value: I["number-spinner"].name }
2386
2371
  ],
2387
2372
  BigNumber: [
2388
- { key: B["number-spinner"].type, value: B["number-spinner"].name }
2373
+ { key: I["number-spinner"].type, value: I["number-spinner"].name }
2389
2374
  ],
2390
2375
  Date: [
2391
- { key: B["date-picker"].type, value: B["date-picker"].name }
2376
+ { key: I["date-picker"].type, value: I["date-picker"].name }
2392
2377
  ],
2393
2378
  DateTime: [
2394
- { key: B["date-picker"].type, value: B["date-picker"].name }
2379
+ { key: I["date-picker"].type, value: I["date-picker"].name }
2395
2380
  ],
2396
2381
  Boolean: [
2397
- { key: B.switch.type, value: B.switch.name },
2398
- { key: B["check-box"].type, value: B["check-box"].name }
2382
+ { key: I.switch.type, value: I.switch.name },
2383
+ { key: I["check-box"].type, value: I["check-box"].name }
2399
2384
  ],
2400
2385
  Enum: [
2401
- { key: B["combo-list"].type, value: B["combo-list"].name },
2402
- { key: B["radio-group"].type, value: B["radio-group"].name }
2386
+ { key: I["combo-list"].type, value: I["combo-list"].name },
2387
+ { key: I["radio-group"].type, value: I["radio-group"].name }
2403
2388
  ],
2404
2389
  Object: [
2405
- { key: B.lookup.type, value: B.lookup.name },
2406
- { key: B["combo-list"].type, value: B["combo-list"].name },
2407
- { key: B["radio-group"].type, value: B["radio-group"].name }
2390
+ { key: I.lookup.type, value: I.lookup.name },
2391
+ { key: I["combo-list"].type, value: I["combo-list"].name },
2392
+ { key: I["radio-group"].type, value: I["radio-group"].name }
2408
2393
  ]
2409
2394
  });
2410
- let W = U;
2411
- const Rn = v(0);
2412
- class Nn extends xn {
2413
- constructor(n, o) {
2414
- super(n, o);
2415
- x(this, "responseLayoutEditorFunction");
2416
- this.responseLayoutEditorFunction = ye(this.formSchemaUtils);
2417
- }
2418
- getPropertyConfig(n, o) {
2419
- return this.propertyConfig.categories.basic = this.getBasicProperties(n, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, o), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
2420
- }
2421
- getBasicProperties(n, o) {
2422
- var f;
2423
- var a = this;
2424
- this.setDesignViewModelField(n);
2425
- const r = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
2395
+ let q = G;
2396
+ const Mn = b(0);
2397
+ class Bn {
2398
+ constructor() {
2399
+ /** 控件标题 */
2400
+ T(this, "label", "");
2401
+ /** 控件id */
2402
+ T(this, "id", "");
2403
+ /** 每个控件占用的栅格数 */
2404
+ T(this, "columnInSM", 12);
2405
+ T(this, "columnInMD", 6);
2406
+ T(this, "columnInLG", 3);
2407
+ T(this, "columnInEL", 2);
2408
+ /** 每个控件占用的列数 */
2409
+ T(this, "displayWidthInSM", 1);
2410
+ T(this, "displayWidthInMD", 1);
2411
+ T(this, "displayWidthInLG", 1);
2412
+ T(this, "displayWidthInEL", 1);
2413
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
2414
+ T(this, "displayColumnCountAtBreakPoint", "md");
2415
+ /** 控件所在行,传0即可-----编辑器内部使用 */
2416
+ T(this, "tagRow", 0);
2417
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
2418
+ T(this, "showTopBorder", 0);
2419
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
2420
+ T(this, "group", 1);
2421
+ /** 控件是否符合标准的class配置(设计器用的) */
2422
+ T(this, "isSupportedClass", !0);
2423
+ /** 控件所在分组id(设计器用的) */
2424
+ T(this, "fieldSetId", "");
2425
+ }
2426
+ }
2427
+ function Vn(e) {
2428
+ let t, n;
2429
+ const l = /* @__PURE__ */ new Map();
2430
+ let i = [];
2431
+ function a(u, o) {
2432
+ const g = u.split(" ").filter((S) => S.startsWith("col-"));
2433
+ if (g.length === 0) {
2434
+ o.isSupportedClass = !1;
2435
+ return;
2436
+ }
2437
+ let y = g.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), d = g.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), f = g.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), v = g.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S));
2438
+ y = y || "col-12", o.columnInSM = parseInt(y.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), d = d || "col-md-" + o.columnInSM, o.columnInMD = parseInt(d.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), f = f || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(f.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), v = v || "col-el-" + o.columnInLG, o.columnInEL = parseInt(v.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
2439
+ }
2440
+ function r(u, o, s, g = !1) {
2441
+ let y = !1;
2442
+ u.contents.forEach((d) => {
2443
+ if (d.type === "fieldset") {
2444
+ s += 1, r(d, o, s, !0), y = !0;
2445
+ return;
2446
+ }
2447
+ y && (s += 1, y = !1);
2448
+ const f = d.appearance && d.appearance.class, v = new Bn();
2449
+ f ? a(f, v) : v.isSupportedClass = !1, v.label = d.label || d.id, v.id = d.id, v.group = s, g && (v.fieldSetId = u.id), n === d.id && (t = s), l.set(d.id, d), o.push(v);
2450
+ });
2451
+ }
2452
+ function c(u) {
2453
+ const o = e.getComponentById(u);
2454
+ if (!o || !o.componentType || !o.componentType.startsWith("form"))
2455
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
2456
+ const s = e.selectNode(o, (g) => g.type === oe["response-form"].type);
2457
+ return !s || !s.contents || s.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: s };
2458
+ }
2459
+ function m(u, o) {
2460
+ o = o || u.id;
2461
+ const { result: s, message: g, formNode: y } = c(o);
2462
+ if (!s)
2463
+ return { result: s, message: g };
2464
+ n = u.id, i = [], l.clear();
2465
+ const d = y.contents[0].type === oe.fieldset.type ? 0 : 1;
2466
+ r(y, i, d);
2467
+ const f = i.find((S) => !S.isSupportedClass);
2426
2468
  return {
2469
+ defaultState: {
2470
+ defaultGroupNumber: t || 1,
2471
+ model: f ? "customize" : "standard"
2472
+ },
2473
+ importData: i
2474
+ };
2475
+ }
2476
+ function p(u, o) {
2477
+ o = o;
2478
+ const { result: s, formNode: g } = c(o);
2479
+ if (!s)
2480
+ return "";
2481
+ const y = [];
2482
+ return u.forEach((d) => {
2483
+ var S;
2484
+ const f = l.get(d.id), v = f.appearance && f.appearance.class;
2485
+ if (v) {
2486
+ const M = v.split(" ").filter((D) => !D.startsWith("col-")), C = "col-" + d.columnInSM, k = "col-md-" + d.columnInMD, O = "col-xl-" + d.columnInLG, F = "col-el-" + d.columnInEL, L = [C, k, O, F].concat(M);
2487
+ f.appearance.class = L.join(" ");
2488
+ }
2489
+ if (d.fieldSetId) {
2490
+ const w = g.contents.find((C) => C.id === d.fieldSetId), M = y.find((C) => C.id === d.fieldSetId);
2491
+ M ? (S = M.contents) == null || S.push(f) : (y.push(w), w.contents = [f]);
2492
+ } else
2493
+ y.push(f);
2494
+ }), g.contents = y, g.id;
2495
+ }
2496
+ return {
2497
+ checkCanFindFormNode: c,
2498
+ checkCanOpenLayoutEditor: m,
2499
+ changeFormControlsByResponseLayoutConfig: p,
2500
+ getResonseFormLayoutConfig: r
2501
+ };
2502
+ }
2503
+ class On extends In {
2504
+ constructor(n, l) {
2505
+ super(n, l);
2506
+ T(this, "responseLayoutEditorFunction");
2507
+ this.responseLayoutEditorFunction = Vn(this.formSchemaUtils);
2508
+ }
2509
+ getPropertyConfig(n, l) {
2510
+ return this.propertyConfig.categories.basic = this.getBasicProperties(n, l), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, l), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
2511
+ }
2512
+ getBasicProperties(n, l) {
2513
+ var a;
2514
+ const i = this;
2515
+ return this.setDesignViewModelField(n), this.formSchemaUtils.getFormMetadataBasicInfo(), {
2427
2516
  description: "Basic Information",
2428
2517
  title: "基本信息",
2429
2518
  properties: {
@@ -2444,7 +2533,7 @@ class Nn extends xn {
2444
2533
  textField: "value",
2445
2534
  valueField: "key",
2446
2535
  editable: !1,
2447
- data: a.designViewModelField ? W.getEditorTypesByMDataType((f = a.designViewModelField.type) == null ? void 0 : f.name) : W.getAllInputTypes()
2536
+ data: i.designViewModelField ? q.getEditorTypesByMDataType((a = i.designViewModelField.type) == null ? void 0 : a.name) : q.getAllInputTypes()
2448
2537
  }
2449
2538
  },
2450
2539
  label: {
@@ -2455,41 +2544,37 @@ class Nn extends xn {
2455
2544
  binding: {
2456
2545
  description: "绑定的表单字段",
2457
2546
  title: "绑定",
2458
- $converter: "/converter/field-selector.converter",
2459
2547
  editor: {
2460
- type: "field-selector",
2548
+ type: "binding-selector",
2461
2549
  bindingType: { enable: !1 },
2462
2550
  editorParams: {
2463
- propertyData: n,
2464
- formBasicInfo: r
2551
+ componentSchema: n,
2552
+ needSyncToViewModel: !0,
2553
+ viewModelId: this.viewModelId,
2554
+ designerHostService: this.designerHostService,
2555
+ disableOccupiedFields: !0
2465
2556
  },
2466
- columns: [
2467
- { field: "name", title: "字段名称" },
2468
- { field: "bindingField", title: "绑定字段" },
2469
- { field: "fieldType", title: "字段类型" }
2470
- ],
2471
- textField: "bindingField",
2472
- data: s
2557
+ textField: "bindingField"
2473
2558
  }
2474
2559
  }
2475
2560
  },
2476
- setPropertyRelates(c, l) {
2477
- if (c)
2478
- switch (c && c.propertyID) {
2561
+ setPropertyRelates(r, c) {
2562
+ if (r)
2563
+ switch (r && r.propertyID) {
2479
2564
  case "type": {
2480
- a.changeControlType(n, c, o);
2565
+ i.changeControlType(n, r, l);
2481
2566
  break;
2482
2567
  }
2483
2568
  case "label": {
2484
- c.needRefreshControlTree = !0;
2569
+ r.needRefreshControlTree = !0;
2485
2570
  break;
2486
2571
  }
2487
2572
  }
2488
2573
  }
2489
2574
  };
2490
2575
  }
2491
- getAppearanceProperties(n, o) {
2492
- var a = this;
2576
+ getAppearanceProperties(n, l) {
2577
+ const i = this;
2493
2578
  return {
2494
2579
  title: "样式",
2495
2580
  description: "Appearance",
@@ -2515,18 +2600,18 @@ class Nn extends xn {
2515
2600
  refreshPanelAfterChanged: !0,
2516
2601
  editor: {
2517
2602
  type: "response-layout-editor-setting",
2518
- initialState: a.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, a.componentId)
2603
+ initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, i.componentId)
2519
2604
  }
2520
2605
  }
2521
2606
  },
2522
- setPropertyRelates(r, s) {
2523
- if (r)
2524
- switch (r && r.propertyID) {
2607
+ setPropertyRelates(a, r) {
2608
+ if (a)
2609
+ switch (a && a.propertyID) {
2525
2610
  case "responseLayout":
2526
- a.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(r.propertyValue, a.componentId || n.id), a.updateUnifiedLayoutAfterResponseLayoutChanged(a.componentId), a.updateElementByParentContainer(n.id, o), delete n.responseLayout;
2611
+ i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, i.componentId || n.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(n.id, l), delete n.responseLayout;
2527
2612
  break;
2528
2613
  case "class":
2529
- a.updateUnifiedLayoutAfterControlChanged(r.propertyValue, n.id, this.componentId), a.updateElementByParentContainer(n.id, o);
2614
+ i.updateUnifiedLayoutAfterControlChanged(a.propertyValue, n.id, this.componentId), i.updateElementByParentContainer(n.id, l);
2530
2615
  break;
2531
2616
  }
2532
2617
  }
@@ -2540,44 +2625,44 @@ class Nn extends xn {
2540
2625
  * @param propertyData 控件DOM属性
2541
2626
  * @param newControlType 新控件类型
2542
2627
  */
2543
- changeControlType(n, o, a) {
2544
- var g, i, d, C;
2545
- const r = o.propertyValue, s = a && a.parent && a.parent.schema;
2546
- if (!s)
2628
+ changeControlType(n, l, i) {
2629
+ var u, o, s, g;
2630
+ const a = l.propertyValue, r = i && i.parent && i.parent.schema;
2631
+ if (!r)
2547
2632
  return;
2548
- const f = s.contents.findIndex((u) => u.id === n.id), c = s.contents[f];
2549
- let l;
2633
+ const c = r.contents.findIndex((y) => y.id === n.id), m = r.contents[c];
2634
+ let p;
2550
2635
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
2551
2636
  editor: {
2552
- $type: r
2637
+ $type: a
2553
2638
  },
2554
2639
  name: this.designViewModelField.name,
2555
2640
  require: this.designViewModelField.require,
2556
2641
  readonly: this.designViewModelField.readonly
2557
- }, !1), l = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), l || (l = ce("form-group") || {}, l.editor = ce(r) || {}, delete l.editor.id, delete l.editor.binding, delete l.editor.appearance), Object.assign(l, {
2558
- id: c.id,
2559
- appearance: c.appearance,
2560
- size: c.size,
2561
- label: c.label,
2562
- binding: c.binding,
2563
- visible: c.visible
2564
- }), Object.assign(l.editor, {
2565
- isTextArea: l.isTextArea && c.isTextArea,
2566
- placeholder: (g = c.editor) == null ? void 0 : g.placeholder,
2567
- holdPlace: (i = c.editor) == null ? void 0 : i.holdPlace,
2568
- readonly: (d = c.editor) == null ? void 0 : d.readonly,
2569
- require: (C = c.editor) == null ? void 0 : C.require
2570
- }), s.contents.splice(f, 1), s.contents.splice(f, 0, l), a.schema = Object.assign(c, l), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
2571
- (u) => u.classList.remove("dgComponentSelected")
2572
- ), Rn.value++;
2573
- }
2574
- getComponentConfig(n, o = {}, a = {}) {
2575
- const r = Object.assign({
2642
+ }, !1), p = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), p || (p = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(p, {
2643
+ id: m.id,
2644
+ appearance: m.appearance,
2645
+ size: m.size,
2646
+ label: m.label,
2647
+ binding: m.binding,
2648
+ visible: m.visible
2649
+ }), Object.assign(p.editor, {
2650
+ isTextArea: p.isTextArea && m.isTextArea,
2651
+ placeholder: (u = m.editor) == null ? void 0 : u.placeholder,
2652
+ holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
2653
+ readonly: (s = m.editor) == null ? void 0 : s.readonly,
2654
+ require: (g = m.editor) == null ? void 0 : g.require
2655
+ }), r.contents.splice(c, 1), r.contents.splice(c, 0, p), i.schema = Object.assign(m, p), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
2656
+ (y) => y.classList.remove("dgComponentSelected")
2657
+ ), Mn.value++;
2658
+ }
2659
+ getComponentConfig(n, l = {}, i = {}) {
2660
+ const a = Object.assign({
2576
2661
  description: "编辑器",
2577
2662
  title: "编辑器",
2578
2663
  type: "input-group",
2579
2664
  $converter: "/converter/property-editor.converter"
2580
- }, o), s = Object.assign({
2665
+ }, l), r = Object.assign({
2581
2666
  readonly: {
2582
2667
  description: "",
2583
2668
  title: "只读",
@@ -2598,8 +2683,8 @@ class Nn extends xn {
2598
2683
  title: "提示文本",
2599
2684
  type: "string"
2600
2685
  }
2601
- }, a);
2602
- return { ...r, properties: { ...s } };
2686
+ }, i);
2687
+ return { ...a, properties: { ...r } };
2603
2688
  }
2604
2689
  /**
2605
2690
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -2607,108 +2692,132 @@ class Nn extends xn {
2607
2692
  * @param controlId 控件Id
2608
2693
  * @param componentId 控件所在组件id
2609
2694
  */
2610
- updateUnifiedLayoutAfterControlChanged(n, o, a) {
2611
- const r = n.split(" ");
2612
- let s = r.find((i) => /^col-([1-9]|10|11|12)$/.test(i)), f = r.find((i) => /^col-md-([1-9]|10|11|12)$/.test(i)), c = r.find((i) => /^col-xl-([1-9]|10|11|12)$/.test(i)), l = r.find((i) => /^col-el-([1-9]|10|11|12)$/.test(i));
2613
- s = s || "col-12", f = f || "col-md-" + s.replace("col-", ""), c = c || "col-xl-" + f.replace("col-md-", ""), l = l || "col-el-" + c.replace("col-xl-", "");
2614
- const g = {
2615
- id: o,
2616
- columnInSM: parseInt(s.replace("col-", ""), 10),
2617
- columnInMD: parseInt(f.replace("col-md-", ""), 10),
2618
- columnInLG: parseInt(c.replace("col-xl-", ""), 10),
2619
- columnInEL: parseInt(l.replace("col-el-", ""), 10)
2695
+ updateUnifiedLayoutAfterControlChanged(n, l, i) {
2696
+ const a = n.split(" ");
2697
+ let r = a.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), c = a.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = a.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), p = a.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
2698
+ r = r || "col-12", c = c || "col-md-" + r.replace("col-", ""), m = m || "col-xl-" + c.replace("col-md-", ""), p = p || "col-el-" + m.replace("col-xl-", "");
2699
+ const u = {
2700
+ id: l,
2701
+ columnInSM: parseInt(r.replace("col-", ""), 10),
2702
+ columnInMD: parseInt(c.replace("col-md-", ""), 10),
2703
+ columnInLG: parseInt(m.replace("col-xl-", ""), 10),
2704
+ columnInEL: parseInt(p.replace("col-el-", ""), 10)
2620
2705
  };
2621
- this.updateUnifiedLayoutAfterResponseLayoutChanged(a, g);
2706
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(i, u);
2622
2707
  }
2623
2708
  /**
2624
2709
  * 修改控件布局配置后更新Form统一布局配置
2625
2710
  * @param componentId 组件Id
2626
2711
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
2627
2712
  */
2628
- updateUnifiedLayoutAfterResponseLayoutChanged(n, o) {
2629
- const { formNode: a } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
2630
- if (!a || !a.unifiedLayout)
2713
+ updateUnifiedLayoutAfterResponseLayoutChanged(n, l) {
2714
+ const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
2715
+ if (!i || !i.unifiedLayout)
2631
2716
  return;
2632
- const r = [];
2633
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(a, r, 1), o) {
2634
- const u = r.find((m) => m.id === o.id);
2635
- Object.assign(u || {}, o);
2717
+ const a = [];
2718
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, a, 1), l) {
2719
+ const y = a.find((d) => d.id === l.id);
2720
+ Object.assign(y || {}, l);
2636
2721
  }
2637
- const s = r.map((u) => u.columnInSM), f = r.map((u) => u.columnInMD), c = r.map((u) => u.columnInLG), l = r.map((u) => u.columnInEL), g = this.checkIsUniqueColumn(s) ? s[0] : null, i = this.checkIsUniqueColumn(f) ? f[0] : null, d = this.checkIsUniqueColumn(c) ? c[0] : null, C = this.checkIsUniqueColumn(l) ? l[0] : null;
2638
- Object.assign(a.unifiedLayout, {
2639
- uniqueColClassInSM: g,
2640
- uniqueColClassInMD: i,
2641
- uniqueColClassInLG: d,
2642
- uniqueColClassInEL: C
2722
+ const r = a.map((y) => y.columnInSM), c = a.map((y) => y.columnInMD), m = a.map((y) => y.columnInLG), p = a.map((y) => y.columnInEL), u = this.checkIsUniqueColumn(r) ? r[0] : null, o = this.checkIsUniqueColumn(c) ? c[0] : null, s = this.checkIsUniqueColumn(m) ? m[0] : null, g = this.checkIsUniqueColumn(p) ? p[0] : null;
2723
+ Object.assign(i.unifiedLayout, {
2724
+ uniqueColClassInSM: u,
2725
+ uniqueColClassInMD: o,
2726
+ uniqueColClassInLG: s,
2727
+ uniqueColClassInEL: g
2643
2728
  });
2644
2729
  }
2645
2730
  /**
2646
2731
  * 校验宽度样式值是否一致
2647
2732
  */
2648
2733
  checkIsUniqueColumn(n) {
2649
- const o = new Set(n);
2650
- return Array.from(o).length === 1;
2734
+ const l = new Set(n);
2735
+ return Array.from(l).length === 1;
2651
2736
  }
2652
2737
  }
2653
- class Un extends Nn {
2738
+ class Tn extends On {
2654
2739
  constructor(t, n) {
2655
2740
  super(t, n);
2656
2741
  }
2657
2742
  getEditorProperties(t) {
2658
- return this.getComponentConfig(t, { type: "combo-list" }, {
2743
+ const n = this.getComponentConfig(t, { type: "combo-list" }, {
2659
2744
  editable: {
2660
2745
  description: "",
2661
2746
  title: "允许编辑",
2662
2747
  type: "boolean"
2663
2748
  },
2749
+ enableClear: {
2750
+ description: "",
2751
+ title: "启用清空",
2752
+ type: "boolean"
2753
+ },
2664
2754
  textField: {
2755
+ visible: !1,
2665
2756
  description: "",
2666
2757
  title: "数据源显示字段",
2667
2758
  type: "string"
2668
2759
  },
2669
- idField: {
2760
+ valueField: {
2761
+ visible: !1,
2670
2762
  description: "",
2671
2763
  title: "数据源值字段",
2672
2764
  type: "string"
2765
+ },
2766
+ idField: {
2767
+ visible: !1,
2768
+ description: "",
2769
+ title: "数据源标识字段",
2770
+ type: "string"
2771
+ },
2772
+ data: {
2773
+ description: "",
2774
+ title: "数据",
2775
+ type: "array",
2776
+ editor: {
2777
+ columns: [
2778
+ { field: t.editor.valueField, title: "值", dataType: "string" },
2779
+ { field: t.editor.textField, title: "名称", dataType: "string" },
2780
+ { field: "disabled", title: "禁用", visible: !1, dataType: "boolean", editor: { type: "switch" } }
2781
+ ],
2782
+ type: "item-collection-editor",
2783
+ valueField: t.editor.valueField,
2784
+ nameField: t.editor.textField,
2785
+ requiredFields: [t.editor.valueField, t.editor.textField],
2786
+ uniqueFields: [t.editor.valueField, t.editor.textField]
2787
+ },
2788
+ // 这个属性,标记当属性变更得时候触发重新更新属性
2789
+ refreshPanelAfterChanged: !0
2673
2790
  }
2674
2791
  });
2792
+ return n.setPropertyRelates = function(l) {
2793
+ if (l)
2794
+ switch (l.propertyID) {
2795
+ case "data": {
2796
+ l.propertyValue.parameters && (t.editor.valueField = l.propertyValue.parameters.valueField, t.editor.textField = l.propertyValue.parameters.nameField), t.editor.data = l.propertyValue.value;
2797
+ break;
2798
+ }
2799
+ }
2800
+ }, n;
2675
2801
  }
2676
2802
  }
2677
- function qn(e, t) {
2678
- const {
2679
- canAccepts: n,
2680
- checkCanDeleteComponent: o,
2681
- checkCanMoveComponent: a,
2682
- hideNestedPaddingInDesginerView: r,
2683
- onAcceptMovedChildElement: s,
2684
- resolveComponentContext: f,
2685
- triggerBelongedComponentToMoveWhenMoved: c,
2686
- triggerBelongedComponentToDeleteWhenDeleted: l
2687
- } = $n(e), g = e.schema;
2688
- function i(d, C) {
2689
- return new Un(d, t).getPropertyConfig(g, C);
2803
+ function Pn(e, t) {
2804
+ const n = e.schema;
2805
+ function l(i, a) {
2806
+ return new Tn(i, t).getPropertyConfig(n, a);
2690
2807
  }
2691
2808
  return {
2692
- canAccepts: n,
2693
- checkCanDeleteComponent: o,
2694
- checkCanMoveComponent: a,
2695
- hideNestedPaddingInDesginerView: r,
2696
- onAcceptMovedChildElement: s,
2697
- resolveComponentContext: f,
2698
- triggerBelongedComponentToMoveWhenMoved: c,
2699
- triggerBelongedComponentToDeleteWhenDeleted: l,
2700
- getPropsConfig: i
2809
+ getPropsConfig: l
2701
2810
  };
2702
2811
  }
2703
- const Hn = /* @__PURE__ */ R({
2812
+ const Ln = /* @__PURE__ */ x({
2704
2813
  name: "FComboListDesign",
2705
- props: re,
2814
+ props: ee,
2706
2815
  emits: ["clear", "update:modelValue", "change"],
2707
2816
  setup(e, t) {
2708
- const n = v(), o = q("designer-host-service"), a = q("design-item-context"), r = qn(a, o), s = me(n, a, r);
2709
- return ee(() => {
2710
- n.value.componentInstance = s;
2711
- }), t.expose(s.value), () => h(En, {
2817
+ const n = b(), l = N("designer-host-service"), i = N("design-item-context"), a = Pn(i, l), r = se(n, i, a);
2818
+ return J(() => {
2819
+ n.value.componentInstance = r;
2820
+ }), t.expose(r.value), () => h(kn, {
2712
2821
  ref: n,
2713
2822
  buttonContent: e.dropDownIcon,
2714
2823
  readonly: !0,
@@ -2718,1269 +2827,313 @@ const Hn = /* @__PURE__ */ R({
2718
2827
  enableClear: !0
2719
2828
  }, null);
2720
2829
  }
2721
- }), Gn = (e) => {
2722
- const t = e;
2723
- return t.install = function(n) {
2724
- n.component(t.name, e);
2725
- }, e;
2726
- };
2727
- G.register = (e, t, n, o) => {
2728
- e["combo-list"] = G, t["combo-list"] = we;
2830
+ });
2831
+ U.register = (e, t, n, l) => {
2832
+ e["combo-list"] = U, t["combo-list"] = ye;
2729
2833
  };
2730
- G.registerDesigner = (e, t, n) => {
2731
- e["combo-list"] = Hn, t["combo-list"] = we;
2834
+ U.registerDesigner = (e, t, n) => {
2835
+ e["combo-list"] = Ln, t["combo-list"] = ye;
2732
2836
  };
2733
- const _ = Gn(G), Q = /* @__PURE__ */ R({
2837
+ const W = Ue(U), z = /* @__PURE__ */ x({
2734
2838
  name: "FOrder",
2735
- props: ae,
2839
+ props: K,
2736
2840
  emits: ["change"],
2737
2841
  setup(e, t) {
2738
- const n = v(e.items), o = v("排序列"), a = v("排序方式"), r = v("添加排序列"), s = [{
2842
+ const n = b(e.items), l = b("排序列"), i = b("排序方式"), a = b("添加排序列"), r = [{
2739
2843
  id: "asc",
2740
2844
  name: "升序"
2741
2845
  }, {
2742
2846
  id: "desc",
2743
2847
  name: "降序"
2744
- }], f = v(/* @__PURE__ */ new Map());
2745
- function c() {
2746
- const p = n.value.map((y) => [y.id, !0]);
2747
- f.value = new Map(p);
2848
+ }], c = b(/* @__PURE__ */ new Map());
2849
+ function m() {
2850
+ const f = n.value.map((v) => [v.id, !0]);
2851
+ c.value = new Map(f);
2748
2852
  }
2749
- c();
2750
- const l = V(() => e.dataSource.map((p) => (p.disabled = f.value.has(p.id), p))), g = V(() => ({
2853
+ m();
2854
+ const p = B(() => e.dataSource.map((f) => (f.disabled = c.value.has(f.id), f))), u = B(() => ({
2751
2855
  "f-order": !0
2752
2856
  }));
2753
- function i(p) {
2754
- n.value = n.value.filter((y) => y.id !== p.id), c(), t.emit("change", n.value);
2857
+ function o(f) {
2858
+ n.value = n.value.filter((v) => v.id !== f.id), m(), t.emit("change", n.value);
2755
2859
  }
2756
- function d() {
2860
+ function s() {
2757
2861
  n.value = [...n.value, {
2758
2862
  id: Date.now().toString(),
2759
2863
  name: "",
2760
2864
  order: "asc"
2761
- }], c(), t.emit("change", n.value);
2865
+ }], m(), t.emit("change", n.value);
2762
2866
  }
2763
- function C(p) {
2764
- if (p && p.length === 1) {
2765
- const y = p[0], S = n.value.find((k) => k.id === y.id);
2766
- S && (S.name = y.name);
2867
+ function g(f) {
2868
+ if (f && f.length === 1) {
2869
+ const v = f[0], S = n.value.find((w) => w.id === v.id);
2870
+ S && (S.name = v.name);
2767
2871
  }
2768
- c(), t.emit("change", n.value);
2872
+ m(), t.emit("change", n.value);
2769
2873
  }
2770
- function u(p) {
2771
- if (p && p.length) {
2772
- const y = /* @__PURE__ */ new Map();
2773
- p.reduce((S, k) => (S.set(k.id, k), S), y), n.value = p.map((S) => y.get(S.id)), t.emit("change", n.value);
2874
+ function y(f) {
2875
+ if (f && f.length) {
2876
+ const v = /* @__PURE__ */ new Map();
2877
+ f.reduce((S, w) => (S.set(w.id, w), S), v), n.value = f.map((S) => v.get(S.id)), t.emit("change", n.value);
2774
2878
  }
2775
2879
  }
2776
- function m() {
2777
- return h(ve, {
2880
+ function d() {
2881
+ return h(fe, {
2778
2882
  style: "flex:1",
2779
2883
  data: n.value,
2780
2884
  draggable: !0,
2781
2885
  view: "DraggableView",
2782
2886
  "keep-order": !0,
2783
2887
  itemClass: "f-order-item",
2784
- onRemoveItem: i,
2785
- onChange: u
2888
+ onRemoveItem: o,
2889
+ onChange: y
2786
2890
  }, {
2787
2891
  header: () => h("div", {
2788
2892
  class: "f-order-header"
2789
2893
  }, [h("span", {
2790
2894
  class: "f-order-header-order-field"
2791
- }, [o.value]), h("span", {
2895
+ }, [l.value]), h("span", {
2792
2896
  class: "f-order-header-order-type"
2793
- }, [a.value])]),
2794
- itemContent: (p) => h("div", {
2897
+ }, [i.value])]),
2898
+ itemContent: (f) => h("div", {
2795
2899
  class: "f-order-item-content"
2796
- }, [h(_, {
2900
+ }, [h(W, {
2797
2901
  class: "f-order-item-content-order-field",
2798
- data: l.value,
2902
+ data: p.value,
2799
2903
  valueField: "id",
2800
2904
  textField: "name",
2801
2905
  idField: "id",
2802
- modelValue: p.id,
2803
- "onUpdate:modelValue": (y) => p.id = y,
2804
- onChange: C,
2805
- onClear: C
2806
- }, null), h(_, {
2906
+ modelValue: f.id,
2907
+ "onUpdate:modelValue": (v) => f.id = v,
2908
+ onChange: g,
2909
+ onClear: g
2910
+ }, null), h(W, {
2807
2911
  class: "f-order-item-content-order-type",
2808
- data: s,
2912
+ data: r,
2809
2913
  valueField: "id",
2810
2914
  textField: "name",
2811
2915
  idField: "id",
2812
- modelValue: p.order,
2813
- "onUpdate:modelValue": (y) => p.order = y,
2814
- onChange: C
2916
+ modelValue: f.order,
2917
+ "onUpdate:modelValue": (v) => f.order = v,
2918
+ onChange: g
2815
2919
  }, null)]),
2816
2920
  footer: () => h("div", {
2817
2921
  class: "f-order-footer"
2818
- }, [h(Ce, {
2922
+ }, [h(me, {
2819
2923
  type: "link",
2820
2924
  class: "f-order-add-button",
2821
- onClick: d
2925
+ onClick: s
2822
2926
  }, {
2823
- default: () => h(K, null, [h("span", {
2927
+ default: () => h(X, null, [h("span", {
2824
2928
  class: "f-order-add-icon"
2825
2929
  }, [h("i", {
2826
2930
  class: "f-icon f-icon-add"
2827
- }, null)]), r.value])
2931
+ }, null)]), a.value])
2828
2932
  })])
2829
2933
  });
2830
2934
  }
2831
2935
  return () => h("div", {
2832
- class: g.value
2833
- }, [m()]);
2936
+ class: u.value
2937
+ }, [d()]);
2834
2938
  }
2835
2939
  });
2836
- function Wn(e, t, n) {
2837
- var w;
2838
- function o() {
2839
- n != null && n.resolveComponentContext && n.resolveComponentContext();
2840
- }
2841
- o();
2842
- const a = n && n.getStyles && n.getStyles() || "", r = n && n.getDesignerClass && n.getDesignerClass() || "", s = v();
2843
- function f() {
2844
- return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
2940
+ function En(e, t, n) {
2941
+ var M;
2942
+ const l = "", i = "", a = b();
2943
+ function r() {
2944
+ return (t == null ? void 0 : t.schema.componentType) !== "frame";
2845
2945
  }
2846
2946
  function c() {
2847
2947
  return !1;
2848
2948
  }
2849
- function l() {
2850
- return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
2949
+ function m() {
2950
+ return (t == null ? void 0 : t.schema.componentType) !== "frame";
2851
2951
  }
2852
- function g() {
2853
- return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
2952
+ function p() {
2953
+ return (t == null ? void 0 : t.schema.componentType) === "frame";
2854
2954
  }
2855
- function i(b) {
2856
- if (!b || !b.value)
2955
+ function u(C) {
2956
+ if (!C || !C.value)
2857
2957
  return null;
2858
- if (b.value.schema && b.value.schema.type === "component")
2859
- return b.value;
2860
- const T = v(b == null ? void 0 : b.value.parent), F = i(T);
2861
- return F || null;
2958
+ if (C.value.schema && C.value.schema.type === "component")
2959
+ return C.value;
2960
+ const k = b(C == null ? void 0 : C.value.parent), O = u(k);
2961
+ return O || null;
2862
2962
  }
2863
- function d(b = t) {
2864
- const { componentInstance: T, designerItemElementRef: F } = b;
2865
- return !T || !T.value ? null : T.value.canMove ? F : d(b.parent);
2963
+ function o(C = t) {
2964
+ const { componentInstance: k, designerItemElementRef: O } = C;
2965
+ return !k || !k.value ? null : k.value.canMove ? O : o(C.parent);
2866
2966
  }
2867
- function C(b) {
2868
- return !!n && n.canAccepts(b);
2967
+ function s(C) {
2968
+ return !!n;
2869
2969
  }
2870
- function u() {
2970
+ function g() {
2871
2971
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
2872
2972
  }
2873
- function m() {
2973
+ function y() {
2874
2974
  }
2875
- function p(b, T) {
2876
- T && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(T);
2975
+ function d(C, k) {
2877
2976
  }
2878
- function y(b, T) {
2879
- const { componentType: F } = b;
2880
- let I = H(F, b, T);
2881
- n && n.onResolveNewComponentSchema && (I = n.onResolveNewComponentSchema(b, I));
2882
- const O = F.toLowerCase().replace("-", "_");
2883
- return I && !I.id && I.type === F && (I.id = `${O}_${Math.random().toString().slice(2, 6)}`), I;
2977
+ function f(C, k) {
2978
+ const { componentType: O } = C;
2979
+ let F = de(O, C, k);
2980
+ const L = O.toLowerCase().replace(/-/g, "_");
2981
+ return F && !F.id && F.type === O && (F.id = `${L}_${Math.random().toString().slice(2, 6)}`), F;
2884
2982
  }
2885
- function S(b, T) {
2886
- const F = String(b.getAttribute("data-controltype")), I = b.getAttribute("data-feature"), O = I ? JSON.parse(I) : {};
2887
- O.parentComponentInstance = s.value;
2888
- let M = H(F, O);
2889
- n && n.onAcceptNewChildElement && (M = n.onAcceptNewChildElement(b, T, M));
2890
- const D = F.toLowerCase().replace("-", "_");
2891
- return M && !M.id && M.type === F && (M.id = `${D}_${Math.random().toString().slice(2, 6)}`), M;
2983
+ function v(C) {
2892
2984
  }
2893
- function k(b) {
2985
+ function S(...C) {
2894
2986
  }
2895
- function j(...b) {
2896
- if (n && n.getPropsConfig)
2897
- return n.getPropsConfig(...b);
2987
+ function w() {
2988
+ t != null && t.schema.contents && t.schema.contents.map((C) => {
2989
+ var F;
2990
+ let k = C.id;
2991
+ C.type === "component-ref" && (k = C.component);
2992
+ const O = e.value.querySelector(`#${k}-design-item`);
2993
+ (F = O == null ? void 0 : O.componentInstance) != null && F.value.onRemoveComponent && O.componentInstance.value.onRemoveComponent();
2994
+ });
2898
2995
  }
2899
- return s.value = {
2900
- canMove: f(),
2996
+ return a.value = {
2997
+ canMove: r(),
2901
2998
  canSelectParent: c(),
2902
- canDelete: l(),
2903
- canNested: !g(),
2999
+ canDelete: m(),
3000
+ canNested: !p(),
2904
3001
  contents: t == null ? void 0 : t.schema.contents,
2905
3002
  elementRef: e,
2906
- parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
3003
+ parent: (M = t == null ? void 0 : t.parent) == null ? void 0 : M.componentInstance,
2907
3004
  schema: t == null ? void 0 : t.schema,
2908
- styles: a,
2909
- designerClass: r,
2910
- canAccepts: C,
2911
- getBelongedComponentInstance: i,
2912
- getDraggableDesignItemElement: d,
2913
- getDraggingDisplayText: u,
2914
- getPropConfig: j,
2915
- getDragScopeElement: m,
2916
- onAcceptMovedChildElement: p,
2917
- onAcceptNewChildElement: S,
2918
- onChildElementMovedOut: k,
2919
- addNewChildComponentSchema: y,
2920
- updateDragAndDropRules: o,
2921
- triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || v(!1),
2922
- triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || v(!1)
2923
- }, s;
2924
- }
2925
- function _n() {
2926
- function e(t) {
2927
- var a, r;
2928
- if (!t)
2929
- return !1;
2930
- const n = ((a = t.targetContainer) == null ? void 0 : a.componentInstance) && t.targetContainer.componentInstance.value;
2931
- if (!n)
2932
- return !1;
2933
- const o = (r = n.schema.appearance) == null ? void 0 : r.class;
2934
- if (t.controlCategory === "input" || t.controlType === "form-group") {
2935
- const s = n.schema.type, f = (s === "response-form" || s === "content-container") && o && o.includes("farris-form");
2936
- if (n.schema.type !== "response-layout-item" && !f)
2937
- return !1;
2938
- }
2939
- return t.controlType !== "field-set";
2940
- }
2941
- return {
2942
- basalDragulaRuleForContainer: e
2943
- };
2944
- }
2945
- const zn = "https://json-schema.org/draft/2020-12/schema", Xn = "https://farris-design.gitee.io/dragging-rules.schema.json", Jn = "Dragging Rules", Qn = "The rules of designer canvas", Yn = "object", Zn = {
2946
- "f-page": {
2947
- description: "The root class of page designed by farris.",
2948
- type: "object",
2949
- properties: {
2950
- contents: {
2951
- type: "object",
2952
- properties: {
2953
- "f-page-header": {
2954
- description: "The class of page header designed by farris.",
2955
- type: "string"
2956
- },
2957
- "f-page-main": {
2958
- description: "The class of page body designed by farris.",
2959
- type: "object",
2960
- properties: {
2961
- contents: {
2962
- type: "object",
2963
- properties: {
2964
- "f-struct-like-card": {
2965
- description: "",
2966
- type: "object",
2967
- properties: {
2968
- contents: {
2969
- type: "object",
2970
- properties: {
2971
- "f-struct-form": {
2972
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
2973
- type: "object",
2974
- properties: {
2975
- contents: {
2976
- type: "object",
2977
- properties: {
2978
- "f-section-form": {
2979
- description: "The class of section which has wrapped a reponse-form component.",
2980
- type: "object",
2981
- properties: {
2982
- contents: {
2983
- type: "object",
2984
- properties: {
2985
- "f-form-layout": {
2986
- description: "The class of reponse form",
2987
- type: "object",
2988
- properties: {
2989
- rules: {
2990
- type: "object",
2991
- properties: {
2992
- canAccept: {
2993
- type: "boolean",
2994
- const: !0
2995
- },
2996
- fixed: {
2997
- type: "boolean",
2998
- const: !0
2999
- },
3000
- hidePadding: {
3001
- type: "boolean",
3002
- const: !1
3003
- }
3004
- }
3005
- }
3006
- }
3007
- }
3008
- }
3009
- },
3010
- rules: {
3011
- type: "object",
3012
- properties: {
3013
- canAccept: {
3014
- type: "boolean",
3015
- const: !1
3016
- },
3017
- fixed: {
3018
- type: "boolean",
3019
- const: !0
3020
- },
3021
- hidePadding: {
3022
- type: "boolean",
3023
- const: !0
3024
- }
3025
- }
3026
- }
3027
- }
3028
- }
3029
- }
3030
- },
3031
- rules: {
3032
- type: "object",
3033
- properties: {
3034
- canAccept: {
3035
- type: "boolean",
3036
- const: !1
3037
- },
3038
- fixed: {
3039
- type: "boolean",
3040
- const: !1
3041
- },
3042
- hidePadding: {
3043
- type: "boolean",
3044
- const: !0
3045
- }
3046
- }
3047
- }
3048
- }
3049
- },
3050
- "f-struct-wrapper": {
3051
- description: "",
3052
- type: "object",
3053
- properties: {
3054
- contents: {
3055
- type: "object",
3056
- properties: {
3057
- "f-section-tabs": {
3058
- description: "The class of section which has wrapped sub-grid tabs.",
3059
- type: "object",
3060
- properties: {
3061
- contents: {
3062
- type: "object",
3063
- properties: {
3064
- "f-tabs-in-card": {
3065
- description: "The class of tabs which contains sub-grid.",
3066
- type: "object",
3067
- properties: {
3068
- contents: {
3069
- type: "object",
3070
- properties: {
3071
- "f-struct-data-grid-in-card": {
3072
- description: "The class of sub-grid component",
3073
- type: "object",
3074
- properties: {
3075
- contents: {
3076
- type: "object",
3077
- properties: {
3078
- "f-grid-is-sub": {
3079
- description: "The class of sub-grid",
3080
- type: "object",
3081
- properties: {
3082
- rules: {
3083
- type: "object",
3084
- properties: {
3085
- canAccept: {
3086
- type: "boolean",
3087
- const: !0
3088
- },
3089
- fixed: {
3090
- type: "boolean",
3091
- const: !0
3092
- },
3093
- hidePadding: {
3094
- type: "boolean",
3095
- const: !1
3096
- }
3097
- }
3098
- }
3099
- }
3100
- }
3101
- }
3102
- },
3103
- rules: {
3104
- type: "object",
3105
- properties: {
3106
- canAccept: {
3107
- type: "boolean",
3108
- const: !1
3109
- },
3110
- fixed: {
3111
- type: "boolean",
3112
- const: !1
3113
- },
3114
- hidePadding: {
3115
- type: "boolean",
3116
- const: !0
3117
- }
3118
- }
3119
- }
3120
- }
3121
- }
3122
- }
3123
- },
3124
- rules: {
3125
- type: "object",
3126
- properties: {
3127
- canAccept: {
3128
- type: "boolean",
3129
- const: !1
3130
- },
3131
- fixed: {
3132
- type: "boolean",
3133
- const: !0
3134
- },
3135
- hidePadding: {
3136
- type: "boolean",
3137
- const: !0
3138
- }
3139
- }
3140
- }
3141
- }
3142
- }
3143
- }
3144
- },
3145
- rules: {
3146
- type: "object",
3147
- properties: {
3148
- canAccept: {
3149
- type: "boolean",
3150
- const: !1
3151
- },
3152
- fixed: {
3153
- type: "boolean",
3154
- const: !0
3155
- },
3156
- hidePadding: {
3157
- type: "boolean",
3158
- const: !0
3159
- }
3160
- }
3161
- }
3162
- }
3163
- },
3164
- "f-section-in-main": {
3165
- description: "The class of section which has wrapped a reponse-form component.",
3166
- type: "object",
3167
- properties: {
3168
- rules: {
3169
- type: "object",
3170
- properties: {
3171
- canAccept: {
3172
- type: "boolean",
3173
- const: !0
3174
- },
3175
- fixed: {
3176
- type: "boolean",
3177
- const: !0
3178
- },
3179
- hidePadding: {
3180
- type: "boolean",
3181
- const: !1
3182
- }
3183
- }
3184
- }
3185
- }
3186
- }
3187
- }
3188
- },
3189
- rules: {
3190
- type: "object",
3191
- properties: {
3192
- canAccept: {
3193
- type: "boolean",
3194
- const: !1
3195
- },
3196
- fixed: {
3197
- type: "boolean",
3198
- const: !1
3199
- },
3200
- hidePadding: {
3201
- type: "boolean",
3202
- const: !0
3203
- }
3204
- }
3205
- }
3206
- }
3207
- }
3208
- }
3209
- },
3210
- rules: {
3211
- type: "object",
3212
- properties: {
3213
- canAccept: {
3214
- type: "boolean",
3215
- const: !0
3216
- },
3217
- fixed: {
3218
- type: "boolean",
3219
- const: !0
3220
- },
3221
- hidePadding: {
3222
- type: "object",
3223
- const: {
3224
- allOf: [
3225
- {
3226
- sibling: 0,
3227
- parent: {
3228
- "f-page-main": !0
3229
- }
3230
- }
3231
- ]
3232
- }
3233
- }
3234
- }
3235
- }
3236
- }
3237
- },
3238
- "f-struct-data-grid": {
3239
- description: "",
3240
- type: "object",
3241
- properties: {
3242
- rules: {
3243
- type: "object",
3244
- properties: {
3245
- canAccept: {
3246
- type: "object",
3247
- const: !0
3248
- },
3249
- fixed: {
3250
- type: "boolean",
3251
- const: !0
3252
- },
3253
- hidePadding: {
3254
- type: "boolean",
3255
- const: !0
3256
- }
3257
- }
3258
- }
3259
- }
3260
- },
3261
- "f-page-main-content": {
3262
- description: "",
3263
- type: "object",
3264
- properties: {
3265
- contents: {
3266
- type: "object",
3267
- properties: {
3268
- "f-page-content-nav": {
3269
- description: "",
3270
- type: "object",
3271
- properties: {
3272
- contents: {
3273
- type: "object",
3274
- properties: {
3275
- "f-struct-data-grid-in-nav": {
3276
- description: "",
3277
- type: "object",
3278
- properties: {
3279
- contents: {
3280
- type: "object",
3281
- properties: {
3282
- "f-page-content-nav-extend": {
3283
- description: "",
3284
- type: "object"
3285
- },
3286
- "f-section-in-nav": {
3287
- description: "",
3288
- type: "object",
3289
- properties: {
3290
- rules: {
3291
- type: "object",
3292
- properties: {
3293
- canAccept: {
3294
- type: "boolean",
3295
- const: !1
3296
- },
3297
- fixed: {
3298
- type: "boolean",
3299
- const: !0
3300
- },
3301
- hidePadding: {
3302
- type: "boolean",
3303
- const: !1
3304
- }
3305
- }
3306
- }
3307
- }
3308
- }
3309
- }
3310
- },
3311
- rules: {
3312
- type: "object",
3313
- properties: {
3314
- canAccept: {
3315
- type: "boolean",
3316
- const: !0
3317
- },
3318
- fixed: {
3319
- type: "boolean",
3320
- const: !1
3321
- },
3322
- hidePadding: {
3323
- type: "boolean",
3324
- const: !0
3325
- }
3326
- }
3327
- }
3328
- }
3329
- }
3330
- }
3331
- }
3332
- }
3333
- },
3334
- "f-page-content-main": {
3335
- description: "",
3336
- type: "object",
3337
- properties: {}
3338
- }
3339
- }
3340
- }
3341
- }
3342
- },
3343
- "f-page-content": {
3344
- description: "",
3345
- type: "object",
3346
- properties: {
3347
- contents: {
3348
- type: "object",
3349
- properties: {
3350
- "f-page-content-nav": {
3351
- description: "",
3352
- type: "object",
3353
- properties: {
3354
- contents: {
3355
- type: "object",
3356
- properties: {
3357
- "f-list-nav": {
3358
- description: "",
3359
- type: "object"
3360
- },
3361
- "f-list-nav-left": {
3362
- description: "",
3363
- type: "object"
3364
- },
3365
- "f-struct-data-grid-in-nav": {
3366
- description: "",
3367
- type: "object",
3368
- properties: {
3369
- contents: {
3370
- type: "object",
3371
- properties: {
3372
- "f-section-form": {
3373
- description: "",
3374
- type: "object",
3375
- properties: {
3376
- rules: {
3377
- type: "object",
3378
- properties: {
3379
- canAccept: {
3380
- type: "boolean",
3381
- const: !1
3382
- },
3383
- fixed: {
3384
- type: "boolean",
3385
- const: !0
3386
- },
3387
- hidePadding: {
3388
- type: "boolean",
3389
- const: !0
3390
- }
3391
- }
3392
- }
3393
- }
3394
- },
3395
- "f-section-grid": {
3396
- description: "",
3397
- type: "object",
3398
- properties: {
3399
- rules: {
3400
- type: "object",
3401
- properties: {
3402
- canAccept: {
3403
- type: "boolean",
3404
- const: !1
3405
- },
3406
- fixed: {
3407
- type: "boolean",
3408
- const: !0
3409
- },
3410
- hidePadding: {
3411
- type: "boolean",
3412
- const: !0
3413
- }
3414
- }
3415
- }
3416
- }
3417
- }
3418
- }
3419
- },
3420
- rules: {
3421
- type: "object",
3422
- properties: {
3423
- canAccept: {
3424
- type: "boolean",
3425
- const: !1
3426
- },
3427
- fixed: {
3428
- type: "boolean",
3429
- const: !0
3430
- },
3431
- hidePadding: {
3432
- type: "boolean",
3433
- const: !0
3434
- }
3435
- }
3436
- }
3437
- }
3438
- }
3439
- }
3440
- }
3441
- },
3442
- rules: {
3443
- type: "object",
3444
- properties: {
3445
- canAccept: {
3446
- type: "boolean",
3447
- const: !1
3448
- },
3449
- fixed: {
3450
- type: "boolean",
3451
- const: !0
3452
- },
3453
- hidePadding: {
3454
- type: "boolean",
3455
- const: !0
3456
- }
3457
- }
3458
- }
3459
- },
3460
- "f-page-content-main": {
3461
- description: "",
3462
- type: "object",
3463
- properties: {
3464
- rules: {
3465
- type: "object",
3466
- properties: {
3467
- canAccept: {
3468
- type: "boolean",
3469
- const: !1
3470
- },
3471
- fixed: {
3472
- type: "boolean",
3473
- const: !1
3474
- },
3475
- hidePadding: {
3476
- type: "boolean",
3477
- const: !0
3478
- }
3479
- }
3480
- }
3481
- }
3482
- }
3483
- }
3484
- },
3485
- rules: {
3486
- type: "object",
3487
- properties: {
3488
- canAccept: {
3489
- type: "boolean",
3490
- const: !1
3491
- },
3492
- fixed: {
3493
- type: "boolean",
3494
- const: !0
3495
- },
3496
- hidePadding: {
3497
- type: "boolean",
3498
- const: !0
3499
- }
3500
- }
3501
- }
3502
- }
3503
- }
3504
- }
3505
- },
3506
- rules: {
3507
- type: "object",
3508
- properties: {
3509
- canAccept: {
3510
- type: "object",
3511
- const: {
3512
- anyOf: [
3513
- {
3514
- children: 0
3515
- },
3516
- {
3517
- children: {
3518
- length: {
3519
- not: 1
3520
- },
3521
- "f-struct-like-card": !0
3522
- }
3523
- },
3524
- {
3525
- children: {
3526
- "scroll-spy": !1,
3527
- "f-page-content": !1,
3528
- "f-struct-like-card": !1
3529
- }
3530
- }
3531
- ]
3532
- }
3533
- },
3534
- fixed: {
3535
- type: "boolean",
3536
- const: !0
3537
- },
3538
- hidePadding: {
3539
- type: "boolean",
3540
- const: !0
3541
- }
3542
- }
3543
- }
3544
- }
3545
- },
3546
- "f-page-footer": {
3547
- description: "The class of page footer designed by farris.",
3548
- type: "string"
3549
- }
3550
- }
3551
- },
3552
- rules: {
3553
- type: "object",
3554
- properties: {
3555
- canAccept: {
3556
- type: "boolean",
3557
- const: !1
3558
- },
3559
- fixed: {
3560
- type: "boolean",
3561
- const: !0
3562
- },
3563
- hidePadding: {
3564
- type: "boolean",
3565
- const: !0
3566
- }
3567
- }
3568
- }
3569
- }
3570
- },
3571
- "f-page-is-managelist": {
3572
- description: "The root class of mangement list page.",
3573
- type: "string"
3574
- },
3575
- "f-page-card": {
3576
- description: "",
3577
- type: "object"
3578
- },
3579
- "f-page-is-mainsubcard": {
3580
- description: "",
3581
- type: "object"
3582
- }
3583
- }, Kn = {
3584
- $schema: zn,
3585
- $id: Xn,
3586
- title: Jn,
3587
- description: Qn,
3588
- type: Yn,
3589
- properties: Zn
3590
- }, Y = /* @__PURE__ */ new Map();
3591
- function eo() {
3592
- function e(u, m, p, y) {
3593
- var S;
3594
- if (typeof p == "number")
3595
- return ((S = y[u]) == null ? void 0 : S.length) === p;
3596
- if (typeof p == "object") {
3597
- const k = Object.keys(p)[0], j = p[k];
3598
- if (k === "not")
3599
- return Number(y[u].length) !== Number(j);
3600
- if (k === "moreThan")
3601
- return Number(y[u].length) >= Number(j);
3602
- if (k === "lessThan")
3603
- return Number(y[u].length) <= Number(j);
3604
- }
3605
- return !1;
3606
- }
3607
- function t(u, m, p, y) {
3608
- return typeof p == "boolean" ? y.childrenClassList.includes(m) === !!p : !1;
3609
- }
3610
- function n(u, m, p, y) {
3611
- return typeof p == "boolean" ? y.parentClassList.includes(m) === !!p : !1;
3612
- }
3613
- function o(u, m, p, y) {
3614
- return typeof p == "boolean" ? y.parentClassList.includes(m) === !!p : !1;
3615
- }
3616
- const a = /* @__PURE__ */ new Map([
3617
- ["length", e],
3618
- ["hasChildren", t],
3619
- ["hasSibling", o],
3620
- ["hasParent", n]
3621
- ]);
3622
- function r(u, m) {
3623
- const p = u;
3624
- return typeof m == "number" ? [{ target: p, operator: "length", param: null, value: Number(m) }] : typeof m == "object" ? Object.keys(m).map((y) => {
3625
- if (y === "length")
3626
- return { target: p, operator: "length", param: null, value: m[y] };
3627
- const S = y, k = m[y];
3628
- return { target: p, operator: u === "children" ? "hasChildren" : u === "parent" ? "hasParent" : "hasSibling", param: S, value: k };
3629
- }) : [];
3630
- }
3631
- function s(u, m) {
3632
- if (a.has(u.operator)) {
3633
- const p = a.get(u.operator);
3634
- return p && p(u.target, u.param, u.value, m) || !1;
3635
- }
3636
- return !1;
3637
- }
3638
- function f(u, m) {
3639
- return Object.keys(u).reduce((k, j) => {
3640
- const w = r(j, u[j]);
3641
- return k.push(...w), k;
3642
- }, []).reduce((k, j) => k && s(j, m), !0);
3643
- }
3644
- function c(u, m) {
3645
- const p = Object.keys(u), y = p.includes("allOf"), S = p.includes("anyOf"), k = y || S, b = (k ? u[k ? y ? "allOf" : "anyOf" : "allOf"] : [u]).map((F) => f(F, m));
3646
- return y ? !b.includes(!1) : b.includes(!0);
3647
- }
3648
- function l(u, m) {
3649
- const p = u.const;
3650
- return p ? typeof p == "boolean" ? p : typeof p == "object" ? c(p, m) : !1 : !1;
3651
- }
3652
- function g(u) {
3653
- return (m) => {
3654
- const p = { canAccept: !0, fixed: !1, hidePadding: !1 };
3655
- return u && u.properties && Object.keys(u.properties).reduce((y, S) => {
3656
- const k = u.properties[S];
3657
- return y[S] = l(k, m), y;
3658
- }, p), p;
3659
- };
3660
- }
3661
- function i(u, m, p) {
3662
- if (m.type === "object" && m.properties) {
3663
- const { rules: y, contents: S } = m.properties;
3664
- p.set(u, g(y)), S && Object.keys(S.properties).forEach(
3665
- (k) => i(k, S.properties[k], p)
3666
- );
3667
- }
3668
- }
3669
- function d() {
3670
- const { properties: u } = Kn;
3671
- Object.keys(u).forEach((m) => {
3672
- i(m, u[m], Y);
3673
- });
3674
- }
3675
- function C(u, m) {
3676
- const p = { canAccept: !0, fixed: !1, hidePadding: !0 };
3677
- return Y.has(u) ? Y.get(u)(m) : p;
3678
- }
3679
- return d(), { getRuleValue: C };
3680
- }
3681
- function to(e, t) {
3682
- function n(c, l = null) {
3683
- if (l) return l;
3684
- const g = e.getComponentById(t);
3685
- return e.selectNode(g, (i) => i.id === c);
3686
- }
3687
- function o(c) {
3688
- const l = e.getComponentById(c);
3689
- return !(!l || !l.componentType || !l.componentType.startsWith("form"));
3690
- }
3691
- function a(c) {
3692
- const l = n(c.id), g = ye(e), i = [];
3693
- g.getResonseFormLayoutConfig(l, i, 1);
3694
- const d = i.map((j) => j.columnInSM), C = i.map((j) => j.columnInMD), u = i.map((j) => j.columnInLG), m = i.map((j) => j.columnInEL), p = r(d) ? d[0] : 0, y = r(C) ? C[0] : 0, S = r(u) ? u[0] : 0, k = r(m) ? m[0] : 0;
3695
- return {
3696
- uniqueColClassInSM: p,
3697
- uniqueColClassInMD: y,
3698
- uniqueColClassInLG: S,
3699
- uniqueColClassInEL: k
3700
- };
3701
- }
3702
- function r(c) {
3703
- const l = new Set(c);
3704
- return Array.from(l).length === 1;
3705
- }
3706
- function s(c, l, g) {
3707
- c = n(g, c), c.contents.forEach((i) => {
3708
- if (i.type === tt.fieldset.type) {
3709
- s(i, l, i.id);
3710
- return;
3711
- }
3712
- i.appearance || (i.appearance = {});
3713
- const d = i.appearance.class;
3714
- i.appearance.class = f(d, l);
3715
- });
3716
- }
3717
- function f(c, l) {
3718
- let g, i, d, C, u = [];
3719
- if (c) {
3720
- const j = c.split(" "), w = j.filter((b) => b.startsWith("col-"));
3721
- g = w.find((b) => /^col-([1-9]|10|11|12)$/.test(b)), i = w.find((b) => /^col-md-([1-9]|10|11|12)$/.test(b)), d = w.find((b) => /^col-xl-([1-9]|10|11|12)$/.test(b)), C = w.find((b) => /^col-el-([1-9]|10|11|12)$/.test(b)), u = j.filter((b) => !b.startsWith("col-"));
3722
- }
3723
- const m = l.uniqueColClassInSM ? "col-" + l.uniqueColClassInSM : g, p = l.uniqueColClassInMD ? "col-md-" + l.uniqueColClassInMD : i, y = l.uniqueColClassInLG ? "col-xl-" + l.uniqueColClassInLG : d, S = l.uniqueColClassInEL ? "col-el-" + l.uniqueColClassInEL : C;
3724
- return [m, p, y, S].concat(u).join(" ");
3725
- }
3726
- return { checkIsInFormComponent: o, assembleUnifiedLayoutContext: a, changeFormControlsByUnifiedLayoutConfig: s };
3727
- }
3728
- class no extends et {
3729
- constructor(t, n) {
3730
- super(t, n);
3731
- }
3732
- getPropertyConfig(t, n) {
3733
- var o = this;
3734
- this.propertyConfig.categories.basic = this.getBasicPropConfig(t);
3735
- const { checkIsInFormComponent: a, assembleUnifiedLayoutContext: r, changeFormControlsByUnifiedLayoutConfig: s } = to(this.formSchemaUtils, this.componentId), f = this.getAppearanceConfig(t);
3736
- return f.properties.unifiedLayout = {
3737
- title: "统一布局配置",
3738
- description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
3739
- visible: a(this.componentId),
3740
- refreshPanelAfterChanged: !0,
3741
- editor: {
3742
- type: "response-form-layout-setting",
3743
- initialState: r(t)
3744
- }
3745
- }, f.setPropertyRelates = function(c, l) {
3746
- if (c)
3747
- switch (c && c.propertyID) {
3748
- case "unifiedLayout": {
3749
- s(null, c.propertyValue, t.id), o.updateElementByParentContainer(t.id, n);
3750
- break;
3751
- }
3752
- }
3753
- }, this.propertyConfig.categories.appearance = f, this.propertyConfig;
3754
- }
3755
- }
3756
- function oo(e, t) {
3757
- var F;
3758
- const n = e.schema, o = (F = e.parent) == null ? void 0 : F.schema, a = eo(), r = v(!1), s = v(!1);
3759
- let f = !0, c = !1, l, g = !1;
3760
- function i(I) {
3761
- return l && l.componentClassList && l.componentClassList.includes("f-form-layout") && l.componentClassList.includes("farris-form") ? I.sourceType === "control" && I.controlCategory === "input" || I.sourceType === "move" && I.controlType === "form-group" : !0;
3762
- }
3763
- function d(I) {
3764
- return !(!_n().basalDragulaRuleForContainer(I) || !f || !i(I));
3765
- }
3766
- function C() {
3767
- r.value = !1, s.value = !1;
3768
- const I = n, O = I.appearance && I.appearance.class || "", M = O.split(" "), D = I.contents || [], P = D.length ? D[0] : null, L = P && P.appearance ? P.appearance.class : "", E = L ? L.split(" ") : [], A = D.length ? D.reduce((ie, J) => {
3769
- const le = J && J.appearance ? J.appearance.class : "", Be = le ? le.split(" ") : [];
3770
- return ie.push(...Be), ie;
3771
- }, []) : [], $ = o, X = $ && $.appearance && $.appearance.class || "", Fe = X ? X.split(" ") : [];
3772
- l = {
3773
- componentClass: O,
3774
- componentClassList: M,
3775
- childContents: D,
3776
- firstChildContent: P,
3777
- firstChildClass: L,
3778
- firstChildClassList: E,
3779
- parent: $,
3780
- parentClass: X,
3781
- parentClassList: Fe,
3782
- children: D,
3783
- childrenClassList: A
3784
- };
3785
- const { canAccept: Ie, fixed: Me, hidePadding: je } = a.getRuleValue(M[0], l);
3786
- return f = Ie, c = je, g = Me, !0;
3787
- }
3788
- function u(I) {
3789
- Z();
3790
- }
3791
- function m() {
3792
- return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
3793
- }
3794
- function p(I, O) {
3795
- const M = n;
3796
- if ((M.appearance && M.appearance.class || "").split(" ").includes("f-form-layout")) {
3797
- const { label: L } = I, E = H("form-group");
3798
- return E.editor = O, E.label = L, y(E), delete E.editor.id, delete E.editor.binding, delete E.editor.appearance, delete E.editor.visible, E;
3799
- }
3800
- return O;
3801
- }
3802
- function y(I) {
3803
- const O = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
3804
- if (O && O.schema && O.schema.componentType) {
3805
- const M = O.schema.formColumns;
3806
- let D = S(M);
3807
- D = t.formSchemaUtils.getControlClassByFormUnifiedLayout(D, "", e.schema), I.appearance || (I.appearance = {}), I.appearance.class = D;
3808
- }
3809
- }
3810
- function S(I) {
3811
- let O = "";
3812
- switch (I) {
3813
- case 1: {
3814
- O = "col-12 col-md-12 col-xl-12 col-el-12";
3815
- break;
3816
- }
3817
- case 2: {
3818
- O = "col-12 col-md-6 col-xl-6 col-el-6";
3819
- break;
3820
- }
3821
- case 3: {
3822
- O = "col-12 col-md-6 col-xl-4 col-el-4";
3823
- break;
3824
- }
3825
- case 4: {
3826
- O = "col-12 col-md-6 col-xl-3 col-el-2";
3827
- break;
3828
- }
3829
- }
3830
- return O;
3831
- }
3832
- function k(I, O, M) {
3833
- const D = n;
3834
- if ((D.appearance && D.appearance.class || "").split(" ").includes("f-form-layout")) {
3835
- const E = String(I.innerText), A = H("form-group");
3836
- return A.editor = M, A.label = E, A;
3837
- }
3838
- return M;
3839
- }
3840
- function j() {
3841
- return !g;
3842
- }
3843
- function w() {
3844
- return !g;
3845
- }
3846
- function b() {
3847
- return c;
3848
- }
3849
- function T(I) {
3850
- return new no(I, t).getPropertyConfig(n, e.componentInstance.value);
3851
- }
3852
- return {
3853
- canAccepts: d,
3854
- checkCanDeleteComponent: w,
3855
- checkCanMoveComponent: j,
3856
- getStyles: m,
3857
- getPropsConfig: T,
3858
- hideNestedPaddingInDesginerView: b,
3859
- onAcceptNewChildElement: k,
3860
- onAcceptMovedChildElement: u,
3861
- resolveComponentContext: C,
3862
- onResolveNewComponentSchema: p,
3863
- triggerBelongedComponentToMoveWhenMoved: r,
3864
- triggerBelongedComponentToDeleteWhenDeleted: s
3865
- };
3005
+ styles: l,
3006
+ designerClass: i,
3007
+ canAccepts: s,
3008
+ getBelongedComponentInstance: u,
3009
+ getDraggableDesignItemElement: o,
3010
+ getDraggingDisplayText: g,
3011
+ getPropConfig: S,
3012
+ getDragScopeElement: y,
3013
+ onAcceptMovedChildElement: d,
3014
+ onChildElementMovedOut: v,
3015
+ addNewChildComponentSchema: f,
3016
+ triggerBelongedComponentToMoveWhenMoved: b(!1),
3017
+ triggerBelongedComponentToDeleteWhenDeleted: b(!1),
3018
+ onRemoveComponent: w
3019
+ }, a;
3866
3020
  }
3867
- const ao = /* @__PURE__ */ R({
3021
+ const $n = /* @__PURE__ */ x({
3868
3022
  name: "FOrderDesign",
3869
- props: ae,
3023
+ props: K,
3870
3024
  emits: ["change"],
3871
3025
  setup(e, t) {
3872
- var j;
3873
- const n = v(e.items), o = v("排序列"), a = v("排序方式"), r = v("添加排序列"), s = [{
3026
+ const n = b(e.items), l = b("排序列"), i = b("排序方式"), a = b("添加排序列"), r = [{
3874
3027
  id: "asc",
3875
3028
  name: "升序"
3876
3029
  }, {
3877
3030
  id: "desc",
3878
3031
  name: "降序"
3879
- }], f = v(/* @__PURE__ */ new Map()), c = v(), l = q("design-item-context"), g = oo(l.schema, (j = l.parent) == null ? void 0 : j.schema), i = Wn(c, l, g);
3880
- ee(() => {
3881
- c.value.componentInstance = i;
3882
- }), t.expose(i.value);
3883
- function d() {
3884
- const w = n.value.map((b) => [b.id, !0]);
3885
- f.value = new Map(w);
3032
+ }], c = b(/* @__PURE__ */ new Map()), m = b(), p = N("design-item-context"), u = En(m, p);
3033
+ J(() => {
3034
+ m.value.componentInstance = u;
3035
+ }), t.expose(u.value);
3036
+ function o() {
3037
+ const w = n.value.map((M) => [M.id, !0]);
3038
+ c.value = new Map(w);
3886
3039
  }
3887
- d();
3888
- const C = V(() => e.dataSource.map((w) => (w.disabled = f.value.has(w.id), w))), u = V(() => ({
3040
+ o();
3041
+ const s = B(() => e.dataSource.map((w) => (w.disabled = c.value.has(w.id), w))), g = B(() => ({
3889
3042
  "f-order": !0
3890
3043
  }));
3891
- function m(w) {
3892
- n.value = n.value.filter((b) => b.id !== w.id), d(), t.emit("change", n.value);
3044
+ function y(w) {
3045
+ n.value = n.value.filter((M) => M.id !== w.id), o(), t.emit("change", n.value);
3893
3046
  }
3894
- function p() {
3047
+ function d() {
3895
3048
  n.value = [...n.value, {
3896
3049
  id: Date.now().toString(),
3897
3050
  name: "",
3898
3051
  order: "asc"
3899
- }], d(), t.emit("change", n.value);
3052
+ }], o(), t.emit("change", n.value);
3900
3053
  }
3901
- function y(w) {
3902
- d(), t.emit("change", n.value);
3054
+ function f(w) {
3055
+ o(), t.emit("change", n.value);
3903
3056
  }
3904
- function S(w) {
3057
+ function v(w) {
3905
3058
  if (w && w.length) {
3906
- const b = /* @__PURE__ */ new Map();
3907
- w.reduce((T, F) => (T.set(F.id, F), T), b), n.value = w.map((T) => b.get(T.id)), t.emit("change", n.value);
3059
+ const M = /* @__PURE__ */ new Map();
3060
+ w.reduce((C, k) => (C.set(k.id, k), C), M), n.value = w.map((C) => M.get(C.id)), t.emit("change", n.value);
3908
3061
  }
3909
3062
  }
3910
- function k() {
3911
- return h(ve, {
3063
+ function S() {
3064
+ return h(fe, {
3912
3065
  style: "flex:1",
3913
3066
  data: n.value,
3914
3067
  draggable: !0,
3915
3068
  view: "DraggableView",
3916
3069
  "keep-order": !0,
3917
3070
  itemClass: "f-order-item",
3918
- onRemoveItem: m,
3919
- onChange: S
3071
+ onRemoveItem: y,
3072
+ onChange: v
3920
3073
  }, {
3921
3074
  header: () => h("div", {
3922
3075
  class: "f-order-header"
3923
3076
  }, [h("span", {
3924
3077
  class: "f-order-header-order-field"
3925
- }, [o.value]), h("span", {
3078
+ }, [l.value]), h("span", {
3926
3079
  class: "f-order-header-order-type"
3927
- }, [a.value])]),
3080
+ }, [i.value])]),
3928
3081
  itemContent: (w) => h("div", {
3929
3082
  class: "f-order-item-content"
3930
- }, [h(_, {
3083
+ }, [h(W, {
3931
3084
  class: "f-order-item-content-order-field",
3932
- data: C.value,
3085
+ data: s.value,
3933
3086
  valueField: "id",
3934
3087
  textField: "name",
3935
3088
  idField: "id",
3936
3089
  modelValue: w.id,
3937
- "onUpdate:modelValue": (b) => w.id = b,
3938
- onChange: y,
3939
- onClear: y
3940
- }, null), h(_, {
3090
+ "onUpdate:modelValue": (M) => w.id = M,
3091
+ onChange: f,
3092
+ onClear: f
3093
+ }, null), h(W, {
3941
3094
  class: "f-order-item-content-order-type",
3942
- data: s,
3095
+ data: r,
3943
3096
  valueField: "id",
3944
3097
  textField: "name",
3945
3098
  idField: "id",
3946
3099
  modelValue: w.order,
3947
- "onUpdate:modelValue": (b) => w.order = b,
3948
- onChange: y
3100
+ "onUpdate:modelValue": (M) => w.order = M,
3101
+ onChange: f
3949
3102
  }, null)]),
3950
3103
  footer: () => h("div", {
3951
3104
  class: "f-order-footer"
3952
- }, [h(Ce, {
3105
+ }, [h(me, {
3953
3106
  type: "link",
3954
3107
  class: "f-order-add-button",
3955
- onClick: p
3108
+ onClick: d
3956
3109
  }, {
3957
- default: () => h(K, null, [h("span", {
3110
+ default: () => h(X, null, [h("span", {
3958
3111
  class: "f-order-add-icon"
3959
3112
  }, [h("i", {
3960
3113
  class: "f-icon f-icon-add"
3961
- }, null)]), r.value])
3114
+ }, null)]), a.value])
3962
3115
  })])
3963
3116
  });
3964
3117
  }
3965
3118
  return () => h("div", {
3966
- ref: c,
3967
- class: u.value
3968
- }, [k()]);
3119
+ ref: m,
3120
+ class: g.value
3121
+ }, [S()]);
3969
3122
  }
3970
- }), bo = {
3123
+ }), Wn = {
3971
3124
  install(e) {
3972
- e.component(Q.name, Q);
3125
+ e.component(z.name, z);
3973
3126
  },
3974
- register(e, t, n, o) {
3975
- e.order = Q, t.order = ue;
3127
+ register(e, t, n, l) {
3128
+ e.order = z, t.order = le;
3976
3129
  },
3977
3130
  registerDesigner(e, t, n) {
3978
- e.order = ao, t.order = ue;
3131
+ e.order = $n, t.order = le;
3979
3132
  }
3980
3133
  };
3981
3134
  export {
3982
- Q as FOrder,
3983
- bo as default,
3984
- ae as orderProps,
3985
- ue as propsResolver
3135
+ z as FOrder,
3136
+ Wn as default,
3137
+ K as orderProps,
3138
+ le as propsResolver
3986
3139
  };