@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,95 +1,94 @@
1
- var D = Object.defineProperty;
2
- var H = (r, n, e) => n in r ? D(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
3
- var y = (r, n, e) => H(r, typeof n != "symbol" ? n + "" : n, e);
4
- import { ref as v, computed as C, defineComponent as M, createVNode as f, inject as x, onMounted as U } from "vue";
5
- import { isPlainObject as E, cloneDeep as P } from "lodash-es";
6
- import { resolveAppearance as q, getSchemaByType as F } from "../dynamic-resolver/index.esm.js";
7
- import { useDesignerComponent as N } from "../designer-canvas/index.esm.js";
8
- import { useResponseLayoutEditorSetting as Q } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
9
- import { withInstall as j } from "../common/index.esm.js";
10
- const O = {}, W = {};
11
- function V(r) {
12
- const { properties: n, title: e, ignore: t } = r, o = t && Array.isArray(t), a = Object.keys(n).reduce((l, u) => ((!o || !t.find((p) => p == u)) && (l[u] = n[u].type === "object" && n[u].properties ? V(n[u]) : P(n[u].default)), l), {});
13
- return (!o || !t.find((l) => l == "id")) && (a.id = `${e}-${Date.now()}`), a;
1
+ var j = Object.defineProperty;
2
+ var O = (i, r, e) => r in i ? j(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
3
+ var f = (i, r, e) => O(i, typeof r != "symbol" ? r + "" : r, e);
4
+ import { ref as I, computed as B, defineComponent as x, createVNode as b, inject as P, onMounted as Z } from "vue";
5
+ import { isPlainObject as V, cloneDeep as L } from "lodash-es";
6
+ import { resolveAppearance as z } from "../dynamic-resolver/index.esm.js";
7
+ import { DgControl as D, useDesignerComponent as K } from "../designer-canvas/index.esm.js";
8
+ import { withInstall as J } from "../common/index.esm.js";
9
+ const X = {}, Y = {};
10
+ function N(i) {
11
+ const { properties: r, title: e, ignore: n } = i, o = n && Array.isArray(n), c = Object.keys(r).reduce((d, g) => ((!o || !n.find((m) => m == g)) && (d[g] = r[g].type === "object" && r[g].properties ? N(r[g]) : L(r[g].default)), d), {});
12
+ return e && (!o || !n.find((d) => d == "id")) && (c.id = `${e}-${Date.now()}`), c;
14
13
  }
15
- function G(r, n) {
16
- const e = V(n);
17
- return Object.keys(r).reduce((t, o) => (t[o] && E(t[o]) && E(r[o]) ? Object.assign(t[o], r[o]) : t[o] = r[o], t), e), e;
14
+ function $(i, r) {
15
+ const e = N(r);
16
+ return Object.keys(i).reduce((n, o) => (n[o] && V(n[o]) && V(i[o]) ? Object.assign(n[o], i[o]) : n[o] = i[o], n), e), e;
18
17
  }
19
- function Z(r, n) {
20
- return Object.keys(r).filter((t) => r[t] != null).reduce((t, o) => {
21
- if (n.has(o)) {
22
- const a = n.get(o);
23
- if (typeof a == "string")
24
- t[a] = r[o];
18
+ function _(i, r) {
19
+ return Object.keys(i).filter((n) => i[n] != null).reduce((n, o) => {
20
+ if (r.has(o)) {
21
+ const c = r.get(o);
22
+ if (typeof c == "string")
23
+ n[c] = i[o];
25
24
  else {
26
- const l = a(o, r[o], r);
27
- Object.assign(t, l);
25
+ const d = c(o, i[o], i);
26
+ Object.assign(n, d);
28
27
  }
29
28
  } else
30
- t[o] = r[o];
31
- return t;
29
+ n[o] = i[o];
30
+ return n;
32
31
  }, {});
33
32
  }
34
- function z(r, n, e = /* @__PURE__ */ new Map()) {
35
- const t = G(r, n);
36
- return Z(t, e);
33
+ function ee(i, r, e = /* @__PURE__ */ new Map()) {
34
+ const n = $(i, r);
35
+ return _(n, e);
37
36
  }
38
- function K(r = {}) {
39
- function n(i, d, s, g) {
40
- if (typeof s == "number")
41
- return g[i].length === s;
42
- if (typeof s == "object") {
43
- const A = Object.keys(s)[0], m = s[A];
44
- if (A === "not")
45
- return Number(g[i].length) !== Number(m);
46
- if (A === "moreThan")
47
- return Number(g[i].length) >= Number(m);
48
- if (A === "lessThan")
49
- return Number(g[i].length) <= Number(m);
37
+ function te(i = {}) {
38
+ function r(a, l, t, p) {
39
+ if (typeof t == "number")
40
+ return p[a].length === t;
41
+ if (typeof t == "object") {
42
+ const s = Object.keys(t)[0], u = t[s];
43
+ if (s === "not")
44
+ return Number(p[a].length) !== Number(u);
45
+ if (s === "moreThan")
46
+ return Number(p[a].length) >= Number(u);
47
+ if (s === "lessThan")
48
+ return Number(p[a].length) <= Number(u);
50
49
  }
51
50
  return !1;
52
51
  }
53
- function e(i, d, s, g) {
54
- return g[i] && g[i].propertyValue && String(g[i].propertyValue.value) === String(s);
52
+ function e(a, l, t, p) {
53
+ return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(t);
55
54
  }
56
- const t = /* @__PURE__ */ new Map([
57
- ["length", n],
55
+ const n = /* @__PURE__ */ new Map([
56
+ ["length", r],
58
57
  ["getProperty", e]
59
58
  ]);
60
- Object.keys(r).reduce((i, d) => (i.set(d, r[d]), i), t);
61
- function o(i, d) {
62
- const s = i;
63
- return typeof d == "number" ? [{ target: s, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!d }] : typeof d == "object" ? Object.keys(d).map((g) => {
64
- if (g === "length")
65
- return { target: s, operator: "length", param: null, value: d[g] };
66
- const A = g, m = d[g];
67
- return { target: s, operator: "getProperty", param: A, value: m };
59
+ Object.keys(i).reduce((a, l) => (a.set(l, i[l]), a), n);
60
+ function o(a, l) {
61
+ const t = a;
62
+ return typeof l == "number" ? [{ target: t, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: t, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((p) => {
63
+ if (p === "length")
64
+ return { target: t, operator: "length", param: null, value: l[p] };
65
+ const s = p, u = l[p];
66
+ return { target: t, operator: "getProperty", param: s, value: u };
68
67
  }) : [];
69
68
  }
70
- function a(i) {
71
- return Object.keys(i).reduce((s, g) => {
72
- const A = o(g, i[g]);
73
- return s.push(...A), s;
69
+ function c(a) {
70
+ return Object.keys(a).reduce((t, p) => {
71
+ const s = o(p, a[p]);
72
+ return t.push(...s), t;
74
73
  }, []);
75
74
  }
76
- function l(i, d) {
77
- if (t.has(i.operator)) {
78
- const s = t.get(i.operator);
79
- return s && s(i.target, i.param, i.value, d) || !1;
75
+ function d(a, l) {
76
+ if (n.has(a.operator)) {
77
+ const t = n.get(a.operator);
78
+ return t && t(a.target, a.param, a.value, l) || !1;
80
79
  }
81
80
  return !1;
82
81
  }
83
- function u(i, d) {
84
- return a(i).reduce((A, m) => A && l(m, d), !0);
82
+ function g(a, l) {
83
+ return c(a).reduce((s, u) => s && d(u, l), !0);
85
84
  }
86
- function p(i, d) {
87
- const s = Object.keys(i), g = s.includes("allOf"), A = s.includes("anyOf"), m = g || A, w = (m ? i[m ? g ? "allOf" : "anyOf" : "allOf"] : [i]).map((L) => u(L, d));
88
- return g ? !w.includes(!1) : w.includes(!0);
85
+ function m(a, l) {
86
+ const t = Object.keys(a), p = t.includes("allOf"), s = t.includes("anyOf"), u = p || s, v = (u ? a[u ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((k) => g(k, l));
87
+ return p ? !v.includes(!1) : v.includes(!0);
89
88
  }
90
- return { parseValueSchema: p };
89
+ return { parseValueSchema: m };
91
90
  }
92
- const c = {
91
+ const A = {
93
92
  button: { type: "button", name: "按钮", icon: "Button" },
94
93
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
95
94
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -128,20 +127,20 @@ const c = {
128
127
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
129
128
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
130
129
  fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
131
- }, J = {}, Y = {};
132
- K();
133
- function X(r, n, e = /* @__PURE__ */ new Map(), t = (l, u, p) => u, o = {}, a = (l) => l) {
134
- return O[n.title] = n, W[n.title] = t, J[n.title] = o, Y[n.title] = a, (l = {}) => {
135
- const u = z(l, n, e), p = Object.keys(r).reduce((i, d) => (i[d] = r[d].default, i), {});
136
- return Object.assign(p, u);
130
+ }, ne = {}, oe = {};
131
+ te();
132
+ function re(i, r, e = /* @__PURE__ */ new Map(), n = (d, g, m) => g, o = {}, c = (d) => d) {
133
+ return X[r.title] = r, Y[r.title] = n, ne[r.title] = o, oe[r.title] = c, (d = {}) => {
134
+ const g = ee(d, r, e), m = Object.keys(i).reduce((a, l) => (a[l] = i[l].default, a), {});
135
+ return Object.assign(m, g);
137
136
  };
138
137
  }
139
- function $(r, n, e) {
140
- return n;
138
+ function ie(i, r, e) {
139
+ return r;
141
140
  }
142
- const _ = /* @__PURE__ */ new Map([
143
- ["appearance", q]
144
- ]), ee = "https://json-schema.org/draft/2020-12/schema", te = "https://farris-design.gitee.io/avatar.schema.json", ne = "avatar", oe = "A Farris Component", re = "object", ie = {
141
+ const ae = /* @__PURE__ */ new Map([
142
+ ["appearance", z]
143
+ ]), se = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-design.gitee.io/avatar.schema.json", ce = "avatar", de = "A Farris Component", pe = "object", ue = {
145
144
  id: {
146
145
  description: "The unique identifier for avatar",
147
146
  type: "string"
@@ -203,23 +202,23 @@ const _ = /* @__PURE__ */ new Map([
203
202
  type: "boolean",
204
203
  default: !0
205
204
  }
206
- }, ae = [
205
+ }, Ae = [
207
206
  "id",
208
207
  "type"
209
- ], se = [
208
+ ], me = [
210
209
  "id",
211
210
  "appearance",
212
211
  "binding"
213
- ], le = {
214
- $schema: ee,
215
- $id: te,
216
- title: ne,
217
- description: oe,
218
- type: re,
219
- properties: ie,
220
- required: ae,
221
- ignore: se
222
- }, I = {
212
+ ], ge = {
213
+ $schema: se,
214
+ $id: le,
215
+ title: ce,
216
+ description: de,
217
+ type: pe,
218
+ properties: ue,
219
+ required: Ae,
220
+ ignore: me
221
+ }, w = {
223
222
  /**
224
223
  * 头像宽度
225
224
  */
@@ -256,152 +255,152 @@ const _ = /* @__PURE__ */ new Map([
256
255
  * 支持的头像类型
257
256
  */
258
257
  imageType: { type: Array, default: ["jpeg"] }
259
- }, S = X(I, le, _, $);
260
- function R(r, n, e, t) {
261
- const o = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEh/9oADAMBAAIRAxEAPwD9BBYqCiyAGhougIqyGgEhIui6AyuixdATQ0WQA0BdA4houhoCaGgugMrouhoCaJoum80BNDRdDQG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xex9zquXex9yjgO/Vcu9j7nVc+9j7lHAd+q597H3Oq597H3BwHfqufex9zqufex9yjgO/Vc+9j7nVc+9j7lHAd+q597H3Oq597H3KOA79Vz72PudVz72PuUcB36rl3sfc6rn3sfco4DvejZd7H3OrZd7H3KOA79Wy72PudWz72PuDg7dG/y3/W/Q6tl3sfdvY7K7PO25S6yzSdoOqWlEBmhaBamt+6J6AnmqaqDQy0CxYyoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z", a = v(r.readonly);
262
- function l(A) {
263
- return A.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
258
+ }, U = re(w, ge, ae, ie);
259
+ function H(i, r, e, n) {
260
+ const o = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAA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hfvcVNfL3A1WMqDSxmVQVNr/iz4/pv7LDOXLDLGcbNPDeDxTh6DtOjZaafFju816tlf+2Puo4Dv1bPvY+51bLvY+5RwHfq2Xex9zquXex9yjgO/Vcu9j7nVc+9j7lHAd+q597H3Oq597H3BwHfqufex9zqufex9yjgO/Vc+9j7nVc+9j7lHAd+q597H3Oq597H3KOA79Vz72PudVz72PuUcB36rl3sfc6rn3sfco4DvejZd7H3OrZd7H3KOA79Wy72PudWz72PuDg7dG/y3/W/Q6tl3sfdvY7K7PO25S6yzSdoOqWlEBmhaBamt+6J6AnmqaqDQy0CxYyoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z", c = I(i.readonly);
261
+ function d(s) {
262
+ return s.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
264
263
  }
265
- function u(A) {
266
- return A.indexOf("data:image/") > -1;
264
+ function g(s) {
265
+ return s.indexOf("data:image/") > -1;
267
266
  }
268
- function p(A) {
269
- return A ? "data:image/jpeg;base64," + A : "";
267
+ function m(s) {
268
+ return s ? "data:image/jpeg;base64," + s : "";
270
269
  }
271
- const i = C(() => {
272
- var m;
273
- if (!r.imageType || !r.imageType.length)
270
+ const a = B(() => {
271
+ var u;
272
+ if (!i.imageType || !i.imageType.length)
274
273
  return "";
275
- const A = (m = r.imageType) == null ? void 0 : m.map((h) => (h === "jpg" && (h = "jpeg"), `image/${h}`));
276
- return !A || !A.length ? "image/*" : A.join(",");
277
- }), d = C(() => {
278
- const A = t.value || r.cover || o;
279
- return l(A) || u(A) ? A : p(A);
280
- }), s = C(() => a.value ? "" : r.title);
281
- function g() {
282
- a.value || e && e.value && e.value.click();
283
- }
284
- return { acceptTypes: i, imageSource: d, imageTitle: s, onClickImage: g };
274
+ const s = (u = i.imageType) == null ? void 0 : u.map((y) => (y === "jpg" && (y = "jpeg"), `image/${y}`));
275
+ return !s || !s.length ? "image/*" : s.join(",");
276
+ }), l = B(() => {
277
+ const s = n.value || i.cover || o;
278
+ return d(s) || g(s) ? s : m(s);
279
+ }), t = B(() => c.value ? "" : i.title);
280
+ function p() {
281
+ c.value || e && e.value && e.value.click();
282
+ }
283
+ return { acceptTypes: a, imageSource: l, imageTitle: t, onClickImage: p };
285
284
  }
286
- const B = /* @__PURE__ */ M({
285
+ const F = /* @__PURE__ */ x({
287
286
  name: "FAvatar",
288
- props: I,
287
+ props: w,
289
288
  emits: ["change", "update:modelValue"],
290
- setup(r, n) {
291
- const e = C(() => ({
289
+ setup(i, r) {
290
+ const e = B(() => ({
292
291
  "f-avatar": !0,
293
- "f-avatar-readonly": r.readonly,
294
- "f-avatar-circle": r.shape === "circle",
295
- "f-avatar-square": r.shape === "square"
296
- })), t = v(r.modelValue), o = C(() => ({
297
- width: r.avatarWidth + "px",
298
- height: r.avatarHeight + "px"
299
- })), a = !1;
300
- function l() {
292
+ "f-avatar-readonly": i.readonly,
293
+ "f-avatar-circle": i.shape === "circle",
294
+ "f-avatar-square": i.shape === "square"
295
+ })), n = I(i.modelValue), o = B(() => ({
296
+ width: i.avatarWidth + "px",
297
+ height: i.avatarHeight + "px"
298
+ })), c = !1;
299
+ function d() {
301
300
  return "";
302
301
  }
303
- function u() {
302
+ function g() {
304
303
  }
305
- const p = v(null), {
306
- acceptTypes: i,
307
- imageSource: d,
308
- onClickImage: s
309
- } = R(r, n, p, t);
310
- return () => f("div", {
304
+ const m = I(null), {
305
+ acceptTypes: a,
306
+ imageSource: l,
307
+ onClickImage: t
308
+ } = H(i, r, m, n);
309
+ return () => b("div", {
311
310
  class: e.value,
312
311
  style: o.value,
313
- onClick: s
314
- }, [a, f("img", {
315
- title: r.title,
312
+ onClick: t
313
+ }, [c, b("img", {
314
+ title: i.title,
316
315
  class: "f-avatar-image",
317
- src: d.value,
318
- onError: l
319
- }, null), !r.readonly && f("div", {
316
+ src: l.value,
317
+ onError: d
318
+ }, null), !i.readonly && b("div", {
320
319
  class: "f-avatar-icon"
321
- }, [f("span", {
320
+ }, [b("span", {
322
321
  class: "f-icon f-icon-camera"
323
- }, null)]), f("input", {
322
+ }, null)]), b("input", {
324
323
  ref: "file",
325
324
  name: "file-input",
326
325
  type: "file",
327
326
  class: "f-avatar-upload",
328
- accept: i.value,
329
- onChange: u,
327
+ accept: a.value,
328
+ onChange: g,
330
329
  style: "display: none;"
331
330
  }, null)]);
332
331
  }
333
332
  });
334
- function ce(r, n) {
335
- r.schema;
336
- const e = v(!0), t = v(!0);
337
- function o(s) {
333
+ function ye(i, r) {
334
+ i.schema;
335
+ const e = I(!0), n = I(!0);
336
+ function o(t) {
338
337
  return !1;
339
338
  }
340
- function a() {
339
+ function c() {
341
340
  return !1;
342
341
  }
343
- function l() {
342
+ function d() {
344
343
  return !1;
345
344
  }
346
- function u() {
345
+ function g() {
347
346
  return !0;
348
347
  }
349
- function p(s) {
348
+ function m(t) {
350
349
  }
351
- function i() {
350
+ function a() {
352
351
  }
353
- function d(s) {
352
+ function l(t) {
354
353
  return null;
355
354
  }
356
355
  return {
357
356
  canAccepts: o,
358
- checkCanDeleteComponent: a,
359
- checkCanMoveComponent: l,
360
- hideNestedPaddingInDesginerView: u,
361
- onAcceptMovedChildElement: p,
362
- resolveComponentContext: i,
357
+ checkCanDeleteComponent: c,
358
+ checkCanMoveComponent: d,
359
+ hideNestedPaddingInDesginerView: g,
360
+ onAcceptMovedChildElement: m,
361
+ resolveComponentContext: a,
363
362
  triggerBelongedComponentToMoveWhenMoved: e,
364
- triggerBelongedComponentToDeleteWhenDeleted: t,
365
- getPropsConfig: d
363
+ triggerBelongedComponentToDeleteWhenDeleted: n,
364
+ getPropsConfig: l
366
365
  };
367
366
  }
368
- class pe {
369
- constructor(n, e) {
370
- y(this, "componentId");
371
- y(this, "viewModelId");
372
- y(this, "eventsEditorUtils");
373
- y(this, "formSchemaUtils");
374
- y(this, "formMetadataConverter");
375
- y(this, "designViewModelUtils");
376
- y(this, "designViewModelField");
377
- y(this, "controlCreatorUtils");
378
- y(this, "designerHostService");
379
- y(this, "schemaService", null);
380
- y(this, "metadataService", null);
381
- y(this, "propertyConfig", {
367
+ class fe {
368
+ constructor(r, e) {
369
+ f(this, "componentId");
370
+ f(this, "viewModelId");
371
+ f(this, "eventsEditorUtils");
372
+ f(this, "formSchemaUtils");
373
+ f(this, "formMetadataConverter");
374
+ f(this, "designViewModelUtils");
375
+ f(this, "designViewModelField");
376
+ f(this, "controlCreatorUtils");
377
+ f(this, "designerHostService");
378
+ f(this, "schemaService", null);
379
+ f(this, "metadataService", null);
380
+ f(this, "propertyConfig", {
382
381
  type: "object",
383
382
  categories: {}
384
383
  });
385
- var t;
386
- this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((t = this.formSchemaUtils) == null ? void 0 : t.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
384
+ var n;
385
+ this.componentId = r, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(r)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
387
386
  }
388
387
  getTableInfo() {
389
- var n;
390
- return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
388
+ var r;
389
+ return (r = this.schemaService) == null ? void 0 : r.getTableInfoByViewModelId(this.viewModelId);
391
390
  }
392
- setDesignViewModelField(n) {
393
- const e = n.binding && n.binding.type === "Form" && n.binding.field;
391
+ setDesignViewModelField(r) {
392
+ const e = r.binding && r.binding.type === "Form" && r.binding.field;
394
393
  if (e) {
395
394
  if (!this.designViewModelField) {
396
- const t = this.designViewModelUtils.getDgViewModel(this.viewModelId);
397
- this.designViewModelField = t.fields.find((o) => o.id === e);
395
+ const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
396
+ this.designViewModelField = n.fields.find((o) => o.id === e);
398
397
  }
399
- n.updateOn = this.designViewModelField.updateOn;
398
+ r.updateOn = this.designViewModelField.updateOn;
400
399
  }
401
400
  }
402
- changeFieldEditorType(n, e) {
401
+ changeFieldEditorType(r, e) {
403
402
  }
404
- getBasicPropConfig(n) {
403
+ getBasicPropConfig(r) {
405
404
  return {
406
405
  description: "Basic Information",
407
406
  title: "基本信息",
@@ -420,13 +419,13 @@ class pe {
420
419
  type: "combo-list",
421
420
  textField: "name",
422
421
  valueField: "value",
423
- data: [{ value: n.type, name: c[n.type].name }]
422
+ data: [{ value: r.type, name: A[r.type].name }]
424
423
  }
425
424
  }
426
425
  }
427
426
  };
428
427
  }
429
- getAppearanceConfig(n = null) {
428
+ getAppearanceConfig(r = null) {
430
429
  return {
431
430
  title: "样式",
432
431
  description: "Appearance",
@@ -452,99 +451,206 @@ class pe {
452
451
  * @param componentInstance
453
452
  * @returns
454
453
  */
455
- updateElementByParentContainer(n, e) {
456
- const t = e && e.parent && e.parent.schema;
457
- if (!t)
454
+ updateElementByParentContainer(r, e) {
455
+ const n = e && e.parent && e.parent.schema;
456
+ if (!n)
458
457
  return;
459
- const o = t.contents.findIndex((l) => l.id === n), a = P(t.contents[o]);
460
- t.contents.splice(o, 1), t.contents.splice(o, 0, a);
458
+ const o = n.contents.findIndex((d) => d.id === r), c = L(n.contents[o]);
459
+ n.contents.splice(o, 1), n.contents.splice(o, 0, c);
461
460
  }
462
461
  }
463
- const b = class b {
462
+ const M = class M {
464
463
  /**
465
464
  * 根据绑定字段类型获取可用的输入类控件
466
465
  */
467
- static getEditorTypesByMDataType(n) {
468
- const e = b.fieldControlTypeMapping[n];
466
+ static getEditorTypesByMDataType(r) {
467
+ const e = M.fieldControlTypeMapping[r];
469
468
  return e || [{ key: "", value: "" }];
470
469
  }
471
470
  /**
472
471
  * 获取所有输入类控件
473
472
  */
474
473
  static getAllInputTypes() {
475
- const n = [];
476
- for (let e in b.fieldControlTypeMapping)
477
- b.fieldControlTypeMapping[e].forEach((t) => {
478
- n.find((o) => o.key === t.key && o.value === t.value) || n.push({ key: t.key, value: t.value });
474
+ const r = [];
475
+ for (let e in M.fieldControlTypeMapping)
476
+ M.fieldControlTypeMapping[e].forEach((n) => {
477
+ r.find((o) => o.key === n.key && o.value === n.value) || r.push({ key: n.key, value: n.value });
479
478
  });
480
- return n;
479
+ return r;
481
480
  }
482
481
  };
483
482
  /**
484
483
  * <字段类型,可配置的控件类型列表>的映射
485
484
  */
486
- y(b, "fieldControlTypeMapping", {
485
+ f(M, "fieldControlTypeMapping", {
487
486
  String: [
488
- { key: c["input-group"].type, value: c["input-group"].name },
489
- { key: c.lookup.type, value: c.lookup.name },
490
- { key: c["date-picker"].type, value: c["date-picker"].name },
491
- { key: c["check-box"].type, value: c["check-box"].name },
492
- { key: c["radio-group"].type, value: c["radio-group"].name },
493
- { key: c["combo-list"].type, value: c["combo-list"].name },
494
- { key: c.textarea.type, value: c.textarea.name }
487
+ { key: A["input-group"].type, value: A["input-group"].name },
488
+ { key: A.lookup.type, value: A.lookup.name },
489
+ { key: A["date-picker"].type, value: A["date-picker"].name },
490
+ { key: A["check-box"].type, value: A["check-box"].name },
491
+ { key: A["check-group"].type, value: A["check-group"].name },
492
+ { key: A["radio-group"].type, value: A["radio-group"].name },
493
+ { key: A["combo-list"].type, value: A["combo-list"].name },
494
+ { key: A.textarea.type, value: A.textarea.name }
495
495
  ],
496
496
  Text: [
497
- { key: c.textarea.type, value: c.textarea.name },
498
- { key: c.lookup.type, value: c.lookup.name }
497
+ { key: A.textarea.type, value: A.textarea.name },
498
+ { key: A.lookup.type, value: A.lookup.name }
499
499
  ],
500
500
  Decimal: [
501
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
501
+ { key: A["number-spinner"].type, value: A["number-spinner"].name }
502
502
  ],
503
503
  Integer: [
504
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
504
+ { key: A["number-spinner"].type, value: A["number-spinner"].name }
505
505
  ],
506
506
  Number: [
507
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
507
+ { key: A["number-spinner"].type, value: A["number-spinner"].name }
508
508
  ],
509
509
  BigNumber: [
510
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
510
+ { key: A["number-spinner"].type, value: A["number-spinner"].name }
511
511
  ],
512
512
  Date: [
513
- { key: c["date-picker"].type, value: c["date-picker"].name }
513
+ { key: A["date-picker"].type, value: A["date-picker"].name }
514
514
  ],
515
515
  DateTime: [
516
- { key: c["date-picker"].type, value: c["date-picker"].name }
516
+ { key: A["date-picker"].type, value: A["date-picker"].name }
517
517
  ],
518
518
  Boolean: [
519
- { key: c.switch.type, value: c.switch.name },
520
- { key: c["check-box"].type, value: c["check-box"].name }
519
+ { key: A.switch.type, value: A.switch.name },
520
+ { key: A["check-box"].type, value: A["check-box"].name }
521
521
  ],
522
522
  Enum: [
523
- { key: c["combo-list"].type, value: c["combo-list"].name },
524
- { key: c["radio-group"].type, value: c["radio-group"].name }
523
+ { key: A["combo-list"].type, value: A["combo-list"].name },
524
+ { key: A["radio-group"].type, value: A["radio-group"].name }
525
525
  ],
526
526
  Object: [
527
- { key: c.lookup.type, value: c.lookup.name },
528
- { key: c["combo-list"].type, value: c["combo-list"].name },
529
- { key: c["radio-group"].type, value: c["radio-group"].name }
527
+ { key: A.lookup.type, value: A.lookup.name },
528
+ { key: A["combo-list"].type, value: A["combo-list"].name },
529
+ { key: A["radio-group"].type, value: A["radio-group"].name }
530
530
  ]
531
531
  });
532
- let k = b;
533
- const de = v(0);
534
- class ue extends pe {
535
- constructor(e, t) {
536
- super(e, t);
537
- y(this, "responseLayoutEditorFunction");
538
- this.responseLayoutEditorFunction = Q(this.formSchemaUtils);
539
- }
540
- getPropertyConfig(e, t) {
541
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, t), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
542
- }
543
- getBasicProperties(e, t) {
544
- var u;
532
+ let S = M;
533
+ const he = I(0);
534
+ class ve {
535
+ constructor() {
536
+ /** 控件标题 */
537
+ f(this, "label", "");
538
+ /** 控件id */
539
+ f(this, "id", "");
540
+ /** 每个控件占用的栅格数 */
541
+ f(this, "columnInSM", 12);
542
+ f(this, "columnInMD", 6);
543
+ f(this, "columnInLG", 3);
544
+ f(this, "columnInEL", 2);
545
+ /** 每个控件占用的列数 */
546
+ f(this, "displayWidthInSM", 1);
547
+ f(this, "displayWidthInMD", 1);
548
+ f(this, "displayWidthInLG", 1);
549
+ f(this, "displayWidthInEL", 1);
550
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
551
+ f(this, "displayColumnCountAtBreakPoint", "md");
552
+ /** 控件所在行,传0即可-----编辑器内部使用 */
553
+ f(this, "tagRow", 0);
554
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
555
+ f(this, "showTopBorder", 0);
556
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
557
+ f(this, "group", 1);
558
+ /** 控件是否符合标准的class配置(设计器用的) */
559
+ f(this, "isSupportedClass", !0);
560
+ /** 控件所在分组id(设计器用的) */
561
+ f(this, "fieldSetId", "");
562
+ }
563
+ }
564
+ function Ce(i) {
565
+ let r, e;
566
+ const n = /* @__PURE__ */ new Map();
567
+ let o = [];
568
+ function c(l, t) {
569
+ const s = l.split(" ").filter((C) => C.startsWith("col-"));
570
+ if (s.length === 0) {
571
+ t.isSupportedClass = !1;
572
+ return;
573
+ }
574
+ let u = s.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), y = s.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), h = s.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), v = s.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
575
+ u = u || "col-12", t.columnInSM = parseInt(u.replace("col-", ""), 10), t.displayWidthInSM = t.columnInSM / 12, t.displayWidthInSM !== 1 && (t.isSupportedClass = !1), y = y || "col-md-" + t.columnInSM, t.columnInMD = parseInt(y.replace("col-md-", ""), 10), t.displayWidthInMD = t.columnInMD / 6, [1, 2].includes(t.displayWidthInMD) || (t.isSupportedClass = !1), h = h || "col-xl-" + t.columnInMD, t.columnInLG = parseInt(h.replace("col-xl-", ""), 10), t.displayWidthInLG = t.columnInLG / 3, [1, 2, 3, 4].includes(t.displayWidthInLG) || (t.isSupportedClass = !1), v = v || "col-el-" + t.columnInLG, t.columnInEL = parseInt(v.replace("col-el-", ""), 10), t.displayWidthInEL = t.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(t.displayWidthInEL) || (t.isSupportedClass = !1);
576
+ }
577
+ function d(l, t, p, s = !1) {
578
+ let u = !1;
579
+ l.contents.forEach((y) => {
580
+ if (y.type === "fieldset") {
581
+ p += 1, d(y, t, p, !0), u = !0;
582
+ return;
583
+ }
584
+ u && (p += 1, u = !1);
585
+ const h = y.appearance && y.appearance.class, v = new ve();
586
+ h ? c(h, v) : v.isSupportedClass = !1, v.label = y.label || y.id, v.id = y.id, v.group = p, s && (v.fieldSetId = l.id), e === y.id && (r = p), n.set(y.id, y), t.push(v);
587
+ });
588
+ }
589
+ function g(l) {
590
+ const t = i.getComponentById(l);
591
+ if (!t || !t.componentType || !t.componentType.startsWith("form"))
592
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
593
+ const p = i.selectNode(t, (s) => s.type === D["response-form"].type);
594
+ return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
595
+ }
596
+ function m(l, t) {
597
+ t = t || l.id;
598
+ const { result: p, message: s, formNode: u } = g(t);
599
+ if (!p)
600
+ return { result: p, message: s };
601
+ e = l.id, o = [], n.clear();
602
+ const y = u.contents[0].type === D.fieldset.type ? 0 : 1;
603
+ d(u, o, y);
604
+ const h = o.find((C) => !C.isSupportedClass);
605
+ return {
606
+ defaultState: {
607
+ defaultGroupNumber: r || 1,
608
+ model: h ? "customize" : "standard"
609
+ },
610
+ importData: o
611
+ };
612
+ }
613
+ function a(l, t) {
614
+ t = t;
615
+ const { result: p, formNode: s } = g(t);
616
+ if (!p)
617
+ return "";
618
+ const u = [];
619
+ return l.forEach((y) => {
620
+ var C;
621
+ const h = n.get(y.id), v = h.appearance && h.appearance.class;
622
+ if (v) {
623
+ const T = v.split(" ").filter((Q) => !Q.startsWith("col-")), E = "col-" + y.columnInSM, q = "col-md-" + y.columnInMD, W = "col-xl-" + y.columnInLG, R = "col-el-" + y.columnInEL, G = [E, q, W, R].concat(T);
624
+ h.appearance.class = G.join(" ");
625
+ }
626
+ if (y.fieldSetId) {
627
+ const k = s.contents.find((E) => E.id === y.fieldSetId), T = u.find((E) => E.id === y.fieldSetId);
628
+ T ? (C = T.contents) == null || C.push(h) : (u.push(k), k.contents = [h]);
629
+ } else
630
+ u.push(h);
631
+ }), s.contents = u, s.id;
632
+ }
633
+ return {
634
+ checkCanFindFormNode: g,
635
+ checkCanOpenLayoutEditor: m,
636
+ changeFormControlsByResponseLayoutConfig: a,
637
+ getResonseFormLayoutConfig: d
638
+ };
639
+ }
640
+ class be extends fe {
641
+ constructor(e, n) {
642
+ super(e, n);
643
+ f(this, "responseLayoutEditorFunction");
644
+ this.responseLayoutEditorFunction = Ce(this.formSchemaUtils);
645
+ }
646
+ getPropertyConfig(e, n) {
647
+ return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, n), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
648
+ }
649
+ getBasicProperties(e, n) {
650
+ var g;
545
651
  var o = this;
546
652
  this.setDesignViewModelField(e);
547
- const a = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
653
+ const c = this.formSchemaUtils.getFormMetadataBasicInfo(), d = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
548
654
  return {
549
655
  description: "Basic Information",
550
656
  title: "基本信息",
@@ -566,7 +672,7 @@ class ue extends pe {
566
672
  textField: "value",
567
673
  valueField: "key",
568
674
  editable: !1,
569
- data: o.designViewModelField ? k.getEditorTypesByMDataType((u = o.designViewModelField.type) == null ? void 0 : u.name) : k.getAllInputTypes()
675
+ data: o.designViewModelField ? S.getEditorTypesByMDataType((g = o.designViewModelField.type) == null ? void 0 : g.name) : S.getAllInputTypes()
570
676
  }
571
677
  },
572
678
  label: {
@@ -583,7 +689,7 @@ class ue extends pe {
583
689
  bindingType: { enable: !1 },
584
690
  editorParams: {
585
691
  propertyData: e,
586
- formBasicInfo: a
692
+ formBasicInfo: c
587
693
  },
588
694
  columns: [
589
695
  { field: "name", title: "字段名称" },
@@ -591,26 +697,26 @@ class ue extends pe {
591
697
  { field: "fieldType", title: "字段类型" }
592
698
  ],
593
699
  textField: "bindingField",
594
- data: l
700
+ data: d
595
701
  }
596
702
  }
597
703
  },
598
- setPropertyRelates(p, i) {
599
- if (p)
600
- switch (p && p.propertyID) {
704
+ setPropertyRelates(m, a) {
705
+ if (m)
706
+ switch (m && m.propertyID) {
601
707
  case "type": {
602
- o.changeControlType(e, p, t);
708
+ o.changeControlType(e, m, n);
603
709
  break;
604
710
  }
605
711
  case "label": {
606
- p.needRefreshControlTree = !0;
712
+ m.needRefreshControlTree = !0;
607
713
  break;
608
714
  }
609
715
  }
610
716
  }
611
717
  };
612
718
  }
613
- getAppearanceProperties(e, t) {
719
+ getAppearanceProperties(e, n) {
614
720
  var o = this;
615
721
  return {
616
722
  title: "样式",
@@ -641,14 +747,14 @@ class ue extends pe {
641
747
  }
642
748
  }
643
749
  },
644
- setPropertyRelates(a, l) {
645
- if (a)
646
- switch (a && a.propertyID) {
750
+ setPropertyRelates(c, d) {
751
+ if (c)
752
+ switch (c && c.propertyID) {
647
753
  case "responseLayout":
648
- o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, o.componentId || e.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(e.id, t), delete e.responseLayout;
754
+ o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(c.propertyValue, o.componentId || e.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(e.id, n), delete e.responseLayout;
649
755
  break;
650
756
  case "class":
651
- o.updateUnifiedLayoutAfterControlChanged(a.propertyValue, e.id, this.componentId), o.updateElementByParentContainer(e.id, t);
757
+ o.updateUnifiedLayoutAfterControlChanged(c.propertyValue, e.id, this.componentId), o.updateElementByParentContainer(e.id, n);
652
758
  break;
653
759
  }
654
760
  }
@@ -662,44 +768,44 @@ class ue extends pe {
662
768
  * @param propertyData 控件DOM属性
663
769
  * @param newControlType 新控件类型
664
770
  */
665
- changeControlType(e, t, o) {
666
- var d, s, g, A;
667
- const a = t.propertyValue, l = o && o.parent && o.parent.schema;
668
- if (!l)
771
+ changeControlType(e, n, o) {
772
+ var l, t, p, s;
773
+ const c = n.propertyValue, d = o && o.parent && o.parent.schema;
774
+ if (!d)
669
775
  return;
670
- const u = l.contents.findIndex((m) => m.id === e.id), p = l.contents[u];
671
- let i;
776
+ const g = d.contents.findIndex((u) => u.id === e.id), m = d.contents[g];
777
+ let a;
672
778
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
673
779
  editor: {
674
- $type: a
780
+ $type: c
675
781
  },
676
782
  name: this.designViewModelField.name,
677
783
  require: this.designViewModelField.require,
678
784
  readonly: this.designViewModelField.readonly
679
- }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), i || (i = F("form-group") || {}, i.editor = F(a) || {}, delete i.editor.id, delete i.editor.binding, delete i.editor.appearance), Object.assign(i, {
680
- id: p.id,
681
- appearance: p.appearance,
682
- size: p.size,
683
- label: p.label,
684
- binding: p.binding,
685
- visible: p.visible
686
- }), Object.assign(i.editor, {
687
- isTextArea: i.isTextArea && p.isTextArea,
688
- placeholder: (d = p.editor) == null ? void 0 : d.placeholder,
689
- holdPlace: (s = p.editor) == null ? void 0 : s.holdPlace,
690
- readonly: (g = p.editor) == null ? void 0 : g.readonly,
691
- require: (A = p.editor) == null ? void 0 : A.require
692
- }), l.contents.splice(u, 1), l.contents.splice(u, 0, i), o.schema = Object.assign(p, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
693
- (m) => m.classList.remove("dgComponentSelected")
694
- ), de.value++;
695
- }
696
- getComponentConfig(e, t = {}, o = {}) {
697
- const a = Object.assign({
785
+ }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, c)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(c)), Object.assign(a, {
786
+ id: m.id,
787
+ appearance: m.appearance,
788
+ size: m.size,
789
+ label: m.label,
790
+ binding: m.binding,
791
+ visible: m.visible
792
+ }), Object.assign(a.editor, {
793
+ isTextArea: a.isTextArea && m.isTextArea,
794
+ placeholder: (l = m.editor) == null ? void 0 : l.placeholder,
795
+ holdPlace: (t = m.editor) == null ? void 0 : t.holdPlace,
796
+ readonly: (p = m.editor) == null ? void 0 : p.readonly,
797
+ require: (s = m.editor) == null ? void 0 : s.require
798
+ }), d.contents.splice(g, 1), d.contents.splice(g, 0, a), o.schema = Object.assign(m, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
799
+ (u) => u.classList.remove("dgComponentSelected")
800
+ ), he.value++;
801
+ }
802
+ getComponentConfig(e, n = {}, o = {}) {
803
+ const c = Object.assign({
698
804
  description: "编辑器",
699
805
  title: "编辑器",
700
806
  type: "input-group",
701
807
  $converter: "/converter/property-editor.converter"
702
- }, t), l = Object.assign({
808
+ }, n), d = Object.assign({
703
809
  readonly: {
704
810
  description: "",
705
811
  title: "只读",
@@ -721,7 +827,7 @@ class ue extends pe {
721
827
  type: "string"
722
828
  }
723
829
  }, o);
724
- return { ...a, properties: { ...l } };
830
+ return { ...c, properties: { ...d } };
725
831
  }
726
832
  /**
727
833
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -729,54 +835,54 @@ class ue extends pe {
729
835
  * @param controlId 控件Id
730
836
  * @param componentId 控件所在组件id
731
837
  */
732
- updateUnifiedLayoutAfterControlChanged(e, t, o) {
733
- const a = e.split(" ");
734
- let l = a.find((s) => /^col-([1-9]|10|11|12)$/.test(s)), u = a.find((s) => /^col-md-([1-9]|10|11|12)$/.test(s)), p = a.find((s) => /^col-xl-([1-9]|10|11|12)$/.test(s)), i = a.find((s) => /^col-el-([1-9]|10|11|12)$/.test(s));
735
- l = l || "col-12", u = u || "col-md-" + l.replace("col-", ""), p = p || "col-xl-" + u.replace("col-md-", ""), i = i || "col-el-" + p.replace("col-xl-", "");
736
- const d = {
737
- id: t,
738
- columnInSM: parseInt(l.replace("col-", ""), 10),
739
- columnInMD: parseInt(u.replace("col-md-", ""), 10),
740
- columnInLG: parseInt(p.replace("col-xl-", ""), 10),
741
- columnInEL: parseInt(i.replace("col-el-", ""), 10)
838
+ updateUnifiedLayoutAfterControlChanged(e, n, o) {
839
+ const c = e.split(" ");
840
+ let d = c.find((t) => /^col-([1-9]|10|11|12)$/.test(t)), g = c.find((t) => /^col-md-([1-9]|10|11|12)$/.test(t)), m = c.find((t) => /^col-xl-([1-9]|10|11|12)$/.test(t)), a = c.find((t) => /^col-el-([1-9]|10|11|12)$/.test(t));
841
+ d = d || "col-12", g = g || "col-md-" + d.replace("col-", ""), m = m || "col-xl-" + g.replace("col-md-", ""), a = a || "col-el-" + m.replace("col-xl-", "");
842
+ const l = {
843
+ id: n,
844
+ columnInSM: parseInt(d.replace("col-", ""), 10),
845
+ columnInMD: parseInt(g.replace("col-md-", ""), 10),
846
+ columnInLG: parseInt(m.replace("col-xl-", ""), 10),
847
+ columnInEL: parseInt(a.replace("col-el-", ""), 10)
742
848
  };
743
- this.updateUnifiedLayoutAfterResponseLayoutChanged(o, d);
849
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(o, l);
744
850
  }
745
851
  /**
746
852
  * 修改控件布局配置后更新Form统一布局配置
747
853
  * @param componentId 组件Id
748
854
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
749
855
  */
750
- updateUnifiedLayoutAfterResponseLayoutChanged(e, t) {
856
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, n) {
751
857
  const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
752
858
  if (!o || !o.unifiedLayout)
753
859
  return;
754
- const a = [];
755
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, a, 1), t) {
756
- const m = a.find((h) => h.id === t.id);
757
- Object.assign(m || {}, t);
860
+ const c = [];
861
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, c, 1), n) {
862
+ const u = c.find((y) => y.id === n.id);
863
+ Object.assign(u || {}, n);
758
864
  }
759
- const l = a.map((m) => m.columnInSM), u = a.map((m) => m.columnInMD), p = a.map((m) => m.columnInLG), i = a.map((m) => m.columnInEL), d = this.checkIsUniqueColumn(l) ? l[0] : null, s = this.checkIsUniqueColumn(u) ? u[0] : null, g = this.checkIsUniqueColumn(p) ? p[0] : null, A = this.checkIsUniqueColumn(i) ? i[0] : null;
865
+ const d = c.map((u) => u.columnInSM), g = c.map((u) => u.columnInMD), m = c.map((u) => u.columnInLG), a = c.map((u) => u.columnInEL), l = this.checkIsUniqueColumn(d) ? d[0] : null, t = this.checkIsUniqueColumn(g) ? g[0] : null, p = this.checkIsUniqueColumn(m) ? m[0] : null, s = this.checkIsUniqueColumn(a) ? a[0] : null;
760
866
  Object.assign(o.unifiedLayout, {
761
- uniqueColClassInSM: d,
762
- uniqueColClassInMD: s,
763
- uniqueColClassInLG: g,
764
- uniqueColClassInEL: A
867
+ uniqueColClassInSM: l,
868
+ uniqueColClassInMD: t,
869
+ uniqueColClassInLG: p,
870
+ uniqueColClassInEL: s
765
871
  });
766
872
  }
767
873
  /**
768
874
  * 校验宽度样式值是否一致
769
875
  */
770
876
  checkIsUniqueColumn(e) {
771
- const t = new Set(e);
772
- return Array.from(t).length === 1;
877
+ const n = new Set(e);
878
+ return Array.from(n).length === 1;
773
879
  }
774
880
  }
775
- class Ae extends ue {
776
- constructor(n, e) {
777
- super(n, e);
881
+ class Ie extends be {
882
+ constructor(r, e) {
883
+ super(r, e);
778
884
  }
779
- getEditorProperties(n) {
885
+ getEditorProperties(r) {
780
886
  return {
781
887
  description: "编辑器",
782
888
  title: "编辑器",
@@ -807,95 +913,95 @@ class Ae extends ue {
807
913
  };
808
914
  }
809
915
  }
810
- function ge(r, n) {
916
+ function Be(i, r) {
811
917
  const {
812
918
  canAccepts: e,
813
- checkCanDeleteComponent: t,
919
+ checkCanDeleteComponent: n,
814
920
  checkCanMoveComponent: o,
815
- hideNestedPaddingInDesginerView: a,
816
- onAcceptMovedChildElement: l,
817
- resolveComponentContext: u,
818
- triggerBelongedComponentToMoveWhenMoved: p,
819
- triggerBelongedComponentToDeleteWhenDeleted: i
820
- } = ce(r), d = r.schema;
821
- function s(g, A) {
822
- return new Ae(g, n).getPropertyConfig(d, A);
921
+ hideNestedPaddingInDesginerView: c,
922
+ onAcceptMovedChildElement: d,
923
+ resolveComponentContext: g,
924
+ triggerBelongedComponentToMoveWhenMoved: m,
925
+ triggerBelongedComponentToDeleteWhenDeleted: a
926
+ } = ye(i), l = i.schema;
927
+ function t(p, s) {
928
+ return new Ie(p, r).getPropertyConfig(l, s);
823
929
  }
824
930
  return {
825
931
  canAccepts: e,
826
- checkCanDeleteComponent: t,
932
+ checkCanDeleteComponent: n,
827
933
  checkCanMoveComponent: o,
828
- hideNestedPaddingInDesginerView: a,
829
- onAcceptMovedChildElement: l,
830
- resolveComponentContext: u,
831
- triggerBelongedComponentToMoveWhenMoved: p,
832
- triggerBelongedComponentToDeleteWhenDeleted: i,
833
- getPropsConfig: s
934
+ hideNestedPaddingInDesginerView: c,
935
+ onAcceptMovedChildElement: d,
936
+ resolveComponentContext: g,
937
+ triggerBelongedComponentToMoveWhenMoved: m,
938
+ triggerBelongedComponentToDeleteWhenDeleted: a,
939
+ getPropsConfig: t
834
940
  };
835
941
  }
836
- const me = /* @__PURE__ */ M({
942
+ const Me = /* @__PURE__ */ x({
837
943
  name: "FAvatarDesign",
838
- props: I,
944
+ props: w,
839
945
  emits: ["change", "update:modelValue"],
840
- setup(r, n) {
841
- const e = v(), t = x("designer-host-service"), o = x("design-item-context"), a = ge(o, t), l = N(e, o, a);
842
- U(() => {
843
- e.value.componentInstance = l;
844
- }), n.expose(l.value);
845
- const u = C(() => ({
946
+ setup(i, r) {
947
+ const e = I(), n = P("designer-host-service"), o = P("design-item-context"), c = Be(o, n), d = K(e, o, c);
948
+ Z(() => {
949
+ e.value.componentInstance = d;
950
+ }), r.expose(d.value);
951
+ const g = B(() => ({
846
952
  "f-avatar": !0,
847
- "f-avatar-readonly": r.readonly,
848
- "f-avatar-circle": r.shape === "circle",
849
- "f-avatar-square": r.shape === "square"
850
- })), p = v(r.modelValue), i = C(() => ({
851
- width: r.avatarWidth + "px",
852
- height: r.avatarHeight + "px"
853
- })), d = !1;
854
- function s() {
953
+ "f-avatar-readonly": i.readonly,
954
+ "f-avatar-circle": i.shape === "circle",
955
+ "f-avatar-square": i.shape === "square"
956
+ })), m = I(i.modelValue), a = B(() => ({
957
+ width: i.avatarWidth + "px",
958
+ height: i.avatarHeight + "px"
959
+ })), l = !1;
960
+ function t() {
855
961
  return "";
856
962
  }
857
- function g() {
963
+ function p() {
858
964
  }
859
- const A = v(null), {
860
- acceptTypes: m,
861
- imageSource: h,
862
- onClickImage: T
863
- } = R(r, n, A, p);
864
- return () => f("div", {
965
+ const s = I(null), {
966
+ acceptTypes: u,
967
+ imageSource: y,
968
+ onClickImage: h
969
+ } = H(i, r, s, m);
970
+ return () => b("div", {
865
971
  ref: e,
866
- class: u.value,
867
- style: i.value,
868
- onClick: T
869
- }, [d, f("img", {
870
- title: r.title,
972
+ class: g.value,
973
+ style: a.value,
974
+ onClick: h
975
+ }, [l, b("img", {
976
+ title: i.title,
871
977
  class: "f-avatar-image",
872
- src: h.value,
873
- onError: s
874
- }, null), !r.readonly && f("div", {
978
+ src: y.value,
979
+ onError: t
980
+ }, null), !i.readonly && b("div", {
875
981
  class: "f-avatar-icon"
876
- }, [f("span", {
982
+ }, [b("span", {
877
983
  class: "f-icon f-icon-camera"
878
- }, null)]), f("input", {
984
+ }, null)]), b("input", {
879
985
  ref: "file",
880
986
  name: "file-input",
881
987
  type: "file",
882
988
  class: "f-avatar-upload",
883
- accept: m.value,
884
- onChange: g,
989
+ accept: u.value,
990
+ onChange: p,
885
991
  style: "display: none;"
886
992
  }, null)]);
887
993
  }
888
994
  });
889
- B.register = (r, n, e, t) => {
890
- r.avatar = B, n.avatar = S;
995
+ F.register = (i, r, e, n) => {
996
+ i.avatar = F, r.avatar = U;
891
997
  };
892
- B.registerDesigner = (r, n, e) => {
893
- r.avatar = me, n.avatar = S;
998
+ F.registerDesigner = (i, r, e) => {
999
+ i.avatar = Me, r.avatar = U;
894
1000
  };
895
- const Ie = j(B);
1001
+ const Pe = J(F);
896
1002
  export {
897
- B as FAvatar,
898
- I as avatarProps,
899
- Ie as default,
900
- S as propsResolver
1003
+ F as FAvatar,
1004
+ w as avatarProps,
1005
+ Pe as default,
1006
+ U as propsResolver
901
1007
  };