@farris/ui-vue 1.2.7 → 1.2.9

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 (246) hide show
  1. package/components/accordion/index.esm.js +136 -136
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +418 -456
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/border-editor/index.esm.js +4 -4
  6. package/components/border-editor/index.umd.cjs +1 -1
  7. package/components/button/index.esm.js +1 -1
  8. package/components/button/index.umd.cjs +1 -1
  9. package/components/button-edit/index.esm.js +363 -436
  10. package/components/button-edit/index.umd.cjs +1 -1
  11. package/components/button-group/index.esm.js +5 -5
  12. package/components/button-group/index.umd.cjs +1 -1
  13. package/components/calendar/index.esm.js +417 -417
  14. package/components/calendar/index.umd.cjs +1 -1
  15. package/components/capsule/index.esm.js +176 -176
  16. package/components/capsule/index.umd.cjs +1 -1
  17. package/components/checkbox/index.esm.js +557 -594
  18. package/components/checkbox/index.umd.cjs +1 -1
  19. package/components/color-picker/index.esm.js +119 -119
  20. package/components/color-picker/index.umd.cjs +2 -2
  21. package/components/combo-list/index.esm.js +502 -535
  22. package/components/combo-list/index.umd.cjs +1 -1
  23. package/components/combo-tree/index.esm.js +69 -69
  24. package/components/combo-tree/index.umd.cjs +1 -1
  25. package/components/component/index.esm.js +387 -275
  26. package/components/component/index.umd.cjs +1 -1
  27. package/components/condition/index.esm.js +1219 -983
  28. package/components/condition/index.umd.cjs +1 -1
  29. package/components/content-container/index.esm.js +292 -219
  30. package/components/content-container/index.umd.cjs +1 -1
  31. package/components/data-grid/index.css +1 -1
  32. package/components/data-grid/index.esm.js +5718 -5546
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +3291 -2930
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2650 -2682
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/dependent-base/style.js +1 -0
  39. package/components/dependent-fluid/style.js +1 -0
  40. package/components/dependent-icon/style.js +1 -0
  41. package/components/dependent-input/style.js +1 -0
  42. package/components/dependent-table/style.js +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +945 -932
  45. package/components/designer-canvas/index.umd.cjs +1 -1
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +175 -133
  48. package/components/designer-outline/index.umd.cjs +1 -1
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -1
  51. package/components/discussion-editor/index.esm.js +1 -1
  52. package/components/discussion-editor/index.umd.cjs +1 -1
  53. package/components/dropdown/index.esm.js +246 -246
  54. package/components/dropdown/index.umd.cjs +2 -2
  55. package/components/dynamic-form/index.esm.js +1319 -1172
  56. package/components/dynamic-form/index.umd.cjs +1 -1
  57. package/components/dynamic-resolver/index.esm.js +119 -82
  58. package/components/dynamic-resolver/index.umd.cjs +1 -1
  59. package/components/dynamic-view/index.esm.js +258 -249
  60. package/components/dynamic-view/index.umd.cjs +1 -1
  61. package/components/enum-editor/index.esm.js +3 -3
  62. package/components/enum-editor/index.umd.cjs +1 -1
  63. package/components/events-editor/index.esm.js +569 -514
  64. package/components/events-editor/index.umd.cjs +1 -1
  65. package/components/expression-editor/index.esm.js +104 -104
  66. package/components/expression-editor/index.umd.cjs +1 -1
  67. package/components/external-container/index.css +1 -1
  68. package/components/external-container/index.esm.js +3122 -2686
  69. package/components/external-container/index.umd.cjs +1 -1
  70. package/components/field-selector/index.css +1 -1
  71. package/components/field-selector/index.esm.js +6780 -6608
  72. package/components/field-selector/index.umd.cjs +1 -1
  73. package/components/filter-bar/index.css +1 -1
  74. package/components/filter-bar/index.esm.js +1466 -1523
  75. package/components/filter-bar/index.umd.cjs +1 -1
  76. package/components/flow-canvas/index.css +1 -1
  77. package/components/flow-canvas/index.esm.js +1048 -1035
  78. package/components/flow-canvas/index.umd.cjs +1 -1
  79. package/components/image-cropper/index.esm.js +422 -422
  80. package/components/image-cropper/index.umd.cjs +1 -1
  81. package/components/input-group/index.esm.js +674 -716
  82. package/components/input-group/index.umd.cjs +1 -1
  83. package/components/layout/index.esm.js +291 -291
  84. package/components/layout/index.umd.cjs +1 -1
  85. package/components/list-nav/index.esm.js +303 -230
  86. package/components/list-nav/index.umd.cjs +1 -1
  87. package/components/list-view/index.css +1 -1
  88. package/components/list-view/index.esm.js +2486 -2130
  89. package/components/list-view/index.umd.cjs +1 -1
  90. package/components/lookup/index.css +1 -1
  91. package/components/lookup/index.esm.js +7474 -7272
  92. package/components/lookup/index.umd.cjs +1 -1
  93. package/components/mapping-editor/index.css +1 -1
  94. package/components/mapping-editor/index.esm.js +6139 -5949
  95. package/components/mapping-editor/index.umd.cjs +1 -1
  96. package/components/message-box/index.esm.js +1 -1
  97. package/components/message-box/index.umd.cjs +1 -1
  98. package/components/modal/index.esm.js +1 -1
  99. package/components/modal/index.umd.cjs +1 -1
  100. package/components/nav/index.esm.js +432 -371
  101. package/components/nav/index.umd.cjs +3 -3
  102. package/components/number-range/index.esm.js +1124 -0
  103. package/components/number-range/index.umd.cjs +1 -0
  104. package/components/number-range/package.json +8 -0
  105. package/components/number-range/style.js +6 -0
  106. package/components/number-spinner/index.esm.js +1155 -0
  107. package/components/number-spinner/index.umd.cjs +1 -0
  108. package/components/number-spinner/package.json +8 -0
  109. package/components/number-spinner/style.js +4 -0
  110. package/components/order/index.css +1 -1
  111. package/components/order/index.esm.js +1215 -1178
  112. package/components/order/index.umd.cjs +1 -1
  113. package/components/page-footer/index.esm.js +147 -147
  114. package/components/page-footer/index.umd.cjs +1 -1
  115. package/components/page-header/index.esm.js +1240 -1346
  116. package/components/page-header/index.umd.cjs +1 -1
  117. package/components/pagination/index.esm.js +489 -428
  118. package/components/pagination/index.umd.cjs +1 -1
  119. package/components/progress/index.esm.js +220 -220
  120. package/components/progress/index.umd.cjs +3 -3
  121. package/components/property-editor/index.esm.js +1512 -1540
  122. package/components/property-editor/index.umd.cjs +3 -3
  123. package/components/property-panel/index.css +1 -1
  124. package/components/property-panel/index.esm.js +749 -815
  125. package/components/property-panel/index.umd.cjs +1 -1
  126. package/components/query-solution/index.css +1 -0
  127. package/components/query-solution/index.esm.js +7074 -0
  128. package/components/query-solution/index.umd.cjs +1 -0
  129. package/components/query-solution/package.json +8 -0
  130. package/components/query-solution/style.js +2 -0
  131. package/components/radio-button/index.esm.js +86 -86
  132. package/components/radio-button/index.umd.cjs +1 -1
  133. package/components/radio-group/index.esm.js +442 -479
  134. package/components/radio-group/index.umd.cjs +1 -1
  135. package/components/rate/index.esm.js +213 -208
  136. package/components/rate/index.umd.cjs +1 -1
  137. package/components/response-layout/index.esm.js +116 -116
  138. package/components/response-layout/index.umd.cjs +1 -1
  139. package/components/response-layout-editor/index.esm.js +943 -918
  140. package/components/response-layout-editor/index.umd.cjs +1 -1
  141. package/components/response-toolbar/index.esm.js +1174 -1295
  142. package/components/response-toolbar/index.umd.cjs +1 -1
  143. package/components/schema-selector/index.css +1 -1
  144. package/components/schema-selector/index.esm.js +5383 -5171
  145. package/components/schema-selector/index.umd.cjs +2 -2
  146. package/components/search-box/index.esm.js +201 -201
  147. package/components/search-box/index.umd.cjs +1 -1
  148. package/components/section/index.esm.js +684 -542
  149. package/components/section/index.umd.cjs +1 -1
  150. package/components/smoke-detector/index.esm.js +121 -121
  151. package/components/smoke-detector/index.umd.cjs +1 -1
  152. package/components/spacing-editor/index.esm.js +2 -2
  153. package/components/spacing-editor/index.umd.cjs +1 -1
  154. package/components/splitter/index.esm.js +1158 -382
  155. package/components/splitter/index.umd.cjs +1 -1
  156. package/components/step/index.esm.js +232 -232
  157. package/components/step/index.umd.cjs +1 -1
  158. package/components/switch/index.esm.js +451 -487
  159. package/components/switch/index.umd.cjs +1 -1
  160. package/components/tabs/index.esm.js +2078 -2168
  161. package/components/tabs/index.umd.cjs +1 -1
  162. package/components/tags/index.esm.js +318 -320
  163. package/components/tags/index.umd.cjs +1 -1
  164. package/components/text/index.esm.js +192 -192
  165. package/components/text/index.umd.cjs +1 -1
  166. package/components/textarea/index.esm.js +471 -497
  167. package/components/textarea/index.umd.cjs +1 -1
  168. package/components/time-picker/index.esm.js +1421 -1441
  169. package/components/time-picker/index.umd.cjs +1 -1
  170. package/components/transfer/index.css +1 -1
  171. package/components/transfer/index.esm.js +430 -421
  172. package/components/transfer/index.umd.cjs +1 -1
  173. package/components/tree-grid/index.css +1 -1
  174. package/components/tree-grid/index.esm.js +6806 -6624
  175. package/components/tree-grid/index.umd.cjs +1 -1
  176. package/components/tree-view/index.esm.js +2793 -2433
  177. package/components/tree-view/index.umd.cjs +1 -1
  178. package/components/uploader/index.esm.js +165 -165
  179. package/components/uploader/index.umd.cjs +2 -2
  180. package/components/verify-detail/index.esm.js +255 -255
  181. package/components/verify-detail/index.umd.cjs +1 -1
  182. package/components/video/index.esm.js +413 -334
  183. package/components/video/index.umd.cjs +1 -1
  184. package/components/weather/index.esm.js +902 -902
  185. package/components/weather/index.umd.cjs +4 -4
  186. package/farris.all.esm.js +54155 -52847
  187. package/farris.all.umd.cjs +9 -9
  188. package/index.css +1 -1
  189. package/package.json +1 -1
  190. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  191. package/types/checkbox/index.d.ts +1 -0
  192. package/types/combo-list/src/components/list-container.component.d.ts +3 -0
  193. package/types/combo-list/src/components/list-container.props.d.ts +5 -1
  194. package/types/common/entity/entity-schema.d.ts +258 -0
  195. package/types/component/src/component-ref.props.d.ts +4 -0
  196. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  197. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  198. package/types/data-grid/index.d.ts +5 -2
  199. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  200. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  201. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  202. package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
  203. package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
  204. package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
  205. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  206. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  207. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  208. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  209. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  210. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  211. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  212. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  213. package/types/data-view/composition/types.d.ts +19 -7
  214. package/types/data-view/composition/use-edit.d.ts +2 -1
  215. package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
  216. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  217. package/types/designer-canvas/src/types.d.ts +3 -3
  218. package/types/dynamic-form/index.d.ts +3 -1
  219. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  220. package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
  221. package/types/dynamic-form/src/types.d.ts +1 -1
  222. package/types/dynamic-resolver/index.d.ts +1 -0
  223. package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
  224. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  225. package/types/dynamic-resolver/src/types.d.ts +3 -2
  226. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  227. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
  228. package/types/modal/src/modal.props.d.ts +1 -4
  229. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
  230. package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
  231. package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
  232. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  233. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  234. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  235. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  236. package/types/tabs/src/composition/types.d.ts +2 -2
  237. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  238. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
  239. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  240. package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
  241. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  242. package/types/tags/index.d.ts +36 -5
  243. package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
  244. package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
  245. package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
  246. package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
@@ -1,10 +1,11 @@
1
- var oe = Object.defineProperty;
2
- var ae = (n, e, t) => e in n ? oe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var F = (n, e, t) => ae(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as O, inject as x, ref as g, computed as N, watch as E, onMounted as z, createVNode as v, Fragment as re, provide as ie } from "vue";
5
- import { cloneDeep as le } from "lodash-es";
6
- import { CHECKBOX_CONTEXT as W, useCheck as ce } from "@farris/ui-vue/components/common";
7
- const se = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/check-box.schema.json", ue = "check-box", de = "A Farris Input Component", me = "object", ye = {
1
+ var ie = Object.defineProperty;
2
+ var ae = (n, e, t) => e in n ? ie(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var M = (n, e, t) => ae(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as O, inject as A, ref as h, computed as G, watch as $, onMounted as z, createVNode as b, Fragment as ce, provide as le } from "vue";
5
+ import { cloneDeep as se } from "lodash-es";
6
+ import { CHECKBOX_CONTEXT as J, useCheck as pe } from "../common/index.esm.js";
7
+ import { getSchemaByType as X } from "../dynamic-resolver/index.esm.js";
8
+ const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-design.gitee.io/check-box.schema.json", me = "check-box", fe = "A Farris Input Component", ye = "object", he = {
8
9
  id: {
9
10
  description: "The unique identifier for a check box",
10
11
  type: "string"
@@ -12,7 +13,7 @@ const se = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
12
13
  type: {
13
14
  description: "The type string of check box component",
14
15
  type: "string",
15
- default: "checkbox"
16
+ default: "check-box"
16
17
  },
17
18
  appearance: {
18
19
  description: "",
@@ -76,115 +77,118 @@ const se = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
76
77
  type: "boolean",
77
78
  default: !0
78
79
  }
79
- }, fe = [
80
+ }, ge = [
80
81
  "id",
81
82
  "type"
82
- ], he = {
83
- $schema: se,
84
- $id: pe,
85
- title: ue,
86
- description: de,
87
- type: me,
88
- properties: ye,
89
- required: fe
90
- }, H = {}, q = {};
91
- function U(n) {
92
- const { properties: e, title: t } = n, o = Object.keys(e).reduce((i, c) => (i[c] = e[c].type === "object" && e[c].properties ? U(e[c]) : le(e[c].default), i), {});
93
- return o.id = `${t}-${Date.now()}`, o;
83
+ ], be = [
84
+ "id",
85
+ "appearance",
86
+ "binding"
87
+ ], ve = {
88
+ $schema: ue,
89
+ $id: de,
90
+ title: me,
91
+ description: fe,
92
+ type: ye,
93
+ properties: he,
94
+ required: ge,
95
+ ignore: be
96
+ }, H = {}, Q = {};
97
+ function W(n) {
98
+ const { properties: e, title: t, ignore: o } = n, r = o && Array.isArray(o), s = Object.keys(e).reduce((m, c) => ((!r || !o.find((f) => f == c)) && (m[c] = e[c].type === "object" && e[c].properties ? W(e[c]) : se(e[c].default)), m), {});
99
+ return (!r || !o.find((m) => m == "id")) && (s.id = `${t}-${Date.now()}`), s;
94
100
  }
95
- function L(n, e = {}) {
96
- const t = H[n];
97
- if (t) {
98
- let o = U(t);
99
- const i = q[n];
100
- return o = i ? i({ getSchemaByType: L }, o, e) : o, o;
101
+ function U(n, e = {}, t) {
102
+ const o = H[n];
103
+ if (o) {
104
+ let r = W(o);
105
+ const s = Q[n];
106
+ return r = s ? s({ getSchemaByType: U }, r, e, t) : r, r;
101
107
  }
102
108
  return null;
103
109
  }
104
- function ge(n, e) {
105
- const t = U(e);
106
- return Object.keys(n).reduce((o, i) => (o[i] = n[i], o), t), t;
110
+ function ke(n, e) {
111
+ const t = W(e);
112
+ return Object.keys(n).reduce((o, r) => (o[r] && typeof o[r] == "object" ? Object.assign(o[r], n[r]) : o[r] = n[r], o), t), t;
107
113
  }
108
- function ve(n, e) {
109
- return Object.keys(n).filter((o) => n[o] != null).reduce((o, i) => {
110
- if (e.has(i)) {
111
- const c = e.get(i);
112
- if (typeof c == "string")
113
- o[c] = n[i];
114
+ function Ce(n, e) {
115
+ return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
116
+ if (e.has(r)) {
117
+ const s = e.get(r);
118
+ if (typeof s == "string")
119
+ o[s] = n[r];
114
120
  else {
115
- const m = c(i, n[i], n);
121
+ const m = s(r, n[r], n);
116
122
  Object.assign(o, m);
117
123
  }
118
124
  } else
119
- o[i] = n[i];
125
+ o[r] = n[r];
120
126
  return o;
121
127
  }, {});
122
128
  }
123
- function be(n, e, t = /* @__PURE__ */ new Map()) {
124
- const o = ge(n, e);
125
- return ve(o, t);
129
+ function Me(n, e, t = /* @__PURE__ */ new Map()) {
130
+ const o = ke(n, e);
131
+ return Ce(o, t);
126
132
  }
127
- function Ce(n = {}) {
128
- function e(r, u, a, p) {
129
- if (typeof a == "number")
130
- return p[r].length === a;
131
- if (typeof a == "object") {
132
- const s = Object.keys(a)[0], y = a[s];
133
- if (s === "not")
134
- return Number(p[r].length) !== Number(y);
135
- if (s === "moreThan")
136
- return Number(p[r].length) >= Number(y);
137
- if (s === "lessThan")
138
- return Number(p[r].length) <= Number(y);
133
+ function Te(n = {}) {
134
+ function e(a, d, i, u) {
135
+ if (typeof i == "number")
136
+ return u[a].length === i;
137
+ if (typeof i == "object") {
138
+ const l = Object.keys(i)[0], y = i[l];
139
+ if (l === "not")
140
+ return Number(u[a].length) !== Number(y);
141
+ if (l === "moreThan")
142
+ return Number(u[a].length) >= Number(y);
143
+ if (l === "lessThan")
144
+ return Number(u[a].length) <= Number(y);
139
145
  }
140
146
  return !1;
141
147
  }
142
- function t(r, u, a, p) {
143
- return p[r] && p[r].propertyValue && String(p[r].propertyValue.value) === String(a);
148
+ function t(a, d, i, u) {
149
+ return u[a] && u[a].propertyValue && String(u[a].propertyValue.value) === String(i);
144
150
  }
145
151
  const o = /* @__PURE__ */ new Map([
146
152
  ["length", e],
147
153
  ["getProperty", t]
148
154
  ]);
149
- Object.keys(n).reduce((r, u) => (r.set(u, n[u]), r), o);
150
- function i(r, u) {
151
- const a = r;
152
- return typeof u == "number" ? [{ target: a, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: a, operator: "getProperty", param: r, value: !!u }] : typeof u == "object" ? Object.keys(u).map((p) => {
153
- if (p === "length")
154
- return { target: a, operator: "length", param: null, value: u[p] };
155
- const s = p, y = u[p];
156
- return { target: a, operator: "getProperty", param: s, value: y };
155
+ Object.keys(n).reduce((a, d) => (a.set(d, n[d]), a), o);
156
+ function r(a, d) {
157
+ const i = a;
158
+ return typeof d == "number" ? [{ target: i, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: i, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((u) => {
159
+ if (u === "length")
160
+ return { target: i, operator: "length", param: null, value: d[u] };
161
+ const l = u, y = d[u];
162
+ return { target: i, operator: "getProperty", param: l, value: y };
157
163
  }) : [];
158
164
  }
159
- function c(r) {
160
- return Object.keys(r).reduce((a, p) => {
161
- const s = i(p, r[p]);
162
- return a.push(...s), a;
165
+ function s(a) {
166
+ return Object.keys(a).reduce((i, u) => {
167
+ const l = r(u, a[u]);
168
+ return i.push(...l), i;
163
169
  }, []);
164
170
  }
165
- function m(r, u) {
166
- if (o.has(r.operator)) {
167
- const a = o.get(r.operator);
168
- return a && a(r.target, r.param, r.value, u) || !1;
171
+ function m(a, d) {
172
+ if (o.has(a.operator)) {
173
+ const i = o.get(a.operator);
174
+ return i && i(a.target, a.param, a.value, d) || !1;
169
175
  }
170
176
  return !1;
171
177
  }
172
- function d(r, u) {
173
- return c(r).reduce((s, y) => s && m(y, u), !0);
178
+ function c(a, d) {
179
+ return s(a).reduce((l, y) => l && m(y, d), !0);
174
180
  }
175
- function f(r, u) {
176
- const a = Object.keys(r), p = a.includes("allOf"), s = a.includes("anyOf"), y = p || s, b = (y ? r[y ? p ? "allOf" : "anyOf" : "allOf"] : [r]).map((B) => d(B, u));
177
- return p ? !b.includes(!1) : b.includes(!0);
181
+ function f(a, d) {
182
+ const i = Object.keys(a), u = i.includes("allOf"), l = i.includes("anyOf"), y = u || l, v = (y ? a[y ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((P) => c(P, d));
183
+ return u ? !v.includes(!1) : v.includes(!0);
178
184
  }
179
185
  return { parseValueSchema: f };
180
186
  }
181
- const l = {
182
- Button: { type: "Button", name: "按钮", icon: "Button" },
183
- ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
187
+ const p = {
188
+ button: { type: "button", name: "按钮", icon: "Button" },
184
189
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
185
- "response-toolbar-item": { type: "response-toolbar-item", name: "工具栏项", icon: "Button" },
190
+ "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
186
191
  "content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
187
- DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
188
192
  "input-group": { type: "input-group", name: "文本", icon: "TextBox" },
189
193
  textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
190
194
  lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
@@ -195,118 +199,47 @@ const l = {
195
199
  "check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
196
200
  "check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
197
201
  "combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
198
- /** 暂时没用 */
199
- FlexLayout: { type: "FlexLayout", name: "弹性布局" },
200
- /** 暂时没用 */
201
- FlowLayout: { type: "FlowLayout", name: "流布局" },
202
- ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
203
- ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
202
+ "response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
203
+ "response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
204
+ "response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
204
205
  "tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
205
- TreeGridField: { type: "TreeGridField", name: "树表格列" },
206
- FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
207
- Form: { type: "Form", name: "卡片面板", icon: "Form" },
208
- QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
206
+ "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
209
207
  "data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
210
208
  "data-grid-column": { type: "data-grid-column", name: "表格列" },
211
- Panel: { type: "Panel", name: "面板", icon: "ContentContainer" },
212
- Module: { type: "Module", name: "模块", icon: "Module" },
209
+ module: { type: "Module", name: "模块", icon: "Module" },
213
210
  component: { type: "component", name: "组件", icon: "Component" },
214
- ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
215
- Image: { type: "Image", name: "图像", icon: "Image" },
216
- ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
217
- HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
218
- ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
219
- RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
220
211
  tabs: { type: "tabs", name: "标签页", icon: "Tab" },
221
212
  "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
222
213
  "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
223
- Tag: { type: "Tag", name: "Tag", icon: "Tag" },
224
- Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
225
- HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
226
- ListView: { type: "ListView", name: "列表", icon: "ListView" },
227
- RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
228
- TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
229
- TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
214
+ "time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
230
215
  section: { type: "section", name: "分组面板", icon: "Section" },
231
- SectionToolbar: { type: "SectionToolbar", name: "分组面板工具栏" },
232
- SectionToolbarItem: { type: "SectionToolbarItem", name: "分组面板按钮" },
233
- QueryScheme: { type: "QueryScheme", name: "筛选方案", icon: "QueryScheme" },
234
- FormHeader: { type: "FormHeader", name: "翻页" },
235
- Splitter: { type: "Splitter", name: "分栏面板", icon: "Splitter" },
236
- SplitterPane: { type: "SplitterPane", name: "分栏面板项", dependentParentControl: "Splitter" },
237
- WizardDetail: { type: "WizardDetail", name: "向导详情页" },
238
- WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
239
- Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
240
- MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
241
- Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
242
- avatar: { type: "avatar", name: "头像", icon: "Avatar" },
243
- ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
244
- ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
245
- NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
246
- Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
247
- LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
248
- ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
249
- FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
250
- FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
251
- ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
252
- MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
253
- MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
254
- Footer: { type: "Footer", name: "页脚" },
255
- DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
256
- DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
257
- NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
258
- Tags: { type: "Tags", name: "标记组", icon: "Tags" },
259
- Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
216
+ "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
217
+ "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
218
+ splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
219
+ "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
220
+ "component-ref": { type: "component-ref", name: "组件引用节点" },
221
+ uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
260
222
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
261
- ModalFooter: { type: "ModalFooter", name: "弹窗页脚", icon: "ModalFooter" },
262
- ScrollCollapsibleArea: { type: "ScrollCollapsibleArea", name: "滚动收折区域", icon: "ScrollCollapsibleArea" },
263
- PersonnelSelector: { type: "PersonnelSelector", name: "人员选择", icon: "PersonnelSelector" },
264
- Table: { type: "Table", name: "表格", icon: "DataGrid" },
265
- LoopContainer: { type: "LoopContainer", name: "循环容器", icon: "ContentContainer" },
266
- FileUploadPreview: { type: "FileUploadPreview", name: "附件上传预览", icon: "FileUpload" },
267
- DynamicArea: { type: "DynamicArea", name: "动态区域", icon: "ContentContainer" },
268
- DynamicAreaItem: { type: "DynamicAreaItem", name: "动态区域项", icon: "ContentContainer" },
269
- TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
270
- HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
271
- ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
272
- HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
273
- ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
274
- OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
275
- AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
276
- EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
277
- OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
278
- CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
279
- ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
280
- AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
281
- /** 查询类 start */
282
- Charts: { type: "Charts", name: "图表", icon: "Charts" },
283
- QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
284
- SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
285
- QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
286
- QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
287
- /** 查询类 end */
288
- /** 审批类 start */
289
- ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
290
- ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
291
- /** 审批类 end */
292
- }, ke = {}, Te = {};
293
- Ce();
294
- function Q(n, e, t = /* @__PURE__ */ new Map(), o = (m, d, f) => d, i = {}, c = (m) => m) {
295
- return H[e.title] = e, q[e.title] = o, ke[e.title] = i, Te[e.title] = c, (m = {}) => {
296
- const d = be(m, e, t), f = Object.keys(n).reduce((r, u) => (r[u] = n[u].default, r), {});
297
- return Object.assign(f, d);
223
+ "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
224
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
225
+ }, Ve = {}, we = {};
226
+ Te();
227
+ function Y(n, e, t = /* @__PURE__ */ new Map(), o = (m, c, f) => c, r = {}, s = (m) => m) {
228
+ return H[e.title] = e, Q[e.title] = o, Ve[e.title] = r, we[e.title] = s, (m = {}) => {
229
+ const c = Me(m, e, t), f = Object.keys(n).reduce((a, d) => (a[d] = n[d].default, a), {});
230
+ return Object.assign(f, c);
298
231
  };
299
232
  }
300
- function Se(n, e) {
233
+ function Be(n, e) {
301
234
  return { customClass: e.class, customStyle: e.style };
302
235
  }
303
- const _ = /* @__PURE__ */ new Map([
304
- ["appearance", Se]
236
+ const Z = /* @__PURE__ */ new Map([
237
+ ["appearance", Be]
305
238
  ]);
306
- function X(n, e, t) {
239
+ function I(n, e, t) {
307
240
  return e;
308
241
  }
309
- const G = {
242
+ const L = {
310
243
  /** 组件唯一标识 */
311
244
  id: { Type: String, default: "" },
312
245
  /** 自定义样式 */
@@ -329,67 +262,67 @@ const G = {
329
262
  label: { type: String, default: "" },
330
263
  /** 标识是否被选中 */
331
264
  checked: { type: Boolean, default: !1 }
332
- }, R = Q(G, he, _, X), $ = /* @__PURE__ */ O({
265
+ }, R = Y(L, ve, Z, I), q = /* @__PURE__ */ O({
333
266
  name: "FCheckBox",
334
- props: G,
267
+ props: L,
335
268
  emits: ["change", "changeValue", "update:modelValue", "update:checked"],
336
269
  setup(n, e) {
337
- const t = x(W, null), {
270
+ const t = A(J, null), {
338
271
  buttonClass: o,
339
- disabled: i,
340
- name: c,
272
+ disabled: r,
273
+ name: s,
341
274
  shouldRenderButton: m,
342
- shouldRenderNative: d,
275
+ shouldRenderNative: c,
343
276
  shouldRenderTag: f,
344
- tagClass: r,
345
- checked: u,
346
- onClickCheckBox: a
347
- } = ce(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
348
- g();
349
- const p = g(n.id), s = g(n.customClass), y = g(n.modelValue), k = g(n.indeterminate);
350
- return N(() => {
351
- const C = {
277
+ tagClass: a,
278
+ checked: d,
279
+ onClickCheckBox: i
280
+ } = pe(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
281
+ h();
282
+ const u = h(n.id), l = h(n.customClass), y = h(n.modelValue), C = h(n.indeterminate);
283
+ return G(() => {
284
+ const k = {
352
285
  "custom-control": !0,
353
286
  "custom-checkbox": !0
354
287
  };
355
- return s.value && s.value.split(" ").reduce((b, M) => (b[M] = !0, b), C), C;
356
- }), E(() => n.modelValue, (C) => {
357
- y.value = C;
358
- }), E(() => n.indeterminate, (C) => {
359
- k.value = C;
288
+ return l.value && l.value.split(" ").reduce((v, B) => (v[B] = !0, v), k), k;
289
+ }), $(() => n.modelValue, (k) => {
290
+ y.value = k;
291
+ }), $(() => n.indeterminate, (k) => {
292
+ C.value = k;
360
293
  }), z(() => {
361
294
  }), () => {
362
- var C, b, M, B, P, V;
363
- return v(re, null, [m.value && v("div", {
295
+ var k, v, B, P, S, E;
296
+ return b(ce, null, [m.value && b("div", {
364
297
  class: o.value,
365
298
  style: "border-radius:0;border: 1px solid #E8EBF2;",
366
- onClick: a
367
- }, [(b = (C = e.slots).default) == null ? void 0 : b.call(C)]), f.value && v("div", {
368
- class: r.value,
369
- onClick: a
370
- }, [v("div", {
299
+ onClick: i
300
+ }, [(v = (k = e.slots).default) == null ? void 0 : v.call(k)]), f.value && b("div", {
301
+ class: a.value,
302
+ onClick: i
303
+ }, [b("div", {
371
304
  class: "title"
372
- }, [(B = (M = e.slots).default) == null ? void 0 : B.call(M)]), v("div", {
305
+ }, [(P = (B = e.slots).default) == null ? void 0 : P.call(B)]), b("div", {
373
306
  class: "tip"
374
- }, null), v("span", {
307
+ }, null), b("span", {
375
308
  class: "f-icon f-icon-check f-radio-icon"
376
- }, null)]), d.value && v("div", {
309
+ }, null)]), c.value && b("div", {
377
310
  class: "custom-control custom-checkbox",
378
- onClick: a
379
- }, [v("input", {
311
+ onClick: i
312
+ }, [b("input", {
380
313
  type: "checkbox",
381
314
  class: "custom-control-input",
382
- name: c.value,
383
- id: p,
315
+ name: s.value,
316
+ id: u,
384
317
  value: n.value,
385
- checked: u.value,
386
- disabled: i.value
387
- }, null), v("div", {
318
+ checked: d.value,
319
+ disabled: r.value
320
+ }, null), b("div", {
388
321
  class: "custom-control-label"
389
- }, [(V = (P = e.slots).default) == null ? void 0 : V.call(P)])])]);
322
+ }, [(E = (S = e.slots).default) == null ? void 0 : E.call(S)])])]);
390
323
  };
391
324
  }
392
- }), Fe = "https://json-schema.org/draft/2020-12/schema", Me = "https://farris-design.gitee.io/check-box.schema.json", Be = "check-group", we = "A Farris Input Component", Pe = "object", De = {
325
+ }), Pe = "https://json-schema.org/draft/2020-12/schema", De = "https://farris-design.gitee.io/check-box.schema.json", Se = "check-group", Fe = "A Farris Input Component", xe = "object", Ee = {
393
326
  id: {
394
327
  description: "The unique identifier for a check box",
395
328
  type: "string"
@@ -456,18 +389,18 @@ const G = {
456
389
  type: "boolean",
457
390
  default: !0
458
391
  }
459
- }, Ve = [
392
+ }, Ae = [
460
393
  "id",
461
394
  "type"
462
- ], xe = {
463
- $schema: Fe,
464
- $id: Me,
465
- title: Be,
466
- description: we,
467
- type: Pe,
468
- properties: De,
469
- required: Ve
470
- }, Ee = {
395
+ ], $e = {
396
+ $schema: Pe,
397
+ $id: De,
398
+ title: Se,
399
+ description: Fe,
400
+ type: xe,
401
+ properties: Ee,
402
+ required: Ae
403
+ }, Ne = {
471
404
  /**
472
405
  * 是否被选中
473
406
  */
@@ -484,8 +417,8 @@ const G = {
484
417
  * type为button或者tag时的尺寸
485
418
  */
486
419
  size: { type: String, default: "middle" }
487
- }, j = {
488
- ...Ee,
420
+ }, _ = {
421
+ ...Ne,
489
422
  /**
490
423
  * 组件标识
491
424
  */
@@ -541,315 +474,377 @@ const G = {
541
474
  * 枚举数组中枚举值的key值。
542
475
  */
543
476
  valueField: { type: String, default: "value" }
544
- }, Y = Q(j, xe, _, X);
545
- function Z(n, e, t) {
546
- const o = N(() => !n.disabled), i = g(n.enumData);
547
- function c(a) {
548
- return a[n.valueField];
477
+ }, K = Y(_, $e, Z, I);
478
+ function ee(n, e, t) {
479
+ const o = G(() => !n.disabled), r = h(n.enumData);
480
+ function s(i) {
481
+ return i[n.valueField];
549
482
  }
550
- function m(a) {
551
- return a[n.textField];
483
+ function m(i) {
484
+ return i[n.textField];
552
485
  }
553
- function d(a) {
554
- return a ? n.isStringValue ? a.split(n.separator) : a : [];
486
+ function c(i) {
487
+ return i ? n.isStringValue ? i.split(n.separator) : i : [];
555
488
  }
556
- function f(a) {
557
- const s = i.value.map((y) => c(y)).filter((y) => a.some((k) => k === String(y)));
558
- return n.isStringValue ? s.join(n.separator) : s;
489
+ function f(i) {
490
+ const l = r.value.map((y) => s(y)).filter((y) => i.some((C) => C === String(y)));
491
+ return n.isStringValue ? l.join(n.separator) : l;
559
492
  }
560
- function r(a) {
561
- const p = String(c(a));
562
- return d(t.value).some((y) => y === p);
493
+ function a(i) {
494
+ const u = String(s(i));
495
+ return c(t.value).some((y) => y === u);
563
496
  }
564
- function u(a, p) {
497
+ function d(i, u) {
565
498
  if (o.value) {
566
- let s = d(t.value) || [];
567
- const y = String(c(a));
568
- !s || !s.length ? s.push(y) : s.some((k) => k === y) ? s = s.filter((k) => k !== y) : s.push(y), t.value = f(s), e.emit("changeValue", t.value), e.emit("update:modelValue", t.value);
499
+ let l = c(t.value) || [];
500
+ const y = String(s(i));
501
+ !l || !l.length ? l.push(y) : l.some((C) => C === y) ? l = l.filter((C) => C !== y) : l.push(y), t.value = f(l), e.emit("changeValue", t.value), e.emit("update:modelValue", t.value);
569
502
  }
570
- p.stopPropagation();
503
+ u.stopPropagation();
571
504
  }
572
505
  return {
573
- enumData: i,
574
- getValue: c,
506
+ enumData: r,
507
+ getValue: s,
575
508
  getText: m,
576
- checked: r,
577
- onClickCheckbox: u
509
+ checked: a,
510
+ onClickCheckbox: d
578
511
  };
579
512
  }
580
- const D = /* @__PURE__ */ O({
513
+ const x = /* @__PURE__ */ O({
581
514
  name: "FCheckGroup",
582
- props: j,
515
+ props: _,
583
516
  emits: ["changeValue", "update:modelValue"],
584
517
  setup(n, e) {
585
- const t = g(n.modelValue), o = g(n.horizontal), i = g(n.tabIndex), c = g(n.name), {
518
+ const t = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), s = h(n.name), {
586
519
  enumData: m,
587
- onClickCheckbox: d,
520
+ onClickCheckbox: c,
588
521
  getValue: f,
589
- getText: r,
590
- checked: u
591
- } = Z(n, e, t), a = N(() => ({
522
+ getText: a,
523
+ checked: d
524
+ } = ee(n, e, t), i = G(() => ({
592
525
  "farris-checkradio-hor": o.value
593
526
  }));
594
- E(() => n.modelValue, (s) => {
595
- t.value = s;
527
+ $(() => n.modelValue, (l) => {
528
+ t.value = l;
596
529
  });
597
- const p = g([]);
598
- return ie(W, {
599
- values: p,
530
+ const u = h([]);
531
+ return le(J, {
532
+ values: u,
600
533
  parentProps: n,
601
534
  parentContext: e
602
- }), () => v("div", {
603
- class: ["farris-input-wrap", a.value]
604
- }, [e.slots.default ? e.slots.default() : m.value.map((s, y) => {
605
- const k = "checkbox_" + c.value + y;
606
- return v("div", {
535
+ }), () => b("div", {
536
+ class: ["farris-input-wrap", i.value]
537
+ }, [e.slots.default ? e.slots.default() : m.value.map((l, y) => {
538
+ const C = "checkbox_" + s.value + y;
539
+ return b("div", {
607
540
  class: "custom-control custom-checkbox"
608
- }, [v("input", {
541
+ }, [b("input", {
609
542
  type: "checkbox",
610
543
  class: "custom-control-input",
611
- name: c.value,
612
- id: k,
613
- value: f(s),
614
- checked: u(s),
544
+ name: s.value,
545
+ id: C,
546
+ value: f(l),
547
+ checked: d(l),
615
548
  disabled: n.disabled,
616
- tabindex: i.value,
617
- onClick: (C) => d(s, C)
618
- }, null), v("label", {
549
+ tabindex: r.value,
550
+ onClick: (k) => c(l, k)
551
+ }, null), b("label", {
619
552
  class: "custom-control-label",
620
- for: k,
621
- title: r(s)
622
- }, [r(s)])]);
553
+ for: C,
554
+ title: a(l)
555
+ }, [a(l)])]);
623
556
  })]);
624
557
  }
625
558
  });
626
- function J(n, e, t) {
627
- var V;
559
+ function te(n, e, t) {
560
+ var E;
628
561
  function o() {
629
562
  t != null && t.resolveComponentContext && t.resolveComponentContext();
630
563
  }
631
564
  o();
632
- const i = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", m = g();
633
- function d() {
565
+ const r = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", m = h();
566
+ function c() {
634
567
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
635
568
  }
636
569
  function f() {
637
570
  return !1;
638
571
  }
639
- function r() {
572
+ function a() {
640
573
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
641
574
  }
642
- function u() {
575
+ function d() {
643
576
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
644
577
  }
645
- function a(h) {
646
- if (!h || !h.value)
578
+ function i(g) {
579
+ if (!g || !g.value)
647
580
  return null;
648
- if (h.value.schema && h.value.schema.type === "component")
649
- return h.value;
650
- const S = g(h == null ? void 0 : h.value.parent), T = a(S);
651
- return T || null;
581
+ if (g.value.schema && g.value.schema.type === "component")
582
+ return g.value;
583
+ const T = h(g == null ? void 0 : g.value.parent), V = i(T);
584
+ return V || null;
652
585
  }
653
- function p(h = e) {
654
- const { componentInstance: S, designerItemElementRef: T } = h;
655
- return !S || !S.value ? null : S.value.canMove ? T : p(h.parent);
586
+ function u(g = e) {
587
+ const { componentInstance: T, designerItemElementRef: V } = g;
588
+ return !T || !T.value ? null : T.value.canMove ? V : u(g.parent);
656
589
  }
657
- function s(h) {
658
- return !!t && t.canAccepts(h);
590
+ function l(g) {
591
+ return !!t && t.canAccepts(g);
659
592
  }
660
593
  function y() {
661
594
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
662
595
  }
663
- function k() {
596
+ function C() {
664
597
  }
665
- function C(h, S) {
666
- S && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(S);
598
+ function k(g, T) {
599
+ T && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(T);
667
600
  }
668
- function b(h) {
669
- const { componentType: S } = h;
670
- let T = L(S, h);
671
- t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(h, T));
672
- const A = S.toLowerCase().replace("-", "_");
673
- return T && !T.id && T.type === S && (T.id = `${A}_${Math.random().toString().slice(2, 6)}`), T;
601
+ function v(g, T) {
602
+ const { componentType: V } = g;
603
+ let w = U(V, g, T);
604
+ t && t.onResolveNewComponentSchema && (w = t.onResolveNewComponentSchema(g, w));
605
+ const N = V.toLowerCase().replace("-", "_");
606
+ return w && !w.id && w.type === V && (w.id = `${N}_${Math.random().toString().slice(2, 6)}`), w;
674
607
  }
675
- function M(h, S) {
676
- const T = String(h.getAttribute("data-controltype")), A = h.getAttribute("data-feature"), I = A ? JSON.parse(A) : {};
677
- I.parentComponentInstance = m.value;
678
- let w = L(T, I);
679
- t && t.onAcceptNewChildElement && (w = t.onAcceptNewChildElement(h, S, w));
680
- const ne = T.toLowerCase().replace("-", "_");
681
- return w && !w.id && w.type === T && (w.id = `${ne}_${Math.random().toString().slice(2, 6)}`), w;
608
+ function B(g, T) {
609
+ const V = String(g.getAttribute("data-controltype")), w = g.getAttribute("data-feature"), N = w ? JSON.parse(w) : {};
610
+ N.parentComponentInstance = m.value;
611
+ let D = U(V, N);
612
+ t && t.onAcceptNewChildElement && (D = t.onAcceptNewChildElement(g, T, D));
613
+ const re = V.toLowerCase().replace("-", "_");
614
+ return D && !D.id && D.type === V && (D.id = `${re}_${Math.random().toString().slice(2, 6)}`), D;
682
615
  }
683
- function B(h) {
616
+ function P(g) {
684
617
  }
685
- function P(...h) {
618
+ function S(...g) {
686
619
  if (t && t.getPropsConfig)
687
- return t.getPropsConfig(...h);
620
+ return t.getPropsConfig(...g);
688
621
  }
689
622
  return m.value = {
690
- canMove: d(),
623
+ canMove: c(),
691
624
  canSelectParent: f(),
692
- canDelete: r(),
693
- canNested: !u(),
625
+ canDelete: a(),
626
+ canNested: !d(),
694
627
  contents: e == null ? void 0 : e.schema.contents,
695
628
  elementRef: n,
696
- parent: (V = e == null ? void 0 : e.parent) == null ? void 0 : V.componentInstance,
629
+ parent: (E = e == null ? void 0 : e.parent) == null ? void 0 : E.componentInstance,
697
630
  schema: e == null ? void 0 : e.schema,
698
- styles: i,
699
- designerClass: c,
700
- canAccepts: s,
701
- getBelongedComponentInstance: a,
702
- getDraggableDesignItemElement: p,
631
+ styles: r,
632
+ designerClass: s,
633
+ canAccepts: l,
634
+ getBelongedComponentInstance: i,
635
+ getDraggableDesignItemElement: u,
703
636
  getDraggingDisplayText: y,
704
- getPropConfig: P,
705
- getDragScopeElement: k,
706
- onAcceptMovedChildElement: C,
707
- onAcceptNewChildElement: M,
708
- onChildElementMovedOut: B,
709
- addNewChildComponentSchema: b,
637
+ getPropConfig: S,
638
+ getDragScopeElement: C,
639
+ onAcceptMovedChildElement: k,
640
+ onAcceptNewChildElement: B,
641
+ onChildElementMovedOut: P,
642
+ addNewChildComponentSchema: v,
710
643
  updateDragAndDropRules: o,
711
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || g(!1),
712
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || g(!1)
644
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || h(!1),
645
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || h(!1)
713
646
  }, m;
714
647
  }
715
- function K(n, e) {
648
+ function ne(n, e) {
716
649
  n.schema;
717
- const t = g(!0), o = g(!0);
718
- function i(a) {
650
+ const t = h(!0), o = h(!0);
651
+ function r(i) {
719
652
  return !1;
720
653
  }
721
- function c() {
654
+ function s() {
722
655
  return !1;
723
656
  }
724
657
  function m() {
725
658
  return !1;
726
659
  }
727
- function d() {
660
+ function c() {
728
661
  return !0;
729
662
  }
730
- function f(a) {
663
+ function f(i) {
731
664
  }
732
- function r() {
665
+ function a() {
733
666
  }
734
- function u(a) {
667
+ function d(i) {
735
668
  return null;
736
669
  }
737
670
  return {
738
- canAccepts: i,
739
- checkCanDeleteComponent: c,
671
+ canAccepts: r,
672
+ checkCanDeleteComponent: s,
740
673
  checkCanMoveComponent: m,
741
- hideNestedPaddingInDesginerView: d,
674
+ hideNestedPaddingInDesginerView: c,
742
675
  onAcceptMovedChildElement: f,
743
- resolveComponentContext: r,
676
+ resolveComponentContext: a,
744
677
  triggerBelongedComponentToMoveWhenMoved: t,
745
678
  triggerBelongedComponentToDeleteWhenDeleted: o,
746
- getPropsConfig: u
679
+ getPropsConfig: d
747
680
  };
748
681
  }
749
- class ee {
682
+ class je {
683
+ constructor(e, t) {
684
+ M(this, "componentId");
685
+ M(this, "viewModelId");
686
+ M(this, "eventsEditorUtils");
687
+ M(this, "formSchemaUtils");
688
+ M(this, "formMetadataConverter");
689
+ M(this, "designViewModelUtils");
690
+ M(this, "designViewModelField");
691
+ M(this, "controlCreatorUtils");
692
+ M(this, "designerHostService");
693
+ M(this, "schemaService", null);
694
+ M(this, "metadataService", null);
695
+ M(this, "propertyConfig", {
696
+ type: "object",
697
+ categories: {}
698
+ });
699
+ var o;
700
+ this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
701
+ }
702
+ getTableInfo() {
703
+ var e;
704
+ return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
705
+ }
706
+ setDesignViewModelField(e) {
707
+ const t = e.binding && e.binding.type === "Form" && e.binding.field;
708
+ if (t) {
709
+ if (!this.designViewModelField) {
710
+ const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
711
+ this.designViewModelField = o.fields.find((r) => r.id === t);
712
+ }
713
+ e.updateOn = this.designViewModelField.updateOn;
714
+ }
715
+ }
716
+ changeFieldEditorType(e, t) {
717
+ }
718
+ getBasicPropConfig(e) {
719
+ return {
720
+ description: "Basic Information",
721
+ title: "基本信息",
722
+ properties: {
723
+ id: {
724
+ description: "组件标识",
725
+ title: "标识",
726
+ type: "string",
727
+ readonly: !0
728
+ },
729
+ type: {
730
+ description: "组件类型",
731
+ title: "控件类型",
732
+ type: "select",
733
+ editor: {
734
+ type: "combo-list",
735
+ textField: "name",
736
+ valueField: "value",
737
+ data: [{ value: e.type, name: p[e.type].name }]
738
+ }
739
+ }
740
+ }
741
+ };
742
+ }
743
+ getAppearanceConfig(e = null) {
744
+ return {
745
+ title: "样式",
746
+ description: "Appearance",
747
+ properties: {
748
+ class: {
749
+ title: "class样式",
750
+ type: "string",
751
+ description: "组件的CSS样式",
752
+ $converter: "/converter/appearance.converter"
753
+ },
754
+ style: {
755
+ title: "style样式",
756
+ type: "string",
757
+ description: "组件的样式",
758
+ $converter: "/converter/appearance.converter"
759
+ }
760
+ }
761
+ };
762
+ }
763
+ }
764
+ const F = class F {
765
+ /**
766
+ * 根据绑定字段类型获取可用的输入类控件
767
+ */
750
768
  static getEditorTypesByMDataType(e) {
751
- const t = this.fieldControlTypeMapping[e];
769
+ const t = F.fieldControlTypeMapping[e];
752
770
  return t || [{ key: "", value: "" }];
753
771
  }
754
- }
772
+ /**
773
+ * 获取所有输入类控件
774
+ */
775
+ static getAllInputTypes() {
776
+ const e = [];
777
+ for (let t in F.fieldControlTypeMapping)
778
+ F.fieldControlTypeMapping[t].forEach((o) => {
779
+ e.find((r) => r.key === o.key && r.value === o.value) || e.push({ key: o.key, value: o.value });
780
+ });
781
+ return e;
782
+ }
783
+ };
755
784
  /**
756
785
  * <字段类型,可配置的控件类型列表>的映射
757
786
  */
758
- F(ee, "fieldControlTypeMapping", {
787
+ M(F, "fieldControlTypeMapping", {
759
788
  String: [
760
- { key: l["input-group"].type, value: l["input-group"].name },
761
- { key: l.lookup.type, value: l.lookup.name },
762
- { key: l.Image.type, value: l.Image.name },
763
- { key: l["date-picker"].type, value: l["date-picker"].name },
764
- { key: l["check-box"].type, value: l["check-box"].name },
765
- { key: l["radio-group"].type, value: l["radio-group"].name },
766
- { key: l["combo-list"].type, value: l["combo-list"].name },
767
- { key: l.textarea.type, value: l.textarea.name }
768
- // { key: DgControl.Tags.type, value: DgControl.Tags.name },
789
+ { key: p["input-group"].type, value: p["input-group"].name },
790
+ { key: p.lookup.type, value: p.lookup.name },
791
+ { key: p["date-picker"].type, value: p["date-picker"].name },
792
+ { key: p["check-box"].type, value: p["check-box"].name },
793
+ { key: p["radio-group"].type, value: p["radio-group"].name },
794
+ { key: p["combo-list"].type, value: p["combo-list"].name },
795
+ { key: p.textarea.type, value: p.textarea.name }
769
796
  ],
770
797
  Text: [
771
- { key: l.textarea.type, value: l.textarea.name },
772
- { key: l.avatar.type, value: l.avatar.name },
773
- { key: l.lookup.type, value: l.lookup.name }
798
+ { key: p.textarea.type, value: p.textarea.name },
799
+ { key: p.lookup.type, value: p.lookup.name }
774
800
  ],
775
801
  Decimal: [
776
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
802
+ { key: p["number-spinner"].type, value: p["number-spinner"].name }
777
803
  ],
778
804
  Integer: [
779
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
805
+ { key: p["number-spinner"].type, value: p["number-spinner"].name }
780
806
  ],
781
807
  Number: [
782
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
808
+ { key: p["number-spinner"].type, value: p["number-spinner"].name }
783
809
  ],
784
810
  BigNumber: [
785
- { key: l["number-spinner"].type, value: l["number-spinner"].name }
811
+ { key: p["number-spinner"].type, value: p["number-spinner"].name }
786
812
  ],
787
813
  Date: [
788
- { key: l["date-picker"].type, value: l["date-picker"].name }
814
+ { key: p["date-picker"].type, value: p["date-picker"].name }
789
815
  ],
790
816
  DateTime: [
791
- { key: l["date-picker"].type, value: l["date-picker"].name }
817
+ { key: p["date-picker"].type, value: p["date-picker"].name }
792
818
  ],
793
819
  Boolean: [
794
- { key: l.switch.type, value: l.switch.name },
795
- { key: l["check-box"].type, value: l["check-box"].name }
820
+ { key: p.switch.type, value: p.switch.name },
821
+ { key: p["check-box"].type, value: p["check-box"].name }
796
822
  ],
797
823
  Enum: [
798
- { key: l["combo-list"].type, value: l["combo-list"].name },
799
- { key: l["radio-group"].type, value: l["radio-group"].name }
824
+ { key: p["combo-list"].type, value: p["combo-list"].name },
825
+ { key: p["radio-group"].type, value: p["radio-group"].name }
800
826
  ],
801
827
  Object: [
802
- { key: l.lookup.type, value: l.lookup.name },
803
- { key: l["combo-list"].type, value: l["combo-list"].name },
804
- { key: l["radio-group"].type, value: l["radio-group"].name }
805
- ],
806
- EmployeeSelector: [
807
- { key: l.EmployeeSelector.type, value: l.EmployeeSelector.name }
808
- ],
809
- AdminOrganizationSelector: [
810
- { key: l.AdminOrganizationSelector.type, value: l.AdminOrganizationSelector.name }
828
+ { key: p.lookup.type, value: p.lookup.name },
829
+ { key: p["combo-list"].type, value: p["combo-list"].name },
830
+ { key: p["radio-group"].type, value: p["radio-group"].name }
811
831
  ]
812
832
  });
813
- class Ae {
833
+ let j = F;
834
+ const Oe = h(0);
835
+ class oe extends je {
814
836
  constructor(e, t) {
815
- F(this, "componentId");
816
- F(this, "viewModelId");
817
- F(this, "eventsEditorUtils");
818
- F(this, "formSchemaUtils");
819
- F(this, "formMetadataConverter");
820
- F(this, "designViewModelUtils");
821
- F(this, "designViewModelField");
822
- F(this, "controlCreatorUtils");
823
- F(this, "designerHostService");
824
- F(this, "schemaService", null);
825
- F(this, "metadataService", null);
826
- F(this, "propertyConfig", {
827
- type: "object",
828
- categories: {}
829
- });
830
- var o;
831
- this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
832
- }
833
- getTableInfo() {
834
- var e;
835
- return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
836
- }
837
- setDesignViewModelField(e) {
838
- const t = e.binding && e.binding.type === "Form" && e.binding.field;
839
- if (t) {
840
- if (!this.designViewModelField) {
841
- const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
842
- this.designViewModelField = o.fields.find((i) => i.id === t);
843
- }
844
- e.updateOn = this.designViewModelField.updateOn;
845
- }
837
+ super(e, t);
846
838
  }
847
- changeFieldEditorType(e, t) {
839
+ getPropertyConfig(e, t) {
840
+ 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;
848
841
  }
849
- getBasicPropConfig(e) {
850
- var o, i;
851
- var t = this;
852
- return this.setDesignViewModelField(e), {
842
+ getBasicProperties(e, t) {
843
+ var m;
844
+ var o = this;
845
+ this.setDesignViewModelField(e);
846
+ const r = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
847
+ return {
853
848
  description: "Basic Information",
854
849
  title: "基本信息",
855
850
  properties: {
@@ -860,8 +855,8 @@ class Ae {
860
855
  readonly: !0
861
856
  },
862
857
  type: {
863
- description: "组件类型",
864
- title: "控件类型",
858
+ description: "编辑器类型",
859
+ title: "编辑器类型",
865
860
  type: "string",
866
861
  refreshPanelAfterChanged: !0,
867
862
  $converter: "/converter/change-editor.converter",
@@ -869,63 +864,52 @@ class Ae {
869
864
  type: "combo-list",
870
865
  textField: "value",
871
866
  valueField: "key",
872
- data: ee.getEditorTypesByMDataType(((i = (o = t.designViewModelField) == null ? void 0 : o.type) == null ? void 0 : i.name) || ""),
873
- editable: !1
867
+ editable: !1,
868
+ data: o.designViewModelField ? j.getEditorTypesByMDataType((m = o.designViewModelField.type) == null ? void 0 : m.name) : j.getAllInputTypes()
874
869
  }
875
870
  },
876
871
  label: {
877
872
  title: "标签",
878
873
  type: "string",
879
874
  $converter: "/converter/form-group-label.converter"
875
+ },
876
+ binding: {
877
+ description: "绑定的表单字段",
878
+ title: "绑定",
879
+ $converter: "/converter/field-selector.converter",
880
+ editor: {
881
+ type: "field-selector",
882
+ bindingType: { enable: !1 },
883
+ editorParams: {
884
+ propertyData: e,
885
+ formBasicInfo: r
886
+ },
887
+ columns: [
888
+ { field: "name", title: "字段名称" },
889
+ { field: "bindingField", title: "绑定字段" },
890
+ { field: "fieldType", title: "字段类型" }
891
+ ],
892
+ textField: "bindingField",
893
+ data: s
894
+ }
880
895
  }
881
896
  },
882
- setPropertyRelates(c, m) {
897
+ setPropertyRelates(c, f) {
883
898
  if (c)
884
899
  switch (c && c.propertyID) {
885
900
  case "type": {
886
- t.changeControlType(e, c);
901
+ o.changeControlType(e, c, t);
902
+ break;
903
+ }
904
+ case "label": {
905
+ c.needRefreshControlTree = !0;
887
906
  break;
888
907
  }
889
908
  }
890
909
  }
891
910
  };
892
911
  }
893
- /**
894
- * 卡片控件:切换控件类型后事件
895
- * @param propertyData 控件DOM属性
896
- * @param newControlType 新控件类型
897
- */
898
- changeControlType(e, t) {
899
- var r, u, a, p, s;
900
- const o = t.propertyValue, i = this.formSchemaUtils.getComponentById(this.componentId);
901
- let c = this.getControlParentContainer(e.id, i);
902
- if (!c)
903
- return;
904
- const m = c.contents.findIndex((y) => y.id === e.id), d = c.contents[m];
905
- let f;
906
- this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
907
- editor: {
908
- $type: o
909
- },
910
- name: this.designViewModelField.name,
911
- require: this.designViewModelField.require,
912
- readonly: this.designViewModelField.readonly
913
- }, !1), f = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(f, {
914
- id: d.id,
915
- appearance: d.appearance,
916
- size: d.size,
917
- label: d.label
918
- }), Object.assign(f.editor, {
919
- isTextArea: f.isTextArea && d.isTextArea,
920
- type: o || "",
921
- placeHolder: (r = d.editor) == null ? void 0 : r.placeHolder,
922
- holdPlace: (u = d.editor) == null ? void 0 : u.holdPlace,
923
- readonly: (a = d.editor) == null ? void 0 : a.readonly,
924
- require: (p = d.editor) == null ? void 0 : p.require,
925
- visible: (s = d.editor) == null ? void 0 : s.visible
926
- }), c.contents.splice(m, 1, f);
927
- }
928
- getAppearanceConfig(e = null) {
912
+ getAppearanceProperties(e) {
929
913
  return {
930
914
  title: "样式",
931
915
  description: "Appearance",
@@ -955,73 +939,52 @@ class Ae {
955
939
  }
956
940
  };
957
941
  }
958
- /**
959
- * 获取控件:以contents为节点进行定位
960
- * @param controlId 控件ID
961
- * @param domJson 容器
962
- */
963
- getControlParentContainer(e, t) {
964
- let o;
965
- if (!t || !t.contents || t.contents.length === 0)
966
- return null;
967
- for (const i of t.contents) {
968
- if (i.id === e)
969
- return o = t, t;
970
- if (o = this.getControlParentContainer(e, i), o)
971
- return o;
972
- }
973
- }
974
- }
975
- class te extends Ae {
976
- constructor(e, t) {
977
- super(e, t);
978
- }
979
- getBasicProperties(e) {
980
- let t = this.getBasicPropConfig(e);
981
- return t.properties.binding = this.getFieldSelectorOptions(e), t;
982
- }
983
- getAppearanceProperties(e) {
984
- return this.getAppearanceConfig(e);
985
- }
986
942
  getEditorProperties(e) {
987
943
  return this.getComponentConfig(e);
988
944
  }
989
- getPropertyConfig(e) {
990
- return this.propertyConfig.categories.basic = this.getBasicProperties(e), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
991
- }
992
- getFieldSelectorOptions(e) {
993
- const t = this.formSchemaUtils.getFormMetadataBasicInfo(), o = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
994
- return {
995
- description: "绑定的表单字段",
996
- title: "绑定",
997
- $converter: "/converter/field-selector.converter",
945
+ /**
946
+ * 卡片控件:切换控件类型后事件
947
+ * @param propertyData 控件DOM属性
948
+ * @param newControlType 新控件类型
949
+ */
950
+ changeControlType(e, t, o) {
951
+ var a, d, i, u;
952
+ const r = t.propertyValue, s = o && o.parent && o.parent.schema;
953
+ if (!s)
954
+ return;
955
+ const m = s.contents.findIndex((l) => l.id === e.id), c = s.contents[m];
956
+ let f;
957
+ this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
998
958
  editor: {
999
- type: "field-selector",
1000
- bindingType: { enable: !1 },
1001
- editorParams: {
1002
- propertyData: e,
1003
- formBasicInfo: t
1004
- },
1005
- columns: [
1006
- { field: "name", title: "字段名称" },
1007
- { field: "bindingField", title: "绑定字段" },
1008
- { field: "fieldType", title: "字段类型" }
1009
- ],
1010
- textField: "bindingField",
1011
- data: o
1012
- }
1013
- };
1014
- }
1015
- getBindingOtions(e) {
1016
- return this.getFieldSelectorOptions(e);
959
+ $type: r
960
+ },
961
+ name: this.designViewModelField.name,
962
+ require: this.designViewModelField.require,
963
+ readonly: this.designViewModelField.readonly
964
+ }, !1), f = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), f || (f = X("form-group") || {}, f.editor = X(r) || {}, delete f.editor.id, delete f.editor.binding, delete f.editor.appearance), Object.assign(f, {
965
+ id: c.id,
966
+ appearance: c.appearance,
967
+ size: c.size,
968
+ label: c.label,
969
+ binding: c.binding,
970
+ visible: c.visible
971
+ }), Object.assign(f.editor, {
972
+ isTextArea: f.isTextArea && c.isTextArea,
973
+ placeholder: (a = c.editor) == null ? void 0 : a.placeholder,
974
+ holdPlace: (d = c.editor) == null ? void 0 : d.holdPlace,
975
+ readonly: (i = c.editor) == null ? void 0 : i.readonly,
976
+ require: (u = c.editor) == null ? void 0 : u.require
977
+ }), s.contents.splice(m, 1), s.contents.splice(m, 0, f), o.schema = Object.assign(c, f), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
978
+ (l) => l.classList.remove("dgComponentSelected")
979
+ ), Oe.value++;
1017
980
  }
1018
981
  getComponentConfig(e, t = {}, o = {}) {
1019
- const i = Object.assign({
1020
- description: "组件信息",
1021
- title: "组件信息",
982
+ const r = Object.assign({
983
+ description: "编辑器",
984
+ title: "编辑器",
1022
985
  type: "input-group",
1023
986
  $converter: "/converter/property-editor.converter"
1024
- }, t), c = Object.assign({
987
+ }, t), s = Object.assign({
1025
988
  readonly: {
1026
989
  description: "",
1027
990
  title: "只读",
@@ -1043,10 +1006,10 @@ class te extends Ae {
1043
1006
  type: "string"
1044
1007
  }
1045
1008
  }, o);
1046
- return { ...i, properties: { ...c } };
1009
+ return { ...r, properties: { ...s } };
1047
1010
  }
1048
1011
  }
1049
- class Oe extends te {
1012
+ class Ge extends oe {
1050
1013
  constructor(e, t) {
1051
1014
  super(e, t);
1052
1015
  }
@@ -1073,7 +1036,7 @@ class Oe extends te {
1073
1036
  });
1074
1037
  }
1075
1038
  }
1076
- class Ne extends te {
1039
+ class Ue extends oe {
1077
1040
  constructor(e, t) {
1078
1041
  super(e, t);
1079
1042
  }
@@ -1095,141 +1058,141 @@ class Ne extends te {
1095
1058
  });
1096
1059
  }
1097
1060
  }
1098
- function Le(n, e) {
1061
+ function qe(n, e) {
1099
1062
  const {
1100
1063
  canAccepts: t,
1101
1064
  checkCanDeleteComponent: o,
1102
- checkCanMoveComponent: i,
1103
- hideNestedPaddingInDesginerView: c,
1065
+ checkCanMoveComponent: r,
1066
+ hideNestedPaddingInDesginerView: s,
1104
1067
  onAcceptMovedChildElement: m,
1105
- resolveComponentContext: d,
1068
+ resolveComponentContext: c,
1106
1069
  triggerBelongedComponentToMoveWhenMoved: f,
1107
- triggerBelongedComponentToDeleteWhenDeleted: r
1108
- } = K(n), u = n.schema;
1109
- function a(p) {
1110
- return new Oe(p, e).getPropertyConfig(u);
1070
+ triggerBelongedComponentToDeleteWhenDeleted: a
1071
+ } = ne(n), d = n.schema;
1072
+ function i(u, l) {
1073
+ return new Ge(u, e).getPropertyConfig(d, l);
1111
1074
  }
1112
1075
  return {
1113
1076
  canAccepts: t,
1114
1077
  checkCanDeleteComponent: o,
1115
- checkCanMoveComponent: i,
1116
- hideNestedPaddingInDesginerView: c,
1078
+ checkCanMoveComponent: r,
1079
+ hideNestedPaddingInDesginerView: s,
1117
1080
  onAcceptMovedChildElement: m,
1118
- resolveComponentContext: d,
1081
+ resolveComponentContext: c,
1119
1082
  triggerBelongedComponentToMoveWhenMoved: f,
1120
- triggerBelongedComponentToDeleteWhenDeleted: r,
1121
- getPropsConfig: a
1083
+ triggerBelongedComponentToDeleteWhenDeleted: a,
1084
+ getPropsConfig: i
1122
1085
  };
1123
1086
  }
1124
- function $e(n, e) {
1087
+ function ze(n, e) {
1125
1088
  const {
1126
1089
  canAccepts: t,
1127
1090
  checkCanDeleteComponent: o,
1128
- checkCanMoveComponent: i,
1129
- hideNestedPaddingInDesginerView: c,
1091
+ checkCanMoveComponent: r,
1092
+ hideNestedPaddingInDesginerView: s,
1130
1093
  onAcceptMovedChildElement: m,
1131
- resolveComponentContext: d,
1094
+ resolveComponentContext: c,
1132
1095
  triggerBelongedComponentToMoveWhenMoved: f,
1133
- triggerBelongedComponentToDeleteWhenDeleted: r
1134
- } = K(n), u = n.schema;
1135
- function a(p) {
1136
- return new Ne(p, e).getPropertyConfig(u);
1096
+ triggerBelongedComponentToDeleteWhenDeleted: a
1097
+ } = ne(n), d = n.schema;
1098
+ function i(u, l) {
1099
+ return new Ue(u, e).getPropertyConfig(d, l);
1137
1100
  }
1138
1101
  return {
1139
1102
  canAccepts: t,
1140
1103
  checkCanDeleteComponent: o,
1141
- checkCanMoveComponent: i,
1142
- hideNestedPaddingInDesginerView: c,
1104
+ checkCanMoveComponent: r,
1105
+ hideNestedPaddingInDesginerView: s,
1143
1106
  onAcceptMovedChildElement: m,
1144
- resolveComponentContext: d,
1107
+ resolveComponentContext: c,
1145
1108
  triggerBelongedComponentToMoveWhenMoved: f,
1146
- triggerBelongedComponentToDeleteWhenDeleted: r,
1147
- getPropsConfig: a
1109
+ triggerBelongedComponentToDeleteWhenDeleted: a,
1110
+ getPropsConfig: i
1148
1111
  };
1149
1112
  }
1150
- const ze = /* @__PURE__ */ O({
1113
+ const We = /* @__PURE__ */ O({
1151
1114
  name: "FCheckboxGroupDesign",
1152
- props: j,
1115
+ props: _,
1153
1116
  emits: ["changeValue", "update:modelValue"],
1154
1117
  setup(n, e) {
1155
- const t = g(n.modelValue), o = g(n.horizontal), i = g(n.tabIndex), c = g(n.name), m = N(() => ({
1118
+ const t = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), s = h(n.name), m = G(() => ({
1156
1119
  "farris-checkradio-hor": o.value
1157
1120
  })), {
1158
- enumData: d,
1121
+ enumData: c,
1159
1122
  onClickCheckbox: f,
1160
- getValue: r,
1161
- getText: u,
1162
- checked: a
1163
- } = Z(n, e, t), p = g(), s = x("designer-host-service"), y = x("design-item-context"), k = Le(y, s), C = J(p, y, k);
1123
+ getValue: a,
1124
+ getText: d,
1125
+ checked: i
1126
+ } = ee(n, e, t), u = h(), l = A("designer-host-service"), y = A("design-item-context"), C = qe(y, l), k = te(u, y, C);
1164
1127
  return z(() => {
1165
- p.value.componentInstance = C;
1166
- }), e.expose(C.value), E(() => n.modelValue, (b) => {
1167
- t.value = b, e.emit("changeValue", t.value);
1168
- }), () => v("div", {
1169
- ref: p,
1128
+ u.value.componentInstance = k;
1129
+ }), e.expose(k.value), $(() => n.modelValue, (v) => {
1130
+ t.value = v, e.emit("changeValue", t.value);
1131
+ }), () => b("div", {
1132
+ ref: u,
1170
1133
  class: ["farris-input-wrap", m.value]
1171
- }, [d.value.map((b, M) => {
1172
- const B = "checkbox_" + c.value + M;
1173
- return v("div", {
1134
+ }, [c.value.map((v, B) => {
1135
+ const P = "checkbox_" + s.value + B;
1136
+ return b("div", {
1174
1137
  class: "custom-control custom-checkbox"
1175
- }, [v("input", {
1138
+ }, [b("input", {
1176
1139
  type: "checkbox",
1177
1140
  class: "custom-control-input",
1178
- name: c.value,
1179
- id: B,
1180
- value: r(b),
1181
- checked: a(b),
1141
+ name: s.value,
1142
+ id: P,
1143
+ value: a(v),
1144
+ checked: i(v),
1182
1145
  disabled: n.disabled,
1183
- tabindex: i.value,
1184
- onClick: (P) => f(b, P)
1185
- }, null), v("label", {
1146
+ tabindex: r.value,
1147
+ onClick: (S) => f(v, S)
1148
+ }, null), b("label", {
1186
1149
  class: "custom-control-label",
1187
- for: B,
1188
- title: u(b)
1189
- }, [u(b)])]);
1150
+ for: P,
1151
+ title: d(v)
1152
+ }, [d(v)])]);
1190
1153
  })]);
1191
1154
  }
1192
- }), Ue = /* @__PURE__ */ O({
1155
+ }), Le = /* @__PURE__ */ O({
1193
1156
  name: "FCheckBoxDesign",
1194
- props: G,
1157
+ props: L,
1195
1158
  emits: [],
1196
1159
  setup(n, e) {
1197
- const t = g(), o = g(n.id), i = g(n.indeterminate), c = x("designer-host-service"), m = x("design-item-context"), d = $e(m, c), f = J(t, m, d);
1160
+ const t = h(), o = h(n.id), r = h(n.indeterminate), s = A("designer-host-service"), m = A("design-item-context"), c = ze(m, s), f = te(t, m, c);
1198
1161
  return z(() => {
1199
1162
  t.value.componentInstance = f;
1200
- }), E(() => n.indeterminate, (r) => {
1201
- i.value = r;
1202
- }), e.expose(f.value), () => v("div", {
1163
+ }), $(() => n.indeterminate, (a) => {
1164
+ r.value = a;
1165
+ }), e.expose(f.value), () => b("div", {
1203
1166
  ref: t,
1204
1167
  dragref: `${m.schema.id}-container`,
1205
1168
  class: "drag-container custom-control custom-checkbox"
1206
- }, [v("input", {
1169
+ }, [b("input", {
1207
1170
  type: "checkbox",
1208
1171
  class: "custom-control-input",
1209
1172
  id: o,
1210
1173
  value: n.value,
1211
1174
  checked: n.modelValue,
1212
1175
  disabled: n.disabled
1213
- }, null), v("div", {
1176
+ }, null), b("div", {
1214
1177
  class: "custom-control-label"
1215
1178
  }, null)]);
1216
1179
  }
1217
1180
  });
1218
- D.install = (n) => {
1219
- n.component(D.name, D), n.component($.name, $);
1181
+ x.install = (n) => {
1182
+ n.component(x.name, x), n.component(q.name, q);
1220
1183
  };
1221
- D.register = (n, e, t, o) => {
1222
- n["check-box"] = $, e["check-box"] = R, n["check-group"] = D, e["check-group"] = Y;
1184
+ x.register = (n, e, t, o) => {
1185
+ n["check-box"] = q, e["check-box"] = R, n["check-group"] = x, e["check-group"] = K;
1223
1186
  };
1224
- D.registerDesigner = (n, e, t) => {
1225
- n["check-box"] = Ue, e["check-box"] = R, n["check-group"] = ze, e["check-group"] = Y;
1187
+ x.registerDesigner = (n, e, t) => {
1188
+ n["check-box"] = Le, e["check-box"] = R, n["check-group"] = We, e["check-group"] = K;
1226
1189
  };
1227
1190
  export {
1228
- $ as FCheckBox,
1229
- D as FCheckBoxGroup,
1230
- Y as checkBoxGroupPropsResolver,
1231
- G as checkBoxProps,
1191
+ q as FCheckBox,
1192
+ x as FCheckBoxGroup,
1193
+ K as checkBoxGroupPropsResolver,
1194
+ L as checkBoxProps,
1232
1195
  R as checkBoxPropsResolver,
1233
- j as checkboxGroupProps,
1234
- D as default
1196
+ _ as checkboxGroupProps,
1197
+ x as default
1235
1198
  };