@farris/ui-vue 1.2.9 → 1.3.1

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 (287) hide show
  1. package/components/accordion/index.esm.js +64 -64
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +521 -336
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +99 -97
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +496 -504
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +251 -259
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +696 -519
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +368 -376
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1141 -340
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +116 -116
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +986 -798
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +463 -998
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2233 -1057
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +335 -1002
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6193 -4702
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4562 -3294
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3420 -2623
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-canvas/index.css +1 -1
  40. package/components/designer-canvas/index.esm.js +914 -883
  41. package/components/designer-canvas/index.umd.cjs +1 -1
  42. package/components/designer-outline/index.esm.js +14 -13
  43. package/components/designer-outline/index.umd.cjs +1 -1
  44. package/components/dropdown/index.esm.js +204 -212
  45. package/components/dropdown/index.umd.cjs +2 -2
  46. package/components/dynamic-form/index.css +1 -0
  47. package/components/dynamic-form/index.esm.js +2795 -1835
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +180 -130
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +303 -290
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/events-editor/index.esm.js +328 -336
  54. package/components/events-editor/index.umd.cjs +1 -1
  55. package/components/expression-editor/index.esm.js +65 -65
  56. package/components/expression-editor/index.umd.cjs +1 -1
  57. package/components/external-container/index.css +1 -1
  58. package/components/external-container/index.esm.js +3349 -3626
  59. package/components/external-container/index.umd.cjs +1 -1
  60. package/components/field-selector/index.css +1 -1
  61. package/components/field-selector/index.esm.js +5344 -8588
  62. package/components/field-selector/index.umd.cjs +1 -1
  63. package/components/filter-bar/index.css +1 -1
  64. package/components/filter-bar/index.esm.js +2179 -2227
  65. package/components/filter-bar/index.umd.cjs +1 -1
  66. package/components/flow-canvas/index.css +1 -1
  67. package/components/flow-canvas/index.esm.js +684 -675
  68. package/components/flow-canvas/index.umd.cjs +1 -1
  69. package/components/image-cropper/index.esm.js +482 -490
  70. package/components/image-cropper/index.umd.cjs +1 -1
  71. package/components/input-group/index.esm.js +746 -569
  72. package/components/input-group/index.umd.cjs +1 -1
  73. package/components/layout/index.esm.js +409 -385
  74. package/components/layout/index.umd.cjs +1 -1
  75. package/components/list-nav/index.esm.js +348 -1019
  76. package/components/list-nav/index.umd.cjs +1 -1
  77. package/components/list-view/index.css +1 -1
  78. package/components/list-view/index.esm.js +3606 -2388
  79. package/components/list-view/index.umd.cjs +1 -1
  80. package/components/lookup/index.css +1 -1
  81. package/components/lookup/index.esm.js +10871 -8970
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.css +1 -1
  84. package/components/mapping-editor/index.esm.js +6019 -5631
  85. package/components/mapping-editor/index.umd.cjs +1 -1
  86. package/components/message-box/index.css +1 -1
  87. package/components/message-box/index.esm.js +511 -471
  88. package/components/message-box/index.umd.cjs +1 -1
  89. package/components/modal/index.css +1 -1
  90. package/components/modal/index.esm.js +438 -398
  91. package/components/modal/index.umd.cjs +1 -1
  92. package/components/nav/index.esm.js +912 -1281
  93. package/components/nav/index.umd.cjs +3 -3
  94. package/components/notify/index.esm.js +59 -53
  95. package/components/notify/index.umd.cjs +1 -1
  96. package/components/number-range/index.esm.js +660 -484
  97. package/components/number-range/index.umd.cjs +1 -1
  98. package/components/number-spinner/index.esm.js +682 -506
  99. package/components/number-spinner/index.umd.cjs +1 -1
  100. package/components/order/index.css +1 -1
  101. package/components/order/index.esm.js +1848 -1658
  102. package/components/order/index.umd.cjs +1 -1
  103. package/components/page-footer/index.esm.js +100 -100
  104. package/components/page-footer/index.umd.cjs +1 -1
  105. package/components/page-header/index.esm.js +1120 -1923
  106. package/components/page-header/index.umd.cjs +1 -1
  107. package/components/pagination/index.esm.js +875 -1214
  108. package/components/pagination/index.umd.cjs +1 -1
  109. package/components/popover/index.esm.js +71 -70
  110. package/components/popover/index.umd.cjs +1 -1
  111. package/components/progress/index.esm.js +229 -237
  112. package/components/progress/index.umd.cjs +3 -3
  113. package/components/property-editor/index.css +1 -1
  114. package/components/property-editor/index.esm.js +2314 -1521
  115. package/components/property-editor/index.umd.cjs +3 -3
  116. package/components/property-panel/index.esm.js +867 -868
  117. package/components/property-panel/index.umd.cjs +1 -1
  118. package/components/query-solution/index.css +1 -1
  119. package/components/query-solution/index.esm.js +4332 -3623
  120. package/components/query-solution/index.umd.cjs +1 -1
  121. package/components/radio-button/index.esm.js +72 -72
  122. package/components/radio-button/index.umd.cjs +1 -1
  123. package/components/radio-group/index.esm.js +613 -437
  124. package/components/radio-group/index.umd.cjs +1 -1
  125. package/components/rate/index.esm.js +255 -263
  126. package/components/rate/index.umd.cjs +1 -1
  127. package/components/response-layout/index.esm.js +144 -152
  128. package/components/response-layout/index.umd.cjs +1 -1
  129. package/components/response-layout-editor/index.css +1 -1
  130. package/components/response-layout-editor/index.esm.js +1101 -1038
  131. package/components/response-layout-editor/index.umd.cjs +1 -1
  132. package/components/response-toolbar/index.esm.js +935 -1750
  133. package/components/response-toolbar/index.umd.cjs +1 -1
  134. package/components/schema-selector/index.css +1 -1
  135. package/components/schema-selector/index.esm.js +5264 -5677
  136. package/components/schema-selector/index.umd.cjs +2 -2
  137. package/components/search-box/index.esm.js +151 -154
  138. package/components/search-box/index.umd.cjs +1 -1
  139. package/components/section/index.esm.js +438 -1125
  140. package/components/section/index.umd.cjs +1 -1
  141. package/components/smoke-detector/index.esm.js +93 -101
  142. package/components/smoke-detector/index.umd.cjs +1 -1
  143. package/components/splitter/index.esm.js +563 -1202
  144. package/components/splitter/index.umd.cjs +1 -1
  145. package/components/splitter/style.js +2 -0
  146. package/components/step/index.esm.js +248 -256
  147. package/components/step/index.umd.cjs +1 -1
  148. package/components/switch/index.esm.js +549 -373
  149. package/components/switch/index.umd.cjs +1 -1
  150. package/components/tabs/index.css +1 -1
  151. package/components/tabs/index.esm.js +2436 -3110
  152. package/components/tabs/index.umd.cjs +1 -1
  153. package/components/tags/index.esm.js +328 -336
  154. package/components/tags/index.umd.cjs +1 -1
  155. package/components/text/index.esm.js +339 -347
  156. package/components/text/index.umd.cjs +1 -1
  157. package/components/textarea/index.esm.js +554 -378
  158. package/components/textarea/index.umd.cjs +1 -1
  159. package/components/time-picker/index.css +1 -1
  160. package/components/time-picker/index.esm.js +1322 -1144
  161. package/components/time-picker/index.umd.cjs +1 -1
  162. package/components/transfer/index.css +1 -1
  163. package/components/transfer/index.esm.js +537 -543
  164. package/components/transfer/index.umd.cjs +1 -1
  165. package/components/tree-grid/index.css +1 -1
  166. package/components/tree-grid/index.esm.js +5113 -9426
  167. package/components/tree-grid/index.umd.cjs +1 -1
  168. package/components/tree-view/index.css +1 -0
  169. package/components/tree-view/index.esm.js +3900 -2677
  170. package/components/tree-view/index.umd.cjs +1 -1
  171. package/components/uploader/index.esm.js +568 -570
  172. package/components/uploader/index.umd.cjs +2 -2
  173. package/components/verify-detail/index.esm.js +266 -274
  174. package/components/verify-detail/index.umd.cjs +1 -1
  175. package/components/video/index.esm.js +553 -1052
  176. package/components/video/index.umd.cjs +1 -1
  177. package/components/weather/index.esm.js +558 -566
  178. package/components/weather/index.umd.cjs +5 -5
  179. package/farris.all.esm.js +22009 -22688
  180. package/farris.all.umd.cjs +9 -9
  181. package/index.css +1 -1
  182. package/package.json +1 -1
  183. package/types/capsule/src/capsule.props.d.ts +2 -2
  184. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  185. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  186. package/types/common/directive/area-response.d.ts +10 -0
  187. package/types/common/index.d.ts +9 -0
  188. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  189. package/types/common/types.d.ts +1 -1
  190. package/types/common/utils/encrypt.d.ts +2 -0
  191. package/types/common/utils/resolve-field.d.ts +2 -0
  192. package/types/common/utils/use-class.d.ts +7 -0
  193. package/types/component/src/component.props.d.ts +7 -0
  194. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  196. package/types/components.d.ts +1 -0
  197. package/types/condition/src/types.d.ts +2 -1
  198. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  199. package/types/data-grid/index.d.ts +11 -5
  200. package/types/data-grid/src/data-grid.component.d.ts +4 -2
  201. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  202. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  203. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  204. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  205. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  206. package/types/data-view/composition/types.d.ts +19 -4
  207. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  208. package/types/designer-canvas/index.d.ts +2 -1
  209. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  210. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  211. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  212. package/types/designer-canvas/src/composition/types.d.ts +2 -3
  213. package/types/designer-canvas/src/types.d.ts +2 -1
  214. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  215. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  216. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  217. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  218. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
  219. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  220. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  221. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  222. package/types/dynamic-form/src/types.d.ts +12 -1
  223. package/types/dynamic-resolver/index.d.ts +1 -0
  224. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  225. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  226. package/types/dynamic-resolver/src/types.d.ts +9 -0
  227. package/types/dynamic-view/index.d.ts +1 -0
  228. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  229. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  230. package/types/index.d.ts +2 -0
  231. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  232. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  233. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  234. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  235. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  236. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  237. package/types/lookup/src/composition/types.d.ts +8 -0
  238. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  239. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  240. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  241. package/types/lookup/src/composition/use-http.d.ts +9 -5
  242. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  243. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  244. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  245. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  246. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  247. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  248. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  249. package/types/modal/src/modal.component.d.ts +3 -0
  250. package/types/modal/src/modal.props.d.ts +4 -0
  251. package/types/page-header/src/page-header.props.d.ts +1 -0
  252. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  253. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  254. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  255. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  256. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  257. package/types/property-panel/index.d.ts +2 -1
  258. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  259. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  260. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  262. package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  264. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  266. package/types/query-solution/src/solutions.d.ts +108 -509
  267. package/types/response-layout-editor/index.d.ts +3 -1
  268. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  269. package/types/response-layout-editor/src/type.d.ts +21 -0
  270. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  271. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  272. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  273. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  274. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  275. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  276. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  277. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  278. package/types/tabs/src/tabs.props.d.ts +1 -0
  279. package/types/tree-grid/index.d.ts +8 -2
  280. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  281. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  282. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  283. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  284. package/types/modal/src/composition/use-esc.d.ts +0 -1
  285. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  286. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  287. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,11 +1,11 @@
1
- var Z = Object.defineProperty;
2
- var H = (n, e, t) => e in n ? Z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var v = (n, e, t) => H(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as $, inject as N, onMounted as W, createVNode as h, Fragment as I, computed as B, ref as k, provide as K } from "vue";
1
+ var H = Object.defineProperty;
2
+ var x = (i, t, e) => t in i ? H(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var g = (i, t, e) => x(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { defineComponent as N, inject as L, onMounted as j, createVNode as M, Fragment as R, computed as V, ref as F, provide as K } from "vue";
5
5
  import { useCheck as ee } from "../common/index.esm.js";
6
- import { cloneDeep as te } from "lodash-es";
7
- import { getSchemaByType as L } from "../dynamic-resolver/index.esm.js";
8
- const ne = {
6
+ import { isPlainObject as $, cloneDeep as q } from "lodash-es";
7
+ import { DgControl as W } from "../designer-canvas/index.esm.js";
8
+ const te = {
9
9
  value: { type: String, default: "" },
10
10
  /** 值 */
11
11
  modelValue: { type: String, default: "" },
@@ -15,150 +15,150 @@ const ne = {
15
15
  label: { type: String, default: "" },
16
16
  /** 标识 */
17
17
  id: { type: String, default: "" }
18
- }, x = Symbol("radioGroupContext"), q = /* @__PURE__ */ $({
18
+ }, z = Symbol("radioGroupContext"), O = /* @__PURE__ */ N({
19
19
  name: "FRadio",
20
- props: ne,
20
+ props: te,
21
21
  emits: ["update:value"],
22
- setup(n, e) {
23
- const t = N(x, null), {
22
+ setup(i, t) {
23
+ const e = L(z, null), {
24
24
  buttonClass: o,
25
25
  checked: r,
26
- disabled: p,
27
- name: m,
28
- tagClass: a,
29
- shouldRenderButton: u,
30
- shouldRenderNative: i,
31
- shouldRenderTag: c,
32
- onClickRadio: s
33
- } = ee(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
34
- return W(() => {
26
+ disabled: l,
27
+ name: d,
28
+ tagClass: f,
29
+ shouldRenderButton: p,
30
+ shouldRenderNative: a,
31
+ shouldRenderTag: s,
32
+ onClickRadio: n
33
+ } = ee(i, t, e == null ? void 0 : e.parentProps, e == null ? void 0 : e.parentContext);
34
+ return j(() => {
35
35
  }), () => {
36
- var d, f, g, T, w, V;
37
- return h(I, null, [u.value && h("div", {
36
+ var c, y, u, h, b, C;
37
+ return M(R, null, [p.value && M("div", {
38
38
  class: o.value,
39
39
  style: "border-radius:0;border: 1px solid #E8EBF2;",
40
- onClick: s
41
- }, [(f = (d = e.slots).default) == null ? void 0 : f.call(d)]), c.value && h("div", {
42
- class: a.value,
43
- onClick: s
44
- }, [h("div", {
40
+ onClick: n
41
+ }, [(y = (c = t.slots).default) == null ? void 0 : y.call(c)]), s.value && M("div", {
42
+ class: f.value,
43
+ onClick: n
44
+ }, [M("div", {
45
45
  class: "title"
46
- }, [(T = (g = e.slots).default) == null ? void 0 : T.call(g)]), h("div", {
46
+ }, [(h = (u = t.slots).default) == null ? void 0 : h.call(u)]), M("div", {
47
47
  class: "tip"
48
- }, null), h("span", {
48
+ }, null), M("span", {
49
49
  class: "f-icon f-icon-check f-radio-icon"
50
- }, null)]), i.value && h("div", {
50
+ }, null)]), a.value && M("div", {
51
51
  class: "custom-control custom-radio",
52
- onClick: s
53
- }, [h("input", {
52
+ onClick: n
53
+ }, [M("input", {
54
54
  type: "radio",
55
55
  class: "custom-control-input",
56
- name: m.value,
57
- id: n.id,
58
- value: n.value,
56
+ name: d.value,
57
+ id: i.id,
58
+ value: i.value,
59
59
  checked: r.value,
60
- disabled: p.value
61
- }, null), h("div", {
60
+ disabled: l.value
61
+ }, null), M("div", {
62
62
  class: "custom-control-label"
63
- }, [(V = (w = e.slots).default) == null ? void 0 : V.call(w)])])]);
63
+ }, [(C = (b = t.slots).default) == null ? void 0 : C.call(b)])])]);
64
64
  };
65
65
  }
66
66
  });
67
- function oe(n, e, t) {
68
- return e;
67
+ function ne(i, t, e) {
68
+ return t;
69
69
  }
70
- const _ = {}, J = {};
71
- function U(n) {
72
- const { properties: e, title: t, ignore: o } = n, r = o && Array.isArray(o), p = Object.keys(e).reduce((m, a) => ((!r || !o.find((u) => u == a)) && (m[a] = e[a].type === "object" && e[a].properties ? U(e[a]) : te(e[a].default)), m), {});
73
- return (!r || !o.find((m) => m == "id")) && (p.id = `${t}-${Date.now()}`), p;
70
+ const X = {}, _ = {};
71
+ function U(i) {
72
+ const { properties: t, title: e, ignore: o } = i, r = o && Array.isArray(o), l = Object.keys(t).reduce((d, f) => ((!r || !o.find((p) => p == f)) && (d[f] = t[f].type === "object" && t[f].properties ? U(t[f]) : q(t[f].default)), d), {});
73
+ return e && (!r || !o.find((d) => d == "id")) && (l.id = `${e}-${Date.now()}`), l;
74
74
  }
75
- function O(n, e = {}, t) {
76
- const o = _[n];
75
+ function J(i, t = {}, e) {
76
+ const o = X[i];
77
77
  if (o) {
78
78
  let r = U(o);
79
- const p = J[n];
80
- return r = p ? p({ getSchemaByType: O }, r, e, t) : r, r;
79
+ const l = _[i];
80
+ return r = l ? l({ getSchemaByType: J }, r, t, e) : r, r;
81
81
  }
82
82
  return null;
83
83
  }
84
- function re(n, e) {
85
- const t = U(e);
86
- return Object.keys(n).reduce((o, r) => (o[r] && typeof o[r] == "object" ? Object.assign(o[r], n[r]) : o[r] = n[r], o), t), t;
84
+ function oe(i, t) {
85
+ const e = U(t);
86
+ return Object.keys(i).reduce((o, r) => (o[r] && $(o[r]) && $(i[r]) ? Object.assign(o[r], i[r]) : o[r] = i[r], o), e), e;
87
87
  }
88
- function ie(n, e) {
89
- return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
90
- if (e.has(r)) {
91
- const p = e.get(r);
92
- if (typeof p == "string")
93
- o[p] = n[r];
88
+ function re(i, t) {
89
+ return Object.keys(i).filter((o) => i[o] != null).reduce((o, r) => {
90
+ if (t.has(r)) {
91
+ const l = t.get(r);
92
+ if (typeof l == "string")
93
+ o[l] = i[r];
94
94
  else {
95
- const m = p(r, n[r], n);
96
- Object.assign(o, m);
95
+ const d = l(r, i[r], i);
96
+ Object.assign(o, d);
97
97
  }
98
98
  } else
99
- o[r] = n[r];
99
+ o[r] = i[r];
100
100
  return o;
101
101
  }, {});
102
102
  }
103
- function ae(n, e, t = /* @__PURE__ */ new Map()) {
104
- const o = re(n, e);
105
- return ie(o, t);
103
+ function ie(i, t, e = /* @__PURE__ */ new Map()) {
104
+ const o = oe(i, t);
105
+ return re(o, e);
106
106
  }
107
- function le(n = {}) {
108
- function e(i, c, s, d) {
109
- if (typeof s == "number")
110
- return d[i].length === s;
111
- if (typeof s == "object") {
112
- const f = Object.keys(s)[0], g = s[f];
113
- if (f === "not")
114
- return Number(d[i].length) !== Number(g);
115
- if (f === "moreThan")
116
- return Number(d[i].length) >= Number(g);
117
- if (f === "lessThan")
118
- return Number(d[i].length) <= Number(g);
107
+ function ae(i = {}) {
108
+ function t(a, s, n, c) {
109
+ if (typeof n == "number")
110
+ return c[a].length === n;
111
+ if (typeof n == "object") {
112
+ const y = Object.keys(n)[0], u = n[y];
113
+ if (y === "not")
114
+ return Number(c[a].length) !== Number(u);
115
+ if (y === "moreThan")
116
+ return Number(c[a].length) >= Number(u);
117
+ if (y === "lessThan")
118
+ return Number(c[a].length) <= Number(u);
119
119
  }
120
120
  return !1;
121
121
  }
122
- function t(i, c, s, d) {
123
- return d[i] && d[i].propertyValue && String(d[i].propertyValue.value) === String(s);
122
+ function e(a, s, n, c) {
123
+ return c[a] && c[a].propertyValue && String(c[a].propertyValue.value) === String(n);
124
124
  }
125
125
  const o = /* @__PURE__ */ new Map([
126
- ["length", e],
127
- ["getProperty", t]
126
+ ["length", t],
127
+ ["getProperty", e]
128
128
  ]);
129
- Object.keys(n).reduce((i, c) => (i.set(c, n[c]), i), o);
130
- function r(i, c) {
131
- const s = i;
132
- return typeof c == "number" ? [{ target: s, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
133
- if (d === "length")
134
- return { target: s, operator: "length", param: null, value: c[d] };
135
- const f = d, g = c[d];
136
- return { target: s, operator: "getProperty", param: f, value: g };
129
+ Object.keys(i).reduce((a, s) => (a.set(s, i[s]), a), o);
130
+ function r(a, s) {
131
+ const n = a;
132
+ return typeof s == "number" ? [{ target: n, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: n, operator: "getProperty", param: a, value: !!s }] : typeof s == "object" ? Object.keys(s).map((c) => {
133
+ if (c === "length")
134
+ return { target: n, operator: "length", param: null, value: s[c] };
135
+ const y = c, u = s[c];
136
+ return { target: n, operator: "getProperty", param: y, value: u };
137
137
  }) : [];
138
138
  }
139
- function p(i) {
140
- return Object.keys(i).reduce((s, d) => {
141
- const f = r(d, i[d]);
142
- return s.push(...f), s;
139
+ function l(a) {
140
+ return Object.keys(a).reduce((n, c) => {
141
+ const y = r(c, a[c]);
142
+ return n.push(...y), n;
143
143
  }, []);
144
144
  }
145
- function m(i, c) {
146
- if (o.has(i.operator)) {
147
- const s = o.get(i.operator);
148
- return s && s(i.target, i.param, i.value, c) || !1;
145
+ function d(a, s) {
146
+ if (o.has(a.operator)) {
147
+ const n = o.get(a.operator);
148
+ return n && n(a.target, a.param, a.value, s) || !1;
149
149
  }
150
150
  return !1;
151
151
  }
152
- function a(i, c) {
153
- return p(i).reduce((f, g) => f && m(g, c), !0);
152
+ function f(a, s) {
153
+ return l(a).reduce((y, u) => y && d(u, s), !0);
154
154
  }
155
- function u(i, c) {
156
- const s = Object.keys(i), d = s.includes("allOf"), f = s.includes("anyOf"), g = d || f, V = (g ? i[g ? d ? "allOf" : "anyOf" : "allOf"] : [i]).map((A) => a(A, c));
157
- return d ? !V.includes(!1) : V.includes(!0);
155
+ function p(a, s) {
156
+ const n = Object.keys(a), c = n.includes("allOf"), y = n.includes("anyOf"), u = c || y, C = (u ? a[u ? c ? "allOf" : "anyOf" : "allOf"] : [a]).map((E) => f(E, s));
157
+ return c ? !C.includes(!1) : C.includes(!0);
158
158
  }
159
- return { parseValueSchema: u };
159
+ return { parseValueSchema: p };
160
160
  }
161
- const l = {
161
+ const m = {
162
162
  button: { type: "button", name: "按钮", icon: "Button" },
163
163
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
164
164
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -195,21 +195,22 @@ const l = {
195
195
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
196
196
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
197
197
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
198
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
199
- }, ce = {}, se = {};
200
- le();
201
- function pe(n, e, t = /* @__PURE__ */ new Map(), o = (m, a, u) => a, r = {}, p = (m) => m) {
202
- return _[e.title] = e, J[e.title] = o, ce[e.title] = r, se[e.title] = p, (m = {}) => {
203
- const a = ae(m, e, t), u = Object.keys(n).reduce((i, c) => (i[c] = n[c].default, i), {});
204
- return Object.assign(u, a);
198
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
199
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
200
+ }, le = {}, se = {};
201
+ ae();
202
+ function ce(i, t, e = /* @__PURE__ */ new Map(), o = (d, f, p) => f, r = {}, l = (d) => d) {
203
+ return X[t.title] = t, _[t.title] = o, le[t.title] = r, se[t.title] = l, (d = {}) => {
204
+ const f = ie(d, t, e), p = Object.keys(i).reduce((a, s) => (a[s] = i[s].default, a), {});
205
+ return Object.assign(p, f);
205
206
  };
206
207
  }
207
- function ue(n, e) {
208
- return { customClass: e.class, customStyle: e.style };
208
+ function pe(i, t) {
209
+ return { customClass: t.class, customStyle: t.style };
209
210
  }
210
211
  const de = /* @__PURE__ */ new Map([
211
- ["appearance", ue]
212
- ]), me = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/radio-group.schema.json", ye = "radio-group", ge = "A Farris Input Component", he = "object", ve = {
212
+ ["appearance", pe]
213
+ ]), ue = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-design.gitee.io/radio-group.schema.json", fe = "radio-group", ye = "A Farris Input Component", he = "object", ge = {
213
214
  id: {
214
215
  description: "The unique identifier for a radio-group",
215
216
  type: "string"
@@ -290,23 +291,23 @@ const de = /* @__PURE__ */ new Map([
290
291
  description: "",
291
292
  type: "array"
292
293
  }
293
- }, be = [
294
+ }, ve = [
294
295
  "id",
295
296
  "type"
296
- ], Ce = [
297
+ ], be = [
297
298
  "id",
298
299
  "appearance",
299
300
  "binding"
300
- ], ke = {
301
- $schema: me,
302
- $id: fe,
303
- title: ye,
304
- description: ge,
301
+ ], Ce = {
302
+ $schema: ue,
303
+ $id: me,
304
+ title: fe,
305
+ description: ye,
305
306
  type: he,
306
- properties: ve,
307
- required: be,
308
- ignore: Ce
309
- }, Me = {
307
+ properties: ge,
308
+ required: ve,
309
+ ignore: be
310
+ }, ke = {
310
311
  /**
311
312
  * 是否被选中
312
313
  */
@@ -323,8 +324,8 @@ const de = /* @__PURE__ */ new Map([
323
324
  * type为button或者tag时的尺寸
324
325
  */
325
326
  size: { type: String, default: "middle" }
326
- }, j = {
327
- ...Me,
327
+ }, G = {
328
+ ...ke,
328
329
  /**
329
330
  * 组件标识
330
331
  */
@@ -363,195 +364,186 @@ const de = /* @__PURE__ */ new Map([
363
364
  * 枚举数组中枚举值的key值。
364
365
  */
365
366
  valueField: { type: String, default: "value" }
366
- }, X = pe(j, ke, de, oe);
367
- function Q(n, e, t) {
368
- const o = B(() => !n.disabled), r = B(() => n.enumData || []);
369
- function p(u) {
370
- return u[n.valueField];
367
+ }, Q = ce(G, Ce, de, ne);
368
+ function Y(i, t, e) {
369
+ const o = V(() => !i.disabled), r = V(() => i.enumData || []);
370
+ function l(p) {
371
+ return p[i.valueField];
371
372
  }
372
- function m(u) {
373
- return u[n.textField];
373
+ function d(p) {
374
+ return p[i.textField];
374
375
  }
375
- function a(u, i) {
376
+ function f(p, a) {
376
377
  if (o.value) {
377
- const c = p(u);
378
- t.value !== c && (t.value = c, e.emit("changeValue", c), e.emit("update:modelValue", c));
378
+ const s = l(p);
379
+ e.value !== s && (e.value = s, t.emit("changeValue", s), t.emit("update:modelValue", s));
379
380
  }
380
- i.stopPropagation();
381
+ a.stopPropagation();
381
382
  }
382
383
  return {
383
384
  enumData: r,
384
- getValue: p,
385
- getText: m,
386
- onClickRadio: a
385
+ getValue: l,
386
+ getText: d,
387
+ onClickRadio: f
387
388
  };
388
389
  }
389
- const F = /* @__PURE__ */ $({
390
+ const I = /* @__PURE__ */ N({
390
391
  name: "FRadioGroup",
391
- props: j,
392
+ props: G,
392
393
  emits: ["changeValue", "update:modelValue"],
393
- setup(n, e) {
394
- const t = k(n.modelValue), {
394
+ setup(i, t) {
395
+ const e = F(i.modelValue), {
395
396
  enumData: o,
396
397
  onClickRadio: r,
397
- getValue: p,
398
- getText: m
399
- } = Q(n, e, t), a = B(() => ({
400
- "farris-checkradio-hor": n.direction === "horizontal"
401
- })), u = k([]);
402
- return K(x, {
403
- radios: u,
404
- parentProps: n,
405
- parentContext: e
406
- }), () => h("div", {
407
- class: ["farris-input-wrap", a.value]
408
- }, [e.slots.default ? e.slots.default() : o.value.map((i, c) => {
409
- const s = "radio_" + n.id + n.name + i[n.valueField];
410
- return h("div", {
398
+ getValue: l,
399
+ getText: d
400
+ } = Y(i, t, e), f = V(() => ({
401
+ "farris-checkradio-hor": i.direction === "horizontal"
402
+ })), p = F([]);
403
+ return K(z, {
404
+ radios: p,
405
+ parentProps: i,
406
+ parentContext: t
407
+ }), () => M("div", {
408
+ class: ["farris-input-wrap", f.value]
409
+ }, [t.slots.default ? t.slots.default() : o.value.map((a, s) => {
410
+ const n = "radio_" + i.id + i.name + a[i.valueField];
411
+ return M("div", {
411
412
  class: "custom-control custom-radio"
412
- }, [h("input", {
413
+ }, [M("input", {
413
414
  type: "radio",
414
415
  class: "custom-control-input",
415
- name: s,
416
- id: s,
417
- value: p(i),
418
- checked: p(i) === t.value,
419
- disabled: n.disabled,
420
- tabindex: n.tabIndex,
421
- onClick: (d) => r(i, d)
422
- }, null), h("label", {
416
+ name: n,
417
+ id: n,
418
+ value: l(a),
419
+ checked: l(a) === e.value,
420
+ disabled: i.disabled,
421
+ tabindex: i.tabIndex,
422
+ onClick: (c) => r(a, c)
423
+ }, null), M("label", {
423
424
  class: "custom-control-label",
424
- for: s
425
- }, [m(i)])]);
425
+ for: n
426
+ }, [d(a)])]);
426
427
  })]);
427
428
  }
428
429
  });
429
- function Te(n, e, t) {
430
- var z;
430
+ function Me(i, t, e) {
431
+ var D;
431
432
  function o() {
432
- t != null && t.resolveComponentContext && t.resolveComponentContext();
433
+ e != null && e.resolveComponentContext && e.resolveComponentContext();
433
434
  }
434
435
  o();
435
- const r = t && t.getStyles && t.getStyles() || "", p = t && t.getDesignerClass && t.getDesignerClass() || "", m = k();
436
- function a() {
437
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
436
+ const r = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", d = F();
437
+ function f() {
438
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
438
439
  }
439
- function u() {
440
+ function p() {
440
441
  return !1;
441
442
  }
442
- function i() {
443
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
443
+ function a() {
444
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
444
445
  }
445
- function c() {
446
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
446
+ function s() {
447
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
447
448
  }
448
- function s(y) {
449
- if (!y || !y.value)
449
+ function n(v) {
450
+ if (!v || !v.value)
450
451
  return null;
451
- if (y.value.schema && y.value.schema.type === "component")
452
- return y.value;
453
- const b = k(y == null ? void 0 : y.value.parent), C = s(b);
454
- return C || null;
455
- }
456
- function d(y = e) {
457
- const { componentInstance: b, designerItemElementRef: C } = y;
458
- return !b || !b.value ? null : b.value.canMove ? C : d(y.parent);
459
- }
460
- function f(y) {
461
- return !!t && t.canAccepts(y);
462
- }
463
- function g() {
464
- return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
465
- }
466
- function T() {
467
- }
468
- function w(y, b) {
469
- b && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(b);
470
- }
471
- function V(y, b) {
472
- const { componentType: C } = y;
473
- let M = O(C, y, b);
474
- t && t.onResolveNewComponentSchema && (M = t.onResolveNewComponentSchema(y, M));
475
- const S = C.toLowerCase().replace("-", "_");
476
- return M && !M.id && M.type === C && (M.id = `${S}_${Math.random().toString().slice(2, 6)}`), M;
477
- }
478
- function G(y, b) {
479
- const C = String(y.getAttribute("data-controltype")), M = y.getAttribute("data-feature"), S = M ? JSON.parse(M) : {};
480
- S.parentComponentInstance = m.value;
481
- let P = O(C, S);
482
- t && t.onAcceptNewChildElement && (P = t.onAcceptNewChildElement(y, b, P));
483
- const Y = C.toLowerCase().replace("-", "_");
484
- return P && !P.id && P.type === C && (P.id = `${Y}_${Math.random().toString().slice(2, 6)}`), P;
485
- }
486
- function A(y) {
487
- }
488
- function R(...y) {
489
- if (t && t.getPropsConfig)
490
- return t.getPropsConfig(...y);
491
- }
492
- return m.value = {
493
- canMove: a(),
494
- canSelectParent: u(),
495
- canDelete: i(),
496
- canNested: !c(),
497
- contents: e == null ? void 0 : e.schema.contents,
498
- elementRef: n,
499
- parent: (z = e == null ? void 0 : e.parent) == null ? void 0 : z.componentInstance,
500
- schema: e == null ? void 0 : e.schema,
452
+ if (v.value.schema && v.value.schema.type === "component")
453
+ return v.value;
454
+ const S = F(v == null ? void 0 : v.value.parent), w = n(S);
455
+ return w || null;
456
+ }
457
+ function c(v = t) {
458
+ const { componentInstance: S, designerItemElementRef: w } = v;
459
+ return !S || !S.value ? null : S.value.canMove ? w : c(v.parent);
460
+ }
461
+ function y(v) {
462
+ return !!e && e.canAccepts(v);
463
+ }
464
+ function u() {
465
+ return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
466
+ }
467
+ function h() {
468
+ }
469
+ function b(v, S) {
470
+ S && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(S);
471
+ }
472
+ function C(v, S) {
473
+ const { componentType: w } = v;
474
+ let T = J(w, v, S);
475
+ e && e.onResolveNewComponentSchema && (T = e.onResolveNewComponentSchema(v, T));
476
+ const A = w.toLowerCase().replace("-", "_");
477
+ return T && !T.id && T.type === w && (T.id = `${A}_${Math.random().toString().slice(2, 6)}`), T;
478
+ }
479
+ function k(v) {
480
+ }
481
+ function E(...v) {
482
+ if (e && e.getPropsConfig)
483
+ return e.getPropsConfig(...v);
484
+ }
485
+ return d.value = {
486
+ canMove: f(),
487
+ canSelectParent: p(),
488
+ canDelete: a(),
489
+ canNested: !s(),
490
+ contents: t == null ? void 0 : t.schema.contents,
491
+ elementRef: i,
492
+ parent: (D = t == null ? void 0 : t.parent) == null ? void 0 : D.componentInstance,
493
+ schema: t == null ? void 0 : t.schema,
501
494
  styles: r,
502
- designerClass: p,
503
- canAccepts: f,
504
- getBelongedComponentInstance: s,
505
- getDraggableDesignItemElement: d,
506
- getDraggingDisplayText: g,
507
- getPropConfig: R,
508
- getDragScopeElement: T,
509
- onAcceptMovedChildElement: w,
510
- onAcceptNewChildElement: G,
511
- onChildElementMovedOut: A,
512
- addNewChildComponentSchema: V,
495
+ designerClass: l,
496
+ canAccepts: y,
497
+ getBelongedComponentInstance: n,
498
+ getDraggableDesignItemElement: c,
499
+ getDraggingDisplayText: u,
500
+ getPropConfig: E,
501
+ getDragScopeElement: h,
502
+ onAcceptMovedChildElement: b,
503
+ onChildElementMovedOut: k,
504
+ addNewChildComponentSchema: C,
513
505
  updateDragAndDropRules: o,
514
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || k(!1),
515
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
516
- }, m;
506
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || F(!1),
507
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || F(!1)
508
+ }, d;
517
509
  }
518
- class we {
519
- constructor(e, t) {
520
- v(this, "componentId");
521
- v(this, "viewModelId");
522
- v(this, "eventsEditorUtils");
523
- v(this, "formSchemaUtils");
524
- v(this, "formMetadataConverter");
525
- v(this, "designViewModelUtils");
526
- v(this, "designViewModelField");
527
- v(this, "controlCreatorUtils");
528
- v(this, "designerHostService");
529
- v(this, "schemaService", null);
530
- v(this, "metadataService", null);
531
- v(this, "propertyConfig", {
510
+ class Se {
511
+ constructor(t, e) {
512
+ g(this, "componentId");
513
+ g(this, "viewModelId");
514
+ g(this, "eventsEditorUtils");
515
+ g(this, "formSchemaUtils");
516
+ g(this, "formMetadataConverter");
517
+ g(this, "designViewModelUtils");
518
+ g(this, "designViewModelField");
519
+ g(this, "controlCreatorUtils");
520
+ g(this, "designerHostService");
521
+ g(this, "schemaService", null);
522
+ g(this, "metadataService", null);
523
+ g(this, "propertyConfig", {
532
524
  type: "object",
533
525
  categories: {}
534
526
  });
535
527
  var o;
536
- this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
528
+ 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;
537
529
  }
538
530
  getTableInfo() {
539
- var e;
540
- return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
531
+ var t;
532
+ return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
541
533
  }
542
- setDesignViewModelField(e) {
543
- const t = e.binding && e.binding.type === "Form" && e.binding.field;
544
- if (t) {
534
+ setDesignViewModelField(t) {
535
+ const e = t.binding && t.binding.type === "Form" && t.binding.field;
536
+ if (e) {
545
537
  if (!this.designViewModelField) {
546
538
  const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
547
- this.designViewModelField = o.fields.find((r) => r.id === t);
539
+ this.designViewModelField = o.fields.find((r) => r.id === e);
548
540
  }
549
- e.updateOn = this.designViewModelField.updateOn;
541
+ t.updateOn = this.designViewModelField.updateOn;
550
542
  }
551
543
  }
552
- changeFieldEditorType(e, t) {
544
+ changeFieldEditorType(t, e) {
553
545
  }
554
- getBasicPropConfig(e) {
546
+ getBasicPropConfig(t) {
555
547
  return {
556
548
  description: "Basic Information",
557
549
  title: "基本信息",
@@ -570,13 +562,13 @@ class we {
570
562
  type: "combo-list",
571
563
  textField: "name",
572
564
  valueField: "value",
573
- data: [{ value: e.type, name: l[e.type].name }]
565
+ data: [{ value: t.type, name: m[t.type].name }]
574
566
  }
575
567
  }
576
568
  }
577
569
  };
578
570
  }
579
- getAppearanceConfig(e = null) {
571
+ getAppearanceConfig(t = null) {
580
572
  return {
581
573
  title: "样式",
582
574
  description: "Appearance",
@@ -596,90 +588,212 @@ class we {
596
588
  }
597
589
  };
598
590
  }
591
+ /**
592
+ *
593
+ * @param propertyId
594
+ * @param componentInstance
595
+ * @returns
596
+ */
597
+ updateElementByParentContainer(t, e) {
598
+ const o = e && e.parent && e.parent.schema;
599
+ if (!o)
600
+ return;
601
+ const r = o.contents.findIndex((d) => d.id === t), l = q(o.contents[r]);
602
+ o.contents.splice(r, 1), o.contents.splice(r, 0, l);
603
+ }
599
604
  }
600
- const D = class D {
605
+ const P = class P {
601
606
  /**
602
607
  * 根据绑定字段类型获取可用的输入类控件
603
608
  */
604
- static getEditorTypesByMDataType(e) {
605
- const t = D.fieldControlTypeMapping[e];
606
- return t || [{ key: "", value: "" }];
609
+ static getEditorTypesByMDataType(t) {
610
+ const e = P.fieldControlTypeMapping[t];
611
+ return e || [{ key: "", value: "" }];
607
612
  }
608
613
  /**
609
614
  * 获取所有输入类控件
610
615
  */
611
616
  static getAllInputTypes() {
612
- const e = [];
613
- for (let t in D.fieldControlTypeMapping)
614
- D.fieldControlTypeMapping[t].forEach((o) => {
615
- e.find((r) => r.key === o.key && r.value === o.value) || e.push({ key: o.key, value: o.value });
617
+ const t = [];
618
+ for (let e in P.fieldControlTypeMapping)
619
+ P.fieldControlTypeMapping[e].forEach((o) => {
620
+ t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
616
621
  });
617
- return e;
622
+ return t;
618
623
  }
619
624
  };
620
625
  /**
621
626
  * <字段类型,可配置的控件类型列表>的映射
622
627
  */
623
- v(D, "fieldControlTypeMapping", {
628
+ g(P, "fieldControlTypeMapping", {
624
629
  String: [
625
- { key: l["input-group"].type, value: l["input-group"].name },
626
- { key: l.lookup.type, value: l.lookup.name },
627
- { key: l["date-picker"].type, value: l["date-picker"].name },
628
- { key: l["check-box"].type, value: l["check-box"].name },
629
- { key: l["radio-group"].type, value: l["radio-group"].name },
630
- { key: l["combo-list"].type, value: l["combo-list"].name },
631
- { key: l.textarea.type, value: l.textarea.name }
630
+ { key: m["input-group"].type, value: m["input-group"].name },
631
+ { key: m.lookup.type, value: m.lookup.name },
632
+ { key: m["date-picker"].type, value: m["date-picker"].name },
633
+ { key: m["check-box"].type, value: m["check-box"].name },
634
+ { key: m["check-group"].type, value: m["check-group"].name },
635
+ { key: m["radio-group"].type, value: m["radio-group"].name },
636
+ { key: m["combo-list"].type, value: m["combo-list"].name },
637
+ { key: m.textarea.type, value: m.textarea.name }
632
638
  ],
633
639
  Text: [
634
- { key: l.textarea.type, value: l.textarea.name },
635
- { key: l.lookup.type, value: l.lookup.name }
640
+ { key: m.textarea.type, value: m.textarea.name },
641
+ { key: m.lookup.type, value: m.lookup.name }
636
642
  ],
637
643
  Decimal: [
638
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
644
+ { key: m["number-spinner"].type, value: m["number-spinner"].name }
639
645
  ],
640
646
  Integer: [
641
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
647
+ { key: m["number-spinner"].type, value: m["number-spinner"].name }
642
648
  ],
643
649
  Number: [
644
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
650
+ { key: m["number-spinner"].type, value: m["number-spinner"].name }
645
651
  ],
646
652
  BigNumber: [
647
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
653
+ { key: m["number-spinner"].type, value: m["number-spinner"].name }
648
654
  ],
649
655
  Date: [
650
- { key: l["date-picker"].type, value: l["date-picker"].name }
656
+ { key: m["date-picker"].type, value: m["date-picker"].name }
651
657
  ],
652
658
  DateTime: [
653
- { key: l["date-picker"].type, value: l["date-picker"].name }
659
+ { key: m["date-picker"].type, value: m["date-picker"].name }
654
660
  ],
655
661
  Boolean: [
656
- { key: l.switch.type, value: l.switch.name },
657
- { key: l["check-box"].type, value: l["check-box"].name }
662
+ { key: m.switch.type, value: m.switch.name },
663
+ { key: m["check-box"].type, value: m["check-box"].name }
658
664
  ],
659
665
  Enum: [
660
- { key: l["combo-list"].type, value: l["combo-list"].name },
661
- { key: l["radio-group"].type, value: l["radio-group"].name }
666
+ { key: m["combo-list"].type, value: m["combo-list"].name },
667
+ { key: m["radio-group"].type, value: m["radio-group"].name }
662
668
  ],
663
669
  Object: [
664
- { key: l.lookup.type, value: l.lookup.name },
665
- { key: l["combo-list"].type, value: l["combo-list"].name },
666
- { key: l["radio-group"].type, value: l["radio-group"].name }
670
+ { key: m.lookup.type, value: m.lookup.name },
671
+ { key: m["combo-list"].type, value: m["combo-list"].name },
672
+ { key: m["radio-group"].type, value: m["radio-group"].name }
667
673
  ]
668
674
  });
669
- let E = D;
670
- const Ve = k(0);
671
- class Pe extends we {
672
- constructor(e, t) {
673
- super(e, t);
674
- }
675
- getPropertyConfig(e, t) {
676
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
677
- }
678
- getBasicProperties(e, t) {
679
- var m;
680
- var o = this;
675
+ let B = P;
676
+ const Fe = F(0);
677
+ class we {
678
+ constructor() {
679
+ /** 控件标题 */
680
+ g(this, "label", "");
681
+ /** 控件id */
682
+ g(this, "id", "");
683
+ /** 每个控件占用的栅格数 */
684
+ g(this, "columnInSM", 12);
685
+ g(this, "columnInMD", 6);
686
+ g(this, "columnInLG", 3);
687
+ g(this, "columnInEL", 2);
688
+ /** 每个控件占用的列数 */
689
+ g(this, "displayWidthInSM", 1);
690
+ g(this, "displayWidthInMD", 1);
691
+ g(this, "displayWidthInLG", 1);
692
+ g(this, "displayWidthInEL", 1);
693
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
694
+ g(this, "displayColumnCountAtBreakPoint", "md");
695
+ /** 控件所在行,传0即可-----编辑器内部使用 */
696
+ g(this, "tagRow", 0);
697
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
698
+ g(this, "showTopBorder", 0);
699
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
700
+ g(this, "group", 1);
701
+ /** 控件是否符合标准的class配置(设计器用的) */
702
+ g(this, "isSupportedClass", !0);
703
+ /** 控件所在分组id(设计器用的) */
704
+ g(this, "fieldSetId", "");
705
+ }
706
+ }
707
+ function Te(i) {
708
+ let t, e;
709
+ const o = /* @__PURE__ */ new Map();
710
+ let r = [];
711
+ function l(s, n) {
712
+ const y = s.split(" ").filter((k) => k.startsWith("col-"));
713
+ if (y.length === 0) {
714
+ n.isSupportedClass = !1;
715
+ return;
716
+ }
717
+ let u = y.find((k) => /^col-([1-9]|10|11|12)$/.test(k)), h = y.find((k) => /^col-md-([1-9]|10|11|12)$/.test(k)), b = y.find((k) => /^col-xl-([1-9]|10|11|12)$/.test(k)), C = y.find((k) => /^col-el-([1-9]|10|11|12)$/.test(k));
718
+ u = u || "col-12", n.columnInSM = parseInt(u.replace("col-", ""), 10), n.displayWidthInSM = n.columnInSM / 12, n.displayWidthInSM !== 1 && (n.isSupportedClass = !1), h = h || "col-md-" + n.columnInSM, n.columnInMD = parseInt(h.replace("col-md-", ""), 10), n.displayWidthInMD = n.columnInMD / 6, [1, 2].includes(n.displayWidthInMD) || (n.isSupportedClass = !1), b = b || "col-xl-" + n.columnInMD, n.columnInLG = parseInt(b.replace("col-xl-", ""), 10), n.displayWidthInLG = n.columnInLG / 3, [1, 2, 3, 4].includes(n.displayWidthInLG) || (n.isSupportedClass = !1), C = C || "col-el-" + n.columnInLG, n.columnInEL = parseInt(C.replace("col-el-", ""), 10), n.displayWidthInEL = n.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(n.displayWidthInEL) || (n.isSupportedClass = !1);
719
+ }
720
+ function d(s, n, c, y = !1) {
721
+ let u = !1;
722
+ s.contents.forEach((h) => {
723
+ if (h.type === "fieldset") {
724
+ c += 1, d(h, n, c, !0), u = !0;
725
+ return;
726
+ }
727
+ u && (c += 1, u = !1);
728
+ const b = h.appearance && h.appearance.class, C = new we();
729
+ b ? l(b, C) : C.isSupportedClass = !1, C.label = h.label || h.id, C.id = h.id, C.group = c, y && (C.fieldSetId = s.id), e === h.id && (t = c), o.set(h.id, h), n.push(C);
730
+ });
731
+ }
732
+ function f(s) {
733
+ const n = i.getComponentById(s);
734
+ if (!n || !n.componentType || !n.componentType.startsWith("form"))
735
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
736
+ const c = i.selectNode(n, (y) => y.type === W["response-form"].type);
737
+ return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
738
+ }
739
+ function p(s, n) {
740
+ n = n || s.id;
741
+ const { result: c, message: y, formNode: u } = f(n);
742
+ if (!c)
743
+ return { result: c, message: y };
744
+ e = s.id, r = [], o.clear();
745
+ const h = u.contents[0].type === W.fieldset.type ? 0 : 1;
746
+ d(u, r, h);
747
+ const b = r.find((k) => !k.isSupportedClass);
748
+ return {
749
+ defaultState: {
750
+ defaultGroupNumber: t || 1,
751
+ model: b ? "customize" : "standard"
752
+ },
753
+ importData: r
754
+ };
755
+ }
756
+ function a(s, n) {
757
+ n = n;
758
+ const { result: c, formNode: y } = f(n);
759
+ if (!c)
760
+ return "";
761
+ const u = [];
762
+ return s.forEach((h) => {
763
+ var k;
764
+ const b = o.get(h.id), C = b.appearance && b.appearance.class;
765
+ if (C) {
766
+ const D = C.split(" ").filter((Z) => !Z.startsWith("col-")), v = "col-" + h.columnInSM, S = "col-md-" + h.columnInMD, w = "col-xl-" + h.columnInLG, T = "col-el-" + h.columnInEL, A = [v, S, w, T].concat(D);
767
+ b.appearance.class = A.join(" ");
768
+ }
769
+ if (h.fieldSetId) {
770
+ const E = y.contents.find((v) => v.id === h.fieldSetId), D = u.find((v) => v.id === h.fieldSetId);
771
+ D ? (k = D.contents) == null || k.push(b) : (u.push(E), E.contents = [b]);
772
+ } else
773
+ u.push(b);
774
+ }), y.contents = u, y.id;
775
+ }
776
+ return {
777
+ checkCanFindFormNode: f,
778
+ checkCanOpenLayoutEditor: p,
779
+ changeFormControlsByResponseLayoutConfig: a,
780
+ getResonseFormLayoutConfig: d
781
+ };
782
+ }
783
+ class Ee extends Se {
784
+ constructor(e, o) {
785
+ super(e, o);
786
+ g(this, "responseLayoutEditorFunction");
787
+ this.responseLayoutEditorFunction = Te(this.formSchemaUtils);
788
+ }
789
+ getPropertyConfig(e, o) {
790
+ 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;
791
+ }
792
+ getBasicProperties(e, o) {
793
+ var f;
794
+ var r = this;
681
795
  this.setDesignViewModelField(e);
682
- const r = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
796
+ const l = this.formSchemaUtils.getFormMetadataBasicInfo(), d = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
683
797
  return {
684
798
  description: "Basic Information",
685
799
  title: "基本信息",
@@ -701,7 +815,7 @@ class Pe extends we {
701
815
  textField: "value",
702
816
  valueField: "key",
703
817
  editable: !1,
704
- data: o.designViewModelField ? E.getEditorTypesByMDataType((m = o.designViewModelField.type) == null ? void 0 : m.name) : E.getAllInputTypes()
818
+ data: r.designViewModelField ? B.getEditorTypesByMDataType((f = r.designViewModelField.type) == null ? void 0 : f.name) : B.getAllInputTypes()
705
819
  }
706
820
  },
707
821
  label: {
@@ -718,7 +832,7 @@ class Pe extends we {
718
832
  bindingType: { enable: !1 },
719
833
  editorParams: {
720
834
  propertyData: e,
721
- formBasicInfo: r
835
+ formBasicInfo: l
722
836
  },
723
837
  columns: [
724
838
  { field: "name", title: "字段名称" },
@@ -726,26 +840,27 @@ class Pe extends we {
726
840
  { field: "fieldType", title: "字段类型" }
727
841
  ],
728
842
  textField: "bindingField",
729
- data: p
843
+ data: d
730
844
  }
731
845
  }
732
846
  },
733
- setPropertyRelates(a, u) {
734
- if (a)
735
- switch (a && a.propertyID) {
847
+ setPropertyRelates(p, a) {
848
+ if (p)
849
+ switch (p && p.propertyID) {
736
850
  case "type": {
737
- o.changeControlType(e, a, t);
851
+ r.changeControlType(e, p, o);
738
852
  break;
739
853
  }
740
854
  case "label": {
741
- a.needRefreshControlTree = !0;
855
+ p.needRefreshControlTree = !0;
742
856
  break;
743
857
  }
744
858
  }
745
859
  }
746
860
  };
747
861
  }
748
- getAppearanceProperties(e) {
862
+ getAppearanceProperties(e, o) {
863
+ var r = this;
749
864
  return {
750
865
  title: "样式",
751
866
  description: "Appearance",
@@ -766,12 +881,25 @@ class Pe extends we {
766
881
  description: "响应式列宽",
767
882
  title: "响应式列宽",
768
883
  type: "boolean",
769
- visible: !1,
884
+ visible: !0,
885
+ // 这个属性,标记当属性变更得时候触发重新更新属性
886
+ refreshPanelAfterChanged: !0,
770
887
  editor: {
771
- type: "response-layout-editor-setting"
772
- },
773
- $converter: "/converter/response-form-layout.converter"
888
+ type: "response-layout-editor-setting",
889
+ initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
890
+ }
774
891
  }
892
+ },
893
+ setPropertyRelates(l, d) {
894
+ if (l)
895
+ switch (l && l.propertyID) {
896
+ case "responseLayout":
897
+ r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, o), delete e.responseLayout;
898
+ break;
899
+ case "class":
900
+ r.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, o);
901
+ break;
902
+ }
775
903
  }
776
904
  };
777
905
  }
@@ -783,44 +911,44 @@ class Pe extends we {
783
911
  * @param propertyData 控件DOM属性
784
912
  * @param newControlType 新控件类型
785
913
  */
786
- changeControlType(e, t, o) {
787
- var i, c, s, d;
788
- const r = t.propertyValue, p = o && o.parent && o.parent.schema;
789
- if (!p)
914
+ changeControlType(e, o, r) {
915
+ var s, n, c, y;
916
+ const l = o.propertyValue, d = r && r.parent && r.parent.schema;
917
+ if (!d)
790
918
  return;
791
- const m = p.contents.findIndex((f) => f.id === e.id), a = p.contents[m];
792
- let u;
919
+ const f = d.contents.findIndex((u) => u.id === e.id), p = d.contents[f];
920
+ let a;
793
921
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
794
922
  editor: {
795
- $type: r
923
+ $type: l
796
924
  },
797
925
  name: this.designViewModelField.name,
798
926
  require: this.designViewModelField.require,
799
927
  readonly: this.designViewModelField.readonly
800
- }, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), u || (u = L("form-group") || {}, u.editor = L(r) || {}, delete u.editor.id, delete u.editor.binding, delete u.editor.appearance), Object.assign(u, {
801
- id: a.id,
802
- appearance: a.appearance,
803
- size: a.size,
804
- label: a.label,
805
- binding: a.binding,
806
- visible: a.visible
807
- }), Object.assign(u.editor, {
808
- isTextArea: u.isTextArea && a.isTextArea,
809
- placeholder: (i = a.editor) == null ? void 0 : i.placeholder,
810
- holdPlace: (c = a.editor) == null ? void 0 : c.holdPlace,
811
- readonly: (s = a.editor) == null ? void 0 : s.readonly,
812
- require: (d = a.editor) == null ? void 0 : d.require
813
- }), p.contents.splice(m, 1), p.contents.splice(m, 0, u), o.schema = Object.assign(a, u), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
814
- (f) => f.classList.remove("dgComponentSelected")
815
- ), Ve.value++;
816
- }
817
- getComponentConfig(e, t = {}, o = {}) {
818
- const r = Object.assign({
928
+ }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(a, {
929
+ id: p.id,
930
+ appearance: p.appearance,
931
+ size: p.size,
932
+ label: p.label,
933
+ binding: p.binding,
934
+ visible: p.visible
935
+ }), Object.assign(a.editor, {
936
+ isTextArea: a.isTextArea && p.isTextArea,
937
+ placeholder: (s = p.editor) == null ? void 0 : s.placeholder,
938
+ holdPlace: (n = p.editor) == null ? void 0 : n.holdPlace,
939
+ readonly: (c = p.editor) == null ? void 0 : c.readonly,
940
+ require: (y = p.editor) == null ? void 0 : y.require
941
+ }), d.contents.splice(f, 1), d.contents.splice(f, 0, a), r.schema = Object.assign(p, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
942
+ (u) => u.classList.remove("dgComponentSelected")
943
+ ), Fe.value++;
944
+ }
945
+ getComponentConfig(e, o = {}, r = {}) {
946
+ const l = Object.assign({
819
947
  description: "编辑器",
820
948
  title: "编辑器",
821
949
  type: "input-group",
822
950
  $converter: "/converter/property-editor.converter"
823
- }, t), p = Object.assign({
951
+ }, o), d = Object.assign({
824
952
  readonly: {
825
953
  description: "",
826
954
  title: "只读",
@@ -841,16 +969,64 @@ class Pe extends we {
841
969
  title: "提示文本",
842
970
  type: "string"
843
971
  }
844
- }, o);
845
- return { ...r, properties: { ...p } };
972
+ }, r);
973
+ return { ...l, properties: { ...d } };
974
+ }
975
+ /**
976
+ * 修改某一输入控件的样式后更新Form的统一布局配置
977
+ * @param controlClass 控件样式
978
+ * @param controlId 控件Id
979
+ * @param componentId 控件所在组件id
980
+ */
981
+ updateUnifiedLayoutAfterControlChanged(e, o, r) {
982
+ const l = e.split(" ");
983
+ let d = l.find((n) => /^col-([1-9]|10|11|12)$/.test(n)), f = l.find((n) => /^col-md-([1-9]|10|11|12)$/.test(n)), p = l.find((n) => /^col-xl-([1-9]|10|11|12)$/.test(n)), a = l.find((n) => /^col-el-([1-9]|10|11|12)$/.test(n));
984
+ d = d || "col-12", f = f || "col-md-" + d.replace("col-", ""), p = p || "col-xl-" + f.replace("col-md-", ""), a = a || "col-el-" + p.replace("col-xl-", "");
985
+ const s = {
986
+ id: o,
987
+ columnInSM: parseInt(d.replace("col-", ""), 10),
988
+ columnInMD: parseInt(f.replace("col-md-", ""), 10),
989
+ columnInLG: parseInt(p.replace("col-xl-", ""), 10),
990
+ columnInEL: parseInt(a.replace("col-el-", ""), 10)
991
+ };
992
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(r, s);
993
+ }
994
+ /**
995
+ * 修改控件布局配置后更新Form统一布局配置
996
+ * @param componentId 组件Id
997
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
998
+ */
999
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
1000
+ const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
1001
+ if (!r || !r.unifiedLayout)
1002
+ return;
1003
+ const l = [];
1004
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, l, 1), o) {
1005
+ const u = l.find((h) => h.id === o.id);
1006
+ Object.assign(u || {}, o);
1007
+ }
1008
+ const d = l.map((u) => u.columnInSM), f = l.map((u) => u.columnInMD), p = l.map((u) => u.columnInLG), a = l.map((u) => u.columnInEL), s = this.checkIsUniqueColumn(d) ? d[0] : null, n = this.checkIsUniqueColumn(f) ? f[0] : null, c = this.checkIsUniqueColumn(p) ? p[0] : null, y = this.checkIsUniqueColumn(a) ? a[0] : null;
1009
+ Object.assign(r.unifiedLayout, {
1010
+ uniqueColClassInSM: s,
1011
+ uniqueColClassInMD: n,
1012
+ uniqueColClassInLG: c,
1013
+ uniqueColClassInEL: y
1014
+ });
1015
+ }
1016
+ /**
1017
+ * 校验宽度样式值是否一致
1018
+ */
1019
+ checkIsUniqueColumn(e) {
1020
+ const o = new Set(e);
1021
+ return Array.from(o).length === 1;
846
1022
  }
847
1023
  }
848
- class De extends Pe {
849
- constructor(e, t) {
850
- super(e, t);
1024
+ class De extends Ee {
1025
+ constructor(t, e) {
1026
+ super(t, e);
851
1027
  }
852
- getEditorProperties(e) {
853
- return this.getComponentConfig(e, { type: "number-spinner" }, {
1028
+ getEditorProperties(t) {
1029
+ return this.getComponentConfig(t, { type: "number-spinner" }, {
854
1030
  readonly: {
855
1031
  visible: !1
856
1032
  },
@@ -881,118 +1057,118 @@ class De extends Pe {
881
1057
  });
882
1058
  }
883
1059
  }
884
- function Fe(n, e) {
885
- n.schema;
886
- const t = k(!0), o = k(!0);
887
- function r(s) {
1060
+ function Pe(i, t) {
1061
+ i.schema;
1062
+ const e = F(!0), o = F(!0);
1063
+ function r(n) {
888
1064
  return !1;
889
1065
  }
890
- function p() {
1066
+ function l() {
891
1067
  return !1;
892
1068
  }
893
- function m() {
1069
+ function d() {
894
1070
  return !1;
895
1071
  }
896
- function a() {
1072
+ function f() {
897
1073
  return !0;
898
1074
  }
899
- function u(s) {
1075
+ function p(n) {
900
1076
  }
901
- function i() {
1077
+ function a() {
902
1078
  }
903
- function c(s) {
1079
+ function s(n) {
904
1080
  return null;
905
1081
  }
906
1082
  return {
907
1083
  canAccepts: r,
908
- checkCanDeleteComponent: p,
909
- checkCanMoveComponent: m,
910
- hideNestedPaddingInDesginerView: a,
911
- onAcceptMovedChildElement: u,
912
- resolveComponentContext: i,
913
- triggerBelongedComponentToMoveWhenMoved: t,
1084
+ checkCanDeleteComponent: l,
1085
+ checkCanMoveComponent: d,
1086
+ hideNestedPaddingInDesginerView: f,
1087
+ onAcceptMovedChildElement: p,
1088
+ resolveComponentContext: a,
1089
+ triggerBelongedComponentToMoveWhenMoved: e,
914
1090
  triggerBelongedComponentToDeleteWhenDeleted: o,
915
- getPropsConfig: c
1091
+ getPropsConfig: s
916
1092
  };
917
1093
  }
918
- function Se(n, e) {
1094
+ function Ie(i, t) {
919
1095
  const {
920
- canAccepts: t,
1096
+ canAccepts: e,
921
1097
  checkCanDeleteComponent: o,
922
1098
  checkCanMoveComponent: r,
923
- hideNestedPaddingInDesginerView: p,
924
- onAcceptMovedChildElement: m,
925
- resolveComponentContext: a,
926
- triggerBelongedComponentToMoveWhenMoved: u,
927
- triggerBelongedComponentToDeleteWhenDeleted: i
928
- } = Fe(n), c = n.schema;
929
- function s(d, f) {
930
- return new De(d, e).getPropertyConfig(c, f);
1099
+ hideNestedPaddingInDesginerView: l,
1100
+ onAcceptMovedChildElement: d,
1101
+ resolveComponentContext: f,
1102
+ triggerBelongedComponentToMoveWhenMoved: p,
1103
+ triggerBelongedComponentToDeleteWhenDeleted: a
1104
+ } = Pe(i), s = i.schema;
1105
+ function n(c, y) {
1106
+ return new De(c, t).getPropertyConfig(s, y);
931
1107
  }
932
1108
  return {
933
- canAccepts: t,
1109
+ canAccepts: e,
934
1110
  checkCanDeleteComponent: o,
935
1111
  checkCanMoveComponent: r,
936
- hideNestedPaddingInDesginerView: p,
937
- onAcceptMovedChildElement: m,
938
- resolveComponentContext: a,
939
- triggerBelongedComponentToMoveWhenMoved: u,
940
- triggerBelongedComponentToDeleteWhenDeleted: i,
941
- getPropsConfig: s
1112
+ hideNestedPaddingInDesginerView: l,
1113
+ onAcceptMovedChildElement: d,
1114
+ resolveComponentContext: f,
1115
+ triggerBelongedComponentToMoveWhenMoved: p,
1116
+ triggerBelongedComponentToDeleteWhenDeleted: a,
1117
+ getPropsConfig: n
942
1118
  };
943
1119
  }
944
- const Be = /* @__PURE__ */ $({
1120
+ const Ve = /* @__PURE__ */ N({
945
1121
  name: "FRadioGroupDesign",
946
- props: j,
1122
+ props: G,
947
1123
  emits: ["changeValue", "update:modelValue"],
948
- setup(n, e) {
949
- const t = k(n.modelValue), {
1124
+ setup(i, t) {
1125
+ const e = F(i.modelValue), {
950
1126
  enumData: o,
951
1127
  onClickRadio: r,
952
- getValue: p,
953
- getText: m
954
- } = Q(n, e, t), a = B(() => ({
955
- "farris-checkradio-hor": n.horizontal
956
- })), u = k(), i = N("designer-host-service"), c = N("design-item-context"), s = Se(c, i), d = Te(u, c, s);
957
- return W(() => {
958
- u.value.componentInstance = d;
959
- }), e.expose(d.value), () => h("div", {
960
- class: ["farris-input-wrap", a.value],
961
- ref: u
962
- }, [o.value.map((f, g) => {
963
- const T = "radio_" + n.name + g;
964
- return h("div", {
1128
+ getValue: l,
1129
+ getText: d
1130
+ } = Y(i, t, e), f = V(() => ({
1131
+ "farris-checkradio-hor": i.horizontal
1132
+ })), p = F(), a = L("designer-host-service"), s = L("design-item-context"), n = Ie(s, a), c = Me(p, s, n);
1133
+ return j(() => {
1134
+ p.value.componentInstance = c;
1135
+ }), t.expose(c.value), () => M("div", {
1136
+ class: ["farris-input-wrap", f.value],
1137
+ ref: p
1138
+ }, [o.value.map((y, u) => {
1139
+ const h = "radio_" + i.name + u;
1140
+ return M("div", {
965
1141
  class: "custom-control custom-radio"
966
- }, [h("input", {
1142
+ }, [M("input", {
967
1143
  type: "radio",
968
1144
  class: "custom-control-input",
969
- name: n.name,
970
- id: T,
971
- value: p(f),
972
- checked: p(f) === t.value,
973
- disabled: n.disabled,
974
- tabindex: n.tabIndex,
975
- onClick: (w) => r(f, w)
976
- }, null), h("label", {
1145
+ name: i.name,
1146
+ id: h,
1147
+ value: l(y),
1148
+ checked: l(y) === e.value,
1149
+ disabled: i.disabled,
1150
+ tabindex: i.tabIndex,
1151
+ onClick: (b) => r(y, b)
1152
+ }, null), M("label", {
977
1153
  class: "custom-control-label",
978
- for: T
979
- }, [m(f)])]);
1154
+ for: h
1155
+ }, [d(y)])]);
980
1156
  })]);
981
1157
  }
982
1158
  });
983
- F.install = (n) => {
984
- n.component(F.name, F), n.component(q.name, q);
1159
+ I.install = (i) => {
1160
+ i.component(I.name, I), i.component(O.name, O);
985
1161
  };
986
- F.register = (n, e, t, o) => {
987
- n["radio-group"] = F, e["radio-group"] = X;
1162
+ I.register = (i, t, e, o) => {
1163
+ i["radio-group"] = I, t["radio-group"] = Q;
988
1164
  };
989
- F.registerDesigner = (n, e, t) => {
990
- n["radio-group"] = Be, e["radio-group"] = X;
1165
+ I.registerDesigner = (i, t, e) => {
1166
+ i["radio-group"] = Ve, t["radio-group"] = Q;
991
1167
  };
992
1168
  export {
993
- F as RadioGroup,
994
- F as default,
995
- X as propsResolver,
996
- j as radioGroupProps,
997
- ne as radioProps
1169
+ I as RadioGroup,
1170
+ I as default,
1171
+ Q as propsResolver,
1172
+ G as radioGroupProps,
1173
+ te as radioProps
998
1174
  };