@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,102 +1,106 @@
1
- var _ = Object.defineProperty;
2
- var H = (a, t, e) => t in a ? _(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
- var g = (a, t, e) => H(a, typeof t != "symbol" ? t + "" : t, e);
4
- import { defineComponent as W, toRefs as z, ref as w, computed as E, watch as j, createVNode as k, inject as q, onMounted as R } from "vue";
5
- import { isPlainObject as I, cloneDeep as x } from "lodash-es";
6
- import { getSchemaByType as G } from "../dynamic-resolver/index.esm.js";
7
- import { useResponseLayoutEditorSetting as K } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
8
- const J = {}, X = {};
9
- function U(a) {
10
- const { properties: t, title: e, ignore: o } = a, n = o && Array.isArray(o), i = Object.keys(t).reduce((c, d) => ((!n || !o.find((u) => u == d)) && (c[d] = t[d].type === "object" && t[d].properties ? U(t[d]) : x(t[d].default)), c), {});
11
- return (!n || !o.find((c) => c == "id")) && (i.id = `${e}-${Date.now()}`), i;
1
+ var Y = Object.defineProperty;
2
+ var Z = (s, t, e) => t in s ? Y(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var v = (s, t, e) => Z(s, typeof t != "symbol" ? t + "" : t, e);
4
+ import { defineComponent as q, toRefs as O, ref as P, computed as B, watch as U, createVNode as F, inject as $, onMounted as _ } from "vue";
5
+ import { isPlainObject as G, cloneDeep as j } from "lodash-es";
6
+ import { DgControl as W } from "../designer-canvas/index.esm.js";
7
+ import { withInstall as K } from "../common/index.esm.js";
8
+ const z = {}, X = {};
9
+ function A(s) {
10
+ const { properties: t, title: e, ignore: i } = s, n = i && Array.isArray(i), r = Object.keys(t).reduce((l, f) => ((!n || !i.find((y) => y === f)) && (l[f] = t[f].type === "object" && t[f].properties ? A(t[f]) : j(t[f].default)), l), {});
11
+ if (e && (!n || !i.find((l) => l === "id"))) {
12
+ const l = e.toLowerCase().replace(/-/g, "_");
13
+ r.id = `${l}_${Math.random().toString().slice(2, 6)}`;
14
+ }
15
+ return r;
12
16
  }
13
- function L(a, t = {}, e) {
14
- const o = J[a];
15
- if (o) {
16
- let n = U(o);
17
- const i = X[a];
18
- return n = i ? i({ getSchemaByType: L }, n, t, e) : n, n;
17
+ function Q(s, t = {}, e) {
18
+ const i = z[s];
19
+ if (i) {
20
+ let n = A(i);
21
+ const r = X[s];
22
+ return n = r ? r({ getSchemaByType: Q }, n, t, e) : n, n;
19
23
  }
20
24
  return null;
21
25
  }
22
- function ee(a, t) {
23
- const e = U(t);
24
- return Object.keys(a).reduce((o, n) => (o[n] && I(o[n]) && I(a[n]) ? Object.assign(o[n], a[n]) : o[n] = a[n], o), e), e;
26
+ function R(s, t) {
27
+ const e = A(t);
28
+ return Object.keys(e).reduce((i, n) => (i[n] && G(i[n]) && G(s[n] || !s[n]) ? Object.assign(i[n], s[n] || {}) : i[n] = s[n], i), e), e;
25
29
  }
26
- function te(a, t) {
27
- return Object.keys(a).filter((o) => a[o] != null).reduce((o, n) => {
30
+ function x(s, t) {
31
+ return Object.keys(s).filter((i) => s[i] != null).reduce((i, n) => {
28
32
  if (t.has(n)) {
29
- const i = t.get(n);
30
- if (typeof i == "string")
31
- o[i] = a[n];
33
+ const r = t.get(n);
34
+ if (typeof r == "string")
35
+ i[r] = s[n];
32
36
  else {
33
- const c = i(n, a[n], a);
34
- Object.assign(o, c);
37
+ const l = r(n, s[n], s);
38
+ Object.assign(i, l);
35
39
  }
36
40
  } else
37
- o[n] = a[n];
38
- return o;
41
+ i[n] = s[n];
42
+ return i;
39
43
  }, {});
40
44
  }
41
- function ne(a, t, e = /* @__PURE__ */ new Map()) {
42
- const o = ee(a, t);
43
- return te(o, e);
45
+ function ee(s, t, e = /* @__PURE__ */ new Map()) {
46
+ const i = R(s, t);
47
+ return x(i, e);
44
48
  }
45
- function oe(a = {}) {
46
- function t(r, s, l, m) {
47
- if (typeof l == "number")
48
- return m[r].length === l;
49
- if (typeof l == "object") {
50
- const h = Object.keys(l)[0], f = l[h];
51
- if (h === "not")
52
- return Number(m[r].length) !== Number(f);
53
- if (h === "moreThan")
54
- return Number(m[r].length) >= Number(f);
55
- if (h === "lessThan")
56
- return Number(m[r].length) <= Number(f);
49
+ function te(s = {}) {
50
+ function t(a, c, o, p) {
51
+ if (typeof o == "number")
52
+ return p[a].length === o;
53
+ if (typeof o == "object") {
54
+ const m = Object.keys(o)[0], d = o[m];
55
+ if (m === "not")
56
+ return Number(p[a].length) !== Number(d);
57
+ if (m === "moreThan")
58
+ return Number(p[a].length) >= Number(d);
59
+ if (m === "lessThan")
60
+ return Number(p[a].length) <= Number(d);
57
61
  }
58
62
  return !1;
59
63
  }
60
- function e(r, s, l, m) {
61
- return m[r] && m[r].propertyValue && String(m[r].propertyValue.value) === String(l);
64
+ function e(a, c, o, p) {
65
+ return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(o);
62
66
  }
63
- const o = /* @__PURE__ */ new Map([
67
+ const i = /* @__PURE__ */ new Map([
64
68
  ["length", t],
65
69
  ["getProperty", e]
66
70
  ]);
67
- Object.keys(a).reduce((r, s) => (r.set(s, a[s]), r), o);
68
- function n(r, s) {
69
- const l = r;
70
- return typeof s == "number" ? [{ target: l, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: l, operator: "getProperty", param: r, value: !!s }] : typeof s == "object" ? Object.keys(s).map((m) => {
71
- if (m === "length")
72
- return { target: l, operator: "length", param: null, value: s[m] };
73
- const h = m, f = s[m];
74
- return { target: l, operator: "getProperty", param: h, value: f };
71
+ Object.keys(s).reduce((a, c) => (a.set(c, s[c]), a), i);
72
+ function n(a, c) {
73
+ const o = a;
74
+ return typeof c == "number" ? [{ target: o, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: o, operator: "getProperty", param: a, value: !!c }] : typeof c == "object" ? Object.keys(c).map((p) => {
75
+ if (p === "length")
76
+ return { target: o, operator: "length", param: null, value: c[p] };
77
+ const m = p, d = c[p];
78
+ return { target: o, operator: "getProperty", param: m, value: d };
75
79
  }) : [];
76
80
  }
77
- function i(r) {
78
- return Object.keys(r).reduce((l, m) => {
79
- const h = n(m, r[m]);
80
- return l.push(...h), l;
81
+ function r(a) {
82
+ return Object.keys(a).reduce((o, p) => {
83
+ const m = n(p, a[p]);
84
+ return o.push(...m), o;
81
85
  }, []);
82
86
  }
83
- function c(r, s) {
84
- if (o.has(r.operator)) {
85
- const l = o.get(r.operator);
86
- return l && l(r.target, r.param, r.value, s) || !1;
87
+ function l(a, c) {
88
+ if (i.has(a.operator)) {
89
+ const o = i.get(a.operator);
90
+ return o && o(a.target, a.param, a.value, c) || !1;
87
91
  }
88
92
  return !1;
89
93
  }
90
- function d(r, s) {
91
- return i(r).reduce((h, f) => h && c(f, s), !0);
94
+ function f(a, c) {
95
+ return r(a).reduce((m, d) => m && l(d, c), !0);
92
96
  }
93
- function u(r, s) {
94
- const l = Object.keys(r), m = l.includes("allOf"), h = l.includes("anyOf"), f = m || h, S = (f ? r[f ? m ? "allOf" : "anyOf" : "allOf"] : [r]).map((D) => d(D, s));
95
- return m ? !S.includes(!1) : S.includes(!0);
97
+ function y(a, c) {
98
+ const o = Object.keys(a), p = o.includes("allOf"), m = o.includes("anyOf"), d = p || m, b = (d ? a[d ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((E) => f(E, c));
99
+ return p ? !b.includes(!1) : b.includes(!0);
96
100
  }
97
- return { parseValueSchema: u };
101
+ return { parseValueSchema: y };
98
102
  }
99
- const p = {
103
+ const u = {
100
104
  button: { type: "button", name: "按钮", icon: "Button" },
101
105
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
102
106
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -134,21 +138,22 @@ const p = {
134
138
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
135
139
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
136
140
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
137
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
138
- }, re = {}, ie = {};
139
- oe();
140
- function ae(a, t, e = /* @__PURE__ */ new Map(), o = (c, d, u) => d, n = {}, i = (c) => c) {
141
- return J[t.title] = t, X[t.title] = o, re[t.title] = n, ie[t.title] = i, (c = {}) => {
142
- const d = ne(c, t, e), u = Object.keys(a).reduce((r, s) => (r[s] = a[s].default, r), {});
143
- return Object.assign(u, d);
141
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
142
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
143
+ }, ne = {}, oe = {};
144
+ te();
145
+ function ie(s, t, e = /* @__PURE__ */ new Map(), i = (l, f, y, a) => f, n = {}, r = (l) => l) {
146
+ return z[t.title] = t, X[t.title] = i, ne[t.title] = n, oe[t.title] = r, (l = {}) => {
147
+ const f = ee(l, t, e), y = Object.keys(s).reduce((a, c) => (a[c] = s[c].default, a), {});
148
+ return Object.assign(y, f);
144
149
  };
145
150
  }
146
- function se(a, t) {
151
+ function re(s, t) {
147
152
  return { customClass: t.class, customStyle: t.style };
148
153
  }
149
- const le = /* @__PURE__ */ new Map([
150
- ["appearance", se]
151
- ]), ce = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/switch.schema.json", ue = "switch", de = "A Farris Component", me = "object", fe = {
154
+ const ae = /* @__PURE__ */ new Map([
155
+ ["appearance", re]
156
+ ]), se = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-design.gitee.io/switch.schema.json", ce = "switch", pe = "A Farris Component", ue = "object", de = {
152
157
  id: {
153
158
  description: "The unique identifier for a switch",
154
159
  type: "string"
@@ -218,33 +223,37 @@ const le = /* @__PURE__ */ new Map([
218
223
  size: {
219
224
  description: "",
220
225
  type: "enum",
221
- default: "middle"
226
+ default: "medium"
222
227
  }
223
- }, ye = [
228
+ }, me = [
224
229
  "id",
225
230
  "type"
226
- ], he = [
231
+ ], fe = [
227
232
  "id",
228
233
  "appearance",
229
234
  "binding"
230
- ], ge = {
231
- $schema: ce,
232
- $id: pe,
233
- title: ue,
234
- description: de,
235
- type: me,
236
- properties: fe,
237
- required: ye,
238
- ignore: he
235
+ ], ye = {
236
+ $schema: se,
237
+ $id: le,
238
+ title: ce,
239
+ description: pe,
240
+ type: ue,
241
+ properties: de,
242
+ required: me,
243
+ ignore: fe
239
244
  };
240
- function ve(a, t, e) {
245
+ function he(s, t, e) {
241
246
  return t;
242
247
  }
243
248
  const N = {
244
249
  /** 组件值*/
245
250
  modelValue: { type: Boolean, default: !1 },
246
251
  /** 禁用 */
247
- disabled: { type: Boolean },
252
+ disabled: { type: Boolean, default: !1 },
253
+ /**
254
+ * 同disabled
255
+ */
256
+ readonly: { type: Boolean, default: !1 },
248
257
  onBackground: { type: String },
249
258
  offBackground: { type: String },
250
259
  onColor: { type: String },
@@ -256,184 +265,182 @@ const N = {
256
265
  /** 开关值变化事件 */
257
266
  onModelValueChanged: { type: Function, default: () => {
258
267
  } }
259
- }, Q = ae(N, ge, le, ve), V = /* @__PURE__ */ W({
268
+ }, H = ie(N, ye, ae, he), V = /* @__PURE__ */ q({
260
269
  name: "FSwitch",
261
270
  props: N,
262
271
  emits: ["update:modelValue", "modelValueChanged"],
263
- setup(a, t) {
272
+ setup(s, t) {
264
273
  const {
265
274
  disabled: e,
266
- size: o,
275
+ size: i,
267
276
  onLabel: n,
268
- offLabel: i,
269
- onBackground: c,
270
- offBackground: d,
271
- onColor: u,
272
- offColor: r
273
- } = z(a), s = w(a.modelValue), l = E(() => ({
277
+ offLabel: r,
278
+ onBackground: l,
279
+ offBackground: f,
280
+ onColor: y,
281
+ offColor: a,
282
+ readonly: c
283
+ } = O(s), o = P(s.modelValue), p = B(() => ({
274
284
  switch: !0,
275
285
  "f-cmp-switch": !0,
276
- checked: s.value,
277
- disabled: e.value,
278
- "switch-large": o.value === "large",
279
- "switch-medium": o.value === "medium",
280
- "switch-small": o.value === "small"
281
- })), m = E(() => s.value ? {
286
+ checked: o.value,
287
+ disabled: c.value || e.value,
288
+ "switch-large": i.value === "large",
289
+ "switch-medium": i.value === "medium",
290
+ "switch-small": i.value === "small"
291
+ })), m = B(() => o.value ? {
282
292
  outline: "none",
283
- background: c.value
293
+ background: l.value
284
294
  } : {
285
295
  outline: "none",
286
- backgroundColor: d.value
287
- }), h = E(() => s.value ? {
288
- background: u.value
296
+ backgroundColor: f.value
297
+ }), d = B(() => o.value ? {
298
+ background: y.value
289
299
  } : {
290
- backgroundColor: r.value
291
- }), f = E(() => (n == null ? void 0 : n.value) || (i == null ? void 0 : i.value));
292
- function T() {
293
- e.value || (s.value = !s.value, t.emit("update:modelValue", s.value));
300
+ backgroundColor: a.value
301
+ }), h = B(() => (n == null ? void 0 : n.value) || (r == null ? void 0 : r.value));
302
+ function k() {
303
+ c.value || e.value || (o.value = !o.value, t.emit("update:modelValue", o.value));
294
304
  }
295
- return j(s, (M, S) => {
296
- M !== S && t.emit("modelValueChanged", M);
297
- }), j(() => a.modelValue, (M, S) => {
298
- M !== S && (s.value = M);
299
- }), () => k("span", {
305
+ return U(o, (b, C) => {
306
+ b !== C && t.emit("modelValueChanged", b);
307
+ }), U(() => s.modelValue, (b, C) => {
308
+ b !== C && (o.value = b);
309
+ }), () => F("span", {
300
310
  tabindex: "0",
301
311
  role: "button",
302
- class: l.value,
312
+ class: p.value,
303
313
  style: m.value,
304
- onClick: T
305
- }, [f.value && k("span", {
314
+ onClick: k
315
+ }, [h.value && F("span", {
306
316
  class: "switch-pane"
307
- }, [k("span", {
317
+ }, [F("span", {
308
318
  class: "switch-label-checked"
309
- }, [n == null ? void 0 : n.value]), k("span", {
319
+ }, [n == null ? void 0 : n.value]), F("span", {
310
320
  class: "switch-label-unchecked"
311
- }, [i == null ? void 0 : i.value])]), k("small", {
312
- style: h.value
321
+ }, [r == null ? void 0 : r.value])]), F("small", {
322
+ style: d.value
313
323
  }, [t.slots.default && t.slots.default()])]);
314
324
  }
315
325
  });
316
- function Ce(a, t, e) {
317
- var O;
318
- function o() {
319
- e != null && e.resolveComponentContext && e.resolveComponentContext();
320
- }
321
- o();
322
- const n = e && e.getStyles && e.getStyles() || "", i = e && e.getDesignerClass && e.getDesignerClass() || "", c = w();
323
- function d() {
326
+ function ge(s, t, e) {
327
+ var T;
328
+ const i = e && e.getStyles && e.getStyles() || "", n = e && e.getDesignerClass && e.getDesignerClass() || "", r = P();
329
+ function l() {
324
330
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
325
331
  }
326
- function u() {
332
+ function f() {
327
333
  return !1;
328
334
  }
329
- function r() {
335
+ function y() {
330
336
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
331
337
  }
332
- function s() {
338
+ function a() {
333
339
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
334
340
  }
335
- function l(y) {
336
- if (!y || !y.value)
341
+ function c(g) {
342
+ if (!g || !g.value)
337
343
  return null;
338
- if (y.value.schema && y.value.schema.type === "component")
339
- return y.value;
340
- const v = w(y == null ? void 0 : y.value.parent), C = l(v);
341
- return C || null;
344
+ if (g.value.schema && g.value.schema.type === "component")
345
+ return g.value;
346
+ const w = P(g == null ? void 0 : g.value.parent), M = c(w);
347
+ return M || null;
342
348
  }
343
- function m(y = t) {
344
- const { componentInstance: v, designerItemElementRef: C } = y;
345
- return !v || !v.value ? null : v.value.canMove ? C : m(y.parent);
349
+ function o(g = t) {
350
+ const { componentInstance: w, designerItemElementRef: M } = g;
351
+ return !w || !w.value ? null : w.value.canMove ? M : o(g.parent);
346
352
  }
347
- function h(y) {
348
- return !!e && e.canAccepts(y);
353
+ function p(g) {
354
+ return !!e && e.canAccepts(g);
349
355
  }
350
- function f() {
356
+ function m() {
351
357
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
352
358
  }
353
- function T() {
354
- }
355
- function M(y, v) {
356
- v && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(v);
359
+ function d() {
357
360
  }
358
- function S(y, v) {
359
- const { componentType: C } = y;
360
- let b = L(C, y, v);
361
- e && e.onResolveNewComponentSchema && (b = e.onResolveNewComponentSchema(y, b));
362
- const F = C.toLowerCase().replace("-", "_");
363
- return b && !b.id && b.type === C && (b.id = `${F}_${Math.random().toString().slice(2, 6)}`), b;
361
+ function h(g, w) {
362
+ w && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(w);
364
363
  }
365
- function $(y, v) {
366
- const C = String(y.getAttribute("data-controltype")), b = y.getAttribute("data-feature"), F = b ? JSON.parse(b) : {};
367
- F.parentComponentInstance = c.value;
368
- let B = L(C, F);
369
- e && e.onAcceptNewChildElement && (B = e.onAcceptNewChildElement(y, v, B));
370
- const Z = C.toLowerCase().replace("-", "_");
371
- return B && !B.id && B.type === C && (B.id = `${Z}_${Math.random().toString().slice(2, 6)}`), B;
364
+ function k(g, w) {
365
+ const { componentType: M } = g;
366
+ let S = Q(M, g, w);
367
+ e && e.onResolveNewComponentSchema && (S = e.onResolveNewComponentSchema(g, S));
368
+ const L = M.toLowerCase().replace(/-/g, "_");
369
+ return S && !S.id && S.type === M && (S.id = `${L}_${Math.random().toString().slice(2, 6)}`), S;
372
370
  }
373
- function D(y) {
371
+ function b(g) {
374
372
  }
375
- function Y(...y) {
373
+ function C(...g) {
376
374
  if (e && e.getPropsConfig)
377
- return e.getPropsConfig(...y);
375
+ return e.getPropsConfig(...g);
376
+ }
377
+ function E() {
378
+ e && e.onRemoveComponent && e.onRemoveComponent(), t != null && t.schema.contents && t.schema.contents.map((g) => {
379
+ var S;
380
+ let w = g.id;
381
+ g.type === "component-ref" && (w = g.component);
382
+ const M = s.value.querySelector(`#${w}-design-item`);
383
+ (S = M == null ? void 0 : M.componentInstance) != null && S.value.onRemoveComponent && M.componentInstance.value.onRemoveComponent();
384
+ });
378
385
  }
379
- return c.value = {
380
- canMove: d(),
381
- canSelectParent: u(),
382
- canDelete: r(),
383
- canNested: !s(),
386
+ return r.value = {
387
+ canMove: l(),
388
+ canSelectParent: f(),
389
+ canDelete: y(),
390
+ canNested: !a(),
384
391
  contents: t == null ? void 0 : t.schema.contents,
385
- elementRef: a,
386
- parent: (O = t == null ? void 0 : t.parent) == null ? void 0 : O.componentInstance,
392
+ elementRef: s,
393
+ parent: (T = t == null ? void 0 : t.parent) == null ? void 0 : T.componentInstance,
387
394
  schema: t == null ? void 0 : t.schema,
388
- styles: n,
389
- designerClass: i,
390
- canAccepts: h,
391
- getBelongedComponentInstance: l,
392
- getDraggableDesignItemElement: m,
393
- getDraggingDisplayText: f,
394
- getPropConfig: Y,
395
- getDragScopeElement: T,
396
- onAcceptMovedChildElement: M,
397
- onAcceptNewChildElement: $,
398
- onChildElementMovedOut: D,
399
- addNewChildComponentSchema: S,
400
- updateDragAndDropRules: o,
401
- triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || w(!1),
402
- triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || w(!1)
403
- }, c;
395
+ styles: i,
396
+ designerClass: n,
397
+ canAccepts: p,
398
+ getBelongedComponentInstance: c,
399
+ getDraggableDesignItemElement: o,
400
+ getDraggingDisplayText: m,
401
+ getPropConfig: C,
402
+ getDragScopeElement: d,
403
+ onAcceptMovedChildElement: h,
404
+ onChildElementMovedOut: b,
405
+ addNewChildComponentSchema: k,
406
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || P(!1),
407
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || P(!1),
408
+ onRemoveComponent: E
409
+ }, r;
404
410
  }
405
- class be {
411
+ class ve {
406
412
  constructor(t, e) {
407
- g(this, "componentId");
408
- g(this, "viewModelId");
409
- g(this, "eventsEditorUtils");
410
- g(this, "formSchemaUtils");
411
- g(this, "formMetadataConverter");
412
- g(this, "designViewModelUtils");
413
- g(this, "designViewModelField");
414
- g(this, "controlCreatorUtils");
415
- g(this, "designerHostService");
416
- g(this, "schemaService", null);
417
- g(this, "metadataService", null);
418
- g(this, "propertyConfig", {
413
+ v(this, "componentId");
414
+ v(this, "viewModelId");
415
+ v(this, "eventsEditorUtils");
416
+ v(this, "formSchemaUtils");
417
+ v(this, "formMetadataConverter");
418
+ v(this, "designViewModelUtils");
419
+ v(this, "designViewModelField");
420
+ v(this, "controlCreatorUtils");
421
+ v(this, "designerHostService");
422
+ v(this, "schemaService", null);
423
+ v(this, "metadataService", null);
424
+ v(this, "propertyConfig", {
419
425
  type: "object",
420
426
  categories: {}
421
427
  });
422
- var o;
423
- 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;
428
+ var i;
429
+ this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
424
430
  }
425
431
  getTableInfo() {
426
432
  var t;
427
433
  return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
428
434
  }
429
435
  setDesignViewModelField(t) {
436
+ var i;
430
437
  const e = t.binding && t.binding.type === "Form" && t.binding.field;
431
438
  if (e) {
432
439
  if (!this.designViewModelField) {
433
- const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
434
- this.designViewModelField = o.fields.find((n) => n.id === e);
440
+ const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
441
+ this.designViewModelField = n.fields.find((r) => r.id === e);
435
442
  }
436
- t.updateOn = this.designViewModelField.updateOn;
443
+ t.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
437
444
  }
438
445
  }
439
446
  changeFieldEditorType(t, e) {
@@ -457,7 +464,7 @@ class be {
457
464
  type: "combo-list",
458
465
  textField: "name",
459
466
  valueField: "value",
460
- data: [{ value: t.type, name: p[t.type].name }]
467
+ data: [{ value: t.type, name: u[t.type].name }]
461
468
  }
462
469
  }
463
470
  }
@@ -490,19 +497,19 @@ class be {
490
497
  * @returns
491
498
  */
492
499
  updateElementByParentContainer(t, e) {
493
- const o = e && e.parent && e.parent.schema;
494
- if (!o)
500
+ const i = e && e.parent && e.parent.schema;
501
+ if (!i)
495
502
  return;
496
- const n = o.contents.findIndex((c) => c.id === t), i = x(o.contents[n]);
497
- o.contents.splice(n, 1), o.contents.splice(n, 0, i);
503
+ const n = i.contents.findIndex((l) => l.id === t), r = j(i.contents[n]);
504
+ i.contents.splice(n, 1), i.contents.splice(n, 0, r);
498
505
  }
499
506
  }
500
- const P = class P {
507
+ const I = class I {
501
508
  /**
502
509
  * 根据绑定字段类型获取可用的输入类控件
503
510
  */
504
511
  static getEditorTypesByMDataType(t) {
505
- const e = P.fieldControlTypeMapping[t];
512
+ const e = I.fieldControlTypeMapping[t];
506
513
  return e || [{ key: "", value: "" }];
507
514
  }
508
515
  /**
@@ -510,9 +517,9 @@ const P = class P {
510
517
  */
511
518
  static getAllInputTypes() {
512
519
  const t = [];
513
- for (let e in P.fieldControlTypeMapping)
514
- P.fieldControlTypeMapping[e].forEach((o) => {
515
- t.find((n) => n.key === o.key && n.value === o.value) || t.push({ key: o.key, value: o.value });
520
+ for (const e in I.fieldControlTypeMapping)
521
+ I.fieldControlTypeMapping[e].forEach((i) => {
522
+ t.find((n) => n.key === i.key && n.value === i.value) || t.push({ key: i.key, value: i.value });
516
523
  });
517
524
  return t;
518
525
  }
@@ -520,69 +527,174 @@ const P = class P {
520
527
  /**
521
528
  * <字段类型,可配置的控件类型列表>的映射
522
529
  */
523
- g(P, "fieldControlTypeMapping", {
530
+ v(I, "fieldControlTypeMapping", {
524
531
  String: [
525
- { key: p["input-group"].type, value: p["input-group"].name },
526
- { key: p.lookup.type, value: p.lookup.name },
527
- { key: p["date-picker"].type, value: p["date-picker"].name },
528
- { key: p["check-box"].type, value: p["check-box"].name },
529
- { key: p["radio-group"].type, value: p["radio-group"].name },
530
- { key: p["combo-list"].type, value: p["combo-list"].name },
531
- { key: p.textarea.type, value: p.textarea.name }
532
+ { key: u["input-group"].type, value: u["input-group"].name },
533
+ { key: u.lookup.type, value: u.lookup.name },
534
+ { key: u["date-picker"].type, value: u["date-picker"].name },
535
+ { key: u["check-box"].type, value: u["check-box"].name },
536
+ { key: u["check-group"].type, value: u["check-group"].name },
537
+ { key: u["radio-group"].type, value: u["radio-group"].name },
538
+ { key: u["combo-list"].type, value: u["combo-list"].name },
539
+ { key: u.textarea.type, value: u.textarea.name }
532
540
  ],
533
541
  Text: [
534
- { key: p.textarea.type, value: p.textarea.name },
535
- { key: p.lookup.type, value: p.lookup.name }
542
+ { key: u.textarea.type, value: u.textarea.name },
543
+ { key: u.lookup.type, value: u.lookup.name }
536
544
  ],
537
545
  Decimal: [
538
- { key: p["number-spinner"].type, value: p["number-spinner"].name }
546
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
539
547
  ],
540
548
  Integer: [
541
- { key: p["number-spinner"].type, value: p["number-spinner"].name }
549
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
542
550
  ],
543
551
  Number: [
544
- { key: p["number-spinner"].type, value: p["number-spinner"].name }
552
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
545
553
  ],
546
554
  BigNumber: [
547
- { key: p["number-spinner"].type, value: p["number-spinner"].name }
555
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
548
556
  ],
549
557
  Date: [
550
- { key: p["date-picker"].type, value: p["date-picker"].name }
558
+ { key: u["date-picker"].type, value: u["date-picker"].name }
551
559
  ],
552
560
  DateTime: [
553
- { key: p["date-picker"].type, value: p["date-picker"].name }
561
+ { key: u["date-picker"].type, value: u["date-picker"].name }
554
562
  ],
555
563
  Boolean: [
556
- { key: p.switch.type, value: p.switch.name },
557
- { key: p["check-box"].type, value: p["check-box"].name }
564
+ { key: u.switch.type, value: u.switch.name },
565
+ { key: u["check-box"].type, value: u["check-box"].name }
558
566
  ],
559
567
  Enum: [
560
- { key: p["combo-list"].type, value: p["combo-list"].name },
561
- { key: p["radio-group"].type, value: p["radio-group"].name }
568
+ { key: u["combo-list"].type, value: u["combo-list"].name },
569
+ { key: u["radio-group"].type, value: u["radio-group"].name }
562
570
  ],
563
571
  Object: [
564
- { key: p.lookup.type, value: p.lookup.name },
565
- { key: p["combo-list"].type, value: p["combo-list"].name },
566
- { key: p["radio-group"].type, value: p["radio-group"].name }
572
+ { key: u.lookup.type, value: u.lookup.name },
573
+ { key: u["combo-list"].type, value: u["combo-list"].name },
574
+ { key: u["radio-group"].type, value: u["radio-group"].name }
567
575
  ]
568
576
  });
569
- let A = P;
570
- const ke = w(0);
571
- class we extends be {
572
- constructor(e, o) {
573
- super(e, o);
574
- g(this, "responseLayoutEditorFunction");
575
- this.responseLayoutEditorFunction = K(this.formSchemaUtils);
576
- }
577
- getPropertyConfig(e, o) {
578
- 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;
579
- }
580
- getBasicProperties(e, o) {
581
- var d;
582
- var n = this;
583
- this.setDesignViewModelField(e);
584
- const i = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
577
+ let D = I;
578
+ const be = P(0);
579
+ class Ce {
580
+ constructor() {
581
+ /** 控件标题 */
582
+ v(this, "label", "");
583
+ /** 控件id */
584
+ v(this, "id", "");
585
+ /** 每个控件占用的栅格数 */
586
+ v(this, "columnInSM", 12);
587
+ v(this, "columnInMD", 6);
588
+ v(this, "columnInLG", 3);
589
+ v(this, "columnInEL", 2);
590
+ /** 每个控件占用的列数 */
591
+ v(this, "displayWidthInSM", 1);
592
+ v(this, "displayWidthInMD", 1);
593
+ v(this, "displayWidthInLG", 1);
594
+ v(this, "displayWidthInEL", 1);
595
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
596
+ v(this, "displayColumnCountAtBreakPoint", "md");
597
+ /** 控件所在行,传0即可-----编辑器内部使用 */
598
+ v(this, "tagRow", 0);
599
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
600
+ v(this, "showTopBorder", 0);
601
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
602
+ v(this, "group", 1);
603
+ /** 控件是否符合标准的class配置(设计器用的) */
604
+ v(this, "isSupportedClass", !0);
605
+ /** 控件所在分组id(设计器用的) */
606
+ v(this, "fieldSetId", "");
607
+ }
608
+ }
609
+ function ke(s) {
610
+ let t, e;
611
+ const i = /* @__PURE__ */ new Map();
612
+ let n = [];
613
+ function r(c, o) {
614
+ const m = c.split(" ").filter((C) => C.startsWith("col-"));
615
+ if (m.length === 0) {
616
+ o.isSupportedClass = !1;
617
+ return;
618
+ }
619
+ let d = m.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), h = m.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), k = m.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), b = m.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
620
+ d = d || "col-12", o.columnInSM = parseInt(d.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), h = h || "col-md-" + o.columnInSM, o.columnInMD = parseInt(h.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), k = k || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(k.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), b = b || "col-el-" + o.columnInLG, o.columnInEL = parseInt(b.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
621
+ }
622
+ function l(c, o, p, m = !1) {
623
+ let d = !1;
624
+ c.contents.forEach((h) => {
625
+ if (h.type === "fieldset") {
626
+ p += 1, l(h, o, p, !0), d = !0;
627
+ return;
628
+ }
629
+ d && (p += 1, d = !1);
630
+ const k = h.appearance && h.appearance.class, b = new Ce();
631
+ k ? r(k, b) : b.isSupportedClass = !1, b.label = h.label || h.id, b.id = h.id, b.group = p, m && (b.fieldSetId = c.id), e === h.id && (t = p), i.set(h.id, h), o.push(b);
632
+ });
633
+ }
634
+ function f(c) {
635
+ const o = s.getComponentById(c);
636
+ if (!o || !o.componentType || !o.componentType.startsWith("form"))
637
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
638
+ const p = s.selectNode(o, (m) => m.type === W["response-form"].type);
639
+ return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
640
+ }
641
+ function y(c, o) {
642
+ o = o || c.id;
643
+ const { result: p, message: m, formNode: d } = f(o);
644
+ if (!p)
645
+ return { result: p, message: m };
646
+ e = c.id, n = [], i.clear();
647
+ const h = d.contents[0].type === W.fieldset.type ? 0 : 1;
648
+ l(d, n, h);
649
+ const k = n.find((C) => !C.isSupportedClass);
585
650
  return {
651
+ defaultState: {
652
+ defaultGroupNumber: t || 1,
653
+ model: k ? "customize" : "standard"
654
+ },
655
+ importData: n
656
+ };
657
+ }
658
+ function a(c, o) {
659
+ o = o;
660
+ const { result: p, formNode: m } = f(o);
661
+ if (!p)
662
+ return "";
663
+ const d = [];
664
+ return c.forEach((h) => {
665
+ var C;
666
+ const k = i.get(h.id), b = k.appearance && k.appearance.class;
667
+ if (b) {
668
+ const T = b.split(" ").filter((J) => !J.startsWith("col-")), g = "col-" + h.columnInSM, w = "col-md-" + h.columnInMD, M = "col-xl-" + h.columnInLG, S = "col-el-" + h.columnInEL, L = [g, w, M, S].concat(T);
669
+ k.appearance.class = L.join(" ");
670
+ }
671
+ if (h.fieldSetId) {
672
+ const E = m.contents.find((g) => g.id === h.fieldSetId), T = d.find((g) => g.id === h.fieldSetId);
673
+ T ? (C = T.contents) == null || C.push(k) : (d.push(E), E.contents = [k]);
674
+ } else
675
+ d.push(k);
676
+ }), m.contents = d, m.id;
677
+ }
678
+ return {
679
+ checkCanFindFormNode: f,
680
+ checkCanOpenLayoutEditor: y,
681
+ changeFormControlsByResponseLayoutConfig: a,
682
+ getResonseFormLayoutConfig: l
683
+ };
684
+ }
685
+ class we extends ve {
686
+ constructor(e, i) {
687
+ super(e, i);
688
+ v(this, "responseLayoutEditorFunction");
689
+ this.responseLayoutEditorFunction = ke(this.formSchemaUtils);
690
+ }
691
+ getPropertyConfig(e, i) {
692
+ return this.propertyConfig.categories.basic = this.getBasicProperties(e, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, i), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
693
+ }
694
+ getBasicProperties(e, i) {
695
+ var r;
696
+ const n = this;
697
+ return this.setDesignViewModelField(e), this.formSchemaUtils.getFormMetadataBasicInfo(), {
586
698
  description: "Basic Information",
587
699
  title: "基本信息",
588
700
  properties: {
@@ -603,7 +715,7 @@ class we extends be {
603
715
  textField: "value",
604
716
  valueField: "key",
605
717
  editable: !1,
606
- data: n.designViewModelField ? A.getEditorTypesByMDataType((d = n.designViewModelField.type) == null ? void 0 : d.name) : A.getAllInputTypes()
718
+ data: n.designViewModelField ? D.getEditorTypesByMDataType((r = n.designViewModelField.type) == null ? void 0 : r.name) : D.getAllInputTypes()
607
719
  }
608
720
  },
609
721
  label: {
@@ -614,41 +726,37 @@ class we extends be {
614
726
  binding: {
615
727
  description: "绑定的表单字段",
616
728
  title: "绑定",
617
- $converter: "/converter/field-selector.converter",
618
729
  editor: {
619
- type: "field-selector",
730
+ type: "binding-selector",
620
731
  bindingType: { enable: !1 },
621
732
  editorParams: {
622
- propertyData: e,
623
- formBasicInfo: i
733
+ componentSchema: e,
734
+ needSyncToViewModel: !0,
735
+ viewModelId: this.viewModelId,
736
+ designerHostService: this.designerHostService,
737
+ disableOccupiedFields: !0
624
738
  },
625
- columns: [
626
- { field: "name", title: "字段名称" },
627
- { field: "bindingField", title: "绑定字段" },
628
- { field: "fieldType", title: "字段类型" }
629
- ],
630
- textField: "bindingField",
631
- data: c
739
+ textField: "bindingField"
632
740
  }
633
741
  }
634
742
  },
635
- setPropertyRelates(u, r) {
636
- if (u)
637
- switch (u && u.propertyID) {
743
+ setPropertyRelates(l, f) {
744
+ if (l)
745
+ switch (l && l.propertyID) {
638
746
  case "type": {
639
- n.changeControlType(e, u, o);
747
+ n.changeControlType(e, l, i);
640
748
  break;
641
749
  }
642
750
  case "label": {
643
- u.needRefreshControlTree = !0;
751
+ l.needRefreshControlTree = !0;
644
752
  break;
645
753
  }
646
754
  }
647
755
  }
648
756
  };
649
757
  }
650
- getAppearanceProperties(e, o) {
651
- var n = this;
758
+ getAppearanceProperties(e, i) {
759
+ const n = this;
652
760
  return {
653
761
  title: "样式",
654
762
  description: "Appearance",
@@ -678,14 +786,14 @@ class we extends be {
678
786
  }
679
787
  }
680
788
  },
681
- setPropertyRelates(i, c) {
682
- if (i)
683
- switch (i && i.propertyID) {
789
+ setPropertyRelates(r, l) {
790
+ if (r)
791
+ switch (r && r.propertyID) {
684
792
  case "responseLayout":
685
- n.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(i.propertyValue, n.componentId || e.id), n.updateUnifiedLayoutAfterResponseLayoutChanged(n.componentId), n.updateElementByParentContainer(e.id, o), delete e.responseLayout;
793
+ n.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(r.propertyValue, n.componentId || e.id), n.updateUnifiedLayoutAfterResponseLayoutChanged(n.componentId), n.updateElementByParentContainer(e.id, i), delete e.responseLayout;
686
794
  break;
687
795
  case "class":
688
- n.updateUnifiedLayoutAfterControlChanged(i.propertyValue, e.id, this.componentId), n.updateElementByParentContainer(e.id, o);
796
+ n.updateUnifiedLayoutAfterControlChanged(r.propertyValue, e.id, this.componentId), n.updateElementByParentContainer(e.id, i);
689
797
  break;
690
798
  }
691
799
  }
@@ -699,44 +807,44 @@ class we extends be {
699
807
  * @param propertyData 控件DOM属性
700
808
  * @param newControlType 新控件类型
701
809
  */
702
- changeControlType(e, o, n) {
703
- var s, l, m, h;
704
- const i = o.propertyValue, c = n && n.parent && n.parent.schema;
705
- if (!c)
810
+ changeControlType(e, i, n) {
811
+ var c, o, p, m;
812
+ const r = i.propertyValue, l = n && n.parent && n.parent.schema;
813
+ if (!l)
706
814
  return;
707
- const d = c.contents.findIndex((f) => f.id === e.id), u = c.contents[d];
708
- let r;
815
+ const f = l.contents.findIndex((d) => d.id === e.id), y = l.contents[f];
816
+ let a;
709
817
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
710
818
  editor: {
711
- $type: i
819
+ $type: r
712
820
  },
713
821
  name: this.designViewModelField.name,
714
822
  require: this.designViewModelField.require,
715
823
  readonly: this.designViewModelField.readonly
716
- }, !1), r = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, i)), r || (r = G("form-group") || {}, r.editor = G(i) || {}, delete r.editor.id, delete r.editor.binding, delete r.editor.appearance), Object.assign(r, {
717
- id: u.id,
718
- appearance: u.appearance,
719
- size: u.size,
720
- label: u.label,
721
- binding: u.binding,
722
- visible: u.visible
723
- }), Object.assign(r.editor, {
724
- isTextArea: r.isTextArea && u.isTextArea,
725
- placeholder: (s = u.editor) == null ? void 0 : s.placeholder,
726
- holdPlace: (l = u.editor) == null ? void 0 : l.holdPlace,
727
- readonly: (m = u.editor) == null ? void 0 : m.readonly,
728
- require: (h = u.editor) == null ? void 0 : h.require
729
- }), c.contents.splice(d, 1), c.contents.splice(d, 0, r), n.schema = Object.assign(u, r), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
730
- (f) => f.classList.remove("dgComponentSelected")
731
- ), ke.value++;
732
- }
733
- getComponentConfig(e, o = {}, n = {}) {
734
- const i = Object.assign({
824
+ }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(r)), Object.assign(a, {
825
+ id: y.id,
826
+ appearance: y.appearance,
827
+ size: y.size,
828
+ label: y.label,
829
+ binding: y.binding,
830
+ visible: y.visible
831
+ }), Object.assign(a.editor, {
832
+ isTextArea: a.isTextArea && y.isTextArea,
833
+ placeholder: (c = y.editor) == null ? void 0 : c.placeholder,
834
+ holdPlace: (o = y.editor) == null ? void 0 : o.holdPlace,
835
+ readonly: (p = y.editor) == null ? void 0 : p.readonly,
836
+ require: (m = y.editor) == null ? void 0 : m.require
837
+ }), l.contents.splice(f, 1), l.contents.splice(f, 0, a), n.schema = Object.assign(y, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
838
+ (d) => d.classList.remove("dgComponentSelected")
839
+ ), be.value++;
840
+ }
841
+ getComponentConfig(e, i = {}, n = {}) {
842
+ const r = Object.assign({
735
843
  description: "编辑器",
736
844
  title: "编辑器",
737
845
  type: "input-group",
738
846
  $converter: "/converter/property-editor.converter"
739
- }, o), c = Object.assign({
847
+ }, i), l = Object.assign({
740
848
  readonly: {
741
849
  description: "",
742
850
  title: "只读",
@@ -758,7 +866,7 @@ class we extends be {
758
866
  type: "string"
759
867
  }
760
868
  }, n);
761
- return { ...i, properties: { ...c } };
869
+ return { ...r, properties: { ...l } };
762
870
  }
763
871
  /**
764
872
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -766,47 +874,47 @@ class we extends be {
766
874
  * @param controlId 控件Id
767
875
  * @param componentId 控件所在组件id
768
876
  */
769
- updateUnifiedLayoutAfterControlChanged(e, o, n) {
770
- const i = e.split(" ");
771
- let c = i.find((l) => /^col-([1-9]|10|11|12)$/.test(l)), d = i.find((l) => /^col-md-([1-9]|10|11|12)$/.test(l)), u = i.find((l) => /^col-xl-([1-9]|10|11|12)$/.test(l)), r = i.find((l) => /^col-el-([1-9]|10|11|12)$/.test(l));
772
- c = c || "col-12", d = d || "col-md-" + c.replace("col-", ""), u = u || "col-xl-" + d.replace("col-md-", ""), r = r || "col-el-" + u.replace("col-xl-", "");
773
- const s = {
774
- id: o,
775
- columnInSM: parseInt(c.replace("col-", ""), 10),
776
- columnInMD: parseInt(d.replace("col-md-", ""), 10),
777
- columnInLG: parseInt(u.replace("col-xl-", ""), 10),
778
- columnInEL: parseInt(r.replace("col-el-", ""), 10)
877
+ updateUnifiedLayoutAfterControlChanged(e, i, n) {
878
+ const r = e.split(" ");
879
+ let l = r.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), f = r.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), y = r.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), a = r.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
880
+ l = l || "col-12", f = f || "col-md-" + l.replace("col-", ""), y = y || "col-xl-" + f.replace("col-md-", ""), a = a || "col-el-" + y.replace("col-xl-", "");
881
+ const c = {
882
+ id: i,
883
+ columnInSM: parseInt(l.replace("col-", ""), 10),
884
+ columnInMD: parseInt(f.replace("col-md-", ""), 10),
885
+ columnInLG: parseInt(y.replace("col-xl-", ""), 10),
886
+ columnInEL: parseInt(a.replace("col-el-", ""), 10)
779
887
  };
780
- this.updateUnifiedLayoutAfterResponseLayoutChanged(n, s);
888
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(n, c);
781
889
  }
782
890
  /**
783
891
  * 修改控件布局配置后更新Form统一布局配置
784
892
  * @param componentId 组件Id
785
893
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
786
894
  */
787
- updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
895
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, i) {
788
896
  const { formNode: n } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
789
897
  if (!n || !n.unifiedLayout)
790
898
  return;
791
- const i = [];
792
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(n, i, 1), o) {
793
- const f = i.find((T) => T.id === o.id);
794
- Object.assign(f || {}, o);
899
+ const r = [];
900
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(n, r, 1), i) {
901
+ const d = r.find((h) => h.id === i.id);
902
+ Object.assign(d || {}, i);
795
903
  }
796
- const c = i.map((f) => f.columnInSM), d = i.map((f) => f.columnInMD), u = i.map((f) => f.columnInLG), r = i.map((f) => f.columnInEL), s = this.checkIsUniqueColumn(c) ? c[0] : null, l = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(u) ? u[0] : null, h = this.checkIsUniqueColumn(r) ? r[0] : null;
904
+ const l = r.map((d) => d.columnInSM), f = r.map((d) => d.columnInMD), y = r.map((d) => d.columnInLG), a = r.map((d) => d.columnInEL), c = this.checkIsUniqueColumn(l) ? l[0] : null, o = this.checkIsUniqueColumn(f) ? f[0] : null, p = this.checkIsUniqueColumn(y) ? y[0] : null, m = this.checkIsUniqueColumn(a) ? a[0] : null;
797
905
  Object.assign(n.unifiedLayout, {
798
- uniqueColClassInSM: s,
799
- uniqueColClassInMD: l,
800
- uniqueColClassInLG: m,
801
- uniqueColClassInEL: h
906
+ uniqueColClassInSM: c,
907
+ uniqueColClassInMD: o,
908
+ uniqueColClassInLG: p,
909
+ uniqueColClassInEL: m
802
910
  });
803
911
  }
804
912
  /**
805
913
  * 校验宽度样式值是否一致
806
914
  */
807
915
  checkIsUniqueColumn(e) {
808
- const o = new Set(e);
809
- return Array.from(o).length === 1;
916
+ const i = new Set(e);
917
+ return Array.from(i).length === 1;
810
918
  }
811
919
  }
812
920
  class Me extends we {
@@ -815,7 +923,7 @@ class Me extends we {
815
923
  }
816
924
  getEditorProperties(t) {
817
925
  return this.getComponentConfig(t, { type: "switch" }, {
818
- readonly: {
926
+ disabled: {
819
927
  visible: !1
820
928
  },
821
929
  placeholder: {
@@ -848,15 +956,15 @@ class Me extends we {
848
956
  editor: {
849
957
  data: [
850
958
  {
851
- value: "small",
959
+ id: "small",
852
960
  name: "小号"
853
961
  },
854
962
  {
855
- value: "middle",
963
+ id: "middle",
856
964
  name: "中号"
857
965
  },
858
966
  {
859
- value: "large",
967
+ id: "large",
860
968
  name: "大号"
861
969
  }
862
970
  ]
@@ -865,114 +973,56 @@ class Me extends we {
865
973
  });
866
974
  }
867
975
  }
868
- function Se(a, t) {
869
- a.schema;
870
- const e = w(!0), o = w(!0);
871
- function n(l) {
872
- return !1;
873
- }
874
- function i() {
875
- return !1;
976
+ function Se(s, t) {
977
+ const e = s.schema;
978
+ function i(n, r) {
979
+ return new Me(n, t).getPropertyConfig(e, r);
876
980
  }
877
- function c() {
878
- return !1;
879
- }
880
- function d() {
881
- return !0;
882
- }
883
- function u(l) {
884
- }
885
- function r() {
886
- }
887
- function s(l) {
888
- return null;
889
- }
890
- return {
891
- canAccepts: n,
892
- checkCanDeleteComponent: i,
893
- checkCanMoveComponent: c,
894
- hideNestedPaddingInDesginerView: d,
895
- onAcceptMovedChildElement: u,
896
- resolveComponentContext: r,
897
- triggerBelongedComponentToMoveWhenMoved: e,
898
- triggerBelongedComponentToDeleteWhenDeleted: o,
899
- getPropsConfig: s
900
- };
981
+ return { getPropsConfig: i };
901
982
  }
902
- function Te(a, t) {
903
- const {
904
- canAccepts: e,
905
- checkCanDeleteComponent: o,
906
- checkCanMoveComponent: n,
907
- hideNestedPaddingInDesginerView: i,
908
- onAcceptMovedChildElement: c,
909
- resolveComponentContext: d,
910
- triggerBelongedComponentToMoveWhenMoved: u,
911
- triggerBelongedComponentToDeleteWhenDeleted: r
912
- } = Se(a), s = a.schema;
913
- function l(m, h) {
914
- return new Me(m, t).getPropertyConfig(s, h);
915
- }
916
- return {
917
- canAccepts: e,
918
- checkCanDeleteComponent: o,
919
- checkCanMoveComponent: n,
920
- hideNestedPaddingInDesginerView: i,
921
- onAcceptMovedChildElement: c,
922
- resolveComponentContext: d,
923
- triggerBelongedComponentToMoveWhenMoved: u,
924
- triggerBelongedComponentToDeleteWhenDeleted: r,
925
- getPropsConfig: l
926
- };
927
- }
928
- const Be = /* @__PURE__ */ W({
983
+ const Fe = /* @__PURE__ */ q({
929
984
  name: "FSwitchDesign",
930
985
  props: N,
931
986
  emits: ["update:modelValue"],
932
- setup(a, t) {
987
+ setup(s, t) {
933
988
  const {
934
989
  size: e,
935
- onLabel: o,
990
+ onLabel: i,
936
991
  offLabel: n
937
- } = z(a), i = w(), c = q("designer-host-service"), d = q("design-item-context"), u = Te(d, c), r = Ce(i, d, u);
938
- R(() => {
939
- i.value.componentInstance = r;
940
- }), t.expose(r.value);
941
- const s = E(() => ({
992
+ } = O(s), r = P(), l = $("designer-host-service"), f = $("design-item-context"), y = Se(f, l), a = ge(r, f, y);
993
+ _(() => {
994
+ r.value.componentInstance = a;
995
+ }), t.expose(a.value);
996
+ const c = B(() => ({
942
997
  switch: !0,
943
998
  "f-cmp-switch": !0,
944
999
  checked: !1,
945
1000
  "switch-large": e.value === "large",
946
1001
  "switch-medium": e.value === "medium",
947
1002
  "switch-small": e.value === "small"
948
- })), l = E(() => (o == null ? void 0 : o.value) || (n == null ? void 0 : n.value));
949
- return () => k("span", {
950
- ref: i,
1003
+ })), o = B(() => (i == null ? void 0 : i.value) || (n == null ? void 0 : n.value));
1004
+ return () => F("span", {
1005
+ ref: r,
951
1006
  tabindex: "0",
952
1007
  role: "button",
953
- class: s.value
954
- }, [l.value && k("span", {
1008
+ class: c.value
1009
+ }, [o.value && F("span", {
955
1010
  class: "switch-pane"
956
- }, [k("span", {
1011
+ }, [F("span", {
957
1012
  class: "switch-label-unchecked"
958
- }, [n == null ? void 0 : n.value])]), k("small", null, [t.slots.default && t.slots.default()])]);
1013
+ }, [n == null ? void 0 : n.value])]), F("small", null, [t.slots.default && t.slots.default()])]);
959
1014
  }
960
- }), Ee = (a) => {
961
- const t = a;
962
- return t.install = function(e) {
963
- e.component(t.name, a);
964
- }, a;
965
- };
966
- V.register = (a, t, e, o) => {
967
- a.switch = V, t.switch = Q;
1015
+ });
1016
+ V.register = (s, t, e, i) => {
1017
+ s.switch = V, t.switch = H;
968
1018
  };
969
- V.registerDesigner = (a, t, e) => {
970
- a.switch = Be, t.switch = Q;
1019
+ V.registerDesigner = (s, t, e) => {
1020
+ s.switch = Fe, t.switch = H;
971
1021
  };
972
- const Le = Ee(V);
1022
+ const Ve = K(V);
973
1023
  export {
974
1024
  V as FSwitch,
975
- Le as default,
976
- Q as propsResolver,
1025
+ Ve as default,
1026
+ H as propsResolver,
977
1027
  N as switchProps
978
1028
  };