@farris/ui-vue 1.2.6 → 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 (210) hide show
  1. package/components/accordion/index.esm.js +150 -142
  2. package/components/avatar/index.esm.js +393 -457
  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 +491 -554
  10. package/components/color-picker/index.esm.js +1 -1
  11. package/components/combo-list/index.esm.js +479 -513
  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 +857 -743
  15. package/components/content-container/index.esm.js +61 -61
  16. package/components/data-grid/index.esm.js +4883 -5182
  17. package/components/data-view/index.esm.js +3072 -2949
  18. package/components/date-picker/index.esm.js +2626 -2689
  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 +940 -998
  29. package/components/dynamic-resolver/index.esm.js +67 -35
  30. package/components/dynamic-view/index.esm.js +307 -293
  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 +1747 -1627
  35. package/components/field-selector/index.css +1 -1
  36. package/components/field-selector/index.esm.js +5877 -6176
  37. package/components/filter-bar/index.css +1 -1
  38. package/components/filter-bar/index.esm.js +1454 -1524
  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 +659 -722
  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 +1643 -1524
  45. package/components/lookup/index.css +1 -1
  46. package/components/lookup/index.esm.js +6502 -6770
  47. package/components/mapping-editor/index.esm.js +5639 -5939
  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 +1098 -1130
  58. package/components/page-footer/index.esm.js +106 -106
  59. package/components/page-header/index.esm.js +1088 -1317
  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 +1479 -1513
  63. package/components/property-panel/index.css +1 -1
  64. package/components/property-panel/index.esm.js +706 -778
  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 +453 -516
  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 +555 -526
  74. package/components/response-toolbar/index.esm.js +1009 -1247
  75. package/components/schema-selector/index.esm.js +3261 -3373
  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 +441 -504
  83. package/components/tabs/index.esm.js +1849 -2039
  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 +445 -493
  87. package/components/time-picker/index.esm.js +1350 -1414
  88. package/components/transfer/index.esm.js +146 -144
  89. package/components/tree-grid/index.css +1 -1
  90. package/components/tree-grid/index.esm.js +5948 -6237
  91. package/components/tree-view/index.esm.js +2381 -2255
  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 +27221 -26804
  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/combo-list/src/components/list-container.component.d.ts +6 -0
  102. package/types/combo-list/src/components/list-container.props.d.ts +9 -1
  103. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  104. package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
  105. package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
  106. package/types/data-view/composition/types.d.ts +1 -1
  107. package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
  108. package/types/designer-canvas/src/types.d.ts +1 -1
  109. package/types/dynamic-form/index.d.ts +1 -0
  110. package/types/dynamic-form/src/types.d.ts +1 -1
  111. package/types/dynamic-resolver/index.d.ts +1 -0
  112. package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
  113. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  114. package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
  115. package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
  116. package/types/modal/src/modal.props.d.ts +1 -4
  117. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
  118. package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
  119. package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
  120. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
  121. package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
  122. package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
  123. package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
  124. package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
  125. package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
  126. package/components/accordion/index.umd.cjs +0 -1
  127. package/components/avatar/index.umd.cjs +0 -1
  128. package/components/border-editor/index.umd.cjs +0 -1
  129. package/components/button/index.umd.cjs +0 -1
  130. package/components/button-edit/index.umd.cjs +0 -1
  131. package/components/button-group/index.umd.cjs +0 -1
  132. package/components/calculator/index.umd.cjs +0 -1
  133. package/components/calendar/index.umd.cjs +0 -1
  134. package/components/capsule/index.umd.cjs +0 -1
  135. package/components/checkbox/index.umd.cjs +0 -1
  136. package/components/color-picker/index.umd.cjs +0 -3
  137. package/components/combo-list/index.umd.cjs +0 -1
  138. package/components/combo-tree/index.umd.cjs +0 -1
  139. package/components/common/index.umd.cjs +0 -1
  140. package/components/component/index.umd.cjs +0 -1
  141. package/components/condition/index.umd.cjs +0 -1
  142. package/components/content-container/index.umd.cjs +0 -1
  143. package/components/data-grid/index.umd.cjs +0 -1
  144. package/components/data-view/index.umd.cjs +0 -1
  145. package/components/date-picker/index.umd.cjs +0 -1
  146. package/components/designer-canvas/index.umd.cjs +0 -1
  147. package/components/designer-outline/index.umd.cjs +0 -1
  148. package/components/designer-toolbox/index.umd.cjs +0 -1
  149. package/components/discussion-editor/index.umd.cjs +0 -3
  150. package/components/discussion-list/index.umd.cjs +0 -1
  151. package/components/drawer/index.umd.cjs +0 -1
  152. package/components/dropdown/index.umd.cjs +0 -2
  153. package/components/dynamic-form/index.umd.cjs +0 -1
  154. package/components/dynamic-resolver/index.umd.cjs +0 -1
  155. package/components/dynamic-view/index.umd.cjs +0 -1
  156. package/components/enum-editor/index.umd.cjs +0 -1
  157. package/components/events-editor/index.umd.cjs +0 -1
  158. package/components/expression-editor/index.umd.cjs +0 -1
  159. package/components/external-container/index.umd.cjs +0 -1
  160. package/components/field-selector/index.umd.cjs +0 -1
  161. package/components/filter-bar/index.umd.cjs +0 -1
  162. package/components/flow-canvas/index.umd.cjs +0 -1
  163. package/components/image-cropper/index.umd.cjs +0 -1
  164. package/components/input-group/index.umd.cjs +0 -1
  165. package/components/layout/index.umd.cjs +0 -1
  166. package/components/list-nav/index.umd.cjs +0 -1
  167. package/components/list-view/index.umd.cjs +0 -1
  168. package/components/loading/index.umd.cjs +0 -8
  169. package/components/locale/index.umd.cjs +0 -1
  170. package/components/lookup/index.umd.cjs +0 -1
  171. package/components/mapping-editor/index.umd.cjs +0 -1
  172. package/components/message-box/index.umd.cjs +0 -1
  173. package/components/modal/index.umd.cjs +0 -1
  174. package/components/nav/index.umd.cjs +0 -3
  175. package/components/notify/index.umd.cjs +0 -1
  176. package/components/order/index.umd.cjs +0 -1
  177. package/components/page-footer/index.umd.cjs +0 -1
  178. package/components/page-header/index.umd.cjs +0 -1
  179. package/components/pagination/index.umd.cjs +0 -1
  180. package/components/popover/index.umd.cjs +0 -1
  181. package/components/progress/index.umd.cjs +0 -3
  182. package/components/property-editor/index.umd.cjs +0 -3
  183. package/components/property-panel/index.umd.cjs +0 -1
  184. package/components/radio-button/index.umd.cjs +0 -1
  185. package/components/radio-group/index.umd.cjs +0 -1
  186. package/components/rate/index.umd.cjs +0 -1
  187. package/components/response-layout/index.umd.cjs +0 -1
  188. package/components/response-layout-editor/index.umd.cjs +0 -1
  189. package/components/response-toolbar/index.umd.cjs +0 -1
  190. package/components/schema-selector/index.umd.cjs +0 -8
  191. package/components/search-box/index.umd.cjs +0 -1
  192. package/components/section/index.umd.cjs +0 -1
  193. package/components/smoke-detector/index.umd.cjs +0 -1
  194. package/components/spacing-editor/index.umd.cjs +0 -1
  195. package/components/splitter/index.umd.cjs +0 -1
  196. package/components/step/index.umd.cjs +0 -1
  197. package/components/switch/index.umd.cjs +0 -1
  198. package/components/tabs/index.umd.cjs +0 -1
  199. package/components/tags/index.umd.cjs +0 -1
  200. package/components/text/index.umd.cjs +0 -1
  201. package/components/textarea/index.umd.cjs +0 -1
  202. package/components/time-picker/index.umd.cjs +0 -1
  203. package/components/tooltip/index.umd.cjs +0 -1
  204. package/components/transfer/index.umd.cjs +0 -1
  205. package/components/tree-grid/index.umd.cjs +0 -1
  206. package/components/tree-view/index.umd.cjs +0 -1
  207. package/components/uploader/index.umd.cjs +0 -2
  208. package/components/verify-detail/index.umd.cjs +0 -1
  209. package/components/video/index.umd.cjs +0 -1
  210. 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((i, c) => (i[c] = e[c].type === "object" && e[c].properties ? A(e[c]) : Y(e[c].default), i), {});
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 i = W[o];
16
- return n = i ? i({ 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, i) => (n[i] = o[i], 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, i) => {
26
- if (e.has(i)) {
27
- const c = e.get(i);
28
- if (typeof c == "string")
29
- n[c] = o[i];
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(i, o[i], o);
32
+ const m = s(o, r[o], r);
32
33
  Object.assign(n, m);
33
34
  }
34
35
  } else
35
- n[i] = o[i];
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, s, p) {
45
- if (typeof s == "number")
46
- return p[a].length === s;
47
- if (typeof s == "object") {
48
- const g = Object.keys(s)[0], f = s[g];
49
- if (g === "not")
50
- return Number(p[a].length) !== Number(f);
51
- if (g === "moreThan")
52
- return Number(p[a].length) >= Number(f);
53
- if (g === "lessThan")
54
- return Number(p[a].length) <= Number(f);
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, s, p) {
59
- return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(s);
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 i(a, l) {
67
- const s = a;
68
- return typeof l == "number" ? [{ target: s, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: s, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((p) => {
69
- if (p === "length")
70
- return { target: s, operator: "length", param: null, value: l[p] };
71
- const g = p, f = l[p];
72
- return { target: s, operator: "getProperty", param: g, value: f };
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((s, p) => {
77
- const g = i(p, a[p]);
78
- return s.push(...g), s;
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 s = n.get(a.operator);
84
- return s && s(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, f) => g && m(f, 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 s = Object.keys(a), p = s.includes("allOf"), g = s.includes("anyOf"), f = p || g, S = (f ? a[f ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((D) => u(D, l));
93
- return p ? !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 r = {
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 r = {
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, i = {}, c = (m) => m) {
211
- return x[e.title] = e, W[e.title] = n, ee[e.title] = i, 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 ie = /* @__PURE__ */ new Map([
220
- ["appearance", oe]
221
- ]), re = "https://json-schema.org/draft/2020-12/schema", ae = "https://farris-design.gitee.io/switch.schema.json", le = "switch", ce = "A Farris Component", se = "object", pe = {
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 ie = /* @__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: re,
298
- $id: ae,
299
- title: le,
300
- description: ce,
301
- type: se,
302
- properties: pe,
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
- }, I = ne(E, de, ie, 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: i,
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), s = 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
- })), p = 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
- }), f = k(() => (i == null ? void 0 : i.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: s.value,
368
- style: p.value,
369
- onClick: F
370
- }, [f.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
- }, [i == null ? void 0 : i.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 i = 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 s(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), h = s(v);
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);
406
334
  return h || null;
407
335
  }
408
- function p(d = e) {
409
- const { componentInstance: v, designerItemElementRef: h } = d;
410
- return !v || !v.value ? null : v.value.canMove ? h : p(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 f() {
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 h = V(v, d);
426
- t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(d, h));
427
- const B = v.toLowerCase().replace("-", "_");
428
- return h && !h.id && h.type === v && (h.id = `${B}_${Math.random().toString().slice(2, 6)}`), h;
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 h = String(d.getAttribute("data-controltype")), B = d.getAttribute("data-feature"), L = B ? JSON.parse(B) : {};
432
- L.parentComponentInstance = m.value;
433
- let M = V(h, L);
434
- t && t.onAcceptNewChildElement && (M = t.onAcceptNewChildElement(d, v, M));
435
- const Q = h.toLowerCase().replace("-", "_");
436
- return M && !M.id && M.type === h && (M.id = `${Q}_${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 H(...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: i,
454
- designerClass: c,
455
- canAccepts: g,
456
- getBelongedComponentInstance: s,
457
- getDraggableDesignItemElement: p,
458
- getDraggingDisplayText: f,
459
- getPropConfig: H,
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 G {
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(G, "fieldControlTypeMapping", {
503
+ b(B, "fieldControlTypeMapping", {
480
504
  String: [
481
- { key: r["input-group"].type, value: r["input-group"].name },
482
- { key: r.lookup.type, value: r.lookup.name },
483
- { key: r.Image.type, value: r.Image.name },
484
- { key: r["date-picker"].type, value: r["date-picker"].name },
485
- { key: r["check-box"].type, value: r["check-box"].name },
486
- { key: r["radio-group"].type, value: r["radio-group"].name },
487
- { key: r["combo-list"].type, value: r["combo-list"].name },
488
- { key: r.textarea.type, value: r.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: r.textarea.type, value: r.textarea.name },
493
- { key: r.avatar.type, value: r.avatar.name },
494
- { key: r.lookup.type, value: r.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: r["number-spinner"].type, value: r["number-spinner"].name }
518
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
498
519
  ],
499
520
  Integer: [
500
- { key: r["number-spinner"].type, value: r["number-spinner"].name }
521
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
501
522
  ],
502
523
  Number: [
503
- { key: r["number-spinner"].type, value: r["number-spinner"].name }
524
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
504
525
  ],
505
526
  BigNumber: [
506
- { key: r["number-spinner"].type, value: r["number-spinner"].name }
527
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
507
528
  ],
508
529
  Date: [
509
- { key: r["date-picker"].type, value: r["date-picker"].name }
530
+ { key: a["date-picker"].type, value: a["date-picker"].name }
510
531
  ],
511
532
  DateTime: [
512
- { key: r["date-picker"].type, value: r["date-picker"].name }
533
+ { key: a["date-picker"].type, value: a["date-picker"].name }
513
534
  ],
514
535
  Boolean: [
515
- { key: r.switch.type, value: r.switch.name },
516
- { key: r["check-box"].type, value: r["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: r["combo-list"].type, value: r["combo-list"].name },
520
- { key: r["radio-group"].type, value: r["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: r.lookup.type, value: r.lookup.name },
524
- { key: r["combo-list"].type, value: r["combo-list"].name },
525
- { key: r["radio-group"].type, value: r["radio-group"].name }
526
- ],
527
- EmployeeSelector: [
528
- { key: r.EmployeeSelector.type, value: r.EmployeeSelector.name }
529
- ],
530
- AdminOrganizationSelector: [
531
- { key: r.AdminOrganizationSelector.type, value: r.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((i) => i.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, i;
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: G.getEditorTypesByMDataType(((i = (n = t.designViewModelField) == null ? void 0 : n.type) == null ? void 0 : i.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, s, p, g;
621
- const n = t.propertyValue, i = this.formSchemaUtils.getComponentById(this.componentId);
622
- let c = this.getControlParentContainer(e.id, i);
623
- if (!c)
624
- return;
625
- const m = c.contents.findIndex((f) => f.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: (s = u.editor) == null ? void 0 : s.readonly,
645
- require: (p = u.editor) == null ? void 0 : p.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,90 +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 i of t.contents) {
689
- if (i.id === e)
690
- return n = t, t;
691
- if (n = this.getControlParentContainer(e, i), n)
692
- return n;
693
- }
694
- }
695
- getBindingFieldEditorOptions(e) {
696
- const t = this.formSchemaUtils.getFormMetadataBasicInfo();
697
- return {
698
- type: "field-selector",
699
- bindingType: { enable: !1 },
700
- editorParams: {
701
- propertyData: e,
702
- formBasicInfo: t
703
- },
704
- columns: [
705
- { field: "name", title: "字段名称" },
706
- { field: "bindingField", title: "绑定字段" },
707
- { field: "fieldType", title: "字段类型" }
708
- ],
709
- beforeOpenDialog: (n) => {
710
- const i = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
711
- n.instance.loadData(i);
712
- },
713
- textField: "bindingField"
714
- };
715
- }
716
- }
717
- class fe extends ge {
718
- constructor(e, t) {
719
- super(e, t);
720
- }
721
- getBasicProperties(e) {
722
- let t = this.getBasicPropConfig(e);
723
- return t.properties.binding = this.getFieldSelectorOptions(e), t;
724
- }
725
- getAppearanceProperties(e) {
726
- return this.getAppearanceConfig(e);
727
- }
728
654
  getEditorProperties(e) {
729
655
  return this.getComponentConfig(e);
730
656
  }
731
- getPropertyConfig(e) {
732
- return this.propertyConfig.categories.basic = this.getBasicProperties(e), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
733
- }
734
- getFieldSelectorOptions(e) {
735
- const t = this.formSchemaUtils.getFormMetadataBasicInfo(), n = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
736
- return {
737
- description: "绑定的表单字段",
738
- title: "绑定",
739
- $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, {
740
670
  editor: {
741
- type: "field-selector",
742
- bindingType: { enable: !1 },
743
- editorParams: {
744
- propertyData: e,
745
- formBasicInfo: t
746
- },
747
- columns: [
748
- { field: "name", title: "字段名称" },
749
- { field: "bindingField", title: "绑定字段" },
750
- { field: "fieldType", title: "字段类型" }
751
- ],
752
- data: n
753
- }
754
- };
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++;
755
692
  }
756
693
  getComponentConfig(e, t = {}, n = {}) {
757
- const i = Object.assign({
694
+ const o = Object.assign({
758
695
  description: "组件信息",
759
696
  title: "组件信息",
760
697
  type: "input-group",
761
698
  $converter: "/converter/property-editor.converter"
762
- }, t), c = Object.assign({
699
+ }, t), s = Object.assign({
763
700
  readonly: {
764
701
  description: "",
765
702
  title: "只读",
@@ -781,10 +718,10 @@ class fe extends ge {
781
718
  type: "string"
782
719
  }
783
720
  }, n);
784
- return { ...i, properties: { ...c } };
721
+ return { ...o, properties: { ...s } };
785
722
  }
786
723
  }
787
- class he extends fe {
724
+ class we extends be {
788
725
  constructor(e, t) {
789
726
  super(e, t);
790
727
  }
@@ -839,114 +776,114 @@ class he extends fe {
839
776
  });
840
777
  }
841
778
  }
842
- function ve(o, e) {
843
- o.schema;
844
- const t = T(!0), n = T(!0);
845
- function i(s) {
779
+ function Ce(r, e) {
780
+ r.schema;
781
+ const t = C(!0), n = C(!0);
782
+ function o(c) {
846
783
  return !1;
847
784
  }
848
- function c() {
785
+ function s() {
849
786
  return !1;
850
787
  }
851
788
  function m() {
852
789
  return !1;
853
790
  }
854
- function u() {
791
+ function p() {
855
792
  return !0;
856
793
  }
857
- function y(s) {
794
+ function d(c) {
858
795
  }
859
- function a() {
796
+ function i() {
860
797
  }
861
- function l(s) {
798
+ function l(c) {
862
799
  return null;
863
800
  }
864
801
  return {
865
- canAccepts: i,
866
- checkCanDeleteComponent: c,
802
+ canAccepts: o,
803
+ checkCanDeleteComponent: s,
867
804
  checkCanMoveComponent: m,
868
- hideNestedPaddingInDesginerView: u,
869
- onAcceptMovedChildElement: y,
870
- resolveComponentContext: a,
805
+ hideNestedPaddingInDesginerView: p,
806
+ onAcceptMovedChildElement: d,
807
+ resolveComponentContext: i,
871
808
  triggerBelongedComponentToMoveWhenMoved: t,
872
809
  triggerBelongedComponentToDeleteWhenDeleted: n,
873
810
  getPropsConfig: l
874
811
  };
875
812
  }
876
- function Ce(o, e) {
813
+ function ke(r, e) {
877
814
  const {
878
815
  canAccepts: t,
879
816
  checkCanDeleteComponent: n,
880
- checkCanMoveComponent: i,
881
- hideNestedPaddingInDesginerView: c,
817
+ checkCanMoveComponent: o,
818
+ hideNestedPaddingInDesginerView: s,
882
819
  onAcceptMovedChildElement: m,
883
- resolveComponentContext: u,
884
- triggerBelongedComponentToMoveWhenMoved: y,
885
- triggerBelongedComponentToDeleteWhenDeleted: a
886
- } = ve(o), l = o.schema;
887
- function s(p) {
888
- return new he(p, 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);
889
826
  }
890
827
  return {
891
828
  canAccepts: t,
892
829
  checkCanDeleteComponent: n,
893
- checkCanMoveComponent: i,
894
- hideNestedPaddingInDesginerView: c,
830
+ checkCanMoveComponent: o,
831
+ hideNestedPaddingInDesginerView: s,
895
832
  onAcceptMovedChildElement: m,
896
- resolveComponentContext: u,
897
- triggerBelongedComponentToMoveWhenMoved: y,
898
- triggerBelongedComponentToDeleteWhenDeleted: a,
899
- getPropsConfig: s
833
+ resolveComponentContext: p,
834
+ triggerBelongedComponentToMoveWhenMoved: d,
835
+ triggerBelongedComponentToDeleteWhenDeleted: i,
836
+ getPropsConfig: c
900
837
  };
901
838
  }
902
- const be = /* @__PURE__ */ $({
839
+ const Me = /* @__PURE__ */ G({
903
840
  name: "FSwitchDesign",
904
- props: E,
841
+ props: $,
905
842
  emits: ["update:modelValue"],
906
- setup(o, e) {
843
+ setup(r, e) {
907
844
  const {
908
845
  size: t,
909
846
  onLabel: n,
910
- offLabel: i
911
- } = j(o), c = T(), m = z("designer-host-service"), u = z("design-item-context"), y = Ce(u, m), a = ye(c, u, y);
912
- X(() => {
913
- c.value.componentInstance = a;
914
- }), e.expose(a.value);
915
- 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(() => ({
916
853
  switch: !0,
917
854
  "f-cmp-switch": !0,
918
855
  checked: !1,
919
856
  "switch-large": t.value === "large",
920
857
  "switch-medium": t.value === "medium",
921
858
  "switch-small": t.value === "small"
922
- })), s = k(() => (n == null ? void 0 : n.value) || (i == null ? void 0 : i.value));
923
- return () => b("span", {
924
- ref: c,
859
+ })), c = S(() => (n == null ? void 0 : n.value) || (o == null ? void 0 : o.value));
860
+ return () => w("span", {
861
+ ref: s,
925
862
  tabindex: "0",
926
863
  role: "button",
927
864
  class: l.value
928
- }, [s.value && b("span", {
865
+ }, [c.value && w("span", {
929
866
  class: "switch-pane"
930
- }, [b("span", {
867
+ }, [w("span", {
931
868
  class: "switch-label-unchecked"
932
- }, [i == null ? void 0 : i.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()])]);
933
870
  }
934
- }), we = (o) => {
935
- const e = o;
871
+ }), Te = (r) => {
872
+ const e = r;
936
873
  return e.install = function(t) {
937
- t.component(e.name, o);
938
- }, o;
874
+ t.component(e.name, r);
875
+ }, r;
939
876
  };
940
- P.register = (o, e, t, n) => {
941
- o.switch = P, e.switch = I;
877
+ D.register = (r, e, t, n) => {
878
+ r.switch = D, e.switch = X;
942
879
  };
943
- P.registerDesigner = (o, e, t) => {
944
- o.switch = be, e.switch = I;
880
+ D.registerDesigner = (r, e, t) => {
881
+ r.switch = Me, e.switch = X;
945
882
  };
946
- const ke = we(P);
883
+ const De = Te(D);
947
884
  export {
948
- P as FSwitch,
949
- ke as default,
950
- I as propsResolver,
951
- E as switchProps
885
+ D as FSwitch,
886
+ De as default,
887
+ X as propsResolver,
888
+ $ as switchProps
952
889
  };