@farris/ui-vue 1.2.9 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/components/accordion/index.esm.js +63 -63
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +402 -323
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +98 -96
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +66 -66
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +118 -118
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +539 -460
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +135 -135
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1007 -312
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +97 -97
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +778 -700
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +472 -329
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2231 -1055
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +79 -79
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6408 -5034
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4762 -3511
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3442 -2742
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-outline/index.esm.js +14 -13
  40. package/components/designer-outline/index.umd.cjs +1 -1
  41. package/components/dropdown/index.esm.js +73 -73
  42. package/components/dropdown/index.umd.cjs +2 -2
  43. package/components/dynamic-form/index.css +1 -0
  44. package/components/dynamic-form/index.esm.js +2597 -1141
  45. package/components/dynamic-form/index.umd.cjs +1 -1
  46. package/components/dynamic-resolver/index.esm.js +114 -71
  47. package/components/dynamic-resolver/index.umd.cjs +1 -1
  48. package/components/dynamic-view/index.esm.js +303 -290
  49. package/components/dynamic-view/index.umd.cjs +1 -1
  50. package/components/events-editor/index.esm.js +171 -171
  51. package/components/events-editor/index.umd.cjs +1 -1
  52. package/components/expression-editor/index.esm.js +65 -65
  53. package/components/expression-editor/index.umd.cjs +1 -1
  54. package/components/external-container/index.css +1 -1
  55. package/components/external-container/index.esm.js +3075 -2586
  56. package/components/external-container/index.umd.cjs +1 -1
  57. package/components/field-selector/index.css +1 -1
  58. package/components/field-selector/index.esm.js +5272 -8511
  59. package/components/field-selector/index.umd.cjs +1 -1
  60. package/components/filter-bar/index.css +1 -1
  61. package/components/filter-bar/index.esm.js +1726 -1822
  62. package/components/filter-bar/index.umd.cjs +1 -1
  63. package/components/image-cropper/index.esm.js +126 -126
  64. package/components/image-cropper/index.umd.cjs +1 -1
  65. package/components/input-group/index.esm.js +620 -540
  66. package/components/input-group/index.umd.cjs +1 -1
  67. package/components/layout/index.esm.js +88 -88
  68. package/components/layout/index.umd.cjs +1 -1
  69. package/components/list-nav/index.esm.js +71 -71
  70. package/components/list-nav/index.umd.cjs +1 -1
  71. package/components/list-view/index.css +1 -1
  72. package/components/list-view/index.esm.js +3582 -2356
  73. package/components/list-view/index.umd.cjs +1 -1
  74. package/components/lookup/index.css +1 -1
  75. package/components/lookup/index.esm.js +10752 -8972
  76. package/components/lookup/index.umd.cjs +1 -1
  77. package/components/mapping-editor/index.css +1 -1
  78. package/components/mapping-editor/index.esm.js +5601 -5329
  79. package/components/mapping-editor/index.umd.cjs +1 -1
  80. package/components/message-box/index.css +1 -1
  81. package/components/message-box/index.esm.js +511 -471
  82. package/components/message-box/index.umd.cjs +1 -1
  83. package/components/modal/index.css +1 -1
  84. package/components/modal/index.esm.js +438 -398
  85. package/components/modal/index.umd.cjs +1 -1
  86. package/components/nav/index.esm.js +535 -452
  87. package/components/nav/index.umd.cjs +2 -2
  88. package/components/notify/index.esm.js +59 -53
  89. package/components/notify/index.umd.cjs +1 -1
  90. package/components/number-range/index.esm.js +556 -477
  91. package/components/number-range/index.umd.cjs +1 -1
  92. package/components/number-spinner/index.esm.js +504 -425
  93. package/components/number-spinner/index.umd.cjs +1 -1
  94. package/components/order/index.css +1 -1
  95. package/components/order/index.esm.js +1833 -1054
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +100 -100
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +899 -870
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +576 -487
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/popover/index.esm.js +71 -70
  104. package/components/popover/index.umd.cjs +1 -1
  105. package/components/progress/index.esm.js +73 -73
  106. package/components/progress/index.umd.cjs +2 -2
  107. package/components/property-editor/index.css +1 -1
  108. package/components/property-editor/index.esm.js +1916 -1220
  109. package/components/property-editor/index.umd.cjs +3 -3
  110. package/components/property-panel/index.esm.js +783 -886
  111. package/components/property-panel/index.umd.cjs +1 -1
  112. package/components/query-solution/index.css +1 -1
  113. package/components/query-solution/index.esm.js +3632 -2556
  114. package/components/query-solution/index.umd.cjs +1 -1
  115. package/components/radio-button/index.esm.js +72 -72
  116. package/components/radio-button/index.umd.cjs +1 -1
  117. package/components/radio-group/index.esm.js +484 -405
  118. package/components/radio-group/index.umd.cjs +1 -1
  119. package/components/rate/index.esm.js +152 -152
  120. package/components/rate/index.umd.cjs +1 -1
  121. package/components/response-layout/index.esm.js +73 -73
  122. package/components/response-layout/index.umd.cjs +1 -1
  123. package/components/response-layout-editor/index.css +1 -1
  124. package/components/response-layout-editor/index.esm.js +1081 -1043
  125. package/components/response-layout-editor/index.umd.cjs +1 -1
  126. package/components/response-toolbar/index.esm.js +753 -738
  127. package/components/response-toolbar/index.umd.cjs +1 -1
  128. package/components/schema-selector/index.css +1 -1
  129. package/components/schema-selector/index.esm.js +4418 -4177
  130. package/components/schema-selector/index.umd.cjs +2 -2
  131. package/components/search-box/index.esm.js +119 -119
  132. package/components/search-box/index.umd.cjs +1 -1
  133. package/components/section/index.esm.js +92 -91
  134. package/components/section/index.umd.cjs +1 -1
  135. package/components/smoke-detector/index.esm.js +59 -59
  136. package/components/smoke-detector/index.umd.cjs +1 -1
  137. package/components/splitter/index.esm.js +103 -103
  138. package/components/splitter/index.umd.cjs +1 -1
  139. package/components/step/index.esm.js +85 -85
  140. package/components/step/index.umd.cjs +1 -1
  141. package/components/switch/index.esm.js +457 -378
  142. package/components/switch/index.umd.cjs +1 -1
  143. package/components/tabs/index.css +1 -1
  144. package/components/tabs/index.esm.js +1696 -1617
  145. package/components/tabs/index.umd.cjs +1 -1
  146. package/components/tags/index.esm.js +53 -53
  147. package/components/tags/index.umd.cjs +1 -1
  148. package/components/text/index.esm.js +268 -268
  149. package/components/text/index.umd.cjs +1 -1
  150. package/components/textarea/index.esm.js +420 -341
  151. package/components/textarea/index.umd.cjs +1 -1
  152. package/components/time-picker/index.css +1 -1
  153. package/components/time-picker/index.esm.js +1062 -981
  154. package/components/time-picker/index.umd.cjs +1 -1
  155. package/components/transfer/index.css +1 -1
  156. package/components/transfer/index.esm.js +381 -379
  157. package/components/transfer/index.umd.cjs +1 -1
  158. package/components/tree-grid/index.css +1 -1
  159. package/components/tree-grid/index.esm.js +5252 -9560
  160. package/components/tree-grid/index.umd.cjs +1 -1
  161. package/components/tree-view/index.css +1 -0
  162. package/components/tree-view/index.esm.js +3920 -2692
  163. package/components/tree-view/index.umd.cjs +1 -1
  164. package/components/uploader/index.esm.js +373 -367
  165. package/components/uploader/index.umd.cjs +2 -2
  166. package/components/verify-detail/index.esm.js +92 -92
  167. package/components/verify-detail/index.umd.cjs +1 -1
  168. package/components/video/index.esm.js +597 -417
  169. package/components/video/index.umd.cjs +1 -1
  170. package/components/weather/index.esm.js +251 -251
  171. package/components/weather/index.umd.cjs +4 -4
  172. package/farris.all.esm.js +17125 -16176
  173. package/farris.all.umd.cjs +8 -8
  174. package/index.css +1 -1
  175. package/package.json +1 -1
  176. package/types/capsule/src/capsule.props.d.ts +2 -2
  177. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  178. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  179. package/types/common/index.d.ts +1 -0
  180. package/types/common/types.d.ts +1 -1
  181. package/types/common/utils/encrypt.d.ts +2 -0
  182. package/types/component/src/component.props.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +1 -1
  184. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  185. package/types/components.d.ts +1 -0
  186. package/types/data-grid/index.d.ts +5 -2
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  189. package/types/data-view/composition/types.d.ts +18 -1
  190. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  191. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  192. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  193. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  194. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  195. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  196. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  197. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  198. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  199. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  200. package/types/dynamic-form/src/types.d.ts +12 -1
  201. package/types/dynamic-resolver/index.d.ts +1 -0
  202. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  203. package/types/dynamic-resolver/src/types.d.ts +9 -0
  204. package/types/dynamic-view/index.d.ts +1 -0
  205. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  206. package/types/index.d.ts +2 -0
  207. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  208. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  209. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  210. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  211. package/types/lookup/src/composition/types.d.ts +8 -0
  212. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  213. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  214. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  215. package/types/lookup/src/composition/use-http.d.ts +9 -5
  216. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  217. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  218. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  219. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  220. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  221. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  222. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  223. package/types/modal/src/modal.component.d.ts +3 -0
  224. package/types/modal/src/modal.props.d.ts +4 -0
  225. package/types/page-header/src/page-header.props.d.ts +1 -0
  226. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  227. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  228. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  229. package/types/response-layout-editor/src/type.d.ts +21 -0
  230. package/types/tabs/src/tabs.props.d.ts +1 -0
  231. package/types/tree-grid/index.d.ts +8 -2
  232. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  233. package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
  234. package/types/modal/src/composition/use-esc.d.ts +0 -1
  235. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  236. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,110 +1,152 @@
1
- import { defineComponent as q, onBeforeMount as X, onMounted as W, createVNode as _, ref as w, inject as Y } from "vue";
2
- import { cloneDeep as Z } from "lodash-es";
3
- const J = {}, z = {};
4
- function k(r) {
5
- const { properties: e, title: t, ignore: c } = r, p = c && Array.isArray(c), b = Object.keys(e).reduce((h, j) => ((!p || !c.find((A) => A == j)) && (h[j] = e[j].type === "object" && e[j].properties ? k(e[j]) : Z(e[j].default)), h), {});
6
- return (!p || !c.find((h) => h == "id")) && (b.id = `${t}-${Date.now()}`), b;
1
+ var ee = Object.defineProperty;
2
+ var te = (r, e, t) => e in r ? ee(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var M = (r, e, t) => te(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as z, onBeforeMount as ne, onMounted as Q, createVNode as X, ref as E, inject as W } from "vue";
5
+ import { isPlainObject as _, cloneDeep as Y } from "lodash-es";
6
+ const Z = {}, x = {};
7
+ function F(r) {
8
+ const { properties: e, title: t, ignore: n } = r, s = n && Array.isArray(n), u = Object.keys(e).reduce((y, g) => ((!s || !n.find((P) => P == g)) && (y[g] = e[g].type === "object" && e[g].properties ? F(e[g]) : Y(e[g].default)), y), {});
9
+ return (!s || !n.find((y) => y == "id")) && (u.id = `${t}-${Date.now()}`), u;
7
10
  }
8
- function V(r, e = {}, t) {
9
- const c = J[r];
10
- if (c) {
11
- let p = k(c);
12
- const b = z[r];
13
- return p = b ? b({ getSchemaByType: V }, p, e, t) : p, p;
11
+ function B(r, e = {}, t) {
12
+ const n = Z[r];
13
+ if (n) {
14
+ let s = F(n);
15
+ const u = x[r];
16
+ return s = u ? u({ getSchemaByType: B }, s, e, t) : s, s;
14
17
  }
15
18
  return null;
16
19
  }
17
- function R(r, e) {
18
- const t = k(e);
19
- return Object.keys(r).reduce((c, p) => (c[p] && typeof c[p] == "object" ? Object.assign(c[p], r[p]) : c[p] = r[p], c), t), t;
20
+ function oe(r, e) {
21
+ const t = F(e);
22
+ return Object.keys(r).reduce((n, s) => (n[s] && _(n[s]) && _(r[s]) ? Object.assign(n[s], r[s]) : n[s] = r[s], n), t), t;
20
23
  }
21
- function K(r, e) {
22
- return Object.keys(r).filter((c) => r[c] != null).reduce((c, p) => {
23
- if (e.has(p)) {
24
- const b = e.get(p);
25
- if (typeof b == "string")
26
- c[b] = r[p];
24
+ function re(r, e) {
25
+ return Object.keys(r).filter((n) => r[n] != null).reduce((n, s) => {
26
+ if (e.has(s)) {
27
+ const u = e.get(s);
28
+ if (typeof u == "string")
29
+ n[u] = r[s];
27
30
  else {
28
- const h = b(p, r[p], r);
29
- Object.assign(c, h);
31
+ const y = u(s, r[s], r);
32
+ Object.assign(n, y);
30
33
  }
31
34
  } else
32
- c[p] = r[p];
33
- return c;
35
+ n[s] = r[s];
36
+ return n;
34
37
  }, {});
35
38
  }
36
- function x(r, e, t = /* @__PURE__ */ new Map()) {
37
- const c = R(r, e);
38
- return K(c, t);
39
+ function se(r, e, t = /* @__PURE__ */ new Map()) {
40
+ const n = oe(r, e);
41
+ return re(n, t);
39
42
  }
40
- function I(r = {}) {
41
- function e(a, f, l, d) {
42
- if (typeof l == "number")
43
- return d[a].length === l;
44
- if (typeof l == "object") {
45
- const m = Object.keys(l)[0], n = l[m];
46
- if (m === "not")
47
- return Number(d[a].length) !== Number(n);
48
- if (m === "moreThan")
49
- return Number(d[a].length) >= Number(n);
50
- if (m === "lessThan")
51
- return Number(d[a].length) <= Number(n);
43
+ function ce(r = {}) {
44
+ function e(a, d, f, m) {
45
+ if (typeof f == "number")
46
+ return m[a].length === f;
47
+ if (typeof f == "object") {
48
+ const j = Object.keys(f)[0], o = f[j];
49
+ if (j === "not")
50
+ return Number(m[a].length) !== Number(o);
51
+ if (j === "moreThan")
52
+ return Number(m[a].length) >= Number(o);
53
+ if (j === "lessThan")
54
+ return Number(m[a].length) <= Number(o);
52
55
  }
53
56
  return !1;
54
57
  }
55
- function t(a, f, l, d) {
56
- return d[a] && d[a].propertyValue && String(d[a].propertyValue.value) === String(l);
58
+ function t(a, d, f, m) {
59
+ return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(f);
57
60
  }
58
- const c = /* @__PURE__ */ new Map([
61
+ const n = /* @__PURE__ */ new Map([
59
62
  ["length", e],
60
63
  ["getProperty", t]
61
64
  ]);
62
- Object.keys(r).reduce((a, f) => (a.set(f, r[f]), a), c);
63
- function p(a, f) {
64
- const l = a;
65
- return typeof f == "number" ? [{ target: l, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: l, operator: "getProperty", param: a, value: !!f }] : typeof f == "object" ? Object.keys(f).map((d) => {
66
- if (d === "length")
67
- return { target: l, operator: "length", param: null, value: f[d] };
68
- const m = d, n = f[d];
69
- return { target: l, operator: "getProperty", param: m, value: n };
65
+ Object.keys(r).reduce((a, d) => (a.set(d, r[d]), a), n);
66
+ function s(a, d) {
67
+ const f = a;
68
+ return typeof d == "number" ? [{ target: f, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: f, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
69
+ if (m === "length")
70
+ return { target: f, operator: "length", param: null, value: d[m] };
71
+ const j = m, o = d[m];
72
+ return { target: f, operator: "getProperty", param: j, value: o };
70
73
  }) : [];
71
74
  }
72
- function b(a) {
73
- return Object.keys(a).reduce((l, d) => {
74
- const m = p(d, a[d]);
75
- return l.push(...m), l;
75
+ function u(a) {
76
+ return Object.keys(a).reduce((f, m) => {
77
+ const j = s(m, a[m]);
78
+ return f.push(...j), f;
76
79
  }, []);
77
80
  }
78
- function h(a, f) {
79
- if (c.has(a.operator)) {
80
- const l = c.get(a.operator);
81
- return l && l(a.target, a.param, a.value, f) || !1;
81
+ function y(a, d) {
82
+ if (n.has(a.operator)) {
83
+ const f = n.get(a.operator);
84
+ return f && f(a.target, a.param, a.value, d) || !1;
82
85
  }
83
86
  return !1;
84
87
  }
85
- function j(a, f) {
86
- return b(a).reduce((m, n) => m && h(n, f), !0);
88
+ function g(a, d) {
89
+ return u(a).reduce((j, o) => j && y(o, d), !0);
87
90
  }
88
- function A(a, f) {
89
- const l = Object.keys(a), d = l.includes("allOf"), m = l.includes("anyOf"), n = d || m, i = (n ? a[n ? d ? "allOf" : "anyOf" : "allOf"] : [a]).map((y) => j(y, f));
90
- return d ? !i.includes(!1) : i.includes(!0);
91
+ function P(a, d) {
92
+ const f = Object.keys(a), m = f.includes("allOf"), j = f.includes("anyOf"), o = m || j, p = (o ? a[o ? m ? "allOf" : "anyOf" : "allOf"] : [a]).map((h) => g(h, d));
93
+ return m ? !p.includes(!1) : p.includes(!0);
91
94
  }
92
- return { parseValueSchema: A };
95
+ return { parseValueSchema: P };
93
96
  }
94
- const ee = {}, te = {};
95
- I();
96
- function G(r, e, t = /* @__PURE__ */ new Map(), c = (h, j, A) => j, p = {}, b = (h) => h) {
97
- return J[e.title] = e, z[e.title] = c, ee[e.title] = p, te[e.title] = b, (h = {}) => {
98
- const j = x(h, e, t), A = Object.keys(r).reduce((a, f) => (a[f] = r[f].default, a), {});
99
- return Object.assign(A, j);
97
+ const ie = {
98
+ button: { type: "button", name: "按钮", icon: "Button" },
99
+ "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
100
+ "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
101
+ "content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
102
+ "input-group": { type: "input-group", name: "文本", icon: "TextBox" },
103
+ textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
104
+ lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
105
+ "number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
106
+ "date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
107
+ switch: { type: "switch", name: "开关", icon: "SwitchField" },
108
+ "radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
109
+ "check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
110
+ "check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
111
+ "combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
112
+ "response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
113
+ "response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
114
+ "response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
115
+ "tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
116
+ "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
117
+ "data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
118
+ "data-grid-column": { type: "data-grid-column", name: "表格列" },
119
+ module: { type: "Module", name: "模块", icon: "Module" },
120
+ component: { type: "component", name: "组件", icon: "Component" },
121
+ tabs: { type: "tabs", name: "标签页", icon: "Tab" },
122
+ "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
123
+ "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
124
+ "time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
125
+ section: { type: "section", name: "分组面板", icon: "Section" },
126
+ "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
127
+ "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
128
+ splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
129
+ "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
130
+ "component-ref": { type: "component-ref", name: "组件引用节点" },
131
+ uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
132
+ "page-header": { type: "page-header", name: "页头", icon: "Header" },
133
+ "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
134
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
135
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
136
+ }, ae = {}, pe = {};
137
+ ce();
138
+ function H(r, e, t = /* @__PURE__ */ new Map(), n = (y, g, P) => g, s = {}, u = (y) => y) {
139
+ return Z[e.title] = e, x[e.title] = n, ae[e.title] = s, pe[e.title] = u, (y = {}) => {
140
+ const g = se(y, e, t), P = Object.keys(r).reduce((a, d) => (a[d] = r[d].default, a), {});
141
+ return Object.assign(P, g);
100
142
  };
101
143
  }
102
- function ne(r, e) {
144
+ function le(r, e) {
103
145
  return { customClass: e.class, customStyle: e.style };
104
146
  }
105
- const H = /* @__PURE__ */ new Map([
106
- ["appearance", ne]
107
- ]), oe = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/component.schema.json", ce = "component", se = "A Farris Visual Component", pe = "object", ae = {
147
+ const R = /* @__PURE__ */ new Map([
148
+ ["appearance", le]
149
+ ]), ue = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/component.schema.json", de = "component", ye = "A Farris Visual Component", me = "object", he = {
108
150
  id: {
109
151
  description: "The unique identifier for a component",
110
152
  type: "string"
@@ -144,179 +186,141 @@ const H = /* @__PURE__ */ new Map([
144
186
  description: "",
145
187
  type: "boolean",
146
188
  default: !0
189
+ },
190
+ onInit: {
191
+ description: "初始化事件",
192
+ type: "string",
193
+ default: ""
194
+ },
195
+ onAfterViewInit: {
196
+ description: "视图初始化后事件",
197
+ type: "string",
198
+ default: ""
147
199
  }
148
- }, ie = [
200
+ }, be = [
149
201
  "id",
150
202
  "type",
151
203
  "contents"
152
- ], le = {
153
- $schema: oe,
154
- $id: re,
155
- title: ce,
156
- description: se,
157
- type: pe,
158
- properties: ae,
159
- required: ie
204
+ ], ge = {
205
+ $schema: ue,
206
+ $id: fe,
207
+ title: de,
208
+ description: ye,
209
+ type: me,
210
+ properties: he,
211
+ required: be
160
212
  };
161
- function Q(r, e, t) {
213
+ function I(r, e, t) {
162
214
  return e;
163
215
  }
164
- const ue = "accordion", fe = "A Farris Component", de = "object", ye = {
165
- basic: {
166
- description: "Basic Infomation",
167
- title: "基本信息",
168
- properties: {
169
- id: {
170
- description: "组件标识",
171
- title: "标识",
172
- type: "string",
173
- readonly: !0
174
- },
175
- type: {
176
- description: "组件类型",
177
- title: "控件类型",
178
- type: "select",
179
- editor: {
180
- type: "combo-list",
181
- textField: "value",
182
- valueField: "key",
183
- data: [
184
- {
185
- key: "component",
186
- value: "组件"
187
- }
188
- ]
189
- }
190
- }
191
- }
192
- },
193
- appearance: {
194
- description: "",
195
- title: "外观",
196
- properties: {
197
- class: {
198
- description: "组件的CSS样式",
199
- title: "class样式"
200
- },
201
- style: {
202
- description: "组件的内容样式",
203
- title: "style样式"
204
- }
205
- }
206
- }
207
- }, be = {
208
- title: ue,
209
- description: fe,
210
- type: de,
211
- categories: ye
212
- }, F = {
216
+ const D = {
213
217
  id: { type: String },
214
218
  customClass: { type: String, default: "" },
215
219
  componentType: { type: String, default: "" }
216
- }, L = G(F, le, H, Q, be), S = /* @__PURE__ */ q({
220
+ }, J = H(D, ge, R, I), Qe = Object.assign({}, D, { componentId: { type: String, default: "" } }), k = /* @__PURE__ */ z({
217
221
  name: "FComponent",
218
- props: F,
222
+ props: D,
219
223
  emits: ["init", "afterViewInit"],
220
224
  setup(r, e) {
221
- return X(() => {
225
+ return ne(() => {
222
226
  e.emit("init", r.id);
223
- }), W(() => {
227
+ }), Q(() => {
224
228
  e.emit("afterViewInit", r.id);
225
- }), () => _("div", {
229
+ }), () => X("div", {
226
230
  class: r.customClass
227
231
  }, [e.slots.default && e.slots.default()]);
228
232
  }
229
233
  });
230
- function he(r, e, t) {
231
- var D;
232
- function c() {
234
+ function je(r, e, t) {
235
+ var S;
236
+ function n() {
233
237
  t != null && t.resolveComponentContext && t.resolveComponentContext();
234
238
  }
235
- c();
236
- const p = t && t.getStyles && t.getStyles() || "", b = t && t.getDesignerClass && t.getDesignerClass() || "", h = w();
237
- function j() {
239
+ n();
240
+ const s = t && t.getStyles && t.getStyles() || "", u = t && t.getDesignerClass && t.getDesignerClass() || "", y = E();
241
+ function g() {
238
242
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
239
243
  }
240
- function A() {
244
+ function P() {
241
245
  return !1;
242
246
  }
243
247
  function a() {
244
248
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
245
249
  }
246
- function f() {
250
+ function d() {
247
251
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
248
252
  }
249
- function l(u) {
250
- if (!u || !u.value)
253
+ function f(l) {
254
+ if (!l || !l.value)
251
255
  return null;
252
- if (u.value.schema && u.value.schema.type === "component")
253
- return u.value;
254
- const v = w(u == null ? void 0 : u.value.parent), C = l(v);
256
+ if (l.value.schema && l.value.schema.type === "component")
257
+ return l.value;
258
+ const v = E(l == null ? void 0 : l.value.parent), C = f(v);
255
259
  return C || null;
256
260
  }
257
- function d(u = e) {
258
- const { componentInstance: v, designerItemElementRef: C } = u;
259
- return !v || !v.value ? null : v.value.canMove ? C : d(u.parent);
261
+ function m(l = e) {
262
+ const { componentInstance: v, designerItemElementRef: C } = l;
263
+ return !v || !v.value ? null : v.value.canMove ? C : m(l.parent);
260
264
  }
261
- function m(u) {
262
- return !!t && t.canAccepts(u);
265
+ function j(l) {
266
+ return !!t && t.canAccepts(l);
263
267
  }
264
- function n() {
268
+ function o() {
265
269
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
266
270
  }
267
- function s() {
271
+ function i() {
268
272
  }
269
- function o(u, v) {
273
+ function c(l, v) {
270
274
  v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
271
275
  }
272
- function i(u, v) {
273
- const { componentType: C } = u;
274
- let T = V(C, u, v);
275
- t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(u, T));
276
+ function p(l, v) {
277
+ const { componentType: C } = l;
278
+ let T = B(C, l, v);
279
+ t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(l, T));
276
280
  const O = C.toLowerCase().replace("-", "_");
277
281
  return T && !T.id && T.type === C && (T.id = `${O}_${Math.random().toString().slice(2, 6)}`), T;
278
282
  }
279
- function g(u, v) {
280
- const C = String(u.getAttribute("data-controltype")), T = u.getAttribute("data-feature"), O = T ? JSON.parse(T) : {};
281
- O.parentComponentInstance = h.value;
282
- let $ = V(C, O);
283
- t && t.onAcceptNewChildElement && ($ = t.onAcceptNewChildElement(u, v, $));
284
- const M = C.toLowerCase().replace("-", "_");
285
- return $ && !$.id && $.type === C && ($.id = `${M}_${Math.random().toString().slice(2, 6)}`), $;
283
+ function b(l, v) {
284
+ const C = String(l.getAttribute("data-controltype")), T = l.getAttribute("data-feature"), O = T ? JSON.parse(T) : {};
285
+ O.parentComponentInstance = y.value;
286
+ let A = B(C, O);
287
+ t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(l, v, A));
288
+ const V = C.toLowerCase().replace("-", "_");
289
+ return A && !A.id && A.type === C && (A.id = `${V}_${Math.random().toString().slice(2, 6)}`), A;
286
290
  }
287
- function y(u) {
291
+ function h(l) {
288
292
  }
289
- function P(...u) {
293
+ function w(...l) {
290
294
  if (t && t.getPropsConfig)
291
- return t.getPropsConfig(...u);
295
+ return t.getPropsConfig(...l);
292
296
  }
293
- return h.value = {
294
- canMove: j(),
295
- canSelectParent: A(),
297
+ return y.value = {
298
+ canMove: g(),
299
+ canSelectParent: P(),
296
300
  canDelete: a(),
297
- canNested: !f(),
301
+ canNested: !d(),
298
302
  contents: e == null ? void 0 : e.schema.contents,
299
303
  elementRef: r,
300
- parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance,
304
+ parent: (S = e == null ? void 0 : e.parent) == null ? void 0 : S.componentInstance,
301
305
  schema: e == null ? void 0 : e.schema,
302
- styles: p,
303
- designerClass: b,
304
- canAccepts: m,
305
- getBelongedComponentInstance: l,
306
- getDraggableDesignItemElement: d,
307
- getDraggingDisplayText: n,
308
- getPropConfig: P,
309
- getDragScopeElement: s,
310
- onAcceptMovedChildElement: o,
311
- onAcceptNewChildElement: g,
312
- onChildElementMovedOut: y,
313
- addNewChildComponentSchema: i,
314
- updateDragAndDropRules: c,
315
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || w(!1),
316
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || w(!1)
317
- }, h;
306
+ styles: s,
307
+ designerClass: u,
308
+ canAccepts: j,
309
+ getBelongedComponentInstance: f,
310
+ getDraggableDesignItemElement: m,
311
+ getDraggingDisplayText: o,
312
+ getPropConfig: w,
313
+ getDragScopeElement: i,
314
+ onAcceptMovedChildElement: c,
315
+ onAcceptNewChildElement: b,
316
+ onChildElementMovedOut: h,
317
+ addNewChildComponentSchema: p,
318
+ updateDragAndDropRules: n,
319
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || E(!1),
320
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
321
+ }, y;
318
322
  }
319
- const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/dragging-rules.schema.json", je = "Dragging Rules", Pe = "The rules of designer canvas", Ce = "object", ve = {
323
+ const ve = "https://json-schema.org/draft/2020-12/schema", Ce = "https://farris-design.gitee.io/dragging-rules.schema.json", Pe = "Dragging Rules", we = "The rules of designer canvas", Me = "object", Te = {
320
324
  "f-page": {
321
325
  description: "The root class of page designed by farris.",
322
326
  type: "object",
@@ -955,164 +959,302 @@ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
955
959
  type: "object"
956
960
  }
957
961
  }, Ae = {
958
- $schema: me,
959
- $id: ge,
960
- title: je,
961
- description: Pe,
962
- type: Ce,
963
- properties: ve
964
- }, E = /* @__PURE__ */ new Map();
965
- function Te() {
966
- function r(n, s, o, i) {
967
- var g;
968
- if (typeof o == "number")
969
- return ((g = i[n]) == null ? void 0 : g.length) === o;
970
- if (typeof o == "object") {
971
- const y = Object.keys(o)[0], P = o[y];
972
- if (y === "not")
973
- return Number(i[n].length) !== Number(P);
974
- if (y === "moreThan")
975
- return Number(i[n].length) >= Number(P);
976
- if (y === "lessThan")
977
- return Number(i[n].length) <= Number(P);
962
+ $schema: ve,
963
+ $id: Ce,
964
+ title: Pe,
965
+ description: we,
966
+ type: Me,
967
+ properties: Te
968
+ }, N = /* @__PURE__ */ new Map();
969
+ function Se() {
970
+ function r(o, i, c, p) {
971
+ var b;
972
+ if (typeof c == "number")
973
+ return ((b = p[o]) == null ? void 0 : b.length) === c;
974
+ if (typeof c == "object") {
975
+ const h = Object.keys(c)[0], w = c[h];
976
+ if (h === "not")
977
+ return Number(p[o].length) !== Number(w);
978
+ if (h === "moreThan")
979
+ return Number(p[o].length) >= Number(w);
980
+ if (h === "lessThan")
981
+ return Number(p[o].length) <= Number(w);
978
982
  }
979
983
  return !1;
980
984
  }
981
- function e(n, s, o, i) {
982
- return typeof o == "boolean" ? i.childrenClassList.includes(s) === !!o : !1;
985
+ function e(o, i, c, p) {
986
+ return typeof c == "boolean" ? p.childrenClassList.includes(i) === !!c : !1;
983
987
  }
984
- function t(n, s, o, i) {
985
- return typeof o == "boolean" ? i.parentClassList.includes(s) === !!o : !1;
988
+ function t(o, i, c, p) {
989
+ return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
986
990
  }
987
- function c(n, s, o, i) {
988
- return typeof o == "boolean" ? i.parentClassList.includes(s) === !!o : !1;
991
+ function n(o, i, c, p) {
992
+ return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
989
993
  }
990
- const p = /* @__PURE__ */ new Map([
994
+ const s = /* @__PURE__ */ new Map([
991
995
  ["length", r],
992
996
  ["hasChildren", e],
993
- ["hasSibling", c],
997
+ ["hasSibling", n],
994
998
  ["hasParent", t]
995
999
  ]);
996
- function b(n, s) {
997
- const o = n;
998
- return typeof s == "number" ? [{ target: o, operator: "length", param: null, value: Number(s) }] : typeof s == "object" ? Object.keys(s).map((i) => {
999
- if (i === "length")
1000
- return { target: o, operator: "length", param: null, value: s[i] };
1001
- const g = i, y = s[i];
1002
- return { target: o, operator: n === "children" ? "hasChildren" : n === "parent" ? "hasParent" : "hasSibling", param: g, value: y };
1000
+ function u(o, i) {
1001
+ const c = o;
1002
+ return typeof i == "number" ? [{ target: c, operator: "length", param: null, value: Number(i) }] : typeof i == "object" ? Object.keys(i).map((p) => {
1003
+ if (p === "length")
1004
+ return { target: c, operator: "length", param: null, value: i[p] };
1005
+ const b = p, h = i[p];
1006
+ return { target: c, operator: o === "children" ? "hasChildren" : o === "parent" ? "hasParent" : "hasSibling", param: b, value: h };
1003
1007
  }) : [];
1004
1008
  }
1005
- function h(n, s) {
1006
- if (p.has(n.operator)) {
1007
- const o = p.get(n.operator);
1008
- return o && o(n.target, n.param, n.value, s) || !1;
1009
+ function y(o, i) {
1010
+ if (s.has(o.operator)) {
1011
+ const c = s.get(o.operator);
1012
+ return c && c(o.target, o.param, o.value, i) || !1;
1009
1013
  }
1010
1014
  return !1;
1011
1015
  }
1012
- function j(n, s) {
1013
- return Object.keys(n).reduce((y, P) => {
1014
- const D = b(P, n[P]);
1015
- return y.push(...D), y;
1016
- }, []).reduce((y, P) => y && h(P, s), !0);
1016
+ function g(o, i) {
1017
+ return Object.keys(o).reduce((h, w) => {
1018
+ const S = u(w, o[w]);
1019
+ return h.push(...S), h;
1020
+ }, []).reduce((h, w) => h && y(w, i), !0);
1017
1021
  }
1018
- function A(n, s) {
1019
- const o = Object.keys(n), i = o.includes("allOf"), g = o.includes("anyOf"), y = i || g, u = (y ? n[y ? i ? "allOf" : "anyOf" : "allOf"] : [n]).map((C) => j(C, s));
1020
- return i ? !u.includes(!1) : u.includes(!0);
1022
+ function P(o, i) {
1023
+ const c = Object.keys(o), p = c.includes("allOf"), b = c.includes("anyOf"), h = p || b, l = (h ? o[h ? p ? "allOf" : "anyOf" : "allOf"] : [o]).map((C) => g(C, i));
1024
+ return p ? !l.includes(!1) : l.includes(!0);
1021
1025
  }
1022
- function a(n, s) {
1023
- const o = n.const;
1024
- return o ? typeof o == "boolean" ? o : typeof o == "object" ? A(o, s) : !1 : !1;
1026
+ function a(o, i) {
1027
+ const c = o.const;
1028
+ return c ? typeof c == "boolean" ? c : typeof c == "object" ? P(c, i) : !1 : !1;
1025
1029
  }
1026
- function f(n) {
1027
- return (s) => {
1028
- const o = { canAccept: !0, fixed: !1, hidePadding: !1 };
1029
- return n && n.properties && Object.keys(n.properties).reduce((i, g) => {
1030
- const y = n.properties[g];
1031
- return i[g] = a(y, s), i;
1032
- }, o), o;
1030
+ function d(o) {
1031
+ return (i) => {
1032
+ const c = { canAccept: !0, fixed: !1, hidePadding: !1 };
1033
+ return o && o.properties && Object.keys(o.properties).reduce((p, b) => {
1034
+ const h = o.properties[b];
1035
+ return p[b] = a(h, i), p;
1036
+ }, c), c;
1033
1037
  };
1034
1038
  }
1035
- function l(n, s, o) {
1036
- if (s.type === "object" && s.properties) {
1037
- const { rules: i, contents: g } = s.properties;
1038
- o.set(n, f(i)), g && Object.keys(g.properties).forEach(
1039
- (y) => l(y, g.properties[y], o)
1039
+ function f(o, i, c) {
1040
+ if (i.type === "object" && i.properties) {
1041
+ const { rules: p, contents: b } = i.properties;
1042
+ c.set(o, d(p)), b && Object.keys(b.properties).forEach(
1043
+ (h) => f(h, b.properties[h], c)
1040
1044
  );
1041
1045
  }
1042
1046
  }
1043
- function d() {
1044
- const { properties: n } = Ae;
1045
- Object.keys(n).forEach((s) => {
1046
- l(s, n[s], E);
1047
+ function m() {
1048
+ const { properties: o } = Ae;
1049
+ Object.keys(o).forEach((i) => {
1050
+ f(i, o[i], N);
1047
1051
  });
1048
1052
  }
1049
- function m(n, s) {
1050
- const o = { canAccept: !0, fixed: !1, hidePadding: !0 };
1051
- return E.has(n) ? E.get(n)(s) : o;
1053
+ function j(o, i) {
1054
+ const c = { canAccept: !0, fixed: !1, hidePadding: !0 };
1055
+ return N.has(o) ? N.get(o)(i) : c;
1052
1056
  }
1053
- return d(), { getRuleValue: m };
1057
+ return m(), { getRuleValue: j };
1054
1058
  }
1055
- function $e(r) {
1056
- const e = Te();
1057
- let t = !1, c, p = !1;
1058
- const b = !1;
1059
- function h() {
1060
- return !1;
1059
+ class Oe {
1060
+ constructor(e, t) {
1061
+ M(this, "componentId");
1062
+ M(this, "viewModelId");
1063
+ M(this, "eventsEditorUtils");
1064
+ M(this, "formSchemaUtils");
1065
+ M(this, "formMetadataConverter");
1066
+ M(this, "designViewModelUtils");
1067
+ M(this, "designViewModelField");
1068
+ M(this, "controlCreatorUtils");
1069
+ M(this, "designerHostService");
1070
+ M(this, "schemaService", null);
1071
+ M(this, "metadataService", null);
1072
+ M(this, "propertyConfig", {
1073
+ type: "object",
1074
+ categories: {}
1075
+ });
1076
+ var n;
1077
+ this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
1061
1078
  }
1062
- function j() {
1063
- return b || !p;
1079
+ getTableInfo() {
1080
+ var e;
1081
+ return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
1064
1082
  }
1065
- function A() {
1066
- return !p;
1083
+ setDesignViewModelField(e) {
1084
+ const t = e.binding && e.binding.type === "Form" && e.binding.field;
1085
+ if (t) {
1086
+ if (!this.designViewModelField) {
1087
+ const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1088
+ this.designViewModelField = n.fields.find((s) => s.id === t);
1089
+ }
1090
+ e.updateOn = this.designViewModelField.updateOn;
1091
+ }
1092
+ }
1093
+ changeFieldEditorType(e, t) {
1094
+ }
1095
+ getBasicPropConfig(e) {
1096
+ return {
1097
+ description: "Basic Information",
1098
+ title: "基本信息",
1099
+ properties: {
1100
+ id: {
1101
+ description: "组件标识",
1102
+ title: "标识",
1103
+ type: "string",
1104
+ readonly: !0
1105
+ },
1106
+ type: {
1107
+ description: "组件类型",
1108
+ title: "控件类型",
1109
+ type: "select",
1110
+ editor: {
1111
+ type: "combo-list",
1112
+ textField: "name",
1113
+ valueField: "value",
1114
+ data: [{ value: e.type, name: ie[e.type].name }]
1115
+ }
1116
+ }
1117
+ }
1118
+ };
1119
+ }
1120
+ getAppearanceConfig(e = null) {
1121
+ return {
1122
+ title: "样式",
1123
+ description: "Appearance",
1124
+ properties: {
1125
+ class: {
1126
+ title: "class样式",
1127
+ type: "string",
1128
+ description: "组件的CSS样式",
1129
+ $converter: "/converter/appearance.converter"
1130
+ },
1131
+ style: {
1132
+ title: "style样式",
1133
+ type: "string",
1134
+ description: "组件的样式",
1135
+ $converter: "/converter/appearance.converter"
1136
+ }
1137
+ }
1138
+ };
1139
+ }
1140
+ /**
1141
+ *
1142
+ * @param propertyId
1143
+ * @param componentInstance
1144
+ * @returns
1145
+ */
1146
+ updateElementByParentContainer(e, t) {
1147
+ const n = t && t.parent && t.parent.schema;
1148
+ if (!n)
1149
+ return;
1150
+ const s = n.contents.findIndex((y) => y.id === e), u = Y(n.contents[s]);
1151
+ n.contents.splice(s, 1), n.contents.splice(s, 0, u);
1152
+ }
1153
+ }
1154
+ class Ee extends Oe {
1155
+ constructor(e, t) {
1156
+ super(e, t);
1157
+ }
1158
+ getPropertyConfig(e) {
1159
+ return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceConfig(e), this.getEventPropConfig(e), this.propertyConfig;
1160
+ }
1161
+ getEventPropConfig(e) {
1162
+ const t = [
1163
+ {
1164
+ label: "onInit",
1165
+ name: "初始化事件"
1166
+ },
1167
+ {
1168
+ label: "onAfterViewInit",
1169
+ name: "视图初始化后事件"
1170
+ }
1171
+ ];
1172
+ var n = this;
1173
+ const s = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), u = {};
1174
+ u[n.viewModelId] = {
1175
+ type: "events-editor",
1176
+ editor: {
1177
+ initialData: s
1178
+ }
1179
+ }, this.propertyConfig.categories.eventsEditor = {
1180
+ title: "事件",
1181
+ hideTitle: !0,
1182
+ properties: u,
1183
+ // 这个属性,标记当属性变更得时候触发重新更新属性
1184
+ refreshPanelAfterChanged: !0,
1185
+ tabId: "commands",
1186
+ tabName: "交互",
1187
+ setPropertyRelates(y, g) {
1188
+ const P = y.propertyValue;
1189
+ delete e[n.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, P.events, P));
1190
+ }
1191
+ };
1192
+ }
1193
+ }
1194
+ function De(r, e) {
1195
+ const t = Se();
1196
+ let n = !1, s, u = !1;
1197
+ const y = !1, g = r.schema;
1198
+ function P() {
1199
+ return !1;
1067
1200
  }
1068
1201
  function a() {
1069
- var O, $;
1070
- p = !1;
1071
- const l = r.schema, d = l.appearance && l.appearance.class || "", m = d.split(" "), n = l.contents || [], s = n.length ? n[0] : null, o = s && s.appearance ? s.appearance.class : "", i = o ? o.split(" ") : [], g = n.length ? n.reduce((M, N) => {
1072
- const B = N && N.appearance ? N.appearance.class : "", U = B ? B.split(" ") : [];
1073
- return M.push(...U), M;
1202
+ return y || !u;
1203
+ }
1204
+ function d() {
1205
+ return !u;
1206
+ }
1207
+ function f() {
1208
+ var U, L;
1209
+ u = !1;
1210
+ const o = r.schema, i = o.appearance && o.appearance.class || "", c = i.split(" "), p = o.contents || [], b = p.length ? p[0] : null, h = b && b.appearance ? b.appearance.class : "", w = h ? h.split(" ") : [], S = p.length ? p.reduce((q, $) => {
1211
+ const G = $ && $.appearance ? $.appearance.class : "", K = G ? G.split(" ") : [];
1212
+ return q.push(...K), q;
1074
1213
  }, []) : [];
1075
- if ((($ = (O = r.parent) == null ? void 0 : O.schema) == null ? void 0 : $.type) !== "component-ref") {
1076
- t = !0, p = !0;
1214
+ if (((L = (U = r.parent) == null ? void 0 : U.schema) == null ? void 0 : L.type) !== "component-ref") {
1215
+ n = !0, u = !0;
1077
1216
  return;
1078
1217
  }
1079
- const y = r.parent.parent, P = y && y.schema, D = P && P.appearance ? P.appearance.class : "", u = D ? D.split(" ") : [];
1080
- c = {
1081
- componentClass: d,
1082
- componentClassList: m,
1083
- childContents: n,
1084
- firstChildContent: s,
1085
- firstChildClass: o,
1086
- firstChildClassList: i,
1087
- parent: P,
1088
- parentClass: D,
1089
- parentClassList: u,
1090
- children: n,
1091
- childrenClassList: g
1218
+ const l = r.parent.parent, v = l && l.schema, C = v && v.appearance ? v.appearance.class : "", T = C ? C.split(" ") : [];
1219
+ s = {
1220
+ componentClass: i,
1221
+ componentClassList: c,
1222
+ childContents: p,
1223
+ firstChildContent: b,
1224
+ firstChildClass: h,
1225
+ firstChildClassList: w,
1226
+ parent: v,
1227
+ parentClass: C,
1228
+ parentClassList: T,
1229
+ children: p,
1230
+ childrenClassList: S
1092
1231
  };
1093
- const { canAccept: v, fixed: C, hidePadding: T } = e.getRuleValue(m[0], c);
1094
- t = T, p = C;
1232
+ const { canAccept: O, fixed: A, hidePadding: V } = t.getRuleValue(c[0], s);
1233
+ n = V, u = A;
1095
1234
  }
1096
- function f() {
1097
- return t;
1235
+ function m() {
1236
+ return n;
1237
+ }
1238
+ function j(o) {
1239
+ return new Ee(o, e).getPropertyConfig(g);
1098
1240
  }
1099
- return { canAccepts: h, checkCanDeleteComponent: j, checkCanMoveComponent: A, resolveComponentContext: a, hideNestedPaddingInDesginerView: f };
1241
+ return { canAccepts: P, checkCanDeleteComponent: a, checkCanMoveComponent: d, resolveComponentContext: f, hideNestedPaddingInDesginerView: m, getPropsConfig: j };
1100
1242
  }
1101
- const De = /* @__PURE__ */ q({
1243
+ const Ve = /* @__PURE__ */ z({
1102
1244
  name: "FComponetDesign",
1103
- props: F,
1245
+ props: D,
1104
1246
  emits: [],
1105
1247
  setup(r, e) {
1106
- const t = w(), c = Y("design-item-context"), p = $e(c), b = he(t, c, p);
1107
- return W(() => {
1108
- t.value.componentInstance = b;
1109
- }), e.expose(b.value), () => _("div", {
1248
+ const t = E(), n = W("designer-host-service"), s = W("design-item-context"), u = De(s, n), y = je(t, s, u);
1249
+ return Q(() => {
1250
+ t.value.componentInstance = y;
1251
+ }), e.expose(y.value), () => X("div", {
1110
1252
  ref: t,
1111
1253
  class: "drag-container",
1112
- "data-dragref": `${c.schema.id}-container`
1254
+ "data-dragref": `${s.schema.id}-container`
1113
1255
  }, [e.slots.default && e.slots.default()]);
1114
1256
  }
1115
- }), Oe = "https://json-schema.org/draft/2020-12/schema", we = "https://farris-design.gitee.io/component.schema.json", Me = "component-ref", Ne = "A Farris Visual Component", Se = "object", Ee = {
1257
+ }), $e = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-design.gitee.io/component.schema.json", Ne = "component-ref", Be = "A Farris Visual Component", Fe = "object", Ue = {
1116
1258
  id: {
1117
1259
  description: "The unique identifier for a Section",
1118
1260
  type: "string"
@@ -1127,36 +1269,37 @@ const De = /* @__PURE__ */ q({
1127
1269
  type: "string",
1128
1270
  default: ""
1129
1271
  }
1130
- }, Ve = [
1272
+ }, Le = [
1131
1273
  "id",
1132
1274
  "type",
1133
1275
  "component"
1134
- ], ke = {
1135
- $schema: Oe,
1136
- $id: we,
1137
- title: Me,
1138
- description: Ne,
1139
- type: Se,
1140
- properties: Ee,
1141
- required: Ve
1142
- }, Fe = {
1276
+ ], qe = {
1277
+ $schema: $e,
1278
+ $id: ke,
1279
+ title: Ne,
1280
+ description: Be,
1281
+ type: Fe,
1282
+ properties: Ue,
1283
+ required: Le
1284
+ }, Ge = {
1143
1285
  id: { type: String },
1144
1286
  component: { type: String, default: "" }
1145
- }, Be = G(Fe, ke, H, Q), We = {
1287
+ }, We = H(Ge, qe, R, I), Xe = {
1146
1288
  install(r) {
1147
- r.component(S.name, S);
1289
+ r.component(k.name, k);
1148
1290
  },
1149
- register(r, e, t, c) {
1150
- r.component = S, e.component = L;
1291
+ register(r, e, t, n) {
1292
+ r.component = k, e.component = J;
1151
1293
  },
1152
1294
  registerDesigner(r, e) {
1153
- r.component = De, e.component = L, e["component-ref"] = Be;
1295
+ r.component = Ve, e.component = J, e["component-ref"] = We;
1154
1296
  }
1155
1297
  };
1156
1298
  export {
1157
- S as Component,
1158
- De as ComponentDesign,
1159
- F as componentProps,
1160
- We as default,
1161
- L as propsResolver
1299
+ k as Component,
1300
+ Ve as ComponentDesign,
1301
+ Qe as componentDesignProps,
1302
+ D as componentProps,
1303
+ Xe as default,
1304
+ J as propsResolver
1162
1305
  };