@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,103 +1,104 @@
1
- var ne = Object.defineProperty;
2
- var oe = (e, t, n) => t in e ? ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var F = (e, t, n) => oe(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { computed as P, ref as k, createVNode as M, defineComponent as Q, onMounted as G, watch as j, createTextVNode as X, inject as R } from "vue";
5
- import { cloneDeep as re } from "lodash-es";
6
- import T from "bignumber.js";
1
+ var re = Object.defineProperty;
2
+ var ie = (e, n, t) => n in e ? re(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var x = (e, n, t) => ie(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { computed as P, ref as V, createVNode as T, defineComponent as X, onMounted as G, watch as L, createTextVNode as Q, inject as Z } from "vue";
5
+ import { isPlainObject as H, cloneDeep as Y } from "lodash-es";
6
+ import M from "bignumber.js";
7
7
  import { getSchemaByType as J } from "../dynamic-resolver/index.esm.js";
8
- function ae(e, t, n) {
9
- return t;
8
+ import { useResponseLayoutEditorSetting as ae } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
9
+ function le(e, n, t) {
10
+ return n;
10
11
  }
11
- const Y = {}, _ = {};
12
- function Z(e) {
13
- const { properties: t, title: n } = e, o = Object.keys(t).reduce((a, c) => (a[c] = t[c].type === "object" && t[c].properties ? Z(t[c]) : re(t[c].default), a), {});
14
- return o.id = `${n}-${Date.now()}`, o;
12
+ const _ = {}, K = {};
13
+ function W(e) {
14
+ const { properties: n, title: t, ignore: o } = e, r = o && Array.isArray(o), l = Object.keys(n).reduce((u, p) => ((!r || !o.find((a) => a == p)) && (u[p] = n[p].type === "object" && n[p].properties ? W(n[p]) : Y(n[p].default)), u), {});
15
+ return (!r || !o.find((u) => u == "id")) && (l.id = `${t}-${Date.now()}`), l;
15
16
  }
16
- function z(e, t = {}) {
17
- const n = Y[e];
18
- if (n) {
19
- let o = Z(n);
20
- const a = _[e];
21
- return o = a ? a({ getSchemaByType: z }, o, t) : o, o;
17
+ function R(e, n = {}, t) {
18
+ const o = _[e];
19
+ if (o) {
20
+ let r = W(o);
21
+ const l = K[e];
22
+ return r = l ? l({ getSchemaByType: R }, r, n, t) : r, r;
22
23
  }
23
24
  return null;
24
25
  }
25
- function ie(e, t) {
26
- const n = Z(t);
27
- return Object.keys(e).reduce((o, a) => (o[a] && typeof o[a] == "object" ? Object.assign(o[a], e[a]) : o[a] = e[a], o), n), n;
26
+ function ue(e, n) {
27
+ const t = W(n);
28
+ return Object.keys(e).reduce((o, r) => (o[r] && H(o[r]) && H(e[r]) ? Object.assign(o[r], e[r]) : o[r] = e[r], o), t), t;
28
29
  }
29
- function le(e, t) {
30
- return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
31
- if (t.has(a)) {
32
- const c = t.get(a);
33
- if (typeof c == "string")
34
- o[c] = e[a];
30
+ function ce(e, n) {
31
+ return Object.keys(e).filter((o) => e[o] != null).reduce((o, r) => {
32
+ if (n.has(r)) {
33
+ const l = n.get(r);
34
+ if (typeof l == "string")
35
+ o[l] = e[r];
35
36
  else {
36
- const d = c(a, e[a], e);
37
- Object.assign(o, d);
37
+ const u = l(r, e[r], e);
38
+ Object.assign(o, u);
38
39
  }
39
40
  } else
40
- o[a] = e[a];
41
+ o[r] = e[r];
41
42
  return o;
42
43
  }, {});
43
44
  }
44
- function ue(e, t, n = /* @__PURE__ */ new Map()) {
45
- const o = ie(e, t);
46
- return le(o, n);
45
+ function se(e, n, t = /* @__PURE__ */ new Map()) {
46
+ const o = ue(e, n);
47
+ return ce(o, t);
47
48
  }
48
- function ce(e = {}) {
49
- function t(r, l, u, p) {
50
- if (typeof u == "number")
51
- return p[r].length === u;
52
- if (typeof u == "object") {
53
- const f = Object.keys(u)[0], b = u[f];
54
- if (f === "not")
55
- return Number(p[r].length) !== Number(b);
56
- if (f === "moreThan")
57
- return Number(p[r].length) >= Number(b);
58
- if (f === "lessThan")
59
- return Number(p[r].length) <= Number(b);
49
+ function pe(e = {}) {
50
+ function n(i, s, c, d) {
51
+ if (typeof c == "number")
52
+ return d[i].length === c;
53
+ if (typeof c == "object") {
54
+ const g = Object.keys(c)[0], f = c[g];
55
+ if (g === "not")
56
+ return Number(d[i].length) !== Number(f);
57
+ if (g === "moreThan")
58
+ return Number(d[i].length) >= Number(f);
59
+ if (g === "lessThan")
60
+ return Number(d[i].length) <= Number(f);
60
61
  }
61
62
  return !1;
62
63
  }
63
- function n(r, l, u, p) {
64
- return p[r] && p[r].propertyValue && String(p[r].propertyValue.value) === String(u);
64
+ function t(i, s, c, d) {
65
+ return d[i] && d[i].propertyValue && String(d[i].propertyValue.value) === String(c);
65
66
  }
66
67
  const o = /* @__PURE__ */ new Map([
67
- ["length", t],
68
- ["getProperty", n]
68
+ ["length", n],
69
+ ["getProperty", t]
69
70
  ]);
70
- Object.keys(e).reduce((r, l) => (r.set(l, e[l]), r), o);
71
- function a(r, l) {
72
- const u = r;
73
- return typeof l == "number" ? [{ target: u, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: u, operator: "getProperty", param: r, value: !!l }] : typeof l == "object" ? Object.keys(l).map((p) => {
74
- if (p === "length")
75
- return { target: u, operator: "length", param: null, value: l[p] };
76
- const f = p, b = l[p];
77
- return { target: u, operator: "getProperty", param: f, value: b };
71
+ Object.keys(e).reduce((i, s) => (i.set(s, e[s]), i), o);
72
+ function r(i, s) {
73
+ const c = i;
74
+ return typeof s == "number" ? [{ target: c, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: c, operator: "getProperty", param: i, value: !!s }] : typeof s == "object" ? Object.keys(s).map((d) => {
75
+ if (d === "length")
76
+ return { target: c, operator: "length", param: null, value: s[d] };
77
+ const g = d, f = s[d];
78
+ return { target: c, operator: "getProperty", param: g, value: f };
78
79
  }) : [];
79
80
  }
80
- function c(r) {
81
- return Object.keys(r).reduce((u, p) => {
82
- const f = a(p, r[p]);
83
- return u.push(...f), u;
81
+ function l(i) {
82
+ return Object.keys(i).reduce((c, d) => {
83
+ const g = r(d, i[d]);
84
+ return c.push(...g), c;
84
85
  }, []);
85
86
  }
86
- function d(r, l) {
87
- if (o.has(r.operator)) {
88
- const u = o.get(r.operator);
89
- return u && u(r.target, r.param, r.value, l) || !1;
87
+ function u(i, s) {
88
+ if (o.has(i.operator)) {
89
+ const c = o.get(i.operator);
90
+ return c && c(i.target, i.param, i.value, s) || !1;
90
91
  }
91
92
  return !1;
92
93
  }
93
- function s(r, l) {
94
- return c(r).reduce((f, b) => f && d(b, l), !0);
94
+ function p(i, s) {
95
+ return l(i).reduce((g, f) => g && u(f, s), !0);
95
96
  }
96
- function i(r, l) {
97
- const u = Object.keys(r), p = u.includes("allOf"), f = u.includes("anyOf"), b = p || f, D = (b ? r[b ? p ? "allOf" : "anyOf" : "allOf"] : [r]).map((C) => s(C, l));
98
- return p ? !D.includes(!1) : D.includes(!0);
97
+ function a(i, s) {
98
+ const c = Object.keys(i), d = c.includes("allOf"), g = c.includes("anyOf"), f = d || g, E = (f ? i[f ? d ? "allOf" : "anyOf" : "allOf"] : [i]).map((S) => p(S, s));
99
+ return d ? !E.includes(!1) : E.includes(!0);
99
100
  }
100
- return { parseValueSchema: i };
101
+ return { parseValueSchema: a };
101
102
  }
102
103
  const m = {
103
104
  button: { type: "button", name: "按钮", icon: "Button" },
@@ -136,21 +137,22 @@ const m = {
136
137
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
137
138
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
138
139
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
139
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
140
- }, se = {}, pe = {};
141
- ce();
142
- function de(e, t, n = /* @__PURE__ */ new Map(), o = (d, s, i) => s, a = {}, c = (d) => d) {
143
- return Y[t.title] = t, _[t.title] = o, se[t.title] = a, pe[t.title] = c, (d = {}) => {
144
- const s = ue(d, t, n), i = Object.keys(e).reduce((r, l) => (r[l] = e[l].default, r), {});
145
- return Object.assign(i, s);
140
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
141
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
142
+ }, de = {}, me = {};
143
+ pe();
144
+ function fe(e, n, t = /* @__PURE__ */ new Map(), o = (u, p, a) => p, r = {}, l = (u) => u) {
145
+ return _[n.title] = n, K[n.title] = o, de[n.title] = r, me[n.title] = l, (u = {}) => {
146
+ const p = se(u, n, t), a = Object.keys(e).reduce((i, s) => (i[s] = e[s].default, i), {});
147
+ return Object.assign(a, p);
146
148
  };
147
149
  }
148
- function me(e, t) {
149
- return { customClass: t.class, customStyle: t.style };
150
+ function ge(e, n) {
151
+ return { customClass: n.class, customStyle: n.style };
150
152
  }
151
- const fe = /* @__PURE__ */ new Map([
152
- ["appearance", me]
153
- ]), ge = "https://json-schema.org/draft/2020-12/schema", ye = "https://farris-design.gitee.io/number-range.schema.json", be = "number-range", he = "A Farris Component", ve = "object", we = {
153
+ const ye = /* @__PURE__ */ new Map([
154
+ ["appearance", ge]
155
+ ]), be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/number-range.schema.json", ve = "number-range", Ce = "A Farris Component", we = "object", Se = {
154
156
  id: {
155
157
  description: "The unique identifier for a number-range",
156
158
  type: "string"
@@ -212,18 +214,18 @@ const fe = /* @__PURE__ */ new Map([
212
214
  type: "boolean",
213
215
  default: !0
214
216
  }
215
- }, Ce = [
217
+ }, Be = [
216
218
  "id",
217
219
  "type"
218
- ], Be = {
219
- $schema: ge,
220
- $id: ye,
221
- title: be,
222
- description: he,
223
- type: ve,
224
- properties: we,
225
- required: Ce
226
- }, H = {
220
+ ], ke = {
221
+ $schema: be,
222
+ $id: he,
223
+ title: ve,
224
+ description: Ce,
225
+ type: we,
226
+ properties: Se,
227
+ required: Be
228
+ }, z = {
227
229
  /**
228
230
  * 组件标识
229
231
  */
@@ -335,399 +337,399 @@ const fe = /* @__PURE__ */ new Map([
335
337
  * 是否使用千分值
336
338
  */
337
339
  useThousands: { type: Boolean, default: !0 }
338
- }, I = de(H, Be, fe, ae);
339
- function K(e, t) {
340
- const n = P(() => Number(e.precision) || 0);
341
- function o(i) {
342
- return i.toFixed(n.value);
340
+ }, ee = fe(z, ke, ye, le);
341
+ function te(e, n) {
342
+ const t = P(() => Number(e.precision) || 0);
343
+ function o(a) {
344
+ return a.toFixed(t.value);
343
345
  }
344
- function a(i) {
345
- return isNaN(i) || i === null || i === void 0 || i === "";
346
+ function r(a) {
347
+ return isNaN(a) || a === null || a === void 0 || a === "";
346
348
  }
347
- function c(i) {
348
- const r = a(e.max) ? null : new T(String(e.max), 10), l = a(e.min) ? null : new T(String(e.min), 10);
349
- return r && i.gt(r) ? r : l && i.lt(l) ? l : i;
349
+ function l(a) {
350
+ const i = r(e.max) ? null : new M(String(e.max), 10), s = r(e.min) ? null : new M(String(e.min), 10);
351
+ return i && a.gt(i) ? i : s && a.lt(s) ? s : a;
350
352
  }
351
- function d(i, r, l, u) {
352
- const p = new T(i, 10), f = a(l && l.value) ? null : new T(String(l.value), 10), b = a(r && r.value) ? null : new T(String(r.value), 10);
353
- let V;
354
- return u ? V = f && p.gt(f) ? f : p : V = b && p.lt(b) ? b : p, V.toString();
353
+ function u(a, i, s, c) {
354
+ const d = new M(a, 10), g = r(s && s.value) ? null : new M(String(s.value), 10), f = r(i && i.value) ? null : new M(String(i.value), 10);
355
+ let w;
356
+ return c ? w = g && d.gt(g) ? g : d : w = f && d.lt(f) ? f : d, w.toString();
355
357
  }
356
- function s(i) {
358
+ function p(a) {
357
359
  if (e.parser)
358
- return isNaN(Number(i)) ? e.parser(i) : i;
359
- let r = c(new T(i, 10));
360
- if (r.isNaN()) {
360
+ return isNaN(Number(a)) ? e.parser(a) : a;
361
+ let i = l(new M(a, 10));
362
+ if (i.isNaN()) {
361
363
  if (e.canNull)
362
364
  return null;
363
- const u = new T("" + e.min, 10), p = new T("" + e.max, 10);
364
- if (!u.isNaN())
365
- r = u;
366
- else if (!p.isNaN())
367
- r = p;
365
+ const c = new M("" + e.min, 10), d = new M("" + e.max, 10);
366
+ if (!c.isNaN())
367
+ i = c;
368
+ else if (!d.isNaN())
369
+ i = d;
368
370
  else
369
371
  return 0;
370
372
  }
371
- return o(r);
373
+ return o(i);
372
374
  }
373
- return { getRealValue: s, isEmpty: a, precision: n, getValidNumberObject: c, getValidNumberInRange: d };
375
+ return { getRealValue: p, isEmpty: r, precision: t, getValidNumberObject: l, getValidNumberInRange: u };
374
376
  }
375
- function ee(e, t, n) {
377
+ function ne(e, n, t) {
376
378
  const o = P(() => ({
377
379
  prefix: e.prefix,
378
380
  suffix: e.suffix,
379
381
  decimalSeparator: e.decimalSeparator,
380
382
  groupSeparator: e.useThousands ? e.groupSeparator : "",
381
383
  groupSize: e.groupSize
382
- })), { getValidNumberObject: a, precision: c } = n;
383
- function d(r) {
384
- return r = r == null || r === "" ? "" : String(r), r = r.replace(new RegExp(e.prefix, "g"), "").replace(new RegExp(e.suffix, "g"), "").replace(/,/g, ""), e.groupSeparator && e.groupSeparator !== "," && (r = r.replace(new RegExp(`\\${e.groupSeparator}`, "g"), "")), e.decimalSeparator && e.decimalSeparator !== "." && (r = r.replace(new RegExp(`\\${e.decimalSeparator}`, "g"), ".")), r;
384
+ })), { getValidNumberObject: r, precision: l } = t;
385
+ function u(i) {
386
+ return i = i == null || i === "" ? "" : String(i), i = i.replace(new RegExp(e.prefix, "g"), "").replace(new RegExp(e.suffix, "g"), "").replace(/,/g, ""), e.groupSeparator && e.groupSeparator !== "," && (i = i.replace(new RegExp(`\\${e.groupSeparator}`, "g"), "")), e.decimalSeparator && e.decimalSeparator !== "." && (i = i.replace(new RegExp(`\\${e.decimalSeparator}`, "g"), ".")), i;
385
387
  }
386
- function s(r, l) {
387
- return e.precision !== null && e.precision !== void 0 ? r.toFormat(c.value, l) : r.toFormat(l);
388
+ function p(i, s) {
389
+ return e.precision !== null && e.precision !== void 0 ? i.toFormat(l.value, s) : i.toFormat(s);
388
390
  }
389
- function i(r) {
390
- const l = d(r), u = new T(l, 10), p = a(u);
391
- return p.valueOf() === "0" && !e.showZero || p.isNaN() ? "" : e.formatter ? e.formatter(p.toNumber()) : s(p, o.value);
391
+ function a(i) {
392
+ const s = u(i), c = new M(s, 10), d = r(c);
393
+ return d.valueOf() === "0" && !e.showZero || d.isNaN() ? "" : e.formatter ? e.formatter(d.toNumber()) : p(d, o.value);
392
394
  }
393
- return { cleanFormat: d, format: i };
395
+ return { cleanFormat: u, format: a };
394
396
  }
395
- function A(e, t, n, o, a, c, d, s, i, r) {
396
- const { format: l } = a, { getRealValue: u, getValidNumberInRange: p } = c;
397
- function f() {
398
- const B = new T(o.value || 0);
399
- return !(e.max && !new T(e.max).isNaN() && B.gte(new T(e.max)));
397
+ function O(e, n, t, o, r, l, u, p, a, i) {
398
+ const { format: s } = r, { getRealValue: c, getValidNumberInRange: d } = l;
399
+ function g() {
400
+ const B = new M(o.value || 0);
401
+ return !(e.max && !new M(e.max).isNaN() && B.gte(new M(e.max)));
400
402
  }
401
- function b() {
402
- const B = new T(o.value || 0);
403
- return !(e.min && !new T(e.min).isNaN() && B.lte(new T(e.min)));
403
+ function f() {
404
+ const B = new M(o.value || 0);
405
+ return !(e.min && !new M(e.min).isNaN() && B.lte(new M(e.min)));
404
406
  }
405
- function V(B) {
407
+ function w(B) {
406
408
  if (e.readonly || e.disabled)
407
409
  return;
408
- const S = B === "up" ? f : b, y = B === "up" ? "plus" : "minus";
409
- if (S()) {
410
- let v = new T(o.value || 0)[y](Number(e.step)).toFixed();
411
- v = p(v, s, i, r), n.value = l(v), o.value = u(v), d(o.value);
410
+ const N = B === "up" ? g : f, y = B === "up" ? "plus" : "minus";
411
+ if (N()) {
412
+ let h = new M(o.value || 0)[y](Number(e.step)).toFixed();
413
+ h = d(h, p, a, i), t.value = s(h), o.value = c(h), u(o.value);
412
414
  }
413
415
  }
414
- function E() {
415
- V("up");
416
- }
417
416
  function D() {
418
- V("down");
417
+ w("up");
419
418
  }
420
- function x(B) {
421
- E(), B.stopPropagation();
419
+ function E() {
420
+ w("down");
422
421
  }
423
- function C(B) {
422
+ function F(B) {
424
423
  D(), B.stopPropagation();
425
424
  }
426
- return { canDownward: b, canUpward: f, downward: D, onClickDownButton: C, onClickUpButton: x, upward: E };
425
+ function S(B) {
426
+ E(), B.stopPropagation();
427
+ }
428
+ return { canDownward: f, canUpward: g, downward: E, onClickDownButton: S, onClickUpButton: F, upward: D };
427
429
  }
428
- function U(e, t, n, o, a, c, d, s, i, r, l) {
429
- const { cleanFormat: u, format: p } = a, { getRealValue: f, isEmpty: b, getValidNumberInRange: V } = c, { downward: E, upward: D } = d, x = P(() => n.value), C = k(!1);
430
- function B(g) {
431
- var N;
432
- if (g.stopPropagation(), e.readonly || e.disabled)
430
+ function j(e, n, t, o, r, l, u, p, a, i, s) {
431
+ const { cleanFormat: c, format: d } = r, { getRealValue: g, isEmpty: f, getValidNumberInRange: w } = l, { downward: D, upward: E } = u, F = P(() => t.value), S = V(!1);
432
+ function B(b) {
433
+ var k;
434
+ if (b.stopPropagation(), e.readonly || e.disabled)
433
435
  return;
434
- C.value = !1;
435
- let v = (N = g.target) == null ? void 0 : N.value;
436
- e.canNull || (v = v || 0);
437
- let w = u(v);
438
- w = V(w, i, r, l), n.value = p(w), o.value = f(w), s(o.value), t.emit("blur", { event: g, formatted: n.value, value: o.value });
439
- }
440
- function S(g) {
441
- g.stopPropagation(), !(e.readonly || e.disabled) && (C.value = !0, n.value = b(o.value) || !e.showZero && o.value === "0" ? "" : String(o.value), t.emit("focus", { event: g, formatted: n.value, value: o.value }));
442
- }
443
- function y(g) {
444
- var N;
445
- g.stopPropagation();
446
- let v = (N = g.target) == null ? void 0 : N.value;
447
- e.canNull || (v = v || 0);
448
- const w = u(v);
449
- n.value = w, o.value = f(w), s(o.value);
450
- }
451
- function h(g) {
452
- g.key === "ArrowDown" && (g.preventDefault(), E()), g.key === "ArrowUp" && (g.preventDefault(), D()), g.stopPropagation();
453
- }
454
- return { textBoxValue: x, onBlurTextBox: B, onFocusTextBox: S, onInput: y, onKeyDown: h, isTextBoxFocused: C };
436
+ S.value = !1;
437
+ let h = (k = b.target) == null ? void 0 : k.value;
438
+ e.canNull || (h = h || 0);
439
+ let v = c(h);
440
+ v = w(v, a, i, s), t.value = d(v), o.value = g(v), p(o.value), n.emit("blur", { event: b, formatted: t.value, value: o.value });
441
+ }
442
+ function N(b) {
443
+ b.stopPropagation(), !(e.readonly || e.disabled) && (S.value = !0, t.value = f(o.value) || !e.showZero && o.value === "0" ? "" : String(o.value), n.emit("focus", { event: b, formatted: t.value, value: o.value }));
444
+ }
445
+ function y(b) {
446
+ var k;
447
+ b.stopPropagation();
448
+ let h = (k = b.target) == null ? void 0 : k.value;
449
+ e.canNull || (h = h || 0);
450
+ const v = c(h);
451
+ t.value = v, o.value = g(v), p(o.value);
452
+ }
453
+ function C(b) {
454
+ b.key === "ArrowDown" && (b.preventDefault(), D()), b.key === "ArrowUp" && (b.preventDefault(), E()), b.stopPropagation();
455
+ }
456
+ return { textBoxValue: F, onBlurTextBox: B, onFocusTextBox: N, onInput: y, onKeyDown: C, isTextBoxFocused: S };
455
457
  }
456
- function $(e, t, n, o) {
458
+ function U(e, n, t, o) {
457
459
  const {
458
- onBlurTextBox: a,
459
- onFocusTextBox: c,
460
- onInput: d,
461
- onKeyDown: s,
462
- textBoxValue: i
463
- } = n, r = P(() => e.disabled || e.readonly || !e.editable ? "" : o ? e.beginPlaceHolder : e.endPlaceHolder), l = P(() => ({
460
+ onBlurTextBox: r,
461
+ onFocusTextBox: l,
462
+ onInput: u,
463
+ onKeyDown: p,
464
+ textBoxValue: a
465
+ } = t, i = P(() => e.disabled || e.readonly || !e.editable ? "" : o ? e.beginPlaceHolder : e.endPlaceHolder), s = P(() => ({
464
466
  "form-control": !0,
465
467
  "sub-input": !0
466
- })), u = P(() => ({
468
+ })), c = P(() => ({
467
469
  "text-align": e.textAlign
468
470
  }));
469
- function p(f) {
470
- f.stopPropagation();
471
+ function d(g) {
472
+ g.stopPropagation();
471
473
  }
472
- return () => M("input", {
473
- class: l.value,
474
- style: u.value,
474
+ return () => T("input", {
475
+ class: s.value,
476
+ style: c.value,
475
477
  type: "text",
476
- value: i.value,
478
+ value: a.value,
477
479
  disabled: e.disabled,
478
480
  readonly: e.readonly || !e.editable,
479
- placeholder: r.value,
480
- onBlur: a,
481
- onChange: p,
482
- onFocus: c,
483
- onInput: d,
484
- onKeydown: s
481
+ placeholder: i.value,
482
+ onBlur: r,
483
+ onChange: d,
484
+ onFocus: l,
485
+ onInput: u,
486
+ onKeydown: p
485
487
  }, null);
486
488
  }
487
- function q(e, t, n) {
489
+ function I(e, n, t) {
488
490
  const {
489
491
  canDownward: o,
490
- canUpward: a,
491
- onClickDownButton: c,
492
- onClickUpButton: d
493
- } = n, s = P(() => ({
492
+ canUpward: r,
493
+ onClickDownButton: l,
494
+ onClickUpButton: u
495
+ } = t, p = P(() => ({
494
496
  "input-group-append": !0,
495
497
  "btn-group": !0,
496
498
  "btn-group-number": !0,
497
499
  "sub-btn-group": !0
498
- })), i = P(() => ({
500
+ })), a = P(() => ({
499
501
  btn: !0,
500
502
  "btn-secondary": !0,
501
503
  "btn-number-flag": !0
502
- })), r = P(() => ({
503
- cursor: a() ? "pointer" : "not-allowed",
504
+ })), i = P(() => ({
505
+ cursor: r() ? "pointer" : "not-allowed",
504
506
  "margin-left": 0
505
- })), l = P(() => ({
507
+ })), s = P(() => ({
506
508
  cursor: o() ? "pointer" : "not-allowed",
507
509
  "margin-left": 0
508
510
  }));
509
- return () => M("div", {
510
- class: s.value
511
- }, [M("button", {
511
+ return () => T("div", {
512
+ class: p.value
513
+ }, [T("button", {
512
514
  title: "upButton",
513
- class: i.value,
514
- style: r.value,
515
- onClick: d,
516
- disabled: !a()
517
- }, [M("span", {
515
+ class: a.value,
516
+ style: i.value,
517
+ onClick: u,
518
+ disabled: !r()
519
+ }, [T("span", {
518
520
  class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
519
- }, null)]), M("button", {
521
+ }, null)]), T("button", {
520
522
  title: "downButton",
521
- class: i.value,
522
- style: l.value,
523
- onClick: c,
523
+ class: a.value,
524
+ style: s.value,
525
+ onClick: l,
524
526
  disabled: !o()
525
- }, [M("span", {
527
+ }, [T("span", {
526
528
  class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
527
529
  }, null)])]);
528
530
  }
529
- const L = /* @__PURE__ */ Q({
531
+ const $ = /* @__PURE__ */ X({
530
532
  name: "FNumberRange",
531
- props: H,
533
+ props: z,
532
534
  emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
533
- setup(e, t) {
534
- const n = k(e.beginValue), o = k(""), a = k(e.endValue), c = k(""), d = K(e), s = ee(e, t, d), i = (S) => {
535
- t.emit("beginValueChange", S);
536
- }, r = A(e, t, o, n, s, d, i, n, a, !0), l = U(e, t, o, n, s, d, r, i, n, a, !0), u = q(e, t, r), p = $(e, t, l, !0), f = (S) => {
537
- t.emit("endValueChange", S);
538
- }, b = A(e, t, c, a, s, d, f, n, a, !1), V = U(e, t, c, a, s, d, b, f, n, a, !1), E = q(e, t, b), D = $(e, t, V, !1), {
539
- getRealValue: x
540
- } = d, {
541
- format: C
542
- } = s, B = P(() => !e.disabled && !e.readonly && e.showButton);
535
+ setup(e, n) {
536
+ const t = V(e.beginValue), o = V(""), r = V(e.endValue), l = V(""), u = te(e), p = ne(e, n, u), a = (N) => {
537
+ n.emit("beginValueChange", N);
538
+ }, i = O(e, n, o, t, p, u, a, t, r, !0), s = j(e, n, o, t, p, u, i, a, t, r, !0), c = I(e, n, i), d = U(e, n, s, !0), g = (N) => {
539
+ n.emit("endValueChange", N);
540
+ }, f = O(e, n, l, r, p, u, g, t, r, !1), w = j(e, n, l, r, p, u, f, g, t, r, !1), D = I(e, n, f), E = U(e, n, w, !1), {
541
+ getRealValue: F
542
+ } = u, {
543
+ format: S
544
+ } = p, B = P(() => !e.disabled && !e.readonly && e.showButton);
543
545
  return G(() => {
544
- const S = x(e.beginValue), y = x(e.endValue);
545
- o.value = C(S), c.value = C(y);
546
- }), j(() => [e.beginValue], ([S]) => {
547
- if (!l.isTextBoxFocused.value) {
548
- const y = x(S);
549
- o.value = C(y);
546
+ const N = F(e.beginValue), y = F(e.endValue);
547
+ o.value = S(N), l.value = S(y);
548
+ }), L(() => [e.beginValue], ([N]) => {
549
+ if (!s.isTextBoxFocused.value) {
550
+ const y = F(N);
551
+ o.value = S(y);
550
552
  }
551
- }), j(() => [e.endValue], ([S]) => {
552
- if (!V.isTextBoxFocused.value) {
553
- const y = x(S);
554
- c.value = C(y);
553
+ }), L(() => [e.endValue], ([N]) => {
554
+ if (!w.isTextBoxFocused.value) {
555
+ const y = F(N);
556
+ l.value = S(y);
555
557
  }
556
- }), j(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
557
- o.value = C(n.value), c.value = C(a.value);
558
- }), () => M("div", {
558
+ }), L(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
559
+ o.value = S(t.value), l.value = S(r.value);
560
+ }), () => T("div", {
559
561
  class: "input-group number-range f-cmp-number-spinner"
560
- }, [M("div", {
562
+ }, [T("div", {
561
563
  class: "form-control input-container"
562
- }, [M("div", {
564
+ }, [T("div", {
563
565
  class: "sub-input-group"
564
- }, [p(), B.value && u()]), M("span", {
566
+ }, [d(), B.value && c()]), T("span", {
565
567
  class: "spliter"
566
- }, [X("~")]), M("div", {
568
+ }, [Q("~")]), T("div", {
567
569
  class: "sub-input-group"
568
- }, [D(), B.value && E()])])]);
570
+ }, [E(), B.value && D()])])]);
569
571
  }
570
572
  });
571
- function Ne(e, t, n) {
572
- var S;
573
+ function Ne(e, n, t) {
574
+ var N;
573
575
  function o() {
574
- n != null && n.resolveComponentContext && n.resolveComponentContext();
576
+ t != null && t.resolveComponentContext && t.resolveComponentContext();
575
577
  }
576
578
  o();
577
- const a = n && n.getStyles && n.getStyles() || "", c = n && n.getDesignerClass && n.getDesignerClass() || "", d = k();
578
- function s() {
579
- return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
579
+ const r = t && t.getStyles && t.getStyles() || "", l = t && t.getDesignerClass && t.getDesignerClass() || "", u = V();
580
+ function p() {
581
+ return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
580
582
  }
581
- function i() {
583
+ function a() {
582
584
  return !1;
583
585
  }
584
- function r() {
585
- return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
586
+ function i() {
587
+ return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
586
588
  }
587
- function l() {
588
- return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
589
+ function s() {
590
+ return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
589
591
  }
590
- function u(y) {
592
+ function c(y) {
591
593
  if (!y || !y.value)
592
594
  return null;
593
595
  if (y.value.schema && y.value.schema.type === "component")
594
596
  return y.value;
595
- const h = k(y == null ? void 0 : y.value.parent), g = u(h);
596
- return g || null;
597
+ const C = V(y == null ? void 0 : y.value.parent), b = c(C);
598
+ return b || null;
597
599
  }
598
- function p(y = t) {
599
- const { componentInstance: h, designerItemElementRef: g } = y;
600
- return !h || !h.value ? null : h.value.canMove ? g : p(y.parent);
600
+ function d(y = n) {
601
+ const { componentInstance: C, designerItemElementRef: b } = y;
602
+ return !C || !C.value ? null : C.value.canMove ? b : d(y.parent);
601
603
  }
602
- function f(y) {
603
- return !!n && n.canAccepts(y);
604
+ function g(y) {
605
+ return !!t && t.canAccepts(y);
604
606
  }
605
- function b() {
606
- return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
607
+ function f() {
608
+ return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
607
609
  }
608
- function V() {
610
+ function w() {
609
611
  }
610
- function E(y, h) {
611
- h && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(h);
612
+ function D(y, C) {
613
+ C && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(C);
612
614
  }
613
- function D(y) {
614
- const { componentType: h } = y;
615
- let g = z(h, y);
616
- n && n.onResolveNewComponentSchema && (g = n.onResolveNewComponentSchema(y, g));
617
- const v = h.toLowerCase().replace("-", "_");
618
- return g && !g.id && g.type === h && (g.id = `${v}_${Math.random().toString().slice(2, 6)}`), g;
615
+ function E(y, C) {
616
+ const { componentType: b } = y;
617
+ let h = R(b, y, C);
618
+ t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(y, h));
619
+ const v = b.toLowerCase().replace("-", "_");
620
+ return h && !h.id && h.type === b && (h.id = `${v}_${Math.random().toString().slice(2, 6)}`), h;
619
621
  }
620
- function x(y, h) {
621
- const g = String(y.getAttribute("data-controltype")), v = y.getAttribute("data-feature"), w = v ? JSON.parse(v) : {};
622
- w.parentComponentInstance = d.value;
623
- let N = z(g, w);
624
- n && n.onAcceptNewChildElement && (N = n.onAcceptNewChildElement(y, h, N));
625
- const te = g.toLowerCase().replace("-", "_");
626
- return N && !N.id && N.type === g && (N.id = `${te}_${Math.random().toString().slice(2, 6)}`), N;
622
+ function F(y, C) {
623
+ const b = String(y.getAttribute("data-controltype")), h = y.getAttribute("data-feature"), v = h ? JSON.parse(h) : {};
624
+ v.parentComponentInstance = u.value;
625
+ let k = R(b, v);
626
+ t && t.onAcceptNewChildElement && (k = t.onAcceptNewChildElement(y, C, k));
627
+ const oe = b.toLowerCase().replace("-", "_");
628
+ return k && !k.id && k.type === b && (k.id = `${oe}_${Math.random().toString().slice(2, 6)}`), k;
627
629
  }
628
- function C(y) {
630
+ function S(y) {
629
631
  }
630
632
  function B(...y) {
631
- if (n && n.getPropsConfig)
632
- return n.getPropsConfig(...y);
633
- }
634
- return d.value = {
635
- canMove: s(),
636
- canSelectParent: i(),
637
- canDelete: r(),
638
- canNested: !l(),
639
- contents: t == null ? void 0 : t.schema.contents,
633
+ if (t && t.getPropsConfig)
634
+ return t.getPropsConfig(...y);
635
+ }
636
+ return u.value = {
637
+ canMove: p(),
638
+ canSelectParent: a(),
639
+ canDelete: i(),
640
+ canNested: !s(),
641
+ contents: n == null ? void 0 : n.schema.contents,
640
642
  elementRef: e,
641
- parent: (S = t == null ? void 0 : t.parent) == null ? void 0 : S.componentInstance,
642
- schema: t == null ? void 0 : t.schema,
643
- styles: a,
644
- designerClass: c,
645
- canAccepts: f,
646
- getBelongedComponentInstance: u,
647
- getDraggableDesignItemElement: p,
648
- getDraggingDisplayText: b,
643
+ parent: (N = n == null ? void 0 : n.parent) == null ? void 0 : N.componentInstance,
644
+ schema: n == null ? void 0 : n.schema,
645
+ styles: r,
646
+ designerClass: l,
647
+ canAccepts: g,
648
+ getBelongedComponentInstance: c,
649
+ getDraggableDesignItemElement: d,
650
+ getDraggingDisplayText: f,
649
651
  getPropConfig: B,
650
- getDragScopeElement: V,
651
- onAcceptMovedChildElement: E,
652
- onAcceptNewChildElement: x,
653
- onChildElementMovedOut: C,
654
- addNewChildComponentSchema: D,
652
+ getDragScopeElement: w,
653
+ onAcceptMovedChildElement: D,
654
+ onAcceptNewChildElement: F,
655
+ onChildElementMovedOut: S,
656
+ addNewChildComponentSchema: E,
655
657
  updateDragAndDropRules: o,
656
- triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || k(!1),
657
- triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
658
- }, d;
658
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || V(!1),
659
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || V(!1)
660
+ }, u;
659
661
  }
660
- function Se(e, t) {
662
+ function Ve(e, n) {
661
663
  e.schema;
662
- const n = k(!0), o = k(!0);
663
- function a(u) {
664
+ const t = V(!0), o = V(!0);
665
+ function r(c) {
664
666
  return !1;
665
667
  }
666
- function c() {
668
+ function l() {
667
669
  return !1;
668
670
  }
669
- function d() {
671
+ function u() {
670
672
  return !1;
671
673
  }
672
- function s() {
674
+ function p() {
673
675
  return !0;
674
676
  }
675
- function i(u) {
677
+ function a(c) {
676
678
  }
677
- function r() {
679
+ function i() {
678
680
  }
679
- function l(u) {
681
+ function s(c) {
680
682
  return null;
681
683
  }
682
684
  return {
683
- canAccepts: a,
684
- checkCanDeleteComponent: c,
685
- checkCanMoveComponent: d,
686
- hideNestedPaddingInDesginerView: s,
687
- onAcceptMovedChildElement: i,
688
- resolveComponentContext: r,
689
- triggerBelongedComponentToMoveWhenMoved: n,
685
+ canAccepts: r,
686
+ checkCanDeleteComponent: l,
687
+ checkCanMoveComponent: u,
688
+ hideNestedPaddingInDesginerView: p,
689
+ onAcceptMovedChildElement: a,
690
+ resolveComponentContext: i,
691
+ triggerBelongedComponentToMoveWhenMoved: t,
690
692
  triggerBelongedComponentToDeleteWhenDeleted: o,
691
- getPropsConfig: l
693
+ getPropsConfig: s
692
694
  };
693
695
  }
694
- class Ve {
695
- constructor(t, n) {
696
- F(this, "componentId");
697
- F(this, "viewModelId");
698
- F(this, "eventsEditorUtils");
699
- F(this, "formSchemaUtils");
700
- F(this, "formMetadataConverter");
701
- F(this, "designViewModelUtils");
702
- F(this, "designViewModelField");
703
- F(this, "controlCreatorUtils");
704
- F(this, "designerHostService");
705
- F(this, "schemaService", null);
706
- F(this, "metadataService", null);
707
- F(this, "propertyConfig", {
696
+ class Me {
697
+ constructor(n, t) {
698
+ x(this, "componentId");
699
+ x(this, "viewModelId");
700
+ x(this, "eventsEditorUtils");
701
+ x(this, "formSchemaUtils");
702
+ x(this, "formMetadataConverter");
703
+ x(this, "designViewModelUtils");
704
+ x(this, "designViewModelField");
705
+ x(this, "controlCreatorUtils");
706
+ x(this, "designerHostService");
707
+ x(this, "schemaService", null);
708
+ x(this, "metadataService", null);
709
+ x(this, "propertyConfig", {
708
710
  type: "object",
709
711
  categories: {}
710
712
  });
711
713
  var o;
712
- this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
714
+ this.componentId = n, 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(n)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
713
715
  }
714
716
  getTableInfo() {
715
- var t;
716
- return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
717
+ var n;
718
+ return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
717
719
  }
718
- setDesignViewModelField(t) {
719
- const n = t.binding && t.binding.type === "Form" && t.binding.field;
720
- if (n) {
720
+ setDesignViewModelField(n) {
721
+ const t = n.binding && n.binding.type === "Form" && n.binding.field;
722
+ if (t) {
721
723
  if (!this.designViewModelField) {
722
724
  const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
723
- this.designViewModelField = o.fields.find((a) => a.id === n);
725
+ this.designViewModelField = o.fields.find((r) => r.id === t);
724
726
  }
725
- t.updateOn = this.designViewModelField.updateOn;
727
+ n.updateOn = this.designViewModelField.updateOn;
726
728
  }
727
729
  }
728
- changeFieldEditorType(t, n) {
730
+ changeFieldEditorType(n, t) {
729
731
  }
730
- getBasicPropConfig(t) {
732
+ getBasicPropConfig(n) {
731
733
  return {
732
734
  description: "Basic Information",
733
735
  title: "基本信息",
@@ -746,13 +748,13 @@ class Ve {
746
748
  type: "combo-list",
747
749
  textField: "name",
748
750
  valueField: "value",
749
- data: [{ value: t.type, name: m[t.type].name }]
751
+ data: [{ value: n.type, name: m[n.type].name }]
750
752
  }
751
753
  }
752
754
  }
753
755
  };
754
756
  }
755
- getAppearanceConfig(t = null) {
757
+ getAppearanceConfig(n = null) {
756
758
  return {
757
759
  title: "样式",
758
760
  description: "Appearance",
@@ -772,31 +774,44 @@ class Ve {
772
774
  }
773
775
  };
774
776
  }
777
+ /**
778
+ *
779
+ * @param propertyId
780
+ * @param componentInstance
781
+ * @returns
782
+ */
783
+ updateElementByParentContainer(n, t) {
784
+ const o = t && t.parent && t.parent.schema;
785
+ if (!o)
786
+ return;
787
+ const r = o.contents.findIndex((u) => u.id === n), l = Y(o.contents[r]);
788
+ o.contents.splice(r, 1), o.contents.splice(r, 0, l);
789
+ }
775
790
  }
776
- const O = class O {
791
+ const A = class A {
777
792
  /**
778
793
  * 根据绑定字段类型获取可用的输入类控件
779
794
  */
780
- static getEditorTypesByMDataType(t) {
781
- const n = O.fieldControlTypeMapping[t];
782
- return n || [{ key: "", value: "" }];
795
+ static getEditorTypesByMDataType(n) {
796
+ const t = A.fieldControlTypeMapping[n];
797
+ return t || [{ key: "", value: "" }];
783
798
  }
784
799
  /**
785
800
  * 获取所有输入类控件
786
801
  */
787
802
  static getAllInputTypes() {
788
- const t = [];
789
- for (let n in O.fieldControlTypeMapping)
790
- O.fieldControlTypeMapping[n].forEach((o) => {
791
- t.find((a) => a.key === o.key && a.value === o.value) || t.push({ key: o.key, value: o.value });
803
+ const n = [];
804
+ for (let t in A.fieldControlTypeMapping)
805
+ A.fieldControlTypeMapping[t].forEach((o) => {
806
+ n.find((r) => r.key === o.key && r.value === o.value) || n.push({ key: o.key, value: o.value });
792
807
  });
793
- return t;
808
+ return n;
794
809
  }
795
810
  };
796
811
  /**
797
812
  * <字段类型,可配置的控件类型列表>的映射
798
813
  */
799
- F(O, "fieldControlTypeMapping", {
814
+ x(A, "fieldControlTypeMapping", {
800
815
  String: [
801
816
  { key: m["input-group"].type, value: m["input-group"].name },
802
817
  { key: m.lookup.type, value: m.lookup.name },
@@ -842,20 +857,22 @@ F(O, "fieldControlTypeMapping", {
842
857
  { key: m["radio-group"].type, value: m["radio-group"].name }
843
858
  ]
844
859
  });
845
- let W = O;
846
- const ke = k(0);
847
- class Te extends Ve {
848
- constructor(t, n) {
849
- super(t, n);
850
- }
851
- getPropertyConfig(t, n) {
852
- return this.propertyConfig.categories.basic = this.getBasicProperties(t, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
853
- }
854
- getBasicProperties(t, n) {
855
- var d;
856
- var o = this;
860
+ let q = A;
861
+ const Te = V(0);
862
+ class xe extends Me {
863
+ constructor(t, o) {
864
+ super(t, o);
865
+ x(this, "responseLayoutEditorFunction");
866
+ this.responseLayoutEditorFunction = ae(this.formSchemaUtils);
867
+ }
868
+ getPropertyConfig(t, o) {
869
+ return this.propertyConfig.categories.basic = this.getBasicProperties(t, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, o), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
870
+ }
871
+ getBasicProperties(t, o) {
872
+ var p;
873
+ var r = this;
857
874
  this.setDesignViewModelField(t);
858
- const a = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
875
+ const l = this.formSchemaUtils.getFormMetadataBasicInfo(), u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
859
876
  return {
860
877
  description: "Basic Information",
861
878
  title: "基本信息",
@@ -867,8 +884,8 @@ class Te extends Ve {
867
884
  readonly: !0
868
885
  },
869
886
  type: {
870
- description: "组件类型",
871
- title: "控件类型",
887
+ description: "编辑器类型",
888
+ title: "编辑器类型",
872
889
  type: "string",
873
890
  refreshPanelAfterChanged: !0,
874
891
  $converter: "/converter/change-editor.converter",
@@ -877,7 +894,7 @@ class Te extends Ve {
877
894
  textField: "value",
878
895
  valueField: "key",
879
896
  editable: !1,
880
- data: o.designViewModelField ? W.getEditorTypesByMDataType((d = o.designViewModelField.type) == null ? void 0 : d.name) : W.getAllInputTypes()
897
+ data: r.designViewModelField ? q.getEditorTypesByMDataType((p = r.designViewModelField.type) == null ? void 0 : p.name) : q.getAllInputTypes()
881
898
  }
882
899
  },
883
900
  label: {
@@ -894,7 +911,7 @@ class Te extends Ve {
894
911
  bindingType: { enable: !1 },
895
912
  editorParams: {
896
913
  propertyData: t,
897
- formBasicInfo: a
914
+ formBasicInfo: l
898
915
  },
899
916
  columns: [
900
917
  { field: "name", title: "字段名称" },
@@ -902,22 +919,27 @@ class Te extends Ve {
902
919
  { field: "fieldType", title: "字段类型" }
903
920
  ],
904
921
  textField: "bindingField",
905
- data: c
922
+ data: u
906
923
  }
907
924
  }
908
925
  },
909
- setPropertyRelates(s, i) {
910
- if (s)
911
- switch (s && s.propertyID) {
926
+ setPropertyRelates(a, i) {
927
+ if (a)
928
+ switch (a && a.propertyID) {
912
929
  case "type": {
913
- o.changeControlType(t, s, n);
930
+ r.changeControlType(t, a, o);
931
+ break;
932
+ }
933
+ case "label": {
934
+ a.needRefreshControlTree = !0;
914
935
  break;
915
936
  }
916
937
  }
917
938
  }
918
939
  };
919
940
  }
920
- getAppearanceProperties(t) {
941
+ getAppearanceProperties(t, o) {
942
+ var r = this;
921
943
  return {
922
944
  title: "样式",
923
945
  description: "Appearance",
@@ -938,12 +960,25 @@ class Te extends Ve {
938
960
  description: "响应式列宽",
939
961
  title: "响应式列宽",
940
962
  type: "boolean",
941
- visible: !1,
963
+ visible: !0,
964
+ // 这个属性,标记当属性变更得时候触发重新更新属性
965
+ refreshPanelAfterChanged: !0,
942
966
  editor: {
943
- type: "response-layout-editor-setting"
944
- },
945
- $converter: "/converter/response-form-layout.converter"
967
+ type: "response-layout-editor-setting",
968
+ initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, r.componentId)
969
+ }
946
970
  }
971
+ },
972
+ setPropertyRelates(l, u) {
973
+ if (l)
974
+ switch (l && l.propertyID) {
975
+ case "responseLayout":
976
+ r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, r.componentId || t.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(t.id, o), delete t.responseLayout;
977
+ break;
978
+ case "class":
979
+ r.updateUnifiedLayoutAfterControlChanged(l.propertyValue, t.id, this.componentId), r.updateElementByParentContainer(t.id, o);
980
+ break;
981
+ }
947
982
  }
948
983
  };
949
984
  }
@@ -955,44 +990,44 @@ class Te extends Ve {
955
990
  * @param propertyData 控件DOM属性
956
991
  * @param newControlType 新控件类型
957
992
  */
958
- changeControlType(t, n, o) {
959
- var r, l, u, p;
960
- const a = n.propertyValue, c = o && o.parent && o.parent.schema;
961
- if (!c)
993
+ changeControlType(t, o, r) {
994
+ var s, c, d, g;
995
+ const l = o.propertyValue, u = r && r.parent && r.parent.schema;
996
+ if (!u)
962
997
  return;
963
- const d = c.contents.findIndex((f) => f.id === t.id), s = c.contents[d];
998
+ const p = u.contents.findIndex((f) => f.id === t.id), a = u.contents[p];
964
999
  let i;
965
1000
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
966
1001
  editor: {
967
- $type: a
1002
+ $type: l
968
1003
  },
969
1004
  name: this.designViewModelField.name,
970
1005
  require: this.designViewModelField.require,
971
1006
  readonly: this.designViewModelField.readonly
972
- }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), i || (i = J("form-group") || {}, i.editor = J(a) || {}, delete i.editor.id, delete i.editor.binding, delete i.editor.appearance), Object.assign(i, {
973
- id: s.id,
974
- appearance: s.appearance,
975
- size: s.size,
976
- label: s.label,
977
- binding: s.binding,
978
- visible: s.visible
1007
+ }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), i || (i = J("form-group") || {}, i.editor = J(l) || {}, delete i.editor.id, delete i.editor.binding, delete i.editor.appearance), Object.assign(i, {
1008
+ id: a.id,
1009
+ appearance: a.appearance,
1010
+ size: a.size,
1011
+ label: a.label,
1012
+ binding: a.binding,
1013
+ visible: a.visible
979
1014
  }), Object.assign(i.editor, {
980
- isTextArea: i.isTextArea && s.isTextArea,
981
- placeholder: (r = s.editor) == null ? void 0 : r.placeholder,
982
- holdPlace: (l = s.editor) == null ? void 0 : l.holdPlace,
983
- readonly: (u = s.editor) == null ? void 0 : u.readonly,
984
- require: (p = s.editor) == null ? void 0 : p.require
985
- }), c.contents.splice(d, 1), c.contents.splice(d, 0, i), o.schema = Object.assign(s, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1015
+ isTextArea: i.isTextArea && a.isTextArea,
1016
+ placeholder: (s = a.editor) == null ? void 0 : s.placeholder,
1017
+ holdPlace: (c = a.editor) == null ? void 0 : c.holdPlace,
1018
+ readonly: (d = a.editor) == null ? void 0 : d.readonly,
1019
+ require: (g = a.editor) == null ? void 0 : g.require
1020
+ }), u.contents.splice(p, 1), u.contents.splice(p, 0, i), r.schema = Object.assign(a, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
986
1021
  (f) => f.classList.remove("dgComponentSelected")
987
- ), ke.value++;
1022
+ ), Te.value++;
988
1023
  }
989
- getComponentConfig(t, n = {}, o = {}) {
990
- const a = Object.assign({
991
- description: "组件信息",
992
- title: "组件信息",
1024
+ getComponentConfig(t, o = {}, r = {}) {
1025
+ const l = Object.assign({
1026
+ description: "编辑器",
1027
+ title: "编辑器",
993
1028
  type: "input-group",
994
1029
  $converter: "/converter/property-editor.converter"
995
- }, n), c = Object.assign({
1030
+ }, o), u = Object.assign({
996
1031
  readonly: {
997
1032
  description: "",
998
1033
  title: "只读",
@@ -1013,16 +1048,64 @@ class Te extends Ve {
1013
1048
  title: "提示文本",
1014
1049
  type: "string"
1015
1050
  }
1016
- }, o);
1017
- return { ...a, properties: { ...c } };
1051
+ }, r);
1052
+ return { ...l, properties: { ...u } };
1053
+ }
1054
+ /**
1055
+ * 修改某一输入控件的样式后更新Form的统一布局配置
1056
+ * @param controlClass 控件样式
1057
+ * @param controlId 控件Id
1058
+ * @param componentId 控件所在组件id
1059
+ */
1060
+ updateUnifiedLayoutAfterControlChanged(t, o, r) {
1061
+ const l = t.split(" ");
1062
+ let u = l.find((c) => /^col-([1-9]|10|11|12)$/.test(c)), p = l.find((c) => /^col-md-([1-9]|10|11|12)$/.test(c)), a = l.find((c) => /^col-xl-([1-9]|10|11|12)$/.test(c)), i = l.find((c) => /^col-el-([1-9]|10|11|12)$/.test(c));
1063
+ u = u || "col-12", p = p || "col-md-" + u.replace("col-", ""), a = a || "col-xl-" + p.replace("col-md-", ""), i = i || "col-el-" + a.replace("col-xl-", "");
1064
+ const s = {
1065
+ id: o,
1066
+ columnInSM: parseInt(u.replace("col-", ""), 10),
1067
+ columnInMD: parseInt(p.replace("col-md-", ""), 10),
1068
+ columnInLG: parseInt(a.replace("col-xl-", ""), 10),
1069
+ columnInEL: parseInt(i.replace("col-el-", ""), 10)
1070
+ };
1071
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(r, s);
1072
+ }
1073
+ /**
1074
+ * 修改控件布局配置后更新Form统一布局配置
1075
+ * @param componentId 组件Id
1076
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
1077
+ */
1078
+ updateUnifiedLayoutAfterResponseLayoutChanged(t, o) {
1079
+ const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
1080
+ if (!r || !r.unifiedLayout)
1081
+ return;
1082
+ const l = [];
1083
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, l, 1), o) {
1084
+ const f = l.find((w) => w.id === o.id);
1085
+ Object.assign(f || {}, o);
1086
+ }
1087
+ const u = l.map((f) => f.columnInSM), p = l.map((f) => f.columnInMD), a = l.map((f) => f.columnInLG), i = l.map((f) => f.columnInEL), s = this.checkIsUniqueColumn(u) ? u[0] : null, c = this.checkIsUniqueColumn(p) ? p[0] : null, d = this.checkIsUniqueColumn(a) ? a[0] : null, g = this.checkIsUniqueColumn(i) ? i[0] : null;
1088
+ Object.assign(r.unifiedLayout, {
1089
+ uniqueColClassInSM: s,
1090
+ uniqueColClassInMD: c,
1091
+ uniqueColClassInLG: d,
1092
+ uniqueColClassInEL: g
1093
+ });
1094
+ }
1095
+ /**
1096
+ * 校验宽度样式值是否一致
1097
+ */
1098
+ checkIsUniqueColumn(t) {
1099
+ const o = new Set(t);
1100
+ return Array.from(o).length === 1;
1018
1101
  }
1019
1102
  }
1020
- class Me extends Te {
1021
- constructor(t, n) {
1022
- super(t, n);
1103
+ class Fe extends xe {
1104
+ constructor(n, t) {
1105
+ super(n, t);
1023
1106
  }
1024
- getEditorProperties(t) {
1025
- return this.getComponentConfig(t, { type: "number-range" }, {
1107
+ getEditorProperties(n) {
1108
+ return this.getComponentConfig(n, { type: "number-range" }, {
1026
1109
  editable: {
1027
1110
  description: "",
1028
1111
  title: "允许编辑",
@@ -1031,90 +1114,90 @@ class Me extends Te {
1031
1114
  });
1032
1115
  }
1033
1116
  }
1034
- function xe(e, t) {
1117
+ function Ee(e, n) {
1035
1118
  const {
1036
- canAccepts: n,
1119
+ canAccepts: t,
1037
1120
  checkCanDeleteComponent: o,
1038
- checkCanMoveComponent: a,
1039
- hideNestedPaddingInDesginerView: c,
1040
- onAcceptMovedChildElement: d,
1041
- resolveComponentContext: s,
1042
- triggerBelongedComponentToMoveWhenMoved: i,
1043
- triggerBelongedComponentToDeleteWhenDeleted: r
1044
- } = Se(e), l = e.schema;
1045
- function u(p, f) {
1046
- return new Me(p, t).getPropertyConfig(l, f);
1121
+ checkCanMoveComponent: r,
1122
+ hideNestedPaddingInDesginerView: l,
1123
+ onAcceptMovedChildElement: u,
1124
+ resolveComponentContext: p,
1125
+ triggerBelongedComponentToMoveWhenMoved: a,
1126
+ triggerBelongedComponentToDeleteWhenDeleted: i
1127
+ } = Ve(e), s = e.schema;
1128
+ function c(d, g) {
1129
+ return new Fe(d, n).getPropertyConfig(s, g);
1047
1130
  }
1048
1131
  return {
1049
- canAccepts: n,
1132
+ canAccepts: t,
1050
1133
  checkCanDeleteComponent: o,
1051
- checkCanMoveComponent: a,
1052
- hideNestedPaddingInDesginerView: c,
1053
- onAcceptMovedChildElement: d,
1054
- resolveComponentContext: s,
1055
- triggerBelongedComponentToMoveWhenMoved: i,
1056
- triggerBelongedComponentToDeleteWhenDeleted: r,
1057
- getPropsConfig: u
1134
+ checkCanMoveComponent: r,
1135
+ hideNestedPaddingInDesginerView: l,
1136
+ onAcceptMovedChildElement: u,
1137
+ resolveComponentContext: p,
1138
+ triggerBelongedComponentToMoveWhenMoved: a,
1139
+ triggerBelongedComponentToDeleteWhenDeleted: i,
1140
+ getPropsConfig: c
1058
1141
  };
1059
1142
  }
1060
- const Fe = /* @__PURE__ */ Q({
1143
+ const Pe = /* @__PURE__ */ X({
1061
1144
  name: "FNumberRangeDesign",
1062
- props: H,
1145
+ props: z,
1063
1146
  emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
1064
- setup(e, t) {
1065
- const n = k(e.beginValue), o = k(""), a = k(e.endValue), c = k(""), d = K(e), s = ee(e, t, d), i = (w) => {
1066
- t.emit("beginValueChange", w);
1067
- }, r = k(), l = R("designer-host-service"), u = R("design-item-context"), p = xe(u, l), f = Ne(r, u, p);
1147
+ setup(e, n) {
1148
+ const t = V(e.beginValue), o = V(""), r = V(e.endValue), l = V(""), u = te(e), p = ne(e, n, u), a = (v) => {
1149
+ n.emit("beginValueChange", v);
1150
+ }, i = V(), s = Z("designer-host-service"), c = Z("design-item-context"), d = Ee(c, s), g = Ne(i, c, d);
1068
1151
  G(() => {
1069
- r.value.componentInstance = f;
1070
- }), t.expose(f.value);
1071
- const b = A(e, t, o, n, s, d, i, n, a, !0), V = U(e, t, o, n, s, d, b, i, n, a, !0), E = q(e, t, b), D = $(e, t, V, !0), x = (w) => {
1072
- t.emit("endValueChange", w);
1073
- }, C = A(e, t, c, a, s, d, x, n, a, !1), B = U(e, t, c, a, s, d, C, x, n, a, !1), S = q(e, t, C), y = $(e, t, B, !1), {
1074
- getRealValue: h
1075
- } = d, {
1076
- format: g
1077
- } = s, v = P(() => !e.disabled && !e.readonly && e.showButton);
1152
+ i.value.componentInstance = g;
1153
+ }), n.expose(g.value);
1154
+ const f = O(e, n, o, t, p, u, a, t, r, !0), w = j(e, n, o, t, p, u, f, a, t, r, !0), D = I(e, n, f), E = U(e, n, w, !0), F = (v) => {
1155
+ n.emit("endValueChange", v);
1156
+ }, S = O(e, n, l, r, p, u, F, t, r, !1), B = j(e, n, l, r, p, u, S, F, t, r, !1), N = I(e, n, S), y = U(e, n, B, !1), {
1157
+ getRealValue: C
1158
+ } = u, {
1159
+ format: b
1160
+ } = p, h = P(() => !e.disabled && !e.readonly && e.showButton);
1078
1161
  return G(() => {
1079
- const w = h(e.beginValue), N = h(e.endValue);
1080
- o.value = g(w), c.value = g(N);
1081
- }), j(() => [e.beginValue], ([w]) => {
1082
- const N = h(w);
1083
- o.value = g(N);
1084
- }), j(() => [e.endValue], ([w]) => {
1085
- const N = h(w);
1086
- c.value = g(N);
1087
- }), j(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
1088
- o.value = g(n.value), c.value = g(a.value);
1089
- }), () => M("div", {
1090
- ref: r,
1162
+ const v = C(e.beginValue), k = C(e.endValue);
1163
+ o.value = b(v), l.value = b(k);
1164
+ }), L(() => [e.beginValue], ([v]) => {
1165
+ const k = C(v);
1166
+ o.value = b(k);
1167
+ }), L(() => [e.endValue], ([v]) => {
1168
+ const k = C(v);
1169
+ l.value = b(k);
1170
+ }), L(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
1171
+ o.value = b(t.value), l.value = b(r.value);
1172
+ }), () => T("div", {
1173
+ ref: i,
1091
1174
  class: "input-group number-range f-cmp-number-spinner"
1092
- }, [M("div", {
1175
+ }, [T("div", {
1093
1176
  class: "form-control input-container"
1094
- }, [M("div", {
1177
+ }, [T("div", {
1095
1178
  class: "sub-input-group"
1096
- }, [D(), v.value && E()]), M("span", {
1179
+ }, [E(), h.value && D()]), T("span", {
1097
1180
  class: "spliter"
1098
- }, [X("~")]), M("div", {
1181
+ }, [Q("~")]), T("div", {
1099
1182
  class: "sub-input-group"
1100
- }, [y(), v.value && S()])])]);
1183
+ }, [y(), h.value && N()])])]);
1101
1184
  }
1102
1185
  }), De = (e) => {
1103
- const t = e;
1104
- return t.install = function(n) {
1105
- n.component(t.name, e);
1186
+ const n = e;
1187
+ return n.install = function(t) {
1188
+ t.component(n.name, e);
1106
1189
  }, e;
1107
1190
  };
1108
- L.register = (e, t, n, o) => {
1109
- e["number-range"] = L, t["number-range"] = I;
1191
+ $.register = (e, n, t, o) => {
1192
+ e["number-range"] = $, n["number-range"] = ee;
1110
1193
  };
1111
- L.registerDesigner = (e, t, n) => {
1112
- e["number-range"] = Fe, t["number-range"] = I;
1194
+ $.registerDesigner = (e, n, t) => {
1195
+ e["number-range"] = Pe, n["number-range"] = ee;
1113
1196
  };
1114
- const Ue = De(L);
1197
+ const $e = De($);
1115
1198
  export {
1116
- L as FNumberRange,
1117
- Ue as default,
1118
- H as numberRangeProps,
1119
- I as propsResolver
1199
+ $ as FNumberRange,
1200
+ $e as default,
1201
+ z as numberRangeProps,
1202
+ ee as propsResolver
1120
1203
  };