@farris/ui-vue 1.3.0 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/components/accordion/index.esm.js +103 -99
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +454 -398
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +444 -0
  6. package/components/binding-selector/index.umd.cjs +1 -0
  7. package/components/binding-selector/package.json +8 -0
  8. package/components/border-editor/index.esm.js +5 -3
  9. package/components/border-editor/index.umd.cjs +1 -1
  10. package/components/button-edit/index.esm.js +143 -139
  11. package/components/button-edit/index.umd.cjs +1 -1
  12. package/components/calendar/index.esm.js +479 -476
  13. package/components/calendar/index.umd.cjs +1 -1
  14. package/components/capsule/index.esm.js +255 -252
  15. package/components/capsule/index.umd.cjs +1 -1
  16. package/components/checkbox/index.esm.js +652 -567
  17. package/components/checkbox/index.umd.cjs +1 -1
  18. package/components/color-picker/index.esm.js +518 -521
  19. package/components/color-picker/index.umd.cjs +2 -2
  20. package/components/combo-list/index.esm.js +659 -553
  21. package/components/combo-list/index.umd.cjs +1 -1
  22. package/components/combo-tree/index.esm.js +162 -155
  23. package/components/combo-tree/index.umd.cjs +1 -1
  24. package/components/common/index.esm.js +866 -747
  25. package/components/common/index.umd.cjs +1 -1
  26. package/components/component/index.esm.js +371 -998
  27. package/components/component/index.umd.cjs +1 -1
  28. package/components/condition/index.esm.js +1174 -1280
  29. package/components/condition/index.umd.cjs +1 -1
  30. package/components/content-container/index.esm.js +340 -991
  31. package/components/content-container/index.umd.cjs +1 -1
  32. package/components/data-grid/index.esm.js +6066 -5847
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +3400 -3486
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2328 -2446
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/designer-canvas/index.css +1 -1
  39. package/components/designer-canvas/index.esm.js +9551 -1200
  40. package/components/designer-canvas/index.umd.cjs +1 -1
  41. package/components/designer-outline/index.esm.js +2 -1
  42. package/components/designer-outline/index.umd.cjs +1 -1
  43. package/components/drawer/index.esm.js +34 -38
  44. package/components/drawer/index.umd.cjs +1 -1
  45. package/components/dropdown/index.esm.js +234 -231
  46. package/components/dropdown/index.umd.cjs +2 -2
  47. package/components/dynamic-form/index.esm.js +1996 -2630
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +138 -123
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +218 -218
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/event-parameter/index.esm.js +311 -0
  54. package/components/event-parameter/index.umd.cjs +1 -0
  55. package/components/event-parameter/package.json +8 -0
  56. package/components/events-editor/index.css +1 -1
  57. package/components/events-editor/index.esm.js +548 -586
  58. package/components/events-editor/index.umd.cjs +1 -1
  59. package/components/expression-editor/index.esm.js +95 -91
  60. package/components/expression-editor/index.umd.cjs +1 -1
  61. package/components/external-container/index.esm.js +2871 -3736
  62. package/components/external-container/index.umd.cjs +1 -1
  63. package/components/field-selector/index.esm.js +3380 -3645
  64. package/components/field-selector/index.umd.cjs +1 -1
  65. package/components/filter-bar/index.css +1 -1
  66. package/components/filter-bar/index.esm.js +10543 -3207
  67. package/components/filter-bar/index.umd.cjs +1 -1
  68. package/components/flow-canvas/index.css +1 -1
  69. package/components/flow-canvas/index.esm.js +9775 -1312
  70. package/components/flow-canvas/index.umd.cjs +1 -1
  71. package/components/image-cropper/index.esm.js +442 -438
  72. package/components/image-cropper/index.umd.cjs +1 -1
  73. package/components/input-group/index.esm.js +587 -807
  74. package/components/input-group/index.umd.cjs +1 -1
  75. package/components/layout/index.esm.js +415 -381
  76. package/components/layout/index.umd.cjs +1 -1
  77. package/components/list-nav/index.esm.js +361 -1024
  78. package/components/list-nav/index.umd.cjs +1 -1
  79. package/components/list-view/index.esm.js +2265 -2371
  80. package/components/list-view/index.umd.cjs +1 -1
  81. package/components/lookup/index.esm.js +6425 -6257
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.esm.js +6164 -5946
  84. package/components/mapping-editor/index.umd.cjs +1 -1
  85. package/components/message-box/index.esm.js +252 -252
  86. package/components/message-box/index.umd.cjs +1 -1
  87. package/components/modal/index.esm.js +70 -70
  88. package/components/modal/index.umd.cjs +1 -1
  89. package/components/nav/index.esm.js +524 -1474
  90. package/components/nav/index.umd.cjs +3 -3
  91. package/components/number-range/index.esm.js +547 -502
  92. package/components/number-range/index.umd.cjs +1 -1
  93. package/components/number-spinner/index.esm.js +646 -574
  94. package/components/number-spinner/index.umd.cjs +1 -1
  95. package/components/order/index.esm.js +1181 -2028
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +134 -131
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +1185 -2027
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +442 -1368
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/progress/index.esm.js +238 -235
  104. package/components/progress/index.umd.cjs +3 -3
  105. package/components/property-editor/index.esm.js +1635 -1713
  106. package/components/property-editor/index.umd.cjs +2 -2
  107. package/components/property-panel/index.esm.js +791 -716
  108. package/components/property-panel/index.umd.cjs +1 -1
  109. package/components/query-solution/index.css +1 -1
  110. package/components/query-solution/index.esm.js +12203 -5274
  111. package/components/query-solution/index.umd.cjs +6 -1
  112. package/components/radio-button/index.esm.js +97 -97
  113. package/components/radio-button/index.umd.cjs +1 -1
  114. package/components/radio-group/index.css +1 -1
  115. package/components/radio-group/index.esm.js +1873 -520
  116. package/components/radio-group/index.umd.cjs +1 -1
  117. package/components/rate/index.esm.js +299 -300
  118. package/components/rate/index.umd.cjs +1 -1
  119. package/components/response-layout/index.esm.js +176 -173
  120. package/components/response-layout/index.umd.cjs +1 -1
  121. package/components/response-layout-editor/index.esm.js +715 -659
  122. package/components/response-layout-editor/index.umd.cjs +1 -1
  123. package/components/response-toolbar/index.esm.js +1032 -1883
  124. package/components/response-toolbar/index.umd.cjs +1 -1
  125. package/components/schema-selector/index.esm.js +4767 -5693
  126. package/components/schema-selector/index.umd.cjs +2 -2
  127. package/components/search-box/index.esm.js +169 -161
  128. package/components/search-box/index.umd.cjs +1 -1
  129. package/components/section/index.esm.js +490 -1167
  130. package/components/section/index.umd.cjs +1 -1
  131. package/components/smoke-detector/index.esm.js +154 -151
  132. package/components/smoke-detector/index.umd.cjs +1 -1
  133. package/components/splitter/index.esm.js +575 -1204
  134. package/components/splitter/index.umd.cjs +1 -1
  135. package/components/splitter/style.js +2 -0
  136. package/components/step/index.esm.js +279 -276
  137. package/components/step/index.umd.cjs +1 -1
  138. package/components/switch/index.esm.js +478 -428
  139. package/components/switch/index.umd.cjs +1 -1
  140. package/components/tabs/index.esm.js +2591 -3326
  141. package/components/tabs/index.umd.cjs +1 -1
  142. package/components/tags/index.esm.js +442 -439
  143. package/components/tags/index.umd.cjs +1 -1
  144. package/components/text/index.esm.js +309 -307
  145. package/components/text/index.umd.cjs +1 -1
  146. package/components/textarea/index.esm.js +500 -430
  147. package/components/textarea/index.umd.cjs +1 -1
  148. package/components/time-picker/index.esm.js +1391 -1341
  149. package/components/time-picker/index.umd.cjs +1 -1
  150. package/components/transfer/index.esm.js +574 -575
  151. package/components/transfer/index.umd.cjs +1 -1
  152. package/components/tree-grid/index.esm.js +3422 -3536
  153. package/components/tree-grid/index.umd.cjs +1 -1
  154. package/components/tree-view/index.esm.js +2661 -2764
  155. package/components/tree-view/index.umd.cjs +1 -1
  156. package/components/uploader/index.esm.js +675 -674
  157. package/components/uploader/index.umd.cjs +2 -2
  158. package/components/verify-detail/index.esm.js +300 -297
  159. package/components/verify-detail/index.umd.cjs +1 -1
  160. package/components/video/index.esm.js +454 -1089
  161. package/components/video/index.umd.cjs +1 -1
  162. package/components/weather/index.esm.js +709 -706
  163. package/components/weather/index.umd.cjs +5 -5
  164. package/farris.all.esm.js +54780 -52757
  165. package/farris.all.umd.cjs +14 -9
  166. package/index.css +1 -1
  167. package/package.json +1 -1
  168. package/types/binding-selector/index.d.ts +55 -0
  169. package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
  170. package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
  171. package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
  172. package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
  173. package/types/combo-list/src/components/list-container.component.d.ts +6 -6
  174. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  175. package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
  176. package/types/common/directive/area-response.d.ts +10 -0
  177. package/types/common/entity/entity-schema.d.ts +26 -11
  178. package/types/common/index.d.ts +9 -0
  179. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  180. package/types/common/types.d.ts +2 -2
  181. package/types/common/utils/resolve-field.d.ts +2 -0
  182. package/types/common/utils/use-class.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  184. package/types/condition/src/condition-fields.design.component.d.ts +18 -0
  185. package/types/condition/src/types.d.ts +5 -4
  186. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  187. package/types/data-grid/index.d.ts +8 -5
  188. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
  189. package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
  190. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  191. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  192. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  193. package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
  194. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
  196. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  197. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  198. package/types/data-view/composition/types.d.ts +9 -11
  199. package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
  200. package/types/date-picker/src/components/month/month.component.d.ts +3 -3
  201. package/types/date-picker/src/components/year/year.component.d.ts +3 -3
  202. package/types/designer-canvas/index.d.ts +3 -1
  203. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  204. package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
  205. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  206. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  207. package/types/designer-canvas/src/composition/types.d.ts +49 -41
  208. package/types/designer-canvas/src/types.d.ts +10 -21
  209. package/types/dynamic-form/index.d.ts +1 -1
  210. package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
  211. package/types/dynamic-form/src/designer/response-form-use-designer-rules.d.ts +3 -0
  212. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  213. package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
  214. package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
  215. package/types/dynamic-form/src/types.d.ts +1 -1
  216. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +6 -1
  217. package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
  218. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
  219. package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
  220. package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
  221. package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
  222. package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
  223. package/types/event-parameter/index.d.ts +31 -0
  224. package/types/event-parameter/src/composition/type.d.ts +77 -0
  225. package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
  226. package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
  227. package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
  228. package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
  229. package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
  230. package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
  231. package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
  232. package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
  233. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  234. package/types/field-selector/src/field-selector.component.d.ts +1 -2
  235. package/types/field-selector/src/field-selector.props.d.ts +0 -9
  236. package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
  237. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  238. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  239. package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
  240. package/types/list-view/src/list-view-table.component.d.ts +15 -0
  241. package/types/lookup/src/composition/use-user-data.d.ts +2 -2
  242. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
  243. package/types/modal/src/composition/modal.service.d.ts +2 -1
  244. package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
  245. package/types/page-header/src/page-header.component.d.ts +1 -1
  246. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  247. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  248. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  249. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  250. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  251. package/types/property-panel/index.d.ts +3 -1
  252. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  253. package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
  254. package/types/property-panel/src/composition/type.d.ts +0 -13
  255. package/types/query-solution/src/composition/types.d.ts +35 -4
  256. package/types/query-solution/src/composition/use-header.d.ts +21 -0
  257. package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
  258. package/types/query-solution/src/composition/use-solution.d.ts +20 -0
  259. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +43 -35
  260. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  262. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  264. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +12 -0
  266. package/types/query-solution/src/query-solution.d.ts +10 -2
  267. package/types/query-solution/src/solutions.d.ts +108 -509
  268. package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
  269. package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
  270. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
  271. package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
  272. package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
  273. package/types/response-layout-editor/index.d.ts +3 -1
  274. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  275. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  276. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
  277. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  278. package/types/section/src/property-config/section.property-config.d.ts +17 -17
  279. package/types/section/src/schema/schema-resolver.d.ts +1 -2
  280. package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
  281. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  282. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  283. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  284. package/types/tabs/src/composition/types.d.ts +4 -1
  285. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  286. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  287. package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
  288. package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
  289. package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
  290. package/types/text/src/composition/types.d.ts +4 -4
  291. package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
  292. package/types/tree-grid/index.d.ts +3 -3
  293. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  294. package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
  295. package/types/weather/src/composition/use-weather-color.d.ts +15 -0
  296. package/types/weather/src/composition/use-weather-data.d.ts +15 -0
  297. package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
  298. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  299. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  300. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
  301. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  302. package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
  303. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  304. package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
  305. package/types/weather/src/composition/types.d.ts +0 -2
@@ -1,103 +1,106 @@
1
- var Y = Object.defineProperty;
2
- var Z = (n, t, e) => t in n ? Y(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var g = (n, t, e) => Z(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { defineComponent as G, ref as k, computed as E, onMounted as W, createVNode as w, withDirectives as H, vModelText as R, inject as O } from "vue";
5
- import { isPlainObject as q, cloneDeep as z } from "lodash-es";
6
- import { useTextBox as K, useClear as ee } from "../common/index.esm.js";
7
- import { getSchemaByType as j } from "../dynamic-resolver/index.esm.js";
8
- import { useResponseLayoutEditorSetting as te } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
9
- const J = {}, X = {};
10
- function N(n) {
11
- const { properties: t, title: e, ignore: o } = n, r = o && Array.isArray(o), i = Object.keys(t).reduce((l, d) => ((!r || !o.find((p) => p == d)) && (l[d] = t[d].type === "object" && t[d].properties ? N(t[d]) : z(t[d].default)), l), {});
12
- return (!r || !o.find((l) => l == "id")) && (i.id = `${e}-${Date.now()}`), i;
1
+ var _ = Object.defineProperty;
2
+ var H = (n, t, e) => t in n ? _(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var b = (n, t, e) => H(n, typeof t != "symbol" ? t + "" : t, e);
4
+ import { defineComponent as x, ref as B, computed as I, onMounted as q, createVNode as E, withDirectives as J, vModelText as Y, inject as U } from "vue";
5
+ import { isPlainObject as $, cloneDeep as W } from "lodash-es";
6
+ import { useTextBox as Z, useClear as K, withInstall as R } from "../common/index.esm.js";
7
+ import { DgControl as G } from "../designer-canvas/index.esm.js";
8
+ const O = {}, j = {};
9
+ function A(n) {
10
+ const { properties: t, title: e, ignore: a } = n, o = a && Array.isArray(a), l = Object.keys(t).reduce((s, y) => ((!o || !a.find((f) => f === y)) && (s[y] = t[y].type === "object" && t[y].properties ? A(t[y]) : W(t[y].default)), s), {});
11
+ if (e && (!o || !a.find((s) => s === "id"))) {
12
+ const s = e.toLowerCase().replace(/-/g, "_");
13
+ l.id = `${s}_${Math.random().toString().slice(2, 6)}`;
14
+ }
15
+ return l;
13
16
  }
14
- function U(n, t = {}, e) {
15
- const o = J[n];
16
- if (o) {
17
- let r = N(o);
18
- const i = X[n];
19
- return r = i ? i({ getSchemaByType: U }, r, t, e) : r, r;
17
+ function z(n, t = {}, e) {
18
+ const a = O[n];
19
+ if (a) {
20
+ let o = A(a);
21
+ const l = j[n];
22
+ return o = l ? l({ getSchemaByType: z }, o, t, e) : o, o;
20
23
  }
21
24
  return null;
22
25
  }
23
- function ne(n, t) {
24
- const e = N(t);
25
- return Object.keys(n).reduce((o, r) => (o[r] && q(o[r]) && q(n[r]) ? Object.assign(o[r], n[r]) : o[r] = n[r], o), e), e;
26
+ function ee(n, t) {
27
+ const e = A(t);
28
+ return Object.keys(e).reduce((a, o) => (a[o] && $(a[o]) && $(n[o] || !n[o]) ? Object.assign(a[o], n[o] || {}) : a[o] = n[o], a), e), e;
26
29
  }
27
- function oe(n, t) {
28
- return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
29
- if (t.has(r)) {
30
- const i = t.get(r);
31
- if (typeof i == "string")
32
- o[i] = n[r];
30
+ function te(n, t) {
31
+ return Object.keys(n).filter((a) => n[a] != null).reduce((a, o) => {
32
+ if (t.has(o)) {
33
+ const l = t.get(o);
34
+ if (typeof l == "string")
35
+ a[l] = n[o];
33
36
  else {
34
- const l = i(r, n[r], n);
35
- Object.assign(o, l);
37
+ const s = l(o, n[o], n);
38
+ Object.assign(a, s);
36
39
  }
37
40
  } else
38
- o[r] = n[r];
39
- return o;
41
+ a[o] = n[o];
42
+ return a;
40
43
  }, {});
41
44
  }
42
- function re(n, t, e = /* @__PURE__ */ new Map()) {
43
- const o = ne(n, t);
44
- return oe(o, e);
45
+ function ne(n, t, e = /* @__PURE__ */ new Map()) {
46
+ const a = ee(n, t);
47
+ return te(a, e);
45
48
  }
46
- function ae(n = {}) {
47
- function t(a, u, s, m) {
48
- if (typeof s == "number")
49
- return m[a].length === s;
50
- if (typeof s == "object") {
51
- const h = Object.keys(s)[0], y = s[h];
52
- if (h === "not")
53
- return Number(m[a].length) !== Number(y);
54
- if (h === "moreThan")
55
- return Number(m[a].length) >= Number(y);
56
- if (h === "lessThan")
57
- return Number(m[a].length) <= Number(y);
49
+ function oe(n = {}) {
50
+ function t(i, c, r, p) {
51
+ if (typeof r == "number")
52
+ return p[i].length === r;
53
+ if (typeof r == "object") {
54
+ const m = Object.keys(r)[0], d = r[m];
55
+ if (m === "not")
56
+ return Number(p[i].length) !== Number(d);
57
+ if (m === "moreThan")
58
+ return Number(p[i].length) >= Number(d);
59
+ if (m === "lessThan")
60
+ return Number(p[i].length) <= Number(d);
58
61
  }
59
62
  return !1;
60
63
  }
61
- function e(a, u, s, m) {
62
- return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(s);
64
+ function e(i, c, r, p) {
65
+ return p[i] && p[i].propertyValue && String(p[i].propertyValue.value) === String(r);
63
66
  }
64
- const o = /* @__PURE__ */ new Map([
67
+ const a = /* @__PURE__ */ new Map([
65
68
  ["length", t],
66
69
  ["getProperty", e]
67
70
  ]);
68
- Object.keys(n).reduce((a, u) => (a.set(u, n[u]), a), o);
69
- function r(a, u) {
70
- const s = a;
71
- return typeof u == "number" ? [{ target: s, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: s, operator: "getProperty", param: a, value: !!u }] : typeof u == "object" ? Object.keys(u).map((m) => {
72
- if (m === "length")
73
- return { target: s, operator: "length", param: null, value: u[m] };
74
- const h = m, y = u[m];
75
- return { target: s, operator: "getProperty", param: h, value: y };
71
+ Object.keys(n).reduce((i, c) => (i.set(c, n[c]), i), a);
72
+ function o(i, c) {
73
+ const r = i;
74
+ return typeof c == "number" ? [{ target: r, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: r, operator: "getProperty", param: i, value: !!c }] : typeof c == "object" ? Object.keys(c).map((p) => {
75
+ if (p === "length")
76
+ return { target: r, operator: "length", param: null, value: c[p] };
77
+ const m = p, d = c[p];
78
+ return { target: r, operator: "getProperty", param: m, value: d };
76
79
  }) : [];
77
80
  }
78
- function i(a) {
79
- return Object.keys(a).reduce((s, m) => {
80
- const h = r(m, a[m]);
81
- return s.push(...h), s;
81
+ function l(i) {
82
+ return Object.keys(i).reduce((r, p) => {
83
+ const m = o(p, i[p]);
84
+ return r.push(...m), r;
82
85
  }, []);
83
86
  }
84
- function l(a, u) {
85
- if (o.has(a.operator)) {
86
- const s = o.get(a.operator);
87
- return s && s(a.target, a.param, a.value, u) || !1;
87
+ function s(i, c) {
88
+ if (a.has(i.operator)) {
89
+ const r = a.get(i.operator);
90
+ return r && r(i.target, i.param, i.value, c) || !1;
88
91
  }
89
92
  return !1;
90
93
  }
91
- function d(a, u) {
92
- return i(a).reduce((h, y) => h && l(y, u), !0);
94
+ function y(i, c) {
95
+ return l(i).reduce((m, d) => m && s(d, c), !0);
93
96
  }
94
- function p(a, u) {
95
- const s = Object.keys(a), m = s.includes("allOf"), h = s.includes("anyOf"), y = m || h, V = (y ? a[y ? m ? "allOf" : "anyOf" : "allOf"] : [a]).map((P) => d(P, u));
96
- return m ? !V.includes(!1) : V.includes(!0);
97
+ function f(i, c) {
98
+ const r = Object.keys(i), p = r.includes("allOf"), m = r.includes("anyOf"), d = p || m, C = (d ? i[d ? p ? "allOf" : "anyOf" : "allOf"] : [i]).map((T) => y(T, c));
99
+ return p ? !C.includes(!1) : C.includes(!0);
97
100
  }
98
- return { parseValueSchema: p };
101
+ return { parseValueSchema: f };
99
102
  }
100
- const c = {
103
+ const u = {
101
104
  button: { type: "button", name: "按钮", icon: "Button" },
102
105
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
103
106
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -135,21 +138,22 @@ const c = {
135
138
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
136
139
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
137
140
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
138
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
139
- }, ie = {}, le = {};
140
- ae();
141
- function se(n, t, e = /* @__PURE__ */ new Map(), o = (l, d, p) => d, r = {}, i = (l) => l) {
142
- return J[t.title] = t, X[t.title] = o, ie[t.title] = r, le[t.title] = i, (l = {}) => {
143
- const d = re(l, t, e), p = Object.keys(n).reduce((a, u) => (a[u] = n[u].default, a), {});
144
- return Object.assign(p, d);
141
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
142
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
143
+ }, re = {}, ae = {};
144
+ oe();
145
+ function ie(n, t, e = /* @__PURE__ */ new Map(), a = (s, y, f, i) => y, o = {}, l = (s) => s) {
146
+ return O[t.title] = t, j[t.title] = a, re[t.title] = o, ae[t.title] = l, (s = {}) => {
147
+ const y = ne(s, t, e), f = Object.keys(n).reduce((i, c) => (i[c] = n[c].default, i), {});
148
+ return Object.assign(f, y);
145
149
  };
146
150
  }
147
- function ce(n, t) {
151
+ function le(n, t) {
148
152
  return { customClass: t.class, customStyle: t.style };
149
153
  }
150
- const pe = /* @__PURE__ */ new Map([
151
- ["appearance", ce]
152
- ]), ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-design.gitee.io/switch.schema.json", me = "textarea", ye = "A Farris Component", fe = "object", he = {
154
+ const se = /* @__PURE__ */ new Map([
155
+ ["appearance", le]
156
+ ]), ce = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/switch.schema.json", ue = "textarea", de = "A Farris Component", me = "object", ye = {
153
157
  id: {
154
158
  description: "The unique identifier for a textarea",
155
159
  type: "string"
@@ -211,27 +215,37 @@ const pe = /* @__PURE__ */ new Map([
211
215
  type: "boolean",
212
216
  default: !0
213
217
  },
214
- ignore: [
215
- "id",
216
- "appearance",
217
- "binding"
218
- ]
219
- }, ge = [
218
+ rows: {
219
+ description: "",
220
+ type: "number"
221
+ },
222
+ showCount: {
223
+ description: "",
224
+ type: "boolean",
225
+ default: !0
226
+ }
227
+ }, fe = [
220
228
  "id",
221
229
  "type"
222
- ], ve = {
223
- $schema: ue,
224
- $id: de,
225
- title: me,
226
- description: ye,
227
- type: fe,
228
- properties: he,
229
- required: ge
230
+ ], he = [
231
+ "id",
232
+ "appearance",
233
+ "binding",
234
+ "visible"
235
+ ], ge = {
236
+ $schema: ce,
237
+ $id: pe,
238
+ title: ue,
239
+ description: de,
240
+ type: me,
241
+ properties: ye,
242
+ required: fe,
243
+ ignore: he
230
244
  };
231
245
  function be(n, t, e) {
232
246
  return t;
233
247
  }
234
- const $ = {
248
+ const N = {
235
249
  /** 自动聚焦 */
236
250
  autofocus: { type: Boolean, default: !1 },
237
251
  /** 自动完成 */
@@ -252,42 +266,45 @@ const $ = {
252
266
  placeholder: { type: String, default: "" },
253
267
  /** 只读 */
254
268
  readonly: { type: Boolean, default: !1 },
255
- /** 文本行数 */
256
- rows: { type: Boolean },
269
+ /** 文本区域可见的行数 */
270
+ rows: { type: Number, default: 2 },
257
271
  /** 展示输入文本数量 */
258
272
  showCount: { type: Boolean, default: !1 },
259
273
  /** 展示边线 */
260
274
  showBorder: { Type: Boolean, default: !0 },
261
275
  /** 键盘按键索引 */
262
276
  tabIndex: { type: Number, default: -1 }
263
- }, _ = se($, ve, pe, be), A = /* @__PURE__ */ G({
277
+ }, X = ie(N, ge, se, be), L = /* @__PURE__ */ x({
264
278
  name: "FTextarea",
265
- props: $,
279
+ props: N,
266
280
  emits: ["update:modelValue", "valueChange"],
267
281
  setup(n, t) {
268
- const e = k(), o = k(n.modelValue), r = E(() => n.modelValue), i = K(n, t, o, r), {
269
- inputGroupClass: l,
270
- onBlur: d,
271
- onFocus: p
272
- } = i, a = ee(n, t, i), {
273
- onMouseEnter: u,
274
- onMouseLeave: s,
275
- clearButtonClass: m,
276
- shouldShowClearButton: h,
277
- clearButtonStyle: y
278
- } = a, T = E(() => n.maxLength ? n.maxLength : n.modelValue.length), x = (v) => {
279
- var P, F;
280
- v.stopPropagation(), t.emit("update:modelValue", (P = v.target) == null ? void 0 : P.value), t.emit("valueChange", (F = v.target) == null ? void 0 : F.value);
281
- }, V = (v) => {
282
+ const e = B(), a = B(n.modelValue), o = I(() => n.modelValue), l = Z(n, t, a, o), {
283
+ inputGroupClass: s,
284
+ onBlur: y,
285
+ onFocus: f
286
+ } = l, i = K(n, t, l), {
287
+ onMouseEnter: c,
288
+ onMouseLeave: r,
289
+ clearButtonClass: p,
290
+ shouldShowClearButton: m,
291
+ clearButtonStyle: d
292
+ } = i, h = I(() => n.maxLength ? n.maxLength : n.modelValue.length), M = (v) => {
293
+ var T, F;
294
+ v.stopPropagation(), t.emit("update:modelValue", (T = v.target) == null ? void 0 : T.value), t.emit("valueChange", (F = v.target) == null ? void 0 : F.value);
295
+ }, C = (v) => {
282
296
  v.stopPropagation(), e.value.value = "", t.emit("update:modelValue", ""), t.emit("valueChange", "");
283
297
  };
284
- return W(() => {
285
- }), () => w("div", {
286
- class: l.value,
287
- onMouseenter: u,
288
- onMouseleave: s,
298
+ return t.expose({
299
+ elementRef: e
300
+ }), q(() => {
301
+ }), () => E("div", {
302
+ class: s.value,
303
+ onMouseenter: c,
304
+ onMouseleave: r,
289
305
  style: "position:relative"
290
- }, [H(w("textarea", {
306
+ }, [J(E("textarea", {
307
+ class: "form-control",
291
308
  id: n.id,
292
309
  "onUpdate:modelValue": (v) => n.modelValue = v,
293
310
  ref: e,
@@ -300,143 +317,139 @@ const $ = {
300
317
  placeholder: n.placeholder,
301
318
  autofocus: n.autofocus,
302
319
  rows: n.rows,
303
- onInput: x,
304
- onFocus: p,
305
- onBlur: d,
306
- style: "border-radius:6px; padding:5px 10px; width:100%"
307
- }, null), [[R, n.modelValue]]), h.value && w("span", {
320
+ onInput: M,
321
+ onFocus: f,
322
+ onBlur: y
323
+ }, null), [[Y, n.modelValue]]), m.value && E("span", {
308
324
  id: "clearIcon",
309
- class: m.value,
310
- style: y.value,
311
- onClick: (v) => V(v)
312
- }, [w("i", {
325
+ class: p.value,
326
+ style: d.value,
327
+ onClick: (v) => C(v)
328
+ }, [E("i", {
313
329
  class: "f-icon modal_close"
314
- }, null)]), n.showCount && w("span", {
330
+ }, null)]), n.showCount && E("span", {
315
331
  style: "position: absolute;bottom: 5px;right: 10px"
316
- }, [`${n.modelValue.length}/${T.value}`])]);
332
+ }, [`${n.modelValue.length}/${h.value}`])]);
317
333
  }
318
334
  });
319
- function Ce(n, t, e) {
320
- var I;
321
- function o() {
322
- e != null && e.resolveComponentContext && e.resolveComponentContext();
323
- }
324
- o();
325
- const r = e && e.getStyles && e.getStyles() || "", i = e && e.getDesignerClass && e.getDesignerClass() || "", l = k();
326
- function d() {
335
+ function ve(n, t, e) {
336
+ var F;
337
+ const a = e && e.getStyles && e.getStyles() || "", o = e && e.getDesignerClass && e.getDesignerClass() || "", l = B();
338
+ function s() {
327
339
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
328
340
  }
329
- function p() {
341
+ function y() {
330
342
  return !1;
331
343
  }
332
- function a() {
344
+ function f() {
333
345
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
334
346
  }
335
- function u() {
347
+ function i() {
336
348
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
337
349
  }
338
- function s(f) {
339
- if (!f || !f.value)
350
+ function c(g) {
351
+ if (!g || !g.value)
340
352
  return null;
341
- if (f.value.schema && f.value.schema.type === "component")
342
- return f.value;
343
- const b = k(f == null ? void 0 : f.value.parent), C = s(b);
344
- return C || null;
353
+ if (g.value.schema && g.value.schema.type === "component")
354
+ return g.value;
355
+ const k = B(g == null ? void 0 : g.value.parent), w = c(k);
356
+ return w || null;
345
357
  }
346
- function m(f = t) {
347
- const { componentInstance: b, designerItemElementRef: C } = f;
348
- return !b || !b.value ? null : b.value.canMove ? C : m(f.parent);
358
+ function r(g = t) {
359
+ const { componentInstance: k, designerItemElementRef: w } = g;
360
+ return !k || !k.value ? null : k.value.canMove ? w : r(g.parent);
349
361
  }
350
- function h(f) {
351
- return !!e && e.canAccepts(f);
362
+ function p(g) {
363
+ return !!e && e.canAccepts(g);
352
364
  }
353
- function y() {
365
+ function m() {
354
366
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
355
367
  }
356
- function T() {
357
- }
358
- function x(f, b) {
359
- b && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(b);
368
+ function d() {
360
369
  }
361
- function V(f, b) {
362
- const { componentType: C } = f;
363
- let M = U(C, f, b);
364
- e && e.onResolveNewComponentSchema && (M = e.onResolveNewComponentSchema(f, M));
365
- const L = C.toLowerCase().replace("-", "_");
366
- return M && !M.id && M.type === C && (M.id = `${L}_${Math.random().toString().slice(2, 6)}`), M;
370
+ function h(g, k) {
371
+ k && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(k);
367
372
  }
368
- function v(f, b) {
369
- const C = String(f.getAttribute("data-controltype")), M = f.getAttribute("data-feature"), L = M ? JSON.parse(M) : {};
370
- L.parentComponentInstance = l.value;
371
- let B = U(C, L);
372
- e && e.onAcceptNewChildElement && (B = e.onAcceptNewChildElement(f, b, B));
373
- const Q = C.toLowerCase().replace("-", "_");
374
- return B && !B.id && B.type === C && (B.id = `${Q}_${Math.random().toString().slice(2, 6)}`), B;
373
+ function M(g, k) {
374
+ const { componentType: w } = g;
375
+ let S = z(w, g, k);
376
+ e && e.onResolveNewComponentSchema && (S = e.onResolveNewComponentSchema(g, S));
377
+ const D = w.toLowerCase().replace(/-/g, "_");
378
+ return S && !S.id && S.type === w && (S.id = `${D}_${Math.random().toString().slice(2, 6)}`), S;
375
379
  }
376
- function P(f) {
380
+ function C(g) {
377
381
  }
378
- function F(...f) {
382
+ function v(...g) {
379
383
  if (e && e.getPropsConfig)
380
- return e.getPropsConfig(...f);
384
+ return e.getPropsConfig(...g);
385
+ }
386
+ function T() {
387
+ e && e.onRemoveComponent && e.onRemoveComponent(), t != null && t.schema.contents && t.schema.contents.map((g) => {
388
+ var S;
389
+ let k = g.id;
390
+ g.type === "component-ref" && (k = g.component);
391
+ const w = n.value.querySelector(`#${k}-design-item`);
392
+ (S = w == null ? void 0 : w.componentInstance) != null && S.value.onRemoveComponent && w.componentInstance.value.onRemoveComponent();
393
+ });
381
394
  }
382
395
  return l.value = {
383
- canMove: d(),
384
- canSelectParent: p(),
385
- canDelete: a(),
386
- canNested: !u(),
396
+ canMove: s(),
397
+ canSelectParent: y(),
398
+ canDelete: f(),
399
+ canNested: !i(),
387
400
  contents: t == null ? void 0 : t.schema.contents,
388
401
  elementRef: n,
389
- parent: (I = t == null ? void 0 : t.parent) == null ? void 0 : I.componentInstance,
402
+ parent: (F = t == null ? void 0 : t.parent) == null ? void 0 : F.componentInstance,
390
403
  schema: t == null ? void 0 : t.schema,
391
- styles: r,
392
- designerClass: i,
393
- canAccepts: h,
394
- getBelongedComponentInstance: s,
395
- getDraggableDesignItemElement: m,
396
- getDraggingDisplayText: y,
397
- getPropConfig: F,
398
- getDragScopeElement: T,
399
- onAcceptMovedChildElement: x,
400
- onAcceptNewChildElement: v,
401
- onChildElementMovedOut: P,
402
- addNewChildComponentSchema: V,
403
- updateDragAndDropRules: o,
404
- triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || k(!1),
405
- triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
404
+ styles: a,
405
+ designerClass: o,
406
+ canAccepts: p,
407
+ getBelongedComponentInstance: c,
408
+ getDraggableDesignItemElement: r,
409
+ getDraggingDisplayText: m,
410
+ getPropConfig: v,
411
+ getDragScopeElement: d,
412
+ onAcceptMovedChildElement: h,
413
+ onChildElementMovedOut: C,
414
+ addNewChildComponentSchema: M,
415
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || B(!1),
416
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || B(!1),
417
+ onRemoveComponent: T
406
418
  }, l;
407
419
  }
408
- class Me {
420
+ class Ce {
409
421
  constructor(t, e) {
410
- g(this, "componentId");
411
- g(this, "viewModelId");
412
- g(this, "eventsEditorUtils");
413
- g(this, "formSchemaUtils");
414
- g(this, "formMetadataConverter");
415
- g(this, "designViewModelUtils");
416
- g(this, "designViewModelField");
417
- g(this, "controlCreatorUtils");
418
- g(this, "designerHostService");
419
- g(this, "schemaService", null);
420
- g(this, "metadataService", null);
421
- g(this, "propertyConfig", {
422
+ b(this, "componentId");
423
+ b(this, "viewModelId");
424
+ b(this, "eventsEditorUtils");
425
+ b(this, "formSchemaUtils");
426
+ b(this, "formMetadataConverter");
427
+ b(this, "designViewModelUtils");
428
+ b(this, "designViewModelField");
429
+ b(this, "controlCreatorUtils");
430
+ b(this, "designerHostService");
431
+ b(this, "schemaService", null);
432
+ b(this, "metadataService", null);
433
+ b(this, "propertyConfig", {
422
434
  type: "object",
423
435
  categories: {}
424
436
  });
425
- var o;
426
- this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
437
+ var a;
438
+ this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((a = this.formSchemaUtils) == null ? void 0 : a.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
427
439
  }
428
440
  getTableInfo() {
429
441
  var t;
430
442
  return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
431
443
  }
432
444
  setDesignViewModelField(t) {
445
+ var a;
433
446
  const e = t.binding && t.binding.type === "Form" && t.binding.field;
434
447
  if (e) {
435
448
  if (!this.designViewModelField) {
436
449
  const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
437
- this.designViewModelField = o.fields.find((r) => r.id === e);
450
+ this.designViewModelField = o.fields.find((l) => l.id === e);
438
451
  }
439
- t.updateOn = this.designViewModelField.updateOn;
452
+ t.updateOn = (a = this.designViewModelField) == null ? void 0 : a.updateOn;
440
453
  }
441
454
  }
442
455
  changeFieldEditorType(t, e) {
@@ -460,7 +473,7 @@ class Me {
460
473
  type: "combo-list",
461
474
  textField: "name",
462
475
  valueField: "value",
463
- data: [{ value: t.type, name: c[t.type].name }]
476
+ data: [{ value: t.type, name: u[t.type].name }]
464
477
  }
465
478
  }
466
479
  }
@@ -493,19 +506,19 @@ class Me {
493
506
  * @returns
494
507
  */
495
508
  updateElementByParentContainer(t, e) {
496
- const o = e && e.parent && e.parent.schema;
497
- if (!o)
509
+ const a = e && e.parent && e.parent.schema;
510
+ if (!a)
498
511
  return;
499
- const r = o.contents.findIndex((l) => l.id === t), i = z(o.contents[r]);
500
- o.contents.splice(r, 1), o.contents.splice(r, 0, i);
512
+ const o = a.contents.findIndex((s) => s.id === t), l = W(a.contents[o]);
513
+ a.contents.splice(o, 1), a.contents.splice(o, 0, l);
501
514
  }
502
515
  }
503
- const S = class S {
516
+ const P = class P {
504
517
  /**
505
518
  * 根据绑定字段类型获取可用的输入类控件
506
519
  */
507
520
  static getEditorTypesByMDataType(t) {
508
- const e = S.fieldControlTypeMapping[t];
521
+ const e = P.fieldControlTypeMapping[t];
509
522
  return e || [{ key: "", value: "" }];
510
523
  }
511
524
  /**
@@ -513,9 +526,9 @@ const S = class S {
513
526
  */
514
527
  static getAllInputTypes() {
515
528
  const t = [];
516
- for (let e in S.fieldControlTypeMapping)
517
- S.fieldControlTypeMapping[e].forEach((o) => {
518
- t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
529
+ for (const e in P.fieldControlTypeMapping)
530
+ P.fieldControlTypeMapping[e].forEach((a) => {
531
+ t.find((o) => o.key === a.key && o.value === a.value) || t.push({ key: a.key, value: a.value });
519
532
  });
520
533
  return t;
521
534
  }
@@ -523,69 +536,174 @@ const S = class S {
523
536
  /**
524
537
  * <字段类型,可配置的控件类型列表>的映射
525
538
  */
526
- g(S, "fieldControlTypeMapping", {
539
+ b(P, "fieldControlTypeMapping", {
527
540
  String: [
528
- { key: c["input-group"].type, value: c["input-group"].name },
529
- { key: c.lookup.type, value: c.lookup.name },
530
- { key: c["date-picker"].type, value: c["date-picker"].name },
531
- { key: c["check-box"].type, value: c["check-box"].name },
532
- { key: c["radio-group"].type, value: c["radio-group"].name },
533
- { key: c["combo-list"].type, value: c["combo-list"].name },
534
- { key: c.textarea.type, value: c.textarea.name }
541
+ { key: u["input-group"].type, value: u["input-group"].name },
542
+ { key: u.lookup.type, value: u.lookup.name },
543
+ { key: u["date-picker"].type, value: u["date-picker"].name },
544
+ { key: u["check-box"].type, value: u["check-box"].name },
545
+ { key: u["check-group"].type, value: u["check-group"].name },
546
+ { key: u["radio-group"].type, value: u["radio-group"].name },
547
+ { key: u["combo-list"].type, value: u["combo-list"].name },
548
+ { key: u.textarea.type, value: u.textarea.name }
535
549
  ],
536
550
  Text: [
537
- { key: c.textarea.type, value: c.textarea.name },
538
- { key: c.lookup.type, value: c.lookup.name }
551
+ { key: u.textarea.type, value: u.textarea.name },
552
+ { key: u.lookup.type, value: u.lookup.name }
539
553
  ],
540
554
  Decimal: [
541
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
555
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
542
556
  ],
543
557
  Integer: [
544
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
558
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
545
559
  ],
546
560
  Number: [
547
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
561
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
548
562
  ],
549
563
  BigNumber: [
550
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
564
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
551
565
  ],
552
566
  Date: [
553
- { key: c["date-picker"].type, value: c["date-picker"].name }
567
+ { key: u["date-picker"].type, value: u["date-picker"].name }
554
568
  ],
555
569
  DateTime: [
556
- { key: c["date-picker"].type, value: c["date-picker"].name }
570
+ { key: u["date-picker"].type, value: u["date-picker"].name }
557
571
  ],
558
572
  Boolean: [
559
- { key: c.switch.type, value: c.switch.name },
560
- { key: c["check-box"].type, value: c["check-box"].name }
573
+ { key: u.switch.type, value: u.switch.name },
574
+ { key: u["check-box"].type, value: u["check-box"].name }
561
575
  ],
562
576
  Enum: [
563
- { key: c["combo-list"].type, value: c["combo-list"].name },
564
- { key: c["radio-group"].type, value: c["radio-group"].name }
577
+ { key: u["combo-list"].type, value: u["combo-list"].name },
578
+ { key: u["radio-group"].type, value: u["radio-group"].name }
565
579
  ],
566
580
  Object: [
567
- { key: c.lookup.type, value: c.lookup.name },
568
- { key: c["combo-list"].type, value: c["combo-list"].name },
569
- { key: c["radio-group"].type, value: c["radio-group"].name }
581
+ { key: u.lookup.type, value: u.lookup.name },
582
+ { key: u["combo-list"].type, value: u["combo-list"].name },
583
+ { key: u["radio-group"].type, value: u["radio-group"].name }
570
584
  ]
571
585
  });
572
- let D = S;
573
- const ke = k(0);
574
- class we extends Me {
575
- constructor(e, o) {
576
- super(e, o);
577
- g(this, "responseLayoutEditorFunction");
578
- this.responseLayoutEditorFunction = te(this.formSchemaUtils);
579
- }
580
- getPropertyConfig(e, o) {
581
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, o), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
582
- }
583
- getBasicProperties(e, o) {
584
- var d;
585
- var r = this;
586
- this.setDesignViewModelField(e);
587
- const i = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
586
+ let V = P;
587
+ const Me = B(0);
588
+ class ke {
589
+ constructor() {
590
+ /** 控件标题 */
591
+ b(this, "label", "");
592
+ /** 控件id */
593
+ b(this, "id", "");
594
+ /** 每个控件占用的栅格数 */
595
+ b(this, "columnInSM", 12);
596
+ b(this, "columnInMD", 6);
597
+ b(this, "columnInLG", 3);
598
+ b(this, "columnInEL", 2);
599
+ /** 每个控件占用的列数 */
600
+ b(this, "displayWidthInSM", 1);
601
+ b(this, "displayWidthInMD", 1);
602
+ b(this, "displayWidthInLG", 1);
603
+ b(this, "displayWidthInEL", 1);
604
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
605
+ b(this, "displayColumnCountAtBreakPoint", "md");
606
+ /** 控件所在行,传0即可-----编辑器内部使用 */
607
+ b(this, "tagRow", 0);
608
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
609
+ b(this, "showTopBorder", 0);
610
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
611
+ b(this, "group", 1);
612
+ /** 控件是否符合标准的class配置(设计器用的) */
613
+ b(this, "isSupportedClass", !0);
614
+ /** 控件所在分组id(设计器用的) */
615
+ b(this, "fieldSetId", "");
616
+ }
617
+ }
618
+ function we(n) {
619
+ let t, e;
620
+ const a = /* @__PURE__ */ new Map();
621
+ let o = [];
622
+ function l(c, r) {
623
+ const m = c.split(" ").filter((v) => v.startsWith("col-"));
624
+ if (m.length === 0) {
625
+ r.isSupportedClass = !1;
626
+ return;
627
+ }
628
+ let d = m.find((v) => /^col-([1-9]|10|11|12)$/.test(v)), h = m.find((v) => /^col-md-([1-9]|10|11|12)$/.test(v)), M = m.find((v) => /^col-xl-([1-9]|10|11|12)$/.test(v)), C = m.find((v) => /^col-el-([1-9]|10|11|12)$/.test(v));
629
+ d = d || "col-12", r.columnInSM = parseInt(d.replace("col-", ""), 10), r.displayWidthInSM = r.columnInSM / 12, r.displayWidthInSM !== 1 && (r.isSupportedClass = !1), h = h || "col-md-" + r.columnInSM, r.columnInMD = parseInt(h.replace("col-md-", ""), 10), r.displayWidthInMD = r.columnInMD / 6, [1, 2].includes(r.displayWidthInMD) || (r.isSupportedClass = !1), M = M || "col-xl-" + r.columnInMD, r.columnInLG = parseInt(M.replace("col-xl-", ""), 10), r.displayWidthInLG = r.columnInLG / 3, [1, 2, 3, 4].includes(r.displayWidthInLG) || (r.isSupportedClass = !1), C = C || "col-el-" + r.columnInLG, r.columnInEL = parseInt(C.replace("col-el-", ""), 10), r.displayWidthInEL = r.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(r.displayWidthInEL) || (r.isSupportedClass = !1);
630
+ }
631
+ function s(c, r, p, m = !1) {
632
+ let d = !1;
633
+ c.contents.forEach((h) => {
634
+ if (h.type === "fieldset") {
635
+ p += 1, s(h, r, p, !0), d = !0;
636
+ return;
637
+ }
638
+ d && (p += 1, d = !1);
639
+ const M = h.appearance && h.appearance.class, C = new ke();
640
+ M ? l(M, C) : C.isSupportedClass = !1, C.label = h.label || h.id, C.id = h.id, C.group = p, m && (C.fieldSetId = c.id), e === h.id && (t = p), a.set(h.id, h), r.push(C);
641
+ });
642
+ }
643
+ function y(c) {
644
+ const r = n.getComponentById(c);
645
+ if (!r || !r.componentType || !r.componentType.startsWith("form"))
646
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
647
+ const p = n.selectNode(r, (m) => m.type === G["response-form"].type);
648
+ return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
649
+ }
650
+ function f(c, r) {
651
+ r = r || c.id;
652
+ const { result: p, message: m, formNode: d } = y(r);
653
+ if (!p)
654
+ return { result: p, message: m };
655
+ e = c.id, o = [], a.clear();
656
+ const h = d.contents[0].type === G.fieldset.type ? 0 : 1;
657
+ s(d, o, h);
658
+ const M = o.find((v) => !v.isSupportedClass);
588
659
  return {
660
+ defaultState: {
661
+ defaultGroupNumber: t || 1,
662
+ model: M ? "customize" : "standard"
663
+ },
664
+ importData: o
665
+ };
666
+ }
667
+ function i(c, r) {
668
+ r = r;
669
+ const { result: p, formNode: m } = y(r);
670
+ if (!p)
671
+ return "";
672
+ const d = [];
673
+ return c.forEach((h) => {
674
+ var v;
675
+ const M = a.get(h.id), C = M.appearance && M.appearance.class;
676
+ if (C) {
677
+ const F = C.split(" ").filter((Q) => !Q.startsWith("col-")), g = "col-" + h.columnInSM, k = "col-md-" + h.columnInMD, w = "col-xl-" + h.columnInLG, S = "col-el-" + h.columnInEL, D = [g, k, w, S].concat(F);
678
+ M.appearance.class = D.join(" ");
679
+ }
680
+ if (h.fieldSetId) {
681
+ const T = m.contents.find((g) => g.id === h.fieldSetId), F = d.find((g) => g.id === h.fieldSetId);
682
+ F ? (v = F.contents) == null || v.push(M) : (d.push(T), T.contents = [M]);
683
+ } else
684
+ d.push(M);
685
+ }), m.contents = d, m.id;
686
+ }
687
+ return {
688
+ checkCanFindFormNode: y,
689
+ checkCanOpenLayoutEditor: f,
690
+ changeFormControlsByResponseLayoutConfig: i,
691
+ getResonseFormLayoutConfig: s
692
+ };
693
+ }
694
+ class Se extends Ce {
695
+ constructor(e, a) {
696
+ super(e, a);
697
+ b(this, "responseLayoutEditorFunction");
698
+ this.responseLayoutEditorFunction = we(this.formSchemaUtils);
699
+ }
700
+ getPropertyConfig(e, a) {
701
+ return this.propertyConfig.categories.basic = this.getBasicProperties(e, a), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, a), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
702
+ }
703
+ getBasicProperties(e, a) {
704
+ var l;
705
+ const o = this;
706
+ return this.setDesignViewModelField(e), this.formSchemaUtils.getFormMetadataBasicInfo(), {
589
707
  description: "Basic Information",
590
708
  title: "基本信息",
591
709
  properties: {
@@ -606,7 +724,7 @@ class we extends Me {
606
724
  textField: "value",
607
725
  valueField: "key",
608
726
  editable: !1,
609
- data: r.designViewModelField ? D.getEditorTypesByMDataType((d = r.designViewModelField.type) == null ? void 0 : d.name) : D.getAllInputTypes()
727
+ data: o.designViewModelField ? V.getEditorTypesByMDataType((l = o.designViewModelField.type) == null ? void 0 : l.name) : V.getAllInputTypes()
610
728
  }
611
729
  },
612
730
  label: {
@@ -617,41 +735,37 @@ class we extends Me {
617
735
  binding: {
618
736
  description: "绑定的表单字段",
619
737
  title: "绑定",
620
- $converter: "/converter/field-selector.converter",
621
738
  editor: {
622
- type: "field-selector",
739
+ type: "binding-selector",
623
740
  bindingType: { enable: !1 },
624
741
  editorParams: {
625
- propertyData: e,
626
- formBasicInfo: i
742
+ componentSchema: e,
743
+ needSyncToViewModel: !0,
744
+ viewModelId: this.viewModelId,
745
+ designerHostService: this.designerHostService,
746
+ disableOccupiedFields: !0
627
747
  },
628
- columns: [
629
- { field: "name", title: "字段名称" },
630
- { field: "bindingField", title: "绑定字段" },
631
- { field: "fieldType", title: "字段类型" }
632
- ],
633
- textField: "bindingField",
634
- data: l
748
+ textField: "bindingField"
635
749
  }
636
750
  }
637
751
  },
638
- setPropertyRelates(p, a) {
639
- if (p)
640
- switch (p && p.propertyID) {
752
+ setPropertyRelates(s, y) {
753
+ if (s)
754
+ switch (s && s.propertyID) {
641
755
  case "type": {
642
- r.changeControlType(e, p, o);
756
+ o.changeControlType(e, s, a);
643
757
  break;
644
758
  }
645
759
  case "label": {
646
- p.needRefreshControlTree = !0;
760
+ s.needRefreshControlTree = !0;
647
761
  break;
648
762
  }
649
763
  }
650
764
  }
651
765
  };
652
766
  }
653
- getAppearanceProperties(e, o) {
654
- var r = this;
767
+ getAppearanceProperties(e, a) {
768
+ const o = this;
655
769
  return {
656
770
  title: "样式",
657
771
  description: "Appearance",
@@ -677,18 +791,18 @@ class we extends Me {
677
791
  refreshPanelAfterChanged: !0,
678
792
  editor: {
679
793
  type: "response-layout-editor-setting",
680
- initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
794
+ initialState: o.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, o.componentId)
681
795
  }
682
796
  }
683
797
  },
684
- setPropertyRelates(i, l) {
685
- if (i)
686
- switch (i && i.propertyID) {
798
+ setPropertyRelates(l, s) {
799
+ if (l)
800
+ switch (l && l.propertyID) {
687
801
  case "responseLayout":
688
- r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(i.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, o), delete e.responseLayout;
802
+ o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, o.componentId || e.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(e.id, a), delete e.responseLayout;
689
803
  break;
690
804
  case "class":
691
- r.updateUnifiedLayoutAfterControlChanged(i.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, o);
805
+ o.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), o.updateElementByParentContainer(e.id, a);
692
806
  break;
693
807
  }
694
808
  }
@@ -702,44 +816,44 @@ class we extends Me {
702
816
  * @param propertyData 控件DOM属性
703
817
  * @param newControlType 新控件类型
704
818
  */
705
- changeControlType(e, o, r) {
706
- var u, s, m, h;
707
- const i = o.propertyValue, l = r && r.parent && r.parent.schema;
708
- if (!l)
819
+ changeControlType(e, a, o) {
820
+ var c, r, p, m;
821
+ const l = a.propertyValue, s = o && o.parent && o.parent.schema;
822
+ if (!s)
709
823
  return;
710
- const d = l.contents.findIndex((y) => y.id === e.id), p = l.contents[d];
711
- let a;
824
+ const y = s.contents.findIndex((d) => d.id === e.id), f = s.contents[y];
825
+ let i;
712
826
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
713
827
  editor: {
714
- $type: i
828
+ $type: l
715
829
  },
716
830
  name: this.designViewModelField.name,
717
831
  require: this.designViewModelField.require,
718
832
  readonly: this.designViewModelField.readonly
719
- }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, i)), a || (a = j("form-group") || {}, a.editor = j(i) || {}, delete a.editor.id, delete a.editor.binding, delete a.editor.appearance), Object.assign(a, {
720
- id: p.id,
721
- appearance: p.appearance,
722
- size: p.size,
723
- label: p.label,
724
- binding: p.binding,
725
- visible: p.visible
726
- }), Object.assign(a.editor, {
727
- isTextArea: a.isTextArea && p.isTextArea,
728
- placeholder: (u = p.editor) == null ? void 0 : u.placeholder,
729
- holdPlace: (s = p.editor) == null ? void 0 : s.holdPlace,
730
- readonly: (m = p.editor) == null ? void 0 : m.readonly,
731
- require: (h = p.editor) == null ? void 0 : h.require
732
- }), l.contents.splice(d, 1), l.contents.splice(d, 0, a), r.schema = Object.assign(p, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
733
- (y) => y.classList.remove("dgComponentSelected")
734
- ), ke.value++;
735
- }
736
- getComponentConfig(e, o = {}, r = {}) {
737
- const i = Object.assign({
833
+ }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), i || (i = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(i, {
834
+ id: f.id,
835
+ appearance: f.appearance,
836
+ size: f.size,
837
+ label: f.label,
838
+ binding: f.binding,
839
+ visible: f.visible
840
+ }), Object.assign(i.editor, {
841
+ isTextArea: i.isTextArea && f.isTextArea,
842
+ placeholder: (c = f.editor) == null ? void 0 : c.placeholder,
843
+ holdPlace: (r = f.editor) == null ? void 0 : r.holdPlace,
844
+ readonly: (p = f.editor) == null ? void 0 : p.readonly,
845
+ require: (m = f.editor) == null ? void 0 : m.require
846
+ }), s.contents.splice(y, 1), s.contents.splice(y, 0, i), o.schema = Object.assign(f, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
847
+ (d) => d.classList.remove("dgComponentSelected")
848
+ ), Me.value++;
849
+ }
850
+ getComponentConfig(e, a = {}, o = {}) {
851
+ const l = Object.assign({
738
852
  description: "编辑器",
739
853
  title: "编辑器",
740
854
  type: "input-group",
741
855
  $converter: "/converter/property-editor.converter"
742
- }, o), l = Object.assign({
856
+ }, a), s = Object.assign({
743
857
  readonly: {
744
858
  description: "",
745
859
  title: "只读",
@@ -760,8 +874,8 @@ class we extends Me {
760
874
  title: "提示文本",
761
875
  type: "string"
762
876
  }
763
- }, r);
764
- return { ...i, properties: { ...l } };
877
+ }, o);
878
+ return { ...l, properties: { ...s } };
765
879
  }
766
880
  /**
767
881
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -769,164 +883,120 @@ class we extends Me {
769
883
  * @param controlId 控件Id
770
884
  * @param componentId 控件所在组件id
771
885
  */
772
- updateUnifiedLayoutAfterControlChanged(e, o, r) {
773
- const i = e.split(" ");
774
- let l = i.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), d = i.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), p = i.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), a = i.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
775
- l = l || "col-12", d = d || "col-md-" + l.replace("col-", ""), p = p || "col-xl-" + d.replace("col-md-", ""), a = a || "col-el-" + p.replace("col-xl-", "");
776
- const u = {
777
- id: o,
778
- columnInSM: parseInt(l.replace("col-", ""), 10),
779
- columnInMD: parseInt(d.replace("col-md-", ""), 10),
780
- columnInLG: parseInt(p.replace("col-xl-", ""), 10),
781
- columnInEL: parseInt(a.replace("col-el-", ""), 10)
886
+ updateUnifiedLayoutAfterControlChanged(e, a, o) {
887
+ const l = e.split(" ");
888
+ let s = l.find((r) => /^col-([1-9]|10|11|12)$/.test(r)), y = l.find((r) => /^col-md-([1-9]|10|11|12)$/.test(r)), f = l.find((r) => /^col-xl-([1-9]|10|11|12)$/.test(r)), i = l.find((r) => /^col-el-([1-9]|10|11|12)$/.test(r));
889
+ s = s || "col-12", y = y || "col-md-" + s.replace("col-", ""), f = f || "col-xl-" + y.replace("col-md-", ""), i = i || "col-el-" + f.replace("col-xl-", "");
890
+ const c = {
891
+ id: a,
892
+ columnInSM: parseInt(s.replace("col-", ""), 10),
893
+ columnInMD: parseInt(y.replace("col-md-", ""), 10),
894
+ columnInLG: parseInt(f.replace("col-xl-", ""), 10),
895
+ columnInEL: parseInt(i.replace("col-el-", ""), 10)
782
896
  };
783
- this.updateUnifiedLayoutAfterResponseLayoutChanged(r, u);
897
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(o, c);
784
898
  }
785
899
  /**
786
900
  * 修改控件布局配置后更新Form统一布局配置
787
901
  * @param componentId 组件Id
788
902
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
789
903
  */
790
- updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
791
- const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
792
- if (!r || !r.unifiedLayout)
904
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, a) {
905
+ const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
906
+ if (!o || !o.unifiedLayout)
793
907
  return;
794
- const i = [];
795
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, i, 1), o) {
796
- const y = i.find((T) => T.id === o.id);
797
- Object.assign(y || {}, o);
908
+ const l = [];
909
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, l, 1), a) {
910
+ const d = l.find((h) => h.id === a.id);
911
+ Object.assign(d || {}, a);
798
912
  }
799
- const l = i.map((y) => y.columnInSM), d = i.map((y) => y.columnInMD), p = i.map((y) => y.columnInLG), a = i.map((y) => y.columnInEL), u = this.checkIsUniqueColumn(l) ? l[0] : null, s = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(p) ? p[0] : null, h = this.checkIsUniqueColumn(a) ? a[0] : null;
800
- Object.assign(r.unifiedLayout, {
801
- uniqueColClassInSM: u,
802
- uniqueColClassInMD: s,
803
- uniqueColClassInLG: m,
804
- uniqueColClassInEL: h
913
+ const s = l.map((d) => d.columnInSM), y = l.map((d) => d.columnInMD), f = l.map((d) => d.columnInLG), i = l.map((d) => d.columnInEL), c = this.checkIsUniqueColumn(s) ? s[0] : null, r = this.checkIsUniqueColumn(y) ? y[0] : null, p = this.checkIsUniqueColumn(f) ? f[0] : null, m = this.checkIsUniqueColumn(i) ? i[0] : null;
914
+ Object.assign(o.unifiedLayout, {
915
+ uniqueColClassInSM: c,
916
+ uniqueColClassInMD: r,
917
+ uniqueColClassInLG: p,
918
+ uniqueColClassInEL: m
805
919
  });
806
920
  }
807
921
  /**
808
922
  * 校验宽度样式值是否一致
809
923
  */
810
924
  checkIsUniqueColumn(e) {
811
- const o = new Set(e);
812
- return Array.from(o).length === 1;
925
+ const a = new Set(e);
926
+ return Array.from(a).length === 1;
813
927
  }
814
928
  }
815
- class Te extends we {
929
+ class Te extends Se {
816
930
  constructor(t, e) {
817
931
  super(t, e);
818
932
  }
819
- }
820
- function Be(n, t) {
821
- n.schema;
822
- const e = k(!0), o = k(!0);
823
- function r(s) {
824
- return !1;
825
- }
826
- function i() {
827
- return !1;
828
- }
829
- function l() {
830
- return !1;
831
- }
832
- function d() {
833
- return !0;
834
- }
835
- function p(s) {
836
- }
837
- function a() {
838
- }
839
- function u(s) {
840
- return null;
933
+ getEditorProperties(t) {
934
+ return this.getComponentConfig(t, { type: "textarea" }, {
935
+ rows: {
936
+ description: "",
937
+ title: "文本区域可见的行数",
938
+ type: "number"
939
+ },
940
+ showCount: {
941
+ description: "",
942
+ title: "展示输入文本数量",
943
+ type: "boolean"
944
+ }
945
+ });
841
946
  }
842
- return {
843
- canAccepts: r,
844
- checkCanDeleteComponent: i,
845
- checkCanMoveComponent: l,
846
- hideNestedPaddingInDesginerView: d,
847
- onAcceptMovedChildElement: p,
848
- resolveComponentContext: a,
849
- triggerBelongedComponentToMoveWhenMoved: e,
850
- triggerBelongedComponentToDeleteWhenDeleted: o,
851
- getPropsConfig: u
852
- };
853
947
  }
854
- function Ve(n, t) {
855
- const {
856
- canAccepts: e,
857
- checkCanDeleteComponent: o,
858
- checkCanMoveComponent: r,
859
- hideNestedPaddingInDesginerView: i,
860
- onAcceptMovedChildElement: l,
861
- resolveComponentContext: d,
862
- triggerBelongedComponentToMoveWhenMoved: p,
863
- triggerBelongedComponentToDeleteWhenDeleted: a
864
- } = Be(n), u = n.schema;
865
- function s(m, h) {
866
- return new Te(m, t).getPropertyConfig(u, h);
948
+ function Fe(n, t) {
949
+ const e = n.schema;
950
+ function a(o, l) {
951
+ return new Te(o, t).getPropertyConfig(e, l);
867
952
  }
868
- return {
869
- canAccepts: e,
870
- checkCanDeleteComponent: o,
871
- checkCanMoveComponent: r,
872
- hideNestedPaddingInDesginerView: i,
873
- onAcceptMovedChildElement: l,
874
- resolveComponentContext: d,
875
- triggerBelongedComponentToMoveWhenMoved: p,
876
- triggerBelongedComponentToDeleteWhenDeleted: a,
877
- getPropsConfig: s
878
- };
953
+ return { getPropsConfig: a };
879
954
  }
880
- const Pe = /* @__PURE__ */ G({
955
+ const Ee = /* @__PURE__ */ x({
881
956
  name: "FTextareaDesign",
882
- props: $,
957
+ props: N,
883
958
  emits: [""],
884
959
  setup(n, t) {
885
- const e = k(), o = O("designer-host-service"), r = O("design-item-context"), i = Ve(r, o), l = Ce(e, r, i), d = E(() => n.maxLength ? n.maxLength : n.modelValue.length), p = E(() => ({
960
+ const e = B(), a = U("designer-host-service"), o = U("design-item-context"), l = Fe(o, a), s = ve(e, o, l), y = I(() => n.maxLength ? n.maxLength : n.modelValue.length), f = I(() => ({
886
961
  position: "relative"
887
- })), a = E(() => ({
962
+ })), i = I(() => ({
888
963
  "box-shadow": "0 0 0 1px #dcdfe6 inset",
889
964
  border: "none",
890
965
  padding: "5px 10px",
891
966
  width: "100%"
892
- })), u = {
967
+ })), c = {
893
968
  position: "absolute",
894
969
  bottom: "5px",
895
970
  right: "10px"
896
971
  };
897
- return W(() => {
898
- e.value.componentInstance = l;
899
- }), t.expose(l.value), () => w("div", {
900
- style: p.value,
972
+ return q(() => {
973
+ e.value.componentInstance = s;
974
+ }), t.expose(s.value), () => E("div", {
975
+ style: f.value,
901
976
  ref: e
902
- }, [w("textarea", {
977
+ }, [E("textarea", {
903
978
  id: n.id,
904
979
  tabindex: n.tabIndex,
905
980
  disabled: !1,
906
981
  readonly: !0,
907
- style: a.value,
982
+ style: i.value,
908
983
  placeholder: n.placeholder,
909
984
  rows: n.rows
910
- }, null), n.showCount && w("span", {
911
- style: u
912
- }, [`${n.modelValue.length}/${d.value}`])]);
913
- }
914
- }), Se = (n) => {
915
- const t = n;
916
- return t.install = function(e) {
917
- e.component(t.name, n);
918
- }, n;
919
- };
920
- A.register = (n, t, e, o) => {
921
- n.textarea = A, t.textarea = _;
985
+ }, null), n.showCount && E("span", {
986
+ style: c
987
+ }, [`${n.modelValue.length}/${y.value}`])]);
988
+ }
989
+ });
990
+ L.register = (n, t, e, a) => {
991
+ n.textarea = L, t.textarea = X;
922
992
  };
923
- A.registerDesigner = (n, t, e) => {
924
- n.textarea = Pe, t.textarea = _;
993
+ L.registerDesigner = (n, t, e) => {
994
+ n.textarea = Ee, t.textarea = X;
925
995
  };
926
- const Ue = Se(A);
996
+ const De = R(L);
927
997
  export {
928
- A as FTextarea,
929
- Ue as default,
930
- _ as propsResolver,
931
- $ as textAreaProps
998
+ L as FTextarea,
999
+ De as default,
1000
+ X as propsResolver,
1001
+ N as textAreaProps
932
1002
  };