@farris/ui-vue 1.2.9 → 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 (236) hide show
  1. package/components/accordion/index.esm.js +63 -63
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +402 -323
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +98 -96
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +66 -66
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +118 -118
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +539 -460
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +135 -135
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1007 -312
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +97 -97
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +778 -700
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +472 -329
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2231 -1055
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +79 -79
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6408 -5034
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4762 -3511
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3442 -2742
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-outline/index.esm.js +14 -13
  40. package/components/designer-outline/index.umd.cjs +1 -1
  41. package/components/dropdown/index.esm.js +73 -73
  42. package/components/dropdown/index.umd.cjs +2 -2
  43. package/components/dynamic-form/index.css +1 -0
  44. package/components/dynamic-form/index.esm.js +2597 -1141
  45. package/components/dynamic-form/index.umd.cjs +1 -1
  46. package/components/dynamic-resolver/index.esm.js +114 -71
  47. package/components/dynamic-resolver/index.umd.cjs +1 -1
  48. package/components/dynamic-view/index.esm.js +303 -290
  49. package/components/dynamic-view/index.umd.cjs +1 -1
  50. package/components/events-editor/index.esm.js +171 -171
  51. package/components/events-editor/index.umd.cjs +1 -1
  52. package/components/expression-editor/index.esm.js +65 -65
  53. package/components/expression-editor/index.umd.cjs +1 -1
  54. package/components/external-container/index.css +1 -1
  55. package/components/external-container/index.esm.js +3075 -2586
  56. package/components/external-container/index.umd.cjs +1 -1
  57. package/components/field-selector/index.css +1 -1
  58. package/components/field-selector/index.esm.js +5272 -8511
  59. package/components/field-selector/index.umd.cjs +1 -1
  60. package/components/filter-bar/index.css +1 -1
  61. package/components/filter-bar/index.esm.js +1726 -1822
  62. package/components/filter-bar/index.umd.cjs +1 -1
  63. package/components/image-cropper/index.esm.js +126 -126
  64. package/components/image-cropper/index.umd.cjs +1 -1
  65. package/components/input-group/index.esm.js +620 -540
  66. package/components/input-group/index.umd.cjs +1 -1
  67. package/components/layout/index.esm.js +88 -88
  68. package/components/layout/index.umd.cjs +1 -1
  69. package/components/list-nav/index.esm.js +71 -71
  70. package/components/list-nav/index.umd.cjs +1 -1
  71. package/components/list-view/index.css +1 -1
  72. package/components/list-view/index.esm.js +3582 -2356
  73. package/components/list-view/index.umd.cjs +1 -1
  74. package/components/lookup/index.css +1 -1
  75. package/components/lookup/index.esm.js +10752 -8972
  76. package/components/lookup/index.umd.cjs +1 -1
  77. package/components/mapping-editor/index.css +1 -1
  78. package/components/mapping-editor/index.esm.js +5601 -5329
  79. package/components/mapping-editor/index.umd.cjs +1 -1
  80. package/components/message-box/index.css +1 -1
  81. package/components/message-box/index.esm.js +511 -471
  82. package/components/message-box/index.umd.cjs +1 -1
  83. package/components/modal/index.css +1 -1
  84. package/components/modal/index.esm.js +438 -398
  85. package/components/modal/index.umd.cjs +1 -1
  86. package/components/nav/index.esm.js +535 -452
  87. package/components/nav/index.umd.cjs +2 -2
  88. package/components/notify/index.esm.js +59 -53
  89. package/components/notify/index.umd.cjs +1 -1
  90. package/components/number-range/index.esm.js +556 -477
  91. package/components/number-range/index.umd.cjs +1 -1
  92. package/components/number-spinner/index.esm.js +504 -425
  93. package/components/number-spinner/index.umd.cjs +1 -1
  94. package/components/order/index.css +1 -1
  95. package/components/order/index.esm.js +1833 -1054
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +100 -100
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +899 -870
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +576 -487
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/popover/index.esm.js +71 -70
  104. package/components/popover/index.umd.cjs +1 -1
  105. package/components/progress/index.esm.js +73 -73
  106. package/components/progress/index.umd.cjs +2 -2
  107. package/components/property-editor/index.css +1 -1
  108. package/components/property-editor/index.esm.js +1916 -1220
  109. package/components/property-editor/index.umd.cjs +3 -3
  110. package/components/property-panel/index.esm.js +783 -886
  111. package/components/property-panel/index.umd.cjs +1 -1
  112. package/components/query-solution/index.css +1 -1
  113. package/components/query-solution/index.esm.js +3632 -2556
  114. package/components/query-solution/index.umd.cjs +1 -1
  115. package/components/radio-button/index.esm.js +72 -72
  116. package/components/radio-button/index.umd.cjs +1 -1
  117. package/components/radio-group/index.esm.js +484 -405
  118. package/components/radio-group/index.umd.cjs +1 -1
  119. package/components/rate/index.esm.js +152 -152
  120. package/components/rate/index.umd.cjs +1 -1
  121. package/components/response-layout/index.esm.js +73 -73
  122. package/components/response-layout/index.umd.cjs +1 -1
  123. package/components/response-layout-editor/index.css +1 -1
  124. package/components/response-layout-editor/index.esm.js +1081 -1043
  125. package/components/response-layout-editor/index.umd.cjs +1 -1
  126. package/components/response-toolbar/index.esm.js +753 -738
  127. package/components/response-toolbar/index.umd.cjs +1 -1
  128. package/components/schema-selector/index.css +1 -1
  129. package/components/schema-selector/index.esm.js +4418 -4177
  130. package/components/schema-selector/index.umd.cjs +2 -2
  131. package/components/search-box/index.esm.js +119 -119
  132. package/components/search-box/index.umd.cjs +1 -1
  133. package/components/section/index.esm.js +92 -91
  134. package/components/section/index.umd.cjs +1 -1
  135. package/components/smoke-detector/index.esm.js +59 -59
  136. package/components/smoke-detector/index.umd.cjs +1 -1
  137. package/components/splitter/index.esm.js +103 -103
  138. package/components/splitter/index.umd.cjs +1 -1
  139. package/components/step/index.esm.js +85 -85
  140. package/components/step/index.umd.cjs +1 -1
  141. package/components/switch/index.esm.js +457 -378
  142. package/components/switch/index.umd.cjs +1 -1
  143. package/components/tabs/index.css +1 -1
  144. package/components/tabs/index.esm.js +1696 -1617
  145. package/components/tabs/index.umd.cjs +1 -1
  146. package/components/tags/index.esm.js +53 -53
  147. package/components/tags/index.umd.cjs +1 -1
  148. package/components/text/index.esm.js +268 -268
  149. package/components/text/index.umd.cjs +1 -1
  150. package/components/textarea/index.esm.js +420 -341
  151. package/components/textarea/index.umd.cjs +1 -1
  152. package/components/time-picker/index.css +1 -1
  153. package/components/time-picker/index.esm.js +1062 -981
  154. package/components/time-picker/index.umd.cjs +1 -1
  155. package/components/transfer/index.css +1 -1
  156. package/components/transfer/index.esm.js +381 -379
  157. package/components/transfer/index.umd.cjs +1 -1
  158. package/components/tree-grid/index.css +1 -1
  159. package/components/tree-grid/index.esm.js +5252 -9560
  160. package/components/tree-grid/index.umd.cjs +1 -1
  161. package/components/tree-view/index.css +1 -0
  162. package/components/tree-view/index.esm.js +3920 -2692
  163. package/components/tree-view/index.umd.cjs +1 -1
  164. package/components/uploader/index.esm.js +373 -367
  165. package/components/uploader/index.umd.cjs +2 -2
  166. package/components/verify-detail/index.esm.js +92 -92
  167. package/components/verify-detail/index.umd.cjs +1 -1
  168. package/components/video/index.esm.js +597 -417
  169. package/components/video/index.umd.cjs +1 -1
  170. package/components/weather/index.esm.js +251 -251
  171. package/components/weather/index.umd.cjs +4 -4
  172. package/farris.all.esm.js +17125 -16176
  173. package/farris.all.umd.cjs +8 -8
  174. package/index.css +1 -1
  175. package/package.json +1 -1
  176. package/types/capsule/src/capsule.props.d.ts +2 -2
  177. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  178. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  179. package/types/common/index.d.ts +1 -0
  180. package/types/common/types.d.ts +1 -1
  181. package/types/common/utils/encrypt.d.ts +2 -0
  182. package/types/component/src/component.props.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +1 -1
  184. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  185. package/types/components.d.ts +1 -0
  186. package/types/data-grid/index.d.ts +5 -2
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  189. package/types/data-view/composition/types.d.ts +18 -1
  190. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  191. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  192. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  193. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  194. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  195. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  196. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  197. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  198. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  199. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  200. package/types/dynamic-form/src/types.d.ts +12 -1
  201. package/types/dynamic-resolver/index.d.ts +1 -0
  202. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  203. package/types/dynamic-resolver/src/types.d.ts +9 -0
  204. package/types/dynamic-view/index.d.ts +1 -0
  205. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  206. package/types/index.d.ts +2 -0
  207. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  208. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  209. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  210. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  211. package/types/lookup/src/composition/types.d.ts +8 -0
  212. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  213. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  214. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  215. package/types/lookup/src/composition/use-http.d.ts +9 -5
  216. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  217. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  218. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  219. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  220. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  221. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  222. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  223. package/types/modal/src/modal.component.d.ts +3 -0
  224. package/types/modal/src/modal.props.d.ts +4 -0
  225. package/types/page-header/src/page-header.props.d.ts +1 -0
  226. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  227. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  228. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  229. package/types/response-layout-editor/src/type.d.ts +21 -0
  230. package/types/tabs/src/tabs.props.d.ts +1 -0
  231. package/types/tree-grid/index.d.ts +8 -2
  232. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  233. package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
  234. package/types/modal/src/composition/use-esc.d.ts +0 -1
  235. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  236. 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 H } 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, ignore: o } = e, a = o && Array.isArray(o), p = Object.keys(t).reduce((s, i) => ((!a || !o.find((l) => l == i)) && (s[i] = t[i].type === "object" && t[i].properties ? Z(t[i]) : re(t[i].default)), s), {});
14
- return (!a || !o.find((s) => s == "id")) && (p.id = `${n}-${Date.now()}`), p;
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 = {}, n) {
17
- const o = Y[e];
17
+ function R(e, n = {}, t) {
18
+ const o = _[e];
18
19
  if (o) {
19
- let a = Z(o);
20
- const p = _[e];
21
- return a = p ? p({ getSchemaByType: z }, a, t, n) : a, a;
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 p = t.get(a);
33
- if (typeof p == "string")
34
- o[p] = 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 s = p(a, e[a], e);
37
- Object.assign(o, s);
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, u, c, d) {
49
+ function pe(e = {}) {
50
+ function n(i, s, c, d) {
50
51
  if (typeof c == "number")
51
- return d[r].length === c;
52
+ return d[i].length === c;
52
53
  if (typeof c == "object") {
53
- const f = Object.keys(c)[0], b = c[f];
54
- if (f === "not")
55
- return Number(d[r].length) !== Number(b);
56
- if (f === "moreThan")
57
- return Number(d[r].length) >= Number(b);
58
- if (f === "lessThan")
59
- return Number(d[r].length) <= Number(b);
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, u, c, d) {
64
- return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(c);
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, u) => (r.set(u, e[u]), r), o);
71
- function a(r, u) {
72
- const c = r;
73
- return typeof u == "number" ? [{ target: c, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: c, operator: "getProperty", param: r, value: !!u }] : typeof u == "object" ? Object.keys(u).map((d) => {
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) => {
74
75
  if (d === "length")
75
- return { target: c, operator: "length", param: null, value: u[d] };
76
- const f = d, b = u[d];
77
- return { target: c, operator: "getProperty", param: f, value: b };
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 p(r) {
81
- return Object.keys(r).reduce((c, d) => {
82
- const f = a(d, r[d]);
83
- return c.push(...f), c;
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 s(r, u) {
87
- if (o.has(r.operator)) {
88
- const c = o.get(r.operator);
89
- return c && c(r.target, r.param, r.value, u) || !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 i(r, u) {
94
- return p(r).reduce((f, b) => f && s(b, u), !0);
94
+ function p(i, s) {
95
+ return l(i).reduce((g, f) => g && u(f, s), !0);
95
96
  }
96
- function l(r, u) {
97
- const c = Object.keys(r), d = c.includes("allOf"), f = c.includes("anyOf"), b = d || f, D = (b ? r[b ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((C) => i(C, u));
98
- return d ? !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: l };
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 = (s, i, l) => i, a = {}, p = (s) => s) {
143
- return Y[t.title] = t, _[t.title] = o, se[t.title] = a, pe[t.title] = p, (s = {}) => {
144
- const i = ue(s, t, n), l = Object.keys(e).reduce((r, u) => (r[u] = e[u].default, r), {});
145
- return Object.assign(l, i);
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
- }, R = {
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(R, Be, fe, ae);
339
- function K(e, t) {
340
- const n = P(() => Number(e.precision) || 0);
341
- function o(l) {
342
- return l.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(l) {
345
- return isNaN(l) || l === null || l === void 0 || l === "";
346
+ function r(a) {
347
+ return isNaN(a) || a === null || a === void 0 || a === "";
346
348
  }
347
- function p(l) {
348
- const r = a(e.max) ? null : new T(String(e.max), 10), u = a(e.min) ? null : new T(String(e.min), 10);
349
- return r && l.gt(r) ? r : u && l.lt(u) ? u : l;
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 s(l, r, u, c) {
352
- const d = new T(l, 10), f = a(u && u.value) ? null : new T(String(u.value), 10), b = a(r && r.value) ? null : new T(String(r.value), 10);
353
- let V;
354
- return c ? V = f && d.gt(f) ? f : d : V = b && d.lt(b) ? b : d, 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 i(l) {
358
+ function p(a) {
357
359
  if (e.parser)
358
- return isNaN(Number(l)) ? e.parser(l) : l;
359
- let r = p(new T(l, 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 c = new T("" + e.min, 10), d = new T("" + e.max, 10);
365
+ const c = new M("" + e.min, 10), d = new M("" + e.max, 10);
364
366
  if (!c.isNaN())
365
- r = c;
367
+ i = c;
366
368
  else if (!d.isNaN())
367
- r = d;
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: i, isEmpty: a, precision: n, getValidNumberObject: p, getValidNumberInRange: s };
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: p } = n;
383
- function s(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 i(r, u) {
387
- return e.precision !== null && e.precision !== void 0 ? r.toFormat(p.value, u) : r.toFormat(u);
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 l(r) {
390
- const u = s(r), c = new T(u, 10), d = a(c);
391
- return d.valueOf() === "0" && !e.showZero || d.isNaN() ? "" : e.formatter ? e.formatter(d.toNumber()) : i(d, 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: s, format: l };
395
+ return { cleanFormat: u, format: a };
394
396
  }
395
- function A(e, t, n, o, a, p, s, i, l, r) {
396
- const { format: u } = a, { getRealValue: c, getValidNumberInRange: d } = p;
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, g = B === "up" ? "plus" : "minus";
409
- if (S()) {
410
- let h = new T(o.value || 0)[g](Number(e.step)).toFixed();
411
- h = d(h, i, l, r), n.value = u(h), o.value = c(h), s(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, p, s, i, l, r, u) {
429
- const { cleanFormat: c, format: d } = a, { getRealValue: f, isEmpty: b, getValidNumberInRange: V } = p, { downward: E, upward: D } = s, x = P(() => n.value), C = k(!1);
430
- function B(y) {
431
- var N;
432
- if (y.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 h = (N = y.target) == null ? void 0 : N.value;
436
+ S.value = !1;
437
+ let h = (k = b.target) == null ? void 0 : k.value;
436
438
  e.canNull || (h = h || 0);
437
439
  let v = c(h);
438
- v = V(v, l, r, u), n.value = d(v), o.value = f(v), i(o.value), t.emit("blur", { event: y, formatted: n.value, value: o.value });
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 });
439
441
  }
440
- function S(y) {
441
- y.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: y, formatted: n.value, value: o.value }));
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 }));
442
444
  }
443
- function g(y) {
444
- var N;
445
- y.stopPropagation();
446
- let h = (N = y.target) == null ? void 0 : N.value;
445
+ function y(b) {
446
+ var k;
447
+ b.stopPropagation();
448
+ let h = (k = b.target) == null ? void 0 : k.value;
447
449
  e.canNull || (h = h || 0);
448
450
  const v = c(h);
449
- n.value = v, o.value = f(v), i(o.value);
451
+ t.value = v, o.value = g(v), p(o.value);
450
452
  }
451
- function w(y) {
452
- y.key === "ArrowDown" && (y.preventDefault(), E()), y.key === "ArrowUp" && (y.preventDefault(), D()), y.stopPropagation();
453
+ function C(b) {
454
+ b.key === "ArrowDown" && (b.preventDefault(), D()), b.key === "ArrowUp" && (b.preventDefault(), E()), b.stopPropagation();
453
455
  }
454
- return { textBoxValue: x, onBlurTextBox: B, onFocusTextBox: S, onInput: g, onKeyDown: w, isTextBoxFocused: C };
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: p,
460
- onInput: s,
461
- onKeyDown: i,
462
- textBoxValue: l
463
- } = n, r = P(() => e.disabled || e.readonly || !e.editable ? "" : o ? e.beginPlaceHolder : e.endPlaceHolder), u = 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
468
  })), c = P(() => ({
467
469
  "text-align": e.textAlign
468
470
  }));
469
- function d(f) {
470
- f.stopPropagation();
471
+ function d(g) {
472
+ g.stopPropagation();
471
473
  }
472
- return () => M("input", {
473
- class: u.value,
474
+ return () => T("input", {
475
+ class: s.value,
474
476
  style: c.value,
475
477
  type: "text",
476
- value: l.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
+ placeholder: i.value,
482
+ onBlur: r,
481
483
  onChange: d,
482
- onFocus: p,
483
- onInput: s,
484
- onKeydown: i
484
+ onFocus: l,
485
+ onInput: u,
486
+ onKeydown: p
485
487
  }, null);
486
488
  }
487
- function L(e, t, n) {
489
+ function I(e, n, t) {
488
490
  const {
489
491
  canDownward: o,
490
- canUpward: a,
491
- onClickDownButton: p,
492
- onClickUpButton: s
493
- } = n, i = 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
- })), l = 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
- })), u = P(() => ({
507
+ })), s = P(() => ({
506
508
  cursor: o() ? "pointer" : "not-allowed",
507
509
  "margin-left": 0
508
510
  }));
509
- return () => M("div", {
510
- class: i.value
511
- }, [M("button", {
511
+ return () => T("div", {
512
+ class: p.value
513
+ }, [T("button", {
512
514
  title: "upButton",
513
- class: l.value,
514
- style: r.value,
515
- onClick: s,
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: l.value,
522
- style: u.value,
523
- onClick: p,
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 q = /* @__PURE__ */ Q({
531
+ const $ = /* @__PURE__ */ X({
530
532
  name: "FNumberRange",
531
- props: R,
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), p = k(""), s = K(e), i = ee(e, t, s), l = (S) => {
535
- t.emit("beginValueChange", S);
536
- }, r = A(e, t, o, n, i, s, l, n, a, !0), u = U(e, t, o, n, i, s, r, l, n, a, !0), c = L(e, t, r), d = $(e, t, u, !0), f = (S) => {
537
- t.emit("endValueChange", S);
538
- }, b = A(e, t, p, a, i, s, f, n, a, !1), V = U(e, t, p, a, i, s, b, f, n, a, !1), E = L(e, t, b), D = $(e, t, V, !1), {
539
- getRealValue: x
540
- } = s, {
541
- format: C
542
- } = i, 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), g = x(e.endValue);
545
- o.value = C(S), p.value = C(g);
546
- }), j(() => [e.beginValue], ([S]) => {
547
- if (!u.isTextBoxFocused.value) {
548
- const g = x(S);
549
- o.value = C(g);
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 g = x(S);
554
- p.value = C(g);
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), p.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
- }, [d(), B.value && c()]), 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() || "", p = n && n.getDesignerClass && n.getDesignerClass() || "", s = k();
578
- function i() {
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 l() {
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 u() {
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 c(g) {
591
- if (!g || !g.value)
592
+ function c(y) {
593
+ if (!y || !y.value)
592
594
  return null;
593
- if (g.value.schema && g.value.schema.type === "component")
594
- return g.value;
595
- const w = k(g == null ? void 0 : g.value.parent), y = c(w);
596
- return y || null;
597
- }
598
- function d(g = t) {
599
- const { componentInstance: w, designerItemElementRef: y } = g;
600
- return !w || !w.value ? null : w.value.canMove ? y : d(g.parent);
601
- }
602
- function f(g) {
603
- return !!n && n.canAccepts(g);
604
- }
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
- }
608
- function V() {
609
- }
610
- function E(g, w) {
611
- w && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(w);
612
- }
613
- function D(g, w) {
614
- const { componentType: y } = g;
615
- let h = z(y, g, w);
616
- n && n.onResolveNewComponentSchema && (h = n.onResolveNewComponentSchema(g, h));
617
- const v = y.toLowerCase().replace("-", "_");
618
- return h && !h.id && h.type === y && (h.id = `${v}_${Math.random().toString().slice(2, 6)}`), h;
619
- }
620
- function x(g, w) {
621
- const y = String(g.getAttribute("data-controltype")), h = g.getAttribute("data-feature"), v = h ? JSON.parse(h) : {};
622
- v.parentComponentInstance = s.value;
623
- let N = z(y, v);
624
- n && n.onAcceptNewChildElement && (N = n.onAcceptNewChildElement(g, w, N));
625
- const te = y.toLowerCase().replace("-", "_");
626
- return N && !N.id && N.type === y && (N.id = `${te}_${Math.random().toString().slice(2, 6)}`), N;
627
- }
628
- function C(g) {
629
- }
630
- function B(...g) {
631
- if (n && n.getPropsConfig)
632
- return n.getPropsConfig(...g);
633
- }
634
- return s.value = {
635
- canMove: i(),
636
- canSelectParent: l(),
637
- canDelete: r(),
638
- canNested: !u(),
639
- contents: t == null ? void 0 : t.schema.contents,
595
+ if (y.value.schema && y.value.schema.type === "component")
596
+ return y.value;
597
+ const C = V(y == null ? void 0 : y.value.parent), b = c(C);
598
+ return b || null;
599
+ }
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);
603
+ }
604
+ function g(y) {
605
+ return !!t && t.canAccepts(y);
606
+ }
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);
609
+ }
610
+ function w() {
611
+ }
612
+ function D(y, C) {
613
+ C && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(C);
614
+ }
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;
621
+ }
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;
629
+ }
630
+ function S(y) {
631
+ }
632
+ function B(...y) {
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: p,
645
- canAccepts: f,
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,
646
648
  getBelongedComponentInstance: c,
647
649
  getDraggableDesignItemElement: d,
648
- getDraggingDisplayText: b,
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
- }, s;
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(c) {
664
+ const t = V(!0), o = V(!0);
665
+ function r(c) {
664
666
  return !1;
665
667
  }
666
- function p() {
668
+ function l() {
667
669
  return !1;
668
670
  }
669
- function s() {
671
+ function u() {
670
672
  return !1;
671
673
  }
672
- function i() {
674
+ function p() {
673
675
  return !0;
674
676
  }
675
- function l(c) {
677
+ function a(c) {
676
678
  }
677
- function r() {
679
+ function i() {
678
680
  }
679
- function u(c) {
681
+ function s(c) {
680
682
  return null;
681
683
  }
682
684
  return {
683
- canAccepts: a,
684
- checkCanDeleteComponent: p,
685
- checkCanMoveComponent: s,
686
- hideNestedPaddingInDesginerView: i,
687
- onAcceptMovedChildElement: l,
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: u
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 s;
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(), p = 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: "基本信息",
@@ -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((s = o.designViewModelField.type) == null ? void 0 : s.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,26 +919,27 @@ class Te extends Ve {
902
919
  { field: "fieldType", title: "字段类型" }
903
920
  ],
904
921
  textField: "bindingField",
905
- data: p
922
+ data: u
906
923
  }
907
924
  }
908
925
  },
909
- setPropertyRelates(i, l) {
910
- if (i)
911
- switch (i && i.propertyID) {
926
+ setPropertyRelates(a, i) {
927
+ if (a)
928
+ switch (a && a.propertyID) {
912
929
  case "type": {
913
- o.changeControlType(t, i, n);
930
+ r.changeControlType(t, a, o);
914
931
  break;
915
932
  }
916
933
  case "label": {
917
- i.needRefreshControlTree = !0;
934
+ a.needRefreshControlTree = !0;
918
935
  break;
919
936
  }
920
937
  }
921
938
  }
922
939
  };
923
940
  }
924
- getAppearanceProperties(t) {
941
+ getAppearanceProperties(t, o) {
942
+ var r = this;
925
943
  return {
926
944
  title: "样式",
927
945
  description: "Appearance",
@@ -942,12 +960,25 @@ class Te extends Ve {
942
960
  description: "响应式列宽",
943
961
  title: "响应式列宽",
944
962
  type: "boolean",
945
- visible: !1,
963
+ visible: !0,
964
+ // 这个属性,标记当属性变更得时候触发重新更新属性
965
+ refreshPanelAfterChanged: !0,
946
966
  editor: {
947
- type: "response-layout-editor-setting"
948
- },
949
- $converter: "/converter/response-form-layout.converter"
967
+ type: "response-layout-editor-setting",
968
+ initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, r.componentId)
969
+ }
950
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
+ }
951
982
  }
952
983
  };
953
984
  }
@@ -959,44 +990,44 @@ class Te extends Ve {
959
990
  * @param propertyData 控件DOM属性
960
991
  * @param newControlType 新控件类型
961
992
  */
962
- changeControlType(t, n, o) {
963
- var r, u, c, d;
964
- const a = n.propertyValue, p = o && o.parent && o.parent.schema;
965
- if (!p)
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)
966
997
  return;
967
- const s = p.contents.findIndex((f) => f.id === t.id), i = p.contents[s];
968
- let l;
998
+ const p = u.contents.findIndex((f) => f.id === t.id), a = u.contents[p];
999
+ let i;
969
1000
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
970
1001
  editor: {
971
- $type: a
1002
+ $type: l
972
1003
  },
973
1004
  name: this.designViewModelField.name,
974
1005
  require: this.designViewModelField.require,
975
1006
  readonly: this.designViewModelField.readonly
976
- }, !1), l = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), l || (l = J("form-group") || {}, l.editor = J(a) || {}, delete l.editor.id, delete l.editor.binding, delete l.editor.appearance), Object.assign(l, {
977
- id: i.id,
978
- appearance: i.appearance,
979
- size: i.size,
980
- label: i.label,
981
- binding: i.binding,
982
- visible: i.visible
983
- }), Object.assign(l.editor, {
984
- isTextArea: l.isTextArea && i.isTextArea,
985
- placeholder: (r = i.editor) == null ? void 0 : r.placeholder,
986
- holdPlace: (u = i.editor) == null ? void 0 : u.holdPlace,
987
- readonly: (c = i.editor) == null ? void 0 : c.readonly,
988
- require: (d = i.editor) == null ? void 0 : d.require
989
- }), p.contents.splice(s, 1), p.contents.splice(s, 0, l), o.schema = Object.assign(i, l), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
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
1014
+ }), Object.assign(i.editor, {
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(
990
1021
  (f) => f.classList.remove("dgComponentSelected")
991
- ), ke.value++;
1022
+ ), Te.value++;
992
1023
  }
993
- getComponentConfig(t, n = {}, o = {}) {
994
- const a = Object.assign({
1024
+ getComponentConfig(t, o = {}, r = {}) {
1025
+ const l = Object.assign({
995
1026
  description: "编辑器",
996
1027
  title: "编辑器",
997
1028
  type: "input-group",
998
1029
  $converter: "/converter/property-editor.converter"
999
- }, n), p = Object.assign({
1030
+ }, o), u = Object.assign({
1000
1031
  readonly: {
1001
1032
  description: "",
1002
1033
  title: "只读",
@@ -1017,16 +1048,64 @@ class Te extends Ve {
1017
1048
  title: "提示文本",
1018
1049
  type: "string"
1019
1050
  }
1020
- }, o);
1021
- return { ...a, properties: { ...p } };
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;
1022
1101
  }
1023
1102
  }
1024
- class Me extends Te {
1025
- constructor(t, n) {
1026
- super(t, n);
1103
+ class Fe extends xe {
1104
+ constructor(n, t) {
1105
+ super(n, t);
1027
1106
  }
1028
- getEditorProperties(t) {
1029
- return this.getComponentConfig(t, { type: "number-range" }, {
1107
+ getEditorProperties(n) {
1108
+ return this.getComponentConfig(n, { type: "number-range" }, {
1030
1109
  editable: {
1031
1110
  description: "",
1032
1111
  title: "允许编辑",
@@ -1035,90 +1114,90 @@ class Me extends Te {
1035
1114
  });
1036
1115
  }
1037
1116
  }
1038
- function xe(e, t) {
1117
+ function Ee(e, n) {
1039
1118
  const {
1040
- canAccepts: n,
1119
+ canAccepts: t,
1041
1120
  checkCanDeleteComponent: o,
1042
- checkCanMoveComponent: a,
1043
- hideNestedPaddingInDesginerView: p,
1044
- onAcceptMovedChildElement: s,
1045
- resolveComponentContext: i,
1046
- triggerBelongedComponentToMoveWhenMoved: l,
1047
- triggerBelongedComponentToDeleteWhenDeleted: r
1048
- } = Se(e), u = e.schema;
1049
- function c(d, f) {
1050
- return new Me(d, t).getPropertyConfig(u, 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);
1051
1130
  }
1052
1131
  return {
1053
- canAccepts: n,
1132
+ canAccepts: t,
1054
1133
  checkCanDeleteComponent: o,
1055
- checkCanMoveComponent: a,
1056
- hideNestedPaddingInDesginerView: p,
1057
- onAcceptMovedChildElement: s,
1058
- resolveComponentContext: i,
1059
- triggerBelongedComponentToMoveWhenMoved: l,
1060
- triggerBelongedComponentToDeleteWhenDeleted: r,
1134
+ checkCanMoveComponent: r,
1135
+ hideNestedPaddingInDesginerView: l,
1136
+ onAcceptMovedChildElement: u,
1137
+ resolveComponentContext: p,
1138
+ triggerBelongedComponentToMoveWhenMoved: a,
1139
+ triggerBelongedComponentToDeleteWhenDeleted: i,
1061
1140
  getPropsConfig: c
1062
1141
  };
1063
1142
  }
1064
- const Fe = /* @__PURE__ */ Q({
1143
+ const Pe = /* @__PURE__ */ X({
1065
1144
  name: "FNumberRangeDesign",
1066
- props: R,
1145
+ props: z,
1067
1146
  emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
1068
- setup(e, t) {
1069
- const n = k(e.beginValue), o = k(""), a = k(e.endValue), p = k(""), s = K(e), i = ee(e, t, s), l = (v) => {
1070
- t.emit("beginValueChange", v);
1071
- }, r = k(), u = H("designer-host-service"), c = H("design-item-context"), d = xe(c, u), f = Ne(r, c, d);
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);
1072
1151
  G(() => {
1073
- r.value.componentInstance = f;
1074
- }), t.expose(f.value);
1075
- const b = A(e, t, o, n, i, s, l, n, a, !0), V = U(e, t, o, n, i, s, b, l, n, a, !0), E = L(e, t, b), D = $(e, t, V, !0), x = (v) => {
1076
- t.emit("endValueChange", v);
1077
- }, C = A(e, t, p, a, i, s, x, n, a, !1), B = U(e, t, p, a, i, s, C, x, n, a, !1), S = L(e, t, C), g = $(e, t, B, !1), {
1078
- getRealValue: w
1079
- } = s, {
1080
- format: y
1081
- } = i, h = 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);
1082
1161
  return G(() => {
1083
- const v = w(e.beginValue), N = w(e.endValue);
1084
- o.value = y(v), p.value = y(N);
1085
- }), j(() => [e.beginValue], ([v]) => {
1086
- const N = w(v);
1087
- o.value = y(N);
1088
- }), j(() => [e.endValue], ([v]) => {
1089
- const N = w(v);
1090
- p.value = y(N);
1091
- }), j(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
1092
- o.value = y(n.value), p.value = y(a.value);
1093
- }), () => M("div", {
1094
- 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,
1095
1174
  class: "input-group number-range f-cmp-number-spinner"
1096
- }, [M("div", {
1175
+ }, [T("div", {
1097
1176
  class: "form-control input-container"
1098
- }, [M("div", {
1177
+ }, [T("div", {
1099
1178
  class: "sub-input-group"
1100
- }, [D(), h.value && E()]), M("span", {
1179
+ }, [E(), h.value && D()]), T("span", {
1101
1180
  class: "spliter"
1102
- }, [X("~")]), M("div", {
1181
+ }, [Q("~")]), T("div", {
1103
1182
  class: "sub-input-group"
1104
- }, [g(), h.value && S()])])]);
1183
+ }, [y(), h.value && N()])])]);
1105
1184
  }
1106
1185
  }), De = (e) => {
1107
- const t = e;
1108
- return t.install = function(n) {
1109
- n.component(t.name, e);
1186
+ const n = e;
1187
+ return n.install = function(t) {
1188
+ t.component(n.name, e);
1110
1189
  }, e;
1111
1190
  };
1112
- q.register = (e, t, n, o) => {
1113
- e["number-range"] = q, t["number-range"] = I;
1191
+ $.register = (e, n, t, o) => {
1192
+ e["number-range"] = $, n["number-range"] = ee;
1114
1193
  };
1115
- q.registerDesigner = (e, t, n) => {
1116
- e["number-range"] = Fe, t["number-range"] = I;
1194
+ $.registerDesigner = (e, n, t) => {
1195
+ e["number-range"] = Pe, n["number-range"] = ee;
1117
1196
  };
1118
- const Ue = De(q);
1197
+ const $e = De($);
1119
1198
  export {
1120
- q as FNumberRange,
1121
- Ue as default,
1122
- R as numberRangeProps,
1123
- I as propsResolver
1199
+ $ as FNumberRange,
1200
+ $e as default,
1201
+ z as numberRangeProps,
1202
+ ee as propsResolver
1124
1203
  };