@farris/ui-vue 1.2.7 → 1.2.8

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 (206) hide show
  1. package/components/accordion/index.esm.js +79 -79
  2. package/components/avatar/index.esm.js +393 -440
  3. package/components/border-editor/index.esm.js +4 -4
  4. package/components/button/index.esm.js +1 -1
  5. package/components/button-edit/index.esm.js +353 -444
  6. package/components/button-group/index.esm.js +5 -5
  7. package/components/calendar/index.esm.js +176 -176
  8. package/components/capsule/index.esm.js +93 -93
  9. package/components/checkbox/index.esm.js +496 -542
  10. package/components/color-picker/index.esm.js +1 -1
  11. package/components/combo-list/index.esm.js +437 -483
  12. package/components/combo-tree/index.esm.js +8 -8
  13. package/components/component/index.esm.js +89 -89
  14. package/components/condition/index.esm.js +839 -726
  15. package/components/content-container/index.esm.js +61 -61
  16. package/components/data-grid/index.esm.js +4702 -4972
  17. package/components/data-view/index.esm.js +2999 -2875
  18. package/components/date-picker/index.esm.js +2626 -2672
  19. package/components/dependent-base/style.js +1 -0
  20. package/components/dependent-fluid/style.js +1 -0
  21. package/components/dependent-icon/style.js +1 -0
  22. package/components/dependent-input/style.js +1 -0
  23. package/components/dependent-table/style.js +1 -0
  24. package/components/designer-canvas/index.esm.js +478 -475
  25. package/components/designer-outline/index.esm.js +173 -131
  26. package/components/discussion-editor/index.esm.js +1 -1
  27. package/components/dropdown/index.esm.js +73 -73
  28. package/components/dynamic-form/index.esm.js +934 -976
  29. package/components/dynamic-resolver/index.esm.js +67 -35
  30. package/components/dynamic-view/index.esm.js +258 -249
  31. package/components/enum-editor/index.esm.js +3 -3
  32. package/components/events-editor/index.esm.js +178 -178
  33. package/components/expression-editor/index.esm.js +105 -105
  34. package/components/external-container/index.esm.js +1892 -1775
  35. package/components/field-selector/index.css +1 -1
  36. package/components/field-selector/index.esm.js +5245 -5514
  37. package/components/filter-bar/index.css +1 -1
  38. package/components/filter-bar/index.esm.js +1483 -1556
  39. package/components/flow-canvas/index.esm.js +678 -675
  40. package/components/image-cropper/index.esm.js +266 -266
  41. package/components/input-group/index.esm.js +668 -714
  42. package/components/layout/index.esm.js +148 -148
  43. package/components/list-nav/index.esm.js +109 -109
  44. package/components/list-view/index.esm.js +1679 -1563
  45. package/components/lookup/index.css +1 -1
  46. package/components/lookup/index.esm.js +6596 -6865
  47. package/components/mapping-editor/index.esm.js +5592 -5862
  48. package/components/message-box/index.esm.js +1 -1
  49. package/components/modal/index.esm.js +1 -1
  50. package/components/nav/index.esm.js +86 -86
  51. package/components/number-range/index.esm.js +1120 -0
  52. package/components/number-range/package.json +8 -0
  53. package/components/number-range/style.js +6 -0
  54. package/components/number-spinner/index.esm.js +1146 -0
  55. package/components/number-spinner/package.json +8 -0
  56. package/components/number-spinner/style.js +4 -0
  57. package/components/order/index.esm.js +988 -1034
  58. package/components/page-footer/index.esm.js +106 -106
  59. package/components/page-header/index.esm.js +1088 -1296
  60. package/components/pagination/index.esm.js +252 -252
  61. package/components/progress/index.esm.js +37 -37
  62. package/components/property-editor/index.esm.js +1416 -1462
  63. package/components/property-panel/index.css +1 -1
  64. package/components/property-panel/index.esm.js +757 -830
  65. package/components/query-solution/index.css +1 -0
  66. package/components/query-solution/index.esm.js +6935 -0
  67. package/components/query-solution/package.json +8 -0
  68. package/components/query-solution/style.js +2 -0
  69. package/components/radio-button/index.esm.js +64 -64
  70. package/components/radio-group/index.esm.js +452 -498
  71. package/components/rate/index.esm.js +92 -92
  72. package/components/response-layout/index.esm.js +33 -33
  73. package/components/response-layout-editor/index.esm.js +117 -117
  74. package/components/response-toolbar/index.esm.js +1021 -1238
  75. package/components/schema-selector/index.esm.js +3215 -3308
  76. package/components/search-box/index.esm.js +143 -143
  77. package/components/section/index.esm.js +209 -209
  78. package/components/smoke-detector/index.esm.js +22 -22
  79. package/components/spacing-editor/index.esm.js +2 -2
  80. package/components/splitter/index.esm.js +1097 -394
  81. package/components/step/index.esm.js +153 -153
  82. package/components/switch/index.esm.js +442 -488
  83. package/components/tabs/index.esm.js +1835 -2004
  84. package/components/tags/index.esm.js +215 -215
  85. package/components/text/index.esm.js +53 -53
  86. package/components/textarea/index.esm.js +451 -482
  87. package/components/time-picker/index.esm.js +1345 -1392
  88. package/components/transfer/index.esm.js +135 -135
  89. package/components/tree-grid/index.css +1 -1
  90. package/components/tree-grid/index.esm.js +5761 -6020
  91. package/components/tree-view/index.esm.js +2380 -2253
  92. package/components/uploader/index.esm.js +1 -1
  93. package/components/verify-detail/index.esm.js +232 -232
  94. package/components/video/index.esm.js +136 -136
  95. package/components/weather/index.esm.js +2 -2
  96. package/farris.all.esm.js +31630 -31224
  97. package/farris.all.umd.cjs +9 -9
  98. package/index.css +1 -1
  99. package/package.json +1 -1
  100. package/types/checkbox/index.d.ts +1 -0
  101. package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
  102. package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
  103. package/types/data-view/composition/types.d.ts +1 -1
  104. package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
  105. package/types/designer-canvas/src/types.d.ts +1 -1
  106. package/types/dynamic-form/index.d.ts +1 -0
  107. package/types/dynamic-form/src/types.d.ts +1 -1
  108. package/types/dynamic-resolver/index.d.ts +1 -0
  109. package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
  110. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  111. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
  112. package/types/modal/src/modal.props.d.ts +1 -4
  113. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
  114. package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
  115. package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
  116. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
  117. package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
  118. package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
  119. package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
  120. package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
  121. package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
  122. package/components/accordion/index.umd.cjs +0 -1
  123. package/components/avatar/index.umd.cjs +0 -1
  124. package/components/border-editor/index.umd.cjs +0 -1
  125. package/components/button/index.umd.cjs +0 -1
  126. package/components/button-edit/index.umd.cjs +0 -1
  127. package/components/button-group/index.umd.cjs +0 -1
  128. package/components/calculator/index.umd.cjs +0 -1
  129. package/components/calendar/index.umd.cjs +0 -1
  130. package/components/capsule/index.umd.cjs +0 -1
  131. package/components/checkbox/index.umd.cjs +0 -1
  132. package/components/color-picker/index.umd.cjs +0 -3
  133. package/components/combo-list/index.umd.cjs +0 -1
  134. package/components/combo-tree/index.umd.cjs +0 -1
  135. package/components/common/index.umd.cjs +0 -1
  136. package/components/component/index.umd.cjs +0 -1
  137. package/components/condition/index.umd.cjs +0 -1
  138. package/components/content-container/index.umd.cjs +0 -1
  139. package/components/data-grid/index.umd.cjs +0 -1
  140. package/components/data-view/index.umd.cjs +0 -1
  141. package/components/date-picker/index.umd.cjs +0 -1
  142. package/components/designer-canvas/index.umd.cjs +0 -1
  143. package/components/designer-outline/index.umd.cjs +0 -1
  144. package/components/designer-toolbox/index.umd.cjs +0 -1
  145. package/components/discussion-editor/index.umd.cjs +0 -3
  146. package/components/discussion-list/index.umd.cjs +0 -1
  147. package/components/drawer/index.umd.cjs +0 -1
  148. package/components/dropdown/index.umd.cjs +0 -2
  149. package/components/dynamic-form/index.umd.cjs +0 -1
  150. package/components/dynamic-resolver/index.umd.cjs +0 -1
  151. package/components/dynamic-view/index.umd.cjs +0 -1
  152. package/components/enum-editor/index.umd.cjs +0 -1
  153. package/components/events-editor/index.umd.cjs +0 -1
  154. package/components/expression-editor/index.umd.cjs +0 -1
  155. package/components/external-container/index.umd.cjs +0 -1
  156. package/components/field-selector/index.umd.cjs +0 -1
  157. package/components/filter-bar/index.umd.cjs +0 -1
  158. package/components/flow-canvas/index.umd.cjs +0 -1
  159. package/components/image-cropper/index.umd.cjs +0 -1
  160. package/components/input-group/index.umd.cjs +0 -1
  161. package/components/layout/index.umd.cjs +0 -1
  162. package/components/list-nav/index.umd.cjs +0 -1
  163. package/components/list-view/index.umd.cjs +0 -1
  164. package/components/loading/index.umd.cjs +0 -8
  165. package/components/locale/index.umd.cjs +0 -1
  166. package/components/lookup/index.umd.cjs +0 -1
  167. package/components/mapping-editor/index.umd.cjs +0 -1
  168. package/components/message-box/index.umd.cjs +0 -1
  169. package/components/modal/index.umd.cjs +0 -1
  170. package/components/nav/index.umd.cjs +0 -3
  171. package/components/notify/index.umd.cjs +0 -1
  172. package/components/order/index.umd.cjs +0 -1
  173. package/components/page-footer/index.umd.cjs +0 -1
  174. package/components/page-header/index.umd.cjs +0 -1
  175. package/components/pagination/index.umd.cjs +0 -1
  176. package/components/popover/index.umd.cjs +0 -1
  177. package/components/progress/index.umd.cjs +0 -3
  178. package/components/property-editor/index.umd.cjs +0 -3
  179. package/components/property-panel/index.umd.cjs +0 -1
  180. package/components/radio-button/index.umd.cjs +0 -1
  181. package/components/radio-group/index.umd.cjs +0 -1
  182. package/components/rate/index.umd.cjs +0 -1
  183. package/components/response-layout/index.umd.cjs +0 -1
  184. package/components/response-layout-editor/index.umd.cjs +0 -1
  185. package/components/response-toolbar/index.umd.cjs +0 -1
  186. package/components/schema-selector/index.umd.cjs +0 -8
  187. package/components/search-box/index.umd.cjs +0 -1
  188. package/components/section/index.umd.cjs +0 -1
  189. package/components/smoke-detector/index.umd.cjs +0 -1
  190. package/components/spacing-editor/index.umd.cjs +0 -1
  191. package/components/splitter/index.umd.cjs +0 -1
  192. package/components/step/index.umd.cjs +0 -1
  193. package/components/switch/index.umd.cjs +0 -1
  194. package/components/tabs/index.umd.cjs +0 -1
  195. package/components/tags/index.umd.cjs +0 -1
  196. package/components/text/index.umd.cjs +0 -1
  197. package/components/textarea/index.umd.cjs +0 -1
  198. package/components/time-picker/index.umd.cjs +0 -1
  199. package/components/tooltip/index.umd.cjs +0 -1
  200. package/components/transfer/index.umd.cjs +0 -1
  201. package/components/tree-grid/index.umd.cjs +0 -1
  202. package/components/tree-view/index.umd.cjs +0 -1
  203. package/components/uploader/index.umd.cjs +0 -2
  204. package/components/verify-detail/index.umd.cjs +0 -1
  205. package/components/video/index.umd.cjs +0 -1
  206. package/components/weather/index.umd.cjs +0 -16
@@ -1,106 +1,105 @@
1
- var q = Object.defineProperty;
2
- var _ = (o, e, t) => e in o ? q(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var C = (o, e, t) => _(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as $, toRefs as j, ref as T, computed as k, watch as U, createVNode as b, inject as z, onMounted as X } from "vue";
5
- import { cloneDeep as Y } from "lodash-es";
6
- const x = {}, W = {};
7
- function A(o) {
8
- const { properties: e, title: t } = o, n = Object.keys(e).reduce((r, c) => (r[c] = e[c].type === "object" && e[c].properties ? A(e[c]) : Y(e[c].default), r), {});
1
+ var _ = Object.defineProperty;
2
+ var H = (r, e, t) => e in r ? _(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var b = (r, e, t) => H(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as G, toRefs as L, ref as C, computed as S, watch as W, createVNode as w, inject as q, onMounted as x } from "vue";
5
+ import { cloneDeep as I } from "lodash-es";
6
+ import { getSchemaByType as z } from "../dynamic-resolver/index.esm.js";
7
+ const J = {}, Q = {};
8
+ function N(r) {
9
+ const { properties: e, title: t } = r, n = Object.keys(e).reduce((o, s) => (o[s] = e[s].type === "object" && e[s].properties ? N(e[s]) : I(e[s].default), o), {});
9
10
  return n.id = `${t}-${Date.now()}`, n;
10
11
  }
11
- function V(o, e = {}) {
12
- const t = x[o];
12
+ function A(r, e = {}) {
13
+ const t = J[r];
13
14
  if (t) {
14
- let n = A(t);
15
- const r = W[o];
16
- return n = r ? r({ getSchemaByType: V }, n, e) : n, n;
15
+ let n = N(t);
16
+ const o = Q[r];
17
+ return n = o ? o({ getSchemaByType: A }, n, e) : n, n;
17
18
  }
18
19
  return null;
19
20
  }
20
- function Z(o, e) {
21
- const t = A(e);
22
- return Object.keys(o).reduce((n, r) => (n[r] = o[r], n), t), t;
21
+ function K(r, e) {
22
+ const t = N(e);
23
+ return Object.keys(r).reduce((n, o) => (n[o] && typeof n[o] == "object" ? Object.assign(n[o], r[o]) : n[o] = r[o], n), t), t;
23
24
  }
24
- function J(o, e) {
25
- return Object.keys(o).filter((n) => o[n] != null).reduce((n, r) => {
26
- if (e.has(r)) {
27
- const c = e.get(r);
28
- if (typeof c == "string")
29
- n[c] = o[r];
25
+ function R(r, e) {
26
+ return Object.keys(r).filter((n) => r[n] != null).reduce((n, o) => {
27
+ if (e.has(o)) {
28
+ const s = e.get(o);
29
+ if (typeof s == "string")
30
+ n[s] = r[o];
30
31
  else {
31
- const m = c(r, o[r], o);
32
+ const m = s(o, r[o], r);
32
33
  Object.assign(n, m);
33
34
  }
34
35
  } else
35
- n[r] = o[r];
36
+ n[o] = r[o];
36
37
  return n;
37
38
  }, {});
38
39
  }
39
- function R(o, e, t = /* @__PURE__ */ new Map()) {
40
- const n = Z(o, e);
41
- return J(n, t);
40
+ function ee(r, e, t = /* @__PURE__ */ new Map()) {
41
+ const n = K(r, e);
42
+ return R(n, t);
42
43
  }
43
- function K(o = {}) {
44
- function e(a, l, p, s) {
45
- if (typeof p == "number")
46
- return s[a].length === p;
47
- if (typeof p == "object") {
48
- const g = Object.keys(p)[0], h = p[g];
49
- if (g === "not")
50
- return Number(s[a].length) !== Number(h);
51
- if (g === "moreThan")
52
- return Number(s[a].length) >= Number(h);
53
- if (g === "lessThan")
54
- return Number(s[a].length) <= Number(h);
44
+ function te(r = {}) {
45
+ function e(i, l, c, u) {
46
+ if (typeof c == "number")
47
+ return u[i].length === c;
48
+ if (typeof c == "object") {
49
+ const f = Object.keys(c)[0], g = c[f];
50
+ if (f === "not")
51
+ return Number(u[i].length) !== Number(g);
52
+ if (f === "moreThan")
53
+ return Number(u[i].length) >= Number(g);
54
+ if (f === "lessThan")
55
+ return Number(u[i].length) <= Number(g);
55
56
  }
56
57
  return !1;
57
58
  }
58
- function t(a, l, p, s) {
59
- return s[a] && s[a].propertyValue && String(s[a].propertyValue.value) === String(p);
59
+ function t(i, l, c, u) {
60
+ return u[i] && u[i].propertyValue && String(u[i].propertyValue.value) === String(c);
60
61
  }
61
62
  const n = /* @__PURE__ */ new Map([
62
63
  ["length", e],
63
64
  ["getProperty", t]
64
65
  ]);
65
- Object.keys(o).reduce((a, l) => (a.set(l, o[l]), a), n);
66
- function r(a, l) {
67
- const p = a;
68
- return typeof l == "number" ? [{ target: p, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: p, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((s) => {
69
- if (s === "length")
70
- return { target: p, operator: "length", param: null, value: l[s] };
71
- const g = s, h = l[s];
72
- return { target: p, operator: "getProperty", param: g, value: h };
66
+ Object.keys(r).reduce((i, l) => (i.set(l, r[l]), i), n);
67
+ function o(i, l) {
68
+ const c = i;
69
+ return typeof l == "number" ? [{ target: c, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: c, operator: "getProperty", param: i, value: !!l }] : typeof l == "object" ? Object.keys(l).map((u) => {
70
+ if (u === "length")
71
+ return { target: c, operator: "length", param: null, value: l[u] };
72
+ const f = u, g = l[u];
73
+ return { target: c, operator: "getProperty", param: f, value: g };
73
74
  }) : [];
74
75
  }
75
- function c(a) {
76
- return Object.keys(a).reduce((p, s) => {
77
- const g = r(s, a[s]);
78
- return p.push(...g), p;
76
+ function s(i) {
77
+ return Object.keys(i).reduce((c, u) => {
78
+ const f = o(u, i[u]);
79
+ return c.push(...f), c;
79
80
  }, []);
80
81
  }
81
- function m(a, l) {
82
- if (n.has(a.operator)) {
83
- const p = n.get(a.operator);
84
- return p && p(a.target, a.param, a.value, l) || !1;
82
+ function m(i, l) {
83
+ if (n.has(i.operator)) {
84
+ const c = n.get(i.operator);
85
+ return c && c(i.target, i.param, i.value, l) || !1;
85
86
  }
86
87
  return !1;
87
88
  }
88
- function u(a, l) {
89
- return c(a).reduce((g, h) => g && m(h, l), !0);
89
+ function p(i, l) {
90
+ return s(i).reduce((f, g) => f && m(g, l), !0);
90
91
  }
91
- function y(a, l) {
92
- const p = Object.keys(a), s = p.includes("allOf"), g = p.includes("anyOf"), h = s || g, S = (h ? a[h ? s ? "allOf" : "anyOf" : "allOf"] : [a]).map((D) => u(D, l));
93
- return s ? !S.includes(!1) : S.includes(!0);
92
+ function d(i, l) {
93
+ const c = Object.keys(i), u = c.includes("allOf"), f = c.includes("anyOf"), g = u || f, M = (g ? i[g ? u ? "allOf" : "anyOf" : "allOf"] : [i]).map((E) => p(E, l));
94
+ return u ? !M.includes(!1) : M.includes(!0);
94
95
  }
95
- return { parseValueSchema: y };
96
+ return { parseValueSchema: d };
96
97
  }
97
- const i = {
98
- Button: { type: "Button", name: "按钮", icon: "Button" },
99
- ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
98
+ const a = {
99
+ button: { type: "button", name: "按钮", icon: "Button" },
100
100
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
101
- "response-toolbar-item": { type: "response-toolbar-item", name: "工具栏项", icon: "Button" },
101
+ "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
102
102
  "content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
103
- DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
104
103
  "input-group": { type: "input-group", name: "文本", icon: "TextBox" },
105
104
  textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
106
105
  lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
@@ -111,114 +110,43 @@ const i = {
111
110
  "check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
112
111
  "check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
113
112
  "combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
114
- /** 暂时没用 */
115
- FlexLayout: { type: "FlexLayout", name: "弹性布局" },
116
- /** 暂时没用 */
117
- FlowLayout: { type: "FlowLayout", name: "流布局" },
118
- ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
119
- ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
113
+ "response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
114
+ "response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
115
+ "response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
120
116
  "tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
121
- TreeGridField: { type: "TreeGridField", name: "树表格列" },
122
- FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
123
- Form: { type: "Form", name: "卡片面板", icon: "Form" },
124
- QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
117
+ "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
125
118
  "data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
126
119
  "data-grid-column": { type: "data-grid-column", name: "表格列" },
127
- Panel: { type: "Panel", name: "面板", icon: "ContentContainer" },
128
- Module: { type: "Module", name: "模块", icon: "Module" },
120
+ module: { type: "Module", name: "模块", icon: "Module" },
129
121
  component: { type: "component", name: "组件", icon: "Component" },
130
- ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
131
- Image: { type: "Image", name: "图像", icon: "Image" },
132
- ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
133
- HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
134
- ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
135
- RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
136
122
  tabs: { type: "tabs", name: "标签页", icon: "Tab" },
137
123
  "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
138
124
  "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
139
- Tag: { type: "Tag", name: "Tag", icon: "Tag" },
140
- Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
141
- HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
142
- ListView: { type: "ListView", name: "列表", icon: "ListView" },
143
- RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
144
- TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
145
- TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
125
+ "time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
146
126
  section: { type: "section", name: "分组面板", icon: "Section" },
147
- SectionToolbar: { type: "SectionToolbar", name: "分组面板工具栏" },
148
- SectionToolbarItem: { type: "SectionToolbarItem", name: "分组面板按钮" },
149
- QueryScheme: { type: "QueryScheme", name: "筛选方案", icon: "QueryScheme" },
150
- FormHeader: { type: "FormHeader", name: "翻页" },
151
- Splitter: { type: "Splitter", name: "分栏面板", icon: "Splitter" },
152
- SplitterPane: { type: "SplitterPane", name: "分栏面板项", dependentParentControl: "Splitter" },
153
- WizardDetail: { type: "WizardDetail", name: "向导详情页" },
154
- WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
155
- Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
156
- MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
157
- Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
158
- avatar: { type: "avatar", name: "头像", icon: "Avatar" },
159
- ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
160
- ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
161
- NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
162
- Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
163
- LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
164
- ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
165
- FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
166
- FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
167
- ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
168
- MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
169
- MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
170
- Footer: { type: "Footer", name: "页脚" },
171
- DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
172
- DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
173
- NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
174
- Tags: { type: "Tags", name: "标记组", icon: "Tags" },
175
- Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
127
+ "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
128
+ "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
129
+ splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
130
+ "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
131
+ "component-ref": { type: "component-ref", name: "组件引用节点" },
132
+ uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
176
133
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
177
- ModalFooter: { type: "ModalFooter", name: "弹窗页脚", icon: "ModalFooter" },
178
- ScrollCollapsibleArea: { type: "ScrollCollapsibleArea", name: "滚动收折区域", icon: "ScrollCollapsibleArea" },
179
- PersonnelSelector: { type: "PersonnelSelector", name: "人员选择", icon: "PersonnelSelector" },
180
- Table: { type: "Table", name: "表格", icon: "DataGrid" },
181
- LoopContainer: { type: "LoopContainer", name: "循环容器", icon: "ContentContainer" },
182
- FileUploadPreview: { type: "FileUploadPreview", name: "附件上传预览", icon: "FileUpload" },
183
- DynamicArea: { type: "DynamicArea", name: "动态区域", icon: "ContentContainer" },
184
- DynamicAreaItem: { type: "DynamicAreaItem", name: "动态区域项", icon: "ContentContainer" },
185
- TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
186
- HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
187
- ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
188
- HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
189
- ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
190
- OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
191
- AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
192
- EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
193
- OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
194
- CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
195
- ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
196
- AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
197
- /** 查询类 start */
198
- Charts: { type: "Charts", name: "图表", icon: "Charts" },
199
- QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
200
- SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
201
- QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
202
- QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
203
- /** 查询类 end */
204
- /** 审批类 start */
205
- ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
206
- ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
207
- /** 审批类 end */
208
- }, ee = {}, te = {};
209
- K();
210
- function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u, r = {}, c = (m) => m) {
211
- return x[e.title] = e, W[e.title] = n, ee[e.title] = r, te[e.title] = c, (m = {}) => {
212
- const u = R(m, e, t), y = Object.keys(o).reduce((a, l) => (a[l] = o[l].default, a), {});
213
- return Object.assign(y, u);
134
+ "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
135
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
136
+ }, ne = {}, oe = {};
137
+ te();
138
+ function re(r, e, t = /* @__PURE__ */ new Map(), n = (m, p, d) => p, o = {}, s = (m) => m) {
139
+ return J[e.title] = e, Q[e.title] = n, ne[e.title] = o, oe[e.title] = s, (m = {}) => {
140
+ const p = ee(m, e, t), d = Object.keys(r).reduce((i, l) => (i[l] = r[l].default, i), {});
141
+ return Object.assign(d, p);
214
142
  };
215
143
  }
216
- function oe(o, e) {
144
+ function ie(r, e) {
217
145
  return { customClass: e.class, customStyle: e.style };
218
146
  }
219
- const re = /* @__PURE__ */ new Map([
220
- ["appearance", oe]
221
- ]), ie = "https://json-schema.org/draft/2020-12/schema", ae = "https://farris-design.gitee.io/switch.schema.json", le = "switch", ce = "A Farris Component", pe = "object", se = {
147
+ const ae = /* @__PURE__ */ new Map([
148
+ ["appearance", ie]
149
+ ]), le = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-design.gitee.io/switch.schema.json", ce = "switch", pe = "A Farris Component", ue = "object", de = {
222
150
  id: {
223
151
  description: "The unique identifier for a switch",
224
152
  type: "string"
@@ -290,22 +218,22 @@ const re = /* @__PURE__ */ new Map([
290
218
  type: "enum",
291
219
  default: "medium"
292
220
  }
293
- }, ue = [
221
+ }, me = [
294
222
  "id",
295
223
  "type"
296
- ], de = {
297
- $schema: ie,
298
- $id: ae,
299
- title: le,
300
- description: ce,
301
- type: pe,
302
- properties: se,
303
- required: ue
224
+ ], ye = {
225
+ $schema: le,
226
+ $id: se,
227
+ title: ce,
228
+ description: pe,
229
+ type: ue,
230
+ properties: de,
231
+ required: me
304
232
  };
305
- function me(o, e, t) {
233
+ function fe(r, e, t) {
306
234
  return e;
307
235
  }
308
- const E = {
236
+ const $ = {
309
237
  /** 组件值*/
310
238
  modelValue: { type: Boolean, default: !1 },
311
239
  /** 禁用 */
@@ -321,21 +249,21 @@ const E = {
321
249
  /** 开关值变化事件 */
322
250
  onModelValueChanged: { type: Function, default: () => {
323
251
  } }
324
- }, G = ne(E, de, re, me), P = /* @__PURE__ */ $({
252
+ }, X = re($, ye, ae, fe), D = /* @__PURE__ */ G({
325
253
  name: "FSwitch",
326
- props: E,
254
+ props: $,
327
255
  emits: ["update:modelValue", "modelValueChanged"],
328
- setup(o, e) {
256
+ setup(r, e) {
329
257
  const {
330
258
  disabled: t,
331
259
  size: n,
332
- onLabel: r,
333
- offLabel: c,
260
+ onLabel: o,
261
+ offLabel: s,
334
262
  onBackground: m,
335
- offBackground: u,
336
- onColor: y,
337
- offColor: a
338
- } = j(o), l = T(o.modelValue), p = k(() => ({
263
+ offBackground: p,
264
+ onColor: d,
265
+ offColor: i
266
+ } = L(r), l = C(r.modelValue), c = S(() => ({
339
267
  switch: !0,
340
268
  "f-cmp-switch": !0,
341
269
  checked: l.value,
@@ -343,234 +271,296 @@ const E = {
343
271
  "switch-large": n.value === "large",
344
272
  "switch-medium": n.value === "medium",
345
273
  "switch-small": n.value === "small"
346
- })), s = k(() => l.value ? {
274
+ })), u = S(() => l.value ? {
347
275
  outline: "none",
348
276
  background: m.value
349
277
  } : {
350
278
  outline: "none",
351
- backgroundColor: u.value
352
- }), g = k(() => l.value ? {
353
- background: y.value
279
+ backgroundColor: p.value
280
+ }), f = S(() => l.value ? {
281
+ background: d.value
354
282
  } : {
355
- backgroundColor: a.value
356
- }), h = k(() => (r == null ? void 0 : r.value) || (c == null ? void 0 : c.value));
357
- function F() {
283
+ backgroundColor: i.value
284
+ }), g = S(() => (o == null ? void 0 : o.value) || (s == null ? void 0 : s.value));
285
+ function V() {
358
286
  t.value || (l.value = !l.value, e.emit("update:modelValue", l.value));
359
287
  }
360
- return U(l, (w, S) => {
361
- w !== S && e.emit("modelValueChanged", w);
362
- }), U(() => o.modelValue, (w, S) => {
363
- w !== S && (l.value = w);
364
- }), () => b("span", {
288
+ return W(l, (k, M) => {
289
+ k !== M && e.emit("modelValueChanged", k);
290
+ }), W(() => r.modelValue, (k, M) => {
291
+ k !== M && (l.value = k);
292
+ }), () => w("span", {
365
293
  tabindex: "0",
366
294
  role: "button",
367
- class: p.value,
368
- style: s.value,
369
- onClick: F
370
- }, [h.value && b("span", {
295
+ class: c.value,
296
+ style: u.value,
297
+ onClick: V
298
+ }, [g.value && w("span", {
371
299
  class: "switch-pane"
372
- }, [b("span", {
300
+ }, [w("span", {
373
301
  class: "switch-label-checked"
374
- }, [r == null ? void 0 : r.value]), b("span", {
302
+ }, [o == null ? void 0 : o.value]), w("span", {
375
303
  class: "switch-label-unchecked"
376
- }, [c == null ? void 0 : c.value])]), b("small", {
377
- style: g.value
304
+ }, [s == null ? void 0 : s.value])]), w("small", {
305
+ style: f.value
378
306
  }, [e.slots.default && e.slots.default()])]);
379
307
  }
380
308
  });
381
- function ye(o, e, t) {
382
- var N;
309
+ function he(r, e, t) {
310
+ var O;
383
311
  function n() {
384
312
  t != null && t.resolveComponentContext && t.resolveComponentContext();
385
313
  }
386
314
  n();
387
- const r = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", m = T();
388
- function u() {
315
+ const o = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", m = C();
316
+ function p() {
389
317
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
390
318
  }
391
- function y() {
319
+ function d() {
392
320
  return !1;
393
321
  }
394
- function a() {
322
+ function i() {
395
323
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
396
324
  }
397
325
  function l() {
398
326
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
399
327
  }
400
- function p(d) {
401
- if (!d || !d.value)
328
+ function c(y) {
329
+ if (!y || !y.value)
402
330
  return null;
403
- if (d.value.schema && d.value.schema.type === "component")
404
- return d.value;
405
- const v = T(d == null ? void 0 : d.value.parent), f = p(v);
406
- return f || null;
331
+ if (y.value.schema && y.value.schema.type === "component")
332
+ return y.value;
333
+ const v = C(y == null ? void 0 : y.value.parent), h = c(v);
334
+ return h || null;
407
335
  }
408
- function s(d = e) {
409
- const { componentInstance: v, designerItemElementRef: f } = d;
410
- return !v || !v.value ? null : v.value.canMove ? f : s(d.parent);
336
+ function u(y = e) {
337
+ const { componentInstance: v, designerItemElementRef: h } = y;
338
+ return !v || !v.value ? null : v.value.canMove ? h : u(y.parent);
411
339
  }
412
- function g(d) {
413
- return !!t && t.canAccepts(d);
340
+ function f(y) {
341
+ return !!t && t.canAccepts(y);
414
342
  }
415
- function h() {
343
+ function g() {
416
344
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
417
345
  }
418
- function F() {
346
+ function V() {
419
347
  }
420
- function w(d, v) {
348
+ function k(y, v) {
421
349
  v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
422
350
  }
423
- function S(d) {
424
- const { componentType: v } = d;
425
- let f = V(v, d);
426
- t && t.onResolveNewComponentSchema && (f = t.onResolveNewComponentSchema(d, f));
427
- const B = v.toLowerCase().replace("-", "_");
428
- return f && !f.id && f.type === v && (f.id = `${B}_${Math.random().toString().slice(2, 6)}`), f;
351
+ function M(y) {
352
+ const { componentType: v } = y;
353
+ let h = A(v, y);
354
+ t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(y, h));
355
+ const P = v.toLowerCase().replace("-", "_");
356
+ return h && !h.id && h.type === v && (h.id = `${P}_${Math.random().toString().slice(2, 6)}`), h;
429
357
  }
430
- function O(d, v) {
431
- const f = String(d.getAttribute("data-controltype")), B = d.getAttribute("data-feature"), L = B ? JSON.parse(B) : {};
432
- L.parentComponentInstance = m.value;
433
- let M = V(f, L);
434
- t && t.onAcceptNewChildElement && (M = t.onAcceptNewChildElement(d, v, M));
435
- const I = f.toLowerCase().replace("-", "_");
436
- return M && !M.id && M.type === f && (M.id = `${I}_${Math.random().toString().slice(2, 6)}`), M;
358
+ function j(y, v) {
359
+ const h = String(y.getAttribute("data-controltype")), P = y.getAttribute("data-feature"), U = P ? JSON.parse(P) : {};
360
+ U.parentComponentInstance = m.value;
361
+ let T = A(h, U);
362
+ t && t.onAcceptNewChildElement && (T = t.onAcceptNewChildElement(y, v, T));
363
+ const Z = h.toLowerCase().replace("-", "_");
364
+ return T && !T.id && T.type === h && (T.id = `${Z}_${Math.random().toString().slice(2, 6)}`), T;
437
365
  }
438
- function D(d) {
366
+ function E(y) {
439
367
  }
440
- function Q(...d) {
368
+ function Y(...y) {
441
369
  if (t && t.getPropsConfig)
442
- return t.getPropsConfig(...d);
370
+ return t.getPropsConfig(...y);
443
371
  }
444
372
  return m.value = {
445
- canMove: u(),
446
- canSelectParent: y(),
447
- canDelete: a(),
373
+ canMove: p(),
374
+ canSelectParent: d(),
375
+ canDelete: i(),
448
376
  canNested: !l(),
449
377
  contents: e == null ? void 0 : e.schema.contents,
450
- elementRef: o,
451
- parent: (N = e == null ? void 0 : e.parent) == null ? void 0 : N.componentInstance,
378
+ elementRef: r,
379
+ parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
452
380
  schema: e == null ? void 0 : e.schema,
453
- styles: r,
454
- designerClass: c,
455
- canAccepts: g,
456
- getBelongedComponentInstance: p,
457
- getDraggableDesignItemElement: s,
458
- getDraggingDisplayText: h,
459
- getPropConfig: Q,
460
- getDragScopeElement: F,
461
- onAcceptMovedChildElement: w,
462
- onAcceptNewChildElement: O,
463
- onChildElementMovedOut: D,
464
- addNewChildComponentSchema: S,
381
+ styles: o,
382
+ designerClass: s,
383
+ canAccepts: f,
384
+ getBelongedComponentInstance: c,
385
+ getDraggableDesignItemElement: u,
386
+ getDraggingDisplayText: g,
387
+ getPropConfig: Y,
388
+ getDragScopeElement: V,
389
+ onAcceptMovedChildElement: k,
390
+ onAcceptNewChildElement: j,
391
+ onChildElementMovedOut: E,
392
+ addNewChildComponentSchema: M,
465
393
  updateDragAndDropRules: n,
466
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || T(!1),
467
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || T(!1)
394
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || C(!1),
395
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
468
396
  }, m;
469
397
  }
470
- class H {
398
+ class ge {
399
+ constructor(e, t) {
400
+ b(this, "componentId");
401
+ b(this, "viewModelId");
402
+ b(this, "eventsEditorUtils");
403
+ b(this, "formSchemaUtils");
404
+ b(this, "formMetadataConverter");
405
+ b(this, "designViewModelUtils");
406
+ b(this, "designViewModelField");
407
+ b(this, "controlCreatorUtils");
408
+ b(this, "designerHostService");
409
+ b(this, "schemaService", null);
410
+ b(this, "metadataService", null);
411
+ b(this, "propertyConfig", {
412
+ type: "object",
413
+ categories: {}
414
+ });
415
+ var n;
416
+ 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;
417
+ }
418
+ getTableInfo() {
419
+ var e;
420
+ return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
421
+ }
422
+ setDesignViewModelField(e) {
423
+ const t = e.binding && e.binding.type === "Form" && e.binding.field;
424
+ if (t) {
425
+ if (!this.designViewModelField) {
426
+ const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
427
+ this.designViewModelField = n.fields.find((o) => o.id === t);
428
+ }
429
+ e.updateOn = this.designViewModelField.updateOn;
430
+ }
431
+ }
432
+ changeFieldEditorType(e, t) {
433
+ }
434
+ getBasicPropConfig(e) {
435
+ return {
436
+ description: "Basic Information",
437
+ title: "基本信息",
438
+ properties: {
439
+ id: {
440
+ description: "组件标识",
441
+ title: "标识",
442
+ type: "string",
443
+ readonly: !0
444
+ },
445
+ type: {
446
+ description: "组件类型",
447
+ title: "控件类型",
448
+ type: "select",
449
+ editor: {
450
+ type: "combo-list",
451
+ textField: "name",
452
+ valueField: "value",
453
+ data: [{ value: e.type, name: a[e.type].name }]
454
+ }
455
+ }
456
+ }
457
+ };
458
+ }
459
+ getAppearanceConfig(e = null) {
460
+ return {
461
+ title: "样式",
462
+ description: "Appearance",
463
+ properties: {
464
+ class: {
465
+ title: "class样式",
466
+ type: "string",
467
+ description: "组件的CSS样式",
468
+ $converter: "/converter/appearance.converter"
469
+ },
470
+ style: {
471
+ title: "style样式",
472
+ type: "string",
473
+ description: "组件的样式",
474
+ $converter: "/converter/appearance.converter"
475
+ }
476
+ }
477
+ };
478
+ }
479
+ }
480
+ const B = class B {
481
+ /**
482
+ * 根据绑定字段类型获取可用的输入类控件
483
+ */
471
484
  static getEditorTypesByMDataType(e) {
472
- const t = this.fieldControlTypeMapping[e];
485
+ const t = B.fieldControlTypeMapping[e];
473
486
  return t || [{ key: "", value: "" }];
474
487
  }
475
- }
488
+ /**
489
+ * 获取所有输入类控件
490
+ */
491
+ static getAllInputTypes() {
492
+ const e = [];
493
+ for (let t in B.fieldControlTypeMapping)
494
+ B.fieldControlTypeMapping[t].forEach((n) => {
495
+ e.find((o) => o.key === n.key && o.value === n.value) || e.push({ key: n.key, value: n.value });
496
+ });
497
+ return e;
498
+ }
499
+ };
476
500
  /**
477
501
  * <字段类型,可配置的控件类型列表>的映射
478
502
  */
479
- C(H, "fieldControlTypeMapping", {
503
+ b(B, "fieldControlTypeMapping", {
480
504
  String: [
481
- { key: i["input-group"].type, value: i["input-group"].name },
482
- { key: i.lookup.type, value: i.lookup.name },
483
- { key: i.Image.type, value: i.Image.name },
484
- { key: i["date-picker"].type, value: i["date-picker"].name },
485
- { key: i["check-box"].type, value: i["check-box"].name },
486
- { key: i["radio-group"].type, value: i["radio-group"].name },
487
- { key: i["combo-list"].type, value: i["combo-list"].name },
488
- { key: i.textarea.type, value: i.textarea.name }
489
- // { key: DgControl.Tags.type, value: DgControl.Tags.name },
505
+ { key: a["input-group"].type, value: a["input-group"].name },
506
+ { key: a.lookup.type, value: a.lookup.name },
507
+ { key: a["date-picker"].type, value: a["date-picker"].name },
508
+ { key: a["check-box"].type, value: a["check-box"].name },
509
+ { key: a["radio-group"].type, value: a["radio-group"].name },
510
+ { key: a["combo-list"].type, value: a["combo-list"].name },
511
+ { key: a.textarea.type, value: a.textarea.name }
490
512
  ],
491
513
  Text: [
492
- { key: i.textarea.type, value: i.textarea.name },
493
- { key: i.avatar.type, value: i.avatar.name },
494
- { key: i.lookup.type, value: i.lookup.name }
514
+ { key: a.textarea.type, value: a.textarea.name },
515
+ { key: a.lookup.type, value: a.lookup.name }
495
516
  ],
496
517
  Decimal: [
497
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
518
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
498
519
  ],
499
520
  Integer: [
500
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
521
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
501
522
  ],
502
523
  Number: [
503
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
524
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
504
525
  ],
505
526
  BigNumber: [
506
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
527
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
507
528
  ],
508
529
  Date: [
509
- { key: i["date-picker"].type, value: i["date-picker"].name }
530
+ { key: a["date-picker"].type, value: a["date-picker"].name }
510
531
  ],
511
532
  DateTime: [
512
- { key: i["date-picker"].type, value: i["date-picker"].name }
533
+ { key: a["date-picker"].type, value: a["date-picker"].name }
513
534
  ],
514
535
  Boolean: [
515
- { key: i.switch.type, value: i.switch.name },
516
- { key: i["check-box"].type, value: i["check-box"].name }
536
+ { key: a.switch.type, value: a.switch.name },
537
+ { key: a["check-box"].type, value: a["check-box"].name }
517
538
  ],
518
539
  Enum: [
519
- { key: i["combo-list"].type, value: i["combo-list"].name },
520
- { key: i["radio-group"].type, value: i["radio-group"].name }
540
+ { key: a["combo-list"].type, value: a["combo-list"].name },
541
+ { key: a["radio-group"].type, value: a["radio-group"].name }
521
542
  ],
522
543
  Object: [
523
- { key: i.lookup.type, value: i.lookup.name },
524
- { key: i["combo-list"].type, value: i["combo-list"].name },
525
- { key: i["radio-group"].type, value: i["radio-group"].name }
526
- ],
527
- EmployeeSelector: [
528
- { key: i.EmployeeSelector.type, value: i.EmployeeSelector.name }
529
- ],
530
- AdminOrganizationSelector: [
531
- { key: i.AdminOrganizationSelector.type, value: i.AdminOrganizationSelector.name }
544
+ { key: a.lookup.type, value: a.lookup.name },
545
+ { key: a["combo-list"].type, value: a["combo-list"].name },
546
+ { key: a["radio-group"].type, value: a["radio-group"].name }
532
547
  ]
533
548
  });
534
- class ge {
549
+ let F = B;
550
+ const ve = C(0);
551
+ class be extends ge {
535
552
  constructor(e, t) {
536
- C(this, "componentId");
537
- C(this, "viewModelId");
538
- C(this, "eventsEditorUtils");
539
- C(this, "formSchemaUtils");
540
- C(this, "formMetadataConverter");
541
- C(this, "designViewModelUtils");
542
- C(this, "designViewModelField");
543
- C(this, "controlCreatorUtils");
544
- C(this, "designerHostService");
545
- C(this, "schemaService", null);
546
- C(this, "metadataService", null);
547
- C(this, "propertyConfig", {
548
- type: "object",
549
- categories: {}
550
- });
551
- var n;
552
- 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;
553
- }
554
- getTableInfo() {
555
- var e;
556
- return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
557
- }
558
- setDesignViewModelField(e) {
559
- const t = e.binding && e.binding.type === "Form" && e.binding.field;
560
- if (t) {
561
- if (!this.designViewModelField) {
562
- const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
563
- this.designViewModelField = n.fields.find((r) => r.id === t);
564
- }
565
- e.updateOn = this.designViewModelField.updateOn;
566
- }
553
+ super(e, t);
567
554
  }
568
- changeFieldEditorType(e, t) {
555
+ getPropertyConfig(e, t) {
556
+ return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
569
557
  }
570
- getBasicPropConfig(e) {
571
- var n, r;
572
- var t = this;
573
- return this.setDesignViewModelField(e), {
558
+ getBasicProperties(e, t) {
559
+ var m;
560
+ var n = this;
561
+ this.setDesignViewModelField(e);
562
+ const o = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
563
+ return {
574
564
  description: "Basic Information",
575
565
  title: "基本信息",
576
566
  properties: {
@@ -590,63 +580,48 @@ class ge {
590
580
  type: "combo-list",
591
581
  textField: "value",
592
582
  valueField: "key",
593
- data: H.getEditorTypesByMDataType(((r = (n = t.designViewModelField) == null ? void 0 : n.type) == null ? void 0 : r.name) || ""),
594
- editable: !1
583
+ editable: !1,
584
+ data: n.designViewModelField ? F.getEditorTypesByMDataType((m = n.designViewModelField.type) == null ? void 0 : m.name) : F.getAllInputTypes()
595
585
  }
596
586
  },
597
587
  label: {
598
588
  title: "标签",
599
589
  type: "string",
600
590
  $converter: "/converter/form-group-label.converter"
591
+ },
592
+ binding: {
593
+ description: "绑定的表单字段",
594
+ title: "绑定",
595
+ $converter: "/converter/field-selector.converter",
596
+ editor: {
597
+ type: "field-selector",
598
+ bindingType: { enable: !1 },
599
+ editorParams: {
600
+ propertyData: e,
601
+ formBasicInfo: o
602
+ },
603
+ columns: [
604
+ { field: "name", title: "字段名称" },
605
+ { field: "bindingField", title: "绑定字段" },
606
+ { field: "fieldType", title: "字段类型" }
607
+ ],
608
+ textField: "bindingField",
609
+ data: s
610
+ }
601
611
  }
602
612
  },
603
- setPropertyRelates(c, m) {
604
- if (c)
605
- switch (c && c.propertyID) {
613
+ setPropertyRelates(p, d) {
614
+ if (p)
615
+ switch (p && p.propertyID) {
606
616
  case "type": {
607
- t.changeControlType(e, c);
617
+ n.changeControlType(e, p, t);
608
618
  break;
609
619
  }
610
620
  }
611
621
  }
612
622
  };
613
623
  }
614
- /**
615
- * 卡片控件:切换控件类型后事件
616
- * @param propertyData 控件DOM属性
617
- * @param newControlType 新控件类型
618
- */
619
- changeControlType(e, t) {
620
- var a, l, p, s, g;
621
- const n = t.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
622
- let c = this.getControlParentContainer(e.id, r);
623
- if (!c)
624
- return;
625
- const m = c.contents.findIndex((h) => h.id === e.id), u = c.contents[m];
626
- let y;
627
- this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
628
- editor: {
629
- $type: n
630
- },
631
- name: this.designViewModelField.name,
632
- require: this.designViewModelField.require,
633
- readonly: this.designViewModelField.readonly
634
- }, !1), y = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, n)), Object.assign(y, {
635
- id: u.id,
636
- appearance: u.appearance,
637
- size: u.size,
638
- label: u.label
639
- }), Object.assign(y.editor, {
640
- isTextArea: y.isTextArea && u.isTextArea,
641
- type: n || "",
642
- placeHolder: (a = u.editor) == null ? void 0 : a.placeHolder,
643
- holdPlace: (l = u.editor) == null ? void 0 : l.holdPlace,
644
- readonly: (p = u.editor) == null ? void 0 : p.readonly,
645
- require: (s = u.editor) == null ? void 0 : s.require,
646
- visible: (g = u.editor) == null ? void 0 : g.visible
647
- }), c.contents.splice(m, 1, y);
648
- }
649
- getAppearanceConfig(e = null) {
624
+ getAppearanceProperties(e) {
650
625
  return {
651
626
  title: "样式",
652
627
  description: "Appearance",
@@ -676,73 +651,52 @@ class ge {
676
651
  }
677
652
  };
678
653
  }
679
- /**
680
- * 获取控件:以contents为节点进行定位
681
- * @param controlId 控件ID
682
- * @param domJson 容器
683
- */
684
- getControlParentContainer(e, t) {
685
- let n;
686
- if (!t || !t.contents || t.contents.length === 0)
687
- return null;
688
- for (const r of t.contents) {
689
- if (r.id === e)
690
- return n = t, t;
691
- if (n = this.getControlParentContainer(e, r), n)
692
- return n;
693
- }
694
- }
695
- }
696
- class he extends ge {
697
- constructor(e, t) {
698
- super(e, t);
699
- }
700
- getBasicProperties(e) {
701
- let t = this.getBasicPropConfig(e);
702
- return t.properties.binding = this.getFieldSelectorOptions(e), t;
703
- }
704
- getAppearanceProperties(e) {
705
- return this.getAppearanceConfig(e);
706
- }
707
654
  getEditorProperties(e) {
708
655
  return this.getComponentConfig(e);
709
656
  }
710
- getPropertyConfig(e) {
711
- return this.propertyConfig.categories.basic = this.getBasicProperties(e), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
712
- }
713
- getFieldSelectorOptions(e) {
714
- const t = this.formSchemaUtils.getFormMetadataBasicInfo(), n = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
715
- return {
716
- description: "绑定的表单字段",
717
- title: "绑定",
718
- $converter: "/converter/field-selector.converter",
657
+ /**
658
+ * 卡片控件:切换控件类型后事件
659
+ * @param propertyData 控件DOM属性
660
+ * @param newControlType 新控件类型
661
+ */
662
+ changeControlType(e, t, n) {
663
+ var i, l, c, u;
664
+ const o = t.propertyValue, s = n && n.parent && n.parent.schema;
665
+ if (!s)
666
+ return;
667
+ const m = s.contents.findIndex((f) => f.id === e.id), p = s.contents[m];
668
+ let d;
669
+ this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
719
670
  editor: {
720
- type: "field-selector",
721
- bindingType: { enable: !1 },
722
- editorParams: {
723
- propertyData: e,
724
- formBasicInfo: t
725
- },
726
- columns: [
727
- { field: "name", title: "字段名称" },
728
- { field: "bindingField", title: "绑定字段" },
729
- { field: "fieldType", title: "字段类型" }
730
- ],
731
- textField: "bindingField",
732
- data: n
733
- }
734
- };
735
- }
736
- getBindingOtions(e) {
737
- return this.getFieldSelectorOptions(e);
671
+ $type: o
672
+ },
673
+ name: this.designViewModelField.name,
674
+ require: this.designViewModelField.require,
675
+ readonly: this.designViewModelField.readonly
676
+ }, !1), d = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, o)), d || (d = z("form-group") || {}, d.editor = z(o) || {}, delete d.editor.id, delete d.editor.binding, delete d.editor.appearance), Object.assign(d, {
677
+ id: p.id,
678
+ appearance: p.appearance,
679
+ size: p.size,
680
+ label: p.label,
681
+ binding: p.binding,
682
+ visible: p.visible
683
+ }), Object.assign(d.editor, {
684
+ isTextArea: d.isTextArea && p.isTextArea,
685
+ placeholder: (i = p.editor) == null ? void 0 : i.placeholder,
686
+ holdPlace: (l = p.editor) == null ? void 0 : l.holdPlace,
687
+ readonly: (c = p.editor) == null ? void 0 : c.readonly,
688
+ require: (u = p.editor) == null ? void 0 : u.require
689
+ }), s.contents.splice(m, 1), s.contents.splice(m, 0, d), n.schema = Object.assign(p, d), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
690
+ (f) => f.classList.remove("dgComponentSelected")
691
+ ), ve.value++;
738
692
  }
739
693
  getComponentConfig(e, t = {}, n = {}) {
740
- const r = Object.assign({
694
+ const o = Object.assign({
741
695
  description: "组件信息",
742
696
  title: "组件信息",
743
697
  type: "input-group",
744
698
  $converter: "/converter/property-editor.converter"
745
- }, t), c = Object.assign({
699
+ }, t), s = Object.assign({
746
700
  readonly: {
747
701
  description: "",
748
702
  title: "只读",
@@ -764,10 +718,10 @@ class he extends ge {
764
718
  type: "string"
765
719
  }
766
720
  }, n);
767
- return { ...r, properties: { ...c } };
721
+ return { ...o, properties: { ...s } };
768
722
  }
769
723
  }
770
- class fe extends he {
724
+ class we extends be {
771
725
  constructor(e, t) {
772
726
  super(e, t);
773
727
  }
@@ -822,114 +776,114 @@ class fe extends he {
822
776
  });
823
777
  }
824
778
  }
825
- function ve(o, e) {
826
- o.schema;
827
- const t = T(!0), n = T(!0);
828
- function r(p) {
779
+ function Ce(r, e) {
780
+ r.schema;
781
+ const t = C(!0), n = C(!0);
782
+ function o(c) {
829
783
  return !1;
830
784
  }
831
- function c() {
785
+ function s() {
832
786
  return !1;
833
787
  }
834
788
  function m() {
835
789
  return !1;
836
790
  }
837
- function u() {
791
+ function p() {
838
792
  return !0;
839
793
  }
840
- function y(p) {
794
+ function d(c) {
841
795
  }
842
- function a() {
796
+ function i() {
843
797
  }
844
- function l(p) {
798
+ function l(c) {
845
799
  return null;
846
800
  }
847
801
  return {
848
- canAccepts: r,
849
- checkCanDeleteComponent: c,
802
+ canAccepts: o,
803
+ checkCanDeleteComponent: s,
850
804
  checkCanMoveComponent: m,
851
- hideNestedPaddingInDesginerView: u,
852
- onAcceptMovedChildElement: y,
853
- resolveComponentContext: a,
805
+ hideNestedPaddingInDesginerView: p,
806
+ onAcceptMovedChildElement: d,
807
+ resolveComponentContext: i,
854
808
  triggerBelongedComponentToMoveWhenMoved: t,
855
809
  triggerBelongedComponentToDeleteWhenDeleted: n,
856
810
  getPropsConfig: l
857
811
  };
858
812
  }
859
- function Ce(o, e) {
813
+ function ke(r, e) {
860
814
  const {
861
815
  canAccepts: t,
862
816
  checkCanDeleteComponent: n,
863
- checkCanMoveComponent: r,
864
- hideNestedPaddingInDesginerView: c,
817
+ checkCanMoveComponent: o,
818
+ hideNestedPaddingInDesginerView: s,
865
819
  onAcceptMovedChildElement: m,
866
- resolveComponentContext: u,
867
- triggerBelongedComponentToMoveWhenMoved: y,
868
- triggerBelongedComponentToDeleteWhenDeleted: a
869
- } = ve(o), l = o.schema;
870
- function p(s) {
871
- return new fe(s, e).getPropertyConfig(l);
820
+ resolveComponentContext: p,
821
+ triggerBelongedComponentToMoveWhenMoved: d,
822
+ triggerBelongedComponentToDeleteWhenDeleted: i
823
+ } = Ce(r), l = r.schema;
824
+ function c(u, f) {
825
+ return new we(u, e).getPropertyConfig(l, f);
872
826
  }
873
827
  return {
874
828
  canAccepts: t,
875
829
  checkCanDeleteComponent: n,
876
- checkCanMoveComponent: r,
877
- hideNestedPaddingInDesginerView: c,
830
+ checkCanMoveComponent: o,
831
+ hideNestedPaddingInDesginerView: s,
878
832
  onAcceptMovedChildElement: m,
879
- resolveComponentContext: u,
880
- triggerBelongedComponentToMoveWhenMoved: y,
881
- triggerBelongedComponentToDeleteWhenDeleted: a,
882
- getPropsConfig: p
833
+ resolveComponentContext: p,
834
+ triggerBelongedComponentToMoveWhenMoved: d,
835
+ triggerBelongedComponentToDeleteWhenDeleted: i,
836
+ getPropsConfig: c
883
837
  };
884
838
  }
885
- const be = /* @__PURE__ */ $({
839
+ const Me = /* @__PURE__ */ G({
886
840
  name: "FSwitchDesign",
887
- props: E,
841
+ props: $,
888
842
  emits: ["update:modelValue"],
889
- setup(o, e) {
843
+ setup(r, e) {
890
844
  const {
891
845
  size: t,
892
846
  onLabel: n,
893
- offLabel: r
894
- } = j(o), c = T(), m = z("designer-host-service"), u = z("design-item-context"), y = Ce(u, m), a = ye(c, u, y);
895
- X(() => {
896
- c.value.componentInstance = a;
897
- }), e.expose(a.value);
898
- const l = k(() => ({
847
+ offLabel: o
848
+ } = L(r), s = C(), m = q("designer-host-service"), p = q("design-item-context"), d = ke(p, m), i = he(s, p, d);
849
+ x(() => {
850
+ s.value.componentInstance = i;
851
+ }), e.expose(i.value);
852
+ const l = S(() => ({
899
853
  switch: !0,
900
854
  "f-cmp-switch": !0,
901
855
  checked: !1,
902
856
  "switch-large": t.value === "large",
903
857
  "switch-medium": t.value === "medium",
904
858
  "switch-small": t.value === "small"
905
- })), p = k(() => (n == null ? void 0 : n.value) || (r == null ? void 0 : r.value));
906
- return () => b("span", {
907
- ref: c,
859
+ })), c = S(() => (n == null ? void 0 : n.value) || (o == null ? void 0 : o.value));
860
+ return () => w("span", {
861
+ ref: s,
908
862
  tabindex: "0",
909
863
  role: "button",
910
864
  class: l.value
911
- }, [p.value && b("span", {
865
+ }, [c.value && w("span", {
912
866
  class: "switch-pane"
913
- }, [b("span", {
867
+ }, [w("span", {
914
868
  class: "switch-label-unchecked"
915
- }, [r == null ? void 0 : r.value])]), b("small", null, [e.slots.default && e.slots.default()])]);
869
+ }, [o == null ? void 0 : o.value])]), w("small", null, [e.slots.default && e.slots.default()])]);
916
870
  }
917
- }), we = (o) => {
918
- const e = o;
871
+ }), Te = (r) => {
872
+ const e = r;
919
873
  return e.install = function(t) {
920
- t.component(e.name, o);
921
- }, o;
874
+ t.component(e.name, r);
875
+ }, r;
922
876
  };
923
- P.register = (o, e, t, n) => {
924
- o.switch = P, e.switch = G;
877
+ D.register = (r, e, t, n) => {
878
+ r.switch = D, e.switch = X;
925
879
  };
926
- P.registerDesigner = (o, e, t) => {
927
- o.switch = be, e.switch = G;
880
+ D.registerDesigner = (r, e, t) => {
881
+ r.switch = Me, e.switch = X;
928
882
  };
929
- const ke = we(P);
883
+ const De = Te(D);
930
884
  export {
931
- P as FSwitch,
932
- ke as default,
933
- G as propsResolver,
934
- E as switchProps
885
+ D as FSwitch,
886
+ De as default,
887
+ X as propsResolver,
888
+ $ as switchProps
935
889
  };