@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,12 +1,16 @@
1
- var H = Object.defineProperty;
2
- var K = (r, t, e) => t in r ? H(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var v = (r, t, e) => K(r, typeof t != "symbol" ? t + "" : t, e);
4
- import { defineComponent as N, inject as L, onMounted as z, createVNode as h, Fragment as ee, computed as B, ref as M, provide as te } from "vue";
5
- import { useCheck as ne } from "../common/index.esm.js";
6
- import { isPlainObject as q, cloneDeep as W } from "lodash-es";
7
- import { getSchemaByType as j } from "../dynamic-resolver/index.esm.js";
8
- import { useResponseLayoutEditorSetting as oe } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
9
- const re = {
1
+ var ue = Object.defineProperty;
2
+ var ce = (e, t, n) => t in e ? ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var T = (e, t, n) => ce(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { defineComponent as V, inject as N, onMounted as L, createVNode as g, Fragment as Q, computed as I, ref as w, provide as de, Teleport as pe, createApp as fe, onUnmounted as me, watch as j, nextTick as z, withDirectives as G, vShow as ye, mergeProps as ge, createTextVNode as A, vModelText as X } from "vue";
5
+ import { useCheck as he, useGuid as J } from "../common/index.esm.js";
6
+ import { isPlainObject as H, cloneDeep as U } from "lodash-es";
7
+ import { DgControl as _ } from "../designer-canvas/index.esm.js";
8
+ import { resolveAppearance as ve, createPropsResolver as be } from "../dynamic-resolver/index.esm.js";
9
+ import Ce from "../tags/index.esm.js";
10
+ import ke from "../popover/index.esm.js";
11
+ import Fe from "../data-grid/index.esm.js";
12
+ import { FNotifyService as Be } from "../notify/index.esm.js";
13
+ const Me = {
10
14
  value: { type: String, default: "" },
11
15
  /** 值 */
12
16
  modelValue: { type: String, default: "" },
@@ -16,150 +20,157 @@ const re = {
16
20
  label: { type: String, default: "" },
17
21
  /** 标识 */
18
22
  id: { type: String, default: "" }
19
- }, R = Symbol("radioGroupContext"), x = /* @__PURE__ */ N({
23
+ }, Y = Symbol("radioGroupContext"), K = /* @__PURE__ */ V({
20
24
  name: "FRadio",
21
- props: re,
25
+ props: Me,
22
26
  emits: ["update:value"],
23
- setup(r, t) {
24
- const e = L(R, null), {
25
- buttonClass: n,
27
+ setup(e, t) {
28
+ const n = N(Y, null), {
29
+ buttonClass: a,
26
30
  checked: o,
27
- disabled: a,
28
- name: c,
29
- tagClass: d,
30
- shouldRenderButton: l,
31
- shouldRenderNative: i,
32
- shouldRenderTag: p,
33
- onClickRadio: s
34
- } = ne(r, t, e == null ? void 0 : e.parentProps, e == null ? void 0 : e.parentContext);
35
- return z(() => {
31
+ disabled: l,
32
+ name: u,
33
+ tagClass: c,
34
+ shouldRenderButton: p,
35
+ shouldRenderNative: r,
36
+ shouldRenderTag: d,
37
+ onClickRadio: i
38
+ } = he(e, t, n == null ? void 0 : n.parentProps, n == null ? void 0 : n.parentContext);
39
+ return L(() => {
36
40
  }), () => {
37
- var m, y, f, k, T, F;
38
- return h(ee, null, [l.value && h("div", {
39
- class: n.value,
41
+ var s, f, m, y, F, k;
42
+ return g(Q, null, [p.value && g("div", {
43
+ class: a.value,
40
44
  style: "border-radius:0;border: 1px solid #E8EBF2;",
41
- onClick: s
42
- }, [(y = (m = t.slots).default) == null ? void 0 : y.call(m)]), p.value && h("div", {
43
- class: d.value,
44
- onClick: s
45
- }, [h("div", {
45
+ onClick: i
46
+ }, [(f = (s = t.slots).default) == null ? void 0 : f.call(s)]), d.value && g("div", {
47
+ class: c.value,
48
+ onClick: i
49
+ }, [g("div", {
46
50
  class: "title"
47
- }, [(k = (f = t.slots).default) == null ? void 0 : k.call(f)]), h("div", {
51
+ }, [(y = (m = t.slots).default) == null ? void 0 : y.call(m)]), g("div", {
48
52
  class: "tip"
49
- }, null), h("span", {
53
+ }, null), g("span", {
50
54
  class: "f-icon f-icon-check f-radio-icon"
51
- }, null)]), i.value && h("div", {
55
+ }, null)]), r.value && g("div", {
52
56
  class: "custom-control custom-radio",
53
- onClick: s
54
- }, [h("input", {
57
+ onClick: i
58
+ }, [g("input", {
55
59
  type: "radio",
56
60
  class: "custom-control-input",
57
- name: c.value,
58
- id: r.id,
59
- value: r.value,
61
+ name: u.value,
62
+ id: e.id,
63
+ value: e.value,
60
64
  checked: o.value,
61
- disabled: a.value
62
- }, null), h("div", {
65
+ disabled: l.value
66
+ }, null), g("div", {
63
67
  class: "custom-control-label"
64
- }, [(F = (T = t.slots).default) == null ? void 0 : F.call(T)])])]);
68
+ }, [(k = (F = t.slots).default) == null ? void 0 : k.call(F)])])]);
65
69
  };
66
70
  }
67
71
  });
68
- function ie(r, t, e) {
72
+ function we(e, t, n) {
73
+ return t;
74
+ }
75
+ function Se(e, t, n) {
69
76
  return t;
70
77
  }
71
- const _ = {}, X = {};
72
- function $(r) {
73
- const { properties: t, title: e, ignore: n } = r, o = n && Array.isArray(n), a = Object.keys(t).reduce((c, d) => ((!o || !n.find((l) => l == d)) && (c[d] = t[d].type === "object" && t[d].properties ? $(t[d]) : W(t[d].default)), c), {});
74
- return (!o || !n.find((c) => c == "id")) && (a.id = `${e}-${Date.now()}`), a;
78
+ const Z = {}, ee = {};
79
+ function W(e) {
80
+ const { properties: t, title: n, ignore: a } = e, o = a && Array.isArray(a), l = Object.keys(t).reduce((u, c) => ((!o || !a.find((p) => p === c)) && (u[c] = t[c].type === "object" && t[c].properties ? W(t[c]) : U(t[c].default)), u), {});
81
+ if (n && (!o || !a.find((u) => u === "id"))) {
82
+ const u = n.toLowerCase().replace(/-/g, "_");
83
+ l.id = `${u}_${Math.random().toString().slice(2, 6)}`;
84
+ }
85
+ return l;
75
86
  }
76
- function U(r, t = {}, e) {
77
- const n = _[r];
78
- if (n) {
79
- let o = $(n);
80
- const a = X[r];
81
- return o = a ? a({ getSchemaByType: U }, o, t, e) : o, o;
87
+ function te(e, t = {}, n) {
88
+ const a = Z[e];
89
+ if (a) {
90
+ let o = W(a);
91
+ const l = ee[e];
92
+ return o = l ? l({ getSchemaByType: te }, o, t, n) : o, o;
82
93
  }
83
94
  return null;
84
95
  }
85
- function ae(r, t) {
86
- const e = $(t);
87
- return Object.keys(r).reduce((n, o) => (n[o] && q(n[o]) && q(r[o]) ? Object.assign(n[o], r[o]) : n[o] = r[o], n), e), e;
96
+ function Te(e, t) {
97
+ const n = W(t);
98
+ return Object.keys(n).reduce((a, o) => (a[o] && H(a[o]) && H(e[o] || !e[o]) ? Object.assign(a[o], e[o] || {}) : a[o] = e[o], a), n), n;
88
99
  }
89
- function le(r, t) {
90
- return Object.keys(r).filter((n) => r[n] != null).reduce((n, o) => {
100
+ function Ee(e, t) {
101
+ return Object.keys(e).filter((a) => e[a] != null).reduce((a, o) => {
91
102
  if (t.has(o)) {
92
- const a = t.get(o);
93
- if (typeof a == "string")
94
- n[a] = r[o];
103
+ const l = t.get(o);
104
+ if (typeof l == "string")
105
+ a[l] = e[o];
95
106
  else {
96
- const c = a(o, r[o], r);
97
- Object.assign(n, c);
107
+ const u = l(o, e[o], e);
108
+ Object.assign(a, u);
98
109
  }
99
110
  } else
100
- n[o] = r[o];
101
- return n;
111
+ a[o] = e[o];
112
+ return a;
102
113
  }, {});
103
114
  }
104
- function se(r, t, e = /* @__PURE__ */ new Map()) {
105
- const n = ae(r, t);
106
- return le(n, e);
115
+ function Ie(e, t, n = /* @__PURE__ */ new Map()) {
116
+ const a = Te(e, t);
117
+ return Ee(a, n);
107
118
  }
108
- function ce(r = {}) {
109
- function t(i, p, s, m) {
110
- if (typeof s == "number")
111
- return m[i].length === s;
112
- if (typeof s == "object") {
113
- const y = Object.keys(s)[0], f = s[y];
114
- if (y === "not")
115
- return Number(m[i].length) !== Number(f);
116
- if (y === "moreThan")
117
- return Number(m[i].length) >= Number(f);
118
- if (y === "lessThan")
119
- return Number(m[i].length) <= Number(f);
119
+ function Pe(e = {}) {
120
+ function t(r, d, i, s) {
121
+ if (typeof i == "number")
122
+ return s[r].length === i;
123
+ if (typeof i == "object") {
124
+ const f = Object.keys(i)[0], m = i[f];
125
+ if (f === "not")
126
+ return Number(s[r].length) !== Number(m);
127
+ if (f === "moreThan")
128
+ return Number(s[r].length) >= Number(m);
129
+ if (f === "lessThan")
130
+ return Number(s[r].length) <= Number(m);
120
131
  }
121
132
  return !1;
122
133
  }
123
- function e(i, p, s, m) {
124
- return m[i] && m[i].propertyValue && String(m[i].propertyValue.value) === String(s);
134
+ function n(r, d, i, s) {
135
+ return s[r] && s[r].propertyValue && String(s[r].propertyValue.value) === String(i);
125
136
  }
126
- const n = /* @__PURE__ */ new Map([
137
+ const a = /* @__PURE__ */ new Map([
127
138
  ["length", t],
128
- ["getProperty", e]
139
+ ["getProperty", n]
129
140
  ]);
130
- Object.keys(r).reduce((i, p) => (i.set(p, r[p]), i), n);
131
- function o(i, p) {
132
- const s = i;
133
- return typeof p == "number" ? [{ target: s, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!p }] : typeof p == "object" ? Object.keys(p).map((m) => {
134
- if (m === "length")
135
- return { target: s, operator: "length", param: null, value: p[m] };
136
- const y = m, f = p[m];
137
- return { target: s, operator: "getProperty", param: y, value: f };
141
+ Object.keys(e).reduce((r, d) => (r.set(d, e[d]), r), a);
142
+ function o(r, d) {
143
+ const i = r;
144
+ return typeof d == "number" ? [{ target: i, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: i, operator: "getProperty", param: r, value: !!d }] : typeof d == "object" ? Object.keys(d).map((s) => {
145
+ if (s === "length")
146
+ return { target: i, operator: "length", param: null, value: d[s] };
147
+ const f = s, m = d[s];
148
+ return { target: i, operator: "getProperty", param: f, value: m };
138
149
  }) : [];
139
150
  }
140
- function a(i) {
141
- return Object.keys(i).reduce((s, m) => {
142
- const y = o(m, i[m]);
143
- return s.push(...y), s;
151
+ function l(r) {
152
+ return Object.keys(r).reduce((i, s) => {
153
+ const f = o(s, r[s]);
154
+ return i.push(...f), i;
144
155
  }, []);
145
156
  }
146
- function c(i, p) {
147
- if (n.has(i.operator)) {
148
- const s = n.get(i.operator);
149
- return s && s(i.target, i.param, i.value, p) || !1;
157
+ function u(r, d) {
158
+ if (a.has(r.operator)) {
159
+ const i = a.get(r.operator);
160
+ return i && i(r.target, r.param, r.value, d) || !1;
150
161
  }
151
162
  return !1;
152
163
  }
153
- function d(i, p) {
154
- return a(i).reduce((y, f) => y && c(f, p), !0);
164
+ function c(r, d) {
165
+ return l(r).reduce((f, m) => f && u(m, d), !0);
155
166
  }
156
- function l(i, p) {
157
- const s = Object.keys(i), m = s.includes("allOf"), y = s.includes("anyOf"), f = m || y, F = (f ? i[f ? m ? "allOf" : "anyOf" : "allOf"] : [i]).map((A) => d(A, p));
158
- return m ? !F.includes(!1) : F.includes(!0);
167
+ function p(r, d) {
168
+ const i = Object.keys(r), s = i.includes("allOf"), f = i.includes("anyOf"), m = s || f, k = (m ? r[m ? s ? "allOf" : "anyOf" : "allOf"] : [r]).map((B) => c(B, d));
169
+ return s ? !k.includes(!1) : k.includes(!0);
159
170
  }
160
- return { parseValueSchema: l };
171
+ return { parseValueSchema: p };
161
172
  }
162
- const u = {
173
+ const b = {
163
174
  button: { type: "button", name: "按钮", icon: "Button" },
164
175
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
165
176
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -197,21 +208,22 @@ const u = {
197
208
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
198
209
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
199
210
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
200
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
201
- }, pe = {}, ue = {};
202
- ce();
203
- function de(r, t, e = /* @__PURE__ */ new Map(), n = (c, d, l) => d, o = {}, a = (c) => c) {
204
- return _[t.title] = t, X[t.title] = n, pe[t.title] = o, ue[t.title] = a, (c = {}) => {
205
- const d = se(c, t, e), l = Object.keys(r).reduce((i, p) => (i[p] = r[p].default, i), {});
206
- return Object.assign(l, d);
211
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
212
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
213
+ }, xe = {}, Ve = {};
214
+ Pe();
215
+ function ne(e, t, n = /* @__PURE__ */ new Map(), a = (u, c, p, r) => c, o = {}, l = (u) => u) {
216
+ return Z[t.title] = t, ee[t.title] = a, xe[t.title] = o, Ve[t.title] = l, (u = {}) => {
217
+ const c = Ie(u, t, n), p = Object.keys(e).reduce((r, d) => (r[d] = e[d].default, r), {});
218
+ return Object.assign(p, c);
207
219
  };
208
220
  }
209
- function me(r, t) {
221
+ function Ae(e, t) {
210
222
  return { customClass: t.class, customStyle: t.style };
211
223
  }
212
- const fe = /* @__PURE__ */ new Map([
213
- ["appearance", me]
214
- ]), ye = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/radio-group.schema.json", he = "radio-group", ve = "A Farris Input Component", be = "object", Ce = {
224
+ const Oe = /* @__PURE__ */ new Map([
225
+ ["appearance", Ae]
226
+ ]), De = /* @__PURE__ */ new Map([]), Le = "https://json-schema.org/draft/2020-12/schema", $e = "https://farris-design.gitee.io/radio-group.schema.json", Ne = "radio-group", qe = "A Farris Input Component", Ge = "object", je = {
215
227
  id: {
216
228
  description: "The unique identifier for a radio-group",
217
229
  type: "string"
@@ -243,16 +255,6 @@ const fe = /* @__PURE__ */ new Map([
243
255
  type: "boolean",
244
256
  default: !1
245
257
  },
246
- editable: {
247
- description: "",
248
- type: "boolean",
249
- default: !0
250
- },
251
- placeholder: {
252
- description: "",
253
- type: "string",
254
- default: ""
255
- },
256
258
  readonly: {
257
259
  description: "",
258
260
  type: "boolean",
@@ -288,27 +290,28 @@ const fe = /* @__PURE__ */ new Map([
288
290
  type: "string",
289
291
  default: "value"
290
292
  },
291
- enumData: {
293
+ data: {
292
294
  description: "",
293
295
  type: "array"
294
296
  }
295
- }, ke = [
297
+ }, Ue = [
296
298
  "id",
297
299
  "type"
298
- ], Me = [
300
+ ], We = [
299
301
  "id",
300
302
  "appearance",
301
- "binding"
302
- ], we = {
303
- $schema: ye,
304
- $id: ge,
305
- title: he,
306
- description: ve,
307
- type: be,
308
- properties: Ce,
309
- required: ke,
310
- ignore: Me
311
- }, Te = {
303
+ "binding",
304
+ "visible"
305
+ ], Re = {
306
+ $schema: Le,
307
+ $id: $e,
308
+ title: Ne,
309
+ description: qe,
310
+ type: Ge,
311
+ properties: je,
312
+ required: Ue,
313
+ ignore: We
314
+ }, ze = {
312
315
  /**
313
316
  * 是否被选中
314
317
  */
@@ -325,8 +328,8 @@ const fe = /* @__PURE__ */ new Map([
325
328
  * type为button或者tag时的尺寸
326
329
  */
327
330
  size: { type: String, default: "middle" }
328
- }, O = {
329
- ...Te,
331
+ }, R = {
332
+ ...ze,
330
333
  /**
331
334
  * 组件标识
332
335
  */
@@ -336,9 +339,29 @@ const fe = /* @__PURE__ */ new Map([
336
339
  */
337
340
  disabled: { type: Boolean, default: !1 },
338
341
  /**
339
- * 单选组枚举数组
342
+ * 功能同disabled
340
343
  */
341
- enumData: { type: Array, default: [{ value: "example", name: "example1" }] },
344
+ readonly: { type: Boolean, default: !1 },
345
+ /**
346
+ * 单选组枚举数组----废弃
347
+ */
348
+ enumData: {
349
+ type: Array,
350
+ default: [
351
+ { value: "example1", name: "示例一" },
352
+ { value: "example2", name: "示例二" }
353
+ ]
354
+ },
355
+ /**
356
+ * 单选组枚举数组
357
+ */
358
+ data: {
359
+ type: Array,
360
+ default: [
361
+ { value: "example1", name: "示例一" },
362
+ { value: "example2", name: "示例二" }
363
+ ]
364
+ },
342
365
  /**
343
366
  * 组件是否水平排列
344
367
  */
@@ -356,7 +379,7 @@ const fe = /* @__PURE__ */ new Map([
356
379
  /**
357
380
  * 输入框Tab键索引
358
381
  */
359
- tabIndex: Number,
382
+ tabIndex: { type: Number, default: -1 },
360
383
  /**
361
384
  * 枚举数组中展示文本的key值。
362
385
  */
@@ -365,193 +388,190 @@ const fe = /* @__PURE__ */ new Map([
365
388
  * 枚举数组中枚举值的key值。
366
389
  */
367
390
  valueField: { type: String, default: "value" }
368
- }, J = de(O, we, fe, ie);
369
- function Q(r, t, e) {
370
- const n = B(() => !r.disabled), o = B(() => r.enumData || []);
371
- function a(l) {
372
- return l[r.valueField];
373
- }
374
- function c(l) {
375
- return l[r.textField];
376
- }
377
- function d(l, i) {
378
- if (n.value) {
379
- const p = a(l);
380
- e.value !== p && (e.value = p, t.emit("changeValue", p), t.emit("update:modelValue", p));
391
+ }, oe = ne(R, Re, Oe, we);
392
+ function ae(e, t, n) {
393
+ const a = I(() => !e.disabled), o = I(() => e.data || e.enumData || []);
394
+ function l(p) {
395
+ return p[e.valueField];
396
+ }
397
+ function u(p) {
398
+ return p[e.textField];
399
+ }
400
+ function c(p, r) {
401
+ if (a.value) {
402
+ const d = l(p);
403
+ n.value !== d && (n.value = d, t.emit("changeValue", d), t.emit("update:modelValue", d));
381
404
  }
382
- i.stopPropagation();
405
+ r.stopPropagation();
383
406
  }
384
407
  return {
385
408
  enumData: o,
386
- getValue: a,
387
- getText: c,
388
- onClickRadio: d
409
+ getValue: l,
410
+ getText: u,
411
+ onClickRadio: c
389
412
  };
390
413
  }
391
- const E = /* @__PURE__ */ N({
414
+ const D = /* @__PURE__ */ V({
392
415
  name: "FRadioGroup",
393
- props: O,
416
+ props: R,
394
417
  emits: ["changeValue", "update:modelValue"],
395
- setup(r, t) {
396
- const e = M(r.modelValue), {
397
- enumData: n,
418
+ setup(e, t) {
419
+ const n = w(e.modelValue), {
420
+ enumData: a,
398
421
  onClickRadio: o,
399
- getValue: a,
400
- getText: c
401
- } = Q(r, t, e), d = B(() => ({
402
- "farris-checkradio-hor": r.direction === "horizontal"
403
- })), l = M([]);
404
- return te(R, {
405
- radios: l,
406
- parentProps: r,
422
+ getValue: l,
423
+ getText: u
424
+ } = ae(e, t, n), c = I(() => ({
425
+ "farris-checkradio-hor": e.direction === "horizontal"
426
+ })), p = w([]);
427
+ return de(Y, {
428
+ radios: p,
429
+ parentProps: e,
407
430
  parentContext: t
408
- }), () => h("div", {
409
- class: ["farris-input-wrap", d.value]
410
- }, [t.slots.default ? t.slots.default() : n.value.map((i, p) => {
411
- const s = "radio_" + r.id + r.name + i[r.valueField];
412
- return h("div", {
431
+ }), () => g("div", {
432
+ class: ["farris-input-wrap", c.value]
433
+ }, [t.slots.default ? t.slots.default() : a.value.map((r, d) => {
434
+ const i = "radio_" + e.id + e.name + r[e.valueField];
435
+ return g("div", {
413
436
  class: "custom-control custom-radio"
414
- }, [h("input", {
437
+ }, [g("input", {
415
438
  type: "radio",
416
439
  class: "custom-control-input",
417
- name: s,
418
- id: s,
419
- value: a(i),
420
- checked: a(i) === e.value,
421
- disabled: r.disabled,
422
- tabindex: r.tabIndex,
423
- onClick: (m) => o(i, m)
424
- }, null), h("label", {
440
+ name: i,
441
+ id: i,
442
+ value: l(r),
443
+ checked: l(r) === n.value,
444
+ disabled: e.readonly || e.disabled,
445
+ tabindex: e.tabIndex,
446
+ onClick: (s) => o(r, s)
447
+ }, null), g("label", {
425
448
  class: "custom-control-label",
426
- for: s
427
- }, [c(i)])]);
449
+ for: i
450
+ }, [u(r)])]);
428
451
  })]);
429
452
  }
430
453
  });
431
- function Fe(r, t, e) {
432
- var I;
433
- function n() {
434
- e != null && e.resolveComponentContext && e.resolveComponentContext();
454
+ function Xe(e, t, n) {
455
+ var P;
456
+ const a = n && n.getStyles && n.getStyles() || "", o = n && n.getDesignerClass && n.getDesignerClass() || "", l = w();
457
+ function u() {
458
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
435
459
  }
436
- n();
437
- const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "", c = M();
438
- function d() {
439
- return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
440
- }
441
- function l() {
460
+ function c() {
442
461
  return !1;
443
462
  }
444
- function i() {
445
- return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
446
- }
447
463
  function p() {
448
- return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
464
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
449
465
  }
450
- function s(g) {
451
- if (!g || !g.value)
466
+ function r() {
467
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
468
+ }
469
+ function d(C) {
470
+ if (!C || !C.value)
452
471
  return null;
453
- if (g.value.schema && g.value.schema.type === "component")
454
- return g.value;
455
- const b = M(g == null ? void 0 : g.value.parent), C = s(b);
456
- return C || null;
472
+ if (C.value.schema && C.value.schema.type === "component")
473
+ return C.value;
474
+ const E = w(C == null ? void 0 : C.value.parent), S = d(E);
475
+ return S || null;
457
476
  }
458
- function m(g = t) {
459
- const { componentInstance: b, designerItemElementRef: C } = g;
460
- return !b || !b.value ? null : b.value.canMove ? C : m(g.parent);
477
+ function i(C = t) {
478
+ const { componentInstance: E, designerItemElementRef: S } = C;
479
+ return !E || !E.value ? null : E.value.canMove ? S : i(C.parent);
461
480
  }
462
- function y(g) {
463
- return !!e && e.canAccepts(g);
481
+ function s(C) {
482
+ return !!n && n.canAccepts(C);
464
483
  }
465
484
  function f() {
466
485
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
467
486
  }
468
- function k() {
469
- }
470
- function T(g, b) {
471
- b && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(b);
472
- }
473
- function F(g, b) {
474
- const { componentType: C } = g;
475
- let w = U(C, g, b);
476
- e && e.onResolveNewComponentSchema && (w = e.onResolveNewComponentSchema(g, w));
477
- const V = C.toLowerCase().replace("-", "_");
478
- return w && !w.id && w.type === C && (w.id = `${V}_${Math.random().toString().slice(2, 6)}`), w;
479
- }
480
- function G(g, b) {
481
- const C = String(g.getAttribute("data-controltype")), w = g.getAttribute("data-feature"), V = w ? JSON.parse(w) : {};
482
- V.parentComponentInstance = c.value;
483
- let S = U(C, V);
484
- e && e.onAcceptNewChildElement && (S = e.onAcceptNewChildElement(g, b, S));
485
- const Z = C.toLowerCase().replace("-", "_");
486
- return S && !S.id && S.type === C && (S.id = `${Z}_${Math.random().toString().slice(2, 6)}`), S;
487
- }
488
- function A(g) {
489
- }
490
- function Y(...g) {
491
- if (e && e.getPropsConfig)
492
- return e.getPropsConfig(...g);
493
- }
494
- return c.value = {
495
- canMove: d(),
496
- canSelectParent: l(),
497
- canDelete: i(),
498
- canNested: !p(),
487
+ function m() {
488
+ }
489
+ function y(C, E) {
490
+ E && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(E);
491
+ }
492
+ function F(C, E) {
493
+ const { componentType: S } = C;
494
+ let M = te(S, C, E);
495
+ n && n.onResolveNewComponentSchema && (M = n.onResolveNewComponentSchema(C, M));
496
+ const v = S.toLowerCase().replace(/-/g, "_");
497
+ return M && !M.id && M.type === S && (M.id = `${v}_${Math.random().toString().slice(2, 6)}`), M;
498
+ }
499
+ function k(C) {
500
+ }
501
+ function h(...C) {
502
+ if (n && n.getPropsConfig)
503
+ return n.getPropsConfig(...C);
504
+ }
505
+ function B() {
506
+ n && n.onRemoveComponent && n.onRemoveComponent(), t != null && t.schema.contents && t.schema.contents.map((C) => {
507
+ var M;
508
+ let E = C.id;
509
+ C.type === "component-ref" && (E = C.component);
510
+ const S = e.value.querySelector(`#${E}-design-item`);
511
+ (M = S == null ? void 0 : S.componentInstance) != null && M.value.onRemoveComponent && S.componentInstance.value.onRemoveComponent();
512
+ });
513
+ }
514
+ return l.value = {
515
+ canMove: u(),
516
+ canSelectParent: c(),
517
+ canDelete: p(),
518
+ canNested: !r(),
499
519
  contents: t == null ? void 0 : t.schema.contents,
500
- elementRef: r,
501
- parent: (I = t == null ? void 0 : t.parent) == null ? void 0 : I.componentInstance,
520
+ elementRef: e,
521
+ parent: (P = t == null ? void 0 : t.parent) == null ? void 0 : P.componentInstance,
502
522
  schema: t == null ? void 0 : t.schema,
503
- styles: o,
504
- designerClass: a,
505
- canAccepts: y,
506
- getBelongedComponentInstance: s,
507
- getDraggableDesignItemElement: m,
523
+ styles: a,
524
+ designerClass: o,
525
+ canAccepts: s,
526
+ getBelongedComponentInstance: d,
527
+ getDraggableDesignItemElement: i,
508
528
  getDraggingDisplayText: f,
509
- getPropConfig: Y,
510
- getDragScopeElement: k,
511
- onAcceptMovedChildElement: T,
512
- onAcceptNewChildElement: G,
513
- onChildElementMovedOut: A,
529
+ getPropConfig: h,
530
+ getDragScopeElement: m,
531
+ onAcceptMovedChildElement: y,
532
+ onChildElementMovedOut: k,
514
533
  addNewChildComponentSchema: F,
515
- updateDragAndDropRules: n,
516
- triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || M(!1),
517
- triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
518
- }, c;
534
+ triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || w(!1),
535
+ triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || w(!1),
536
+ onRemoveComponent: B
537
+ }, l;
519
538
  }
520
- class Se {
521
- constructor(t, e) {
522
- v(this, "componentId");
523
- v(this, "viewModelId");
524
- v(this, "eventsEditorUtils");
525
- v(this, "formSchemaUtils");
526
- v(this, "formMetadataConverter");
527
- v(this, "designViewModelUtils");
528
- v(this, "designViewModelField");
529
- v(this, "controlCreatorUtils");
530
- v(this, "designerHostService");
531
- v(this, "schemaService", null);
532
- v(this, "metadataService", null);
533
- v(this, "propertyConfig", {
539
+ class He {
540
+ constructor(t, n) {
541
+ T(this, "componentId");
542
+ T(this, "viewModelId");
543
+ T(this, "eventsEditorUtils");
544
+ T(this, "formSchemaUtils");
545
+ T(this, "formMetadataConverter");
546
+ T(this, "designViewModelUtils");
547
+ T(this, "designViewModelField");
548
+ T(this, "controlCreatorUtils");
549
+ T(this, "designerHostService");
550
+ T(this, "schemaService", null);
551
+ T(this, "metadataService", null);
552
+ T(this, "propertyConfig", {
534
553
  type: "object",
535
554
  categories: {}
536
555
  });
537
- var n;
538
- this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
556
+ var a;
557
+ this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((a = this.formSchemaUtils) == null ? void 0 : a.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
539
558
  }
540
559
  getTableInfo() {
541
560
  var t;
542
561
  return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
543
562
  }
544
563
  setDesignViewModelField(t) {
545
- const e = t.binding && t.binding.type === "Form" && t.binding.field;
546
- if (e) {
564
+ var a;
565
+ const n = t.binding && t.binding.type === "Form" && t.binding.field;
566
+ if (n) {
547
567
  if (!this.designViewModelField) {
548
- const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
549
- this.designViewModelField = n.fields.find((o) => o.id === e);
568
+ const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
569
+ this.designViewModelField = o.fields.find((l) => l.id === n);
550
570
  }
551
- t.updateOn = this.designViewModelField.updateOn;
571
+ t.updateOn = (a = this.designViewModelField) == null ? void 0 : a.updateOn;
552
572
  }
553
573
  }
554
- changeFieldEditorType(t, e) {
574
+ changeFieldEditorType(t, n) {
555
575
  }
556
576
  getBasicPropConfig(t) {
557
577
  return {
@@ -572,7 +592,7 @@ class Se {
572
592
  type: "combo-list",
573
593
  textField: "name",
574
594
  valueField: "value",
575
- data: [{ value: t.type, name: u[t.type].name }]
595
+ data: [{ value: t.type, name: b[t.type].name }]
576
596
  }
577
597
  }
578
598
  }
@@ -604,30 +624,30 @@ class Se {
604
624
  * @param componentInstance
605
625
  * @returns
606
626
  */
607
- updateElementByParentContainer(t, e) {
608
- const n = e && e.parent && e.parent.schema;
609
- if (!n)
627
+ updateElementByParentContainer(t, n) {
628
+ const a = n && n.parent && n.parent.schema;
629
+ if (!a)
610
630
  return;
611
- const o = n.contents.findIndex((c) => c.id === t), a = W(n.contents[o]);
612
- n.contents.splice(o, 1), n.contents.splice(o, 0, a);
631
+ const o = a.contents.findIndex((u) => u.id === t), l = U(a.contents[o]);
632
+ a.contents.splice(o, 1), a.contents.splice(o, 0, l);
613
633
  }
614
634
  }
615
- const P = class P {
635
+ const O = class O {
616
636
  /**
617
637
  * 根据绑定字段类型获取可用的输入类控件
618
638
  */
619
639
  static getEditorTypesByMDataType(t) {
620
- const e = P.fieldControlTypeMapping[t];
621
- return e || [{ key: "", value: "" }];
640
+ const n = O.fieldControlTypeMapping[t];
641
+ return n || [{ key: "", value: "" }];
622
642
  }
623
643
  /**
624
644
  * 获取所有输入类控件
625
645
  */
626
646
  static getAllInputTypes() {
627
647
  const t = [];
628
- for (let e in P.fieldControlTypeMapping)
629
- P.fieldControlTypeMapping[e].forEach((n) => {
630
- t.find((o) => o.key === n.key && o.value === n.value) || t.push({ key: n.key, value: n.value });
648
+ for (const n in O.fieldControlTypeMapping)
649
+ O.fieldControlTypeMapping[n].forEach((a) => {
650
+ t.find((o) => o.key === a.key && o.value === a.value) || t.push({ key: a.key, value: a.value });
631
651
  });
632
652
  return t;
633
653
  }
@@ -635,69 +655,174 @@ const P = class P {
635
655
  /**
636
656
  * <字段类型,可配置的控件类型列表>的映射
637
657
  */
638
- v(P, "fieldControlTypeMapping", {
658
+ T(O, "fieldControlTypeMapping", {
639
659
  String: [
640
- { key: u["input-group"].type, value: u["input-group"].name },
641
- { key: u.lookup.type, value: u.lookup.name },
642
- { key: u["date-picker"].type, value: u["date-picker"].name },
643
- { key: u["check-box"].type, value: u["check-box"].name },
644
- { key: u["radio-group"].type, value: u["radio-group"].name },
645
- { key: u["combo-list"].type, value: u["combo-list"].name },
646
- { key: u.textarea.type, value: u.textarea.name }
660
+ { key: b["input-group"].type, value: b["input-group"].name },
661
+ { key: b.lookup.type, value: b.lookup.name },
662
+ { key: b["date-picker"].type, value: b["date-picker"].name },
663
+ { key: b["check-box"].type, value: b["check-box"].name },
664
+ { key: b["check-group"].type, value: b["check-group"].name },
665
+ { key: b["radio-group"].type, value: b["radio-group"].name },
666
+ { key: b["combo-list"].type, value: b["combo-list"].name },
667
+ { key: b.textarea.type, value: b.textarea.name }
647
668
  ],
648
669
  Text: [
649
- { key: u.textarea.type, value: u.textarea.name },
650
- { key: u.lookup.type, value: u.lookup.name }
670
+ { key: b.textarea.type, value: b.textarea.name },
671
+ { key: b.lookup.type, value: b.lookup.name }
651
672
  ],
652
673
  Decimal: [
653
- { key: u["number-spinner"].type, value: u["number-spinner"].name }
674
+ { key: b["number-spinner"].type, value: b["number-spinner"].name }
654
675
  ],
655
676
  Integer: [
656
- { key: u["number-spinner"].type, value: u["number-spinner"].name }
677
+ { key: b["number-spinner"].type, value: b["number-spinner"].name }
657
678
  ],
658
679
  Number: [
659
- { key: u["number-spinner"].type, value: u["number-spinner"].name }
680
+ { key: b["number-spinner"].type, value: b["number-spinner"].name }
660
681
  ],
661
682
  BigNumber: [
662
- { key: u["number-spinner"].type, value: u["number-spinner"].name }
683
+ { key: b["number-spinner"].type, value: b["number-spinner"].name }
663
684
  ],
664
685
  Date: [
665
- { key: u["date-picker"].type, value: u["date-picker"].name }
686
+ { key: b["date-picker"].type, value: b["date-picker"].name }
666
687
  ],
667
688
  DateTime: [
668
- { key: u["date-picker"].type, value: u["date-picker"].name }
689
+ { key: b["date-picker"].type, value: b["date-picker"].name }
669
690
  ],
670
691
  Boolean: [
671
- { key: u.switch.type, value: u.switch.name },
672
- { key: u["check-box"].type, value: u["check-box"].name }
692
+ { key: b.switch.type, value: b.switch.name },
693
+ { key: b["check-box"].type, value: b["check-box"].name }
673
694
  ],
674
695
  Enum: [
675
- { key: u["combo-list"].type, value: u["combo-list"].name },
676
- { key: u["radio-group"].type, value: u["radio-group"].name }
696
+ { key: b["combo-list"].type, value: b["combo-list"].name },
697
+ { key: b["radio-group"].type, value: b["radio-group"].name }
677
698
  ],
678
699
  Object: [
679
- { key: u.lookup.type, value: u.lookup.name },
680
- { key: u["combo-list"].type, value: u["combo-list"].name },
681
- { key: u["radio-group"].type, value: u["radio-group"].name }
700
+ { key: b.lookup.type, value: b.lookup.name },
701
+ { key: b["combo-list"].type, value: b["combo-list"].name },
702
+ { key: b["radio-group"].type, value: b["radio-group"].name }
682
703
  ]
683
704
  });
684
- let D = P;
685
- const Pe = M(0);
686
- class Ee extends Se {
687
- constructor(e, n) {
688
- super(e, n);
689
- v(this, "responseLayoutEditorFunction");
690
- this.responseLayoutEditorFunction = oe(this.formSchemaUtils);
691
- }
692
- getPropertyConfig(e, n) {
693
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, n), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
694
- }
695
- getBasicProperties(e, n) {
696
- var d;
697
- var o = this;
698
- this.setDesignViewModelField(e);
699
- const a = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
705
+ let q = O;
706
+ const _e = w(0);
707
+ class Ke {
708
+ constructor() {
709
+ /** 控件标题 */
710
+ T(this, "label", "");
711
+ /** 控件id */
712
+ T(this, "id", "");
713
+ /** 每个控件占用的栅格数 */
714
+ T(this, "columnInSM", 12);
715
+ T(this, "columnInMD", 6);
716
+ T(this, "columnInLG", 3);
717
+ T(this, "columnInEL", 2);
718
+ /** 每个控件占用的列数 */
719
+ T(this, "displayWidthInSM", 1);
720
+ T(this, "displayWidthInMD", 1);
721
+ T(this, "displayWidthInLG", 1);
722
+ T(this, "displayWidthInEL", 1);
723
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
724
+ T(this, "displayColumnCountAtBreakPoint", "md");
725
+ /** 控件所在行,传0即可-----编辑器内部使用 */
726
+ T(this, "tagRow", 0);
727
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
728
+ T(this, "showTopBorder", 0);
729
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
730
+ T(this, "group", 1);
731
+ /** 控件是否符合标准的class配置(设计器用的) */
732
+ T(this, "isSupportedClass", !0);
733
+ /** 控件所在分组id(设计器用的) */
734
+ T(this, "fieldSetId", "");
735
+ }
736
+ }
737
+ function Qe(e) {
738
+ let t, n;
739
+ const a = /* @__PURE__ */ new Map();
740
+ let o = [];
741
+ function l(d, i) {
742
+ const f = d.split(" ").filter((h) => h.startsWith("col-"));
743
+ if (f.length === 0) {
744
+ i.isSupportedClass = !1;
745
+ return;
746
+ }
747
+ let m = f.find((h) => /^col-([1-9]|10|11|12)$/.test(h)), y = f.find((h) => /^col-md-([1-9]|10|11|12)$/.test(h)), F = f.find((h) => /^col-xl-([1-9]|10|11|12)$/.test(h)), k = f.find((h) => /^col-el-([1-9]|10|11|12)$/.test(h));
748
+ m = m || "col-12", i.columnInSM = parseInt(m.replace("col-", ""), 10), i.displayWidthInSM = i.columnInSM / 12, i.displayWidthInSM !== 1 && (i.isSupportedClass = !1), y = y || "col-md-" + i.columnInSM, i.columnInMD = parseInt(y.replace("col-md-", ""), 10), i.displayWidthInMD = i.columnInMD / 6, [1, 2].includes(i.displayWidthInMD) || (i.isSupportedClass = !1), F = F || "col-xl-" + i.columnInMD, i.columnInLG = parseInt(F.replace("col-xl-", ""), 10), i.displayWidthInLG = i.columnInLG / 3, [1, 2, 3, 4].includes(i.displayWidthInLG) || (i.isSupportedClass = !1), k = k || "col-el-" + i.columnInLG, i.columnInEL = parseInt(k.replace("col-el-", ""), 10), i.displayWidthInEL = i.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(i.displayWidthInEL) || (i.isSupportedClass = !1);
749
+ }
750
+ function u(d, i, s, f = !1) {
751
+ let m = !1;
752
+ d.contents.forEach((y) => {
753
+ if (y.type === "fieldset") {
754
+ s += 1, u(y, i, s, !0), m = !0;
755
+ return;
756
+ }
757
+ m && (s += 1, m = !1);
758
+ const F = y.appearance && y.appearance.class, k = new Ke();
759
+ F ? l(F, k) : k.isSupportedClass = !1, k.label = y.label || y.id, k.id = y.id, k.group = s, f && (k.fieldSetId = d.id), n === y.id && (t = s), a.set(y.id, y), i.push(k);
760
+ });
761
+ }
762
+ function c(d) {
763
+ const i = e.getComponentById(d);
764
+ if (!i || !i.componentType || !i.componentType.startsWith("form"))
765
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
766
+ const s = e.selectNode(i, (f) => f.type === _["response-form"].type);
767
+ return !s || !s.contents || s.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: s };
768
+ }
769
+ function p(d, i) {
770
+ i = i || d.id;
771
+ const { result: s, message: f, formNode: m } = c(i);
772
+ if (!s)
773
+ return { result: s, message: f };
774
+ n = d.id, o = [], a.clear();
775
+ const y = m.contents[0].type === _.fieldset.type ? 0 : 1;
776
+ u(m, o, y);
777
+ const F = o.find((h) => !h.isSupportedClass);
700
778
  return {
779
+ defaultState: {
780
+ defaultGroupNumber: t || 1,
781
+ model: F ? "customize" : "standard"
782
+ },
783
+ importData: o
784
+ };
785
+ }
786
+ function r(d, i) {
787
+ i = i;
788
+ const { result: s, formNode: f } = c(i);
789
+ if (!s)
790
+ return "";
791
+ const m = [];
792
+ return d.forEach((y) => {
793
+ var h;
794
+ const F = a.get(y.id), k = F.appearance && F.appearance.class;
795
+ if (k) {
796
+ const P = k.split(" ").filter((x) => !x.startsWith("col-")), C = "col-" + y.columnInSM, E = "col-md-" + y.columnInMD, S = "col-xl-" + y.columnInLG, M = "col-el-" + y.columnInEL, v = [C, E, S, M].concat(P);
797
+ F.appearance.class = v.join(" ");
798
+ }
799
+ if (y.fieldSetId) {
800
+ const B = f.contents.find((C) => C.id === y.fieldSetId), P = m.find((C) => C.id === y.fieldSetId);
801
+ P ? (h = P.contents) == null || h.push(F) : (m.push(B), B.contents = [F]);
802
+ } else
803
+ m.push(F);
804
+ }), f.contents = m, f.id;
805
+ }
806
+ return {
807
+ checkCanFindFormNode: c,
808
+ checkCanOpenLayoutEditor: p,
809
+ changeFormControlsByResponseLayoutConfig: r,
810
+ getResonseFormLayoutConfig: u
811
+ };
812
+ }
813
+ class Je extends He {
814
+ constructor(n, a) {
815
+ super(n, a);
816
+ T(this, "responseLayoutEditorFunction");
817
+ this.responseLayoutEditorFunction = Qe(this.formSchemaUtils);
818
+ }
819
+ getPropertyConfig(n, a) {
820
+ return this.propertyConfig.categories.basic = this.getBasicProperties(n, a), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, a), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
821
+ }
822
+ getBasicProperties(n, a) {
823
+ var l;
824
+ const o = this;
825
+ return this.setDesignViewModelField(n), this.formSchemaUtils.getFormMetadataBasicInfo(), {
701
826
  description: "Basic Information",
702
827
  title: "基本信息",
703
828
  properties: {
@@ -718,7 +843,7 @@ class Ee extends Se {
718
843
  textField: "value",
719
844
  valueField: "key",
720
845
  editable: !1,
721
- data: o.designViewModelField ? D.getEditorTypesByMDataType((d = o.designViewModelField.type) == null ? void 0 : d.name) : D.getAllInputTypes()
846
+ data: o.designViewModelField ? q.getEditorTypesByMDataType((l = o.designViewModelField.type) == null ? void 0 : l.name) : q.getAllInputTypes()
722
847
  }
723
848
  },
724
849
  label: {
@@ -729,41 +854,37 @@ class Ee extends Se {
729
854
  binding: {
730
855
  description: "绑定的表单字段",
731
856
  title: "绑定",
732
- $converter: "/converter/field-selector.converter",
733
857
  editor: {
734
- type: "field-selector",
858
+ type: "binding-selector",
735
859
  bindingType: { enable: !1 },
736
860
  editorParams: {
737
- propertyData: e,
738
- formBasicInfo: a
861
+ componentSchema: n,
862
+ needSyncToViewModel: !0,
863
+ viewModelId: this.viewModelId,
864
+ designerHostService: this.designerHostService,
865
+ disableOccupiedFields: !0
739
866
  },
740
- columns: [
741
- { field: "name", title: "字段名称" },
742
- { field: "bindingField", title: "绑定字段" },
743
- { field: "fieldType", title: "字段类型" }
744
- ],
745
- textField: "bindingField",
746
- data: c
867
+ textField: "bindingField"
747
868
  }
748
869
  }
749
870
  },
750
- setPropertyRelates(l, i) {
751
- if (l)
752
- switch (l && l.propertyID) {
871
+ setPropertyRelates(u, c) {
872
+ if (u)
873
+ switch (u && u.propertyID) {
753
874
  case "type": {
754
- o.changeControlType(e, l, n);
875
+ o.changeControlType(n, u, a);
755
876
  break;
756
877
  }
757
878
  case "label": {
758
- l.needRefreshControlTree = !0;
879
+ u.needRefreshControlTree = !0;
759
880
  break;
760
881
  }
761
882
  }
762
883
  }
763
884
  };
764
885
  }
765
- getAppearanceProperties(e, n) {
766
- var o = this;
886
+ getAppearanceProperties(n, a) {
887
+ const o = this;
767
888
  return {
768
889
  title: "样式",
769
890
  description: "Appearance",
@@ -789,69 +910,69 @@ class Ee extends Se {
789
910
  refreshPanelAfterChanged: !0,
790
911
  editor: {
791
912
  type: "response-layout-editor-setting",
792
- initialState: o.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, o.componentId)
913
+ initialState: o.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, o.componentId)
793
914
  }
794
915
  }
795
916
  },
796
- setPropertyRelates(a, c) {
797
- if (a)
798
- switch (a && a.propertyID) {
917
+ setPropertyRelates(l, u) {
918
+ if (l)
919
+ switch (l && l.propertyID) {
799
920
  case "responseLayout":
800
- o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, o.componentId || e.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(e.id, n), delete e.responseLayout;
921
+ o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, o.componentId || n.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(n.id, a), delete n.responseLayout;
801
922
  break;
802
923
  case "class":
803
- o.updateUnifiedLayoutAfterControlChanged(a.propertyValue, e.id, this.componentId), o.updateElementByParentContainer(e.id, n);
924
+ o.updateUnifiedLayoutAfterControlChanged(l.propertyValue, n.id, this.componentId), o.updateElementByParentContainer(n.id, a);
804
925
  break;
805
926
  }
806
927
  }
807
928
  };
808
929
  }
809
- getEditorProperties(e) {
810
- return this.getComponentConfig(e);
930
+ getEditorProperties(n) {
931
+ return this.getComponentConfig(n);
811
932
  }
812
933
  /**
813
934
  * 卡片控件:切换控件类型后事件
814
935
  * @param propertyData 控件DOM属性
815
936
  * @param newControlType 新控件类型
816
937
  */
817
- changeControlType(e, n, o) {
818
- var p, s, m, y;
819
- const a = n.propertyValue, c = o && o.parent && o.parent.schema;
820
- if (!c)
938
+ changeControlType(n, a, o) {
939
+ var d, i, s, f;
940
+ const l = a.propertyValue, u = o && o.parent && o.parent.schema;
941
+ if (!u)
821
942
  return;
822
- const d = c.contents.findIndex((f) => f.id === e.id), l = c.contents[d];
823
- let i;
943
+ const c = u.contents.findIndex((m) => m.id === n.id), p = u.contents[c];
944
+ let r;
824
945
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
825
946
  editor: {
826
- $type: a
947
+ $type: l
827
948
  },
828
949
  name: this.designViewModelField.name,
829
950
  require: this.designViewModelField.require,
830
951
  readonly: this.designViewModelField.readonly
831
- }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), i || (i = j("form-group") || {}, i.editor = j(a) || {}, delete i.editor.id, delete i.editor.binding, delete i.editor.appearance), Object.assign(i, {
832
- id: l.id,
833
- appearance: l.appearance,
834
- size: l.size,
835
- label: l.label,
836
- binding: l.binding,
837
- visible: l.visible
838
- }), Object.assign(i.editor, {
839
- isTextArea: i.isTextArea && l.isTextArea,
840
- placeholder: (p = l.editor) == null ? void 0 : p.placeholder,
841
- holdPlace: (s = l.editor) == null ? void 0 : s.holdPlace,
842
- readonly: (m = l.editor) == null ? void 0 : m.readonly,
843
- require: (y = l.editor) == null ? void 0 : y.require
844
- }), c.contents.splice(d, 1), c.contents.splice(d, 0, i), o.schema = Object.assign(l, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
845
- (f) => f.classList.remove("dgComponentSelected")
846
- ), Pe.value++;
847
- }
848
- getComponentConfig(e, n = {}, o = {}) {
849
- const a = Object.assign({
952
+ }, !1), r = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), r || (r = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(r, {
953
+ id: p.id,
954
+ appearance: p.appearance,
955
+ size: p.size,
956
+ label: p.label,
957
+ binding: p.binding,
958
+ visible: p.visible
959
+ }), Object.assign(r.editor, {
960
+ isTextArea: r.isTextArea && p.isTextArea,
961
+ placeholder: (d = p.editor) == null ? void 0 : d.placeholder,
962
+ holdPlace: (i = p.editor) == null ? void 0 : i.holdPlace,
963
+ readonly: (s = p.editor) == null ? void 0 : s.readonly,
964
+ require: (f = p.editor) == null ? void 0 : f.require
965
+ }), u.contents.splice(c, 1), u.contents.splice(c, 0, r), o.schema = Object.assign(p, r), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
966
+ (m) => m.classList.remove("dgComponentSelected")
967
+ ), _e.value++;
968
+ }
969
+ getComponentConfig(n, a = {}, o = {}) {
970
+ const l = Object.assign({
850
971
  description: "编辑器",
851
972
  title: "编辑器",
852
973
  type: "input-group",
853
974
  $converter: "/converter/property-editor.converter"
854
- }, n), c = Object.assign({
975
+ }, a), u = Object.assign({
855
976
  readonly: {
856
977
  description: "",
857
978
  title: "只读",
@@ -873,7 +994,7 @@ class Ee extends Se {
873
994
  type: "string"
874
995
  }
875
996
  }, o);
876
- return { ...a, properties: { ...c } };
997
+ return { ...l, properties: { ...u } };
877
998
  }
878
999
  /**
879
1000
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -881,56 +1002,56 @@ class Ee extends Se {
881
1002
  * @param controlId 控件Id
882
1003
  * @param componentId 控件所在组件id
883
1004
  */
884
- updateUnifiedLayoutAfterControlChanged(e, n, o) {
885
- const a = e.split(" ");
886
- let c = a.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), d = a.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), l = a.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), i = a.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
887
- c = c || "col-12", d = d || "col-md-" + c.replace("col-", ""), l = l || "col-xl-" + d.replace("col-md-", ""), i = i || "col-el-" + l.replace("col-xl-", "");
888
- const p = {
889
- id: n,
890
- columnInSM: parseInt(c.replace("col-", ""), 10),
891
- columnInMD: parseInt(d.replace("col-md-", ""), 10),
892
- columnInLG: parseInt(l.replace("col-xl-", ""), 10),
893
- columnInEL: parseInt(i.replace("col-el-", ""), 10)
1005
+ updateUnifiedLayoutAfterControlChanged(n, a, o) {
1006
+ const l = n.split(" ");
1007
+ let u = l.find((i) => /^col-([1-9]|10|11|12)$/.test(i)), c = l.find((i) => /^col-md-([1-9]|10|11|12)$/.test(i)), p = l.find((i) => /^col-xl-([1-9]|10|11|12)$/.test(i)), r = l.find((i) => /^col-el-([1-9]|10|11|12)$/.test(i));
1008
+ u = u || "col-12", c = c || "col-md-" + u.replace("col-", ""), p = p || "col-xl-" + c.replace("col-md-", ""), r = r || "col-el-" + p.replace("col-xl-", "");
1009
+ const d = {
1010
+ id: a,
1011
+ columnInSM: parseInt(u.replace("col-", ""), 10),
1012
+ columnInMD: parseInt(c.replace("col-md-", ""), 10),
1013
+ columnInLG: parseInt(p.replace("col-xl-", ""), 10),
1014
+ columnInEL: parseInt(r.replace("col-el-", ""), 10)
894
1015
  };
895
- this.updateUnifiedLayoutAfterResponseLayoutChanged(o, p);
1016
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(o, d);
896
1017
  }
897
1018
  /**
898
1019
  * 修改控件布局配置后更新Form统一布局配置
899
1020
  * @param componentId 组件Id
900
1021
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
901
1022
  */
902
- updateUnifiedLayoutAfterResponseLayoutChanged(e, n) {
903
- const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
1023
+ updateUnifiedLayoutAfterResponseLayoutChanged(n, a) {
1024
+ const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
904
1025
  if (!o || !o.unifiedLayout)
905
1026
  return;
906
- const a = [];
907
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, a, 1), n) {
908
- const f = a.find((k) => k.id === n.id);
909
- Object.assign(f || {}, n);
1027
+ const l = [];
1028
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, l, 1), a) {
1029
+ const m = l.find((y) => y.id === a.id);
1030
+ Object.assign(m || {}, a);
910
1031
  }
911
- const c = a.map((f) => f.columnInSM), d = a.map((f) => f.columnInMD), l = a.map((f) => f.columnInLG), i = a.map((f) => f.columnInEL), p = this.checkIsUniqueColumn(c) ? c[0] : null, s = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(l) ? l[0] : null, y = this.checkIsUniqueColumn(i) ? i[0] : null;
1032
+ const u = l.map((m) => m.columnInSM), c = l.map((m) => m.columnInMD), p = l.map((m) => m.columnInLG), r = l.map((m) => m.columnInEL), d = this.checkIsUniqueColumn(u) ? u[0] : null, i = this.checkIsUniqueColumn(c) ? c[0] : null, s = this.checkIsUniqueColumn(p) ? p[0] : null, f = this.checkIsUniqueColumn(r) ? r[0] : null;
912
1033
  Object.assign(o.unifiedLayout, {
913
- uniqueColClassInSM: p,
914
- uniqueColClassInMD: s,
915
- uniqueColClassInLG: m,
916
- uniqueColClassInEL: y
1034
+ uniqueColClassInSM: d,
1035
+ uniqueColClassInMD: i,
1036
+ uniqueColClassInLG: s,
1037
+ uniqueColClassInEL: f
917
1038
  });
918
1039
  }
919
1040
  /**
920
1041
  * 校验宽度样式值是否一致
921
1042
  */
922
- checkIsUniqueColumn(e) {
923
- const n = new Set(e);
924
- return Array.from(n).length === 1;
1043
+ checkIsUniqueColumn(n) {
1044
+ const a = new Set(n);
1045
+ return Array.from(a).length === 1;
925
1046
  }
926
1047
  }
927
- class Ve extends Ee {
928
- constructor(t, e) {
929
- super(t, e);
1048
+ class Ye extends Je {
1049
+ constructor(t, n) {
1050
+ super(t, n);
930
1051
  }
931
1052
  getEditorProperties(t) {
932
- return this.getComponentConfig(t, { type: "number-spinner" }, {
933
- readonly: {
1053
+ const n = this.getComponentConfig(t, { type: "radio-group" }, {
1054
+ disabled: {
934
1055
  visible: !1
935
1056
  },
936
1057
  placeholder: {
@@ -942,136 +1063,1368 @@ class Ve extends Ee {
942
1063
  type: "boolean"
943
1064
  },
944
1065
  textField: {
1066
+ visible: !1,
945
1067
  description: "",
946
1068
  title: "显示文本字段",
947
1069
  type: "string"
948
1070
  },
949
1071
  valueField: {
1072
+ visible: !1,
950
1073
  description: "",
951
1074
  title: "值字段",
952
1075
  type: "string"
953
1076
  },
954
- enumData: {
955
- visible: !1,
1077
+ data: {
956
1078
  description: "",
957
1079
  title: "数据",
958
- type: "array"
1080
+ type: "array",
1081
+ editor: {
1082
+ columns: [
1083
+ { field: t.editor.valueField, title: "值", dataType: "string" },
1084
+ { field: t.editor.textField, title: "名称", dataType: "string" },
1085
+ { field: "disabled", title: "禁用", visible: !1, dataType: "boolean", editor: { type: "switch" } }
1086
+ ],
1087
+ type: "item-collection-editor",
1088
+ valueField: t.editor.valueField,
1089
+ nameField: t.editor.textField,
1090
+ requiredFields: [t.editor.valueField, t.editor.textField],
1091
+ uniqueFields: [t.editor.valueField, t.editor.textField]
1092
+ },
1093
+ // 这个属性,标记当属性变更得时候触发重新更新属性
1094
+ refreshPanelAfterChanged: !0
959
1095
  }
960
1096
  });
1097
+ return n.setPropertyRelates = function(a) {
1098
+ if (a)
1099
+ switch (a.propertyID) {
1100
+ case "data": {
1101
+ a.propertyValue.parameters && (t.editor.valueField = a.propertyValue.parameters.valueField, t.editor.textField = a.propertyValue.parameters.nameField), t.editor.data = a.propertyValue.value;
1102
+ break;
1103
+ }
1104
+ }
1105
+ }, n;
961
1106
  }
962
1107
  }
963
- function Be(r, t) {
964
- r.schema;
965
- const e = M(!0), n = M(!0);
966
- function o(s) {
967
- return !1;
1108
+ function Ze(e, t) {
1109
+ const n = e.schema;
1110
+ function a(o, l) {
1111
+ return new Ye(o, t).getPropertyConfig(n, l);
968
1112
  }
969
- function a() {
970
- return !1;
1113
+ return { getPropsConfig: a };
1114
+ }
1115
+ const et = /* @__PURE__ */ V({
1116
+ name: "FRadioGroupDesign",
1117
+ props: R,
1118
+ emits: ["changeValue", "update:modelValue"],
1119
+ setup(e, t) {
1120
+ const n = w(e.modelValue), {
1121
+ enumData: a,
1122
+ onClickRadio: o,
1123
+ getValue: l,
1124
+ getText: u
1125
+ } = ae(e, t, n), c = I(() => ({
1126
+ "farris-checkradio-hor": e.horizontal
1127
+ })), p = w(), r = N("designer-host-service"), d = N("design-item-context"), i = Ze(d, r), s = Xe(p, d, i);
1128
+ return L(() => {
1129
+ p.value.componentInstance = s;
1130
+ }), t.expose(s.value), () => g("div", {
1131
+ class: ["farris-input-wrap", c.value],
1132
+ ref: p
1133
+ }, [a.value.map((f, m) => {
1134
+ const y = "radio_" + e.name + m;
1135
+ return g("div", {
1136
+ class: "custom-control custom-radio"
1137
+ }, [g("input", {
1138
+ type: "radio",
1139
+ class: "custom-control-input",
1140
+ name: e.name,
1141
+ id: y,
1142
+ value: l(f),
1143
+ checked: l(f) === n.value,
1144
+ disabled: e.disabled,
1145
+ tabindex: e.tabIndex,
1146
+ onClick: (F) => o(f, F)
1147
+ }, null), g("label", {
1148
+ class: "custom-control-label",
1149
+ for: y
1150
+ }, [u(f)])]);
1151
+ })]);
971
1152
  }
972
- function c() {
973
- return !1;
1153
+ }), tt = /* @__PURE__ */ new Map([
1154
+ ["appearance", ve]
1155
+ ]);
1156
+ function nt(e, t, n) {
1157
+ return t;
1158
+ }
1159
+ const ot = "https://json-schema.org/draft/2020-12/schema", at = "https://farris-design.gitee.io/button-edit.schema.json", it = "button-edit", lt = "A Farris Input Component", rt = "object", st = {
1160
+ id: {
1161
+ description: "The unique identifier for a Input Group",
1162
+ type: "string"
1163
+ },
1164
+ type: {
1165
+ description: "The type string of Input Group component",
1166
+ type: "string",
1167
+ default: "button-edit"
1168
+ },
1169
+ appearance: {
1170
+ description: "",
1171
+ type: "object",
1172
+ properties: {
1173
+ class: {
1174
+ type: "string"
1175
+ },
1176
+ style: {
1177
+ type: "string"
1178
+ }
1179
+ },
1180
+ default: {}
1181
+ },
1182
+ binding: {
1183
+ description: "",
1184
+ type: "object",
1185
+ default: {}
1186
+ },
1187
+ disable: {
1188
+ type: "string",
1189
+ default: !1
1190
+ },
1191
+ editable: {
1192
+ description: "",
1193
+ type: "boolean",
1194
+ default: !0
1195
+ },
1196
+ enableLinkLabel: {
1197
+ description: "",
1198
+ type: "boolean",
1199
+ default: !1
1200
+ },
1201
+ label: {
1202
+ description: "",
1203
+ type: "string",
1204
+ default: ""
1205
+ },
1206
+ lableWidth: {
1207
+ description: "",
1208
+ type: "number"
1209
+ },
1210
+ placeholder: {
1211
+ description: "",
1212
+ type: "string",
1213
+ default: ""
1214
+ },
1215
+ readonly: {
1216
+ description: "",
1217
+ type: "boolean",
1218
+ default: !1
1219
+ },
1220
+ require: {
1221
+ description: "",
1222
+ type: "boolean",
1223
+ default: !1
1224
+ },
1225
+ tabindex: {
1226
+ description: "",
1227
+ type: "number",
1228
+ default: -1
1229
+ },
1230
+ textAlign: {
1231
+ description: "",
1232
+ type: "string",
1233
+ enum: [
1234
+ "left",
1235
+ "middle",
1236
+ "right"
1237
+ ],
1238
+ default: "left"
1239
+ },
1240
+ visible: {
1241
+ description: "",
1242
+ type: "boolean",
1243
+ default: !0
1244
+ },
1245
+ onBlur: {
1246
+ description: "",
1247
+ type: "string",
1248
+ default: ""
1249
+ },
1250
+ onClickLinkLabel: {
1251
+ description: "",
1252
+ type: "sting",
1253
+ default: ""
1254
+ },
1255
+ autoComplete: {
1256
+ description: "",
1257
+ type: "boolean",
1258
+ default: !1
1259
+ },
1260
+ buttonContent: {
1261
+ description: "",
1262
+ type: "string",
1263
+ default: ""
1264
+ },
1265
+ enableClear: {
1266
+ description: "",
1267
+ type: "boolean",
1268
+ default: !0
1269
+ },
1270
+ inputType: {
1271
+ description: "",
1272
+ type: "string",
1273
+ enum: [
1274
+ "text",
1275
+ "tag"
1276
+ ],
1277
+ default: "text"
1278
+ },
1279
+ multiSelect: {
1280
+ description: "",
1281
+ type: "boolean",
1282
+ default: !1
1283
+ },
1284
+ popup: {
1285
+ description: "",
1286
+ type: "object",
1287
+ properties: {
1288
+ footerButtons: {
1289
+ type: "array",
1290
+ default: []
1291
+ },
1292
+ height: {
1293
+ type: "number",
1294
+ default: 600
1295
+ },
1296
+ dataMapping: {
1297
+ type: "object"
1298
+ },
1299
+ contents: {
1300
+ type: "array",
1301
+ default: []
1302
+ },
1303
+ showMaxButton: {
1304
+ type: "boolean",
1305
+ default: !0
1306
+ },
1307
+ showCloseButton: {
1308
+ type: "boolean",
1309
+ default: !0
1310
+ },
1311
+ showFooter: {
1312
+ type: "boolean",
1313
+ default: !0
1314
+ },
1315
+ title: {
1316
+ type: "string",
1317
+ default: ""
1318
+ },
1319
+ width: {
1320
+ type: "number",
1321
+ default: 800
1322
+ }
1323
+ }
1324
+ },
1325
+ separator: {
1326
+ type: "string",
1327
+ default: ","
1328
+ },
1329
+ showButtonWhenDisabled: {
1330
+ description: "",
1331
+ type: "boolean",
1332
+ default: !1
1333
+ },
1334
+ wrapText: {
1335
+ type: "boolean",
1336
+ default: !1
1337
+ },
1338
+ onClear: {
1339
+ description: "",
1340
+ type: "string",
1341
+ default: ""
974
1342
  }
975
- function d() {
976
- return !0;
1343
+ }, ut = [
1344
+ "id",
1345
+ "type"
1346
+ ], ct = {
1347
+ $schema: ot,
1348
+ $id: at,
1349
+ title: it,
1350
+ description: lt,
1351
+ type: rt,
1352
+ properties: st,
1353
+ required: ut
1354
+ }, dt = "buttonEdit", pt = "A Farris Component", ft = "object", mt = {
1355
+ basic: {
1356
+ description: "Basic Infomation",
1357
+ title: "基本信息",
1358
+ properties: {
1359
+ id: {
1360
+ description: "组件标识",
1361
+ title: "标识",
1362
+ type: "string",
1363
+ readonly: !0
1364
+ },
1365
+ type: {
1366
+ description: "组件类型",
1367
+ title: "控件类型",
1368
+ type: "select",
1369
+ editor: {
1370
+ type: "waiting for modification",
1371
+ enum: []
1372
+ }
1373
+ }
1374
+ }
1375
+ },
1376
+ behavior: {
1377
+ description: "Basic Infomation",
1378
+ title: "行为",
1379
+ properties: {
1380
+ editable: {
1381
+ description: "",
1382
+ title: "允许编辑",
1383
+ type: "boolean"
1384
+ },
1385
+ readonly: {
1386
+ description: "",
1387
+ title: "只读",
1388
+ type: "string"
1389
+ },
1390
+ required: {
1391
+ description: "",
1392
+ title: "必填",
1393
+ type: "boolean"
1394
+ },
1395
+ visible: {
1396
+ description: "",
1397
+ title: "可见",
1398
+ type: "boolean"
1399
+ },
1400
+ placeholder: {
1401
+ description: "",
1402
+ title: "提示文本",
1403
+ type: "string"
1404
+ },
1405
+ tabindex: {
1406
+ description: "",
1407
+ title: "tab索引",
1408
+ type: "number"
1409
+ },
1410
+ textAlign: {
1411
+ description: "",
1412
+ title: "对齐方式",
1413
+ type: "enum",
1414
+ editor: {
1415
+ type: "combo-list",
1416
+ textField: "name",
1417
+ valueField: "value",
1418
+ data: [
1419
+ {
1420
+ value: "left",
1421
+ name: "左对齐"
1422
+ },
1423
+ {
1424
+ value: "center",
1425
+ name: "居中"
1426
+ },
1427
+ {
1428
+ value: "right",
1429
+ name: "右对齐"
1430
+ }
1431
+ ]
1432
+ }
1433
+ }
1434
+ }
977
1435
  }
978
- function l(s) {
1436
+ }, yt = {
1437
+ title: dt,
1438
+ description: pt,
1439
+ type: ft,
1440
+ categories: mt
1441
+ }, ie = {
1442
+ /**
1443
+ * 组件标识
1444
+ */
1445
+ id: String,
1446
+ /**
1447
+ * 扩展按钮显示内容,这是一段现在扩展按钮中的html标签
1448
+ */
1449
+ buttonContent: { type: String, default: '<i class="f-icon f-icon-lookup"></i>' },
1450
+ buttonBehavior: { type: String, default: "Popup" },
1451
+ /**
1452
+ * 启用输入框自动完成功能
1453
+ */
1454
+ autoComplete: { type: Boolean, default: !1 },
1455
+ /**
1456
+ * 组件自定义样式
1457
+ */
1458
+ customClass: { type: String, default: "" },
1459
+ /**
1460
+ * 禁用组件,既不允许在输入框中录入,也不允许点击扩展按钮。
1461
+ */
1462
+ disable: { type: Boolean, default: !1 },
1463
+ /**
1464
+ * 允许在输入框中录入文本。
1465
+ */
1466
+ editable: { type: Boolean, default: !0 },
1467
+ /**
1468
+ * 显示清空文本按钮
1469
+ */
1470
+ enableClear: { type: Boolean, default: !1 },
1471
+ /**
1472
+ * 组件值
1473
+ */
1474
+ modelValue: { type: String, default: "" },
1475
+ /**
1476
+ * 将组件设置为只读,既不允许在输入框中录入,也不允许点击扩展按钮,但是允许复制输入框中的内容。
1477
+ */
1478
+ readonly: { type: Boolean, default: !1 },
1479
+ /**
1480
+ * 禁用组件时,是否显示扩展按钮
1481
+ */
1482
+ showButtonWhenDisabled: { type: Boolean, default: !1 },
1483
+ /**
1484
+ * 显示输入框的标签
1485
+ */
1486
+ enableTitle: { type: Boolean, default: !1 },
1487
+ /**
1488
+ * 输入框类型
1489
+ */
1490
+ inputType: { type: String, default: "text" },
1491
+ /**
1492
+ * 显示输入框提示信息
1493
+ */
1494
+ forcePlaceholder: { type: Boolean, default: !1 },
1495
+ /**
1496
+ * 输入框提示文本
1497
+ */
1498
+ placeholder: { type: String, default: "" },
1499
+ /**
1500
+ * 输入框最小长度
1501
+ */
1502
+ minLength: Number,
1503
+ /**
1504
+ * 输入框最大长度
1505
+ */
1506
+ maxLength: Number,
1507
+ /**
1508
+ * 输入框Tab键索引
1509
+ */
1510
+ tabIndex: Number,
1511
+ popupHost: { type: Object },
1512
+ popupRightBoundary: { type: Object },
1513
+ popupOffsetX: { type: Object },
1514
+ popupOnInput: { type: Boolean, default: !1 },
1515
+ popupOnFocus: { type: Boolean, default: !1 },
1516
+ popupMinWidth: { type: Number, default: 160 },
1517
+ modalOptions: { type: Object, default: {} },
1518
+ wrapText: { type: Boolean, default: !1 },
1519
+ /**
1520
+ * 可选,是否支持多选
1521
+ * 默认`false`
1522
+ */
1523
+ multiSelect: { type: Boolean, default: !1 },
1524
+ /**
1525
+ * 可选,分隔符
1526
+ * 默认`,`
1527
+ */
1528
+ separator: { type: String, default: "," },
1529
+ /** 对齐方式 */
1530
+ textAlign: { type: String, default: "left" },
1531
+ /**
1532
+ * 废弃
1533
+ */
1534
+ beforeClickButton: { type: Function, default: null },
1535
+ /**
1536
+ * 作为内嵌编辑器被创建后默认获得焦点
1537
+ */
1538
+ focusOnCreated: { type: Boolean, default: !1 },
1539
+ /**
1540
+ * 作为内嵌编辑器被创建后默认选中文本
1541
+ */
1542
+ selectOnCreated: { type: Boolean, default: !1 },
1543
+ /**
1544
+ * 打开前
1545
+ */
1546
+ beforeOpen: { type: Function, default: null },
1547
+ /** 更新方式 blur | change */
1548
+ updateOn: { type: String, default: "change" }
1549
+ };
1550
+ ne(ie, ct, tt, nt, yt);
1551
+ const gt = {
1552
+ popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
1553
+ host: { type: Object },
1554
+ backgroundColor: { type: String, default: "" }
1555
+ }, ht = /* @__PURE__ */ V({
1556
+ name: "FOverlay",
1557
+ props: gt,
1558
+ emits: ["click"],
1559
+ setup(e, t) {
1560
+ const n = w(e.popupContentPosition), a = w(e.host), o = I(() => ({
1561
+ backgroundColor: e.backgroundColor || "",
1562
+ pointerEvents: "auto"
1563
+ }));
1564
+ function l(c) {
1565
+ t.emit("click"), c.preventDefault(), c.stopPropagation();
1566
+ }
1567
+ I(() => {
1568
+ const c = a.value;
1569
+ if (c) {
1570
+ const p = c.getBoundingClientRect(), {
1571
+ left: r,
1572
+ top: d,
1573
+ height: i
1574
+ } = p;
1575
+ return {
1576
+ left: r,
1577
+ top: d + i
1578
+ };
1579
+ }
1580
+ return n.value;
1581
+ });
1582
+ const u = I(() => ({
1583
+ // position: 'relative',
1584
+ // left: `${position.value.left}px`,
1585
+ // top: `${position.value.top}px`
1586
+ }));
1587
+ return () => g(pe, {
1588
+ to: "body"
1589
+ }, {
1590
+ default: () => {
1591
+ var c, p;
1592
+ return [g("div", {
1593
+ class: "overlay-container",
1594
+ onClick: (r) => l(r),
1595
+ style: o.value
1596
+ }, [g("div", {
1597
+ style: u.value
1598
+ }, [(p = (c = t.slots).default) == null ? void 0 : p.call(c)])])];
1599
+ }
1600
+ });
1601
+ }
1602
+ });
1603
+ function vt(e) {
1604
+ if (e.content && e.content.render)
1605
+ return e.content.render;
1606
+ if (e.render && typeof e.render == "function")
1607
+ return e.render;
1608
+ }
1609
+ function bt(e) {
1610
+ const t = document.createElement("div");
1611
+ t.style.display = "contents";
1612
+ let n;
1613
+ const a = e.onClickCallback || (() => {
1614
+ }), o = () => {
1615
+ a(), n && n.unmount();
1616
+ };
1617
+ return n = fe({
1618
+ setup() {
1619
+ me(() => {
1620
+ document.body.removeChild(t);
1621
+ });
1622
+ const l = vt(e);
1623
+ return () => g(ht, {
1624
+ "popup-content-position": e.popupPosition,
1625
+ host: e.host,
1626
+ onClick: o,
1627
+ backgroundColor: e.backgroundColor
1628
+ }, {
1629
+ default: () => [l && l()]
1630
+ });
1631
+ }
1632
+ }), document.body.appendChild(t), n.mount(t), n;
1633
+ }
1634
+ class Ct {
1635
+ static show(t) {
1636
+ return bt(t);
1637
+ }
1638
+ }
1639
+ const kt = Symbol("FModalService");
1640
+ function le(e, t) {
1641
+ function n() {
1642
+ const a = e.beforeOpen || e.beforeClickButton || null;
1643
+ let o = Promise.resolve(!0);
1644
+ if (a) {
1645
+ const l = a(t.value);
1646
+ if (typeof l > "u")
1647
+ return o;
1648
+ typeof l == "boolean" ? o = Promise.resolve(l) : o = l;
1649
+ }
1650
+ return o;
1651
+ }
1652
+ return { judgeCanOpen: n };
1653
+ }
1654
+ function Ft(e, t, n, a, o) {
1655
+ const l = w(e.buttonBehavior), u = w(e.popupOnInput), c = I(() => ({
1656
+ "input-group-append": !0,
1657
+ "append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
1658
+ })), { judgeCanOpen: p } = le(e, o), r = I(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), d = N(kt, null), i = w();
1659
+ async function s(y) {
1660
+ if (await p() && r.value) {
1661
+ const F = !!t.slots.default;
1662
+ if (l.value === "Modal") {
1663
+ const k = e.modalOptions, h = d == null ? void 0 : d.open({
1664
+ ...k,
1665
+ render: () => t.slots.default && t.slots.default()
1666
+ });
1667
+ i.value = h == null ? void 0 : h.modalRef;
1668
+ }
1669
+ l.value === "Overlay" && Ct.show({
1670
+ // host: buttonEditRef.value,
1671
+ host: document.body,
1672
+ backgroundColor: "rgba(0,0,0,.15)",
1673
+ render: () => t.slots.default && t.slots.default()
1674
+ }), F && l.value === "Popup" && a.togglePopup(!0), F && u.value && a.hidePopup(), t.emit("clickButton", { origin: y, value: e.modelValue });
1675
+ }
979
1676
  }
980
- function i() {
1677
+ function f(y) {
1678
+ t.emit("mouseEnterIcon", y);
981
1679
  }
982
- function p(s) {
983
- return null;
1680
+ function m(y) {
1681
+ t.emit("mouseLeaveIcon", y);
984
1682
  }
985
1683
  return {
986
- canAccepts: o,
987
- checkCanDeleteComponent: a,
988
- checkCanMoveComponent: c,
989
- hideNestedPaddingInDesginerView: d,
990
- onAcceptMovedChildElement: l,
991
- resolveComponentContext: i,
992
- triggerBelongedComponentToMoveWhenMoved: e,
993
- triggerBelongedComponentToDeleteWhenDeleted: n,
994
- getPropsConfig: p
1684
+ buttonGroupClass: c,
1685
+ onClickButton: s,
1686
+ onMouseEnterButton: f,
1687
+ onMouseLeaveButton: m,
1688
+ modalRef: i
995
1689
  };
996
1690
  }
997
- function De(r, t) {
998
- const {
999
- canAccepts: e,
1000
- checkCanDeleteComponent: n,
1001
- checkCanMoveComponent: o,
1002
- hideNestedPaddingInDesginerView: a,
1003
- onAcceptMovedChildElement: c,
1004
- resolveComponentContext: d,
1005
- triggerBelongedComponentToMoveWhenMoved: l,
1006
- triggerBelongedComponentToDeleteWhenDeleted: i
1007
- } = Be(r), p = r.schema;
1008
- function s(m, y) {
1009
- return new Ve(m, t).getPropertyConfig(p, y);
1691
+ function Bt(e, t, n, a, o, l) {
1692
+ const u = w(!1), c = I(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: p } = l;
1693
+ function r(f) {
1694
+ u.value = f;
1695
+ }
1696
+ j(o, () => {
1697
+ r(!!o.value);
1698
+ });
1699
+ function d(f) {
1700
+ const m = !e.readonly && !e.disable && e.editable, y = !e.editable;
1701
+ f.stopPropagation(), (m || y) && (p("", !1), r(!u.value), t.emit("clear"));
1702
+ }
1703
+ function i(f) {
1704
+ if (c.value) {
1705
+ if (!n.value) {
1706
+ r(!1);
1707
+ return;
1708
+ }
1709
+ !e.disable && !e.readonly && r(!0);
1710
+ }
1711
+ }
1712
+ function s(f) {
1713
+ c.value && r(!1);
1010
1714
  }
1011
1715
  return {
1012
- canAccepts: e,
1013
- checkCanDeleteComponent: n,
1014
- checkCanMoveComponent: o,
1015
- hideNestedPaddingInDesginerView: a,
1016
- onAcceptMovedChildElement: c,
1017
- resolveComponentContext: d,
1018
- triggerBelongedComponentToMoveWhenMoved: l,
1019
- triggerBelongedComponentToDeleteWhenDeleted: i,
1020
- getPropsConfig: s
1716
+ enableClearButton: c,
1717
+ showClearButton: u,
1718
+ onClearValue: d,
1719
+ onMouseEnterTextBox: i,
1720
+ onMouseLeaveTextBox: s
1021
1721
  };
1022
1722
  }
1023
- const Ae = /* @__PURE__ */ N({
1024
- name: "FRadioGroupDesign",
1025
- props: O,
1026
- emits: ["changeValue", "update:modelValue"],
1027
- setup(r, t) {
1028
- const e = M(r.modelValue), {
1029
- enumData: n,
1030
- onClickRadio: o,
1031
- getValue: a,
1032
- getText: c
1033
- } = Q(r, t, e), d = B(() => ({
1034
- "farris-checkradio-hor": r.horizontal
1035
- })), l = M(), i = L("designer-host-service"), p = L("design-item-context"), s = De(p, i), m = Fe(l, p, s);
1036
- return z(() => {
1037
- l.value.componentInstance = m;
1038
- }), t.expose(m.value), () => h("div", {
1039
- class: ["farris-input-wrap", d.value],
1040
- ref: l
1041
- }, [n.value.map((y, f) => {
1042
- const k = "radio_" + r.name + f;
1043
- return h("div", {
1044
- class: "custom-control custom-radio"
1045
- }, [h("input", {
1046
- type: "radio",
1047
- class: "custom-control-input",
1048
- name: r.name,
1049
- id: k,
1050
- value: a(y),
1051
- checked: a(y) === e.value,
1052
- disabled: r.disabled,
1053
- tabindex: r.tabIndex,
1054
- onClick: (T) => o(y, T)
1055
- }, null), h("label", {
1056
- class: "custom-control-label",
1057
- for: k
1058
- }, [c(y)])]);
1059
- })]);
1723
+ function Mt(e, t, n, a, o) {
1724
+ const l = I(() => e.popupOnInput), u = I(() => e.popupOnFocus), { shouldPopupContent: c } = o, p = I(() => e.enableTitle ? n.value : ""), r = I(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), d = I(() => e.readonly || !e.editable), i = w(!1), s = I(() => !e.disable && i.value), f = I(() => ({
1725
+ "text-left": e.textAlign === "left",
1726
+ "text-center": e.textAlign === "center",
1727
+ "text-right": e.textAlign === "right",
1728
+ "form-control": !0,
1729
+ "f-utils-fill": !0
1730
+ })), m = I(() => ({
1731
+ "input-group": !0,
1732
+ "f-state-disable": e.disable,
1733
+ "f-state-editable": e.editable && !e.disable && !e.readonly,
1734
+ "f-state-readonly": e.readonly && !e.disable,
1735
+ "f-state-focus": s.value
1736
+ }));
1737
+ function y(v, x = !0) {
1738
+ n.value !== v && (n.value = v, x && (t.emit("change", v), t.emit("update:modelValue", v)));
1739
+ }
1740
+ function F(v) {
1741
+ c.value = !1, y(v, !0);
1742
+ }
1743
+ j(
1744
+ () => e.modelValue,
1745
+ (v) => {
1746
+ n.value = v;
1747
+ }
1748
+ );
1749
+ function k(v) {
1750
+ i.value = !1, t.emit("blur", v), v.stopPropagation();
1751
+ }
1752
+ function h(v) {
1753
+ t.emit("click", v);
1754
+ }
1755
+ function B(v) {
1756
+ e.disable || (i.value = !0, d.value || (t.emit("focus", v), u.value && !c.value && o.popup()));
1757
+ }
1758
+ function P(v) {
1759
+ t.emit("input", v.target.value);
1760
+ const x = v.target.value;
1761
+ a.value = x, n.value !== x && y(x, e.updateOn === "change"), l.value && !c.value && o.popup();
1762
+ }
1763
+ function C(v) {
1764
+ v.target.tagName !== "INPUT" && v.preventDefault(), v.stopPropagation();
1765
+ }
1766
+ function E(v) {
1767
+ t.emit("keydown", v);
1768
+ }
1769
+ function S(v) {
1770
+ v.key === "Enter" && (l.value || u.value) && o.hidePopup(), t.emit("keyup", v);
1771
+ }
1772
+ function M(v) {
1773
+ const x = v.target.value;
1774
+ v.stopPropagation(), y(x);
1775
+ }
1776
+ return {
1777
+ hasFocusedTextBox: s,
1778
+ isTextBoxReadonly: d,
1779
+ textBoxClass: f,
1780
+ textBoxPlaceholder: r,
1781
+ textBoxTitle: p,
1782
+ inputGroupClass: m,
1783
+ changeTextBoxValue: y,
1784
+ commitValue: F,
1785
+ onBlurTextBox: k,
1786
+ onClickTextBox: h,
1787
+ onFocusTextBox: B,
1788
+ onInput: P,
1789
+ onKeyDownTextBox: E,
1790
+ onKeyUpTextBox: S,
1791
+ onMouseDownTextBox: C,
1792
+ onTextBoxValueChange: M
1793
+ };
1794
+ }
1795
+ function wt(e, t, n, a) {
1796
+ const o = w(), l = w(!1), { judgeCanOpen: u } = le(e, a);
1797
+ function c() {
1798
+ const i = o.value;
1799
+ i && i.show(n.value);
1800
+ }
1801
+ async function p(i = !1) {
1802
+ if (!!t.slots.default) {
1803
+ if (!i && !l.value && !await u())
1804
+ return;
1805
+ l.value = !l.value, await z(), c();
1806
+ }
1807
+ }
1808
+ async function r(i = !1) {
1809
+ if (!!t.slots.default) {
1810
+ if (!i && !await u())
1811
+ return;
1812
+ l.value = !0, await z(), c();
1813
+ }
1814
+ }
1815
+ function d() {
1816
+ l.value = !1;
1817
+ }
1818
+ return { hidePopup: d, popup: r, shouldPopupContent: l, togglePopup: p, popoverRef: o };
1819
+ }
1820
+ function St(e, t, n) {
1821
+ const a = w(), {
1822
+ isTextBoxReadonly: o,
1823
+ textBoxClass: l,
1824
+ textBoxPlaceholder: u,
1825
+ textBoxTitle: c,
1826
+ onBlurTextBox: p,
1827
+ onClickTextBox: r,
1828
+ onFocusTextBox: d,
1829
+ onInput: i,
1830
+ onKeyDownTextBox: s,
1831
+ onKeyUpTextBox: f,
1832
+ onMouseDownTextBox: m,
1833
+ onTextBoxValueChange: y
1834
+ } = n;
1835
+ return L(() => {
1836
+ var F, k;
1837
+ e.selectOnCreated && ((F = a.value) == null || F.select()), e.focusOnCreated && ((k = a.value) == null || k.focus());
1838
+ }), () => g("input", {
1839
+ ref: a,
1840
+ name: "input-group-value",
1841
+ autocomplete: e.autoComplete ? "on" : "off",
1842
+ class: l.value,
1843
+ disabled: e.disable,
1844
+ maxlength: e.maxLength,
1845
+ minlength: e.minLength,
1846
+ placeholder: u.value,
1847
+ readonly: o.value,
1848
+ tabindex: e.tabIndex,
1849
+ title: c.value,
1850
+ type: e.inputType,
1851
+ value: t.value,
1852
+ onBlur: p,
1853
+ onChange: y,
1854
+ onClick: r,
1855
+ onFocus: d,
1856
+ onInput: i,
1857
+ onKeydown: s,
1858
+ onKeyup: f,
1859
+ onMousedown: m
1860
+ }, null);
1861
+ }
1862
+ function Tt(e, t, n) {
1863
+ const a = w(e.separator), {
1864
+ changeTextBoxValue: o
1865
+ } = n, l = I(() => t.value ? t.value.split(a.value).map((c) => ({
1866
+ name: c,
1867
+ selectable: !0
1868
+ })) : []);
1869
+ function u(c) {
1870
+ o(c.map((p) => p.name).join(a.value), !0);
1871
+ }
1872
+ return () => g(Ce, {
1873
+ id: `${e.id}-tag-editor`,
1874
+ class: "form-control",
1875
+ data: l.value,
1876
+ showClose: !0,
1877
+ showInput: !0,
1878
+ onChange: u
1879
+ }, null);
1880
+ }
1881
+ function Et(e, t, n, a) {
1882
+ const {
1883
+ buttonGroupClass: o,
1884
+ onClickButton: l,
1885
+ onMouseEnterButton: u,
1886
+ onMouseLeaveButton: c
1887
+ } = n, {
1888
+ enableClearButton: p,
1889
+ showClearButton: r,
1890
+ onClearValue: d
1891
+ } = a, i = w();
1892
+ return {
1893
+ renderButtonGroup: () => g("div", {
1894
+ id: `${e.id}-button-group`,
1895
+ class: o.value
1896
+ }, [p.value && G(g("span", {
1897
+ class: "input-group-text input-group-clear",
1898
+ onClick: d
1899
+ }, [g("i", {
1900
+ class: "f-icon modal_close"
1901
+ }, null)]), [[ye, r.value]]), t.slots.buttonContent ? g("span", {
1902
+ class: "input-group-text input-group-append-button",
1903
+ onClick: l,
1904
+ onMouseenter: u,
1905
+ onMouseleave: c
1906
+ }, [t.slots.buttonContent()]) : e.buttonContent ? g("span", {
1907
+ class: "input-group-text input-group-append-button",
1908
+ innerHTML: e.buttonContent,
1909
+ ref: i,
1910
+ onClick: l,
1911
+ onMouseenter: u,
1912
+ onMouseleave: c
1913
+ }, null) : null]),
1914
+ buttonHandleElement: i
1915
+ };
1916
+ }
1917
+ function It(e, t, n) {
1918
+ const a = w(e.popupMinWidth), {
1919
+ hidePopup: o,
1920
+ popoverRef: l
1921
+ } = n;
1922
+ return () => g(ke, {
1923
+ id: `${e.id}-popover`,
1924
+ ref: l,
1925
+ visible: !0,
1926
+ placement: "bottom-left",
1927
+ host: e.popupHost,
1928
+ "keep-width-with-reference": !0,
1929
+ fitContent: !0,
1930
+ "right-boundary": e.popupRightBoundary,
1931
+ minWidth: a.value,
1932
+ offsetX: e.popupOffsetX,
1933
+ onHidden: o
1934
+ }, {
1935
+ default: () => {
1936
+ var u, c;
1937
+ return [(c = (u = t.slots).default) == null ? void 0 : c.call(u)];
1938
+ }
1939
+ });
1940
+ }
1941
+ const Pt = /* @__PURE__ */ V({
1942
+ name: "FButtonEdit",
1943
+ props: ie,
1944
+ emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
1945
+ setup(e, t) {
1946
+ const n = w(), a = w(e.customClass), o = w(e.modelValue), l = wt(e, t, n, o), {
1947
+ shouldPopupContent: u,
1948
+ hidePopup: c,
1949
+ togglePopup: p
1950
+ } = l, r = Ft(e, t, n, l, o), d = w(""), i = Mt(e, t, o, d, l), {
1951
+ hasFocusedTextBox: s,
1952
+ commitValue: f,
1953
+ inputGroupClass: m
1954
+ } = i, y = Bt(e, t, o, s, d, i), {
1955
+ onMouseEnterTextBox: F,
1956
+ onMouseLeaveTextBox: k
1957
+ } = y, h = I(() => {
1958
+ const v = {
1959
+ "f-button-edit": !0,
1960
+ "f-cmp-inputgroup": !0,
1961
+ "f-button-edit-nowrap": !e.wrapText
1962
+ };
1963
+ return a.value && a.value.split(" ").reduce((x, $) => (x[$] = !0, x), v), v;
1964
+ });
1965
+ function B() {
1966
+ return e.multiSelect && e.inputType === "tag" ? Tt(e, o, i) : St(e, o, i);
1967
+ }
1968
+ let P = B();
1969
+ j([() => e.multiSelect, () => e.inputType], () => {
1970
+ P = B();
1971
+ });
1972
+ const {
1973
+ renderButtonGroup: C,
1974
+ buttonHandleElement: E
1975
+ } = Et(e, t, r, y), S = It(e, t, l), M = {
1976
+ commitValue: f,
1977
+ elementRef: n,
1978
+ hidePopup: c,
1979
+ shouldPopupContent: u,
1980
+ togglePopup: p,
1981
+ openDialog: () => {
1982
+ E.value && e.buttonBehavior === "Modal" && E.value.click();
1983
+ },
1984
+ getModal: () => {
1985
+ var v;
1986
+ return e.buttonBehavior === "Modal" ? (v = r.modalRef.value) == null ? void 0 : v.value : null;
1987
+ }
1988
+ };
1989
+ return L(() => {
1990
+ n.value.componentInstance = M, window.onresize = () => {
1991
+ document.body.click();
1992
+ };
1993
+ }), t.expose(M), () => g(Q, null, [g("div", ge(t.attrs, {
1994
+ ref: n,
1995
+ class: h.value,
1996
+ id: e.id
1997
+ }), [g("div", {
1998
+ id: `${e.id}-input-group`,
1999
+ class: m.value,
2000
+ onMouseenter: F,
2001
+ onMouseleave: k
2002
+ }, [P(), C()])]), u.value && S()]);
2003
+ }
2004
+ }), xt = "https://json-schema.org/draft/2020-12/schema", Vt = "https://farris-design.gitee.io/radio-group.schema.json", At = "item-collection-editor", Ot = "A Farris Input Component", Dt = "object", Lt = {
2005
+ id: {
2006
+ description: "The unique identifier for a item-collection-editor",
2007
+ type: "string"
2008
+ },
2009
+ type: {
2010
+ description: "The type string of item-collection-editor component",
2011
+ type: "string",
2012
+ default: "item-collection-editor"
2013
+ },
2014
+ requiredFields: {
2015
+ description: "",
2016
+ type: "array",
2017
+ default: []
2018
+ },
2019
+ uniqueFields: {
2020
+ description: "",
2021
+ type: "array",
2022
+ default: []
2023
+ },
2024
+ dynamicMappingKeys: {
2025
+ type: "boolean",
2026
+ default: !1
2027
+ },
2028
+ columns: {
2029
+ description: "",
2030
+ type: "array",
2031
+ default: []
2032
+ },
2033
+ modalTitle: {
2034
+ description: "",
2035
+ type: "string",
2036
+ default: ""
2037
+ },
2038
+ canEmpty: {
2039
+ description: "",
2040
+ type: "boolean",
2041
+ default: !0
2042
+ },
2043
+ valueField: {
2044
+ description: "",
2045
+ type: "string",
2046
+ default: "id"
2047
+ },
2048
+ nameField: {
2049
+ description: "",
2050
+ type: "string",
2051
+ default: "name"
2052
+ },
2053
+ idField: {
2054
+ description: "",
2055
+ type: "string",
2056
+ default: "id"
2057
+ },
2058
+ readonly: {
2059
+ description: "",
2060
+ type: "boolean",
2061
+ default: !1
2062
+ },
2063
+ modelValue: {
2064
+ description: "",
2065
+ type: "string",
2066
+ default: ""
2067
+ }
2068
+ }, $t = [
2069
+ "id",
2070
+ "type"
2071
+ ], Nt = [], qt = {
2072
+ $schema: xt,
2073
+ $id: Vt,
2074
+ title: At,
2075
+ description: Ot,
2076
+ type: Dt,
2077
+ properties: Lt,
2078
+ required: $t,
2079
+ ignore: Nt
2080
+ }, re = {
2081
+ /**
2082
+ * 必填的列
2083
+ */
2084
+ requiredFields: { type: Array, default: [] },
2085
+ /**
2086
+ * 值唯一的列
2087
+ */
2088
+ uniqueFields: { type: Array, default: [] },
2089
+ dynamicMappingKeys: { type: Boolean, default: !1 },
2090
+ /**
2091
+ * 列配置
2092
+ */
2093
+ columns: { type: Array, default: [] },
2094
+ /**
2095
+ * 模态框标题
2096
+ */
2097
+ modalTitle: { type: String, default: "项编辑器" },
2098
+ /**
2099
+ * 数据是否可以置空
2100
+ */
2101
+ canEmpty: { type: Boolean, default: !0 },
2102
+ /**
2103
+ * 动态映射键值时,枚举值的key
2104
+ */
2105
+ valueField: { type: String, default: "id" },
2106
+ /**
2107
+ * 动态映射键值时,枚举名称的key
2108
+ */
2109
+ nameField: { type: String, default: "name" },
2110
+ /**
2111
+ * 目前假定idField和valueField一致
2112
+ */
2113
+ idField: { type: String, default: "id" },
2114
+ /**
2115
+ * 是否进入只读状态
2116
+ */
2117
+ readonly: { type: Boolean, default: !1 },
2118
+ /**
2119
+ * 组件值
2120
+ */
2121
+ modelValue: { type: Array, default: [] }
2122
+ /**
2123
+ * 列表只有一列时,将结果集转化为字符串数组
2124
+ */
2125
+ // isSimpleArray: { type: Boolean, default: false }
2126
+ }, Gt = be(re, qt, De, Se), jt = {
2127
+ /**
2128
+ * 必填的列
2129
+ */
2130
+ requiredFields: { type: Array, default: [] },
2131
+ /**
2132
+ * 值唯一的列
2133
+ */
2134
+ uniqueFields: { type: Array, default: [] },
2135
+ dynamicMappingKeys: { type: Boolean, default: !1 },
2136
+ /**
2137
+ * 列配置
2138
+ */
2139
+ columns: { type: Array, default: [] },
2140
+ /**
2141
+ * 数据是否可以置空
2142
+ */
2143
+ canEmpty: { type: Boolean, default: !0 },
2144
+ /**
2145
+ * 动态映射键值时,枚举值的key
2146
+ */
2147
+ valueField: { type: String, default: "id" },
2148
+ /**
2149
+ * 动态映射键值时,枚举名称的key
2150
+ */
2151
+ nameField: { type: String, default: "name" },
2152
+ /**
2153
+ * 组件值
2154
+ */
2155
+ datas: { type: Array, default: [] }
2156
+ }, Ut = /* @__PURE__ */ V({
2157
+ name: "FItemCollectionEditorInner",
2158
+ props: jt,
2159
+ emits: ["change"],
2160
+ setup(e, t) {
2161
+ const {
2162
+ guid: n
2163
+ } = J(), a = new Be(), o = w(e.valueField), l = w(e.nameField), u = {
2164
+ editMode: "cell"
2165
+ }, c = w(), p = e.columns;
2166
+ let r = e.datas;
2167
+ function d() {
2168
+ const h = {};
2169
+ return p.forEach((B) => {
2170
+ B.editor && (B.editor.type === "checkbox" || B.editor.type === "switch") ? h[B.field] = !1 : h[B.field] = "";
2171
+ }), h;
2172
+ }
2173
+ function i() {
2174
+ if (e.dynamicMappingKeys) {
2175
+ const h = "请先填写XXX", B = o.value.trim() ? l.value.trim() ? "" : "枚举名称字段" : "枚举值字段";
2176
+ return a.warning({
2177
+ position: "top-center",
2178
+ message: h.replace("XXX", B)
2179
+ }), !1;
2180
+ }
2181
+ return !0;
2182
+ }
2183
+ function s(h) {
2184
+ const B = "不允许重复。";
2185
+ if (!i())
2186
+ return !1;
2187
+ if (!h || h.length === 0)
2188
+ return e.canEmpty ? !0 : (a.warning({
2189
+ position: "top-center",
2190
+ message: "请添加值"
2191
+ }), !1);
2192
+ const P = e.requiredFields || [], C = "不允许为空";
2193
+ for (const S of h)
2194
+ for (const M of Object.keys(S)) {
2195
+ const v = p.find((x) => x.field === M);
2196
+ if (v && v.editor && (v.editor.type === "checkbox" || v.editor.type === "switch")) {
2197
+ if (P.includes(M) && (S[M] === null || S[M] === void 0))
2198
+ return a.warning({
2199
+ position: "top-center",
2200
+ message: v.title + C
2201
+ }), !1;
2202
+ } else if (P.includes(M) && (S[M] === void 0 || S[M] === "" || S[M] === null))
2203
+ return a.warning({
2204
+ position: "top-center",
2205
+ message: v.title + C
2206
+ }), !1;
2207
+ }
2208
+ const E = e.uniqueFields || [];
2209
+ for (const S of E) {
2210
+ const M = h.map(($) => $[S]), v = new Set(M), x = Array.from(v);
2211
+ if (M.length !== x.length) {
2212
+ const $ = p.find((se) => se.field === S);
2213
+ return a.warning({
2214
+ position: "top-center",
2215
+ message: $.title + B
2216
+ }), !1;
2217
+ }
2218
+ }
2219
+ return !0;
2220
+ }
2221
+ function f() {
2222
+ if (e.readonly || !i())
2223
+ return;
2224
+ const h = d(), B = n();
2225
+ r.push({
2226
+ hId: B,
2227
+ ...h
2228
+ }), c.value.updateDataSource(r), c.value.selectItemById(B);
2229
+ }
2230
+ function m() {
2231
+ r && r.length > 0 && c.value.selectItemById(r[0].hId);
2232
+ }
2233
+ function y() {
2234
+ r = [...c.value.getVisibleData().filter((B) => !B.checked).map((B) => B.raw)], c.value.updateDataSource(r), m();
2235
+ }
2236
+ function F(h) {
2237
+ if (!h || h.length === 0)
2238
+ return h;
2239
+ const B = [];
2240
+ return h.forEach((P) => {
2241
+ const {
2242
+ value: C,
2243
+ name: E,
2244
+ ...S
2245
+ } = P, M = Object.assign({}, S);
2246
+ M[o.value.trim()] = C, M[l.value.trim()] = E, B.push(M);
2247
+ }), B;
2248
+ }
2249
+ function k() {
2250
+ let h = [];
2251
+ return c.value.getVisibleData().forEach((B) => {
2252
+ const {
2253
+ hId: P,
2254
+ ...C
2255
+ } = B.raw;
2256
+ h.push(C);
2257
+ }), s(h) ? (e.dynamicMappingKeys ? (h = F(h), t.emit("change", {
2258
+ value: h,
2259
+ parameters: {
2260
+ valueField: o.value.trim(),
2261
+ nameField: l.value.trim()
2262
+ }
2263
+ })) : t.emit("change", {
2264
+ value: h
2265
+ }), !0) : !1;
2266
+ }
2267
+ return t.expose({
2268
+ clickConfirm: k
2269
+ }), L(() => {
2270
+ m();
2271
+ }), () => g("div", {
2272
+ class: "f-utils-fill-flex-column"
2273
+ }, [!e.readonly && g("div", {
2274
+ class: "mb-1 py-1 ml-1"
2275
+ }, [g("button", {
2276
+ class: "btn f-rt-btn f-btn-ml btn-primary",
2277
+ onClick: () => f()
2278
+ }, [A("新增")]), g("button", {
2279
+ class: "btn f-rt-btn f-btn-ml btn-secondary",
2280
+ onClick: () => y()
2281
+ }, [A("删除")])]), g("div", {
2282
+ class: "f-utils-fill border",
2283
+ style: "margin:0 8px;border-radius:12px;"
2284
+ }, [g(Fe, {
2285
+ ref: c,
2286
+ showBorder: !0,
2287
+ idField: "hId",
2288
+ columns: p,
2289
+ data: r,
2290
+ editable: !0,
2291
+ "edit-option": u,
2292
+ fit: "true"
2293
+ }, null)])]);
2294
+ }
2295
+ }), Wt = /* @__PURE__ */ V({
2296
+ name: "FItemCollectionEditor",
2297
+ props: re,
2298
+ components: {},
2299
+ emits: ["change"],
2300
+ setup(e, t) {
2301
+ const {
2302
+ guid: n
2303
+ } = J(), a = w(`共 ${(e.modelValue || []).length} 项`), o = w(e.valueField), l = w(e.nameField), u = w();
2304
+ function c() {
2305
+ let s = [];
2306
+ return e.dynamicMappingKeys ? (s = [], o.value = o.value.trim(), l.value = l.value.trim(), (e.modelValue || []).forEach((f) => {
2307
+ if (o.value && l.value) {
2308
+ const {
2309
+ [o.value]: m,
2310
+ [l.value]: y,
2311
+ ...F
2312
+ } = f, k = F || {};
2313
+ k.value = m, k.name = y, k.hId = n(), s.push(k);
2314
+ }
2315
+ })) : (s = U(e.modelValue || []), s.forEach((f) => {
2316
+ f.hId = n();
2317
+ })), s;
2318
+ }
2319
+ function p() {
2320
+ let s = [];
2321
+ return e.columns && e.columns.length > 0 ? s = e.columns : s = [{
2322
+ field: e.valueField,
2323
+ title: "值",
2324
+ dataType: "string"
2325
+ }, {
2326
+ field: e.nameField,
2327
+ title: "名称",
2328
+ dataType: "string"
2329
+ }], s;
2330
+ }
2331
+ function r() {
2332
+ }
2333
+ const d = {
2334
+ fitContent: !1,
2335
+ width: 900,
2336
+ height: 600,
2337
+ title: "项编辑器",
2338
+ buttons: [{
2339
+ name: "cancel",
2340
+ text: "取消",
2341
+ class: "btn btn-secondary",
2342
+ handle: (s) => !0
2343
+ }, {
2344
+ name: "accept",
2345
+ text: "确定",
2346
+ class: "btn btn-primary",
2347
+ handle: (s) => !!u.value.clickConfirm()
2348
+ }]
2349
+ };
2350
+ function i(s) {
2351
+ a.value = `共 ${s.value.length} 项`, t.emit("change", s);
2352
+ }
2353
+ return L(() => {
2354
+ }), () => g(Pt, {
2355
+ "button-behavior": "Modal",
2356
+ "modal-options": d,
2357
+ modelValue: a.value,
2358
+ "onUpdate:modelValue": (s) => a.value = s,
2359
+ editable: !1,
2360
+ beforeOpen: r
2361
+ }, {
2362
+ default: () => [g("div", {
2363
+ class: "f-utils-absolute-all f-utils-flex-column"
2364
+ }, [e.dynamicMappingKeys && g("div", {
2365
+ class: "farris-form-controls-inline p-2 f-form-layout farris-form f-form-lable-auto"
2366
+ }, [g("div", {
2367
+ class: "farris-group-wrap mr-3"
2368
+ }, [g("div", {
2369
+ class: "form-group farris-form-group"
2370
+ }, [g("label", {
2371
+ class: "col-form-label"
2372
+ }, [g("span", {
2373
+ class: "farris-label-info text-danger"
2374
+ }, [A("*")]), g("span", {
2375
+ class: "farris-label-text"
2376
+ }, [A("枚举值字段")])]), g("div", {
2377
+ class: "farris-input-wrap"
2378
+ }, [G(g("input", {
2379
+ type: "input",
2380
+ class: "form-control",
2381
+ "onUpdate:modelValue": (s) => o = s,
2382
+ readonly: e.readonly
2383
+ }, null), [[X, o]])])])]), g("div", {
2384
+ class: "farris-group-wrap"
2385
+ }, [g("div", {
2386
+ class: "form-group farris-form-group"
2387
+ }, [g("label", {
2388
+ class: "col-form-label"
2389
+ }, [g("span", {
2390
+ class: "farris-label-info text-danger"
2391
+ }, [A("*")]), g("span", {
2392
+ class: "farris-label-text"
2393
+ }, [A("枚举名称字段")])]), g("div", {
2394
+ class: "farris-input-wrap"
2395
+ }, [G(g("input", {
2396
+ type: "input",
2397
+ class: "form-control",
2398
+ "onUpdate:modelValue": (s) => l = s,
2399
+ readonly: e.readonly
2400
+ }, null), [[X, l]])])])])]), g(Ut, {
2401
+ ref: u,
2402
+ valueField: o,
2403
+ nameField: l,
2404
+ requiredFields: e.requiredFields,
2405
+ uniqueFields: e.uniqueFields,
2406
+ dynamicMappingKeys: e.dynamicMappingKeys,
2407
+ canEmpty: e.canEmpty,
2408
+ datas: c(),
2409
+ columns: p(),
2410
+ onChange: (s) => i(s)
2411
+ }, null)])]
2412
+ });
1060
2413
  }
1061
2414
  });
1062
- E.install = (r) => {
1063
- r.component(E.name, E), r.component(x.name, x);
2415
+ D.install = (e) => {
2416
+ e.component(D.name, D), e.component(K.name, K);
1064
2417
  };
1065
- E.register = (r, t, e, n) => {
1066
- r["radio-group"] = E, t["radio-group"] = J;
2418
+ D.register = (e, t, n, a) => {
2419
+ e["radio-group"] = D, t["radio-group"] = oe, e["item-collection-editor"] = Wt, t["item-collection-editor"] = Gt;
1067
2420
  };
1068
- E.registerDesigner = (r, t, e) => {
1069
- r["radio-group"] = Ae, t["radio-group"] = J;
2421
+ D.registerDesigner = (e, t, n) => {
2422
+ e["radio-group"] = et, t["radio-group"] = oe;
1070
2423
  };
1071
2424
  export {
1072
- E as RadioGroup,
1073
- E as default,
1074
- J as propsResolver,
1075
- O as radioGroupProps,
1076
- re as radioProps
2425
+ D as RadioGroup,
2426
+ D as default,
2427
+ oe as propsResolver,
2428
+ R as radioGroupProps,
2429
+ Me as radioProps
1077
2430
  };