@farris/ui-vue 1.3.0 → 1.3.1

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 (201) hide show
  1. package/components/accordion/index.esm.js +1 -1
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +472 -366
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +1 -1
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +472 -480
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +225 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +615 -517
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +325 -333
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +578 -472
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +49 -49
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/common/index.esm.js +832 -722
  20. package/components/common/index.umd.cjs +1 -1
  21. package/components/component/index.esm.js +303 -981
  22. package/components/component/index.umd.cjs +1 -1
  23. package/components/condition/index.esm.js +8 -8
  24. package/components/condition/index.umd.cjs +1 -1
  25. package/components/content-container/index.esm.js +335 -1002
  26. package/components/content-container/index.umd.cjs +1 -1
  27. package/components/data-grid/index.esm.js +4429 -4312
  28. package/components/data-grid/index.umd.cjs +1 -1
  29. package/components/data-view/index.esm.js +3037 -3020
  30. package/components/data-view/index.umd.cjs +1 -1
  31. package/components/date-picker/index.esm.js +2216 -2119
  32. package/components/date-picker/index.umd.cjs +1 -1
  33. package/components/designer-canvas/index.css +1 -1
  34. package/components/designer-canvas/index.esm.js +914 -883
  35. package/components/designer-canvas/index.umd.cjs +1 -1
  36. package/components/dropdown/index.esm.js +223 -231
  37. package/components/dropdown/index.umd.cjs +2 -2
  38. package/components/dynamic-form/index.esm.js +1691 -2187
  39. package/components/dynamic-form/index.umd.cjs +1 -1
  40. package/components/dynamic-resolver/index.esm.js +143 -136
  41. package/components/dynamic-resolver/index.umd.cjs +1 -1
  42. package/components/events-editor/index.esm.js +250 -258
  43. package/components/events-editor/index.umd.cjs +1 -1
  44. package/components/expression-editor/index.esm.js +1 -1
  45. package/components/expression-editor/index.umd.cjs +1 -1
  46. package/components/external-container/index.esm.js +2672 -3438
  47. package/components/external-container/index.umd.cjs +1 -1
  48. package/components/field-selector/index.esm.js +2965 -2970
  49. package/components/field-selector/index.umd.cjs +1 -1
  50. package/components/filter-bar/index.esm.js +1650 -1602
  51. package/components/filter-bar/index.umd.cjs +1 -1
  52. package/components/flow-canvas/index.css +1 -1
  53. package/components/flow-canvas/index.esm.js +684 -675
  54. package/components/flow-canvas/index.umd.cjs +1 -1
  55. package/components/image-cropper/index.esm.js +453 -461
  56. package/components/image-cropper/index.umd.cjs +1 -1
  57. package/components/input-group/index.esm.js +604 -507
  58. package/components/input-group/index.umd.cjs +1 -1
  59. package/components/layout/index.esm.js +402 -378
  60. package/components/layout/index.umd.cjs +1 -1
  61. package/components/list-nav/index.esm.js +348 -1019
  62. package/components/list-nav/index.umd.cjs +1 -1
  63. package/components/list-view/index.esm.js +1658 -1666
  64. package/components/list-view/index.umd.cjs +1 -1
  65. package/components/lookup/index.esm.js +5209 -5088
  66. package/components/lookup/index.umd.cjs +1 -1
  67. package/components/mapping-editor/index.esm.js +4329 -4213
  68. package/components/mapping-editor/index.umd.cjs +1 -1
  69. package/components/nav/index.esm.js +905 -1357
  70. package/components/nav/index.umd.cjs +3 -3
  71. package/components/number-range/index.esm.js +517 -420
  72. package/components/number-range/index.umd.cjs +1 -1
  73. package/components/number-spinner/index.esm.js +588 -491
  74. package/components/number-spinner/index.umd.cjs +1 -1
  75. package/components/order/index.esm.js +1376 -1965
  76. package/components/order/index.umd.cjs +1 -1
  77. package/components/page-footer/index.esm.js +1 -1
  78. package/components/page-footer/index.umd.cjs +1 -1
  79. package/components/page-header/index.esm.js +1073 -1905
  80. package/components/page-header/index.umd.cjs +1 -1
  81. package/components/pagination/index.esm.js +809 -1237
  82. package/components/pagination/index.umd.cjs +1 -1
  83. package/components/progress/index.esm.js +198 -206
  84. package/components/progress/index.umd.cjs +3 -3
  85. package/components/property-editor/index.esm.js +1297 -1200
  86. package/components/property-editor/index.umd.cjs +2 -2
  87. package/components/property-panel/index.esm.js +609 -507
  88. package/components/property-panel/index.umd.cjs +1 -1
  89. package/components/query-solution/index.esm.js +3391 -3758
  90. package/components/query-solution/index.umd.cjs +1 -1
  91. package/components/radio-button/index.esm.js +1 -1
  92. package/components/radio-button/index.umd.cjs +1 -1
  93. package/components/radio-group/index.esm.js +544 -447
  94. package/components/radio-group/index.umd.cjs +1 -1
  95. package/components/rate/index.esm.js +247 -255
  96. package/components/rate/index.umd.cjs +1 -1
  97. package/components/response-layout/index.esm.js +146 -154
  98. package/components/response-layout/index.umd.cjs +1 -1
  99. package/components/response-layout-editor/index.esm.js +700 -675
  100. package/components/response-layout-editor/index.umd.cjs +1 -1
  101. package/components/response-toolbar/index.esm.js +956 -1786
  102. package/components/response-toolbar/index.umd.cjs +1 -1
  103. package/components/schema-selector/index.esm.js +4963 -5617
  104. package/components/schema-selector/index.umd.cjs +2 -2
  105. package/components/search-box/index.esm.js +158 -161
  106. package/components/search-box/index.umd.cjs +1 -1
  107. package/components/section/index.esm.js +436 -1124
  108. package/components/section/index.umd.cjs +1 -1
  109. package/components/smoke-detector/index.esm.js +92 -100
  110. package/components/smoke-detector/index.umd.cjs +1 -1
  111. package/components/splitter/index.esm.js +571 -1210
  112. package/components/splitter/index.umd.cjs +1 -1
  113. package/components/splitter/style.js +2 -0
  114. package/components/step/index.esm.js +239 -247
  115. package/components/step/index.umd.cjs +1 -1
  116. package/components/switch/index.esm.js +445 -348
  117. package/components/switch/index.umd.cjs +1 -1
  118. package/components/tabs/index.esm.js +2278 -3031
  119. package/components/tabs/index.umd.cjs +1 -1
  120. package/components/tags/index.esm.js +311 -319
  121. package/components/tags/index.umd.cjs +1 -1
  122. package/components/text/index.esm.js +215 -223
  123. package/components/text/index.umd.cjs +1 -1
  124. package/components/textarea/index.esm.js +468 -371
  125. package/components/textarea/index.umd.cjs +1 -1
  126. package/components/time-picker/index.esm.js +1271 -1174
  127. package/components/time-picker/index.umd.cjs +1 -1
  128. package/components/transfer/index.esm.js +469 -477
  129. package/components/transfer/index.umd.cjs +1 -1
  130. package/components/tree-grid/index.esm.js +3060 -3065
  131. package/components/tree-grid/index.umd.cjs +1 -1
  132. package/components/tree-view/index.esm.js +2476 -2481
  133. package/components/tree-view/index.umd.cjs +1 -1
  134. package/components/uploader/index.esm.js +374 -382
  135. package/components/uploader/index.umd.cjs +2 -2
  136. package/components/verify-detail/index.esm.js +248 -256
  137. package/components/verify-detail/index.umd.cjs +1 -1
  138. package/components/video/index.esm.js +414 -1093
  139. package/components/video/index.umd.cjs +1 -1
  140. package/components/weather/index.esm.js +498 -506
  141. package/components/weather/index.umd.cjs +5 -5
  142. package/farris.all.esm.js +20216 -21844
  143. package/farris.all.umd.cjs +9 -9
  144. package/index.css +1 -1
  145. package/package.json +1 -1
  146. package/types/common/directive/area-response.d.ts +10 -0
  147. package/types/common/index.d.ts +8 -0
  148. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  149. package/types/common/utils/resolve-field.d.ts +2 -0
  150. package/types/common/utils/use-class.d.ts +7 -0
  151. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  152. package/types/condition/src/types.d.ts +2 -1
  153. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  154. package/types/data-grid/index.d.ts +8 -5
  155. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  156. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  157. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  158. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  159. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  160. package/types/data-view/composition/types.d.ts +7 -9
  161. package/types/designer-canvas/index.d.ts +2 -1
  162. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  163. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  164. package/types/designer-canvas/src/composition/types.d.ts +1 -2
  165. package/types/designer-canvas/src/types.d.ts +2 -1
  166. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  167. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  168. package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
  169. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  170. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  171. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  172. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  173. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  174. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  175. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  176. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  177. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  178. package/types/property-panel/index.d.ts +2 -1
  179. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  180. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  181. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  182. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  183. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  184. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  185. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  186. package/types/query-solution/src/solutions.d.ts +108 -509
  187. package/types/response-layout-editor/index.d.ts +3 -1
  188. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  189. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  190. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  191. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  192. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  193. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  194. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  195. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  196. package/types/tree-grid/index.d.ts +3 -3
  197. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  198. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  199. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  200. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  201. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
@@ -1,102 +1,101 @@
1
- var _ = Object.defineProperty;
2
- var H = (a, t, e) => t in a ? _(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
1
+ var Z = Object.defineProperty;
2
+ var H = (a, t, e) => t in a ? Z(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
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;
4
+ import { defineComponent as O, toRefs as j, ref as E, computed as D, watch as U, createVNode as F, inject as $, onMounted as _ } from "vue";
5
+ import { isPlainObject as W, cloneDeep as q } from "lodash-es";
6
+ import { DgControl as G } from "../designer-canvas/index.esm.js";
7
+ const z = {}, X = {};
8
+ function L(a) {
9
+ const { properties: t, title: e, ignore: r } = a, n = r && Array.isArray(r), l = Object.keys(t).reduce((p, f) => ((!n || !r.find((m) => m == f)) && (p[f] = t[f].type === "object" && t[f].properties ? L(t[f]) : q(t[f].default)), p), {});
10
+ return e && (!n || !r.find((p) => p == "id")) && (l.id = `${e}-${Date.now()}`), l;
12
11
  }
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;
12
+ function J(a, t = {}, e) {
13
+ const r = z[a];
14
+ if (r) {
15
+ let n = L(r);
16
+ const l = X[a];
17
+ return n = l ? l({ getSchemaByType: J }, n, t, e) : n, n;
19
18
  }
20
19
  return null;
21
20
  }
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;
21
+ function x(a, t) {
22
+ const e = L(t);
23
+ return Object.keys(a).reduce((r, n) => (r[n] && W(r[n]) && W(a[n]) ? Object.assign(r[n], a[n]) : r[n] = a[n], r), e), e;
25
24
  }
26
- function te(a, t) {
27
- return Object.keys(a).filter((o) => a[o] != null).reduce((o, n) => {
25
+ function K(a, t) {
26
+ return Object.keys(a).filter((r) => a[r] != null).reduce((r, n) => {
28
27
  if (t.has(n)) {
29
- const i = t.get(n);
30
- if (typeof i == "string")
31
- o[i] = a[n];
28
+ const l = t.get(n);
29
+ if (typeof l == "string")
30
+ r[l] = a[n];
32
31
  else {
33
- const c = i(n, a[n], a);
34
- Object.assign(o, c);
32
+ const p = l(n, a[n], a);
33
+ Object.assign(r, p);
35
34
  }
36
35
  } else
37
- o[n] = a[n];
38
- return o;
36
+ r[n] = a[n];
37
+ return r;
39
38
  }, {});
40
39
  }
41
- function ne(a, t, e = /* @__PURE__ */ new Map()) {
42
- const o = ee(a, t);
43
- return te(o, e);
40
+ function R(a, t, e = /* @__PURE__ */ new Map()) {
41
+ const r = x(a, t);
42
+ return K(r, e);
44
43
  }
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);
44
+ function ee(a = {}) {
45
+ function t(i, s, o, c) {
46
+ if (typeof o == "number")
47
+ return c[i].length === o;
48
+ if (typeof o == "object") {
49
+ const y = Object.keys(o)[0], d = o[y];
50
+ if (y === "not")
51
+ return Number(c[i].length) !== Number(d);
52
+ if (y === "moreThan")
53
+ return Number(c[i].length) >= Number(d);
54
+ if (y === "lessThan")
55
+ return Number(c[i].length) <= Number(d);
57
56
  }
58
57
  return !1;
59
58
  }
60
- function e(r, s, l, m) {
61
- return m[r] && m[r].propertyValue && String(m[r].propertyValue.value) === String(l);
59
+ function e(i, s, o, c) {
60
+ return c[i] && c[i].propertyValue && String(c[i].propertyValue.value) === String(o);
62
61
  }
63
- const o = /* @__PURE__ */ new Map([
62
+ const r = /* @__PURE__ */ new Map([
64
63
  ["length", t],
65
64
  ["getProperty", e]
66
65
  ]);
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 };
66
+ Object.keys(a).reduce((i, s) => (i.set(s, a[s]), i), r);
67
+ function n(i, s) {
68
+ const o = i;
69
+ return typeof s == "number" ? [{ target: o, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: o, operator: "getProperty", param: i, value: !!s }] : typeof s == "object" ? Object.keys(s).map((c) => {
70
+ if (c === "length")
71
+ return { target: o, operator: "length", param: null, value: s[c] };
72
+ const y = c, d = s[c];
73
+ return { target: o, operator: "getProperty", param: y, value: d };
75
74
  }) : [];
76
75
  }
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;
76
+ function l(i) {
77
+ return Object.keys(i).reduce((o, c) => {
78
+ const y = n(c, i[c]);
79
+ return o.push(...y), o;
81
80
  }, []);
82
81
  }
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;
82
+ function p(i, s) {
83
+ if (r.has(i.operator)) {
84
+ const o = r.get(i.operator);
85
+ return o && o(i.target, i.param, i.value, s) || !1;
87
86
  }
88
87
  return !1;
89
88
  }
90
- function d(r, s) {
91
- return i(r).reduce((h, f) => h && c(f, s), !0);
89
+ function f(i, s) {
90
+ return l(i).reduce((y, d) => y && p(d, s), !0);
92
91
  }
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);
92
+ function m(i, s) {
93
+ const o = Object.keys(i), c = o.includes("allOf"), y = o.includes("anyOf"), d = c || y, b = (d ? i[d ? c ? "allOf" : "anyOf" : "allOf"] : [i]).map((T) => f(T, s));
94
+ return c ? !b.includes(!1) : b.includes(!0);
96
95
  }
97
- return { parseValueSchema: u };
96
+ return { parseValueSchema: m };
98
97
  }
99
- const p = {
98
+ const u = {
100
99
  button: { type: "button", name: "按钮", icon: "Button" },
101
100
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
102
101
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -135,20 +134,20 @@ const p = {
135
134
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
136
135
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
137
136
  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);
137
+ }, te = {}, ne = {};
138
+ ee();
139
+ function oe(a, t, e = /* @__PURE__ */ new Map(), r = (p, f, m) => f, n = {}, l = (p) => p) {
140
+ return z[t.title] = t, X[t.title] = r, te[t.title] = n, ne[t.title] = l, (p = {}) => {
141
+ const f = R(p, t, e), m = Object.keys(a).reduce((i, s) => (i[s] = a[s].default, i), {});
142
+ return Object.assign(m, f);
144
143
  };
145
144
  }
146
- function se(a, t) {
145
+ function re(a, t) {
147
146
  return { customClass: t.class, customStyle: t.style };
148
147
  }
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 = {
148
+ const ie = /* @__PURE__ */ new Map([
149
+ ["appearance", re]
150
+ ]), ae = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-design.gitee.io/switch.schema.json", se = "switch", ce = "A Farris Component", pe = "object", ue = {
152
151
  id: {
153
152
  description: "The unique identifier for a switch",
154
153
  type: "string"
@@ -218,26 +217,26 @@ const le = /* @__PURE__ */ new Map([
218
217
  size: {
219
218
  description: "",
220
219
  type: "enum",
221
- default: "middle"
220
+ default: "medium"
222
221
  }
223
- }, ye = [
222
+ }, de = [
224
223
  "id",
225
224
  "type"
226
- ], he = [
225
+ ], me = [
227
226
  "id",
228
227
  "appearance",
229
228
  "binding"
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
229
+ ], fe = {
230
+ $schema: ae,
231
+ $id: le,
232
+ title: se,
233
+ description: ce,
234
+ type: pe,
235
+ properties: ue,
236
+ required: de,
237
+ ignore: me
239
238
  };
240
- function ve(a, t, e) {
239
+ function ye(a, t, e) {
241
240
  return t;
242
241
  }
243
242
  const N = {
@@ -256,153 +255,144 @@ const N = {
256
255
  /** 开关值变化事件 */
257
256
  onModelValueChanged: { type: Function, default: () => {
258
257
  } }
259
- }, Q = ae(N, ge, le, ve), V = /* @__PURE__ */ W({
258
+ }, Q = oe(N, fe, ie, ye), P = /* @__PURE__ */ O({
260
259
  name: "FSwitch",
261
260
  props: N,
262
261
  emits: ["update:modelValue", "modelValueChanged"],
263
262
  setup(a, t) {
264
263
  const {
265
264
  disabled: e,
266
- size: o,
265
+ size: r,
267
266
  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(() => ({
267
+ offLabel: l,
268
+ onBackground: p,
269
+ offBackground: f,
270
+ onColor: m,
271
+ offColor: i
272
+ } = j(a), s = E(a.modelValue), o = D(() => ({
274
273
  switch: !0,
275
274
  "f-cmp-switch": !0,
276
275
  checked: s.value,
277
276
  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 ? {
277
+ "switch-large": r.value === "large",
278
+ "switch-medium": r.value === "medium",
279
+ "switch-small": r.value === "small"
280
+ })), c = D(() => s.value ? {
282
281
  outline: "none",
283
- background: c.value
282
+ background: p.value
284
283
  } : {
285
284
  outline: "none",
286
- backgroundColor: d.value
287
- }), h = E(() => s.value ? {
288
- background: u.value
285
+ backgroundColor: f.value
286
+ }), y = D(() => s.value ? {
287
+ background: m.value
289
288
  } : {
290
- backgroundColor: r.value
291
- }), f = E(() => (n == null ? void 0 : n.value) || (i == null ? void 0 : i.value));
292
- function T() {
289
+ backgroundColor: i.value
290
+ }), d = D(() => (n == null ? void 0 : n.value) || (l == null ? void 0 : l.value));
291
+ function h() {
293
292
  e.value || (s.value = !s.value, t.emit("update:modelValue", s.value));
294
293
  }
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", {
294
+ return U(s, (C, b) => {
295
+ C !== b && t.emit("modelValueChanged", C);
296
+ }), U(() => a.modelValue, (C, b) => {
297
+ C !== b && (s.value = C);
298
+ }), () => F("span", {
300
299
  tabindex: "0",
301
300
  role: "button",
302
- class: l.value,
303
- style: m.value,
304
- onClick: T
305
- }, [f.value && k("span", {
301
+ class: o.value,
302
+ style: c.value,
303
+ onClick: h
304
+ }, [d.value && F("span", {
306
305
  class: "switch-pane"
307
- }, [k("span", {
306
+ }, [F("span", {
308
307
  class: "switch-label-checked"
309
- }, [n == null ? void 0 : n.value]), k("span", {
308
+ }, [n == null ? void 0 : n.value]), F("span", {
310
309
  class: "switch-label-unchecked"
311
- }, [i == null ? void 0 : i.value])]), k("small", {
312
- style: h.value
310
+ }, [l == null ? void 0 : l.value])]), F("small", {
311
+ style: y.value
313
312
  }, [t.slots.default && t.slots.default()])]);
314
313
  }
315
314
  });
316
- function Ce(a, t, e) {
317
- var O;
318
- function o() {
315
+ function he(a, t, e) {
316
+ var B;
317
+ function r() {
319
318
  e != null && e.resolveComponentContext && e.resolveComponentContext();
320
319
  }
321
- o();
322
- const n = e && e.getStyles && e.getStyles() || "", i = e && e.getDesignerClass && e.getDesignerClass() || "", c = w();
323
- function d() {
320
+ r();
321
+ const n = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", p = E();
322
+ function f() {
324
323
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
325
324
  }
326
- function u() {
325
+ function m() {
327
326
  return !1;
328
327
  }
329
- function r() {
328
+ function i() {
330
329
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
331
330
  }
332
331
  function s() {
333
332
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
334
333
  }
335
- function l(y) {
336
- if (!y || !y.value)
334
+ function o(v) {
335
+ if (!v || !v.value)
337
336
  return null;
338
- if (y.value.schema && y.value.schema.type === "component")
339
- return y.value;
340
- const v = w(y == null ? void 0 : y.value.parent), C = l(v);
341
- return C || null;
337
+ if (v.value.schema && v.value.schema.type === "component")
338
+ return v.value;
339
+ const M = E(v == null ? void 0 : v.value.parent), w = o(M);
340
+ return w || null;
342
341
  }
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);
342
+ function c(v = t) {
343
+ const { componentInstance: M, designerItemElementRef: w } = v;
344
+ return !M || !M.value ? null : M.value.canMove ? w : c(v.parent);
346
345
  }
347
- function h(y) {
348
- return !!e && e.canAccepts(y);
346
+ function y(v) {
347
+ return !!e && e.canAccepts(v);
349
348
  }
350
- function f() {
349
+ function d() {
351
350
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
352
351
  }
353
- function T() {
354
- }
355
- function M(y, v) {
356
- v && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(v);
352
+ function h() {
357
353
  }
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;
354
+ function C(v, M) {
355
+ M && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(M);
364
356
  }
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;
357
+ function b(v, M) {
358
+ const { componentType: w } = v;
359
+ let S = J(w, v, M);
360
+ e && e.onResolveNewComponentSchema && (S = e.onResolveNewComponentSchema(v, S));
361
+ const A = w.toLowerCase().replace("-", "_");
362
+ return S && !S.id && S.type === w && (S.id = `${A}_${Math.random().toString().slice(2, 6)}`), S;
372
363
  }
373
- function D(y) {
364
+ function k(v) {
374
365
  }
375
- function Y(...y) {
366
+ function T(...v) {
376
367
  if (e && e.getPropsConfig)
377
- return e.getPropsConfig(...y);
368
+ return e.getPropsConfig(...v);
378
369
  }
379
- return c.value = {
380
- canMove: d(),
381
- canSelectParent: u(),
382
- canDelete: r(),
370
+ return p.value = {
371
+ canMove: f(),
372
+ canSelectParent: m(),
373
+ canDelete: i(),
383
374
  canNested: !s(),
384
375
  contents: t == null ? void 0 : t.schema.contents,
385
376
  elementRef: a,
386
- parent: (O = t == null ? void 0 : t.parent) == null ? void 0 : O.componentInstance,
377
+ parent: (B = t == null ? void 0 : t.parent) == null ? void 0 : B.componentInstance,
387
378
  schema: t == null ? void 0 : t.schema,
388
379
  styles: n,
389
- designerClass: i,
390
- canAccepts: h,
391
- getBelongedComponentInstance: l,
392
- getDraggableDesignItemElement: m,
393
- getDraggingDisplayText: f,
394
- getPropConfig: Y,
395
- getDragScopeElement: T,
396
- onAcceptMovedChildElement: M,
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;
380
+ designerClass: l,
381
+ canAccepts: y,
382
+ getBelongedComponentInstance: o,
383
+ getDraggableDesignItemElement: c,
384
+ getDraggingDisplayText: d,
385
+ getPropConfig: T,
386
+ getDragScopeElement: h,
387
+ onAcceptMovedChildElement: C,
388
+ onChildElementMovedOut: k,
389
+ addNewChildComponentSchema: b,
390
+ updateDragAndDropRules: r,
391
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || E(!1),
392
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
393
+ }, p;
404
394
  }
405
- class be {
395
+ class ge {
406
396
  constructor(t, e) {
407
397
  g(this, "componentId");
408
398
  g(this, "viewModelId");
@@ -419,8 +409,8 @@ class be {
419
409
  type: "object",
420
410
  categories: {}
421
411
  });
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;
412
+ var r;
413
+ this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
424
414
  }
425
415
  getTableInfo() {
426
416
  var t;
@@ -430,8 +420,8 @@ class be {
430
420
  const e = t.binding && t.binding.type === "Form" && t.binding.field;
431
421
  if (e) {
432
422
  if (!this.designViewModelField) {
433
- const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
434
- this.designViewModelField = o.fields.find((n) => n.id === e);
423
+ const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
424
+ this.designViewModelField = r.fields.find((n) => n.id === e);
435
425
  }
436
426
  t.updateOn = this.designViewModelField.updateOn;
437
427
  }
@@ -457,7 +447,7 @@ class be {
457
447
  type: "combo-list",
458
448
  textField: "name",
459
449
  valueField: "value",
460
- data: [{ value: t.type, name: p[t.type].name }]
450
+ data: [{ value: t.type, name: u[t.type].name }]
461
451
  }
462
452
  }
463
453
  }
@@ -490,19 +480,19 @@ class be {
490
480
  * @returns
491
481
  */
492
482
  updateElementByParentContainer(t, e) {
493
- const o = e && e.parent && e.parent.schema;
494
- if (!o)
483
+ const r = e && e.parent && e.parent.schema;
484
+ if (!r)
495
485
  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);
486
+ const n = r.contents.findIndex((p) => p.id === t), l = q(r.contents[n]);
487
+ r.contents.splice(n, 1), r.contents.splice(n, 0, l);
498
488
  }
499
489
  }
500
- const P = class P {
490
+ const I = class I {
501
491
  /**
502
492
  * 根据绑定字段类型获取可用的输入类控件
503
493
  */
504
494
  static getEditorTypesByMDataType(t) {
505
- const e = P.fieldControlTypeMapping[t];
495
+ const e = I.fieldControlTypeMapping[t];
506
496
  return e || [{ key: "", value: "" }];
507
497
  }
508
498
  /**
@@ -510,9 +500,9 @@ const P = class P {
510
500
  */
511
501
  static getAllInputTypes() {
512
502
  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 });
503
+ for (let e in I.fieldControlTypeMapping)
504
+ I.fieldControlTypeMapping[e].forEach((r) => {
505
+ t.find((n) => n.key === r.key && n.value === r.value) || t.push({ key: r.key, value: r.value });
516
506
  });
517
507
  return t;
518
508
  }
@@ -520,68 +510,175 @@ const P = class P {
520
510
  /**
521
511
  * <字段类型,可配置的控件类型列表>的映射
522
512
  */
523
- g(P, "fieldControlTypeMapping", {
513
+ g(I, "fieldControlTypeMapping", {
524
514
  String: [
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 }
515
+ { key: u["input-group"].type, value: u["input-group"].name },
516
+ { key: u.lookup.type, value: u.lookup.name },
517
+ { key: u["date-picker"].type, value: u["date-picker"].name },
518
+ { key: u["check-box"].type, value: u["check-box"].name },
519
+ { key: u["check-group"].type, value: u["check-group"].name },
520
+ { key: u["radio-group"].type, value: u["radio-group"].name },
521
+ { key: u["combo-list"].type, value: u["combo-list"].name },
522
+ { key: u.textarea.type, value: u.textarea.name }
532
523
  ],
533
524
  Text: [
534
- { key: p.textarea.type, value: p.textarea.name },
535
- { key: p.lookup.type, value: p.lookup.name }
525
+ { key: u.textarea.type, value: u.textarea.name },
526
+ { key: u.lookup.type, value: u.lookup.name }
536
527
  ],
537
528
  Decimal: [
538
- { key: p["number-spinner"].type, value: p["number-spinner"].name }
529
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
539
530
  ],
540
531
  Integer: [
541
- { key: p["number-spinner"].type, value: p["number-spinner"].name }
532
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
542
533
  ],
543
534
  Number: [
544
- { key: p["number-spinner"].type, value: p["number-spinner"].name }
535
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
545
536
  ],
546
537
  BigNumber: [
547
- { key: p["number-spinner"].type, value: p["number-spinner"].name }
538
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
548
539
  ],
549
540
  Date: [
550
- { key: p["date-picker"].type, value: p["date-picker"].name }
541
+ { key: u["date-picker"].type, value: u["date-picker"].name }
551
542
  ],
552
543
  DateTime: [
553
- { key: p["date-picker"].type, value: p["date-picker"].name }
544
+ { key: u["date-picker"].type, value: u["date-picker"].name }
554
545
  ],
555
546
  Boolean: [
556
- { key: p.switch.type, value: p.switch.name },
557
- { key: p["check-box"].type, value: p["check-box"].name }
547
+ { key: u.switch.type, value: u.switch.name },
548
+ { key: u["check-box"].type, value: u["check-box"].name }
558
549
  ],
559
550
  Enum: [
560
- { key: p["combo-list"].type, value: p["combo-list"].name },
561
- { key: p["radio-group"].type, value: p["radio-group"].name }
551
+ { key: u["combo-list"].type, value: u["combo-list"].name },
552
+ { key: u["radio-group"].type, value: u["radio-group"].name }
562
553
  ],
563
554
  Object: [
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 }
555
+ { key: u.lookup.type, value: u.lookup.name },
556
+ { key: u["combo-list"].type, value: u["combo-list"].name },
557
+ { key: u["radio-group"].type, value: u["radio-group"].name }
567
558
  ]
568
559
  });
569
- let A = P;
570
- const ke = w(0);
571
- class we extends be {
572
- constructor(e, o) {
573
- super(e, o);
560
+ let V = I;
561
+ const ve = E(0);
562
+ class Ce {
563
+ constructor() {
564
+ /** 控件标题 */
565
+ g(this, "label", "");
566
+ /** 控件id */
567
+ g(this, "id", "");
568
+ /** 每个控件占用的栅格数 */
569
+ g(this, "columnInSM", 12);
570
+ g(this, "columnInMD", 6);
571
+ g(this, "columnInLG", 3);
572
+ g(this, "columnInEL", 2);
573
+ /** 每个控件占用的列数 */
574
+ g(this, "displayWidthInSM", 1);
575
+ g(this, "displayWidthInMD", 1);
576
+ g(this, "displayWidthInLG", 1);
577
+ g(this, "displayWidthInEL", 1);
578
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
579
+ g(this, "displayColumnCountAtBreakPoint", "md");
580
+ /** 控件所在行,传0即可-----编辑器内部使用 */
581
+ g(this, "tagRow", 0);
582
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
583
+ g(this, "showTopBorder", 0);
584
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
585
+ g(this, "group", 1);
586
+ /** 控件是否符合标准的class配置(设计器用的) */
587
+ g(this, "isSupportedClass", !0);
588
+ /** 控件所在分组id(设计器用的) */
589
+ g(this, "fieldSetId", "");
590
+ }
591
+ }
592
+ function be(a) {
593
+ let t, e;
594
+ const r = /* @__PURE__ */ new Map();
595
+ let n = [];
596
+ function l(s, o) {
597
+ const y = s.split(" ").filter((k) => k.startsWith("col-"));
598
+ if (y.length === 0) {
599
+ o.isSupportedClass = !1;
600
+ return;
601
+ }
602
+ let d = y.find((k) => /^col-([1-9]|10|11|12)$/.test(k)), h = y.find((k) => /^col-md-([1-9]|10|11|12)$/.test(k)), C = y.find((k) => /^col-xl-([1-9]|10|11|12)$/.test(k)), b = y.find((k) => /^col-el-([1-9]|10|11|12)$/.test(k));
603
+ d = d || "col-12", o.columnInSM = parseInt(d.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), h = h || "col-md-" + o.columnInSM, o.columnInMD = parseInt(h.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), C = C || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(C.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), b = b || "col-el-" + o.columnInLG, o.columnInEL = parseInt(b.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
604
+ }
605
+ function p(s, o, c, y = !1) {
606
+ let d = !1;
607
+ s.contents.forEach((h) => {
608
+ if (h.type === "fieldset") {
609
+ c += 1, p(h, o, c, !0), d = !0;
610
+ return;
611
+ }
612
+ d && (c += 1, d = !1);
613
+ const C = h.appearance && h.appearance.class, b = new Ce();
614
+ C ? l(C, b) : b.isSupportedClass = !1, b.label = h.label || h.id, b.id = h.id, b.group = c, y && (b.fieldSetId = s.id), e === h.id && (t = c), r.set(h.id, h), o.push(b);
615
+ });
616
+ }
617
+ function f(s) {
618
+ const o = a.getComponentById(s);
619
+ if (!o || !o.componentType || !o.componentType.startsWith("form"))
620
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
621
+ const c = a.selectNode(o, (y) => y.type === G["response-form"].type);
622
+ return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
623
+ }
624
+ function m(s, o) {
625
+ o = o || s.id;
626
+ const { result: c, message: y, formNode: d } = f(o);
627
+ if (!c)
628
+ return { result: c, message: y };
629
+ e = s.id, n = [], r.clear();
630
+ const h = d.contents[0].type === G.fieldset.type ? 0 : 1;
631
+ p(d, n, h);
632
+ const C = n.find((k) => !k.isSupportedClass);
633
+ return {
634
+ defaultState: {
635
+ defaultGroupNumber: t || 1,
636
+ model: C ? "customize" : "standard"
637
+ },
638
+ importData: n
639
+ };
640
+ }
641
+ function i(s, o) {
642
+ o = o;
643
+ const { result: c, formNode: y } = f(o);
644
+ if (!c)
645
+ return "";
646
+ const d = [];
647
+ return s.forEach((h) => {
648
+ var k;
649
+ const C = r.get(h.id), b = C.appearance && C.appearance.class;
650
+ if (b) {
651
+ const B = b.split(" ").filter((Y) => !Y.startsWith("col-")), v = "col-" + h.columnInSM, M = "col-md-" + h.columnInMD, w = "col-xl-" + h.columnInLG, S = "col-el-" + h.columnInEL, A = [v, M, w, S].concat(B);
652
+ C.appearance.class = A.join(" ");
653
+ }
654
+ if (h.fieldSetId) {
655
+ const T = y.contents.find((v) => v.id === h.fieldSetId), B = d.find((v) => v.id === h.fieldSetId);
656
+ B ? (k = B.contents) == null || k.push(C) : (d.push(T), T.contents = [C]);
657
+ } else
658
+ d.push(C);
659
+ }), y.contents = d, y.id;
660
+ }
661
+ return {
662
+ checkCanFindFormNode: f,
663
+ checkCanOpenLayoutEditor: m,
664
+ changeFormControlsByResponseLayoutConfig: i,
665
+ getResonseFormLayoutConfig: p
666
+ };
667
+ }
668
+ class ke extends ge {
669
+ constructor(e, r) {
670
+ super(e, r);
574
671
  g(this, "responseLayoutEditorFunction");
575
- this.responseLayoutEditorFunction = K(this.formSchemaUtils);
672
+ this.responseLayoutEditorFunction = be(this.formSchemaUtils);
576
673
  }
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;
674
+ getPropertyConfig(e, r) {
675
+ return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
579
676
  }
580
- getBasicProperties(e, o) {
581
- var d;
677
+ getBasicProperties(e, r) {
678
+ var f;
582
679
  var n = this;
583
680
  this.setDesignViewModelField(e);
584
- const i = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
681
+ const l = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
585
682
  return {
586
683
  description: "Basic Information",
587
684
  title: "基本信息",
@@ -603,7 +700,7 @@ class we extends be {
603
700
  textField: "value",
604
701
  valueField: "key",
605
702
  editable: !1,
606
- data: n.designViewModelField ? A.getEditorTypesByMDataType((d = n.designViewModelField.type) == null ? void 0 : d.name) : A.getAllInputTypes()
703
+ data: n.designViewModelField ? V.getEditorTypesByMDataType((f = n.designViewModelField.type) == null ? void 0 : f.name) : V.getAllInputTypes()
607
704
  }
608
705
  },
609
706
  label: {
@@ -620,7 +717,7 @@ class we extends be {
620
717
  bindingType: { enable: !1 },
621
718
  editorParams: {
622
719
  propertyData: e,
623
- formBasicInfo: i
720
+ formBasicInfo: l
624
721
  },
625
722
  columns: [
626
723
  { field: "name", title: "字段名称" },
@@ -628,26 +725,26 @@ class we extends be {
628
725
  { field: "fieldType", title: "字段类型" }
629
726
  ],
630
727
  textField: "bindingField",
631
- data: c
728
+ data: p
632
729
  }
633
730
  }
634
731
  },
635
- setPropertyRelates(u, r) {
636
- if (u)
637
- switch (u && u.propertyID) {
732
+ setPropertyRelates(m, i) {
733
+ if (m)
734
+ switch (m && m.propertyID) {
638
735
  case "type": {
639
- n.changeControlType(e, u, o);
736
+ n.changeControlType(e, m, r);
640
737
  break;
641
738
  }
642
739
  case "label": {
643
- u.needRefreshControlTree = !0;
740
+ m.needRefreshControlTree = !0;
644
741
  break;
645
742
  }
646
743
  }
647
744
  }
648
745
  };
649
746
  }
650
- getAppearanceProperties(e, o) {
747
+ getAppearanceProperties(e, r) {
651
748
  var n = this;
652
749
  return {
653
750
  title: "样式",
@@ -678,14 +775,14 @@ class we extends be {
678
775
  }
679
776
  }
680
777
  },
681
- setPropertyRelates(i, c) {
682
- if (i)
683
- switch (i && i.propertyID) {
778
+ setPropertyRelates(l, p) {
779
+ if (l)
780
+ switch (l && l.propertyID) {
684
781
  case "responseLayout":
685
- n.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(i.propertyValue, n.componentId || e.id), n.updateUnifiedLayoutAfterResponseLayoutChanged(n.componentId), n.updateElementByParentContainer(e.id, o), delete e.responseLayout;
782
+ n.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, n.componentId || e.id), n.updateUnifiedLayoutAfterResponseLayoutChanged(n.componentId), n.updateElementByParentContainer(e.id, r), delete e.responseLayout;
686
783
  break;
687
784
  case "class":
688
- n.updateUnifiedLayoutAfterControlChanged(i.propertyValue, e.id, this.componentId), n.updateElementByParentContainer(e.id, o);
785
+ n.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), n.updateElementByParentContainer(e.id, r);
689
786
  break;
690
787
  }
691
788
  }
@@ -699,44 +796,44 @@ class we extends be {
699
796
  * @param propertyData 控件DOM属性
700
797
  * @param newControlType 新控件类型
701
798
  */
702
- changeControlType(e, o, n) {
703
- var s, l, m, h;
704
- const i = o.propertyValue, c = n && n.parent && n.parent.schema;
705
- if (!c)
799
+ changeControlType(e, r, n) {
800
+ var s, o, c, y;
801
+ const l = r.propertyValue, p = n && n.parent && n.parent.schema;
802
+ if (!p)
706
803
  return;
707
- const d = c.contents.findIndex((f) => f.id === e.id), u = c.contents[d];
708
- let r;
804
+ const f = p.contents.findIndex((d) => d.id === e.id), m = p.contents[f];
805
+ let i;
709
806
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
710
807
  editor: {
711
- $type: i
808
+ $type: l
712
809
  },
713
810
  name: this.designViewModelField.name,
714
811
  require: this.designViewModelField.require,
715
812
  readonly: this.designViewModelField.readonly
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(
730
- (f) => f.classList.remove("dgComponentSelected")
731
- ), ke.value++;
732
- }
733
- getComponentConfig(e, o = {}, n = {}) {
734
- const i = Object.assign({
813
+ }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), i || (i = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(i, {
814
+ id: m.id,
815
+ appearance: m.appearance,
816
+ size: m.size,
817
+ label: m.label,
818
+ binding: m.binding,
819
+ visible: m.visible
820
+ }), Object.assign(i.editor, {
821
+ isTextArea: i.isTextArea && m.isTextArea,
822
+ placeholder: (s = m.editor) == null ? void 0 : s.placeholder,
823
+ holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
824
+ readonly: (c = m.editor) == null ? void 0 : c.readonly,
825
+ require: (y = m.editor) == null ? void 0 : y.require
826
+ }), p.contents.splice(f, 1), p.contents.splice(f, 0, i), n.schema = Object.assign(m, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
827
+ (d) => d.classList.remove("dgComponentSelected")
828
+ ), ve.value++;
829
+ }
830
+ getComponentConfig(e, r = {}, n = {}) {
831
+ const l = Object.assign({
735
832
  description: "编辑器",
736
833
  title: "编辑器",
737
834
  type: "input-group",
738
835
  $converter: "/converter/property-editor.converter"
739
- }, o), c = Object.assign({
836
+ }, r), p = Object.assign({
740
837
  readonly: {
741
838
  description: "",
742
839
  title: "只读",
@@ -758,7 +855,7 @@ class we extends be {
758
855
  type: "string"
759
856
  }
760
857
  }, n);
761
- return { ...i, properties: { ...c } };
858
+ return { ...l, properties: { ...p } };
762
859
  }
763
860
  /**
764
861
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -766,16 +863,16 @@ class we extends be {
766
863
  * @param controlId 控件Id
767
864
  * @param componentId 控件所在组件id
768
865
  */
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-", "");
866
+ updateUnifiedLayoutAfterControlChanged(e, r, n) {
867
+ const l = e.split(" ");
868
+ let p = l.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), f = l.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = l.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), i = l.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
869
+ p = p || "col-12", f = f || "col-md-" + p.replace("col-", ""), m = m || "col-xl-" + f.replace("col-md-", ""), i = i || "col-el-" + m.replace("col-xl-", "");
773
870
  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)
871
+ id: r,
872
+ columnInSM: parseInt(p.replace("col-", ""), 10),
873
+ columnInMD: parseInt(f.replace("col-md-", ""), 10),
874
+ columnInLG: parseInt(m.replace("col-xl-", ""), 10),
875
+ columnInEL: parseInt(i.replace("col-el-", ""), 10)
779
876
  };
780
877
  this.updateUnifiedLayoutAfterResponseLayoutChanged(n, s);
781
878
  }
@@ -784,32 +881,32 @@ class we extends be {
784
881
  * @param componentId 组件Id
785
882
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
786
883
  */
787
- updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
884
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
788
885
  const { formNode: n } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
789
886
  if (!n || !n.unifiedLayout)
790
887
  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);
888
+ const l = [];
889
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(n, l, 1), r) {
890
+ const d = l.find((h) => h.id === r.id);
891
+ Object.assign(d || {}, r);
795
892
  }
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;
893
+ const p = l.map((d) => d.columnInSM), f = l.map((d) => d.columnInMD), m = l.map((d) => d.columnInLG), i = l.map((d) => d.columnInEL), s = this.checkIsUniqueColumn(p) ? p[0] : null, o = this.checkIsUniqueColumn(f) ? f[0] : null, c = this.checkIsUniqueColumn(m) ? m[0] : null, y = this.checkIsUniqueColumn(i) ? i[0] : null;
797
894
  Object.assign(n.unifiedLayout, {
798
895
  uniqueColClassInSM: s,
799
- uniqueColClassInMD: l,
800
- uniqueColClassInLG: m,
801
- uniqueColClassInEL: h
896
+ uniqueColClassInMD: o,
897
+ uniqueColClassInLG: c,
898
+ uniqueColClassInEL: y
802
899
  });
803
900
  }
804
901
  /**
805
902
  * 校验宽度样式值是否一致
806
903
  */
807
904
  checkIsUniqueColumn(e) {
808
- const o = new Set(e);
809
- return Array.from(o).length === 1;
905
+ const r = new Set(e);
906
+ return Array.from(r).length === 1;
810
907
  }
811
908
  }
812
- class Me extends we {
909
+ class Me extends ke {
813
910
  constructor(t, e) {
814
911
  super(t, e);
815
912
  }
@@ -865,97 +962,97 @@ class Me extends we {
865
962
  });
866
963
  }
867
964
  }
868
- function Se(a, t) {
965
+ function we(a, t) {
869
966
  a.schema;
870
- const e = w(!0), o = w(!0);
871
- function n(l) {
967
+ const e = E(!0), r = E(!0);
968
+ function n(o) {
872
969
  return !1;
873
970
  }
874
- function i() {
971
+ function l() {
875
972
  return !1;
876
973
  }
877
- function c() {
974
+ function p() {
878
975
  return !1;
879
976
  }
880
- function d() {
977
+ function f() {
881
978
  return !0;
882
979
  }
883
- function u(l) {
980
+ function m(o) {
884
981
  }
885
- function r() {
982
+ function i() {
886
983
  }
887
- function s(l) {
984
+ function s(o) {
888
985
  return null;
889
986
  }
890
987
  return {
891
988
  canAccepts: n,
892
- checkCanDeleteComponent: i,
893
- checkCanMoveComponent: c,
894
- hideNestedPaddingInDesginerView: d,
895
- onAcceptMovedChildElement: u,
896
- resolveComponentContext: r,
989
+ checkCanDeleteComponent: l,
990
+ checkCanMoveComponent: p,
991
+ hideNestedPaddingInDesginerView: f,
992
+ onAcceptMovedChildElement: m,
993
+ resolveComponentContext: i,
897
994
  triggerBelongedComponentToMoveWhenMoved: e,
898
- triggerBelongedComponentToDeleteWhenDeleted: o,
995
+ triggerBelongedComponentToDeleteWhenDeleted: r,
899
996
  getPropsConfig: s
900
997
  };
901
998
  }
902
- function Te(a, t) {
999
+ function Se(a, t) {
903
1000
  const {
904
1001
  canAccepts: e,
905
- checkCanDeleteComponent: o,
1002
+ checkCanDeleteComponent: r,
906
1003
  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);
1004
+ hideNestedPaddingInDesginerView: l,
1005
+ onAcceptMovedChildElement: p,
1006
+ resolveComponentContext: f,
1007
+ triggerBelongedComponentToMoveWhenMoved: m,
1008
+ triggerBelongedComponentToDeleteWhenDeleted: i
1009
+ } = we(a), s = a.schema;
1010
+ function o(c, y) {
1011
+ return new Me(c, t).getPropertyConfig(s, y);
915
1012
  }
916
1013
  return {
917
1014
  canAccepts: e,
918
- checkCanDeleteComponent: o,
1015
+ checkCanDeleteComponent: r,
919
1016
  checkCanMoveComponent: n,
920
- hideNestedPaddingInDesginerView: i,
921
- onAcceptMovedChildElement: c,
922
- resolveComponentContext: d,
923
- triggerBelongedComponentToMoveWhenMoved: u,
924
- triggerBelongedComponentToDeleteWhenDeleted: r,
925
- getPropsConfig: l
1017
+ hideNestedPaddingInDesginerView: l,
1018
+ onAcceptMovedChildElement: p,
1019
+ resolveComponentContext: f,
1020
+ triggerBelongedComponentToMoveWhenMoved: m,
1021
+ triggerBelongedComponentToDeleteWhenDeleted: i,
1022
+ getPropsConfig: o
926
1023
  };
927
1024
  }
928
- const Be = /* @__PURE__ */ W({
1025
+ const Fe = /* @__PURE__ */ O({
929
1026
  name: "FSwitchDesign",
930
1027
  props: N,
931
1028
  emits: ["update:modelValue"],
932
1029
  setup(a, t) {
933
1030
  const {
934
1031
  size: e,
935
- onLabel: o,
1032
+ onLabel: r,
936
1033
  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(() => ({
1034
+ } = j(a), l = E(), p = $("designer-host-service"), f = $("design-item-context"), m = Se(f, p), i = he(l, f, m);
1035
+ _(() => {
1036
+ l.value.componentInstance = i;
1037
+ }), t.expose(i.value);
1038
+ const s = D(() => ({
942
1039
  switch: !0,
943
1040
  "f-cmp-switch": !0,
944
1041
  checked: !1,
945
1042
  "switch-large": e.value === "large",
946
1043
  "switch-medium": e.value === "medium",
947
1044
  "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,
1045
+ })), o = D(() => (r == null ? void 0 : r.value) || (n == null ? void 0 : n.value));
1046
+ return () => F("span", {
1047
+ ref: l,
951
1048
  tabindex: "0",
952
1049
  role: "button",
953
1050
  class: s.value
954
- }, [l.value && k("span", {
1051
+ }, [o.value && F("span", {
955
1052
  class: "switch-pane"
956
- }, [k("span", {
1053
+ }, [F("span", {
957
1054
  class: "switch-label-unchecked"
958
- }, [n == null ? void 0 : n.value])]), k("small", null, [t.slots.default && t.slots.default()])]);
1055
+ }, [n == null ? void 0 : n.value])]), F("small", null, [t.slots.default && t.slots.default()])]);
959
1056
  }
960
1057
  }), Ee = (a) => {
961
1058
  const t = a;
@@ -963,16 +1060,16 @@ const Be = /* @__PURE__ */ W({
963
1060
  e.component(t.name, a);
964
1061
  }, a;
965
1062
  };
966
- V.register = (a, t, e, o) => {
967
- a.switch = V, t.switch = Q;
1063
+ P.register = (a, t, e, r) => {
1064
+ a.switch = P, t.switch = Q;
968
1065
  };
969
- V.registerDesigner = (a, t, e) => {
970
- a.switch = Be, t.switch = Q;
1066
+ P.registerDesigner = (a, t, e) => {
1067
+ a.switch = Fe, t.switch = Q;
971
1068
  };
972
- const Le = Ee(V);
1069
+ const Pe = Ee(P);
973
1070
  export {
974
- V as FSwitch,
975
- Le as default,
1071
+ P as FSwitch,
1072
+ Pe as default,
976
1073
  Q as propsResolver,
977
1074
  N as switchProps
978
1075
  };