@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,103 +1,102 @@
1
- var Y = Object.defineProperty;
2
- var Z = (n, t, e) => t in n ? Y(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var g = (n, t, e) => Z(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { defineComponent as G, ref as k, computed as E, onMounted as W, createVNode as w, withDirectives as H, vModelText as R, inject as O } from "vue";
5
- import { isPlainObject as q, cloneDeep as z } from "lodash-es";
6
- import { useTextBox as K, useClear as ee } from "../common/index.esm.js";
7
- import { getSchemaByType as j } from "../dynamic-resolver/index.esm.js";
8
- import { useResponseLayoutEditorSetting as te } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
9
- const J = {}, X = {};
10
- function N(n) {
11
- const { properties: t, title: e, ignore: o } = n, r = o && Array.isArray(o), i = Object.keys(t).reduce((l, d) => ((!r || !o.find((p) => p == d)) && (l[d] = t[d].type === "object" && t[d].properties ? N(t[d]) : z(t[d].default)), l), {});
12
- return (!r || !o.find((l) => l == "id")) && (i.id = `${e}-${Date.now()}`), i;
1
+ var Q = Object.defineProperty;
2
+ var Y = (n, t, e) => t in n ? Q(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var g = (n, t, e) => Y(n, typeof t != "symbol" ? t + "" : t, e);
4
+ import { defineComponent as G, ref as F, computed as D, onMounted as W, createVNode as E, withDirectives as Z, vModelText as _, inject as U } from "vue";
5
+ import { isPlainObject as x, cloneDeep as O } from "lodash-es";
6
+ import { useTextBox as H, useClear as K } from "../common/index.esm.js";
7
+ import { DgControl as $ } from "../designer-canvas/index.esm.js";
8
+ const j = {}, q = {};
9
+ function A(n) {
10
+ const { properties: t, title: e, ignore: r } = n, a = r && Array.isArray(r), l = Object.keys(t).reduce((c, f) => ((!a || !r.find((m) => m == f)) && (c[f] = t[f].type === "object" && t[f].properties ? A(t[f]) : O(t[f].default)), c), {});
11
+ return e && (!a || !r.find((c) => c == "id")) && (l.id = `${e}-${Date.now()}`), l;
13
12
  }
14
- function U(n, t = {}, e) {
15
- const o = J[n];
16
- if (o) {
17
- let r = N(o);
18
- const i = X[n];
19
- return r = i ? i({ getSchemaByType: U }, r, t, e) : r, r;
13
+ function z(n, t = {}, e) {
14
+ const r = j[n];
15
+ if (r) {
16
+ let a = A(r);
17
+ const l = q[n];
18
+ return a = l ? l({ getSchemaByType: z }, a, t, e) : a, a;
20
19
  }
21
20
  return null;
22
21
  }
23
- function ne(n, t) {
24
- const e = N(t);
25
- return Object.keys(n).reduce((o, r) => (o[r] && q(o[r]) && q(n[r]) ? Object.assign(o[r], n[r]) : o[r] = n[r], o), e), e;
22
+ function R(n, t) {
23
+ const e = A(t);
24
+ return Object.keys(n).reduce((r, a) => (r[a] && x(r[a]) && x(n[a]) ? Object.assign(r[a], n[a]) : r[a] = n[a], r), e), e;
26
25
  }
27
- function oe(n, t) {
28
- return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
29
- if (t.has(r)) {
30
- const i = t.get(r);
31
- if (typeof i == "string")
32
- o[i] = n[r];
26
+ function ee(n, t) {
27
+ return Object.keys(n).filter((r) => n[r] != null).reduce((r, a) => {
28
+ if (t.has(a)) {
29
+ const l = t.get(a);
30
+ if (typeof l == "string")
31
+ r[l] = n[a];
33
32
  else {
34
- const l = i(r, n[r], n);
35
- Object.assign(o, l);
33
+ const c = l(a, n[a], n);
34
+ Object.assign(r, c);
36
35
  }
37
36
  } else
38
- o[r] = n[r];
39
- return o;
37
+ r[a] = n[a];
38
+ return r;
40
39
  }, {});
41
40
  }
42
- function re(n, t, e = /* @__PURE__ */ new Map()) {
43
- const o = ne(n, t);
44
- return oe(o, e);
41
+ function te(n, t, e = /* @__PURE__ */ new Map()) {
42
+ const r = R(n, t);
43
+ return ee(r, e);
45
44
  }
46
- function ae(n = {}) {
47
- function t(a, u, s, m) {
48
- if (typeof s == "number")
49
- return m[a].length === s;
50
- if (typeof s == "object") {
51
- const h = Object.keys(s)[0], y = s[h];
52
- if (h === "not")
53
- return Number(m[a].length) !== Number(y);
54
- if (h === "moreThan")
55
- return Number(m[a].length) >= Number(y);
56
- if (h === "lessThan")
57
- return Number(m[a].length) <= Number(y);
45
+ function ne(n = {}) {
46
+ function t(i, s, o, p) {
47
+ if (typeof o == "number")
48
+ return p[i].length === o;
49
+ if (typeof o == "object") {
50
+ const y = Object.keys(o)[0], d = o[y];
51
+ if (y === "not")
52
+ return Number(p[i].length) !== Number(d);
53
+ if (y === "moreThan")
54
+ return Number(p[i].length) >= Number(d);
55
+ if (y === "lessThan")
56
+ return Number(p[i].length) <= Number(d);
58
57
  }
59
58
  return !1;
60
59
  }
61
- function e(a, u, s, m) {
62
- return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(s);
60
+ function e(i, s, o, p) {
61
+ return p[i] && p[i].propertyValue && String(p[i].propertyValue.value) === String(o);
63
62
  }
64
- const o = /* @__PURE__ */ new Map([
63
+ const r = /* @__PURE__ */ new Map([
65
64
  ["length", t],
66
65
  ["getProperty", e]
67
66
  ]);
68
- Object.keys(n).reduce((a, u) => (a.set(u, n[u]), a), o);
69
- function r(a, u) {
70
- const s = a;
71
- return typeof u == "number" ? [{ target: s, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: s, operator: "getProperty", param: a, value: !!u }] : typeof u == "object" ? Object.keys(u).map((m) => {
72
- if (m === "length")
73
- return { target: s, operator: "length", param: null, value: u[m] };
74
- const h = m, y = u[m];
75
- return { target: s, operator: "getProperty", param: h, value: y };
67
+ Object.keys(n).reduce((i, s) => (i.set(s, n[s]), i), r);
68
+ function a(i, s) {
69
+ const o = i;
70
+ 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((p) => {
71
+ if (p === "length")
72
+ return { target: o, operator: "length", param: null, value: s[p] };
73
+ const y = p, d = s[p];
74
+ return { target: o, operator: "getProperty", param: y, value: d };
76
75
  }) : [];
77
76
  }
78
- function i(a) {
79
- return Object.keys(a).reduce((s, m) => {
80
- const h = r(m, a[m]);
81
- return s.push(...h), s;
77
+ function l(i) {
78
+ return Object.keys(i).reduce((o, p) => {
79
+ const y = a(p, i[p]);
80
+ return o.push(...y), o;
82
81
  }, []);
83
82
  }
84
- function l(a, u) {
85
- if (o.has(a.operator)) {
86
- const s = o.get(a.operator);
87
- return s && s(a.target, a.param, a.value, u) || !1;
83
+ function c(i, s) {
84
+ if (r.has(i.operator)) {
85
+ const o = r.get(i.operator);
86
+ return o && o(i.target, i.param, i.value, s) || !1;
88
87
  }
89
88
  return !1;
90
89
  }
91
- function d(a, u) {
92
- return i(a).reduce((h, y) => h && l(y, u), !0);
90
+ function f(i, s) {
91
+ return l(i).reduce((y, d) => y && c(d, s), !0);
93
92
  }
94
- function p(a, u) {
95
- const s = Object.keys(a), m = s.includes("allOf"), h = s.includes("anyOf"), y = m || h, V = (y ? a[y ? m ? "allOf" : "anyOf" : "allOf"] : [a]).map((P) => d(P, u));
96
- return m ? !V.includes(!1) : V.includes(!0);
93
+ function m(i, s) {
94
+ const o = Object.keys(i), p = o.includes("allOf"), y = o.includes("anyOf"), d = p || y, v = (d ? i[d ? p ? "allOf" : "anyOf" : "allOf"] : [i]).map((w) => f(w, s));
95
+ return p ? !v.includes(!1) : v.includes(!0);
97
96
  }
98
- return { parseValueSchema: p };
97
+ return { parseValueSchema: m };
99
98
  }
100
- const c = {
99
+ const u = {
101
100
  button: { type: "button", name: "按钮", icon: "Button" },
102
101
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
103
102
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -136,20 +135,20 @@ const c = {
136
135
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
137
136
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
138
137
  fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
139
- }, ie = {}, le = {};
140
- ae();
141
- function se(n, t, e = /* @__PURE__ */ new Map(), o = (l, d, p) => d, r = {}, i = (l) => l) {
142
- return J[t.title] = t, X[t.title] = o, ie[t.title] = r, le[t.title] = i, (l = {}) => {
143
- const d = re(l, t, e), p = Object.keys(n).reduce((a, u) => (a[u] = n[u].default, a), {});
144
- return Object.assign(p, d);
138
+ }, oe = {}, re = {};
139
+ ne();
140
+ function ae(n, t, e = /* @__PURE__ */ new Map(), r = (c, f, m) => f, a = {}, l = (c) => c) {
141
+ return j[t.title] = t, q[t.title] = r, oe[t.title] = a, re[t.title] = l, (c = {}) => {
142
+ const f = te(c, t, e), m = Object.keys(n).reduce((i, s) => (i[s] = n[s].default, i), {});
143
+ return Object.assign(m, f);
145
144
  };
146
145
  }
147
- function ce(n, t) {
146
+ function ie(n, t) {
148
147
  return { customClass: t.class, customStyle: t.style };
149
148
  }
150
- const pe = /* @__PURE__ */ new Map([
151
- ["appearance", ce]
152
- ]), ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-design.gitee.io/switch.schema.json", me = "textarea", ye = "A Farris Component", fe = "object", he = {
149
+ const le = /* @__PURE__ */ new Map([
150
+ ["appearance", ie]
151
+ ]), se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/switch.schema.json", pe = "textarea", ue = "A Farris Component", de = "object", me = {
153
152
  id: {
154
153
  description: "The unique identifier for a textarea",
155
154
  type: "string"
@@ -216,22 +215,22 @@ const pe = /* @__PURE__ */ new Map([
216
215
  "appearance",
217
216
  "binding"
218
217
  ]
219
- }, ge = [
218
+ }, fe = [
220
219
  "id",
221
220
  "type"
222
- ], ve = {
223
- $schema: ue,
224
- $id: de,
225
- title: me,
226
- description: ye,
227
- type: fe,
228
- properties: he,
229
- required: ge
221
+ ], ye = {
222
+ $schema: se,
223
+ $id: ce,
224
+ title: pe,
225
+ description: ue,
226
+ type: de,
227
+ properties: me,
228
+ required: fe
230
229
  };
231
- function be(n, t, e) {
230
+ function he(n, t, e) {
232
231
  return t;
233
232
  }
234
- const $ = {
233
+ const N = {
235
234
  /** 自动聚焦 */
236
235
  autofocus: { type: Boolean, default: !1 },
237
236
  /** 自动完成 */
@@ -260,36 +259,37 @@ const $ = {
260
259
  showBorder: { Type: Boolean, default: !0 },
261
260
  /** 键盘按键索引 */
262
261
  tabIndex: { type: Number, default: -1 }
263
- }, _ = se($, ve, pe, be), A = /* @__PURE__ */ G({
262
+ }, X = ae(N, ye, le, he), P = /* @__PURE__ */ G({
264
263
  name: "FTextarea",
265
- props: $,
264
+ props: N,
266
265
  emits: ["update:modelValue", "valueChange"],
267
266
  setup(n, t) {
268
- const e = k(), o = k(n.modelValue), r = E(() => n.modelValue), i = K(n, t, o, r), {
269
- inputGroupClass: l,
270
- onBlur: d,
271
- onFocus: p
272
- } = i, a = ee(n, t, i), {
273
- onMouseEnter: u,
274
- onMouseLeave: s,
275
- clearButtonClass: m,
276
- shouldShowClearButton: h,
277
- clearButtonStyle: y
278
- } = a, T = E(() => n.maxLength ? n.maxLength : n.modelValue.length), x = (v) => {
279
- var P, F;
280
- v.stopPropagation(), t.emit("update:modelValue", (P = v.target) == null ? void 0 : P.value), t.emit("valueChange", (F = v.target) == null ? void 0 : F.value);
281
- }, V = (v) => {
282
- v.stopPropagation(), e.value.value = "", t.emit("update:modelValue", ""), t.emit("valueChange", "");
267
+ const e = F(), r = F(n.modelValue), a = D(() => n.modelValue), l = H(n, t, r, a), {
268
+ inputGroupClass: c,
269
+ onBlur: f,
270
+ onFocus: m
271
+ } = l, i = K(n, t, l), {
272
+ onMouseEnter: s,
273
+ onMouseLeave: o,
274
+ clearButtonClass: p,
275
+ shouldShowClearButton: y,
276
+ clearButtonStyle: d
277
+ } = i, h = D(() => n.maxLength ? n.maxLength : n.modelValue.length), M = (C) => {
278
+ var w, T;
279
+ C.stopPropagation(), t.emit("update:modelValue", (w = C.target) == null ? void 0 : w.value), t.emit("valueChange", (T = C.target) == null ? void 0 : T.value);
280
+ }, v = (C) => {
281
+ C.stopPropagation(), e.value.value = "", t.emit("update:modelValue", ""), t.emit("valueChange", "");
283
282
  };
284
283
  return W(() => {
285
- }), () => w("div", {
286
- class: l.value,
287
- onMouseenter: u,
288
- onMouseleave: s,
284
+ }), () => E("div", {
285
+ class: c.value,
286
+ onMouseenter: s,
287
+ onMouseleave: o,
289
288
  style: "position:relative"
290
- }, [H(w("textarea", {
289
+ }, [Z(E("textarea", {
290
+ class: "form-control",
291
291
  id: n.id,
292
- "onUpdate:modelValue": (v) => n.modelValue = v,
292
+ "onUpdate:modelValue": (C) => n.modelValue = C,
293
293
  ref: e,
294
294
  minlength: n.minLength,
295
295
  maxlength: n.maxLength ? n.maxLength : null,
@@ -300,112 +300,102 @@ const $ = {
300
300
  placeholder: n.placeholder,
301
301
  autofocus: n.autofocus,
302
302
  rows: n.rows,
303
- onInput: x,
304
- onFocus: p,
305
- onBlur: d,
306
- style: "border-radius:6px; padding:5px 10px; width:100%"
307
- }, null), [[R, n.modelValue]]), h.value && w("span", {
303
+ onInput: M,
304
+ onFocus: m,
305
+ onBlur: f
306
+ }, null), [[_, n.modelValue]]), y.value && E("span", {
308
307
  id: "clearIcon",
309
- class: m.value,
310
- style: y.value,
311
- onClick: (v) => V(v)
312
- }, [w("i", {
308
+ class: p.value,
309
+ style: d.value,
310
+ onClick: (C) => v(C)
311
+ }, [E("i", {
313
312
  class: "f-icon modal_close"
314
- }, null)]), n.showCount && w("span", {
313
+ }, null)]), n.showCount && E("span", {
315
314
  style: "position: absolute;bottom: 5px;right: 10px"
316
- }, [`${n.modelValue.length}/${T.value}`])]);
315
+ }, [`${n.modelValue.length}/${h.value}`])]);
317
316
  }
318
317
  });
319
- function Ce(n, t, e) {
320
- var I;
321
- function o() {
318
+ function ge(n, t, e) {
319
+ var T;
320
+ function r() {
322
321
  e != null && e.resolveComponentContext && e.resolveComponentContext();
323
322
  }
324
- o();
325
- const r = e && e.getStyles && e.getStyles() || "", i = e && e.getDesignerClass && e.getDesignerClass() || "", l = k();
326
- function d() {
323
+ r();
324
+ const a = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", c = F();
325
+ function f() {
327
326
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
328
327
  }
329
- function p() {
328
+ function m() {
330
329
  return !1;
331
330
  }
332
- function a() {
331
+ function i() {
333
332
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
334
333
  }
335
- function u() {
334
+ function s() {
336
335
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
337
336
  }
338
- function s(f) {
339
- if (!f || !f.value)
337
+ function o(b) {
338
+ if (!b || !b.value)
340
339
  return null;
341
- if (f.value.schema && f.value.schema.type === "component")
342
- return f.value;
343
- const b = k(f == null ? void 0 : f.value.parent), C = s(b);
344
- return C || null;
340
+ if (b.value.schema && b.value.schema.type === "component")
341
+ return b.value;
342
+ const k = F(b == null ? void 0 : b.value.parent), S = o(k);
343
+ return S || null;
345
344
  }
346
- function m(f = t) {
347
- const { componentInstance: b, designerItemElementRef: C } = f;
348
- return !b || !b.value ? null : b.value.canMove ? C : m(f.parent);
345
+ function p(b = t) {
346
+ const { componentInstance: k, designerItemElementRef: S } = b;
347
+ return !k || !k.value ? null : k.value.canMove ? S : p(b.parent);
349
348
  }
350
- function h(f) {
351
- return !!e && e.canAccepts(f);
349
+ function y(b) {
350
+ return !!e && e.canAccepts(b);
352
351
  }
353
- function y() {
352
+ function d() {
354
353
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
355
354
  }
356
- function T() {
357
- }
358
- function x(f, b) {
359
- b && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(b);
355
+ function h() {
360
356
  }
361
- function V(f, b) {
362
- const { componentType: C } = f;
363
- let M = U(C, f, b);
364
- e && e.onResolveNewComponentSchema && (M = e.onResolveNewComponentSchema(f, M));
365
- const L = C.toLowerCase().replace("-", "_");
366
- return M && !M.id && M.type === C && (M.id = `${L}_${Math.random().toString().slice(2, 6)}`), M;
357
+ function M(b, k) {
358
+ k && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(k);
367
359
  }
368
- function v(f, b) {
369
- const C = String(f.getAttribute("data-controltype")), M = f.getAttribute("data-feature"), L = M ? JSON.parse(M) : {};
370
- L.parentComponentInstance = l.value;
371
- let B = U(C, L);
372
- e && e.onAcceptNewChildElement && (B = e.onAcceptNewChildElement(f, b, B));
373
- const Q = C.toLowerCase().replace("-", "_");
374
- return B && !B.id && B.type === C && (B.id = `${Q}_${Math.random().toString().slice(2, 6)}`), B;
360
+ function v(b, k) {
361
+ const { componentType: S } = b;
362
+ let B = z(S, b, k);
363
+ e && e.onResolveNewComponentSchema && (B = e.onResolveNewComponentSchema(b, B));
364
+ const L = S.toLowerCase().replace("-", "_");
365
+ return B && !B.id && B.type === S && (B.id = `${L}_${Math.random().toString().slice(2, 6)}`), B;
375
366
  }
376
- function P(f) {
367
+ function C(b) {
377
368
  }
378
- function F(...f) {
369
+ function w(...b) {
379
370
  if (e && e.getPropsConfig)
380
- return e.getPropsConfig(...f);
371
+ return e.getPropsConfig(...b);
381
372
  }
382
- return l.value = {
383
- canMove: d(),
384
- canSelectParent: p(),
385
- canDelete: a(),
386
- canNested: !u(),
373
+ return c.value = {
374
+ canMove: f(),
375
+ canSelectParent: m(),
376
+ canDelete: i(),
377
+ canNested: !s(),
387
378
  contents: t == null ? void 0 : t.schema.contents,
388
379
  elementRef: n,
389
- parent: (I = t == null ? void 0 : t.parent) == null ? void 0 : I.componentInstance,
380
+ parent: (T = t == null ? void 0 : t.parent) == null ? void 0 : T.componentInstance,
390
381
  schema: t == null ? void 0 : t.schema,
391
- styles: r,
392
- designerClass: i,
393
- canAccepts: h,
394
- getBelongedComponentInstance: s,
395
- getDraggableDesignItemElement: m,
396
- getDraggingDisplayText: y,
397
- getPropConfig: F,
398
- getDragScopeElement: T,
399
- onAcceptMovedChildElement: x,
400
- onAcceptNewChildElement: v,
401
- onChildElementMovedOut: P,
402
- addNewChildComponentSchema: V,
403
- updateDragAndDropRules: o,
404
- triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || k(!1),
405
- triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
406
- }, l;
382
+ styles: a,
383
+ designerClass: l,
384
+ canAccepts: y,
385
+ getBelongedComponentInstance: o,
386
+ getDraggableDesignItemElement: p,
387
+ getDraggingDisplayText: d,
388
+ getPropConfig: w,
389
+ getDragScopeElement: h,
390
+ onAcceptMovedChildElement: M,
391
+ onChildElementMovedOut: C,
392
+ addNewChildComponentSchema: v,
393
+ updateDragAndDropRules: r,
394
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || F(!1),
395
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || F(!1)
396
+ }, c;
407
397
  }
408
- class Me {
398
+ class Ce {
409
399
  constructor(t, e) {
410
400
  g(this, "componentId");
411
401
  g(this, "viewModelId");
@@ -422,8 +412,8 @@ class Me {
422
412
  type: "object",
423
413
  categories: {}
424
414
  });
425
- var o;
426
- 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;
415
+ var r;
416
+ 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;
427
417
  }
428
418
  getTableInfo() {
429
419
  var t;
@@ -433,8 +423,8 @@ class Me {
433
423
  const e = t.binding && t.binding.type === "Form" && t.binding.field;
434
424
  if (e) {
435
425
  if (!this.designViewModelField) {
436
- const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
437
- this.designViewModelField = o.fields.find((r) => r.id === e);
426
+ const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
427
+ this.designViewModelField = r.fields.find((a) => a.id === e);
438
428
  }
439
429
  t.updateOn = this.designViewModelField.updateOn;
440
430
  }
@@ -460,7 +450,7 @@ class Me {
460
450
  type: "combo-list",
461
451
  textField: "name",
462
452
  valueField: "value",
463
- data: [{ value: t.type, name: c[t.type].name }]
453
+ data: [{ value: t.type, name: u[t.type].name }]
464
454
  }
465
455
  }
466
456
  }
@@ -493,19 +483,19 @@ class Me {
493
483
  * @returns
494
484
  */
495
485
  updateElementByParentContainer(t, e) {
496
- const o = e && e.parent && e.parent.schema;
497
- if (!o)
486
+ const r = e && e.parent && e.parent.schema;
487
+ if (!r)
498
488
  return;
499
- const r = o.contents.findIndex((l) => l.id === t), i = z(o.contents[r]);
500
- o.contents.splice(r, 1), o.contents.splice(r, 0, i);
489
+ const a = r.contents.findIndex((c) => c.id === t), l = O(r.contents[a]);
490
+ r.contents.splice(a, 1), r.contents.splice(a, 0, l);
501
491
  }
502
492
  }
503
- const S = class S {
493
+ const I = class I {
504
494
  /**
505
495
  * 根据绑定字段类型获取可用的输入类控件
506
496
  */
507
497
  static getEditorTypesByMDataType(t) {
508
- const e = S.fieldControlTypeMapping[t];
498
+ const e = I.fieldControlTypeMapping[t];
509
499
  return e || [{ key: "", value: "" }];
510
500
  }
511
501
  /**
@@ -513,9 +503,9 @@ const S = class S {
513
503
  */
514
504
  static getAllInputTypes() {
515
505
  const t = [];
516
- for (let e in S.fieldControlTypeMapping)
517
- S.fieldControlTypeMapping[e].forEach((o) => {
518
- t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
506
+ for (let e in I.fieldControlTypeMapping)
507
+ I.fieldControlTypeMapping[e].forEach((r) => {
508
+ t.find((a) => a.key === r.key && a.value === r.value) || t.push({ key: r.key, value: r.value });
519
509
  });
520
510
  return t;
521
511
  }
@@ -523,68 +513,175 @@ const S = class S {
523
513
  /**
524
514
  * <字段类型,可配置的控件类型列表>的映射
525
515
  */
526
- g(S, "fieldControlTypeMapping", {
516
+ g(I, "fieldControlTypeMapping", {
527
517
  String: [
528
- { key: c["input-group"].type, value: c["input-group"].name },
529
- { key: c.lookup.type, value: c.lookup.name },
530
- { key: c["date-picker"].type, value: c["date-picker"].name },
531
- { key: c["check-box"].type, value: c["check-box"].name },
532
- { key: c["radio-group"].type, value: c["radio-group"].name },
533
- { key: c["combo-list"].type, value: c["combo-list"].name },
534
- { key: c.textarea.type, value: c.textarea.name }
518
+ { key: u["input-group"].type, value: u["input-group"].name },
519
+ { key: u.lookup.type, value: u.lookup.name },
520
+ { key: u["date-picker"].type, value: u["date-picker"].name },
521
+ { key: u["check-box"].type, value: u["check-box"].name },
522
+ { key: u["check-group"].type, value: u["check-group"].name },
523
+ { key: u["radio-group"].type, value: u["radio-group"].name },
524
+ { key: u["combo-list"].type, value: u["combo-list"].name },
525
+ { key: u.textarea.type, value: u.textarea.name }
535
526
  ],
536
527
  Text: [
537
- { key: c.textarea.type, value: c.textarea.name },
538
- { key: c.lookup.type, value: c.lookup.name }
528
+ { key: u.textarea.type, value: u.textarea.name },
529
+ { key: u.lookup.type, value: u.lookup.name }
539
530
  ],
540
531
  Decimal: [
541
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
532
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
542
533
  ],
543
534
  Integer: [
544
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
535
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
545
536
  ],
546
537
  Number: [
547
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
538
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
548
539
  ],
549
540
  BigNumber: [
550
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
541
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
551
542
  ],
552
543
  Date: [
553
- { key: c["date-picker"].type, value: c["date-picker"].name }
544
+ { key: u["date-picker"].type, value: u["date-picker"].name }
554
545
  ],
555
546
  DateTime: [
556
- { key: c["date-picker"].type, value: c["date-picker"].name }
547
+ { key: u["date-picker"].type, value: u["date-picker"].name }
557
548
  ],
558
549
  Boolean: [
559
- { key: c.switch.type, value: c.switch.name },
560
- { key: c["check-box"].type, value: c["check-box"].name }
550
+ { key: u.switch.type, value: u.switch.name },
551
+ { key: u["check-box"].type, value: u["check-box"].name }
561
552
  ],
562
553
  Enum: [
563
- { key: c["combo-list"].type, value: c["combo-list"].name },
564
- { key: c["radio-group"].type, value: c["radio-group"].name }
554
+ { key: u["combo-list"].type, value: u["combo-list"].name },
555
+ { key: u["radio-group"].type, value: u["radio-group"].name }
565
556
  ],
566
557
  Object: [
567
- { key: c.lookup.type, value: c.lookup.name },
568
- { key: c["combo-list"].type, value: c["combo-list"].name },
569
- { key: c["radio-group"].type, value: c["radio-group"].name }
558
+ { key: u.lookup.type, value: u.lookup.name },
559
+ { key: u["combo-list"].type, value: u["combo-list"].name },
560
+ { key: u["radio-group"].type, value: u["radio-group"].name }
570
561
  ]
571
562
  });
572
- let D = S;
573
- const ke = k(0);
574
- class we extends Me {
575
- constructor(e, o) {
576
- super(e, o);
563
+ let V = I;
564
+ const be = F(0);
565
+ class ve {
566
+ constructor() {
567
+ /** 控件标题 */
568
+ g(this, "label", "");
569
+ /** 控件id */
570
+ g(this, "id", "");
571
+ /** 每个控件占用的栅格数 */
572
+ g(this, "columnInSM", 12);
573
+ g(this, "columnInMD", 6);
574
+ g(this, "columnInLG", 3);
575
+ g(this, "columnInEL", 2);
576
+ /** 每个控件占用的列数 */
577
+ g(this, "displayWidthInSM", 1);
578
+ g(this, "displayWidthInMD", 1);
579
+ g(this, "displayWidthInLG", 1);
580
+ g(this, "displayWidthInEL", 1);
581
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
582
+ g(this, "displayColumnCountAtBreakPoint", "md");
583
+ /** 控件所在行,传0即可-----编辑器内部使用 */
584
+ g(this, "tagRow", 0);
585
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
586
+ g(this, "showTopBorder", 0);
587
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
588
+ g(this, "group", 1);
589
+ /** 控件是否符合标准的class配置(设计器用的) */
590
+ g(this, "isSupportedClass", !0);
591
+ /** 控件所在分组id(设计器用的) */
592
+ g(this, "fieldSetId", "");
593
+ }
594
+ }
595
+ function Me(n) {
596
+ let t, e;
597
+ const r = /* @__PURE__ */ new Map();
598
+ let a = [];
599
+ function l(s, o) {
600
+ const y = s.split(" ").filter((C) => C.startsWith("col-"));
601
+ if (y.length === 0) {
602
+ o.isSupportedClass = !1;
603
+ return;
604
+ }
605
+ let d = y.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), h = y.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), M = y.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), v = y.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
606
+ 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), M = M || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(M.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), v = v || "col-el-" + o.columnInLG, o.columnInEL = parseInt(v.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
607
+ }
608
+ function c(s, o, p, y = !1) {
609
+ let d = !1;
610
+ s.contents.forEach((h) => {
611
+ if (h.type === "fieldset") {
612
+ p += 1, c(h, o, p, !0), d = !0;
613
+ return;
614
+ }
615
+ d && (p += 1, d = !1);
616
+ const M = h.appearance && h.appearance.class, v = new ve();
617
+ M ? l(M, v) : v.isSupportedClass = !1, v.label = h.label || h.id, v.id = h.id, v.group = p, y && (v.fieldSetId = s.id), e === h.id && (t = p), r.set(h.id, h), o.push(v);
618
+ });
619
+ }
620
+ function f(s) {
621
+ const o = n.getComponentById(s);
622
+ if (!o || !o.componentType || !o.componentType.startsWith("form"))
623
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
624
+ const p = n.selectNode(o, (y) => y.type === $["response-form"].type);
625
+ return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
626
+ }
627
+ function m(s, o) {
628
+ o = o || s.id;
629
+ const { result: p, message: y, formNode: d } = f(o);
630
+ if (!p)
631
+ return { result: p, message: y };
632
+ e = s.id, a = [], r.clear();
633
+ const h = d.contents[0].type === $.fieldset.type ? 0 : 1;
634
+ c(d, a, h);
635
+ const M = a.find((C) => !C.isSupportedClass);
636
+ return {
637
+ defaultState: {
638
+ defaultGroupNumber: t || 1,
639
+ model: M ? "customize" : "standard"
640
+ },
641
+ importData: a
642
+ };
643
+ }
644
+ function i(s, o) {
645
+ o = o;
646
+ const { result: p, formNode: y } = f(o);
647
+ if (!p)
648
+ return "";
649
+ const d = [];
650
+ return s.forEach((h) => {
651
+ var C;
652
+ const M = r.get(h.id), v = M.appearance && M.appearance.class;
653
+ if (v) {
654
+ const T = v.split(" ").filter((J) => !J.startsWith("col-")), b = "col-" + h.columnInSM, k = "col-md-" + h.columnInMD, S = "col-xl-" + h.columnInLG, B = "col-el-" + h.columnInEL, L = [b, k, S, B].concat(T);
655
+ M.appearance.class = L.join(" ");
656
+ }
657
+ if (h.fieldSetId) {
658
+ const w = y.contents.find((b) => b.id === h.fieldSetId), T = d.find((b) => b.id === h.fieldSetId);
659
+ T ? (C = T.contents) == null || C.push(M) : (d.push(w), w.contents = [M]);
660
+ } else
661
+ d.push(M);
662
+ }), y.contents = d, y.id;
663
+ }
664
+ return {
665
+ checkCanFindFormNode: f,
666
+ checkCanOpenLayoutEditor: m,
667
+ changeFormControlsByResponseLayoutConfig: i,
668
+ getResonseFormLayoutConfig: c
669
+ };
670
+ }
671
+ class ke extends Ce {
672
+ constructor(e, r) {
673
+ super(e, r);
577
674
  g(this, "responseLayoutEditorFunction");
578
- this.responseLayoutEditorFunction = te(this.formSchemaUtils);
675
+ this.responseLayoutEditorFunction = Me(this.formSchemaUtils);
579
676
  }
580
- getPropertyConfig(e, o) {
581
- 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;
677
+ getPropertyConfig(e, r) {
678
+ 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;
582
679
  }
583
- getBasicProperties(e, o) {
584
- var d;
585
- var r = this;
680
+ getBasicProperties(e, r) {
681
+ var f;
682
+ var a = this;
586
683
  this.setDesignViewModelField(e);
587
- const i = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
684
+ const l = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
588
685
  return {
589
686
  description: "Basic Information",
590
687
  title: "基本信息",
@@ -606,7 +703,7 @@ class we extends Me {
606
703
  textField: "value",
607
704
  valueField: "key",
608
705
  editable: !1,
609
- data: r.designViewModelField ? D.getEditorTypesByMDataType((d = r.designViewModelField.type) == null ? void 0 : d.name) : D.getAllInputTypes()
706
+ data: a.designViewModelField ? V.getEditorTypesByMDataType((f = a.designViewModelField.type) == null ? void 0 : f.name) : V.getAllInputTypes()
610
707
  }
611
708
  },
612
709
  label: {
@@ -623,7 +720,7 @@ class we extends Me {
623
720
  bindingType: { enable: !1 },
624
721
  editorParams: {
625
722
  propertyData: e,
626
- formBasicInfo: i
723
+ formBasicInfo: l
627
724
  },
628
725
  columns: [
629
726
  { field: "name", title: "字段名称" },
@@ -631,27 +728,27 @@ class we extends Me {
631
728
  { field: "fieldType", title: "字段类型" }
632
729
  ],
633
730
  textField: "bindingField",
634
- data: l
731
+ data: c
635
732
  }
636
733
  }
637
734
  },
638
- setPropertyRelates(p, a) {
639
- if (p)
640
- switch (p && p.propertyID) {
735
+ setPropertyRelates(m, i) {
736
+ if (m)
737
+ switch (m && m.propertyID) {
641
738
  case "type": {
642
- r.changeControlType(e, p, o);
739
+ a.changeControlType(e, m, r);
643
740
  break;
644
741
  }
645
742
  case "label": {
646
- p.needRefreshControlTree = !0;
743
+ m.needRefreshControlTree = !0;
647
744
  break;
648
745
  }
649
746
  }
650
747
  }
651
748
  };
652
749
  }
653
- getAppearanceProperties(e, o) {
654
- var r = this;
750
+ getAppearanceProperties(e, r) {
751
+ var a = this;
655
752
  return {
656
753
  title: "样式",
657
754
  description: "Appearance",
@@ -677,18 +774,18 @@ class we extends Me {
677
774
  refreshPanelAfterChanged: !0,
678
775
  editor: {
679
776
  type: "response-layout-editor-setting",
680
- initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
777
+ initialState: a.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, a.componentId)
681
778
  }
682
779
  }
683
780
  },
684
- setPropertyRelates(i, l) {
685
- if (i)
686
- switch (i && i.propertyID) {
781
+ setPropertyRelates(l, c) {
782
+ if (l)
783
+ switch (l && l.propertyID) {
687
784
  case "responseLayout":
688
- r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(i.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, o), delete e.responseLayout;
785
+ a.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, a.componentId || e.id), a.updateUnifiedLayoutAfterResponseLayoutChanged(a.componentId), a.updateElementByParentContainer(e.id, r), delete e.responseLayout;
689
786
  break;
690
787
  case "class":
691
- r.updateUnifiedLayoutAfterControlChanged(i.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, o);
788
+ a.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), a.updateElementByParentContainer(e.id, r);
692
789
  break;
693
790
  }
694
791
  }
@@ -702,44 +799,44 @@ class we extends Me {
702
799
  * @param propertyData 控件DOM属性
703
800
  * @param newControlType 新控件类型
704
801
  */
705
- changeControlType(e, o, r) {
706
- var u, s, m, h;
707
- const i = o.propertyValue, l = r && r.parent && r.parent.schema;
708
- if (!l)
802
+ changeControlType(e, r, a) {
803
+ var s, o, p, y;
804
+ const l = r.propertyValue, c = a && a.parent && a.parent.schema;
805
+ if (!c)
709
806
  return;
710
- const d = l.contents.findIndex((y) => y.id === e.id), p = l.contents[d];
711
- let a;
807
+ const f = c.contents.findIndex((d) => d.id === e.id), m = c.contents[f];
808
+ let i;
712
809
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
713
810
  editor: {
714
- $type: i
811
+ $type: l
715
812
  },
716
813
  name: this.designViewModelField.name,
717
814
  require: this.designViewModelField.require,
718
815
  readonly: this.designViewModelField.readonly
719
- }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, i)), a || (a = j("form-group") || {}, a.editor = j(i) || {}, delete a.editor.id, delete a.editor.binding, delete a.editor.appearance), Object.assign(a, {
720
- id: p.id,
721
- appearance: p.appearance,
722
- size: p.size,
723
- label: p.label,
724
- binding: p.binding,
725
- visible: p.visible
726
- }), Object.assign(a.editor, {
727
- isTextArea: a.isTextArea && p.isTextArea,
728
- placeholder: (u = p.editor) == null ? void 0 : u.placeholder,
729
- holdPlace: (s = p.editor) == null ? void 0 : s.holdPlace,
730
- readonly: (m = p.editor) == null ? void 0 : m.readonly,
731
- require: (h = p.editor) == null ? void 0 : h.require
732
- }), l.contents.splice(d, 1), l.contents.splice(d, 0, a), r.schema = Object.assign(p, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
733
- (y) => y.classList.remove("dgComponentSelected")
734
- ), ke.value++;
735
- }
736
- getComponentConfig(e, o = {}, r = {}) {
737
- const i = Object.assign({
816
+ }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), i || (i = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(i, {
817
+ id: m.id,
818
+ appearance: m.appearance,
819
+ size: m.size,
820
+ label: m.label,
821
+ binding: m.binding,
822
+ visible: m.visible
823
+ }), Object.assign(i.editor, {
824
+ isTextArea: i.isTextArea && m.isTextArea,
825
+ placeholder: (s = m.editor) == null ? void 0 : s.placeholder,
826
+ holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
827
+ readonly: (p = m.editor) == null ? void 0 : p.readonly,
828
+ require: (y = m.editor) == null ? void 0 : y.require
829
+ }), c.contents.splice(f, 1), c.contents.splice(f, 0, i), a.schema = Object.assign(m, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
830
+ (d) => d.classList.remove("dgComponentSelected")
831
+ ), be.value++;
832
+ }
833
+ getComponentConfig(e, r = {}, a = {}) {
834
+ const l = Object.assign({
738
835
  description: "编辑器",
739
836
  title: "编辑器",
740
837
  type: "input-group",
741
838
  $converter: "/converter/property-editor.converter"
742
- }, o), l = Object.assign({
839
+ }, r), c = Object.assign({
743
840
  readonly: {
744
841
  description: "",
745
842
  title: "只读",
@@ -760,8 +857,8 @@ class we extends Me {
760
857
  title: "提示文本",
761
858
  type: "string"
762
859
  }
763
- }, r);
764
- return { ...i, properties: { ...l } };
860
+ }, a);
861
+ return { ...l, properties: { ...c } };
765
862
  }
766
863
  /**
767
864
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -769,164 +866,164 @@ class we extends Me {
769
866
  * @param controlId 控件Id
770
867
  * @param componentId 控件所在组件id
771
868
  */
772
- updateUnifiedLayoutAfterControlChanged(e, o, r) {
773
- const i = e.split(" ");
774
- let l = i.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), d = i.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), p = i.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), a = i.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
775
- l = l || "col-12", d = d || "col-md-" + l.replace("col-", ""), p = p || "col-xl-" + d.replace("col-md-", ""), a = a || "col-el-" + p.replace("col-xl-", "");
776
- const u = {
777
- id: o,
778
- columnInSM: parseInt(l.replace("col-", ""), 10),
779
- columnInMD: parseInt(d.replace("col-md-", ""), 10),
780
- columnInLG: parseInt(p.replace("col-xl-", ""), 10),
781
- columnInEL: parseInt(a.replace("col-el-", ""), 10)
869
+ updateUnifiedLayoutAfterControlChanged(e, r, a) {
870
+ const l = e.split(" ");
871
+ let c = 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));
872
+ c = c || "col-12", f = f || "col-md-" + c.replace("col-", ""), m = m || "col-xl-" + f.replace("col-md-", ""), i = i || "col-el-" + m.replace("col-xl-", "");
873
+ const s = {
874
+ id: r,
875
+ columnInSM: parseInt(c.replace("col-", ""), 10),
876
+ columnInMD: parseInt(f.replace("col-md-", ""), 10),
877
+ columnInLG: parseInt(m.replace("col-xl-", ""), 10),
878
+ columnInEL: parseInt(i.replace("col-el-", ""), 10)
782
879
  };
783
- this.updateUnifiedLayoutAfterResponseLayoutChanged(r, u);
880
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(a, s);
784
881
  }
785
882
  /**
786
883
  * 修改控件布局配置后更新Form统一布局配置
787
884
  * @param componentId 组件Id
788
885
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
789
886
  */
790
- updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
791
- const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
792
- if (!r || !r.unifiedLayout)
887
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
888
+ const { formNode: a } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
889
+ if (!a || !a.unifiedLayout)
793
890
  return;
794
- const i = [];
795
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, i, 1), o) {
796
- const y = i.find((T) => T.id === o.id);
797
- Object.assign(y || {}, o);
891
+ const l = [];
892
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(a, l, 1), r) {
893
+ const d = l.find((h) => h.id === r.id);
894
+ Object.assign(d || {}, r);
798
895
  }
799
- const l = i.map((y) => y.columnInSM), d = i.map((y) => y.columnInMD), p = i.map((y) => y.columnInLG), a = i.map((y) => y.columnInEL), u = this.checkIsUniqueColumn(l) ? l[0] : null, s = this.checkIsUniqueColumn(d) ? d[0] : null, m = this.checkIsUniqueColumn(p) ? p[0] : null, h = this.checkIsUniqueColumn(a) ? a[0] : null;
800
- Object.assign(r.unifiedLayout, {
801
- uniqueColClassInSM: u,
802
- uniqueColClassInMD: s,
803
- uniqueColClassInLG: m,
804
- uniqueColClassInEL: h
896
+ const c = 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(c) ? c[0] : null, o = this.checkIsUniqueColumn(f) ? f[0] : null, p = this.checkIsUniqueColumn(m) ? m[0] : null, y = this.checkIsUniqueColumn(i) ? i[0] : null;
897
+ Object.assign(a.unifiedLayout, {
898
+ uniqueColClassInSM: s,
899
+ uniqueColClassInMD: o,
900
+ uniqueColClassInLG: p,
901
+ uniqueColClassInEL: y
805
902
  });
806
903
  }
807
904
  /**
808
905
  * 校验宽度样式值是否一致
809
906
  */
810
907
  checkIsUniqueColumn(e) {
811
- const o = new Set(e);
812
- return Array.from(o).length === 1;
908
+ const r = new Set(e);
909
+ return Array.from(r).length === 1;
813
910
  }
814
911
  }
815
- class Te extends we {
912
+ class we extends ke {
816
913
  constructor(t, e) {
817
914
  super(t, e);
818
915
  }
819
916
  }
820
- function Be(n, t) {
917
+ function Te(n, t) {
821
918
  n.schema;
822
- const e = k(!0), o = k(!0);
823
- function r(s) {
919
+ const e = F(!0), r = F(!0);
920
+ function a(o) {
824
921
  return !1;
825
922
  }
826
- function i() {
923
+ function l() {
827
924
  return !1;
828
925
  }
829
- function l() {
926
+ function c() {
830
927
  return !1;
831
928
  }
832
- function d() {
929
+ function f() {
833
930
  return !0;
834
931
  }
835
- function p(s) {
932
+ function m(o) {
836
933
  }
837
- function a() {
934
+ function i() {
838
935
  }
839
- function u(s) {
936
+ function s(o) {
840
937
  return null;
841
938
  }
842
939
  return {
843
- canAccepts: r,
844
- checkCanDeleteComponent: i,
845
- checkCanMoveComponent: l,
846
- hideNestedPaddingInDesginerView: d,
847
- onAcceptMovedChildElement: p,
848
- resolveComponentContext: a,
940
+ canAccepts: a,
941
+ checkCanDeleteComponent: l,
942
+ checkCanMoveComponent: c,
943
+ hideNestedPaddingInDesginerView: f,
944
+ onAcceptMovedChildElement: m,
945
+ resolveComponentContext: i,
849
946
  triggerBelongedComponentToMoveWhenMoved: e,
850
- triggerBelongedComponentToDeleteWhenDeleted: o,
851
- getPropsConfig: u
947
+ triggerBelongedComponentToDeleteWhenDeleted: r,
948
+ getPropsConfig: s
852
949
  };
853
950
  }
854
- function Ve(n, t) {
951
+ function Se(n, t) {
855
952
  const {
856
953
  canAccepts: e,
857
- checkCanDeleteComponent: o,
858
- checkCanMoveComponent: r,
859
- hideNestedPaddingInDesginerView: i,
860
- onAcceptMovedChildElement: l,
861
- resolveComponentContext: d,
862
- triggerBelongedComponentToMoveWhenMoved: p,
863
- triggerBelongedComponentToDeleteWhenDeleted: a
864
- } = Be(n), u = n.schema;
865
- function s(m, h) {
866
- return new Te(m, t).getPropertyConfig(u, h);
954
+ checkCanDeleteComponent: r,
955
+ checkCanMoveComponent: a,
956
+ hideNestedPaddingInDesginerView: l,
957
+ onAcceptMovedChildElement: c,
958
+ resolveComponentContext: f,
959
+ triggerBelongedComponentToMoveWhenMoved: m,
960
+ triggerBelongedComponentToDeleteWhenDeleted: i
961
+ } = Te(n), s = n.schema;
962
+ function o(p, y) {
963
+ return new we(p, t).getPropertyConfig(s, y);
867
964
  }
868
965
  return {
869
966
  canAccepts: e,
870
- checkCanDeleteComponent: o,
871
- checkCanMoveComponent: r,
872
- hideNestedPaddingInDesginerView: i,
873
- onAcceptMovedChildElement: l,
874
- resolveComponentContext: d,
875
- triggerBelongedComponentToMoveWhenMoved: p,
876
- triggerBelongedComponentToDeleteWhenDeleted: a,
877
- getPropsConfig: s
967
+ checkCanDeleteComponent: r,
968
+ checkCanMoveComponent: a,
969
+ hideNestedPaddingInDesginerView: l,
970
+ onAcceptMovedChildElement: c,
971
+ resolveComponentContext: f,
972
+ triggerBelongedComponentToMoveWhenMoved: m,
973
+ triggerBelongedComponentToDeleteWhenDeleted: i,
974
+ getPropsConfig: o
878
975
  };
879
976
  }
880
- const Pe = /* @__PURE__ */ G({
977
+ const Fe = /* @__PURE__ */ G({
881
978
  name: "FTextareaDesign",
882
- props: $,
979
+ props: N,
883
980
  emits: [""],
884
981
  setup(n, t) {
885
- const e = k(), o = O("designer-host-service"), r = O("design-item-context"), i = Ve(r, o), l = Ce(e, r, i), d = E(() => n.maxLength ? n.maxLength : n.modelValue.length), p = E(() => ({
982
+ const e = F(), r = U("designer-host-service"), a = U("design-item-context"), l = Se(a, r), c = ge(e, a, l), f = D(() => n.maxLength ? n.maxLength : n.modelValue.length), m = D(() => ({
886
983
  position: "relative"
887
- })), a = E(() => ({
984
+ })), i = D(() => ({
888
985
  "box-shadow": "0 0 0 1px #dcdfe6 inset",
889
986
  border: "none",
890
987
  padding: "5px 10px",
891
988
  width: "100%"
892
- })), u = {
989
+ })), s = {
893
990
  position: "absolute",
894
991
  bottom: "5px",
895
992
  right: "10px"
896
993
  };
897
994
  return W(() => {
898
- e.value.componentInstance = l;
899
- }), t.expose(l.value), () => w("div", {
900
- style: p.value,
995
+ e.value.componentInstance = c;
996
+ }), t.expose(c.value), () => E("div", {
997
+ style: m.value,
901
998
  ref: e
902
- }, [w("textarea", {
999
+ }, [E("textarea", {
903
1000
  id: n.id,
904
1001
  tabindex: n.tabIndex,
905
1002
  disabled: !1,
906
1003
  readonly: !0,
907
- style: a.value,
1004
+ style: i.value,
908
1005
  placeholder: n.placeholder,
909
1006
  rows: n.rows
910
- }, null), n.showCount && w("span", {
911
- style: u
912
- }, [`${n.modelValue.length}/${d.value}`])]);
1007
+ }, null), n.showCount && E("span", {
1008
+ style: s
1009
+ }, [`${n.modelValue.length}/${f.value}`])]);
913
1010
  }
914
- }), Se = (n) => {
1011
+ }), Be = (n) => {
915
1012
  const t = n;
916
1013
  return t.install = function(e) {
917
1014
  e.component(t.name, n);
918
1015
  }, n;
919
1016
  };
920
- A.register = (n, t, e, o) => {
921
- n.textarea = A, t.textarea = _;
1017
+ P.register = (n, t, e, r) => {
1018
+ n.textarea = P, t.textarea = X;
922
1019
  };
923
- A.registerDesigner = (n, t, e) => {
924
- n.textarea = Pe, t.textarea = _;
1020
+ P.registerDesigner = (n, t, e) => {
1021
+ n.textarea = Fe, t.textarea = X;
925
1022
  };
926
- const Ue = Se(A);
1023
+ const Le = Be(P);
927
1024
  export {
928
- A as FTextarea,
929
- Ue as default,
930
- _ as propsResolver,
931
- $ as textAreaProps
1025
+ P as FTextarea,
1026
+ Le as default,
1027
+ X as propsResolver,
1028
+ N as textAreaProps
932
1029
  };