@farris/ui-vue 1.2.8 → 1.3.0

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 (283) hide show
  1. package/components/accordion/index.esm.js +180 -180
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +419 -331
  4. package/components/avatar/index.umd.cjs +1 -0
  5. package/components/border-editor/index.umd.cjs +1 -0
  6. package/components/button/index.umd.cjs +1 -0
  7. package/components/button-edit/index.css +1 -1
  8. package/components/button-edit/index.esm.js +346 -326
  9. package/components/button-edit/index.umd.cjs +1 -0
  10. package/components/button-group/index.umd.cjs +1 -0
  11. package/components/calculator/index.umd.cjs +1 -0
  12. package/components/calendar/index.esm.js +384 -384
  13. package/components/calendar/index.umd.cjs +1 -0
  14. package/components/capsule/index.esm.js +205 -205
  15. package/components/capsule/index.umd.cjs +1 -0
  16. package/components/checkbox/index.esm.js +555 -467
  17. package/components/checkbox/index.umd.cjs +1 -0
  18. package/components/color-picker/index.esm.js +239 -239
  19. package/components/color-picker/index.umd.cjs +3 -0
  20. package/components/combo-list/index.css +1 -0
  21. package/components/combo-list/index.esm.js +1072 -364
  22. package/components/combo-list/index.umd.cjs +1 -0
  23. package/components/combo-tree/index.esm.js +129 -129
  24. package/components/combo-tree/index.umd.cjs +1 -0
  25. package/components/common/index.esm.js +778 -700
  26. package/components/common/index.umd.cjs +1 -0
  27. package/components/component/index.esm.js +582 -327
  28. package/components/component/index.umd.cjs +1 -0
  29. package/components/condition/index.css +1 -0
  30. package/components/condition/index.esm.js +2433 -1134
  31. package/components/condition/index.umd.cjs +1 -0
  32. package/components/content-container/index.esm.js +307 -234
  33. package/components/content-container/index.umd.cjs +1 -0
  34. package/components/data-grid/index.css +1 -1
  35. package/components/data-grid/index.esm.js +6762 -4946
  36. package/components/data-grid/index.umd.cjs +1 -0
  37. package/components/data-view/index.css +1 -0
  38. package/components/data-view/index.esm.js +4977 -3489
  39. package/components/data-view/index.umd.cjs +1 -0
  40. package/components/date-picker/index.css +1 -1
  41. package/components/date-picker/index.esm.js +3525 -2811
  42. package/components/date-picker/index.umd.cjs +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +938 -928
  45. package/components/designer-canvas/index.umd.cjs +1 -0
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +38 -37
  48. package/components/designer-outline/index.umd.cjs +1 -0
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -0
  51. package/components/discussion-editor/index.umd.cjs +3 -0
  52. package/components/discussion-list/index.umd.cjs +1 -0
  53. package/components/drawer/index.umd.cjs +1 -0
  54. package/components/dropdown/index.esm.js +282 -282
  55. package/components/dropdown/index.umd.cjs +2 -0
  56. package/components/dynamic-form/index.css +1 -0
  57. package/components/dynamic-form/index.esm.js +2684 -1039
  58. package/components/dynamic-form/index.umd.cjs +1 -0
  59. package/components/dynamic-resolver/index.esm.js +149 -101
  60. package/components/dynamic-resolver/index.umd.cjs +1 -0
  61. package/components/dynamic-view/index.esm.js +303 -290
  62. package/components/dynamic-view/index.umd.cjs +1 -0
  63. package/components/enum-editor/index.umd.cjs +1 -0
  64. package/components/events-editor/index.esm.js +573 -518
  65. package/components/events-editor/index.umd.cjs +1 -0
  66. package/components/expression-editor/index.esm.js +99 -99
  67. package/components/expression-editor/index.umd.cjs +1 -0
  68. package/components/external-container/index.css +1 -1
  69. package/components/external-container/index.esm.js +3607 -2799
  70. package/components/external-container/index.umd.cjs +1 -0
  71. package/components/field-selector/index.css +1 -1
  72. package/components/field-selector/index.esm.js +5438 -8236
  73. package/components/field-selector/index.umd.cjs +1 -0
  74. package/components/filter-bar/index.css +1 -1
  75. package/components/filter-bar/index.esm.js +1679 -1759
  76. package/components/filter-bar/index.umd.cjs +1 -0
  77. package/components/flow-canvas/index.css +1 -1
  78. package/components/flow-canvas/index.esm.js +1062 -1052
  79. package/components/flow-canvas/index.umd.cjs +1 -0
  80. package/components/image-cropper/index.esm.js +421 -421
  81. package/components/image-cropper/index.umd.cjs +1 -0
  82. package/components/input-group/index.esm.js +677 -593
  83. package/components/input-group/index.umd.cjs +1 -0
  84. package/components/layout/index.esm.js +326 -326
  85. package/components/layout/index.umd.cjs +1 -0
  86. package/components/list-nav/index.esm.js +272 -199
  87. package/components/list-nav/index.umd.cjs +1 -0
  88. package/components/list-view/index.css +1 -1
  89. package/components/list-view/index.esm.js +3739 -2273
  90. package/components/list-view/index.umd.cjs +1 -0
  91. package/components/loading/index.umd.cjs +8 -0
  92. package/components/locale/index.umd.cjs +1 -0
  93. package/components/lookup/index.css +1 -1
  94. package/components/lookup/index.esm.js +11255 -9004
  95. package/components/lookup/index.umd.cjs +1 -0
  96. package/components/mapping-editor/index.css +1 -1
  97. package/components/mapping-editor/index.esm.js +6046 -5314
  98. package/components/mapping-editor/index.umd.cjs +1 -0
  99. package/components/message-box/index.css +1 -1
  100. package/components/message-box/index.esm.js +511 -471
  101. package/components/message-box/index.umd.cjs +1 -0
  102. package/components/modal/index.css +1 -1
  103. package/components/modal/index.esm.js +438 -398
  104. package/components/modal/index.umd.cjs +1 -0
  105. package/components/nav/index.esm.js +588 -444
  106. package/components/nav/index.umd.cjs +3 -0
  107. package/components/notify/index.esm.js +59 -53
  108. package/components/notify/index.umd.cjs +1 -0
  109. package/components/number-range/index.esm.js +568 -485
  110. package/components/number-range/index.umd.cjs +1 -0
  111. package/components/number-spinner/index.esm.js +542 -454
  112. package/components/number-spinner/index.umd.cjs +1 -0
  113. package/components/order/index.css +1 -1
  114. package/components/order/index.esm.js +1967 -1105
  115. package/components/order/index.umd.cjs +1 -0
  116. package/components/page-footer/index.esm.js +160 -160
  117. package/components/page-footer/index.umd.cjs +1 -0
  118. package/components/page-header/index.esm.js +1282 -1151
  119. package/components/page-header/index.umd.cjs +1 -0
  120. package/components/pagination/index.esm.js +705 -555
  121. package/components/pagination/index.umd.cjs +1 -0
  122. package/components/popover/index.esm.js +71 -70
  123. package/components/popover/index.umd.cjs +1 -0
  124. package/components/progress/index.esm.js +270 -270
  125. package/components/progress/index.umd.cjs +3 -0
  126. package/components/property-editor/index.css +1 -1
  127. package/components/property-editor/index.esm.js +2231 -1517
  128. package/components/property-editor/index.umd.cjs +3 -0
  129. package/components/property-panel/index.esm.js +813 -909
  130. package/components/property-panel/index.umd.cjs +1 -0
  131. package/components/query-solution/index.css +1 -1
  132. package/components/query-solution/index.esm.js +3781 -2566
  133. package/components/query-solution/index.umd.cjs +1 -0
  134. package/components/radio-button/index.esm.js +101 -101
  135. package/components/radio-button/index.umd.cjs +1 -0
  136. package/components/radio-group/index.esm.js +538 -450
  137. package/components/radio-group/index.umd.cjs +1 -0
  138. package/components/rate/index.esm.js +238 -233
  139. package/components/rate/index.umd.cjs +1 -0
  140. package/components/response-layout/index.esm.js +155 -155
  141. package/components/response-layout/index.umd.cjs +1 -0
  142. package/components/response-layout-editor/index.css +1 -1
  143. package/components/response-layout-editor/index.esm.js +1243 -1180
  144. package/components/response-layout-editor/index.umd.cjs +1 -0
  145. package/components/response-toolbar/index.esm.js +988 -877
  146. package/components/response-toolbar/index.umd.cjs +1 -0
  147. package/components/schema-selector/index.css +1 -1
  148. package/components/schema-selector/index.esm.js +5413 -4867
  149. package/components/schema-selector/index.umd.cjs +8 -0
  150. package/components/search-box/index.esm.js +199 -199
  151. package/components/search-box/index.umd.cjs +1 -0
  152. package/components/section/index.esm.js +646 -503
  153. package/components/section/index.umd.cjs +1 -0
  154. package/components/smoke-detector/index.esm.js +144 -144
  155. package/components/smoke-detector/index.umd.cjs +1 -0
  156. package/components/spacing-editor/index.umd.cjs +1 -0
  157. package/components/splitter/index.esm.js +464 -391
  158. package/components/splitter/index.umd.cjs +1 -0
  159. package/components/step/index.esm.js +249 -249
  160. package/components/step/index.umd.cjs +1 -0
  161. package/components/switch/index.esm.js +483 -394
  162. package/components/switch/index.umd.cjs +1 -0
  163. package/components/tabs/index.css +1 -1
  164. package/components/tabs/index.esm.js +2366 -2208
  165. package/components/tabs/index.umd.cjs +1 -0
  166. package/components/tags/index.esm.js +397 -399
  167. package/components/tags/index.umd.cjs +1 -0
  168. package/components/text/index.esm.js +394 -394
  169. package/components/text/index.umd.cjs +1 -0
  170. package/components/textarea/index.esm.js +451 -367
  171. package/components/textarea/index.umd.cjs +1 -0
  172. package/components/time-picker/index.css +1 -1
  173. package/components/time-picker/index.esm.js +1252 -1144
  174. package/components/time-picker/index.umd.cjs +1 -0
  175. package/components/tooltip/index.umd.cjs +1 -0
  176. package/components/transfer/index.css +1 -1
  177. package/components/transfer/index.esm.js +510 -499
  178. package/components/transfer/index.umd.cjs +1 -0
  179. package/components/tree-grid/index.css +1 -1
  180. package/components/tree-grid/index.esm.js +5463 -9330
  181. package/components/tree-grid/index.umd.cjs +1 -0
  182. package/components/tree-view/index.css +1 -0
  183. package/components/tree-view/index.esm.js +4058 -2597
  184. package/components/tree-view/index.umd.cjs +1 -0
  185. package/components/uploader/index.esm.js +510 -504
  186. package/components/uploader/index.umd.cjs +2 -0
  187. package/components/verify-detail/index.esm.js +220 -220
  188. package/components/verify-detail/index.umd.cjs +1 -0
  189. package/components/video/index.esm.js +653 -394
  190. package/components/video/index.umd.cjs +1 -0
  191. package/components/weather/index.esm.js +1028 -1028
  192. package/components/weather/index.umd.cjs +16 -0
  193. package/farris.all.esm.js +20407 -18556
  194. package/farris.all.umd.cjs +8 -8
  195. package/index.css +1 -1
  196. package/package.json +1 -1
  197. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  198. package/types/capsule/src/capsule.props.d.ts +2 -2
  199. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  200. package/types/common/entity/entity-schema.d.ts +258 -0
  201. package/types/common/index.d.ts +1 -0
  202. package/types/common/types.d.ts +1 -1
  203. package/types/common/utils/encrypt.d.ts +2 -0
  204. package/types/component/src/component-ref.props.d.ts +4 -0
  205. package/types/component/src/component.props.d.ts +7 -0
  206. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  207. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  208. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  209. package/types/components.d.ts +1 -0
  210. package/types/data-grid/index.d.ts +8 -2
  211. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  212. package/types/data-grid/src/data-grid.component.d.ts +3 -1
  213. package/types/data-grid/src/data-grid.props.d.ts +3 -2
  214. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  215. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  216. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  217. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  218. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  219. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  220. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  221. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  222. package/types/data-view/composition/types.d.ts +36 -7
  223. package/types/data-view/composition/use-edit.d.ts +2 -1
  224. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  225. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  226. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  227. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  228. package/types/designer-canvas/src/types.d.ts +2 -2
  229. package/types/dynamic-form/index.d.ts +2 -1
  230. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  231. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  232. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  233. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  234. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  235. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  236. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  237. package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
  238. package/types/dynamic-form/src/types.d.ts +12 -1
  239. package/types/dynamic-resolver/index.d.ts +1 -0
  240. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  241. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  242. package/types/dynamic-resolver/src/types.d.ts +12 -2
  243. package/types/dynamic-view/index.d.ts +1 -0
  244. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  245. package/types/index.d.ts +2 -0
  246. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  247. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  248. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  249. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  250. package/types/lookup/src/composition/types.d.ts +8 -0
  251. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  252. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  253. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  254. package/types/lookup/src/composition/use-http.d.ts +9 -5
  255. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  256. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  257. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  258. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  259. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  260. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  261. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  262. package/types/modal/src/modal.component.d.ts +3 -0
  263. package/types/modal/src/modal.props.d.ts +4 -0
  264. package/types/page-header/src/page-header.props.d.ts +1 -0
  265. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  266. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  267. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  268. package/types/response-layout-editor/src/type.d.ts +21 -0
  269. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  270. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  271. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  272. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  273. package/types/tabs/src/composition/types.d.ts +2 -2
  274. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  275. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  276. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  277. package/types/tabs/src/tabs.props.d.ts +1 -0
  278. package/types/tags/index.d.ts +36 -5
  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/modal/src/composition/use-esc.d.ts +0 -1
  282. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  283. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,102 +1,103 @@
1
- var X = Object.defineProperty;
2
- var Y = (n, e, t) => e in n ? X(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var v = (n, e, t) => Y(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as G, ref as M, computed as P, onMounted as W, createVNode as w, withDirectives as Z, vModelText as H, inject as O } from "vue";
5
- import { cloneDeep as I } from "lodash-es";
6
- import { useTextBox as K, useClear as R } from "../common/index.esm.js";
7
- import { getSchemaByType as q } from "../dynamic-resolver/index.esm.js";
8
- const z = {}, J = {};
9
- function $(n) {
10
- const { properties: e, title: t } = n, o = Object.keys(e).reduce((r, s) => (r[s] = e[s].type === "object" && e[s].properties ? $(e[s]) : I(e[s].default), r), {});
11
- return o.id = `${t}-${Date.now()}`, o;
1
+ var Y = Object.defineProperty;
2
+ var Z = (n, t, e) => t in n ? Y(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var g = (n, t, e) => Z(n, typeof t != "symbol" ? t + "" : t, e);
4
+ import { defineComponent as G, ref as k, computed as E, onMounted as W, createVNode as w, withDirectives as H, vModelText as R, inject as O } from "vue";
5
+ import { isPlainObject as q, cloneDeep as z } from "lodash-es";
6
+ import { useTextBox as K, useClear as ee } from "../common/index.esm.js";
7
+ import { getSchemaByType as j } from "../dynamic-resolver/index.esm.js";
8
+ import { useResponseLayoutEditorSetting as te } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
9
+ const J = {}, X = {};
10
+ function N(n) {
11
+ const { properties: t, title: e, ignore: o } = n, r = o && Array.isArray(o), i = Object.keys(t).reduce((l, d) => ((!r || !o.find((p) => p == d)) && (l[d] = t[d].type === "object" && t[d].properties ? N(t[d]) : z(t[d].default)), l), {});
12
+ return (!r || !o.find((l) => l == "id")) && (i.id = `${e}-${Date.now()}`), i;
12
13
  }
13
- function N(n, e = {}) {
14
- const t = z[n];
15
- if (t) {
16
- let o = $(t);
17
- const r = J[n];
18
- return o = r ? r({ getSchemaByType: N }, o, e) : o, o;
14
+ function U(n, t = {}, e) {
15
+ const o = J[n];
16
+ if (o) {
17
+ let r = N(o);
18
+ const i = X[n];
19
+ return r = i ? i({ getSchemaByType: U }, r, t, e) : r, r;
19
20
  }
20
21
  return null;
21
22
  }
22
- function ee(n, e) {
23
- const t = $(e);
24
- 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;
23
+ function ne(n, t) {
24
+ const e = N(t);
25
+ return Object.keys(n).reduce((o, r) => (o[r] && q(o[r]) && q(n[r]) ? Object.assign(o[r], n[r]) : o[r] = n[r], o), e), e;
25
26
  }
26
- function te(n, e) {
27
+ function oe(n, t) {
27
28
  return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
28
- if (e.has(r)) {
29
- const s = e.get(r);
30
- if (typeof s == "string")
31
- o[s] = n[r];
29
+ if (t.has(r)) {
30
+ const i = t.get(r);
31
+ if (typeof i == "string")
32
+ o[i] = n[r];
32
33
  else {
33
- const d = s(r, n[r], n);
34
- Object.assign(o, d);
34
+ const l = i(r, n[r], n);
35
+ Object.assign(o, l);
35
36
  }
36
37
  } else
37
38
  o[r] = n[r];
38
39
  return o;
39
40
  }, {});
40
41
  }
41
- function ne(n, e, t = /* @__PURE__ */ new Map()) {
42
- const o = ee(n, e);
43
- return te(o, t);
42
+ function re(n, t, e = /* @__PURE__ */ new Map()) {
43
+ const o = ne(n, t);
44
+ return oe(o, e);
44
45
  }
45
- function oe(n = {}) {
46
- function e(a, l, c, u) {
47
- if (typeof c == "number")
48
- return u[a].length === c;
49
- if (typeof c == "object") {
50
- const f = Object.keys(c)[0], h = c[f];
51
- if (f === "not")
52
- return Number(u[a].length) !== Number(h);
53
- if (f === "moreThan")
54
- return Number(u[a].length) >= Number(h);
55
- if (f === "lessThan")
56
- return Number(u[a].length) <= Number(h);
46
+ function ae(n = {}) {
47
+ function t(a, u, s, m) {
48
+ if (typeof s == "number")
49
+ return m[a].length === s;
50
+ if (typeof s == "object") {
51
+ const h = Object.keys(s)[0], y = s[h];
52
+ if (h === "not")
53
+ return Number(m[a].length) !== Number(y);
54
+ if (h === "moreThan")
55
+ return Number(m[a].length) >= Number(y);
56
+ if (h === "lessThan")
57
+ return Number(m[a].length) <= Number(y);
57
58
  }
58
59
  return !1;
59
60
  }
60
- function t(a, l, c, u) {
61
- return u[a] && u[a].propertyValue && String(u[a].propertyValue.value) === String(c);
61
+ function e(a, u, s, m) {
62
+ return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(s);
62
63
  }
63
64
  const o = /* @__PURE__ */ new Map([
64
- ["length", e],
65
- ["getProperty", t]
65
+ ["length", t],
66
+ ["getProperty", e]
66
67
  ]);
67
- Object.keys(n).reduce((a, l) => (a.set(l, n[l]), a), o);
68
- function r(a, l) {
69
- const c = a;
70
- return typeof l == "number" ? [{ target: c, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: c, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((u) => {
71
- if (u === "length")
72
- return { target: c, operator: "length", param: null, value: l[u] };
73
- const f = u, h = l[u];
74
- return { target: c, operator: "getProperty", param: f, value: h };
68
+ Object.keys(n).reduce((a, u) => (a.set(u, n[u]), a), o);
69
+ function r(a, u) {
70
+ const s = a;
71
+ return typeof u == "number" ? [{ target: s, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: s, operator: "getProperty", param: a, value: !!u }] : typeof u == "object" ? Object.keys(u).map((m) => {
72
+ if (m === "length")
73
+ return { target: s, operator: "length", param: null, value: u[m] };
74
+ const h = m, y = u[m];
75
+ return { target: s, operator: "getProperty", param: h, value: y };
75
76
  }) : [];
76
77
  }
77
- function s(a) {
78
- return Object.keys(a).reduce((c, u) => {
79
- const f = r(u, a[u]);
80
- return c.push(...f), c;
78
+ function i(a) {
79
+ return Object.keys(a).reduce((s, m) => {
80
+ const h = r(m, a[m]);
81
+ return s.push(...h), s;
81
82
  }, []);
82
83
  }
83
- function d(a, l) {
84
+ function l(a, u) {
84
85
  if (o.has(a.operator)) {
85
- const c = o.get(a.operator);
86
- return c && c(a.target, a.param, a.value, l) || !1;
86
+ const s = o.get(a.operator);
87
+ return s && s(a.target, a.param, a.value, u) || !1;
87
88
  }
88
89
  return !1;
89
90
  }
90
- function p(a, l) {
91
- return s(a).reduce((f, h) => f && d(h, l), !0);
91
+ function d(a, u) {
92
+ return i(a).reduce((h, y) => h && l(y, u), !0);
92
93
  }
93
- function m(a, l) {
94
- const c = Object.keys(a), u = c.includes("allOf"), f = c.includes("anyOf"), h = u || f, T = (h ? a[h ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((B) => p(B, l));
95
- return u ? !T.includes(!1) : T.includes(!0);
94
+ function p(a, u) {
95
+ const s = Object.keys(a), m = s.includes("allOf"), h = s.includes("anyOf"), y = m || h, V = (y ? a[y ? m ? "allOf" : "anyOf" : "allOf"] : [a]).map((P) => d(P, u));
96
+ return m ? !V.includes(!1) : V.includes(!0);
96
97
  }
97
- return { parseValueSchema: m };
98
+ return { parseValueSchema: p };
98
99
  }
99
- const i = {
100
+ const c = {
100
101
  button: { type: "button", name: "按钮", icon: "Button" },
101
102
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
102
103
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -133,21 +134,22 @@ const i = {
133
134
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
134
135
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
135
136
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
136
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
137
- }, re = {}, ae = {};
138
- oe();
139
- function ie(n, e, t = /* @__PURE__ */ new Map(), o = (d, p, m) => p, r = {}, s = (d) => d) {
140
- return z[e.title] = e, J[e.title] = o, re[e.title] = r, ae[e.title] = s, (d = {}) => {
141
- const p = ne(d, e, t), m = Object.keys(n).reduce((a, l) => (a[l] = n[l].default, a), {});
142
- return Object.assign(m, p);
137
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
138
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
139
+ }, ie = {}, le = {};
140
+ ae();
141
+ function se(n, t, e = /* @__PURE__ */ new Map(), o = (l, d, p) => d, r = {}, i = (l) => l) {
142
+ return J[t.title] = t, X[t.title] = o, ie[t.title] = r, le[t.title] = i, (l = {}) => {
143
+ const d = re(l, t, e), p = Object.keys(n).reduce((a, u) => (a[u] = n[u].default, a), {});
144
+ return Object.assign(p, d);
143
145
  };
144
146
  }
145
- function le(n, e) {
146
- return { customClass: e.class, customStyle: e.style };
147
+ function ce(n, t) {
148
+ return { customClass: t.class, customStyle: t.style };
147
149
  }
148
- const ce = /* @__PURE__ */ new Map([
149
- ["appearance", le]
150
- ]), se = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/switch.schema.json", ue = "textarea", de = "A Farris Component", me = "object", ye = {
150
+ const pe = /* @__PURE__ */ new Map([
151
+ ["appearance", ce]
152
+ ]), ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-design.gitee.io/switch.schema.json", me = "textarea", ye = "A Farris Component", fe = "object", he = {
151
153
  id: {
152
154
  description: "The unique identifier for a textarea",
153
155
  type: "string"
@@ -208,23 +210,28 @@ const ce = /* @__PURE__ */ new Map([
208
210
  description: "",
209
211
  type: "boolean",
210
212
  default: !0
211
- }
212
- }, fe = [
213
+ },
214
+ ignore: [
215
+ "id",
216
+ "appearance",
217
+ "binding"
218
+ ]
219
+ }, ge = [
213
220
  "id",
214
221
  "type"
215
- ], ge = {
216
- $schema: se,
217
- $id: pe,
218
- title: ue,
219
- description: de,
220
- type: me,
221
- properties: ye,
222
- required: fe
222
+ ], ve = {
223
+ $schema: ue,
224
+ $id: de,
225
+ title: me,
226
+ description: ye,
227
+ type: fe,
228
+ properties: he,
229
+ required: ge
223
230
  };
224
- function he(n, e, t) {
225
- return e;
231
+ function be(n, t, e) {
232
+ return t;
226
233
  }
227
- const L = {
234
+ const $ = {
228
235
  /** 自动聚焦 */
229
236
  autofocus: { type: Boolean, default: !1 },
230
237
  /** 自动完成 */
@@ -253,37 +260,37 @@ const L = {
253
260
  showBorder: { Type: Boolean, default: !0 },
254
261
  /** 键盘按键索引 */
255
262
  tabIndex: { type: Number, default: -1 }
256
- }, _ = ie(L, ge, ce, he), E = /* @__PURE__ */ G({
263
+ }, _ = se($, ve, pe, be), A = /* @__PURE__ */ G({
257
264
  name: "FTextarea",
258
- props: L,
265
+ props: $,
259
266
  emits: ["update:modelValue", "valueChange"],
260
- setup(n, e) {
261
- const t = M(), o = M(n.modelValue), r = P(() => n.modelValue), s = K(n, e, o, r), {
262
- inputGroupClass: d,
263
- onBlur: p,
264
- onFocus: m
265
- } = s, a = R(n, e, s), {
266
- onMouseEnter: l,
267
- onMouseLeave: c,
268
- clearButtonClass: u,
269
- shouldShowClearButton: f,
270
- clearButtonStyle: h
271
- } = a, x = P(() => n.maxLength ? n.maxLength : n.modelValue.length), D = (C) => {
272
- var B, S;
273
- C.stopPropagation(), e.emit("update:modelValue", (B = C.target) == null ? void 0 : B.value), e.emit("valueChange", (S = C.target) == null ? void 0 : S.value);
274
- }, T = (C) => {
275
- C.stopPropagation(), t.value.value = "", e.emit("update:modelValue", ""), e.emit("valueChange", "");
267
+ setup(n, t) {
268
+ const e = k(), o = k(n.modelValue), r = E(() => n.modelValue), i = K(n, t, o, r), {
269
+ inputGroupClass: l,
270
+ onBlur: d,
271
+ onFocus: p
272
+ } = i, a = ee(n, t, i), {
273
+ onMouseEnter: u,
274
+ onMouseLeave: s,
275
+ clearButtonClass: m,
276
+ shouldShowClearButton: h,
277
+ clearButtonStyle: y
278
+ } = a, T = E(() => n.maxLength ? n.maxLength : n.modelValue.length), x = (v) => {
279
+ var P, F;
280
+ v.stopPropagation(), t.emit("update:modelValue", (P = v.target) == null ? void 0 : P.value), t.emit("valueChange", (F = v.target) == null ? void 0 : F.value);
281
+ }, V = (v) => {
282
+ v.stopPropagation(), e.value.value = "", t.emit("update:modelValue", ""), t.emit("valueChange", "");
276
283
  };
277
284
  return W(() => {
278
285
  }), () => w("div", {
279
- class: d.value,
280
- onMouseenter: l,
281
- onMouseleave: c,
286
+ class: l.value,
287
+ onMouseenter: u,
288
+ onMouseleave: s,
282
289
  style: "position:relative"
283
- }, [Z(w("textarea", {
290
+ }, [H(w("textarea", {
284
291
  id: n.id,
285
- "onUpdate:modelValue": (C) => n.modelValue = C,
286
- ref: t,
292
+ "onUpdate:modelValue": (v) => n.modelValue = v,
293
+ ref: e,
287
294
  minlength: n.minLength,
288
295
  maxlength: n.maxLength ? n.maxLength : null,
289
296
  tabindex: n.tabIndex,
@@ -293,148 +300,148 @@ const L = {
293
300
  placeholder: n.placeholder,
294
301
  autofocus: n.autofocus,
295
302
  rows: n.rows,
296
- onInput: D,
297
- onFocus: m,
298
- onBlur: p,
299
- style: "box-shadow: 0 0 0 1px #dcdfe6 inset; border: none; border-radius:6px; padding:5px 10px; width:100%"
300
- }, null), [[H, n.modelValue]]), f.value && w("span", {
303
+ onInput: x,
304
+ onFocus: p,
305
+ onBlur: d,
306
+ style: "border-radius:6px; padding:5px 10px; width:100%"
307
+ }, null), [[R, n.modelValue]]), h.value && w("span", {
301
308
  id: "clearIcon",
302
- class: u.value,
303
- style: h.value,
304
- onClick: (C) => T(C)
309
+ class: m.value,
310
+ style: y.value,
311
+ onClick: (v) => V(v)
305
312
  }, [w("i", {
306
313
  class: "f-icon modal_close"
307
314
  }, null)]), n.showCount && w("span", {
308
315
  style: "position: absolute;bottom: 5px;right: 10px"
309
- }, [`${n.modelValue.length}/${x.value}`])]);
316
+ }, [`${n.modelValue.length}/${T.value}`])]);
310
317
  }
311
318
  });
312
- function be(n, e, t) {
313
- var U;
319
+ function Ce(n, t, e) {
320
+ var I;
314
321
  function o() {
315
- t != null && t.resolveComponentContext && t.resolveComponentContext();
322
+ e != null && e.resolveComponentContext && e.resolveComponentContext();
316
323
  }
317
324
  o();
318
- const r = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", d = M();
319
- function p() {
320
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
325
+ const r = e && e.getStyles && e.getStyles() || "", i = e && e.getDesignerClass && e.getDesignerClass() || "", l = k();
326
+ function d() {
327
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
321
328
  }
322
- function m() {
329
+ function p() {
323
330
  return !1;
324
331
  }
325
332
  function a() {
326
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
333
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
327
334
  }
328
- function l() {
329
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
335
+ function u() {
336
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
330
337
  }
331
- function c(y) {
332
- if (!y || !y.value)
338
+ function s(f) {
339
+ if (!f || !f.value)
333
340
  return null;
334
- if (y.value.schema && y.value.schema.type === "component")
335
- return y.value;
336
- const b = M(y == null ? void 0 : y.value.parent), g = c(b);
337
- return g || null;
338
- }
339
- function u(y = e) {
340
- const { componentInstance: b, designerItemElementRef: g } = y;
341
- return !b || !b.value ? null : b.value.canMove ? g : u(y.parent);
342
- }
343
- function f(y) {
344
- return !!t && t.canAccepts(y);
345
- }
346
- function h() {
347
- return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
348
- }
349
- function x() {
350
- }
351
- function D(y, b) {
352
- b && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(b);
353
- }
354
- function T(y) {
355
- const { componentType: b } = y;
356
- let g = N(b, y);
357
- t && t.onResolveNewComponentSchema && (g = t.onResolveNewComponentSchema(y, g));
358
- const F = b.toLowerCase().replace("-", "_");
359
- return g && !g.id && g.type === b && (g.id = `${F}_${Math.random().toString().slice(2, 6)}`), g;
360
- }
361
- function C(y, b) {
362
- const g = String(y.getAttribute("data-controltype")), F = y.getAttribute("data-feature"), j = F ? JSON.parse(F) : {};
363
- j.parentComponentInstance = d.value;
364
- let k = N(g, j);
365
- t && t.onAcceptNewChildElement && (k = t.onAcceptNewChildElement(y, b, k));
366
- const Q = g.toLowerCase().replace("-", "_");
367
- return k && !k.id && k.type === g && (k.id = `${Q}_${Math.random().toString().slice(2, 6)}`), k;
368
- }
369
- function B(y) {
370
- }
371
- function S(...y) {
372
- if (t && t.getPropsConfig)
373
- return t.getPropsConfig(...y);
374
- }
375
- return d.value = {
376
- canMove: p(),
377
- canSelectParent: m(),
341
+ if (f.value.schema && f.value.schema.type === "component")
342
+ return f.value;
343
+ const b = k(f == null ? void 0 : f.value.parent), C = s(b);
344
+ return C || null;
345
+ }
346
+ function m(f = t) {
347
+ const { componentInstance: b, designerItemElementRef: C } = f;
348
+ return !b || !b.value ? null : b.value.canMove ? C : m(f.parent);
349
+ }
350
+ function h(f) {
351
+ return !!e && e.canAccepts(f);
352
+ }
353
+ function y() {
354
+ return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
355
+ }
356
+ function T() {
357
+ }
358
+ function x(f, b) {
359
+ b && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(b);
360
+ }
361
+ function V(f, b) {
362
+ const { componentType: C } = f;
363
+ let M = U(C, f, b);
364
+ e && e.onResolveNewComponentSchema && (M = e.onResolveNewComponentSchema(f, M));
365
+ const L = C.toLowerCase().replace("-", "_");
366
+ return M && !M.id && M.type === C && (M.id = `${L}_${Math.random().toString().slice(2, 6)}`), M;
367
+ }
368
+ function v(f, b) {
369
+ const C = String(f.getAttribute("data-controltype")), M = f.getAttribute("data-feature"), L = M ? JSON.parse(M) : {};
370
+ L.parentComponentInstance = l.value;
371
+ let B = U(C, L);
372
+ e && e.onAcceptNewChildElement && (B = e.onAcceptNewChildElement(f, b, B));
373
+ const Q = C.toLowerCase().replace("-", "_");
374
+ return B && !B.id && B.type === C && (B.id = `${Q}_${Math.random().toString().slice(2, 6)}`), B;
375
+ }
376
+ function P(f) {
377
+ }
378
+ function F(...f) {
379
+ if (e && e.getPropsConfig)
380
+ return e.getPropsConfig(...f);
381
+ }
382
+ return l.value = {
383
+ canMove: d(),
384
+ canSelectParent: p(),
378
385
  canDelete: a(),
379
- canNested: !l(),
380
- contents: e == null ? void 0 : e.schema.contents,
386
+ canNested: !u(),
387
+ contents: t == null ? void 0 : t.schema.contents,
381
388
  elementRef: n,
382
- parent: (U = e == null ? void 0 : e.parent) == null ? void 0 : U.componentInstance,
383
- schema: e == null ? void 0 : e.schema,
389
+ parent: (I = t == null ? void 0 : t.parent) == null ? void 0 : I.componentInstance,
390
+ schema: t == null ? void 0 : t.schema,
384
391
  styles: r,
385
- designerClass: s,
386
- canAccepts: f,
387
- getBelongedComponentInstance: c,
388
- getDraggableDesignItemElement: u,
389
- getDraggingDisplayText: h,
390
- getPropConfig: S,
391
- getDragScopeElement: x,
392
- onAcceptMovedChildElement: D,
393
- onAcceptNewChildElement: C,
394
- onChildElementMovedOut: B,
395
- addNewChildComponentSchema: T,
392
+ designerClass: i,
393
+ canAccepts: h,
394
+ getBelongedComponentInstance: s,
395
+ getDraggableDesignItemElement: m,
396
+ getDraggingDisplayText: y,
397
+ getPropConfig: F,
398
+ getDragScopeElement: T,
399
+ onAcceptMovedChildElement: x,
400
+ onAcceptNewChildElement: v,
401
+ onChildElementMovedOut: P,
402
+ addNewChildComponentSchema: V,
396
403
  updateDragAndDropRules: o,
397
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
398
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
399
- }, d;
404
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || k(!1),
405
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
406
+ }, l;
400
407
  }
401
- class ve {
402
- constructor(e, t) {
403
- v(this, "componentId");
404
- v(this, "viewModelId");
405
- v(this, "eventsEditorUtils");
406
- v(this, "formSchemaUtils");
407
- v(this, "formMetadataConverter");
408
- v(this, "designViewModelUtils");
409
- v(this, "designViewModelField");
410
- v(this, "controlCreatorUtils");
411
- v(this, "designerHostService");
412
- v(this, "schemaService", null);
413
- v(this, "metadataService", null);
414
- v(this, "propertyConfig", {
408
+ class Me {
409
+ constructor(t, e) {
410
+ g(this, "componentId");
411
+ g(this, "viewModelId");
412
+ g(this, "eventsEditorUtils");
413
+ g(this, "formSchemaUtils");
414
+ g(this, "formMetadataConverter");
415
+ g(this, "designViewModelUtils");
416
+ g(this, "designViewModelField");
417
+ g(this, "controlCreatorUtils");
418
+ g(this, "designerHostService");
419
+ g(this, "schemaService", null);
420
+ g(this, "metadataService", null);
421
+ g(this, "propertyConfig", {
415
422
  type: "object",
416
423
  categories: {}
417
424
  });
418
425
  var o;
419
- 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;
426
+ this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
420
427
  }
421
428
  getTableInfo() {
422
- var e;
423
- return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
429
+ var t;
430
+ return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
424
431
  }
425
- setDesignViewModelField(e) {
426
- const t = e.binding && e.binding.type === "Form" && e.binding.field;
427
- if (t) {
432
+ setDesignViewModelField(t) {
433
+ const e = t.binding && t.binding.type === "Form" && t.binding.field;
434
+ if (e) {
428
435
  if (!this.designViewModelField) {
429
436
  const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
430
- this.designViewModelField = o.fields.find((r) => r.id === t);
437
+ this.designViewModelField = o.fields.find((r) => r.id === e);
431
438
  }
432
- e.updateOn = this.designViewModelField.updateOn;
439
+ t.updateOn = this.designViewModelField.updateOn;
433
440
  }
434
441
  }
435
- changeFieldEditorType(e, t) {
442
+ changeFieldEditorType(t, e) {
436
443
  }
437
- getBasicPropConfig(e) {
444
+ getBasicPropConfig(t) {
438
445
  return {
439
446
  description: "Basic Information",
440
447
  title: "基本信息",
@@ -453,13 +460,13 @@ class ve {
453
460
  type: "combo-list",
454
461
  textField: "name",
455
462
  valueField: "value",
456
- data: [{ value: e.type, name: i[e.type].name }]
463
+ data: [{ value: t.type, name: c[t.type].name }]
457
464
  }
458
465
  }
459
466
  }
460
467
  };
461
468
  }
462
- getAppearanceConfig(e = null) {
469
+ getAppearanceConfig(t = null) {
463
470
  return {
464
471
  title: "样式",
465
472
  description: "Appearance",
@@ -479,90 +486,105 @@ class ve {
479
486
  }
480
487
  };
481
488
  }
489
+ /**
490
+ *
491
+ * @param propertyId
492
+ * @param componentInstance
493
+ * @returns
494
+ */
495
+ updateElementByParentContainer(t, e) {
496
+ const o = e && e.parent && e.parent.schema;
497
+ if (!o)
498
+ return;
499
+ const r = o.contents.findIndex((l) => l.id === t), i = z(o.contents[r]);
500
+ o.contents.splice(r, 1), o.contents.splice(r, 0, i);
501
+ }
482
502
  }
483
- const V = class V {
503
+ const S = class S {
484
504
  /**
485
505
  * 根据绑定字段类型获取可用的输入类控件
486
506
  */
487
- static getEditorTypesByMDataType(e) {
488
- const t = V.fieldControlTypeMapping[e];
489
- return t || [{ key: "", value: "" }];
507
+ static getEditorTypesByMDataType(t) {
508
+ const e = S.fieldControlTypeMapping[t];
509
+ return e || [{ key: "", value: "" }];
490
510
  }
491
511
  /**
492
512
  * 获取所有输入类控件
493
513
  */
494
514
  static getAllInputTypes() {
495
- const e = [];
496
- for (let t in V.fieldControlTypeMapping)
497
- V.fieldControlTypeMapping[t].forEach((o) => {
498
- e.find((r) => r.key === o.key && r.value === o.value) || e.push({ key: o.key, value: o.value });
515
+ const t = [];
516
+ for (let e in S.fieldControlTypeMapping)
517
+ S.fieldControlTypeMapping[e].forEach((o) => {
518
+ t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
499
519
  });
500
- return e;
520
+ return t;
501
521
  }
502
522
  };
503
523
  /**
504
524
  * <字段类型,可配置的控件类型列表>的映射
505
525
  */
506
- v(V, "fieldControlTypeMapping", {
526
+ g(S, "fieldControlTypeMapping", {
507
527
  String: [
508
- { key: i["input-group"].type, value: i["input-group"].name },
509
- { key: i.lookup.type, value: i.lookup.name },
510
- { key: i["date-picker"].type, value: i["date-picker"].name },
511
- { key: i["check-box"].type, value: i["check-box"].name },
512
- { key: i["radio-group"].type, value: i["radio-group"].name },
513
- { key: i["combo-list"].type, value: i["combo-list"].name },
514
- { key: i.textarea.type, value: i.textarea.name }
528
+ { key: c["input-group"].type, value: c["input-group"].name },
529
+ { key: c.lookup.type, value: c.lookup.name },
530
+ { key: c["date-picker"].type, value: c["date-picker"].name },
531
+ { key: c["check-box"].type, value: c["check-box"].name },
532
+ { key: c["radio-group"].type, value: c["radio-group"].name },
533
+ { key: c["combo-list"].type, value: c["combo-list"].name },
534
+ { key: c.textarea.type, value: c.textarea.name }
515
535
  ],
516
536
  Text: [
517
- { key: i.textarea.type, value: i.textarea.name },
518
- { key: i.lookup.type, value: i.lookup.name }
537
+ { key: c.textarea.type, value: c.textarea.name },
538
+ { key: c.lookup.type, value: c.lookup.name }
519
539
  ],
520
540
  Decimal: [
521
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
541
+ { key: c["number-spinner"].type, value: c["number-spinner"].name }
522
542
  ],
523
543
  Integer: [
524
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
544
+ { key: c["number-spinner"].type, value: c["number-spinner"].name }
525
545
  ],
526
546
  Number: [
527
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
547
+ { key: c["number-spinner"].type, value: c["number-spinner"].name }
528
548
  ],
529
549
  BigNumber: [
530
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
550
+ { key: c["number-spinner"].type, value: c["number-spinner"].name }
531
551
  ],
532
552
  Date: [
533
- { key: i["date-picker"].type, value: i["date-picker"].name }
553
+ { key: c["date-picker"].type, value: c["date-picker"].name }
534
554
  ],
535
555
  DateTime: [
536
- { key: i["date-picker"].type, value: i["date-picker"].name }
556
+ { key: c["date-picker"].type, value: c["date-picker"].name }
537
557
  ],
538
558
  Boolean: [
539
- { key: i.switch.type, value: i.switch.name },
540
- { key: i["check-box"].type, value: i["check-box"].name }
559
+ { key: c.switch.type, value: c.switch.name },
560
+ { key: c["check-box"].type, value: c["check-box"].name }
541
561
  ],
542
562
  Enum: [
543
- { key: i["combo-list"].type, value: i["combo-list"].name },
544
- { key: i["radio-group"].type, value: i["radio-group"].name }
563
+ { key: c["combo-list"].type, value: c["combo-list"].name },
564
+ { key: c["radio-group"].type, value: c["radio-group"].name }
545
565
  ],
546
566
  Object: [
547
- { key: i.lookup.type, value: i.lookup.name },
548
- { key: i["combo-list"].type, value: i["combo-list"].name },
549
- { key: i["radio-group"].type, value: i["radio-group"].name }
567
+ { key: c.lookup.type, value: c.lookup.name },
568
+ { key: c["combo-list"].type, value: c["combo-list"].name },
569
+ { key: c["radio-group"].type, value: c["radio-group"].name }
550
570
  ]
551
571
  });
552
- let A = V;
553
- const Ce = M(0);
554
- class Me extends ve {
555
- constructor(e, t) {
556
- super(e, t);
572
+ let D = S;
573
+ const ke = k(0);
574
+ class we extends Me {
575
+ constructor(e, o) {
576
+ super(e, o);
577
+ g(this, "responseLayoutEditorFunction");
578
+ this.responseLayoutEditorFunction = te(this.formSchemaUtils);
557
579
  }
558
- getPropertyConfig(e, t) {
559
- 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;
580
+ getPropertyConfig(e, o) {
581
+ return this.propertyConfig.categories.basic = this.getBasicProperties(e, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, o), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
560
582
  }
561
- getBasicProperties(e, t) {
583
+ getBasicProperties(e, o) {
562
584
  var d;
563
- var o = this;
585
+ var r = this;
564
586
  this.setDesignViewModelField(e);
565
- const r = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
587
+ const i = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
566
588
  return {
567
589
  description: "Basic Information",
568
590
  title: "基本信息",
@@ -574,8 +596,8 @@ class Me extends ve {
574
596
  readonly: !0
575
597
  },
576
598
  type: {
577
- description: "组件类型",
578
- title: "控件类型",
599
+ description: "编辑器类型",
600
+ title: "编辑器类型",
579
601
  type: "string",
580
602
  refreshPanelAfterChanged: !0,
581
603
  $converter: "/converter/change-editor.converter",
@@ -584,7 +606,7 @@ class Me extends ve {
584
606
  textField: "value",
585
607
  valueField: "key",
586
608
  editable: !1,
587
- data: o.designViewModelField ? A.getEditorTypesByMDataType((d = o.designViewModelField.type) == null ? void 0 : d.name) : A.getAllInputTypes()
609
+ data: r.designViewModelField ? D.getEditorTypesByMDataType((d = r.designViewModelField.type) == null ? void 0 : d.name) : D.getAllInputTypes()
588
610
  }
589
611
  },
590
612
  label: {
@@ -601,7 +623,7 @@ class Me extends ve {
601
623
  bindingType: { enable: !1 },
602
624
  editorParams: {
603
625
  propertyData: e,
604
- formBasicInfo: r
626
+ formBasicInfo: i
605
627
  },
606
628
  columns: [
607
629
  { field: "name", title: "字段名称" },
@@ -609,22 +631,27 @@ class Me extends ve {
609
631
  { field: "fieldType", title: "字段类型" }
610
632
  ],
611
633
  textField: "bindingField",
612
- data: s
634
+ data: l
613
635
  }
614
636
  }
615
637
  },
616
- setPropertyRelates(p, m) {
638
+ setPropertyRelates(p, a) {
617
639
  if (p)
618
640
  switch (p && p.propertyID) {
619
641
  case "type": {
620
- o.changeControlType(e, p, t);
642
+ r.changeControlType(e, p, o);
643
+ break;
644
+ }
645
+ case "label": {
646
+ p.needRefreshControlTree = !0;
621
647
  break;
622
648
  }
623
649
  }
624
650
  }
625
651
  };
626
652
  }
627
- getAppearanceProperties(e) {
653
+ getAppearanceProperties(e, o) {
654
+ var r = this;
628
655
  return {
629
656
  title: "样式",
630
657
  description: "Appearance",
@@ -645,12 +672,25 @@ class Me extends ve {
645
672
  description: "响应式列宽",
646
673
  title: "响应式列宽",
647
674
  type: "boolean",
648
- visible: !1,
675
+ visible: !0,
676
+ // 这个属性,标记当属性变更得时候触发重新更新属性
677
+ refreshPanelAfterChanged: !0,
649
678
  editor: {
650
- type: "response-layout-editor-setting"
651
- },
652
- $converter: "/converter/response-form-layout.converter"
679
+ type: "response-layout-editor-setting",
680
+ initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
681
+ }
653
682
  }
683
+ },
684
+ setPropertyRelates(i, l) {
685
+ if (i)
686
+ switch (i && i.propertyID) {
687
+ case "responseLayout":
688
+ r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(i.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, o), delete e.responseLayout;
689
+ break;
690
+ case "class":
691
+ r.updateUnifiedLayoutAfterControlChanged(i.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, o);
692
+ break;
693
+ }
654
694
  }
655
695
  };
656
696
  }
@@ -662,44 +702,44 @@ class Me extends ve {
662
702
  * @param propertyData 控件DOM属性
663
703
  * @param newControlType 新控件类型
664
704
  */
665
- changeControlType(e, t, o) {
666
- var a, l, c, u;
667
- const r = t.propertyValue, s = o && o.parent && o.parent.schema;
668
- if (!s)
705
+ changeControlType(e, o, r) {
706
+ var u, s, m, h;
707
+ const i = o.propertyValue, l = r && r.parent && r.parent.schema;
708
+ if (!l)
669
709
  return;
670
- const d = s.contents.findIndex((f) => f.id === e.id), p = s.contents[d];
671
- let m;
710
+ const d = l.contents.findIndex((y) => y.id === e.id), p = l.contents[d];
711
+ let a;
672
712
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
673
713
  editor: {
674
- $type: r
714
+ $type: i
675
715
  },
676
716
  name: this.designViewModelField.name,
677
717
  require: this.designViewModelField.require,
678
718
  readonly: this.designViewModelField.readonly
679
- }, !1), m = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), m || (m = q("form-group") || {}, m.editor = q(r) || {}, delete m.editor.id, delete m.editor.binding, delete m.editor.appearance), Object.assign(m, {
719
+ }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, i)), a || (a = j("form-group") || {}, a.editor = j(i) || {}, delete a.editor.id, delete a.editor.binding, delete a.editor.appearance), Object.assign(a, {
680
720
  id: p.id,
681
721
  appearance: p.appearance,
682
722
  size: p.size,
683
723
  label: p.label,
684
724
  binding: p.binding,
685
725
  visible: p.visible
686
- }), Object.assign(m.editor, {
687
- isTextArea: m.isTextArea && p.isTextArea,
688
- placeholder: (a = p.editor) == null ? void 0 : a.placeholder,
689
- holdPlace: (l = p.editor) == null ? void 0 : l.holdPlace,
690
- readonly: (c = p.editor) == null ? void 0 : c.readonly,
691
- require: (u = p.editor) == null ? void 0 : u.require
692
- }), s.contents.splice(d, 1), s.contents.splice(d, 0, m), o.schema = Object.assign(p, m), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
693
- (f) => f.classList.remove("dgComponentSelected")
694
- ), Ce.value++;
695
- }
696
- getComponentConfig(e, t = {}, o = {}) {
697
- const r = Object.assign({
698
- description: "组件信息",
699
- title: "组件信息",
726
+ }), Object.assign(a.editor, {
727
+ isTextArea: a.isTextArea && p.isTextArea,
728
+ placeholder: (u = p.editor) == null ? void 0 : u.placeholder,
729
+ holdPlace: (s = p.editor) == null ? void 0 : s.holdPlace,
730
+ readonly: (m = p.editor) == null ? void 0 : m.readonly,
731
+ require: (h = p.editor) == null ? void 0 : h.require
732
+ }), l.contents.splice(d, 1), l.contents.splice(d, 0, a), r.schema = Object.assign(p, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
733
+ (y) => y.classList.remove("dgComponentSelected")
734
+ ), ke.value++;
735
+ }
736
+ getComponentConfig(e, o = {}, r = {}) {
737
+ const i = Object.assign({
738
+ description: "编辑器",
739
+ title: "编辑器",
700
740
  type: "input-group",
701
741
  $converter: "/converter/property-editor.converter"
702
- }, t), s = Object.assign({
742
+ }, o), l = Object.assign({
703
743
  readonly: {
704
744
  description: "",
705
745
  title: "只读",
@@ -720,129 +760,173 @@ class Me extends ve {
720
760
  title: "提示文本",
721
761
  type: "string"
722
762
  }
723
- }, o);
724
- return { ...r, properties: { ...s } };
763
+ }, r);
764
+ return { ...i, properties: { ...l } };
765
+ }
766
+ /**
767
+ * 修改某一输入控件的样式后更新Form的统一布局配置
768
+ * @param controlClass 控件样式
769
+ * @param controlId 控件Id
770
+ * @param componentId 控件所在组件id
771
+ */
772
+ updateUnifiedLayoutAfterControlChanged(e, o, r) {
773
+ const i = e.split(" ");
774
+ let l = i.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), d = i.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), p = i.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), a = i.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
775
+ l = l || "col-12", d = d || "col-md-" + l.replace("col-", ""), p = p || "col-xl-" + d.replace("col-md-", ""), a = a || "col-el-" + p.replace("col-xl-", "");
776
+ const u = {
777
+ id: o,
778
+ columnInSM: parseInt(l.replace("col-", ""), 10),
779
+ columnInMD: parseInt(d.replace("col-md-", ""), 10),
780
+ columnInLG: parseInt(p.replace("col-xl-", ""), 10),
781
+ columnInEL: parseInt(a.replace("col-el-", ""), 10)
782
+ };
783
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(r, u);
784
+ }
785
+ /**
786
+ * 修改控件布局配置后更新Form统一布局配置
787
+ * @param componentId 组件Id
788
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
789
+ */
790
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
791
+ const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
792
+ if (!r || !r.unifiedLayout)
793
+ return;
794
+ const i = [];
795
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, i, 1), o) {
796
+ const y = i.find((T) => T.id === o.id);
797
+ Object.assign(y || {}, o);
798
+ }
799
+ const l = i.map((y) => y.columnInSM), d = i.map((y) => y.columnInMD), p = i.map((y) => y.columnInLG), a = i.map((y) => y.columnInEL), u = this.checkIsUniqueColumn(l) ? l[0] : null, s = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(p) ? p[0] : null, h = this.checkIsUniqueColumn(a) ? a[0] : null;
800
+ Object.assign(r.unifiedLayout, {
801
+ uniqueColClassInSM: u,
802
+ uniqueColClassInMD: s,
803
+ uniqueColClassInLG: m,
804
+ uniqueColClassInEL: h
805
+ });
806
+ }
807
+ /**
808
+ * 校验宽度样式值是否一致
809
+ */
810
+ checkIsUniqueColumn(e) {
811
+ const o = new Set(e);
812
+ return Array.from(o).length === 1;
725
813
  }
726
814
  }
727
- class we extends Me {
728
- constructor(e, t) {
729
- super(e, t);
815
+ class Te extends we {
816
+ constructor(t, e) {
817
+ super(t, e);
730
818
  }
731
819
  }
732
- function ke(n, e) {
820
+ function Be(n, t) {
733
821
  n.schema;
734
- const t = M(!0), o = M(!0);
735
- function r(c) {
822
+ const e = k(!0), o = k(!0);
823
+ function r(s) {
736
824
  return !1;
737
825
  }
738
- function s() {
826
+ function i() {
739
827
  return !1;
740
828
  }
741
- function d() {
829
+ function l() {
742
830
  return !1;
743
831
  }
744
- function p() {
832
+ function d() {
745
833
  return !0;
746
834
  }
747
- function m(c) {
835
+ function p(s) {
748
836
  }
749
837
  function a() {
750
838
  }
751
- function l(c) {
839
+ function u(s) {
752
840
  return null;
753
841
  }
754
842
  return {
755
843
  canAccepts: r,
756
- checkCanDeleteComponent: s,
757
- checkCanMoveComponent: d,
758
- hideNestedPaddingInDesginerView: p,
759
- onAcceptMovedChildElement: m,
844
+ checkCanDeleteComponent: i,
845
+ checkCanMoveComponent: l,
846
+ hideNestedPaddingInDesginerView: d,
847
+ onAcceptMovedChildElement: p,
760
848
  resolveComponentContext: a,
761
- triggerBelongedComponentToMoveWhenMoved: t,
849
+ triggerBelongedComponentToMoveWhenMoved: e,
762
850
  triggerBelongedComponentToDeleteWhenDeleted: o,
763
- getPropsConfig: l
851
+ getPropsConfig: u
764
852
  };
765
853
  }
766
- function Te(n, e) {
854
+ function Ve(n, t) {
767
855
  const {
768
- canAccepts: t,
856
+ canAccepts: e,
769
857
  checkCanDeleteComponent: o,
770
858
  checkCanMoveComponent: r,
771
- hideNestedPaddingInDesginerView: s,
772
- onAcceptMovedChildElement: d,
773
- resolveComponentContext: p,
774
- triggerBelongedComponentToMoveWhenMoved: m,
859
+ hideNestedPaddingInDesginerView: i,
860
+ onAcceptMovedChildElement: l,
861
+ resolveComponentContext: d,
862
+ triggerBelongedComponentToMoveWhenMoved: p,
775
863
  triggerBelongedComponentToDeleteWhenDeleted: a
776
- } = ke(n), l = n.schema;
777
- function c(u, f) {
778
- return new we(u, e).getPropertyConfig(l, f);
864
+ } = Be(n), u = n.schema;
865
+ function s(m, h) {
866
+ return new Te(m, t).getPropertyConfig(u, h);
779
867
  }
780
868
  return {
781
- canAccepts: t,
869
+ canAccepts: e,
782
870
  checkCanDeleteComponent: o,
783
871
  checkCanMoveComponent: r,
784
- hideNestedPaddingInDesginerView: s,
785
- onAcceptMovedChildElement: d,
786
- resolveComponentContext: p,
787
- triggerBelongedComponentToMoveWhenMoved: m,
872
+ hideNestedPaddingInDesginerView: i,
873
+ onAcceptMovedChildElement: l,
874
+ resolveComponentContext: d,
875
+ triggerBelongedComponentToMoveWhenMoved: p,
788
876
  triggerBelongedComponentToDeleteWhenDeleted: a,
789
- getPropsConfig: c
877
+ getPropsConfig: s
790
878
  };
791
879
  }
792
- const Be = /* @__PURE__ */ G({
880
+ const Pe = /* @__PURE__ */ G({
793
881
  name: "FTextareaDesign",
794
- props: L,
882
+ props: $,
795
883
  emits: [""],
796
- setup(n, e) {
797
- const t = M(), o = O("designer-host-service"), r = O("design-item-context"), s = Te(r, o), d = be(t, r, s), p = P(() => n.maxLength ? n.maxLength : n.modelValue.length), m = P(() => ({
884
+ setup(n, t) {
885
+ const e = k(), o = O("designer-host-service"), r = O("design-item-context"), i = Ve(r, o), l = Ce(e, r, i), d = E(() => n.maxLength ? n.maxLength : n.modelValue.length), p = E(() => ({
798
886
  position: "relative"
799
- })), a = P(() => ({
887
+ })), a = E(() => ({
800
888
  "box-shadow": "0 0 0 1px #dcdfe6 inset",
801
889
  border: "none",
802
890
  padding: "5px 10px",
803
891
  width: "100%"
804
- })), l = {
892
+ })), u = {
805
893
  position: "absolute",
806
894
  bottom: "5px",
807
895
  right: "10px"
808
896
  };
809
897
  return W(() => {
810
- t.value.componentInstance = d;
811
- }), e.expose(d.value), () => w("div", {
812
- style: m.value,
813
- ref: t
898
+ e.value.componentInstance = l;
899
+ }), t.expose(l.value), () => w("div", {
900
+ style: p.value,
901
+ ref: e
814
902
  }, [w("textarea", {
815
903
  id: n.id,
816
- minlength: n.minLength,
817
- maxlength: n.maxLength,
818
904
  tabindex: n.tabIndex,
819
- disabled: n.disabled,
820
- readonly: n.readonly,
821
- autocomplete: n.autocomplete,
905
+ disabled: !1,
906
+ readonly: !0,
822
907
  style: a.value,
823
908
  placeholder: n.placeholder,
824
- autofocus: n.autofocus,
825
909
  rows: n.rows
826
910
  }, null), n.showCount && w("span", {
827
- style: l
828
- }, [`${n.modelValue.length}/${p.value}`])]);
911
+ style: u
912
+ }, [`${n.modelValue.length}/${d.value}`])]);
829
913
  }
830
- }), Ve = (n) => {
831
- const e = n;
832
- return e.install = function(t) {
833
- t.component(e.name, n);
914
+ }), Se = (n) => {
915
+ const t = n;
916
+ return t.install = function(e) {
917
+ e.component(t.name, n);
834
918
  }, n;
835
919
  };
836
- E.register = (n, e, t, o) => {
837
- n.textarea = E, e.textarea = _;
920
+ A.register = (n, t, e, o) => {
921
+ n.textarea = A, t.textarea = _;
838
922
  };
839
- E.registerDesigner = (n, e, t) => {
840
- n.textarea = Be, e.textarea = _;
923
+ A.registerDesigner = (n, t, e) => {
924
+ n.textarea = Pe, t.textarea = _;
841
925
  };
842
- const Ee = Ve(E);
926
+ const Ue = Se(A);
843
927
  export {
844
- E as FTextarea,
845
- Ee as default,
928
+ A as FTextarea,
929
+ Ue as default,
846
930
  _ as propsResolver,
847
- L as textAreaProps
931
+ $ as textAreaProps
848
932
  };