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