@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,11 +1,12 @@
1
- var Z = Object.defineProperty;
2
- var H = (n, e, t) => e in n ? Z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var v = (n, e, t) => H(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as $, inject as N, onMounted as W, createVNode as h, Fragment as I, computed as B, ref as k, provide as K } from "vue";
5
- import { useCheck as ee } from "../common/index.esm.js";
6
- import { cloneDeep as te } from "lodash-es";
7
- import { getSchemaByType as L } from "../dynamic-resolver/index.esm.js";
8
- const ne = {
1
+ var H = Object.defineProperty;
2
+ var K = (r, t, e) => t in r ? H(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
+ var v = (r, t, e) => K(r, typeof t != "symbol" ? t + "" : t, e);
4
+ import { defineComponent as N, inject as L, onMounted as z, createVNode as h, Fragment as ee, computed as B, ref as M, provide as te } from "vue";
5
+ import { useCheck as ne } from "../common/index.esm.js";
6
+ import { isPlainObject as q, cloneDeep as W } from "lodash-es";
7
+ import { getSchemaByType as j } from "../dynamic-resolver/index.esm.js";
8
+ import { useResponseLayoutEditorSetting as oe } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
9
+ const re = {
9
10
  value: { type: String, default: "" },
10
11
  /** 值 */
11
12
  modelValue: { type: String, default: "" },
@@ -15,35 +16,35 @@ const ne = {
15
16
  label: { type: String, default: "" },
16
17
  /** 标识 */
17
18
  id: { type: String, default: "" }
18
- }, x = Symbol("radioGroupContext"), q = /* @__PURE__ */ $({
19
+ }, R = Symbol("radioGroupContext"), x = /* @__PURE__ */ N({
19
20
  name: "FRadio",
20
- props: ne,
21
+ props: re,
21
22
  emits: ["update:value"],
22
- setup(n, e) {
23
- const t = N(x, null), {
24
- buttonClass: o,
25
- checked: r,
26
- disabled: p,
27
- name: m,
28
- tagClass: a,
29
- shouldRenderButton: u,
23
+ setup(r, t) {
24
+ const e = L(R, null), {
25
+ buttonClass: n,
26
+ checked: o,
27
+ disabled: a,
28
+ name: c,
29
+ tagClass: d,
30
+ shouldRenderButton: l,
30
31
  shouldRenderNative: i,
31
- shouldRenderTag: c,
32
+ shouldRenderTag: p,
32
33
  onClickRadio: s
33
- } = ee(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
34
- return W(() => {
34
+ } = ne(r, t, e == null ? void 0 : e.parentProps, e == null ? void 0 : e.parentContext);
35
+ return z(() => {
35
36
  }), () => {
36
- var d, f, g, T, w, V;
37
- return h(I, null, [u.value && h("div", {
38
- class: o.value,
37
+ var m, y, f, k, T, F;
38
+ return h(ee, null, [l.value && h("div", {
39
+ class: n.value,
39
40
  style: "border-radius:0;border: 1px solid #E8EBF2;",
40
41
  onClick: s
41
- }, [(f = (d = e.slots).default) == null ? void 0 : f.call(d)]), c.value && h("div", {
42
- class: a.value,
42
+ }, [(y = (m = t.slots).default) == null ? void 0 : y.call(m)]), p.value && h("div", {
43
+ class: d.value,
43
44
  onClick: s
44
45
  }, [h("div", {
45
46
  class: "title"
46
- }, [(T = (g = e.slots).default) == null ? void 0 : T.call(g)]), h("div", {
47
+ }, [(k = (f = t.slots).default) == null ? void 0 : k.call(f)]), h("div", {
47
48
  class: "tip"
48
49
  }, null), h("span", {
49
50
  class: "f-icon f-icon-check f-radio-icon"
@@ -53,112 +54,112 @@ const ne = {
53
54
  }, [h("input", {
54
55
  type: "radio",
55
56
  class: "custom-control-input",
56
- name: m.value,
57
- id: n.id,
58
- value: n.value,
59
- checked: r.value,
60
- disabled: p.value
57
+ name: c.value,
58
+ id: r.id,
59
+ value: r.value,
60
+ checked: o.value,
61
+ disabled: a.value
61
62
  }, null), h("div", {
62
63
  class: "custom-control-label"
63
- }, [(V = (w = e.slots).default) == null ? void 0 : V.call(w)])])]);
64
+ }, [(F = (T = t.slots).default) == null ? void 0 : F.call(T)])])]);
64
65
  };
65
66
  }
66
67
  });
67
- function oe(n, e, t) {
68
- return e;
68
+ function ie(r, t, e) {
69
+ return t;
69
70
  }
70
- const _ = {}, J = {};
71
- function U(n) {
72
- const { properties: e, title: t, ignore: o } = n, r = o && Array.isArray(o), p = Object.keys(e).reduce((m, a) => ((!r || !o.find((u) => u == a)) && (m[a] = e[a].type === "object" && e[a].properties ? U(e[a]) : te(e[a].default)), m), {});
73
- return (!r || !o.find((m) => m == "id")) && (p.id = `${t}-${Date.now()}`), p;
71
+ const _ = {}, X = {};
72
+ function $(r) {
73
+ const { properties: t, title: e, ignore: n } = r, o = n && Array.isArray(n), a = Object.keys(t).reduce((c, d) => ((!o || !n.find((l) => l == d)) && (c[d] = t[d].type === "object" && t[d].properties ? $(t[d]) : W(t[d].default)), c), {});
74
+ return (!o || !n.find((c) => c == "id")) && (a.id = `${e}-${Date.now()}`), a;
74
75
  }
75
- function O(n, e = {}, t) {
76
- const o = _[n];
77
- if (o) {
78
- let r = U(o);
79
- const p = J[n];
80
- return r = p ? p({ getSchemaByType: O }, r, e, t) : r, r;
76
+ function U(r, t = {}, e) {
77
+ const n = _[r];
78
+ if (n) {
79
+ let o = $(n);
80
+ const a = X[r];
81
+ return o = a ? a({ getSchemaByType: U }, o, t, e) : o, o;
81
82
  }
82
83
  return null;
83
84
  }
84
- function re(n, e) {
85
- const t = U(e);
86
- return Object.keys(n).reduce((o, r) => (o[r] && typeof o[r] == "object" ? Object.assign(o[r], n[r]) : o[r] = n[r], o), t), t;
85
+ function ae(r, t) {
86
+ const e = $(t);
87
+ return Object.keys(r).reduce((n, o) => (n[o] && q(n[o]) && q(r[o]) ? Object.assign(n[o], r[o]) : n[o] = r[o], n), e), e;
87
88
  }
88
- function ie(n, e) {
89
- return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
90
- if (e.has(r)) {
91
- const p = e.get(r);
92
- if (typeof p == "string")
93
- o[p] = n[r];
89
+ function le(r, t) {
90
+ return Object.keys(r).filter((n) => r[n] != null).reduce((n, o) => {
91
+ if (t.has(o)) {
92
+ const a = t.get(o);
93
+ if (typeof a == "string")
94
+ n[a] = r[o];
94
95
  else {
95
- const m = p(r, n[r], n);
96
- Object.assign(o, m);
96
+ const c = a(o, r[o], r);
97
+ Object.assign(n, c);
97
98
  }
98
99
  } else
99
- o[r] = n[r];
100
- return o;
100
+ n[o] = r[o];
101
+ return n;
101
102
  }, {});
102
103
  }
103
- function ae(n, e, t = /* @__PURE__ */ new Map()) {
104
- const o = re(n, e);
105
- return ie(o, t);
104
+ function se(r, t, e = /* @__PURE__ */ new Map()) {
105
+ const n = ae(r, t);
106
+ return le(n, e);
106
107
  }
107
- function le(n = {}) {
108
- function e(i, c, s, d) {
108
+ function ce(r = {}) {
109
+ function t(i, p, s, m) {
109
110
  if (typeof s == "number")
110
- return d[i].length === s;
111
+ return m[i].length === s;
111
112
  if (typeof s == "object") {
112
- const f = Object.keys(s)[0], g = s[f];
113
- if (f === "not")
114
- return Number(d[i].length) !== Number(g);
115
- if (f === "moreThan")
116
- return Number(d[i].length) >= Number(g);
117
- if (f === "lessThan")
118
- return Number(d[i].length) <= Number(g);
113
+ const y = Object.keys(s)[0], f = s[y];
114
+ if (y === "not")
115
+ return Number(m[i].length) !== Number(f);
116
+ if (y === "moreThan")
117
+ return Number(m[i].length) >= Number(f);
118
+ if (y === "lessThan")
119
+ return Number(m[i].length) <= Number(f);
119
120
  }
120
121
  return !1;
121
122
  }
122
- function t(i, c, s, d) {
123
- return d[i] && d[i].propertyValue && String(d[i].propertyValue.value) === String(s);
123
+ function e(i, p, s, m) {
124
+ return m[i] && m[i].propertyValue && String(m[i].propertyValue.value) === String(s);
124
125
  }
125
- const o = /* @__PURE__ */ new Map([
126
- ["length", e],
127
- ["getProperty", t]
126
+ const n = /* @__PURE__ */ new Map([
127
+ ["length", t],
128
+ ["getProperty", e]
128
129
  ]);
129
- Object.keys(n).reduce((i, c) => (i.set(c, n[c]), i), o);
130
- function r(i, c) {
130
+ Object.keys(r).reduce((i, p) => (i.set(p, r[p]), i), n);
131
+ function o(i, p) {
131
132
  const s = i;
132
- return typeof c == "number" ? [{ target: s, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
133
- if (d === "length")
134
- return { target: s, operator: "length", param: null, value: c[d] };
135
- const f = d, g = c[d];
136
- return { target: s, operator: "getProperty", param: f, value: g };
133
+ return typeof p == "number" ? [{ target: s, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!p }] : typeof p == "object" ? Object.keys(p).map((m) => {
134
+ if (m === "length")
135
+ return { target: s, operator: "length", param: null, value: p[m] };
136
+ const y = m, f = p[m];
137
+ return { target: s, operator: "getProperty", param: y, value: f };
137
138
  }) : [];
138
139
  }
139
- function p(i) {
140
- return Object.keys(i).reduce((s, d) => {
141
- const f = r(d, i[d]);
142
- return s.push(...f), s;
140
+ function a(i) {
141
+ return Object.keys(i).reduce((s, m) => {
142
+ const y = o(m, i[m]);
143
+ return s.push(...y), s;
143
144
  }, []);
144
145
  }
145
- function m(i, c) {
146
- if (o.has(i.operator)) {
147
- const s = o.get(i.operator);
148
- return s && s(i.target, i.param, i.value, c) || !1;
146
+ function c(i, p) {
147
+ if (n.has(i.operator)) {
148
+ const s = n.get(i.operator);
149
+ return s && s(i.target, i.param, i.value, p) || !1;
149
150
  }
150
151
  return !1;
151
152
  }
152
- function a(i, c) {
153
- return p(i).reduce((f, g) => f && m(g, c), !0);
153
+ function d(i, p) {
154
+ return a(i).reduce((y, f) => y && c(f, p), !0);
154
155
  }
155
- function u(i, c) {
156
- const s = Object.keys(i), d = s.includes("allOf"), f = s.includes("anyOf"), g = d || f, V = (g ? i[g ? d ? "allOf" : "anyOf" : "allOf"] : [i]).map((A) => a(A, c));
157
- return d ? !V.includes(!1) : V.includes(!0);
156
+ function l(i, p) {
157
+ const s = Object.keys(i), m = s.includes("allOf"), y = s.includes("anyOf"), f = m || y, F = (f ? i[f ? m ? "allOf" : "anyOf" : "allOf"] : [i]).map((A) => d(A, p));
158
+ return m ? !F.includes(!1) : F.includes(!0);
158
159
  }
159
- return { parseValueSchema: u };
160
+ return { parseValueSchema: l };
160
161
  }
161
- const l = {
162
+ const u = {
162
163
  button: { type: "button", name: "按钮", icon: "Button" },
163
164
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
164
165
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -195,21 +196,22 @@ const l = {
195
196
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
196
197
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
197
198
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
198
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
199
- }, ce = {}, se = {};
200
- le();
201
- function pe(n, e, t = /* @__PURE__ */ new Map(), o = (m, a, u) => a, r = {}, p = (m) => m) {
202
- return _[e.title] = e, J[e.title] = o, ce[e.title] = r, se[e.title] = p, (m = {}) => {
203
- const a = ae(m, e, t), u = Object.keys(n).reduce((i, c) => (i[c] = n[c].default, i), {});
204
- return Object.assign(u, a);
199
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
200
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
201
+ }, pe = {}, ue = {};
202
+ ce();
203
+ function de(r, t, e = /* @__PURE__ */ new Map(), n = (c, d, l) => d, o = {}, a = (c) => c) {
204
+ return _[t.title] = t, X[t.title] = n, pe[t.title] = o, ue[t.title] = a, (c = {}) => {
205
+ const d = se(c, t, e), l = Object.keys(r).reduce((i, p) => (i[p] = r[p].default, i), {});
206
+ return Object.assign(l, d);
205
207
  };
206
208
  }
207
- function ue(n, e) {
208
- return { customClass: e.class, customStyle: e.style };
209
+ function me(r, t) {
210
+ return { customClass: t.class, customStyle: t.style };
209
211
  }
210
- const de = /* @__PURE__ */ new Map([
211
- ["appearance", ue]
212
- ]), me = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/radio-group.schema.json", ye = "radio-group", ge = "A Farris Input Component", he = "object", ve = {
212
+ const fe = /* @__PURE__ */ new Map([
213
+ ["appearance", me]
214
+ ]), ye = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/radio-group.schema.json", he = "radio-group", ve = "A Farris Input Component", be = "object", Ce = {
213
215
  id: {
214
216
  description: "The unique identifier for a radio-group",
215
217
  type: "string"
@@ -290,23 +292,23 @@ const de = /* @__PURE__ */ new Map([
290
292
  description: "",
291
293
  type: "array"
292
294
  }
293
- }, be = [
295
+ }, ke = [
294
296
  "id",
295
297
  "type"
296
- ], Ce = [
298
+ ], Me = [
297
299
  "id",
298
300
  "appearance",
299
301
  "binding"
300
- ], ke = {
301
- $schema: me,
302
- $id: fe,
303
- title: ye,
304
- description: ge,
305
- type: he,
306
- properties: ve,
307
- required: be,
308
- ignore: Ce
309
- }, Me = {
302
+ ], we = {
303
+ $schema: ye,
304
+ $id: ge,
305
+ title: he,
306
+ description: ve,
307
+ type: be,
308
+ properties: Ce,
309
+ required: ke,
310
+ ignore: Me
311
+ }, Te = {
310
312
  /**
311
313
  * 是否被选中
312
314
  */
@@ -323,8 +325,8 @@ const de = /* @__PURE__ */ new Map([
323
325
  * type为button或者tag时的尺寸
324
326
  */
325
327
  size: { type: String, default: "middle" }
326
- }, j = {
327
- ...Me,
328
+ }, O = {
329
+ ...Te,
328
330
  /**
329
331
  * 组件标识
330
332
  */
@@ -363,50 +365,50 @@ const de = /* @__PURE__ */ new Map([
363
365
  * 枚举数组中枚举值的key值。
364
366
  */
365
367
  valueField: { type: String, default: "value" }
366
- }, X = pe(j, ke, de, oe);
367
- function Q(n, e, t) {
368
- const o = B(() => !n.disabled), r = B(() => n.enumData || []);
369
- function p(u) {
370
- return u[n.valueField];
371
- }
372
- function m(u) {
373
- return u[n.textField];
374
- }
375
- function a(u, i) {
376
- if (o.value) {
377
- const c = p(u);
378
- t.value !== c && (t.value = c, e.emit("changeValue", c), e.emit("update:modelValue", c));
368
+ }, J = de(O, we, fe, ie);
369
+ function Q(r, t, e) {
370
+ const n = B(() => !r.disabled), o = B(() => r.enumData || []);
371
+ function a(l) {
372
+ return l[r.valueField];
373
+ }
374
+ function c(l) {
375
+ return l[r.textField];
376
+ }
377
+ function d(l, i) {
378
+ if (n.value) {
379
+ const p = a(l);
380
+ e.value !== p && (e.value = p, t.emit("changeValue", p), t.emit("update:modelValue", p));
379
381
  }
380
382
  i.stopPropagation();
381
383
  }
382
384
  return {
383
- enumData: r,
384
- getValue: p,
385
- getText: m,
386
- onClickRadio: a
385
+ enumData: o,
386
+ getValue: a,
387
+ getText: c,
388
+ onClickRadio: d
387
389
  };
388
390
  }
389
- const F = /* @__PURE__ */ $({
391
+ const E = /* @__PURE__ */ N({
390
392
  name: "FRadioGroup",
391
- props: j,
393
+ props: O,
392
394
  emits: ["changeValue", "update:modelValue"],
393
- setup(n, e) {
394
- const t = k(n.modelValue), {
395
- enumData: o,
396
- onClickRadio: r,
397
- getValue: p,
398
- getText: m
399
- } = Q(n, e, t), a = B(() => ({
400
- "farris-checkradio-hor": n.direction === "horizontal"
401
- })), u = k([]);
402
- return K(x, {
403
- radios: u,
404
- parentProps: n,
405
- parentContext: e
395
+ setup(r, t) {
396
+ const e = M(r.modelValue), {
397
+ enumData: n,
398
+ onClickRadio: o,
399
+ getValue: a,
400
+ getText: c
401
+ } = Q(r, t, e), d = B(() => ({
402
+ "farris-checkradio-hor": r.direction === "horizontal"
403
+ })), l = M([]);
404
+ return te(R, {
405
+ radios: l,
406
+ parentProps: r,
407
+ parentContext: t
406
408
  }), () => h("div", {
407
- class: ["farris-input-wrap", a.value]
408
- }, [e.slots.default ? e.slots.default() : o.value.map((i, c) => {
409
- const s = "radio_" + n.id + n.name + i[n.valueField];
409
+ class: ["farris-input-wrap", d.value]
410
+ }, [t.slots.default ? t.slots.default() : n.value.map((i, p) => {
411
+ const s = "radio_" + r.id + r.name + i[r.valueField];
410
412
  return h("div", {
411
413
  class: "custom-control custom-radio"
412
414
  }, [h("input", {
@@ -414,109 +416,109 @@ const F = /* @__PURE__ */ $({
414
416
  class: "custom-control-input",
415
417
  name: s,
416
418
  id: s,
417
- value: p(i),
418
- checked: p(i) === t.value,
419
- disabled: n.disabled,
420
- tabindex: n.tabIndex,
421
- onClick: (d) => r(i, d)
419
+ value: a(i),
420
+ checked: a(i) === e.value,
421
+ disabled: r.disabled,
422
+ tabindex: r.tabIndex,
423
+ onClick: (m) => o(i, m)
422
424
  }, null), h("label", {
423
425
  class: "custom-control-label",
424
426
  for: s
425
- }, [m(i)])]);
427
+ }, [c(i)])]);
426
428
  })]);
427
429
  }
428
430
  });
429
- function Te(n, e, t) {
430
- var z;
431
- function o() {
432
- t != null && t.resolveComponentContext && t.resolveComponentContext();
431
+ function Fe(r, t, e) {
432
+ var I;
433
+ function n() {
434
+ e != null && e.resolveComponentContext && e.resolveComponentContext();
433
435
  }
434
- o();
435
- const r = t && t.getStyles && t.getStyles() || "", p = t && t.getDesignerClass && t.getDesignerClass() || "", m = k();
436
- function a() {
437
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
436
+ n();
437
+ const o = e && e.getStyles && e.getStyles() || "", a = e && e.getDesignerClass && e.getDesignerClass() || "", c = M();
438
+ function d() {
439
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
438
440
  }
439
- function u() {
441
+ function l() {
440
442
  return !1;
441
443
  }
442
444
  function i() {
443
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
445
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
444
446
  }
445
- function c() {
446
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
447
+ function p() {
448
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
447
449
  }
448
- function s(y) {
449
- if (!y || !y.value)
450
+ function s(g) {
451
+ if (!g || !g.value)
450
452
  return null;
451
- if (y.value.schema && y.value.schema.type === "component")
452
- return y.value;
453
- const b = k(y == null ? void 0 : y.value.parent), C = s(b);
453
+ if (g.value.schema && g.value.schema.type === "component")
454
+ return g.value;
455
+ const b = M(g == null ? void 0 : g.value.parent), C = s(b);
454
456
  return C || null;
455
457
  }
456
- function d(y = e) {
457
- const { componentInstance: b, designerItemElementRef: C } = y;
458
- return !b || !b.value ? null : b.value.canMove ? C : d(y.parent);
458
+ function m(g = t) {
459
+ const { componentInstance: b, designerItemElementRef: C } = g;
460
+ return !b || !b.value ? null : b.value.canMove ? C : m(g.parent);
459
461
  }
460
- function f(y) {
461
- return !!t && t.canAccepts(y);
462
+ function y(g) {
463
+ return !!e && e.canAccepts(g);
462
464
  }
463
- function g() {
464
- return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
465
+ function f() {
466
+ return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
465
467
  }
466
- function T() {
468
+ function k() {
467
469
  }
468
- function w(y, b) {
469
- b && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(b);
470
+ function T(g, b) {
471
+ b && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(b);
470
472
  }
471
- function V(y, b) {
472
- const { componentType: C } = y;
473
- let M = O(C, y, b);
474
- t && t.onResolveNewComponentSchema && (M = t.onResolveNewComponentSchema(y, M));
475
- const S = C.toLowerCase().replace("-", "_");
476
- return M && !M.id && M.type === C && (M.id = `${S}_${Math.random().toString().slice(2, 6)}`), M;
473
+ function F(g, b) {
474
+ const { componentType: C } = g;
475
+ let w = U(C, g, b);
476
+ e && e.onResolveNewComponentSchema && (w = e.onResolveNewComponentSchema(g, w));
477
+ const V = C.toLowerCase().replace("-", "_");
478
+ return w && !w.id && w.type === C && (w.id = `${V}_${Math.random().toString().slice(2, 6)}`), w;
477
479
  }
478
- function G(y, b) {
479
- const C = String(y.getAttribute("data-controltype")), M = y.getAttribute("data-feature"), S = M ? JSON.parse(M) : {};
480
- S.parentComponentInstance = m.value;
481
- let P = O(C, S);
482
- t && t.onAcceptNewChildElement && (P = t.onAcceptNewChildElement(y, b, P));
483
- const Y = C.toLowerCase().replace("-", "_");
484
- return P && !P.id && P.type === C && (P.id = `${Y}_${Math.random().toString().slice(2, 6)}`), P;
480
+ function G(g, b) {
481
+ const C = String(g.getAttribute("data-controltype")), w = g.getAttribute("data-feature"), V = w ? JSON.parse(w) : {};
482
+ V.parentComponentInstance = c.value;
483
+ let S = U(C, V);
484
+ e && e.onAcceptNewChildElement && (S = e.onAcceptNewChildElement(g, b, S));
485
+ const Z = C.toLowerCase().replace("-", "_");
486
+ return S && !S.id && S.type === C && (S.id = `${Z}_${Math.random().toString().slice(2, 6)}`), S;
485
487
  }
486
- function A(y) {
488
+ function A(g) {
487
489
  }
488
- function R(...y) {
489
- if (t && t.getPropsConfig)
490
- return t.getPropsConfig(...y);
490
+ function Y(...g) {
491
+ if (e && e.getPropsConfig)
492
+ return e.getPropsConfig(...g);
491
493
  }
492
- return m.value = {
493
- canMove: a(),
494
- canSelectParent: u(),
494
+ return c.value = {
495
+ canMove: d(),
496
+ canSelectParent: l(),
495
497
  canDelete: i(),
496
- canNested: !c(),
497
- contents: e == null ? void 0 : e.schema.contents,
498
- elementRef: n,
499
- parent: (z = e == null ? void 0 : e.parent) == null ? void 0 : z.componentInstance,
500
- schema: e == null ? void 0 : e.schema,
501
- styles: r,
502
- designerClass: p,
503
- canAccepts: f,
498
+ canNested: !p(),
499
+ contents: t == null ? void 0 : t.schema.contents,
500
+ elementRef: r,
501
+ parent: (I = t == null ? void 0 : t.parent) == null ? void 0 : I.componentInstance,
502
+ schema: t == null ? void 0 : t.schema,
503
+ styles: o,
504
+ designerClass: a,
505
+ canAccepts: y,
504
506
  getBelongedComponentInstance: s,
505
- getDraggableDesignItemElement: d,
506
- getDraggingDisplayText: g,
507
- getPropConfig: R,
508
- getDragScopeElement: T,
509
- onAcceptMovedChildElement: w,
507
+ getDraggableDesignItemElement: m,
508
+ getDraggingDisplayText: f,
509
+ getPropConfig: Y,
510
+ getDragScopeElement: k,
511
+ onAcceptMovedChildElement: T,
510
512
  onAcceptNewChildElement: G,
511
513
  onChildElementMovedOut: A,
512
- addNewChildComponentSchema: V,
513
- updateDragAndDropRules: o,
514
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || k(!1),
515
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
516
- }, m;
514
+ addNewChildComponentSchema: F,
515
+ updateDragAndDropRules: n,
516
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || M(!1),
517
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
518
+ }, c;
517
519
  }
518
- class we {
519
- constructor(e, t) {
520
+ class Se {
521
+ constructor(t, e) {
520
522
  v(this, "componentId");
521
523
  v(this, "viewModelId");
522
524
  v(this, "eventsEditorUtils");
@@ -532,26 +534,26 @@ class we {
532
534
  type: "object",
533
535
  categories: {}
534
536
  });
535
- var o;
536
- this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
537
+ var n;
538
+ this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
537
539
  }
538
540
  getTableInfo() {
539
- var e;
540
- return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
541
+ var t;
542
+ return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
541
543
  }
542
- setDesignViewModelField(e) {
543
- const t = e.binding && e.binding.type === "Form" && e.binding.field;
544
- if (t) {
544
+ setDesignViewModelField(t) {
545
+ const e = t.binding && t.binding.type === "Form" && t.binding.field;
546
+ if (e) {
545
547
  if (!this.designViewModelField) {
546
- const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
547
- this.designViewModelField = o.fields.find((r) => r.id === t);
548
+ const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
549
+ this.designViewModelField = n.fields.find((o) => o.id === e);
548
550
  }
549
- e.updateOn = this.designViewModelField.updateOn;
551
+ t.updateOn = this.designViewModelField.updateOn;
550
552
  }
551
553
  }
552
- changeFieldEditorType(e, t) {
554
+ changeFieldEditorType(t, e) {
553
555
  }
554
- getBasicPropConfig(e) {
556
+ getBasicPropConfig(t) {
555
557
  return {
556
558
  description: "Basic Information",
557
559
  title: "基本信息",
@@ -570,13 +572,13 @@ class we {
570
572
  type: "combo-list",
571
573
  textField: "name",
572
574
  valueField: "value",
573
- data: [{ value: e.type, name: l[e.type].name }]
575
+ data: [{ value: t.type, name: u[t.type].name }]
574
576
  }
575
577
  }
576
578
  }
577
579
  };
578
580
  }
579
- getAppearanceConfig(e = null) {
581
+ getAppearanceConfig(t = null) {
580
582
  return {
581
583
  title: "样式",
582
584
  description: "Appearance",
@@ -596,90 +598,105 @@ class we {
596
598
  }
597
599
  };
598
600
  }
601
+ /**
602
+ *
603
+ * @param propertyId
604
+ * @param componentInstance
605
+ * @returns
606
+ */
607
+ updateElementByParentContainer(t, e) {
608
+ const n = e && e.parent && e.parent.schema;
609
+ if (!n)
610
+ return;
611
+ const o = n.contents.findIndex((c) => c.id === t), a = W(n.contents[o]);
612
+ n.contents.splice(o, 1), n.contents.splice(o, 0, a);
613
+ }
599
614
  }
600
- const D = class D {
615
+ const P = class P {
601
616
  /**
602
617
  * 根据绑定字段类型获取可用的输入类控件
603
618
  */
604
- static getEditorTypesByMDataType(e) {
605
- const t = D.fieldControlTypeMapping[e];
606
- return t || [{ key: "", value: "" }];
619
+ static getEditorTypesByMDataType(t) {
620
+ const e = P.fieldControlTypeMapping[t];
621
+ return e || [{ key: "", value: "" }];
607
622
  }
608
623
  /**
609
624
  * 获取所有输入类控件
610
625
  */
611
626
  static getAllInputTypes() {
612
- const e = [];
613
- for (let t in D.fieldControlTypeMapping)
614
- D.fieldControlTypeMapping[t].forEach((o) => {
615
- e.find((r) => r.key === o.key && r.value === o.value) || e.push({ key: o.key, value: o.value });
627
+ const t = [];
628
+ for (let e in P.fieldControlTypeMapping)
629
+ P.fieldControlTypeMapping[e].forEach((n) => {
630
+ t.find((o) => o.key === n.key && o.value === n.value) || t.push({ key: n.key, value: n.value });
616
631
  });
617
- return e;
632
+ return t;
618
633
  }
619
634
  };
620
635
  /**
621
636
  * <字段类型,可配置的控件类型列表>的映射
622
637
  */
623
- v(D, "fieldControlTypeMapping", {
638
+ v(P, "fieldControlTypeMapping", {
624
639
  String: [
625
- { key: l["input-group"].type, value: l["input-group"].name },
626
- { key: l.lookup.type, value: l.lookup.name },
627
- { key: l["date-picker"].type, value: l["date-picker"].name },
628
- { key: l["check-box"].type, value: l["check-box"].name },
629
- { key: l["radio-group"].type, value: l["radio-group"].name },
630
- { key: l["combo-list"].type, value: l["combo-list"].name },
631
- { key: l.textarea.type, value: l.textarea.name }
640
+ { key: u["input-group"].type, value: u["input-group"].name },
641
+ { key: u.lookup.type, value: u.lookup.name },
642
+ { key: u["date-picker"].type, value: u["date-picker"].name },
643
+ { key: u["check-box"].type, value: u["check-box"].name },
644
+ { key: u["radio-group"].type, value: u["radio-group"].name },
645
+ { key: u["combo-list"].type, value: u["combo-list"].name },
646
+ { key: u.textarea.type, value: u.textarea.name }
632
647
  ],
633
648
  Text: [
634
- { key: l.textarea.type, value: l.textarea.name },
635
- { key: l.lookup.type, value: l.lookup.name }
649
+ { key: u.textarea.type, value: u.textarea.name },
650
+ { key: u.lookup.type, value: u.lookup.name }
636
651
  ],
637
652
  Decimal: [
638
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
653
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
639
654
  ],
640
655
  Integer: [
641
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
656
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
642
657
  ],
643
658
  Number: [
644
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
659
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
645
660
  ],
646
661
  BigNumber: [
647
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
662
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
648
663
  ],
649
664
  Date: [
650
- { key: l["date-picker"].type, value: l["date-picker"].name }
665
+ { key: u["date-picker"].type, value: u["date-picker"].name }
651
666
  ],
652
667
  DateTime: [
653
- { key: l["date-picker"].type, value: l["date-picker"].name }
668
+ { key: u["date-picker"].type, value: u["date-picker"].name }
654
669
  ],
655
670
  Boolean: [
656
- { key: l.switch.type, value: l.switch.name },
657
- { key: l["check-box"].type, value: l["check-box"].name }
671
+ { key: u.switch.type, value: u.switch.name },
672
+ { key: u["check-box"].type, value: u["check-box"].name }
658
673
  ],
659
674
  Enum: [
660
- { key: l["combo-list"].type, value: l["combo-list"].name },
661
- { key: l["radio-group"].type, value: l["radio-group"].name }
675
+ { key: u["combo-list"].type, value: u["combo-list"].name },
676
+ { key: u["radio-group"].type, value: u["radio-group"].name }
662
677
  ],
663
678
  Object: [
664
- { key: l.lookup.type, value: l.lookup.name },
665
- { key: l["combo-list"].type, value: l["combo-list"].name },
666
- { key: l["radio-group"].type, value: l["radio-group"].name }
679
+ { key: u.lookup.type, value: u.lookup.name },
680
+ { key: u["combo-list"].type, value: u["combo-list"].name },
681
+ { key: u["radio-group"].type, value: u["radio-group"].name }
667
682
  ]
668
683
  });
669
- let E = D;
670
- const Ve = k(0);
671
- class Pe extends we {
672
- constructor(e, t) {
673
- super(e, t);
684
+ let D = P;
685
+ const Pe = M(0);
686
+ class Ee extends Se {
687
+ constructor(e, n) {
688
+ super(e, n);
689
+ v(this, "responseLayoutEditorFunction");
690
+ this.responseLayoutEditorFunction = oe(this.formSchemaUtils);
674
691
  }
675
- getPropertyConfig(e, t) {
676
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
692
+ getPropertyConfig(e, n) {
693
+ return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, n), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
677
694
  }
678
- getBasicProperties(e, t) {
679
- var m;
695
+ getBasicProperties(e, n) {
696
+ var d;
680
697
  var o = this;
681
698
  this.setDesignViewModelField(e);
682
- const r = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
699
+ const a = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
683
700
  return {
684
701
  description: "Basic Information",
685
702
  title: "基本信息",
@@ -701,7 +718,7 @@ class Pe extends we {
701
718
  textField: "value",
702
719
  valueField: "key",
703
720
  editable: !1,
704
- data: o.designViewModelField ? E.getEditorTypesByMDataType((m = o.designViewModelField.type) == null ? void 0 : m.name) : E.getAllInputTypes()
721
+ data: o.designViewModelField ? D.getEditorTypesByMDataType((d = o.designViewModelField.type) == null ? void 0 : d.name) : D.getAllInputTypes()
705
722
  }
706
723
  },
707
724
  label: {
@@ -718,7 +735,7 @@ class Pe extends we {
718
735
  bindingType: { enable: !1 },
719
736
  editorParams: {
720
737
  propertyData: e,
721
- formBasicInfo: r
738
+ formBasicInfo: a
722
739
  },
723
740
  columns: [
724
741
  { field: "name", title: "字段名称" },
@@ -726,26 +743,27 @@ class Pe extends we {
726
743
  { field: "fieldType", title: "字段类型" }
727
744
  ],
728
745
  textField: "bindingField",
729
- data: p
746
+ data: c
730
747
  }
731
748
  }
732
749
  },
733
- setPropertyRelates(a, u) {
734
- if (a)
735
- switch (a && a.propertyID) {
750
+ setPropertyRelates(l, i) {
751
+ if (l)
752
+ switch (l && l.propertyID) {
736
753
  case "type": {
737
- o.changeControlType(e, a, t);
754
+ o.changeControlType(e, l, n);
738
755
  break;
739
756
  }
740
757
  case "label": {
741
- a.needRefreshControlTree = !0;
758
+ l.needRefreshControlTree = !0;
742
759
  break;
743
760
  }
744
761
  }
745
762
  }
746
763
  };
747
764
  }
748
- getAppearanceProperties(e) {
765
+ getAppearanceProperties(e, n) {
766
+ var o = this;
749
767
  return {
750
768
  title: "样式",
751
769
  description: "Appearance",
@@ -766,12 +784,25 @@ class Pe extends we {
766
784
  description: "响应式列宽",
767
785
  title: "响应式列宽",
768
786
  type: "boolean",
769
- visible: !1,
787
+ visible: !0,
788
+ // 这个属性,标记当属性变更得时候触发重新更新属性
789
+ refreshPanelAfterChanged: !0,
770
790
  editor: {
771
- type: "response-layout-editor-setting"
772
- },
773
- $converter: "/converter/response-form-layout.converter"
791
+ type: "response-layout-editor-setting",
792
+ initialState: o.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, o.componentId)
793
+ }
774
794
  }
795
+ },
796
+ setPropertyRelates(a, c) {
797
+ if (a)
798
+ switch (a && a.propertyID) {
799
+ case "responseLayout":
800
+ o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, o.componentId || e.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(e.id, n), delete e.responseLayout;
801
+ break;
802
+ case "class":
803
+ o.updateUnifiedLayoutAfterControlChanged(a.propertyValue, e.id, this.componentId), o.updateElementByParentContainer(e.id, n);
804
+ break;
805
+ }
775
806
  }
776
807
  };
777
808
  }
@@ -783,44 +814,44 @@ class Pe extends we {
783
814
  * @param propertyData 控件DOM属性
784
815
  * @param newControlType 新控件类型
785
816
  */
786
- changeControlType(e, t, o) {
787
- var i, c, s, d;
788
- const r = t.propertyValue, p = o && o.parent && o.parent.schema;
789
- if (!p)
817
+ changeControlType(e, n, o) {
818
+ var p, s, m, y;
819
+ const a = n.propertyValue, c = o && o.parent && o.parent.schema;
820
+ if (!c)
790
821
  return;
791
- const m = p.contents.findIndex((f) => f.id === e.id), a = p.contents[m];
792
- let u;
822
+ const d = c.contents.findIndex((f) => f.id === e.id), l = c.contents[d];
823
+ let i;
793
824
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
794
825
  editor: {
795
- $type: r
826
+ $type: a
796
827
  },
797
828
  name: this.designViewModelField.name,
798
829
  require: this.designViewModelField.require,
799
830
  readonly: this.designViewModelField.readonly
800
- }, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), u || (u = L("form-group") || {}, u.editor = L(r) || {}, delete u.editor.id, delete u.editor.binding, delete u.editor.appearance), Object.assign(u, {
801
- id: a.id,
802
- appearance: a.appearance,
803
- size: a.size,
804
- label: a.label,
805
- binding: a.binding,
806
- visible: a.visible
807
- }), Object.assign(u.editor, {
808
- isTextArea: u.isTextArea && a.isTextArea,
809
- placeholder: (i = a.editor) == null ? void 0 : i.placeholder,
810
- holdPlace: (c = a.editor) == null ? void 0 : c.holdPlace,
811
- readonly: (s = a.editor) == null ? void 0 : s.readonly,
812
- require: (d = a.editor) == null ? void 0 : d.require
813
- }), p.contents.splice(m, 1), p.contents.splice(m, 0, u), o.schema = Object.assign(a, u), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
831
+ }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), i || (i = j("form-group") || {}, i.editor = j(a) || {}, delete i.editor.id, delete i.editor.binding, delete i.editor.appearance), Object.assign(i, {
832
+ id: l.id,
833
+ appearance: l.appearance,
834
+ size: l.size,
835
+ label: l.label,
836
+ binding: l.binding,
837
+ visible: l.visible
838
+ }), Object.assign(i.editor, {
839
+ isTextArea: i.isTextArea && l.isTextArea,
840
+ placeholder: (p = l.editor) == null ? void 0 : p.placeholder,
841
+ holdPlace: (s = l.editor) == null ? void 0 : s.holdPlace,
842
+ readonly: (m = l.editor) == null ? void 0 : m.readonly,
843
+ require: (y = l.editor) == null ? void 0 : y.require
844
+ }), c.contents.splice(d, 1), c.contents.splice(d, 0, i), o.schema = Object.assign(l, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
814
845
  (f) => f.classList.remove("dgComponentSelected")
815
- ), Ve.value++;
846
+ ), Pe.value++;
816
847
  }
817
- getComponentConfig(e, t = {}, o = {}) {
818
- const r = Object.assign({
848
+ getComponentConfig(e, n = {}, o = {}) {
849
+ const a = Object.assign({
819
850
  description: "编辑器",
820
851
  title: "编辑器",
821
852
  type: "input-group",
822
853
  $converter: "/converter/property-editor.converter"
823
- }, t), p = Object.assign({
854
+ }, n), c = Object.assign({
824
855
  readonly: {
825
856
  description: "",
826
857
  title: "只读",
@@ -842,15 +873,63 @@ class Pe extends we {
842
873
  type: "string"
843
874
  }
844
875
  }, o);
845
- return { ...r, properties: { ...p } };
876
+ return { ...a, properties: { ...c } };
877
+ }
878
+ /**
879
+ * 修改某一输入控件的样式后更新Form的统一布局配置
880
+ * @param controlClass 控件样式
881
+ * @param controlId 控件Id
882
+ * @param componentId 控件所在组件id
883
+ */
884
+ updateUnifiedLayoutAfterControlChanged(e, n, o) {
885
+ const a = e.split(" ");
886
+ let c = a.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), d = a.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), l = a.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), i = a.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
887
+ c = c || "col-12", d = d || "col-md-" + c.replace("col-", ""), l = l || "col-xl-" + d.replace("col-md-", ""), i = i || "col-el-" + l.replace("col-xl-", "");
888
+ const p = {
889
+ id: n,
890
+ columnInSM: parseInt(c.replace("col-", ""), 10),
891
+ columnInMD: parseInt(d.replace("col-md-", ""), 10),
892
+ columnInLG: parseInt(l.replace("col-xl-", ""), 10),
893
+ columnInEL: parseInt(i.replace("col-el-", ""), 10)
894
+ };
895
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(o, p);
896
+ }
897
+ /**
898
+ * 修改控件布局配置后更新Form统一布局配置
899
+ * @param componentId 组件Id
900
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
901
+ */
902
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, n) {
903
+ const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
904
+ if (!o || !o.unifiedLayout)
905
+ return;
906
+ const a = [];
907
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, a, 1), n) {
908
+ const f = a.find((k) => k.id === n.id);
909
+ Object.assign(f || {}, n);
910
+ }
911
+ const c = a.map((f) => f.columnInSM), d = a.map((f) => f.columnInMD), l = a.map((f) => f.columnInLG), i = a.map((f) => f.columnInEL), p = this.checkIsUniqueColumn(c) ? c[0] : null, s = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(l) ? l[0] : null, y = this.checkIsUniqueColumn(i) ? i[0] : null;
912
+ Object.assign(o.unifiedLayout, {
913
+ uniqueColClassInSM: p,
914
+ uniqueColClassInMD: s,
915
+ uniqueColClassInLG: m,
916
+ uniqueColClassInEL: y
917
+ });
918
+ }
919
+ /**
920
+ * 校验宽度样式值是否一致
921
+ */
922
+ checkIsUniqueColumn(e) {
923
+ const n = new Set(e);
924
+ return Array.from(n).length === 1;
846
925
  }
847
926
  }
848
- class De extends Pe {
849
- constructor(e, t) {
850
- super(e, t);
927
+ class Ve extends Ee {
928
+ constructor(t, e) {
929
+ super(t, e);
851
930
  }
852
- getEditorProperties(e) {
853
- return this.getComponentConfig(e, { type: "number-spinner" }, {
931
+ getEditorProperties(t) {
932
+ return this.getComponentConfig(t, { type: "number-spinner" }, {
854
933
  readonly: {
855
934
  visible: !1
856
935
  },
@@ -881,118 +960,118 @@ class De extends Pe {
881
960
  });
882
961
  }
883
962
  }
884
- function Fe(n, e) {
885
- n.schema;
886
- const t = k(!0), o = k(!0);
887
- function r(s) {
963
+ function Be(r, t) {
964
+ r.schema;
965
+ const e = M(!0), n = M(!0);
966
+ function o(s) {
888
967
  return !1;
889
968
  }
890
- function p() {
969
+ function a() {
891
970
  return !1;
892
971
  }
893
- function m() {
972
+ function c() {
894
973
  return !1;
895
974
  }
896
- function a() {
975
+ function d() {
897
976
  return !0;
898
977
  }
899
- function u(s) {
978
+ function l(s) {
900
979
  }
901
980
  function i() {
902
981
  }
903
- function c(s) {
982
+ function p(s) {
904
983
  return null;
905
984
  }
906
985
  return {
907
- canAccepts: r,
908
- checkCanDeleteComponent: p,
909
- checkCanMoveComponent: m,
910
- hideNestedPaddingInDesginerView: a,
911
- onAcceptMovedChildElement: u,
986
+ canAccepts: o,
987
+ checkCanDeleteComponent: a,
988
+ checkCanMoveComponent: c,
989
+ hideNestedPaddingInDesginerView: d,
990
+ onAcceptMovedChildElement: l,
912
991
  resolveComponentContext: i,
913
- triggerBelongedComponentToMoveWhenMoved: t,
914
- triggerBelongedComponentToDeleteWhenDeleted: o,
915
- getPropsConfig: c
992
+ triggerBelongedComponentToMoveWhenMoved: e,
993
+ triggerBelongedComponentToDeleteWhenDeleted: n,
994
+ getPropsConfig: p
916
995
  };
917
996
  }
918
- function Se(n, e) {
997
+ function De(r, t) {
919
998
  const {
920
- canAccepts: t,
921
- checkCanDeleteComponent: o,
922
- checkCanMoveComponent: r,
923
- hideNestedPaddingInDesginerView: p,
924
- onAcceptMovedChildElement: m,
925
- resolveComponentContext: a,
926
- triggerBelongedComponentToMoveWhenMoved: u,
999
+ canAccepts: e,
1000
+ checkCanDeleteComponent: n,
1001
+ checkCanMoveComponent: o,
1002
+ hideNestedPaddingInDesginerView: a,
1003
+ onAcceptMovedChildElement: c,
1004
+ resolveComponentContext: d,
1005
+ triggerBelongedComponentToMoveWhenMoved: l,
927
1006
  triggerBelongedComponentToDeleteWhenDeleted: i
928
- } = Fe(n), c = n.schema;
929
- function s(d, f) {
930
- return new De(d, e).getPropertyConfig(c, f);
1007
+ } = Be(r), p = r.schema;
1008
+ function s(m, y) {
1009
+ return new Ve(m, t).getPropertyConfig(p, y);
931
1010
  }
932
1011
  return {
933
- canAccepts: t,
934
- checkCanDeleteComponent: o,
935
- checkCanMoveComponent: r,
936
- hideNestedPaddingInDesginerView: p,
937
- onAcceptMovedChildElement: m,
938
- resolveComponentContext: a,
939
- triggerBelongedComponentToMoveWhenMoved: u,
1012
+ canAccepts: e,
1013
+ checkCanDeleteComponent: n,
1014
+ checkCanMoveComponent: o,
1015
+ hideNestedPaddingInDesginerView: a,
1016
+ onAcceptMovedChildElement: c,
1017
+ resolveComponentContext: d,
1018
+ triggerBelongedComponentToMoveWhenMoved: l,
940
1019
  triggerBelongedComponentToDeleteWhenDeleted: i,
941
1020
  getPropsConfig: s
942
1021
  };
943
1022
  }
944
- const Be = /* @__PURE__ */ $({
1023
+ const Ae = /* @__PURE__ */ N({
945
1024
  name: "FRadioGroupDesign",
946
- props: j,
1025
+ props: O,
947
1026
  emits: ["changeValue", "update:modelValue"],
948
- setup(n, e) {
949
- const t = k(n.modelValue), {
950
- enumData: o,
951
- onClickRadio: r,
952
- getValue: p,
953
- getText: m
954
- } = Q(n, e, t), a = B(() => ({
955
- "farris-checkradio-hor": n.horizontal
956
- })), u = k(), i = N("designer-host-service"), c = N("design-item-context"), s = Se(c, i), d = Te(u, c, s);
957
- return W(() => {
958
- u.value.componentInstance = d;
959
- }), e.expose(d.value), () => h("div", {
960
- class: ["farris-input-wrap", a.value],
961
- ref: u
962
- }, [o.value.map((f, g) => {
963
- const T = "radio_" + n.name + g;
1027
+ setup(r, t) {
1028
+ const e = M(r.modelValue), {
1029
+ enumData: n,
1030
+ onClickRadio: o,
1031
+ getValue: a,
1032
+ getText: c
1033
+ } = Q(r, t, e), d = B(() => ({
1034
+ "farris-checkradio-hor": r.horizontal
1035
+ })), l = M(), i = L("designer-host-service"), p = L("design-item-context"), s = De(p, i), m = Fe(l, p, s);
1036
+ return z(() => {
1037
+ l.value.componentInstance = m;
1038
+ }), t.expose(m.value), () => h("div", {
1039
+ class: ["farris-input-wrap", d.value],
1040
+ ref: l
1041
+ }, [n.value.map((y, f) => {
1042
+ const k = "radio_" + r.name + f;
964
1043
  return h("div", {
965
1044
  class: "custom-control custom-radio"
966
1045
  }, [h("input", {
967
1046
  type: "radio",
968
1047
  class: "custom-control-input",
969
- name: n.name,
970
- id: T,
971
- value: p(f),
972
- checked: p(f) === t.value,
973
- disabled: n.disabled,
974
- tabindex: n.tabIndex,
975
- onClick: (w) => r(f, w)
1048
+ name: r.name,
1049
+ id: k,
1050
+ value: a(y),
1051
+ checked: a(y) === e.value,
1052
+ disabled: r.disabled,
1053
+ tabindex: r.tabIndex,
1054
+ onClick: (T) => o(y, T)
976
1055
  }, null), h("label", {
977
1056
  class: "custom-control-label",
978
- for: T
979
- }, [m(f)])]);
1057
+ for: k
1058
+ }, [c(y)])]);
980
1059
  })]);
981
1060
  }
982
1061
  });
983
- F.install = (n) => {
984
- n.component(F.name, F), n.component(q.name, q);
1062
+ E.install = (r) => {
1063
+ r.component(E.name, E), r.component(x.name, x);
985
1064
  };
986
- F.register = (n, e, t, o) => {
987
- n["radio-group"] = F, e["radio-group"] = X;
1065
+ E.register = (r, t, e, n) => {
1066
+ r["radio-group"] = E, t["radio-group"] = J;
988
1067
  };
989
- F.registerDesigner = (n, e, t) => {
990
- n["radio-group"] = Be, e["radio-group"] = X;
1068
+ E.registerDesigner = (r, t, e) => {
1069
+ r["radio-group"] = Ae, t["radio-group"] = J;
991
1070
  };
992
1071
  export {
993
- F as RadioGroup,
994
- F as default,
995
- X as propsResolver,
996
- j as radioGroupProps,
997
- ne as radioProps
1072
+ E as RadioGroup,
1073
+ E as default,
1074
+ J as propsResolver,
1075
+ O as radioGroupProps,
1076
+ re as radioProps
998
1077
  };