@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,10 +1,11 @@
1
- var _ = Object.defineProperty;
2
- var X = (n, e, t) => e in n ? _(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var C = (n, e, t) => X(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as E, inject as V, onMounted as G, createVNode as h, Fragment as Y, computed as P, ref as S, provide as Z } from "vue";
5
- import { useCheck as J } from "@farris/ui-vue/components/common";
6
- import { cloneDeep as K } from "lodash-es";
7
- const ee = {
1
+ var R = Object.defineProperty;
2
+ var H = (n, e, t) => e in n ? R(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var C = (n, e, t) => H(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as O, inject as A, onMounted as W, createVNode as h, Fragment as I, computed as S, ref as k, provide as K } from "vue";
5
+ import { useCheck as ee } from "../common/index.esm.js";
6
+ import { cloneDeep as te } from "lodash-es";
7
+ import { getSchemaByType as q } from "../dynamic-resolver/index.esm.js";
8
+ const ne = {
8
9
  value: { type: String, default: "" },
9
10
  /** 值 */
10
11
  modelValue: { type: String, default: "" },
@@ -14,39 +15,39 @@ const ee = {
14
15
  label: { type: String, default: "" },
15
16
  /** 标识 */
16
17
  id: { type: String, default: "" }
17
- }, $ = Symbol("radioGroupContext"), U = /* @__PURE__ */ E({
18
+ }, x = Symbol("radioGroupContext"), L = /* @__PURE__ */ O({
18
19
  name: "FRadio",
19
- props: ee,
20
+ props: ne,
20
21
  emits: ["update:value"],
21
22
  setup(n, e) {
22
- const t = V($, null), {
23
+ const t = A(x, null), {
23
24
  buttonClass: o,
24
- checked: r,
25
- disabled: p,
25
+ checked: i,
26
+ disabled: s,
26
27
  name: m,
27
- tagClass: d,
28
- shouldRenderButton: u,
29
- shouldRenderNative: a,
28
+ tagClass: u,
29
+ shouldRenderButton: p,
30
+ shouldRenderNative: r,
30
31
  shouldRenderTag: l,
31
32
  onClickRadio: c
32
- } = J(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
33
- return G(() => {
33
+ } = ee(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
34
+ return W(() => {
34
35
  }), () => {
35
- var s, y, g, T, M, k;
36
- return h(Y, null, [u.value && h("div", {
36
+ var d, f, g, M, T, w;
37
+ return h(I, null, [p.value && h("div", {
37
38
  class: o.value,
38
39
  style: "border-radius:0;border: 1px solid #E8EBF2;",
39
40
  onClick: c
40
- }, [(y = (s = e.slots).default) == null ? void 0 : y.call(s)]), l.value && h("div", {
41
- class: d.value,
41
+ }, [(f = (d = e.slots).default) == null ? void 0 : f.call(d)]), l.value && h("div", {
42
+ class: u.value,
42
43
  onClick: c
43
44
  }, [h("div", {
44
45
  class: "title"
45
- }, [(T = (g = e.slots).default) == null ? void 0 : T.call(g)]), h("div", {
46
+ }, [(M = (g = e.slots).default) == null ? void 0 : M.call(g)]), h("div", {
46
47
  class: "tip"
47
48
  }, null), h("span", {
48
49
  class: "f-icon f-icon-check f-radio-icon"
49
- }, null)]), a.value && h("div", {
50
+ }, null)]), r.value && h("div", {
50
51
  class: "custom-control custom-radio",
51
52
  onClick: c
52
53
  }, [h("input", {
@@ -55,115 +56,113 @@ const ee = {
55
56
  name: m.value,
56
57
  id: n.id,
57
58
  value: n.value,
58
- checked: r.value,
59
- disabled: p.value
59
+ checked: i.value,
60
+ disabled: s.value
60
61
  }, null), h("div", {
61
62
  class: "custom-control-label"
62
- }, [(k = (M = e.slots).default) == null ? void 0 : k.call(M)])])]);
63
+ }, [(w = (T = e.slots).default) == null ? void 0 : w.call(T)])])]);
63
64
  };
64
65
  }
65
66
  });
66
- function te(n, e, t) {
67
+ function oe(n, e, t) {
67
68
  return e;
68
69
  }
69
- const j = {}, W = {};
70
- function O(n) {
71
- const { properties: e, title: t } = n, o = Object.keys(e).reduce((r, p) => (r[p] = e[p].type === "object" && e[p].properties ? O(e[p]) : K(e[p].default), r), {});
70
+ const _ = {}, J = {};
71
+ function $(n) {
72
+ const { properties: e, title: t } = n, o = Object.keys(e).reduce((i, s) => (i[s] = e[s].type === "object" && e[s].properties ? $(e[s]) : te(e[s].default), i), {});
72
73
  return o.id = `${t}-${Date.now()}`, o;
73
74
  }
74
- function A(n, e = {}) {
75
- const t = j[n];
75
+ function N(n, e = {}) {
76
+ const t = _[n];
76
77
  if (t) {
77
- let o = O(t);
78
- const r = W[n];
79
- return o = r ? r({ getSchemaByType: A }, o, e) : o, o;
78
+ let o = $(t);
79
+ const i = J[n];
80
+ return o = i ? i({ getSchemaByType: N }, o, e) : o, o;
80
81
  }
81
82
  return null;
82
83
  }
83
- function ne(n, e) {
84
- const t = O(e);
85
- return Object.keys(n).reduce((o, r) => (o[r] = n[r], o), t), t;
84
+ function re(n, e) {
85
+ const t = $(e);
86
+ return Object.keys(n).reduce((o, i) => (o[i] && typeof o[i] == "object" ? Object.assign(o[i], n[i]) : o[i] = n[i], o), t), t;
86
87
  }
87
- function oe(n, e) {
88
- return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
89
- if (e.has(r)) {
90
- const p = e.get(r);
91
- if (typeof p == "string")
92
- o[p] = n[r];
88
+ function ie(n, e) {
89
+ return Object.keys(n).filter((o) => n[o] != null).reduce((o, i) => {
90
+ if (e.has(i)) {
91
+ const s = e.get(i);
92
+ if (typeof s == "string")
93
+ o[s] = n[i];
93
94
  else {
94
- const m = p(r, n[r], n);
95
+ const m = s(i, n[i], n);
95
96
  Object.assign(o, m);
96
97
  }
97
98
  } else
98
- o[r] = n[r];
99
+ o[i] = n[i];
99
100
  return o;
100
101
  }, {});
101
102
  }
102
103
  function ae(n, e, t = /* @__PURE__ */ new Map()) {
103
- const o = ne(n, e);
104
- return oe(o, t);
104
+ const o = re(n, e);
105
+ return ie(o, t);
105
106
  }
106
- function ie(n = {}) {
107
- function e(a, l, c, s) {
107
+ function le(n = {}) {
108
+ function e(r, l, c, d) {
108
109
  if (typeof c == "number")
109
- return s[a].length === c;
110
+ return d[r].length === c;
110
111
  if (typeof c == "object") {
111
- const y = Object.keys(c)[0], g = c[y];
112
- if (y === "not")
113
- return Number(s[a].length) !== Number(g);
114
- if (y === "moreThan")
115
- return Number(s[a].length) >= Number(g);
116
- if (y === "lessThan")
117
- return Number(s[a].length) <= Number(g);
112
+ const f = Object.keys(c)[0], g = c[f];
113
+ if (f === "not")
114
+ return Number(d[r].length) !== Number(g);
115
+ if (f === "moreThan")
116
+ return Number(d[r].length) >= Number(g);
117
+ if (f === "lessThan")
118
+ return Number(d[r].length) <= Number(g);
118
119
  }
119
120
  return !1;
120
121
  }
121
- function t(a, l, c, s) {
122
- return s[a] && s[a].propertyValue && String(s[a].propertyValue.value) === String(c);
122
+ function t(r, l, c, d) {
123
+ return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(c);
123
124
  }
124
125
  const o = /* @__PURE__ */ new Map([
125
126
  ["length", e],
126
127
  ["getProperty", t]
127
128
  ]);
128
- Object.keys(n).reduce((a, l) => (a.set(l, n[l]), a), o);
129
- function r(a, l) {
130
- const c = a;
131
- return typeof l == "number" ? [{ target: c, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: c, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((s) => {
132
- if (s === "length")
133
- return { target: c, operator: "length", param: null, value: l[s] };
134
- const y = s, g = l[s];
135
- return { target: c, operator: "getProperty", param: y, value: g };
129
+ Object.keys(n).reduce((r, l) => (r.set(l, n[l]), r), o);
130
+ function i(r, l) {
131
+ const c = r;
132
+ return typeof l == "number" ? [{ target: c, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: c, operator: "getProperty", param: r, value: !!l }] : typeof l == "object" ? Object.keys(l).map((d) => {
133
+ if (d === "length")
134
+ return { target: c, operator: "length", param: null, value: l[d] };
135
+ const f = d, g = l[d];
136
+ return { target: c, operator: "getProperty", param: f, value: g };
136
137
  }) : [];
137
138
  }
138
- function p(a) {
139
- return Object.keys(a).reduce((c, s) => {
140
- const y = r(s, a[s]);
141
- return c.push(...y), c;
139
+ function s(r) {
140
+ return Object.keys(r).reduce((c, d) => {
141
+ const f = i(d, r[d]);
142
+ return c.push(...f), c;
142
143
  }, []);
143
144
  }
144
- function m(a, l) {
145
- if (o.has(a.operator)) {
146
- const c = o.get(a.operator);
147
- return c && c(a.target, a.param, a.value, l) || !1;
145
+ function m(r, l) {
146
+ if (o.has(r.operator)) {
147
+ const c = o.get(r.operator);
148
+ return c && c(r.target, r.param, r.value, l) || !1;
148
149
  }
149
150
  return !1;
150
151
  }
151
- function d(a, l) {
152
- return p(a).reduce((y, g) => y && m(g, l), !0);
152
+ function u(r, l) {
153
+ return s(r).reduce((f, g) => f && m(g, l), !0);
153
154
  }
154
- function u(a, l) {
155
- const c = Object.keys(a), s = c.includes("allOf"), y = c.includes("anyOf"), g = s || y, k = (g ? a[g ? s ? "allOf" : "anyOf" : "allOf"] : [a]).map((B) => d(B, l));
156
- return s ? !k.includes(!1) : k.includes(!0);
155
+ function p(r, l) {
156
+ const c = Object.keys(r), d = c.includes("allOf"), f = c.includes("anyOf"), g = d || f, w = (g ? r[g ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((E) => u(E, l));
157
+ return d ? !w.includes(!1) : w.includes(!0);
157
158
  }
158
- return { parseValueSchema: u };
159
+ return { parseValueSchema: p };
159
160
  }
160
- const i = {
161
- Button: { type: "Button", name: "按钮", icon: "Button" },
162
- ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
161
+ const a = {
162
+ button: { type: "button", name: "按钮", icon: "Button" },
163
163
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
164
- "response-toolbar-item": { type: "response-toolbar-item", name: "工具栏项", icon: "Button" },
164
+ "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
165
165
  "content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
166
- DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
167
166
  "input-group": { type: "input-group", name: "文本", icon: "TextBox" },
168
167
  textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
169
168
  lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
@@ -174,114 +173,43 @@ const i = {
174
173
  "check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
175
174
  "check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
176
175
  "combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
177
- /** 暂时没用 */
178
- FlexLayout: { type: "FlexLayout", name: "弹性布局" },
179
- /** 暂时没用 */
180
- FlowLayout: { type: "FlowLayout", name: "流布局" },
181
- ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
182
- ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
176
+ "response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
177
+ "response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
178
+ "response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
183
179
  "tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
184
- TreeGridField: { type: "TreeGridField", name: "树表格列" },
185
- FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
186
- Form: { type: "Form", name: "卡片面板", icon: "Form" },
187
- QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
180
+ "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
188
181
  "data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
189
182
  "data-grid-column": { type: "data-grid-column", name: "表格列" },
190
- Panel: { type: "Panel", name: "面板", icon: "ContentContainer" },
191
- Module: { type: "Module", name: "模块", icon: "Module" },
183
+ module: { type: "Module", name: "模块", icon: "Module" },
192
184
  component: { type: "component", name: "组件", icon: "Component" },
193
- ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
194
- Image: { type: "Image", name: "图像", icon: "Image" },
195
- ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
196
- HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
197
- ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
198
- RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
199
185
  tabs: { type: "tabs", name: "标签页", icon: "Tab" },
200
186
  "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
201
187
  "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
202
- Tag: { type: "Tag", name: "Tag", icon: "Tag" },
203
- Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
204
- HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
205
- ListView: { type: "ListView", name: "列表", icon: "ListView" },
206
- RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
207
- TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
208
- TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
188
+ "time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
209
189
  section: { type: "section", name: "分组面板", icon: "Section" },
210
- SectionToolbar: { type: "SectionToolbar", name: "分组面板工具栏" },
211
- SectionToolbarItem: { type: "SectionToolbarItem", name: "分组面板按钮" },
212
- QueryScheme: { type: "QueryScheme", name: "筛选方案", icon: "QueryScheme" },
213
- FormHeader: { type: "FormHeader", name: "翻页" },
214
- Splitter: { type: "Splitter", name: "分栏面板", icon: "Splitter" },
215
- SplitterPane: { type: "SplitterPane", name: "分栏面板项", dependentParentControl: "Splitter" },
216
- WizardDetail: { type: "WizardDetail", name: "向导详情页" },
217
- WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
218
- Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
219
- MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
220
- Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
221
- avatar: { type: "avatar", name: "头像", icon: "Avatar" },
222
- ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
223
- ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
224
- NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
225
- Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
226
- LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
227
- ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
228
- FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
229
- FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
230
- ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
231
- MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
232
- MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
233
- Footer: { type: "Footer", name: "页脚" },
234
- DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
235
- DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
236
- NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
237
- Tags: { type: "Tags", name: "标记组", icon: "Tags" },
238
- Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
190
+ "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
191
+ "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
192
+ splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
193
+ "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
194
+ "component-ref": { type: "component-ref", name: "组件引用节点" },
195
+ uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
239
196
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
240
- ModalFooter: { type: "ModalFooter", name: "弹窗页脚", icon: "ModalFooter" },
241
- ScrollCollapsibleArea: { type: "ScrollCollapsibleArea", name: "滚动收折区域", icon: "ScrollCollapsibleArea" },
242
- PersonnelSelector: { type: "PersonnelSelector", name: "人员选择", icon: "PersonnelSelector" },
243
- Table: { type: "Table", name: "表格", icon: "DataGrid" },
244
- LoopContainer: { type: "LoopContainer", name: "循环容器", icon: "ContentContainer" },
245
- FileUploadPreview: { type: "FileUploadPreview", name: "附件上传预览", icon: "FileUpload" },
246
- DynamicArea: { type: "DynamicArea", name: "动态区域", icon: "ContentContainer" },
247
- DynamicAreaItem: { type: "DynamicAreaItem", name: "动态区域项", icon: "ContentContainer" },
248
- TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
249
- HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
250
- ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
251
- HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
252
- ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
253
- OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
254
- AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
255
- EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
256
- OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
257
- CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
258
- ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
259
- AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
260
- /** 查询类 start */
261
- Charts: { type: "Charts", name: "图表", icon: "Charts" },
262
- QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
263
- SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
264
- QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
265
- QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
266
- /** 查询类 end */
267
- /** 审批类 start */
268
- ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
269
- ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
270
- /** 审批类 end */
271
- }, re = {}, le = {};
272
- ie();
273
- function ce(n, e, t = /* @__PURE__ */ new Map(), o = (m, d, u) => d, r = {}, p = (m) => m) {
274
- return j[e.title] = e, W[e.title] = o, re[e.title] = r, le[e.title] = p, (m = {}) => {
275
- const d = ae(m, e, t), u = Object.keys(n).reduce((a, l) => (a[l] = n[l].default, a), {});
276
- return Object.assign(u, d);
197
+ "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
198
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
199
+ }, ce = {}, se = {};
200
+ le();
201
+ function pe(n, e, t = /* @__PURE__ */ new Map(), o = (m, u, p) => u, i = {}, s = (m) => m) {
202
+ return _[e.title] = e, J[e.title] = o, ce[e.title] = i, se[e.title] = s, (m = {}) => {
203
+ const u = ae(m, e, t), p = Object.keys(n).reduce((r, l) => (r[l] = n[l].default, r), {});
204
+ return Object.assign(p, u);
277
205
  };
278
206
  }
279
- function pe(n, e) {
207
+ function ue(n, e) {
280
208
  return { customClass: e.class, customStyle: e.style };
281
209
  }
282
- const se = /* @__PURE__ */ new Map([
283
- ["appearance", pe]
284
- ]), de = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-design.gitee.io/radio-group.schema.json", me = "radio-group", ye = "A Farris Input Component", fe = "object", ge = {
210
+ const de = /* @__PURE__ */ new Map([
211
+ ["appearance", ue]
212
+ ]), me = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/radio-group.schema.json", ye = "radio-group", ge = "A Farris Input Component", he = "object", ve = {
285
213
  id: {
286
214
  description: "The unique identifier for a radio-group",
287
215
  type: "string"
@@ -362,18 +290,18 @@ const se = /* @__PURE__ */ new Map([
362
290
  description: "",
363
291
  type: "array"
364
292
  }
365
- }, he = [
293
+ }, be = [
366
294
  "id",
367
295
  "type"
368
- ], ve = {
369
- $schema: de,
370
- $id: ue,
371
- title: me,
372
- description: ye,
373
- type: fe,
374
- properties: ge,
375
- required: he
376
- }, be = {
296
+ ], Ce = {
297
+ $schema: me,
298
+ $id: fe,
299
+ title: ye,
300
+ description: ge,
301
+ type: he,
302
+ properties: ve,
303
+ required: be
304
+ }, ke = {
377
305
  /**
378
306
  * 是否被选中
379
307
  */
@@ -390,8 +318,8 @@ const se = /* @__PURE__ */ new Map([
390
318
  * type为button或者tag时的尺寸
391
319
  */
392
320
  size: { type: String, default: "middle" }
393
- }, N = {
394
- ...be,
321
+ }, U = {
322
+ ...ke,
395
323
  /**
396
324
  * 组件标识
397
325
  */
@@ -430,50 +358,50 @@ const se = /* @__PURE__ */ new Map([
430
358
  * 枚举数组中枚举值的key值。
431
359
  */
432
360
  valueField: { type: String, default: "value" }
433
- }, I = ce(N, ve, se, te);
434
- function R(n, e, t) {
435
- const o = P(() => !n.disabled), r = P(() => n.enumData || []);
436
- function p(u) {
437
- return u[n.valueField];
361
+ }, X = pe(U, Ce, de, oe);
362
+ function Q(n, e, t) {
363
+ const o = S(() => !n.disabled), i = S(() => n.enumData || []);
364
+ function s(p) {
365
+ return p[n.valueField];
438
366
  }
439
- function m(u) {
440
- return u[n.textField];
367
+ function m(p) {
368
+ return p[n.textField];
441
369
  }
442
- function d(u, a) {
370
+ function u(p, r) {
443
371
  if (o.value) {
444
- const l = p(u);
372
+ const l = s(p);
445
373
  t.value !== l && (t.value = l, e.emit("changeValue", l), e.emit("update:modelValue", l));
446
374
  }
447
- a.stopPropagation();
375
+ r.stopPropagation();
448
376
  }
449
377
  return {
450
- enumData: r,
451
- getValue: p,
378
+ enumData: i,
379
+ getValue: s,
452
380
  getText: m,
453
- onClickRadio: d
381
+ onClickRadio: u
454
382
  };
455
383
  }
456
- const w = /* @__PURE__ */ E({
384
+ const P = /* @__PURE__ */ O({
457
385
  name: "FRadioGroup",
458
- props: N,
386
+ props: U,
459
387
  emits: ["changeValue", "update:modelValue"],
460
388
  setup(n, e) {
461
- const t = S(n.modelValue), {
389
+ const t = k(n.modelValue), {
462
390
  enumData: o,
463
- onClickRadio: r,
464
- getValue: p,
391
+ onClickRadio: i,
392
+ getValue: s,
465
393
  getText: m
466
- } = R(n, e, t), d = P(() => ({
394
+ } = Q(n, e, t), u = S(() => ({
467
395
  "farris-checkradio-hor": n.direction === "horizontal"
468
- })), u = S([]);
469
- return Z($, {
470
- radios: u,
396
+ })), p = k([]);
397
+ return K(x, {
398
+ radios: p,
471
399
  parentProps: n,
472
400
  parentContext: e
473
401
  }), () => h("div", {
474
- class: ["farris-input-wrap", d.value]
475
- }, [e.slots.default ? e.slots.default() : o.value.map((a, l) => {
476
- const c = "radio_" + n.id + n.name + a[n.valueField];
402
+ class: ["farris-input-wrap", u.value]
403
+ }, [e.slots.default ? e.slots.default() : o.value.map((r, l) => {
404
+ const c = "radio_" + n.id + n.name + r[n.valueField];
477
405
  return h("div", {
478
406
  class: "custom-control custom-radio"
479
407
  }, [h("input", {
@@ -481,172 +409,108 @@ const w = /* @__PURE__ */ E({
481
409
  class: "custom-control-input",
482
410
  name: c,
483
411
  id: c,
484
- value: p(a),
485
- checked: p(a) === t.value,
412
+ value: s(r),
413
+ checked: s(r) === t.value,
486
414
  disabled: n.disabled,
487
415
  tabindex: n.tabIndex,
488
- onClick: (s) => r(a, s)
416
+ onClick: (d) => i(r, d)
489
417
  }, null), h("label", {
490
418
  class: "custom-control-label",
491
419
  for: c
492
- }, [m(a)])]);
420
+ }, [m(r)])]);
493
421
  })]);
494
422
  }
495
423
  });
496
- function Ce(n, e, t) {
497
- var x;
424
+ function Me(n, e, t) {
425
+ var G;
498
426
  function o() {
499
427
  t != null && t.resolveComponentContext && t.resolveComponentContext();
500
428
  }
501
429
  o();
502
- const r = t && t.getStyles && t.getStyles() || "", p = t && t.getDesignerClass && t.getDesignerClass() || "", m = S();
503
- function d() {
430
+ const i = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", m = k();
431
+ function u() {
504
432
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
505
433
  }
506
- function u() {
434
+ function p() {
507
435
  return !1;
508
436
  }
509
- function a() {
437
+ function r() {
510
438
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
511
439
  }
512
440
  function l() {
513
441
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
514
442
  }
515
- function c(f) {
516
- if (!f || !f.value)
443
+ function c(y) {
444
+ if (!y || !y.value)
517
445
  return null;
518
- if (f.value.schema && f.value.schema.type === "component")
519
- return f.value;
520
- const b = S(f == null ? void 0 : f.value.parent), v = c(b);
446
+ if (y.value.schema && y.value.schema.type === "component")
447
+ return y.value;
448
+ const b = k(y == null ? void 0 : y.value.parent), v = c(b);
521
449
  return v || null;
522
450
  }
523
- function s(f = e) {
524
- const { componentInstance: b, designerItemElementRef: v } = f;
525
- return !b || !b.value ? null : b.value.canMove ? v : s(f.parent);
451
+ function d(y = e) {
452
+ const { componentInstance: b, designerItemElementRef: v } = y;
453
+ return !b || !b.value ? null : b.value.canMove ? v : d(y.parent);
526
454
  }
527
- function y(f) {
528
- return !!t && t.canAccepts(f);
455
+ function f(y) {
456
+ return !!t && t.canAccepts(y);
529
457
  }
530
458
  function g() {
531
459
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
532
460
  }
533
- function T() {
461
+ function M() {
534
462
  }
535
- function M(f, b) {
463
+ function T(y, b) {
536
464
  b && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(b);
537
465
  }
538
- function k(f) {
539
- const { componentType: b } = f;
540
- let v = A(b, f);
541
- t && t.onResolveNewComponentSchema && (v = t.onResolveNewComponentSchema(f, v));
542
- const D = b.toLowerCase().replace("-", "_");
543
- return v && !v.id && v.type === b && (v.id = `${D}_${Math.random().toString().slice(2, 6)}`), v;
466
+ function w(y) {
467
+ const { componentType: b } = y;
468
+ let v = N(b, y);
469
+ t && t.onResolveNewComponentSchema && (v = t.onResolveNewComponentSchema(y, v));
470
+ const F = b.toLowerCase().replace("-", "_");
471
+ return v && !v.id && v.type === b && (v.id = `${F}_${Math.random().toString().slice(2, 6)}`), v;
544
472
  }
545
- function L(f, b) {
546
- const v = String(f.getAttribute("data-controltype")), D = f.getAttribute("data-feature"), z = D ? JSON.parse(D) : {};
473
+ function j(y, b) {
474
+ const v = String(y.getAttribute("data-controltype")), F = y.getAttribute("data-feature"), z = F ? JSON.parse(F) : {};
547
475
  z.parentComponentInstance = m.value;
548
- let F = A(v, z);
549
- t && t.onAcceptNewChildElement && (F = t.onAcceptNewChildElement(f, b, F));
550
- const q = v.toLowerCase().replace("-", "_");
551
- return F && !F.id && F.type === v && (F.id = `${q}_${Math.random().toString().slice(2, 6)}`), F;
476
+ let V = N(v, z);
477
+ t && t.onAcceptNewChildElement && (V = t.onAcceptNewChildElement(y, b, V));
478
+ const Z = v.toLowerCase().replace("-", "_");
479
+ return V && !V.id && V.type === v && (V.id = `${Z}_${Math.random().toString().slice(2, 6)}`), V;
552
480
  }
553
- function B(f) {
481
+ function E(y) {
554
482
  }
555
- function Q(...f) {
483
+ function Y(...y) {
556
484
  if (t && t.getPropsConfig)
557
- return t.getPropsConfig(...f);
485
+ return t.getPropsConfig(...y);
558
486
  }
559
487
  return m.value = {
560
- canMove: d(),
561
- canSelectParent: u(),
562
- canDelete: a(),
488
+ canMove: u(),
489
+ canSelectParent: p(),
490
+ canDelete: r(),
563
491
  canNested: !l(),
564
492
  contents: e == null ? void 0 : e.schema.contents,
565
493
  elementRef: n,
566
- parent: (x = e == null ? void 0 : e.parent) == null ? void 0 : x.componentInstance,
494
+ parent: (G = e == null ? void 0 : e.parent) == null ? void 0 : G.componentInstance,
567
495
  schema: e == null ? void 0 : e.schema,
568
- styles: r,
569
- designerClass: p,
570
- canAccepts: y,
496
+ styles: i,
497
+ designerClass: s,
498
+ canAccepts: f,
571
499
  getBelongedComponentInstance: c,
572
- getDraggableDesignItemElement: s,
500
+ getDraggableDesignItemElement: d,
573
501
  getDraggingDisplayText: g,
574
- getPropConfig: Q,
575
- getDragScopeElement: T,
576
- onAcceptMovedChildElement: M,
577
- onAcceptNewChildElement: L,
578
- onChildElementMovedOut: B,
579
- addNewChildComponentSchema: k,
502
+ getPropConfig: Y,
503
+ getDragScopeElement: M,
504
+ onAcceptMovedChildElement: T,
505
+ onAcceptNewChildElement: j,
506
+ onChildElementMovedOut: E,
507
+ addNewChildComponentSchema: w,
580
508
  updateDragAndDropRules: o,
581
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || S(!1),
582
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || S(!1)
509
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || k(!1),
510
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
583
511
  }, m;
584
512
  }
585
- class H {
586
- static getEditorTypesByMDataType(e) {
587
- const t = this.fieldControlTypeMapping[e];
588
- return t || [{ key: "", value: "" }];
589
- }
590
- }
591
- /**
592
- * <字段类型,可配置的控件类型列表>的映射
593
- */
594
- C(H, "fieldControlTypeMapping", {
595
- String: [
596
- { key: i["input-group"].type, value: i["input-group"].name },
597
- { key: i.lookup.type, value: i.lookup.name },
598
- { key: i.Image.type, value: i.Image.name },
599
- { key: i["date-picker"].type, value: i["date-picker"].name },
600
- { key: i["check-box"].type, value: i["check-box"].name },
601
- { key: i["radio-group"].type, value: i["radio-group"].name },
602
- { key: i["combo-list"].type, value: i["combo-list"].name },
603
- { key: i.textarea.type, value: i.textarea.name }
604
- // { key: DgControl.Tags.type, value: DgControl.Tags.name },
605
- ],
606
- Text: [
607
- { key: i.textarea.type, value: i.textarea.name },
608
- { key: i.avatar.type, value: i.avatar.name },
609
- { key: i.lookup.type, value: i.lookup.name }
610
- ],
611
- Decimal: [
612
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
613
- ],
614
- Integer: [
615
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
616
- ],
617
- Number: [
618
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
619
- ],
620
- BigNumber: [
621
- { key: i["number-spinner"].type, value: i["number-spinner"].name }
622
- ],
623
- Date: [
624
- { key: i["date-picker"].type, value: i["date-picker"].name }
625
- ],
626
- DateTime: [
627
- { key: i["date-picker"].type, value: i["date-picker"].name }
628
- ],
629
- Boolean: [
630
- { key: i.switch.type, value: i.switch.name },
631
- { key: i["check-box"].type, value: i["check-box"].name }
632
- ],
633
- Enum: [
634
- { key: i["combo-list"].type, value: i["combo-list"].name },
635
- { key: i["radio-group"].type, value: i["radio-group"].name }
636
- ],
637
- Object: [
638
- { key: i.lookup.type, value: i.lookup.name },
639
- { key: i["combo-list"].type, value: i["combo-list"].name },
640
- { key: i["radio-group"].type, value: i["radio-group"].name }
641
- ],
642
- EmployeeSelector: [
643
- { key: i.EmployeeSelector.type, value: i.EmployeeSelector.name }
644
- ],
645
- AdminOrganizationSelector: [
646
- { key: i.AdminOrganizationSelector.type, value: i.AdminOrganizationSelector.name }
647
- ]
648
- });
649
- class Se {
513
+ class Te {
650
514
  constructor(e, t) {
651
515
  C(this, "componentId");
652
516
  C(this, "viewModelId");
@@ -675,7 +539,7 @@ class Se {
675
539
  if (t) {
676
540
  if (!this.designViewModelField) {
677
541
  const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
678
- this.designViewModelField = o.fields.find((r) => r.id === t);
542
+ this.designViewModelField = o.fields.find((i) => i.id === t);
679
543
  }
680
544
  e.updateOn = this.designViewModelField.updateOn;
681
545
  }
@@ -683,9 +547,135 @@ class Se {
683
547
  changeFieldEditorType(e, t) {
684
548
  }
685
549
  getBasicPropConfig(e) {
686
- var o, r;
687
- var t = this;
688
- return this.setDesignViewModelField(e), {
550
+ return {
551
+ description: "Basic Information",
552
+ title: "基本信息",
553
+ properties: {
554
+ id: {
555
+ description: "组件标识",
556
+ title: "标识",
557
+ type: "string",
558
+ readonly: !0
559
+ },
560
+ type: {
561
+ description: "组件类型",
562
+ title: "控件类型",
563
+ type: "select",
564
+ editor: {
565
+ type: "combo-list",
566
+ textField: "name",
567
+ valueField: "value",
568
+ data: [{ value: e.type, name: a[e.type].name }]
569
+ }
570
+ }
571
+ }
572
+ };
573
+ }
574
+ getAppearanceConfig(e = null) {
575
+ return {
576
+ title: "样式",
577
+ description: "Appearance",
578
+ properties: {
579
+ class: {
580
+ title: "class样式",
581
+ type: "string",
582
+ description: "组件的CSS样式",
583
+ $converter: "/converter/appearance.converter"
584
+ },
585
+ style: {
586
+ title: "style样式",
587
+ type: "string",
588
+ description: "组件的样式",
589
+ $converter: "/converter/appearance.converter"
590
+ }
591
+ }
592
+ };
593
+ }
594
+ }
595
+ const D = class D {
596
+ /**
597
+ * 根据绑定字段类型获取可用的输入类控件
598
+ */
599
+ static getEditorTypesByMDataType(e) {
600
+ const t = D.fieldControlTypeMapping[e];
601
+ return t || [{ key: "", value: "" }];
602
+ }
603
+ /**
604
+ * 获取所有输入类控件
605
+ */
606
+ static getAllInputTypes() {
607
+ const e = [];
608
+ for (let t in D.fieldControlTypeMapping)
609
+ D.fieldControlTypeMapping[t].forEach((o) => {
610
+ e.find((i) => i.key === o.key && i.value === o.value) || e.push({ key: o.key, value: o.value });
611
+ });
612
+ return e;
613
+ }
614
+ };
615
+ /**
616
+ * <字段类型,可配置的控件类型列表>的映射
617
+ */
618
+ C(D, "fieldControlTypeMapping", {
619
+ String: [
620
+ { key: a["input-group"].type, value: a["input-group"].name },
621
+ { key: a.lookup.type, value: a.lookup.name },
622
+ { key: a["date-picker"].type, value: a["date-picker"].name },
623
+ { key: a["check-box"].type, value: a["check-box"].name },
624
+ { key: a["radio-group"].type, value: a["radio-group"].name },
625
+ { key: a["combo-list"].type, value: a["combo-list"].name },
626
+ { key: a.textarea.type, value: a.textarea.name }
627
+ ],
628
+ Text: [
629
+ { key: a.textarea.type, value: a.textarea.name },
630
+ { key: a.lookup.type, value: a.lookup.name }
631
+ ],
632
+ Decimal: [
633
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
634
+ ],
635
+ Integer: [
636
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
637
+ ],
638
+ Number: [
639
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
640
+ ],
641
+ BigNumber: [
642
+ { key: a["number-spinner"].type, value: a["number-spinner"].name }
643
+ ],
644
+ Date: [
645
+ { key: a["date-picker"].type, value: a["date-picker"].name }
646
+ ],
647
+ DateTime: [
648
+ { key: a["date-picker"].type, value: a["date-picker"].name }
649
+ ],
650
+ Boolean: [
651
+ { key: a.switch.type, value: a.switch.name },
652
+ { key: a["check-box"].type, value: a["check-box"].name }
653
+ ],
654
+ Enum: [
655
+ { key: a["combo-list"].type, value: a["combo-list"].name },
656
+ { key: a["radio-group"].type, value: a["radio-group"].name }
657
+ ],
658
+ Object: [
659
+ { key: a.lookup.type, value: a.lookup.name },
660
+ { key: a["combo-list"].type, value: a["combo-list"].name },
661
+ { key: a["radio-group"].type, value: a["radio-group"].name }
662
+ ]
663
+ });
664
+ let B = D;
665
+ const we = k(0);
666
+ class Ve extends Te {
667
+ constructor(e, t) {
668
+ super(e, t);
669
+ }
670
+ getPropertyConfig(e, t) {
671
+ 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;
672
+ }
673
+ getBasicProperties(e, t) {
674
+ var m;
675
+ var o = this;
676
+ this.setDesignViewModelField(e);
677
+ const i = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
678
+ return {
689
679
  description: "Basic Information",
690
680
  title: "基本信息",
691
681
  properties: {
@@ -705,63 +695,48 @@ class Se {
705
695
  type: "combo-list",
706
696
  textField: "value",
707
697
  valueField: "key",
708
- data: H.getEditorTypesByMDataType(((r = (o = t.designViewModelField) == null ? void 0 : o.type) == null ? void 0 : r.name) || ""),
709
- editable: !1
698
+ editable: !1,
699
+ data: o.designViewModelField ? B.getEditorTypesByMDataType((m = o.designViewModelField.type) == null ? void 0 : m.name) : B.getAllInputTypes()
710
700
  }
711
701
  },
712
702
  label: {
713
703
  title: "标签",
714
704
  type: "string",
715
705
  $converter: "/converter/form-group-label.converter"
706
+ },
707
+ binding: {
708
+ description: "绑定的表单字段",
709
+ title: "绑定",
710
+ $converter: "/converter/field-selector.converter",
711
+ editor: {
712
+ type: "field-selector",
713
+ bindingType: { enable: !1 },
714
+ editorParams: {
715
+ propertyData: e,
716
+ formBasicInfo: i
717
+ },
718
+ columns: [
719
+ { field: "name", title: "字段名称" },
720
+ { field: "bindingField", title: "绑定字段" },
721
+ { field: "fieldType", title: "字段类型" }
722
+ ],
723
+ textField: "bindingField",
724
+ data: s
725
+ }
716
726
  }
717
727
  },
718
- setPropertyRelates(p, m) {
719
- if (p)
720
- switch (p && p.propertyID) {
728
+ setPropertyRelates(u, p) {
729
+ if (u)
730
+ switch (u && u.propertyID) {
721
731
  case "type": {
722
- t.changeControlType(e, p);
732
+ o.changeControlType(e, u, t);
723
733
  break;
724
734
  }
725
735
  }
726
736
  }
727
737
  };
728
738
  }
729
- /**
730
- * 卡片控件:切换控件类型后事件
731
- * @param propertyData 控件DOM属性
732
- * @param newControlType 新控件类型
733
- */
734
- changeControlType(e, t) {
735
- var a, l, c, s, y;
736
- const o = t.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
737
- let p = this.getControlParentContainer(e.id, r);
738
- if (!p)
739
- return;
740
- const m = p.contents.findIndex((g) => g.id === e.id), d = p.contents[m];
741
- let u;
742
- this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
743
- editor: {
744
- $type: o
745
- },
746
- name: this.designViewModelField.name,
747
- require: this.designViewModelField.require,
748
- readonly: this.designViewModelField.readonly
749
- }, !1), u = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(u, {
750
- id: d.id,
751
- appearance: d.appearance,
752
- size: d.size,
753
- label: d.label
754
- }), Object.assign(u.editor, {
755
- isTextArea: u.isTextArea && d.isTextArea,
756
- type: o || "",
757
- placeHolder: (a = d.editor) == null ? void 0 : a.placeHolder,
758
- holdPlace: (l = d.editor) == null ? void 0 : l.holdPlace,
759
- readonly: (c = d.editor) == null ? void 0 : c.readonly,
760
- require: (s = d.editor) == null ? void 0 : s.require,
761
- visible: (y = d.editor) == null ? void 0 : y.visible
762
- }), p.contents.splice(m, 1, u);
763
- }
764
- getAppearanceConfig(e = null) {
739
+ getAppearanceProperties(e) {
765
740
  return {
766
741
  title: "样式",
767
742
  description: "Appearance",
@@ -791,73 +766,52 @@ class Se {
791
766
  }
792
767
  };
793
768
  }
794
- /**
795
- * 获取控件:以contents为节点进行定位
796
- * @param controlId 控件ID
797
- * @param domJson 容器
798
- */
799
- getControlParentContainer(e, t) {
800
- let o;
801
- if (!t || !t.contents || t.contents.length === 0)
802
- return null;
803
- for (const r of t.contents) {
804
- if (r.id === e)
805
- return o = t, t;
806
- if (o = this.getControlParentContainer(e, r), o)
807
- return o;
808
- }
809
- }
810
- }
811
- class Te extends Se {
812
- constructor(e, t) {
813
- super(e, t);
814
- }
815
- getBasicProperties(e) {
816
- let t = this.getBasicPropConfig(e);
817
- return t.properties.binding = this.getFieldSelectorOptions(e), t;
818
- }
819
- getAppearanceProperties(e) {
820
- return this.getAppearanceConfig(e);
821
- }
822
769
  getEditorProperties(e) {
823
770
  return this.getComponentConfig(e);
824
771
  }
825
- getPropertyConfig(e) {
826
- return this.propertyConfig.categories.basic = this.getBasicProperties(e), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
827
- }
828
- getFieldSelectorOptions(e) {
829
- const t = this.formSchemaUtils.getFormMetadataBasicInfo(), o = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
830
- return {
831
- description: "绑定的表单字段",
832
- title: "绑定",
833
- $converter: "/converter/field-selector.converter",
772
+ /**
773
+ * 卡片控件:切换控件类型后事件
774
+ * @param propertyData 控件DOM属性
775
+ * @param newControlType 新控件类型
776
+ */
777
+ changeControlType(e, t, o) {
778
+ var r, l, c, d;
779
+ const i = t.propertyValue, s = o && o.parent && o.parent.schema;
780
+ if (!s)
781
+ return;
782
+ const m = s.contents.findIndex((f) => f.id === e.id), u = s.contents[m];
783
+ let p;
784
+ this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
834
785
  editor: {
835
- type: "field-selector",
836
- bindingType: { enable: !1 },
837
- editorParams: {
838
- propertyData: e,
839
- formBasicInfo: t
840
- },
841
- columns: [
842
- { field: "name", title: "字段名称" },
843
- { field: "bindingField", title: "绑定字段" },
844
- { field: "fieldType", title: "字段类型" }
845
- ],
846
- textField: "bindingField",
847
- data: o
848
- }
849
- };
850
- }
851
- getBindingOtions(e) {
852
- return this.getFieldSelectorOptions(e);
786
+ $type: i
787
+ },
788
+ name: this.designViewModelField.name,
789
+ require: this.designViewModelField.require,
790
+ readonly: this.designViewModelField.readonly
791
+ }, !1), p = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, i)), p || (p = q("form-group") || {}, p.editor = q(i) || {}, delete p.editor.id, delete p.editor.binding, delete p.editor.appearance), Object.assign(p, {
792
+ id: u.id,
793
+ appearance: u.appearance,
794
+ size: u.size,
795
+ label: u.label,
796
+ binding: u.binding,
797
+ visible: u.visible
798
+ }), Object.assign(p.editor, {
799
+ isTextArea: p.isTextArea && u.isTextArea,
800
+ placeholder: (r = u.editor) == null ? void 0 : r.placeholder,
801
+ holdPlace: (l = u.editor) == null ? void 0 : l.holdPlace,
802
+ readonly: (c = u.editor) == null ? void 0 : c.readonly,
803
+ require: (d = u.editor) == null ? void 0 : d.require
804
+ }), s.contents.splice(m, 1), s.contents.splice(m, 0, p), o.schema = Object.assign(u, p), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
805
+ (f) => f.classList.remove("dgComponentSelected")
806
+ ), we.value++;
853
807
  }
854
808
  getComponentConfig(e, t = {}, o = {}) {
855
- const r = Object.assign({
809
+ const i = Object.assign({
856
810
  description: "组件信息",
857
811
  title: "组件信息",
858
812
  type: "input-group",
859
813
  $converter: "/converter/property-editor.converter"
860
- }, t), p = Object.assign({
814
+ }, t), s = Object.assign({
861
815
  readonly: {
862
816
  description: "",
863
817
  title: "只读",
@@ -879,10 +833,10 @@ class Te extends Se {
879
833
  type: "string"
880
834
  }
881
835
  }, o);
882
- return { ...r, properties: { ...p } };
836
+ return { ...i, properties: { ...s } };
883
837
  }
884
838
  }
885
- class Me extends Te {
839
+ class De extends Ve {
886
840
  constructor(e, t) {
887
841
  super(e, t);
888
842
  }
@@ -918,35 +872,35 @@ class Me extends Te {
918
872
  });
919
873
  }
920
874
  }
921
- function ke(n, e) {
875
+ function Pe(n, e) {
922
876
  n.schema;
923
- const t = S(!0), o = S(!0);
924
- function r(c) {
877
+ const t = k(!0), o = k(!0);
878
+ function i(c) {
925
879
  return !1;
926
880
  }
927
- function p() {
881
+ function s() {
928
882
  return !1;
929
883
  }
930
884
  function m() {
931
885
  return !1;
932
886
  }
933
- function d() {
887
+ function u() {
934
888
  return !0;
935
889
  }
936
- function u(c) {
890
+ function p(c) {
937
891
  }
938
- function a() {
892
+ function r() {
939
893
  }
940
894
  function l(c) {
941
895
  return null;
942
896
  }
943
897
  return {
944
- canAccepts: r,
945
- checkCanDeleteComponent: p,
898
+ canAccepts: i,
899
+ checkCanDeleteComponent: s,
946
900
  checkCanMoveComponent: m,
947
- hideNestedPaddingInDesginerView: d,
948
- onAcceptMovedChildElement: u,
949
- resolveComponentContext: a,
901
+ hideNestedPaddingInDesginerView: u,
902
+ onAcceptMovedChildElement: p,
903
+ resolveComponentContext: r,
950
904
  triggerBelongedComponentToMoveWhenMoved: t,
951
905
  triggerBelongedComponentToDeleteWhenDeleted: o,
952
906
  getPropsConfig: l
@@ -956,80 +910,80 @@ function Fe(n, e) {
956
910
  const {
957
911
  canAccepts: t,
958
912
  checkCanDeleteComponent: o,
959
- checkCanMoveComponent: r,
960
- hideNestedPaddingInDesginerView: p,
913
+ checkCanMoveComponent: i,
914
+ hideNestedPaddingInDesginerView: s,
961
915
  onAcceptMovedChildElement: m,
962
- resolveComponentContext: d,
963
- triggerBelongedComponentToMoveWhenMoved: u,
964
- triggerBelongedComponentToDeleteWhenDeleted: a
965
- } = ke(n), l = n.schema;
966
- function c(s) {
967
- return new Me(s, e).getPropertyConfig(l);
916
+ resolveComponentContext: u,
917
+ triggerBelongedComponentToMoveWhenMoved: p,
918
+ triggerBelongedComponentToDeleteWhenDeleted: r
919
+ } = Pe(n), l = n.schema;
920
+ function c(d, f) {
921
+ return new De(d, e).getPropertyConfig(l, f);
968
922
  }
969
923
  return {
970
924
  canAccepts: t,
971
925
  checkCanDeleteComponent: o,
972
- checkCanMoveComponent: r,
973
- hideNestedPaddingInDesginerView: p,
926
+ checkCanMoveComponent: i,
927
+ hideNestedPaddingInDesginerView: s,
974
928
  onAcceptMovedChildElement: m,
975
- resolveComponentContext: d,
976
- triggerBelongedComponentToMoveWhenMoved: u,
977
- triggerBelongedComponentToDeleteWhenDeleted: a,
929
+ resolveComponentContext: u,
930
+ triggerBelongedComponentToMoveWhenMoved: p,
931
+ triggerBelongedComponentToDeleteWhenDeleted: r,
978
932
  getPropsConfig: c
979
933
  };
980
934
  }
981
- const we = /* @__PURE__ */ E({
935
+ const Se = /* @__PURE__ */ O({
982
936
  name: "FRadioGroupDesign",
983
- props: N,
937
+ props: U,
984
938
  emits: ["changeValue", "update:modelValue"],
985
939
  setup(n, e) {
986
- const t = S(n.modelValue), {
940
+ const t = k(n.modelValue), {
987
941
  enumData: o,
988
- onClickRadio: r,
989
- getValue: p,
942
+ onClickRadio: i,
943
+ getValue: s,
990
944
  getText: m
991
- } = R(n, e, t), d = P(() => ({
945
+ } = Q(n, e, t), u = S(() => ({
992
946
  "farris-checkradio-hor": n.horizontal
993
- })), u = S(), a = V("designer-host-service"), l = V("design-item-context"), c = Fe(l, a), s = Ce(u, l, c);
994
- return G(() => {
995
- u.value.componentInstance = s;
996
- }), e.expose(s.value), () => h("div", {
997
- class: ["farris-input-wrap", d.value],
998
- ref: u
999
- }, [o.value.map((y, g) => {
1000
- const T = "radio_" + n.name + g;
947
+ })), p = k(), r = A("designer-host-service"), l = A("design-item-context"), c = Fe(l, r), d = Me(p, l, c);
948
+ return W(() => {
949
+ p.value.componentInstance = d;
950
+ }), e.expose(d.value), () => h("div", {
951
+ class: ["farris-input-wrap", u.value],
952
+ ref: p
953
+ }, [o.value.map((f, g) => {
954
+ const M = "radio_" + n.name + g;
1001
955
  return h("div", {
1002
956
  class: "custom-control custom-radio"
1003
957
  }, [h("input", {
1004
958
  type: "radio",
1005
959
  class: "custom-control-input",
1006
960
  name: n.name,
1007
- id: T,
1008
- value: p(y),
1009
- checked: p(y) === t.value,
961
+ id: M,
962
+ value: s(f),
963
+ checked: s(f) === t.value,
1010
964
  disabled: n.disabled,
1011
965
  tabindex: n.tabIndex,
1012
- onClick: (M) => r(y, M)
966
+ onClick: (T) => i(f, T)
1013
967
  }, null), h("label", {
1014
968
  class: "custom-control-label",
1015
- for: T
1016
- }, [m(y)])]);
969
+ for: M
970
+ }, [m(f)])]);
1017
971
  })]);
1018
972
  }
1019
973
  });
1020
- w.install = (n) => {
1021
- n.component(w.name, w), n.component(U.name, U);
974
+ P.install = (n) => {
975
+ n.component(P.name, P), n.component(L.name, L);
1022
976
  };
1023
- w.register = (n, e, t, o) => {
1024
- n["radio-group"] = w, e["radio-group"] = I;
977
+ P.register = (n, e, t, o) => {
978
+ n["radio-group"] = P, e["radio-group"] = X;
1025
979
  };
1026
- w.registerDesigner = (n, e, t) => {
1027
- n["radio-group"] = we, e["radio-group"] = I;
980
+ P.registerDesigner = (n, e, t) => {
981
+ n["radio-group"] = Se, e["radio-group"] = X;
1028
982
  };
1029
983
  export {
1030
- w as RadioGroup,
1031
- w as default,
1032
- I as propsResolver,
1033
- N as radioGroupProps,
1034
- ee as radioProps
984
+ P as RadioGroup,
985
+ P as default,
986
+ X as propsResolver,
987
+ U as radioGroupProps,
988
+ ne as radioProps
1035
989
  };