@farris/ui-vue 1.2.8 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/components/accordion/index.esm.js +180 -180
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +419 -331
  4. package/components/avatar/index.umd.cjs +1 -0
  5. package/components/border-editor/index.umd.cjs +1 -0
  6. package/components/button/index.umd.cjs +1 -0
  7. package/components/button-edit/index.css +1 -1
  8. package/components/button-edit/index.esm.js +346 -326
  9. package/components/button-edit/index.umd.cjs +1 -0
  10. package/components/button-group/index.umd.cjs +1 -0
  11. package/components/calculator/index.umd.cjs +1 -0
  12. package/components/calendar/index.esm.js +384 -384
  13. package/components/calendar/index.umd.cjs +1 -0
  14. package/components/capsule/index.esm.js +205 -205
  15. package/components/capsule/index.umd.cjs +1 -0
  16. package/components/checkbox/index.esm.js +555 -467
  17. package/components/checkbox/index.umd.cjs +1 -0
  18. package/components/color-picker/index.esm.js +239 -239
  19. package/components/color-picker/index.umd.cjs +3 -0
  20. package/components/combo-list/index.css +1 -0
  21. package/components/combo-list/index.esm.js +1072 -364
  22. package/components/combo-list/index.umd.cjs +1 -0
  23. package/components/combo-tree/index.esm.js +129 -129
  24. package/components/combo-tree/index.umd.cjs +1 -0
  25. package/components/common/index.esm.js +778 -700
  26. package/components/common/index.umd.cjs +1 -0
  27. package/components/component/index.esm.js +582 -327
  28. package/components/component/index.umd.cjs +1 -0
  29. package/components/condition/index.css +1 -0
  30. package/components/condition/index.esm.js +2433 -1134
  31. package/components/condition/index.umd.cjs +1 -0
  32. package/components/content-container/index.esm.js +307 -234
  33. package/components/content-container/index.umd.cjs +1 -0
  34. package/components/data-grid/index.css +1 -1
  35. package/components/data-grid/index.esm.js +6762 -4946
  36. package/components/data-grid/index.umd.cjs +1 -0
  37. package/components/data-view/index.css +1 -0
  38. package/components/data-view/index.esm.js +4977 -3489
  39. package/components/data-view/index.umd.cjs +1 -0
  40. package/components/date-picker/index.css +1 -1
  41. package/components/date-picker/index.esm.js +3525 -2811
  42. package/components/date-picker/index.umd.cjs +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +938 -928
  45. package/components/designer-canvas/index.umd.cjs +1 -0
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +38 -37
  48. package/components/designer-outline/index.umd.cjs +1 -0
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -0
  51. package/components/discussion-editor/index.umd.cjs +3 -0
  52. package/components/discussion-list/index.umd.cjs +1 -0
  53. package/components/drawer/index.umd.cjs +1 -0
  54. package/components/dropdown/index.esm.js +282 -282
  55. package/components/dropdown/index.umd.cjs +2 -0
  56. package/components/dynamic-form/index.css +1 -0
  57. package/components/dynamic-form/index.esm.js +2684 -1039
  58. package/components/dynamic-form/index.umd.cjs +1 -0
  59. package/components/dynamic-resolver/index.esm.js +149 -101
  60. package/components/dynamic-resolver/index.umd.cjs +1 -0
  61. package/components/dynamic-view/index.esm.js +303 -290
  62. package/components/dynamic-view/index.umd.cjs +1 -0
  63. package/components/enum-editor/index.umd.cjs +1 -0
  64. package/components/events-editor/index.esm.js +573 -518
  65. package/components/events-editor/index.umd.cjs +1 -0
  66. package/components/expression-editor/index.esm.js +99 -99
  67. package/components/expression-editor/index.umd.cjs +1 -0
  68. package/components/external-container/index.css +1 -1
  69. package/components/external-container/index.esm.js +3607 -2799
  70. package/components/external-container/index.umd.cjs +1 -0
  71. package/components/field-selector/index.css +1 -1
  72. package/components/field-selector/index.esm.js +5438 -8236
  73. package/components/field-selector/index.umd.cjs +1 -0
  74. package/components/filter-bar/index.css +1 -1
  75. package/components/filter-bar/index.esm.js +1679 -1759
  76. package/components/filter-bar/index.umd.cjs +1 -0
  77. package/components/flow-canvas/index.css +1 -1
  78. package/components/flow-canvas/index.esm.js +1062 -1052
  79. package/components/flow-canvas/index.umd.cjs +1 -0
  80. package/components/image-cropper/index.esm.js +421 -421
  81. package/components/image-cropper/index.umd.cjs +1 -0
  82. package/components/input-group/index.esm.js +677 -593
  83. package/components/input-group/index.umd.cjs +1 -0
  84. package/components/layout/index.esm.js +326 -326
  85. package/components/layout/index.umd.cjs +1 -0
  86. package/components/list-nav/index.esm.js +272 -199
  87. package/components/list-nav/index.umd.cjs +1 -0
  88. package/components/list-view/index.css +1 -1
  89. package/components/list-view/index.esm.js +3739 -2273
  90. package/components/list-view/index.umd.cjs +1 -0
  91. package/components/loading/index.umd.cjs +8 -0
  92. package/components/locale/index.umd.cjs +1 -0
  93. package/components/lookup/index.css +1 -1
  94. package/components/lookup/index.esm.js +11255 -9004
  95. package/components/lookup/index.umd.cjs +1 -0
  96. package/components/mapping-editor/index.css +1 -1
  97. package/components/mapping-editor/index.esm.js +6046 -5314
  98. package/components/mapping-editor/index.umd.cjs +1 -0
  99. package/components/message-box/index.css +1 -1
  100. package/components/message-box/index.esm.js +511 -471
  101. package/components/message-box/index.umd.cjs +1 -0
  102. package/components/modal/index.css +1 -1
  103. package/components/modal/index.esm.js +438 -398
  104. package/components/modal/index.umd.cjs +1 -0
  105. package/components/nav/index.esm.js +588 -444
  106. package/components/nav/index.umd.cjs +3 -0
  107. package/components/notify/index.esm.js +59 -53
  108. package/components/notify/index.umd.cjs +1 -0
  109. package/components/number-range/index.esm.js +568 -485
  110. package/components/number-range/index.umd.cjs +1 -0
  111. package/components/number-spinner/index.esm.js +542 -454
  112. package/components/number-spinner/index.umd.cjs +1 -0
  113. package/components/order/index.css +1 -1
  114. package/components/order/index.esm.js +1967 -1105
  115. package/components/order/index.umd.cjs +1 -0
  116. package/components/page-footer/index.esm.js +160 -160
  117. package/components/page-footer/index.umd.cjs +1 -0
  118. package/components/page-header/index.esm.js +1282 -1151
  119. package/components/page-header/index.umd.cjs +1 -0
  120. package/components/pagination/index.esm.js +705 -555
  121. package/components/pagination/index.umd.cjs +1 -0
  122. package/components/popover/index.esm.js +71 -70
  123. package/components/popover/index.umd.cjs +1 -0
  124. package/components/progress/index.esm.js +270 -270
  125. package/components/progress/index.umd.cjs +3 -0
  126. package/components/property-editor/index.css +1 -1
  127. package/components/property-editor/index.esm.js +2231 -1517
  128. package/components/property-editor/index.umd.cjs +3 -0
  129. package/components/property-panel/index.esm.js +813 -909
  130. package/components/property-panel/index.umd.cjs +1 -0
  131. package/components/query-solution/index.css +1 -1
  132. package/components/query-solution/index.esm.js +3781 -2566
  133. package/components/query-solution/index.umd.cjs +1 -0
  134. package/components/radio-button/index.esm.js +101 -101
  135. package/components/radio-button/index.umd.cjs +1 -0
  136. package/components/radio-group/index.esm.js +538 -450
  137. package/components/radio-group/index.umd.cjs +1 -0
  138. package/components/rate/index.esm.js +238 -233
  139. package/components/rate/index.umd.cjs +1 -0
  140. package/components/response-layout/index.esm.js +155 -155
  141. package/components/response-layout/index.umd.cjs +1 -0
  142. package/components/response-layout-editor/index.css +1 -1
  143. package/components/response-layout-editor/index.esm.js +1243 -1180
  144. package/components/response-layout-editor/index.umd.cjs +1 -0
  145. package/components/response-toolbar/index.esm.js +988 -877
  146. package/components/response-toolbar/index.umd.cjs +1 -0
  147. package/components/schema-selector/index.css +1 -1
  148. package/components/schema-selector/index.esm.js +5413 -4867
  149. package/components/schema-selector/index.umd.cjs +8 -0
  150. package/components/search-box/index.esm.js +199 -199
  151. package/components/search-box/index.umd.cjs +1 -0
  152. package/components/section/index.esm.js +646 -503
  153. package/components/section/index.umd.cjs +1 -0
  154. package/components/smoke-detector/index.esm.js +144 -144
  155. package/components/smoke-detector/index.umd.cjs +1 -0
  156. package/components/spacing-editor/index.umd.cjs +1 -0
  157. package/components/splitter/index.esm.js +464 -391
  158. package/components/splitter/index.umd.cjs +1 -0
  159. package/components/step/index.esm.js +249 -249
  160. package/components/step/index.umd.cjs +1 -0
  161. package/components/switch/index.esm.js +483 -394
  162. package/components/switch/index.umd.cjs +1 -0
  163. package/components/tabs/index.css +1 -1
  164. package/components/tabs/index.esm.js +2366 -2208
  165. package/components/tabs/index.umd.cjs +1 -0
  166. package/components/tags/index.esm.js +397 -399
  167. package/components/tags/index.umd.cjs +1 -0
  168. package/components/text/index.esm.js +394 -394
  169. package/components/text/index.umd.cjs +1 -0
  170. package/components/textarea/index.esm.js +451 -367
  171. package/components/textarea/index.umd.cjs +1 -0
  172. package/components/time-picker/index.css +1 -1
  173. package/components/time-picker/index.esm.js +1252 -1144
  174. package/components/time-picker/index.umd.cjs +1 -0
  175. package/components/tooltip/index.umd.cjs +1 -0
  176. package/components/transfer/index.css +1 -1
  177. package/components/transfer/index.esm.js +510 -499
  178. package/components/transfer/index.umd.cjs +1 -0
  179. package/components/tree-grid/index.css +1 -1
  180. package/components/tree-grid/index.esm.js +5463 -9330
  181. package/components/tree-grid/index.umd.cjs +1 -0
  182. package/components/tree-view/index.css +1 -0
  183. package/components/tree-view/index.esm.js +4058 -2597
  184. package/components/tree-view/index.umd.cjs +1 -0
  185. package/components/uploader/index.esm.js +510 -504
  186. package/components/uploader/index.umd.cjs +2 -0
  187. package/components/verify-detail/index.esm.js +220 -220
  188. package/components/verify-detail/index.umd.cjs +1 -0
  189. package/components/video/index.esm.js +653 -394
  190. package/components/video/index.umd.cjs +1 -0
  191. package/components/weather/index.esm.js +1028 -1028
  192. package/components/weather/index.umd.cjs +16 -0
  193. package/farris.all.esm.js +20407 -18556
  194. package/farris.all.umd.cjs +8 -8
  195. package/index.css +1 -1
  196. package/package.json +1 -1
  197. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  198. package/types/capsule/src/capsule.props.d.ts +2 -2
  199. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  200. package/types/common/entity/entity-schema.d.ts +258 -0
  201. package/types/common/index.d.ts +1 -0
  202. package/types/common/types.d.ts +1 -1
  203. package/types/common/utils/encrypt.d.ts +2 -0
  204. package/types/component/src/component-ref.props.d.ts +4 -0
  205. package/types/component/src/component.props.d.ts +7 -0
  206. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  207. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  208. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  209. package/types/components.d.ts +1 -0
  210. package/types/data-grid/index.d.ts +8 -2
  211. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  212. package/types/data-grid/src/data-grid.component.d.ts +3 -1
  213. package/types/data-grid/src/data-grid.props.d.ts +3 -2
  214. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  215. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  216. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  217. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  218. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  219. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  220. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  221. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  222. package/types/data-view/composition/types.d.ts +36 -7
  223. package/types/data-view/composition/use-edit.d.ts +2 -1
  224. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  225. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  226. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  227. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  228. package/types/designer-canvas/src/types.d.ts +2 -2
  229. package/types/dynamic-form/index.d.ts +2 -1
  230. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  231. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  232. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  233. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  234. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  235. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  236. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  237. package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
  238. package/types/dynamic-form/src/types.d.ts +12 -1
  239. package/types/dynamic-resolver/index.d.ts +1 -0
  240. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  241. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  242. package/types/dynamic-resolver/src/types.d.ts +12 -2
  243. package/types/dynamic-view/index.d.ts +1 -0
  244. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  245. package/types/index.d.ts +2 -0
  246. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  247. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  248. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  249. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  250. package/types/lookup/src/composition/types.d.ts +8 -0
  251. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  252. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  253. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  254. package/types/lookup/src/composition/use-http.d.ts +9 -5
  255. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  256. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  257. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  258. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  259. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  260. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  261. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  262. package/types/modal/src/modal.component.d.ts +3 -0
  263. package/types/modal/src/modal.props.d.ts +4 -0
  264. package/types/page-header/src/page-header.props.d.ts +1 -0
  265. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  266. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  267. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  268. package/types/response-layout-editor/src/type.d.ts +21 -0
  269. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  270. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  271. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  272. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  273. package/types/tabs/src/composition/types.d.ts +2 -2
  274. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  275. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  276. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  277. package/types/tabs/src/tabs.props.d.ts +1 -0
  278. package/types/tags/index.d.ts +36 -5
  279. package/types/tree-grid/index.d.ts +8 -2
  280. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  281. package/types/modal/src/composition/use-esc.d.ts +0 -1
  282. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  283. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,95 +1,96 @@
1
- var H = Object.defineProperty;
2
- var q = (e, t, n) => t in e ? H(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var v = (e, t, n) => q(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as O, ref as g, watch as w, computed as B, createVNode as M, inject as E, onMounted as G } from "vue";
5
- import { cloneDeep as W } from "lodash-es";
6
- import z from "../list-view/index.esm.js";
7
- import A from "../button-edit/index.esm.js";
8
- import { getSchemaByType as j } from "../dynamic-resolver/index.esm.js";
9
- import { useDesignerComponent as J } from "../designer-canvas/index.esm.js";
10
- const Q = {}, X = {};
11
- function L(e) {
12
- const { properties: t, title: n } = e, i = Object.keys(t).reduce((l, u) => (l[u] = t[u].type === "object" && t[u].properties ? L(t[u]) : W(t[u].default), l), {});
13
- return i.id = `${n}-${Date.now()}`, i;
1
+ var Q = Object.defineProperty;
2
+ var Y = (e, t, n) => t in e ? Q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var S = (e, t, n) => Y(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { defineComponent as O, ref as g, computed as F, watch as M, createVNode as k, Teleport as Z, createApp as _, onUnmounted as K, inject as E, nextTick as A, onMounted as D, mergeProps as ee } from "vue";
5
+ import { isPlainObject as j, cloneDeep as $ } from "lodash-es";
6
+ import te from "../list-view/index.esm.js";
7
+ import ne from "../button-edit/index.esm.js";
8
+ import { resolveAppearance as oe, getSchemaByType as R } from "../dynamic-resolver/index.esm.js";
9
+ import { useDesignerComponent as U } from "../designer-canvas/index.esm.js";
10
+ import { useResponseLayoutEditorSetting as ie } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
11
+ const ae = {}, le = {};
12
+ function N(e) {
13
+ const { properties: t, title: n, ignore: o } = e, i = o && Array.isArray(o), l = Object.keys(t).reduce((u, d) => ((!i || !o.find((c) => c == d)) && (u[d] = t[d].type === "object" && t[d].properties ? N(t[d]) : $(t[d].default)), u), {});
14
+ return (!i || !o.find((u) => u == "id")) && (l.id = `${n}-${Date.now()}`), l;
14
15
  }
15
- function Y(e, t) {
16
- const n = L(t);
17
- return Object.keys(e).reduce((i, l) => (i[l] && typeof i[l] == "object" ? Object.assign(i[l], e[l]) : i[l] = e[l], i), n), n;
16
+ function re(e, t) {
17
+ const n = N(t);
18
+ return Object.keys(e).reduce((o, i) => (o[i] && j(o[i]) && j(e[i]) ? Object.assign(o[i], e[i]) : o[i] = e[i], o), n), n;
18
19
  }
19
- function Z(e, t) {
20
- return Object.keys(e).filter((i) => e[i] != null).reduce((i, l) => {
21
- if (t.has(l)) {
22
- const u = t.get(l);
23
- if (typeof u == "string")
24
- i[u] = e[l];
20
+ function se(e, t) {
21
+ return Object.keys(e).filter((o) => e[o] != null).reduce((o, i) => {
22
+ if (t.has(i)) {
23
+ const l = t.get(i);
24
+ if (typeof l == "string")
25
+ o[l] = e[i];
25
26
  else {
26
- const y = u(l, e[l], e);
27
- Object.assign(i, y);
27
+ const u = l(i, e[i], e);
28
+ Object.assign(o, u);
28
29
  }
29
30
  } else
30
- i[l] = e[l];
31
- return i;
31
+ o[i] = e[i];
32
+ return o;
32
33
  }, {});
33
34
  }
34
- function _(e, t, n = /* @__PURE__ */ new Map()) {
35
- const i = Y(e, t);
36
- return Z(i, n);
35
+ function ue(e, t, n = /* @__PURE__ */ new Map()) {
36
+ const o = re(e, t);
37
+ return se(o, n);
37
38
  }
38
- function K(e = {}) {
39
- function t(s, d, o, a) {
40
- if (typeof o == "number")
41
- return a[s].length === o;
42
- if (typeof o == "object") {
43
- const r = Object.keys(o)[0], f = o[r];
44
- if (r === "not")
45
- return Number(a[s].length) !== Number(f);
46
- if (r === "moreThan")
47
- return Number(a[s].length) >= Number(f);
48
- if (r === "lessThan")
49
- return Number(a[s].length) <= Number(f);
39
+ function ce(e = {}) {
40
+ function t(r, p, a, s) {
41
+ if (typeof a == "number")
42
+ return s[r].length === a;
43
+ if (typeof a == "object") {
44
+ const y = Object.keys(a)[0], m = a[y];
45
+ if (y === "not")
46
+ return Number(s[r].length) !== Number(m);
47
+ if (y === "moreThan")
48
+ return Number(s[r].length) >= Number(m);
49
+ if (y === "lessThan")
50
+ return Number(s[r].length) <= Number(m);
50
51
  }
51
52
  return !1;
52
53
  }
53
- function n(s, d, o, a) {
54
- return a[s] && a[s].propertyValue && String(a[s].propertyValue.value) === String(o);
54
+ function n(r, p, a, s) {
55
+ return s[r] && s[r].propertyValue && String(s[r].propertyValue.value) === String(a);
55
56
  }
56
- const i = /* @__PURE__ */ new Map([
57
+ const o = /* @__PURE__ */ new Map([
57
58
  ["length", t],
58
59
  ["getProperty", n]
59
60
  ]);
60
- Object.keys(e).reduce((s, d) => (s.set(d, e[d]), s), i);
61
- function l(s, d) {
62
- const o = s;
63
- return typeof d == "number" ? [{ target: o, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: o, operator: "getProperty", param: s, value: !!d }] : typeof d == "object" ? Object.keys(d).map((a) => {
64
- if (a === "length")
65
- return { target: o, operator: "length", param: null, value: d[a] };
66
- const r = a, f = d[a];
67
- return { target: o, operator: "getProperty", param: r, value: f };
61
+ Object.keys(e).reduce((r, p) => (r.set(p, e[p]), r), o);
62
+ function i(r, p) {
63
+ const a = r;
64
+ return typeof p == "number" ? [{ target: a, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: a, operator: "getProperty", param: r, value: !!p }] : typeof p == "object" ? Object.keys(p).map((s) => {
65
+ if (s === "length")
66
+ return { target: a, operator: "length", param: null, value: p[s] };
67
+ const y = s, m = p[s];
68
+ return { target: a, operator: "getProperty", param: y, value: m };
68
69
  }) : [];
69
70
  }
70
- function u(s) {
71
- return Object.keys(s).reduce((o, a) => {
72
- const r = l(a, s[a]);
73
- return o.push(...r), o;
71
+ function l(r) {
72
+ return Object.keys(r).reduce((a, s) => {
73
+ const y = i(s, r[s]);
74
+ return a.push(...y), a;
74
75
  }, []);
75
76
  }
76
- function y(s, d) {
77
- if (i.has(s.operator)) {
78
- const o = i.get(s.operator);
79
- return o && o(s.target, s.param, s.value, d) || !1;
77
+ function u(r, p) {
78
+ if (o.has(r.operator)) {
79
+ const a = o.get(r.operator);
80
+ return a && a(r.target, r.param, r.value, p) || !1;
80
81
  }
81
82
  return !1;
82
83
  }
83
- function p(s, d) {
84
- return u(s).reduce((r, f) => r && y(f, d), !0);
84
+ function d(r, p) {
85
+ return l(r).reduce((y, m) => y && u(m, p), !0);
85
86
  }
86
- function m(s, d) {
87
- const o = Object.keys(s), a = o.includes("allOf"), r = o.includes("anyOf"), f = a || r, h = (f ? s[f ? a ? "allOf" : "anyOf" : "allOf"] : [s]).map((F) => p(F, d));
88
- return a ? !h.includes(!1) : h.includes(!0);
87
+ function c(r, p) {
88
+ const a = Object.keys(r), s = a.includes("allOf"), y = a.includes("anyOf"), m = s || y, h = (m ? r[m ? s ? "allOf" : "anyOf" : "allOf"] : [r]).map((x) => d(x, p));
89
+ return s ? !h.includes(!1) : h.includes(!0);
89
90
  }
90
- return { parseValueSchema: m };
91
+ return { parseValueSchema: c };
91
92
  }
92
- const c = {
93
+ const f = {
93
94
  button: { type: "button", name: "按钮", icon: "Button" },
94
95
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
95
96
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -126,21 +127,22 @@ const c = {
126
127
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
127
128
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
128
129
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
129
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
130
- }, ee = {}, te = {};
131
- K();
132
- function ne(e, t, n = /* @__PURE__ */ new Map(), i = (y, p, m) => p, l = {}, u = (y) => y) {
133
- return Q[t.title] = t, X[t.title] = i, ee[t.title] = l, te[t.title] = u, (y = {}) => {
134
- const p = _(y, t, n), m = Object.keys(e).reduce((s, d) => (s[d] = e[d].default, s), {});
135
- return Object.assign(m, p);
130
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
131
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
132
+ }, de = {}, pe = {};
133
+ ce();
134
+ function q(e, t, n = /* @__PURE__ */ new Map(), o = (u, d, c) => d, i = {}, l = (u) => u) {
135
+ return ae[t.title] = t, le[t.title] = o, de[t.title] = i, pe[t.title] = l, (u = {}) => {
136
+ const d = ue(u, t, n), c = Object.keys(e).reduce((r, p) => (r[p] = e[p].default, r), {});
137
+ return Object.assign(c, d);
136
138
  };
137
139
  }
138
- function ie(e, t) {
140
+ function fe(e, t) {
139
141
  return { customClass: t.class, customStyle: t.style };
140
142
  }
141
- const oe = /* @__PURE__ */ new Map([
142
- ["appearance", ie]
143
- ]), ae = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-design.gitee.io/combo-list.schema.json", re = "combo-list", se = "A Farris Input Component", ce = "object", de = {
143
+ const ye = /* @__PURE__ */ new Map([
144
+ ["appearance", fe]
145
+ ]), me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-design.gitee.io/combo-list.schema.json", be = "combo-list", he = "A Farris Input Component", ve = "object", Ce = {
144
146
  id: {
145
147
  description: "The unique identifier for a combo list",
146
148
  type: "string"
@@ -168,6 +170,11 @@ const oe = /* @__PURE__ */ new Map([
168
170
  type: "object",
169
171
  default: {}
170
172
  },
173
+ disabled: {
174
+ description: "",
175
+ type: "boolean",
176
+ default: !1
177
+ },
171
178
  editable: {
172
179
  description: "",
173
180
  type: "boolean",
@@ -195,7 +202,7 @@ const oe = /* @__PURE__ */ new Map([
195
202
  valueField: {
196
203
  description: "",
197
204
  type: "string",
198
- default: "value"
205
+ default: "id"
199
206
  },
200
207
  titleField: {
201
208
  description: "",
@@ -251,23 +258,28 @@ const oe = /* @__PURE__ */ new Map([
251
258
  type: "sting",
252
259
  default: ""
253
260
  }
254
- }, ue = [
261
+ }, Se = [
255
262
  "id",
256
263
  "type"
257
- ], pe = {
258
- $schema: ae,
259
- $id: le,
260
- title: re,
261
- description: se,
262
- type: ce,
263
- properties: de,
264
- required: ue
264
+ ], ke = [
265
+ "id",
266
+ "appearance",
267
+ "binding"
268
+ ], Fe = {
269
+ $schema: me,
270
+ $id: ge,
271
+ title: be,
272
+ description: he,
273
+ type: ve,
274
+ properties: Ce,
275
+ required: Se,
276
+ ignore: ke
265
277
  };
266
- function me(e, t, n) {
278
+ function Be(e, t, n) {
267
279
  return t;
268
280
  }
269
- var ye = /* @__PURE__ */ ((e) => (e.Text = "text", e.Tag = "tag", e))(ye || {}), fe = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.auto = "auto", e))(fe || {});
270
- const D = {
281
+ var xe = /* @__PURE__ */ ((e) => (e.Text = "text", e.Tag = "tag", e))(xe || {}), we = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.auto = "auto", e))(we || {});
282
+ const V = {
271
283
  /**
272
284
  * 组件标识
273
285
  */
@@ -344,7 +356,7 @@ const D = {
344
356
  * 可选,是否支持多选
345
357
  * 默认`false`
346
358
  */
347
- multiSelect: { default: !1, type: Boolean },
359
+ multiSelect: { type: Boolean, default: !1 },
348
360
  /**
349
361
  * 绑定值
350
362
  */
@@ -433,11 +445,11 @@ const D = {
433
445
  },
434
446
  // 搜索启用高亮
435
447
  enableHighlightSearch: { type: Boolean, default: !0 }
436
- }, R = ne(D, pe, oe, me), ge = {
448
+ }, H = q(V, Fe, ye, Be), Ie = {
437
449
  dataSource: { type: Array, default: [] },
438
450
  enableSearch: { type: Boolean, default: !1 },
439
451
  idField: { type: String, default: "id" },
440
- multiSelect: { default: !1, type: Boolean },
452
+ multiSelect: { type: Boolean, default: !1 },
441
453
  selectedValues: { type: String, default: "" },
442
454
  separator: { type: String, default: "," },
443
455
  textField: { type: String, default: "name" },
@@ -454,240 +466,862 @@ const D = {
454
466
  },
455
467
  // 搜索启用高亮
456
468
  enableHighlightSearch: { type: Boolean, default: !0 }
457
- }, he = /* @__PURE__ */ O({
469
+ }, Me = /* @__PURE__ */ O({
458
470
  name: "FComboListContainer",
459
- props: ge,
471
+ props: Ie,
460
472
  emits: ["selectionChange"],
461
473
  setup(e, t) {
462
- const n = g(), i = g(e.dataSource), l = g([]), u = g(e.separator), y = g(e.width), p = g(e.maxHeight), m = g(String(e.selectedValues).split(u.value));
463
- w(e.dataSource, () => {
464
- i.value = e.dataSource;
474
+ const n = g(), o = g(e.dataSource), i = g([]), l = g(e.separator), u = g(e.width), d = g(e.maxHeight), c = g(String(e.selectedValues).split(l.value)), r = F(() => e.multiSelect), p = F(() => ({
475
+ enableSelectRow: !0,
476
+ multiSelect: e.multiSelect,
477
+ multiSelectMode: "OnCheckAndClick",
478
+ showCheckbox: r.value,
479
+ showSelectAll: !1,
480
+ showSelection: !0
481
+ }));
482
+ M(e.dataSource, () => {
483
+ o.value = e.dataSource;
465
484
  });
466
- const s = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), d = B(() => {
467
- const r = {};
468
- return y.value !== void 0 && (r.width = `${y.value}px`), p.value !== void 0 && p.value > 0 && (r.maxHeight = `${p.value}px`), r;
485
+ const a = F(() => e.enableSearch ? "SearchBar" : "ContentHeader"), s = F(() => {
486
+ const b = {};
487
+ return u.value !== void 0 && (b.width = `${u.value}px`), d.value !== void 0 && d.value > 0 && (b.maxHeight = `${d.value}px`), b;
469
488
  });
470
- function o(r) {
471
- l.value = r.map((f) => Object.assign({}, f)), m.value = r.map((f) => f[e.idField]), t.emit("selectionChange", l.value);
489
+ function y(b) {
490
+ i.value = b.map((v) => Object.assign({}, v)), c.value = b.map((v) => v[e.idField]), t.emit("selectionChange", i.value);
472
491
  }
473
- function a(r) {
492
+ function m(b) {
474
493
  if (e.enableHighlightSearch)
475
494
  return;
476
- let f = [];
477
- typeof e.searchOption == "function" ? f = i.value.filter((C) => e.searchOption(r, C)) : f = i.value.filter((C) => C[e.valueField].indexOf(r) > -1 || C[e.textField].indexOf(r) > -1), n.value.updateDataSource(f);
495
+ let v = [];
496
+ typeof e.searchOption == "function" ? v = o.value.filter((h) => e.searchOption(b, h)) : v = o.value.filter((h) => h[e.valueField].indexOf(b) > -1 || h[e.textField].indexOf(b) > -1), n.value.updateDataSource(v);
478
497
  }
479
- return w([() => e.selectedValues], ([r]) => {
480
- m.value = r.split(u.value);
481
- }), () => M("div", {
482
- class: "f-combo-list-container pl-3",
483
- style: d.value
484
- }, [M(z, {
498
+ return M([() => e.selectedValues], ([b]) => {
499
+ c.value = b.split(l.value);
500
+ }), () => k("div", {
501
+ class: "f-combo-list-container pl-1",
502
+ style: s.value
503
+ }, [k(te, {
485
504
  ref: n,
486
505
  size: "small",
487
506
  itemClass: "f-combo-list-item",
488
- header: s.value,
507
+ header: a.value,
489
508
  headerClass: "f-combo-list-search-box",
490
- data: i.value,
509
+ data: o.value,
491
510
  idField: e.idField,
492
511
  textField: e.textField,
493
512
  titleField: e.titleField,
494
513
  multiSelect: e.multiSelect,
495
- selection: {
496
- enableSelectRow: !0,
497
- multiSelect: !0,
498
- multiSelectMode: "OnCheckAndClick",
499
- showCheckbox: !0,
500
- showSelectAll: !1,
501
- showSelection: !0
502
- },
514
+ selection: p.value,
503
515
  enableHighlightSearch: e.enableHighlightSearch,
504
- selectionValues: m.value,
505
- onSelectionChange: o,
506
- onAfterSearch: a
516
+ selectionValues: c.value,
517
+ onSelectionChange: y,
518
+ onAfterSearch: m
507
519
  }, null)]);
508
520
  }
509
521
  });
510
- function be(e) {
511
- const t = g(""), n = g(e.modelValue), i = g(e.data || []), l = g(e.editable);
512
- function u(o) {
513
- const a = String(o).split(e.separator).map((f) => [f, !0]), r = new Map(a);
514
- return i.value.filter((f) => r.has(String(f[e.valueField])));
522
+ function Oe(e) {
523
+ const t = g(""), n = g(e.modelValue), o = g(e.data || []), i = g(e.editable);
524
+ function l(a) {
525
+ const s = String(a).split(e.separator), y = s.map((v) => [v, !0]), m = new Map(y);
526
+ return o.value.filter((v) => m.has(String(v[e.valueField]))).sort((v, h) => {
527
+ const B = s.indexOf(v[e.valueField]), x = s.indexOf(h[e.valueField]);
528
+ return B - x;
529
+ });
515
530
  }
516
- function y(o) {
517
- const a = u(o).map((r) => r[e.textField]).join(e.separator);
518
- t.value = l.value ? a || o : a;
531
+ function u(a) {
532
+ const s = l(a).map((y) => y[e.textField]).join(e.separator);
533
+ t.value = i.value ? s || a : s;
519
534
  }
520
- function p(o) {
521
- const a = o.split(e.separator).map((f) => [f, !0]), r = new Map(a);
522
- return i.value.filter((f) => r.has(f[e.textField]));
535
+ function d(a) {
536
+ const s = a.split(e.separator).map((m) => [m, !0]), y = new Map(s);
537
+ return o.value.filter((m) => y.has(m[e.textField]));
523
538
  }
524
- function m(o) {
525
- const a = {};
526
- return a[e.idField] = o, a[e.textField] = o, [a];
539
+ function c(a) {
540
+ const s = {};
541
+ return s[e.idField] = a, s[e.textField] = a, [s];
527
542
  }
528
- function s(o) {
529
- let a = p(o);
530
- const r = a && a.length > 0;
531
- return l.value && !r && (a = m(o)), a;
543
+ function r(a) {
544
+ let s = d(a);
545
+ const y = s && s.length > 0;
546
+ return i.value && !y && (s = c(a)), s;
532
547
  }
533
- function d() {
534
- const { url: o, method: a = "GET", headers: r = {}, body: f = null } = e.remote, C = a.toLowerCase() == "get" ? { method: a, headers: r } : { method: a, headers: r, body: f };
535
- let x = !1;
536
- fetch(o, C).then((h) => {
537
- var F, T;
548
+ function p() {
549
+ const { url: a, method: s = "GET", headers: y = {}, body: m = null } = e.remote, b = s.toLowerCase() == "get" ? { method: s, headers: y } : { method: s, headers: y, body: m };
550
+ let v = !1;
551
+ fetch(a, b).then((h) => {
552
+ var x, T;
538
553
  if (h.status === 200)
539
- return x = !!((T = (F = h.headers) == null ? void 0 : F.get("content-type")) != null && T.includes("application/json")), x ? h.text() : h.json();
554
+ return v = !!((T = (x = h.headers) == null ? void 0 : x.get("content-type")) != null && T.includes("application/json")), v ? h.text() : h.json();
540
555
  throw new Error(h.statusText);
541
556
  }).then((h) => {
542
- i.value = x ? JSON.parse(h) : h;
557
+ o.value = v ? JSON.parse(h) : h;
543
558
  }).catch((h) => {
544
559
  console.error(h);
545
560
  });
546
561
  }
547
- return e.remote && d(), w(() => e.data, () => {
548
- i.value = e.data;
549
- }), w([i], ([o]) => {
550
- if (e.modelValue) {
551
- const a = o.find((r) => r[e.valueField] === e.modelValue);
552
- a && (t.value = a[e.textField]);
562
+ return e.remote && p(), M(() => e.data, () => {
563
+ o.value = e.data;
564
+ }), M([o], ([a]) => {
565
+ if (e.modelValue != null) {
566
+ const s = a.find((y) => y[e.valueField] === e.modelValue);
567
+ s && (t.value = s[e.textField]);
553
568
  }
554
- }), w(() => e.modelValue, (o) => {
555
- n.value = o, y(o);
556
- }), y(e.modelValue), { dataSource: i, displayText: t, editable: l, modelValue: n, getItemsByDisplayText: p, getItemsByValue: u, getSelectedItemsByDisplayText: s };
569
+ }), M(() => e.modelValue, (a) => {
570
+ n.value = a, u(a);
571
+ }), u(e.modelValue), { dataSource: o, displayText: t, editable: i, modelValue: n, getItemsByDisplayText: d, getItemsByValue: l, getSelectedItemsByDisplayText: r };
557
572
  }
558
- const V = /* @__PURE__ */ O({
573
+ const P = /* @__PURE__ */ O({
559
574
  name: "FComboList",
560
- props: D,
575
+ props: V,
561
576
  emits: ["clear", "update:modelValue", "change", "input"],
562
577
  setup(e, t) {
563
- const n = g(), i = g(e.disabled), l = g(e.enableClear), u = g(e.enableSearch), y = g(e.readonly), {
564
- dataSource: p,
565
- displayText: m,
566
- editable: s,
567
- modelValue: d,
568
- getSelectedItemsByDisplayText: o
569
- } = be(e), a = B(() => e.multiSelect), r = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
570
- function f() {
571
- !a.value && n.value && n.value.hidePopup();
578
+ const n = g(), o = g(e.disabled), i = g(e.enableClear), l = g(e.enableSearch), u = g(e.readonly), {
579
+ dataSource: d,
580
+ displayText: c,
581
+ editable: r,
582
+ modelValue: p,
583
+ getSelectedItemsByDisplayText: a
584
+ } = Oe(e), s = F(() => e.multiSelect), y = F(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
585
+ function m() {
586
+ !s.value && n.value && n.value.hidePopup();
572
587
  }
573
- function C(b) {
574
- m.value = b.map((S) => S[e.textField]).join(e.separator), b.length === 1 ? d.value = b[0][e.valueField] : d.value = b.map((S) => S[e.valueField]).join(e.separator), t.emit("update:modelValue", d.value), t.emit("change", b, d.value), f();
588
+ function b(C) {
589
+ c.value = C.map((w) => w[e.textField]).join(e.separator), C.length === 1 ? p.value = C[0][e.valueField] : p.value = C.map((w) => w[e.valueField]).join(e.separator), t.emit("update:modelValue", p.value), t.emit("change", C, p.value), m();
575
590
  }
576
- function x() {
577
- y.value || n.value.togglePopup();
591
+ function v() {
592
+ u.value || n.value.togglePopup();
578
593
  }
579
- function h(b) {
580
- d.value = "", t.emit("update:modelValue", ""), t.emit("clear");
594
+ function h(C) {
595
+ p.value = "", t.emit("update:modelValue", ""), t.emit("clear");
581
596
  }
582
- function P(b) {
583
- const S = o(b);
584
- C(S);
597
+ function B(C) {
598
+ const w = a(C);
599
+ b(w);
585
600
  }
586
- function F() {
587
- return m.value;
601
+ function x() {
602
+ return c.value;
588
603
  }
589
- function T(b) {
590
- t.emit("input", b);
604
+ function T(C) {
605
+ t.emit("input", C);
591
606
  }
592
607
  return t.expose({
593
- getDisplayText: F
594
- }), w([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([b, S, N, U, $]) => {
595
- i.value = b, s.value = S, l.value = N, u.value = U, y.value = $;
596
- }), () => M(A, {
608
+ getDisplayText: x
609
+ }), M([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([C, w, z, J, X]) => {
610
+ o.value = C, r.value = w, i.value = z, l.value = J, u.value = X;
611
+ }), () => k(ne, {
597
612
  ref: n,
598
613
  id: e.id,
599
- disable: i.value,
600
- readonly: y.value,
614
+ disable: o.value,
615
+ readonly: u.value,
601
616
  forcePlaceholder: e.forcePlaceholder,
602
- editable: s.value,
617
+ editable: r.value,
603
618
  buttonContent: e.dropDownIcon,
604
619
  placeholder: e.placeholder,
605
- enableClear: l.value,
620
+ enableClear: i.value,
606
621
  maxLength: e.maxLength,
607
622
  tabIndex: e.tabIndex,
608
623
  enableTitle: e.enableTitle,
609
624
  multiSelect: e.multiSelect,
610
625
  inputType: e.multiSelect ? e.viewType : "text",
611
- modelValue: m.value,
612
- "onUpdate:modelValue": (b) => m.value = b,
626
+ modelValue: c.value,
627
+ "onUpdate:modelValue": (C) => c.value = C,
613
628
  focusOnCreated: e.focusOnCreated,
614
629
  selectOnCreated: e.selectOnCreated,
615
630
  onClear: h,
616
- onClick: x,
617
- onChange: P,
631
+ onClick: v,
632
+ onChange: B,
618
633
  onInput: T,
619
634
  beforeOpen: e.beforeOpen
620
635
  }, {
621
- default: () => [M(he, {
636
+ default: () => [k(Me, {
622
637
  idField: e.idField,
623
638
  valueField: e.valueField,
624
639
  textField: e.textField,
625
640
  titleField: e.titleField,
626
- dataSource: p.value,
627
- selectedValues: d.value,
641
+ dataSource: d.value,
642
+ selectedValues: p.value,
628
643
  multiSelect: e.multiSelect,
629
- enableSearch: u.value,
644
+ enableSearch: l.value,
630
645
  maxHeight: e.maxHeight,
631
646
  enableHighlightSearch: e.enableHighlightSearch,
632
- width: e.fitEditor ? r.value : void 0,
633
- onSelectionChange: C
647
+ width: e.fitEditor ? y.value : void 0,
648
+ onSelectionChange: b
634
649
  }, null)]
635
650
  });
636
651
  }
652
+ }), Te = /* @__PURE__ */ new Map([
653
+ ["appearance", oe]
654
+ ]);
655
+ function Ee(e, t, n) {
656
+ return t;
657
+ }
658
+ const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-design.gitee.io/button-edit.schema.json", Ve = "button-edit", Ae = "A Farris Input Component", je = "object", Re = {
659
+ id: {
660
+ description: "The unique identifier for a Input Group",
661
+ type: "string"
662
+ },
663
+ type: {
664
+ description: "The type string of Input Group component",
665
+ type: "string",
666
+ default: "button-edit"
667
+ },
668
+ appearance: {
669
+ description: "",
670
+ type: "object",
671
+ properties: {
672
+ class: {
673
+ type: "string"
674
+ },
675
+ style: {
676
+ type: "string"
677
+ }
678
+ },
679
+ default: {}
680
+ },
681
+ binding: {
682
+ description: "",
683
+ type: "object",
684
+ default: {}
685
+ },
686
+ disable: {
687
+ type: "string",
688
+ default: !1
689
+ },
690
+ editable: {
691
+ description: "",
692
+ type: "boolean",
693
+ default: !0
694
+ },
695
+ enableLinkLabel: {
696
+ description: "",
697
+ type: "boolean",
698
+ default: !1
699
+ },
700
+ label: {
701
+ description: "",
702
+ type: "string",
703
+ default: ""
704
+ },
705
+ lableWidth: {
706
+ description: "",
707
+ type: "number"
708
+ },
709
+ placeholder: {
710
+ description: "",
711
+ type: "string",
712
+ default: ""
713
+ },
714
+ readonly: {
715
+ description: "",
716
+ type: "boolean",
717
+ default: !1
718
+ },
719
+ require: {
720
+ description: "",
721
+ type: "boolean",
722
+ default: !1
723
+ },
724
+ tabindex: {
725
+ description: "",
726
+ type: "number",
727
+ default: -1
728
+ },
729
+ textAlign: {
730
+ description: "",
731
+ type: "string",
732
+ enum: [
733
+ "left",
734
+ "middle",
735
+ "right"
736
+ ],
737
+ default: "left"
738
+ },
739
+ visible: {
740
+ description: "",
741
+ type: "boolean",
742
+ default: !0
743
+ },
744
+ onBlur: {
745
+ description: "",
746
+ type: "string",
747
+ default: ""
748
+ },
749
+ onClickLinkLabel: {
750
+ description: "",
751
+ type: "sting",
752
+ default: ""
753
+ },
754
+ autoComplete: {
755
+ description: "",
756
+ type: "boolean",
757
+ default: !1
758
+ },
759
+ buttonContent: {
760
+ description: "",
761
+ type: "string",
762
+ default: ""
763
+ },
764
+ enableClear: {
765
+ description: "",
766
+ type: "boolean",
767
+ default: !0
768
+ },
769
+ inputType: {
770
+ description: "",
771
+ type: "string",
772
+ enum: [
773
+ "text",
774
+ "tag"
775
+ ],
776
+ default: "text"
777
+ },
778
+ multiSelect: {
779
+ description: "",
780
+ type: "boolean",
781
+ default: !1
782
+ },
783
+ popup: {
784
+ description: "",
785
+ type: "object",
786
+ properties: {
787
+ footerButtons: {
788
+ type: "array",
789
+ default: []
790
+ },
791
+ height: {
792
+ type: "number",
793
+ default: 600
794
+ },
795
+ dataMapping: {
796
+ type: "object"
797
+ },
798
+ contents: {
799
+ type: "array",
800
+ default: []
801
+ },
802
+ showMaxButton: {
803
+ type: "boolean",
804
+ default: !0
805
+ },
806
+ showCloseButton: {
807
+ type: "boolean",
808
+ default: !0
809
+ },
810
+ showFooter: {
811
+ type: "boolean",
812
+ default: !0
813
+ },
814
+ title: {
815
+ type: "string",
816
+ default: ""
817
+ },
818
+ width: {
819
+ type: "number",
820
+ default: 800
821
+ }
822
+ }
823
+ },
824
+ separator: {
825
+ type: "string",
826
+ default: ","
827
+ },
828
+ showButtonWhenDisabled: {
829
+ description: "",
830
+ type: "boolean",
831
+ default: !1
832
+ },
833
+ wrapText: {
834
+ type: "boolean",
835
+ default: !1
836
+ },
837
+ onClear: {
838
+ description: "",
839
+ type: "string",
840
+ default: ""
841
+ }
842
+ }, De = [
843
+ "id",
844
+ "type"
845
+ ], $e = {
846
+ $schema: Pe,
847
+ $id: Le,
848
+ title: Ve,
849
+ description: Ae,
850
+ type: je,
851
+ properties: Re,
852
+ required: De
853
+ }, Ue = "buttonEdit", Ne = "A Farris Component", qe = "object", He = {
854
+ basic: {
855
+ description: "Basic Infomation",
856
+ title: "基本信息",
857
+ properties: {
858
+ id: {
859
+ description: "组件标识",
860
+ title: "标识",
861
+ type: "string",
862
+ readonly: !0
863
+ },
864
+ type: {
865
+ description: "组件类型",
866
+ title: "控件类型",
867
+ type: "select",
868
+ editor: {
869
+ type: "waiting for modification",
870
+ enum: []
871
+ }
872
+ }
873
+ }
874
+ },
875
+ behavior: {
876
+ description: "Basic Infomation",
877
+ title: "行为",
878
+ properties: {
879
+ editable: {
880
+ description: "",
881
+ title: "允许编辑",
882
+ type: "boolean"
883
+ },
884
+ readonly: {
885
+ description: "",
886
+ title: "只读",
887
+ type: "string"
888
+ },
889
+ required: {
890
+ description: "",
891
+ title: "必填",
892
+ type: "boolean"
893
+ },
894
+ visible: {
895
+ description: "",
896
+ title: "可见",
897
+ type: "boolean"
898
+ },
899
+ placeholder: {
900
+ description: "",
901
+ title: "提示文本",
902
+ type: "string"
903
+ },
904
+ tabindex: {
905
+ description: "",
906
+ title: "tab索引",
907
+ type: "number"
908
+ },
909
+ textAlign: {
910
+ description: "",
911
+ title: "对齐方式",
912
+ type: "enum",
913
+ editor: {
914
+ type: "combo-list",
915
+ textField: "name",
916
+ valueField: "value",
917
+ data: [
918
+ {
919
+ value: "left",
920
+ name: "左对齐"
921
+ },
922
+ {
923
+ value: "center",
924
+ name: "居中对齐"
925
+ },
926
+ {
927
+ value: "right",
928
+ name: "右对齐"
929
+ }
930
+ ]
931
+ }
932
+ }
933
+ }
934
+ }
935
+ }, Ge = {
936
+ title: Ue,
937
+ description: Ne,
938
+ type: qe,
939
+ categories: He
940
+ }, G = {
941
+ /**
942
+ * 组件标识
943
+ */
944
+ id: String,
945
+ /**
946
+ * 扩展按钮显示内容,这是一段现在扩展按钮中的html标签
947
+ */
948
+ buttonContent: { type: String, default: '<i class="f-icon f-icon-lookup"></i>' },
949
+ buttonBehavior: { type: String, default: "Popup" },
950
+ /**
951
+ * 启用输入框自动完成功能
952
+ */
953
+ autoComplete: { type: Boolean, default: !1 },
954
+ /**
955
+ * 组件自定义样式
956
+ */
957
+ customClass: { type: String, default: "" },
958
+ /**
959
+ * 禁用组件,既不允许在输入框中录入,也不允许点击扩展按钮。
960
+ */
961
+ disable: { type: Boolean, default: !1 },
962
+ /**
963
+ * 允许在输入框中录入文本。
964
+ */
965
+ editable: { type: Boolean, default: !0 },
966
+ /**
967
+ * 显示清空文本按钮
968
+ */
969
+ enableClear: { type: Boolean, default: !1 },
970
+ /**
971
+ * 组件值
972
+ */
973
+ modelValue: { type: String, default: "" },
974
+ /**
975
+ * 将组件设置为只读,既不允许在输入框中录入,也不允许点击扩展按钮,但是允许复制输入框中的内容。
976
+ */
977
+ readonly: { type: Boolean, default: !1 },
978
+ /**
979
+ * 禁用组件时,是否显示扩展按钮
980
+ */
981
+ showButtonWhenDisabled: { type: Boolean, default: !1 },
982
+ /**
983
+ * 显示输入框的标签
984
+ */
985
+ enableTitle: { type: Boolean, default: !1 },
986
+ /**
987
+ * 输入框类型
988
+ */
989
+ inputType: { type: String, default: "text" },
990
+ /**
991
+ * 显示输入框提示信息
992
+ */
993
+ forcePlaceholder: { type: Boolean, default: !1 },
994
+ /**
995
+ * 输入框提示文本
996
+ */
997
+ placeholder: { type: String, default: "" },
998
+ /**
999
+ * 输入框最小长度
1000
+ */
1001
+ minLength: Number,
1002
+ /**
1003
+ * 输入框最大长度
1004
+ */
1005
+ maxLength: Number,
1006
+ /**
1007
+ * 输入框Tab键索引
1008
+ */
1009
+ tabIndex: Number,
1010
+ popupHost: { type: Object },
1011
+ popupRightBoundary: { type: Object },
1012
+ popupOffsetX: { type: Object },
1013
+ popupOnInput: { type: Boolean, default: !1 },
1014
+ popupOnFocus: { type: Boolean, default: !1 },
1015
+ popupMinWidth: { type: Number, default: 160 },
1016
+ modalOptions: { type: Object, default: {} },
1017
+ wrapText: { type: Boolean, default: !1 },
1018
+ /**
1019
+ * 可选,是否支持多选
1020
+ * 默认`false`
1021
+ */
1022
+ multiSelect: { type: Boolean, default: !1 },
1023
+ /**
1024
+ * 可选,分隔符
1025
+ * 默认`,`
1026
+ */
1027
+ separator: { type: String, default: "," },
1028
+ /** 对齐方式 */
1029
+ textAlign: { type: String, default: "left" },
1030
+ /**
1031
+ * 废弃
1032
+ */
1033
+ beforeClickButton: { type: Function, default: null },
1034
+ /**
1035
+ * 作为内嵌编辑器被创建后默认获得焦点
1036
+ */
1037
+ focusOnCreated: { type: Boolean, default: !1 },
1038
+ /**
1039
+ * 作为内嵌编辑器被创建后默认选中文本
1040
+ */
1041
+ selectOnCreated: { type: Boolean, default: !1 },
1042
+ /**
1043
+ * 打开前
1044
+ */
1045
+ beforeOpen: { type: Function, default: null },
1046
+ /** 更新方式 blur | change */
1047
+ updateOn: { type: String, default: "change" }
1048
+ };
1049
+ q(G, $e, Te, Ee, Ge);
1050
+ const We = {
1051
+ popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
1052
+ host: { type: Object },
1053
+ backgroundColor: { type: String, default: "" }
1054
+ }, ze = /* @__PURE__ */ O({
1055
+ name: "FOverlay",
1056
+ props: We,
1057
+ emits: ["click"],
1058
+ setup(e, t) {
1059
+ const n = g(e.popupContentPosition), o = g(e.host), i = F(() => ({
1060
+ backgroundColor: e.backgroundColor || "",
1061
+ pointerEvents: "auto"
1062
+ }));
1063
+ function l(d) {
1064
+ t.emit("click"), d.preventDefault(), d.stopPropagation();
1065
+ }
1066
+ F(() => {
1067
+ const d = o.value;
1068
+ if (d) {
1069
+ const c = d.getBoundingClientRect(), {
1070
+ left: r,
1071
+ top: p,
1072
+ height: a
1073
+ } = c;
1074
+ return {
1075
+ left: r,
1076
+ top: p + a
1077
+ };
1078
+ }
1079
+ return n.value;
1080
+ });
1081
+ const u = F(() => ({
1082
+ // position: 'relative',
1083
+ // left: `${position.value.left}px`,
1084
+ // top: `${position.value.top}px`
1085
+ }));
1086
+ return () => k(Z, {
1087
+ to: "body"
1088
+ }, {
1089
+ default: () => {
1090
+ var d, c;
1091
+ return [k("div", {
1092
+ class: "overlay-container",
1093
+ onClick: (r) => l(r),
1094
+ style: i.value
1095
+ }, [k("div", {
1096
+ style: u.value
1097
+ }, [(c = (d = t.slots).default) == null ? void 0 : c.call(d)])])];
1098
+ }
1099
+ });
1100
+ }
637
1101
  });
638
- function ve(e, t) {
1102
+ function Je(e) {
1103
+ if (e.content && e.content.render)
1104
+ return e.content.render;
1105
+ if (e.render && typeof e.render == "function")
1106
+ return e.render;
1107
+ }
1108
+ function Xe(e) {
1109
+ const t = document.createElement("div");
1110
+ t.style.display = "contents";
1111
+ let n;
1112
+ const o = e.onClickCallback || (() => {
1113
+ }), i = () => {
1114
+ o(), n && n.unmount();
1115
+ };
1116
+ return n = _({
1117
+ setup() {
1118
+ K(() => {
1119
+ document.body.removeChild(t);
1120
+ });
1121
+ const l = Je(e);
1122
+ return () => k(ze, {
1123
+ "popup-content-position": e.popupPosition,
1124
+ host: e.host,
1125
+ onClick: i,
1126
+ backgroundColor: e.backgroundColor
1127
+ }, {
1128
+ default: () => [l && l()]
1129
+ });
1130
+ }
1131
+ }), document.body.appendChild(t), n.mount(t), n;
1132
+ }
1133
+ class Qe {
1134
+ static show(t) {
1135
+ return Xe(t);
1136
+ }
1137
+ }
1138
+ const Ye = Symbol("FModalService");
1139
+ function W(e, t) {
1140
+ function n() {
1141
+ const o = e.beforeOpen || e.beforeClickButton || null;
1142
+ let i = Promise.resolve(!0);
1143
+ if (o) {
1144
+ const l = o(t.value);
1145
+ if (typeof l > "u")
1146
+ return i;
1147
+ typeof l == "boolean" ? i = Promise.resolve(l) : i = l;
1148
+ }
1149
+ return i;
1150
+ }
1151
+ return { judgeCanOpen: n };
1152
+ }
1153
+ function Ze(e, t, n, o, i) {
1154
+ const l = g(e.buttonBehavior), u = g(e.popupOnInput), d = F(() => ({
1155
+ "input-group-append": !0,
1156
+ "append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
1157
+ })), { judgeCanOpen: c } = W(e, i), r = F(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), p = E(Ye, null), a = g();
1158
+ async function s(b) {
1159
+ if (await c() && r.value) {
1160
+ const v = !!t.slots.default;
1161
+ if (l.value === "Modal") {
1162
+ const h = e.modalOptions, B = p == null ? void 0 : p.open({
1163
+ ...h,
1164
+ render: () => t.slots.default && t.slots.default()
1165
+ });
1166
+ a.value = B == null ? void 0 : B.modalRef;
1167
+ }
1168
+ l.value === "Overlay" && Qe.show({
1169
+ // host: buttonEditRef.value,
1170
+ host: document.body,
1171
+ backgroundColor: "rgba(0,0,0,.15)",
1172
+ render: () => t.slots.default && t.slots.default()
1173
+ }), v && l.value === "Popup" && o.togglePopup(!0), v && u.value && o.hidePopup(), t.emit("clickButton", { origin: b, value: e.modelValue });
1174
+ }
1175
+ }
1176
+ function y(b) {
1177
+ t.emit("mouseEnterIcon", b);
1178
+ }
1179
+ function m(b) {
1180
+ t.emit("mouseLeaveIcon", b);
1181
+ }
1182
+ return {
1183
+ buttonGroupClass: d,
1184
+ onClickButton: s,
1185
+ onMouseEnterButton: y,
1186
+ onMouseLeaveButton: m,
1187
+ modalRef: a
1188
+ };
1189
+ }
1190
+ function _e(e, t, n, o) {
1191
+ const i = g(), l = g(!1), { judgeCanOpen: u } = W(e, o);
1192
+ function d() {
1193
+ const a = i.value;
1194
+ a && a.show(n.value);
1195
+ }
1196
+ async function c(a = !1) {
1197
+ if (!!t.slots.default) {
1198
+ if (!a && !l.value && !await u())
1199
+ return;
1200
+ l.value = !l.value, await A(), d();
1201
+ }
1202
+ }
1203
+ async function r(a = !1) {
1204
+ if (!!t.slots.default) {
1205
+ if (!a && !await u())
1206
+ return;
1207
+ l.value = !0, await A(), d();
1208
+ }
1209
+ }
1210
+ function p() {
1211
+ l.value = !1;
1212
+ }
1213
+ return { hidePopup: p, popup: r, shouldPopupContent: l, togglePopup: c, popoverRef: i };
1214
+ }
1215
+ function Ke(e, t, n) {
1216
+ const {
1217
+ buttonGroupClass: o
1218
+ } = n, i = g();
1219
+ return {
1220
+ renderButtonGroup: () => k("div", {
1221
+ id: `${e.id}-button-group`,
1222
+ class: o.value
1223
+ }, [t.slots.buttonContent ? k("span", {
1224
+ class: "input-group-text input-group-append-button"
1225
+ }, [t.slots.buttonContent()]) : e.buttonContent ? k("span", {
1226
+ class: "input-group-text input-group-append-button",
1227
+ innerHTML: e.buttonContent,
1228
+ ref: i
1229
+ }, null) : null]),
1230
+ buttonHandleElement: i
1231
+ };
1232
+ }
1233
+ const et = /* @__PURE__ */ O({
1234
+ name: "FButtonEdit",
1235
+ props: G,
1236
+ emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
1237
+ setup(e, t) {
1238
+ const n = g(), o = E("design-item-context"), i = U(n, o), l = g(e.customClass), u = g(e.modelValue), d = _e(e, t, n, u), c = Ze(e, t, n, d, u), r = g(), p = F(() => ({
1239
+ "f-cmp-inputgroup": !0,
1240
+ "input-group": !0,
1241
+ "f-state-disable": !0,
1242
+ "f-state-editable": !1,
1243
+ "f-state-readonly": !0
1244
+ }));
1245
+ D(() => {
1246
+ n.value.componentInstance = i;
1247
+ }), t.expose(i.value);
1248
+ const a = F(() => {
1249
+ const y = {
1250
+ "f-button-edit": !0,
1251
+ "f-cmp-inputgroup": !0,
1252
+ "f-button-edit-nowrap": !e.wrapText
1253
+ };
1254
+ return l.value && l.value.split(" ").reduce((m, b) => (m[b] = !0, m), y), y;
1255
+ }), {
1256
+ renderButtonGroup: s
1257
+ } = Ke(e, t, c);
1258
+ return () => k("div", ee(t.attrs, {
1259
+ ref: n,
1260
+ class: a.value,
1261
+ id: e.id
1262
+ }), [k("div", {
1263
+ class: p.value
1264
+ }, [k("input", {
1265
+ ref: r,
1266
+ class: "form-control",
1267
+ readonly: !0,
1268
+ placeholder: e.placeholder
1269
+ }, null), s()])]);
1270
+ }
1271
+ });
1272
+ function tt(e, t) {
639
1273
  e.schema;
640
- const n = g(!0), i = g(!0);
641
- function l(o) {
1274
+ const n = g(!0), o = g(!0);
1275
+ function i(a) {
642
1276
  return !1;
643
1277
  }
644
- function u() {
1278
+ function l() {
645
1279
  return !1;
646
1280
  }
647
- function y() {
1281
+ function u() {
648
1282
  return !1;
649
1283
  }
650
- function p() {
1284
+ function d() {
651
1285
  return !0;
652
1286
  }
653
- function m(o) {
1287
+ function c(a) {
654
1288
  }
655
- function s() {
1289
+ function r() {
656
1290
  }
657
- function d(o) {
1291
+ function p(a) {
658
1292
  return null;
659
1293
  }
660
1294
  return {
661
- canAccepts: l,
662
- checkCanDeleteComponent: u,
663
- checkCanMoveComponent: y,
664
- hideNestedPaddingInDesginerView: p,
665
- onAcceptMovedChildElement: m,
666
- resolveComponentContext: s,
1295
+ canAccepts: i,
1296
+ checkCanDeleteComponent: l,
1297
+ checkCanMoveComponent: u,
1298
+ hideNestedPaddingInDesginerView: d,
1299
+ onAcceptMovedChildElement: c,
1300
+ resolveComponentContext: r,
667
1301
  triggerBelongedComponentToMoveWhenMoved: n,
668
- triggerBelongedComponentToDeleteWhenDeleted: i,
669
- getPropsConfig: d
1302
+ triggerBelongedComponentToDeleteWhenDeleted: o,
1303
+ getPropsConfig: p
670
1304
  };
671
1305
  }
672
- class Ce {
1306
+ class nt {
673
1307
  constructor(t, n) {
674
- v(this, "componentId");
675
- v(this, "viewModelId");
676
- v(this, "eventsEditorUtils");
677
- v(this, "formSchemaUtils");
678
- v(this, "formMetadataConverter");
679
- v(this, "designViewModelUtils");
680
- v(this, "designViewModelField");
681
- v(this, "controlCreatorUtils");
682
- v(this, "designerHostService");
683
- v(this, "schemaService", null);
684
- v(this, "metadataService", null);
685
- v(this, "propertyConfig", {
1308
+ S(this, "componentId");
1309
+ S(this, "viewModelId");
1310
+ S(this, "eventsEditorUtils");
1311
+ S(this, "formSchemaUtils");
1312
+ S(this, "formMetadataConverter");
1313
+ S(this, "designViewModelUtils");
1314
+ S(this, "designViewModelField");
1315
+ S(this, "controlCreatorUtils");
1316
+ S(this, "designerHostService");
1317
+ S(this, "schemaService", null);
1318
+ S(this, "metadataService", null);
1319
+ S(this, "propertyConfig", {
686
1320
  type: "object",
687
1321
  categories: {}
688
1322
  });
689
- var i;
690
- this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
1323
+ var o;
1324
+ this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
691
1325
  }
692
1326
  getTableInfo() {
693
1327
  var t;
@@ -697,8 +1331,8 @@ class Ce {
697
1331
  const n = t.binding && t.binding.type === "Form" && t.binding.field;
698
1332
  if (n) {
699
1333
  if (!this.designViewModelField) {
700
- const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
701
- this.designViewModelField = i.fields.find((l) => l.id === n);
1334
+ const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1335
+ this.designViewModelField = o.fields.find((i) => i.id === n);
702
1336
  }
703
1337
  t.updateOn = this.designViewModelField.updateOn;
704
1338
  }
@@ -724,7 +1358,7 @@ class Ce {
724
1358
  type: "combo-list",
725
1359
  textField: "name",
726
1360
  valueField: "value",
727
- data: [{ value: t.type, name: c[t.type].name }]
1361
+ data: [{ value: t.type, name: f[t.type].name }]
728
1362
  }
729
1363
  }
730
1364
  }
@@ -750,13 +1384,26 @@ class Ce {
750
1384
  }
751
1385
  };
752
1386
  }
1387
+ /**
1388
+ *
1389
+ * @param propertyId
1390
+ * @param componentInstance
1391
+ * @returns
1392
+ */
1393
+ updateElementByParentContainer(t, n) {
1394
+ const o = n && n.parent && n.parent.schema;
1395
+ if (!o)
1396
+ return;
1397
+ const i = o.contents.findIndex((u) => u.id === t), l = $(o.contents[i]);
1398
+ o.contents.splice(i, 1), o.contents.splice(i, 0, l);
1399
+ }
753
1400
  }
754
- const k = class k {
1401
+ const I = class I {
755
1402
  /**
756
1403
  * 根据绑定字段类型获取可用的输入类控件
757
1404
  */
758
1405
  static getEditorTypesByMDataType(t) {
759
- const n = k.fieldControlTypeMapping[t];
1406
+ const n = I.fieldControlTypeMapping[t];
760
1407
  return n || [{ key: "", value: "" }];
761
1408
  }
762
1409
  /**
@@ -764,9 +1411,9 @@ const k = class k {
764
1411
  */
765
1412
  static getAllInputTypes() {
766
1413
  const t = [];
767
- for (let n in k.fieldControlTypeMapping)
768
- k.fieldControlTypeMapping[n].forEach((i) => {
769
- t.find((l) => l.key === i.key && l.value === i.value) || t.push({ key: i.key, value: i.value });
1414
+ for (let n in I.fieldControlTypeMapping)
1415
+ I.fieldControlTypeMapping[n].forEach((o) => {
1416
+ t.find((i) => i.key === o.key && i.value === o.value) || t.push({ key: o.key, value: o.value });
770
1417
  });
771
1418
  return t;
772
1419
  }
@@ -774,65 +1421,67 @@ const k = class k {
774
1421
  /**
775
1422
  * <字段类型,可配置的控件类型列表>的映射
776
1423
  */
777
- v(k, "fieldControlTypeMapping", {
1424
+ S(I, "fieldControlTypeMapping", {
778
1425
  String: [
779
- { key: c["input-group"].type, value: c["input-group"].name },
780
- { key: c.lookup.type, value: c.lookup.name },
781
- { key: c["date-picker"].type, value: c["date-picker"].name },
782
- { key: c["check-box"].type, value: c["check-box"].name },
783
- { key: c["radio-group"].type, value: c["radio-group"].name },
784
- { key: c["combo-list"].type, value: c["combo-list"].name },
785
- { key: c.textarea.type, value: c.textarea.name }
1426
+ { key: f["input-group"].type, value: f["input-group"].name },
1427
+ { key: f.lookup.type, value: f.lookup.name },
1428
+ { key: f["date-picker"].type, value: f["date-picker"].name },
1429
+ { key: f["check-box"].type, value: f["check-box"].name },
1430
+ { key: f["radio-group"].type, value: f["radio-group"].name },
1431
+ { key: f["combo-list"].type, value: f["combo-list"].name },
1432
+ { key: f.textarea.type, value: f.textarea.name }
786
1433
  ],
787
1434
  Text: [
788
- { key: c.textarea.type, value: c.textarea.name },
789
- { key: c.lookup.type, value: c.lookup.name }
1435
+ { key: f.textarea.type, value: f.textarea.name },
1436
+ { key: f.lookup.type, value: f.lookup.name }
790
1437
  ],
791
1438
  Decimal: [
792
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
1439
+ { key: f["number-spinner"].type, value: f["number-spinner"].name }
793
1440
  ],
794
1441
  Integer: [
795
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
1442
+ { key: f["number-spinner"].type, value: f["number-spinner"].name }
796
1443
  ],
797
1444
  Number: [
798
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
1445
+ { key: f["number-spinner"].type, value: f["number-spinner"].name }
799
1446
  ],
800
1447
  BigNumber: [
801
- { key: c["number-spinner"].type, value: c["number-spinner"].name }
1448
+ { key: f["number-spinner"].type, value: f["number-spinner"].name }
802
1449
  ],
803
1450
  Date: [
804
- { key: c["date-picker"].type, value: c["date-picker"].name }
1451
+ { key: f["date-picker"].type, value: f["date-picker"].name }
805
1452
  ],
806
1453
  DateTime: [
807
- { key: c["date-picker"].type, value: c["date-picker"].name }
1454
+ { key: f["date-picker"].type, value: f["date-picker"].name }
808
1455
  ],
809
1456
  Boolean: [
810
- { key: c.switch.type, value: c.switch.name },
811
- { key: c["check-box"].type, value: c["check-box"].name }
1457
+ { key: f.switch.type, value: f.switch.name },
1458
+ { key: f["check-box"].type, value: f["check-box"].name }
812
1459
  ],
813
1460
  Enum: [
814
- { key: c["combo-list"].type, value: c["combo-list"].name },
815
- { key: c["radio-group"].type, value: c["radio-group"].name }
1461
+ { key: f["combo-list"].type, value: f["combo-list"].name },
1462
+ { key: f["radio-group"].type, value: f["radio-group"].name }
816
1463
  ],
817
1464
  Object: [
818
- { key: c.lookup.type, value: c.lookup.name },
819
- { key: c["combo-list"].type, value: c["combo-list"].name },
820
- { key: c["radio-group"].type, value: c["radio-group"].name }
1465
+ { key: f.lookup.type, value: f.lookup.name },
1466
+ { key: f["combo-list"].type, value: f["combo-list"].name },
1467
+ { key: f["radio-group"].type, value: f["radio-group"].name }
821
1468
  ]
822
1469
  });
823
- let I = k;
824
- const Se = g(0);
825
- class xe extends Ce {
826
- constructor(t, n) {
827
- super(t, n);
1470
+ let L = I;
1471
+ const ot = g(0);
1472
+ class it extends nt {
1473
+ constructor(n, o) {
1474
+ super(n, o);
1475
+ S(this, "responseLayoutEditorFunction");
1476
+ this.responseLayoutEditorFunction = ie(this.formSchemaUtils);
828
1477
  }
829
- getPropertyConfig(t, n) {
830
- return this.propertyConfig.categories.basic = this.getBasicProperties(t, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
1478
+ getPropertyConfig(n, o) {
1479
+ return this.propertyConfig.categories.basic = this.getBasicProperties(n, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, o), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
831
1480
  }
832
- getBasicProperties(t, n) {
833
- var y;
1481
+ getBasicProperties(n, o) {
1482
+ var d;
834
1483
  var i = this;
835
- this.setDesignViewModelField(t);
1484
+ this.setDesignViewModelField(n);
836
1485
  const l = this.formSchemaUtils.getFormMetadataBasicInfo(), u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
837
1486
  return {
838
1487
  description: "Basic Information",
@@ -845,8 +1494,8 @@ class xe extends Ce {
845
1494
  readonly: !0
846
1495
  },
847
1496
  type: {
848
- description: "组件类型",
849
- title: "控件类型",
1497
+ description: "编辑器类型",
1498
+ title: "编辑器类型",
850
1499
  type: "string",
851
1500
  refreshPanelAfterChanged: !0,
852
1501
  $converter: "/converter/change-editor.converter",
@@ -855,7 +1504,7 @@ class xe extends Ce {
855
1504
  textField: "value",
856
1505
  valueField: "key",
857
1506
  editable: !1,
858
- data: i.designViewModelField ? I.getEditorTypesByMDataType((y = i.designViewModelField.type) == null ? void 0 : y.name) : I.getAllInputTypes()
1507
+ data: i.designViewModelField ? L.getEditorTypesByMDataType((d = i.designViewModelField.type) == null ? void 0 : d.name) : L.getAllInputTypes()
859
1508
  }
860
1509
  },
861
1510
  label: {
@@ -871,7 +1520,7 @@ class xe extends Ce {
871
1520
  type: "field-selector",
872
1521
  bindingType: { enable: !1 },
873
1522
  editorParams: {
874
- propertyData: t,
1523
+ propertyData: n,
875
1524
  formBasicInfo: l
876
1525
  },
877
1526
  columns: [
@@ -884,18 +1533,23 @@ class xe extends Ce {
884
1533
  }
885
1534
  }
886
1535
  },
887
- setPropertyRelates(p, m) {
888
- if (p)
889
- switch (p && p.propertyID) {
1536
+ setPropertyRelates(c, r) {
1537
+ if (c)
1538
+ switch (c && c.propertyID) {
890
1539
  case "type": {
891
- i.changeControlType(t, p, n);
1540
+ i.changeControlType(n, c, o);
1541
+ break;
1542
+ }
1543
+ case "label": {
1544
+ c.needRefreshControlTree = !0;
892
1545
  break;
893
1546
  }
894
1547
  }
895
1548
  }
896
1549
  };
897
1550
  }
898
- getAppearanceProperties(t) {
1551
+ getAppearanceProperties(n, o) {
1552
+ var i = this;
899
1553
  return {
900
1554
  title: "样式",
901
1555
  description: "Appearance",
@@ -916,30 +1570,43 @@ class xe extends Ce {
916
1570
  description: "响应式列宽",
917
1571
  title: "响应式列宽",
918
1572
  type: "boolean",
919
- visible: !1,
1573
+ visible: !0,
1574
+ // 这个属性,标记当属性变更得时候触发重新更新属性
1575
+ refreshPanelAfterChanged: !0,
920
1576
  editor: {
921
- type: "response-layout-editor-setting"
922
- },
923
- $converter: "/converter/response-form-layout.converter"
1577
+ type: "response-layout-editor-setting",
1578
+ initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, i.componentId)
1579
+ }
924
1580
  }
1581
+ },
1582
+ setPropertyRelates(l, u) {
1583
+ if (l)
1584
+ switch (l && l.propertyID) {
1585
+ case "responseLayout":
1586
+ i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, i.componentId || n.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(n.id, o), delete n.responseLayout;
1587
+ break;
1588
+ case "class":
1589
+ i.updateUnifiedLayoutAfterControlChanged(l.propertyValue, n.id, this.componentId), i.updateElementByParentContainer(n.id, o);
1590
+ break;
1591
+ }
925
1592
  }
926
1593
  };
927
1594
  }
928
- getEditorProperties(t) {
929
- return this.getComponentConfig(t);
1595
+ getEditorProperties(n) {
1596
+ return this.getComponentConfig(n);
930
1597
  }
931
1598
  /**
932
1599
  * 卡片控件:切换控件类型后事件
933
1600
  * @param propertyData 控件DOM属性
934
1601
  * @param newControlType 新控件类型
935
1602
  */
936
- changeControlType(t, n, i) {
937
- var s, d, o, a;
938
- const l = n.propertyValue, u = i && i.parent && i.parent.schema;
1603
+ changeControlType(n, o, i) {
1604
+ var p, a, s, y;
1605
+ const l = o.propertyValue, u = i && i.parent && i.parent.schema;
939
1606
  if (!u)
940
1607
  return;
941
- const y = u.contents.findIndex((r) => r.id === t.id), p = u.contents[y];
942
- let m;
1608
+ const d = u.contents.findIndex((m) => m.id === n.id), c = u.contents[d];
1609
+ let r;
943
1610
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
944
1611
  editor: {
945
1612
  $type: l
@@ -947,30 +1614,30 @@ class xe extends Ce {
947
1614
  name: this.designViewModelField.name,
948
1615
  require: this.designViewModelField.require,
949
1616
  readonly: this.designViewModelField.readonly
950
- }, !1), m = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), m || (m = j("form-group") || {}, m.editor = j(l) || {}, delete m.editor.id, delete m.editor.binding, delete m.editor.appearance), Object.assign(m, {
951
- id: p.id,
952
- appearance: p.appearance,
953
- size: p.size,
954
- label: p.label,
955
- binding: p.binding,
956
- visible: p.visible
957
- }), Object.assign(m.editor, {
958
- isTextArea: m.isTextArea && p.isTextArea,
959
- placeholder: (s = p.editor) == null ? void 0 : s.placeholder,
960
- holdPlace: (d = p.editor) == null ? void 0 : d.holdPlace,
961
- readonly: (o = p.editor) == null ? void 0 : o.readonly,
962
- require: (a = p.editor) == null ? void 0 : a.require
963
- }), u.contents.splice(y, 1), u.contents.splice(y, 0, m), i.schema = Object.assign(p, m), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
964
- (r) => r.classList.remove("dgComponentSelected")
965
- ), Se.value++;
1617
+ }, !1), r = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), r || (r = R("form-group") || {}, r.editor = R(l) || {}, delete r.editor.id, delete r.editor.binding, delete r.editor.appearance), Object.assign(r, {
1618
+ id: c.id,
1619
+ appearance: c.appearance,
1620
+ size: c.size,
1621
+ label: c.label,
1622
+ binding: c.binding,
1623
+ visible: c.visible
1624
+ }), Object.assign(r.editor, {
1625
+ isTextArea: r.isTextArea && c.isTextArea,
1626
+ placeholder: (p = c.editor) == null ? void 0 : p.placeholder,
1627
+ holdPlace: (a = c.editor) == null ? void 0 : a.holdPlace,
1628
+ readonly: (s = c.editor) == null ? void 0 : s.readonly,
1629
+ require: (y = c.editor) == null ? void 0 : y.require
1630
+ }), u.contents.splice(d, 1), u.contents.splice(d, 0, r), i.schema = Object.assign(c, r), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1631
+ (m) => m.classList.remove("dgComponentSelected")
1632
+ ), ot.value++;
966
1633
  }
967
- getComponentConfig(t, n = {}, i = {}) {
1634
+ getComponentConfig(n, o = {}, i = {}) {
968
1635
  const l = Object.assign({
969
- description: "组件信息",
970
- title: "组件信息",
1636
+ description: "编辑器",
1637
+ title: "编辑器",
971
1638
  type: "input-group",
972
1639
  $converter: "/converter/property-editor.converter"
973
- }, n), u = Object.assign({
1640
+ }, o), u = Object.assign({
974
1641
  readonly: {
975
1642
  description: "",
976
1643
  title: "只读",
@@ -994,8 +1661,56 @@ class xe extends Ce {
994
1661
  }, i);
995
1662
  return { ...l, properties: { ...u } };
996
1663
  }
1664
+ /**
1665
+ * 修改某一输入控件的样式后更新Form的统一布局配置
1666
+ * @param controlClass 控件样式
1667
+ * @param controlId 控件Id
1668
+ * @param componentId 控件所在组件id
1669
+ */
1670
+ updateUnifiedLayoutAfterControlChanged(n, o, i) {
1671
+ const l = n.split(" ");
1672
+ let u = l.find((a) => /^col-([1-9]|10|11|12)$/.test(a)), d = l.find((a) => /^col-md-([1-9]|10|11|12)$/.test(a)), c = l.find((a) => /^col-xl-([1-9]|10|11|12)$/.test(a)), r = l.find((a) => /^col-el-([1-9]|10|11|12)$/.test(a));
1673
+ u = u || "col-12", d = d || "col-md-" + u.replace("col-", ""), c = c || "col-xl-" + d.replace("col-md-", ""), r = r || "col-el-" + c.replace("col-xl-", "");
1674
+ const p = {
1675
+ id: o,
1676
+ columnInSM: parseInt(u.replace("col-", ""), 10),
1677
+ columnInMD: parseInt(d.replace("col-md-", ""), 10),
1678
+ columnInLG: parseInt(c.replace("col-xl-", ""), 10),
1679
+ columnInEL: parseInt(r.replace("col-el-", ""), 10)
1680
+ };
1681
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(i, p);
1682
+ }
1683
+ /**
1684
+ * 修改控件布局配置后更新Form统一布局配置
1685
+ * @param componentId 组件Id
1686
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
1687
+ */
1688
+ updateUnifiedLayoutAfterResponseLayoutChanged(n, o) {
1689
+ const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
1690
+ if (!i || !i.unifiedLayout)
1691
+ return;
1692
+ const l = [];
1693
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, l, 1), o) {
1694
+ const m = l.find((b) => b.id === o.id);
1695
+ Object.assign(m || {}, o);
1696
+ }
1697
+ const u = l.map((m) => m.columnInSM), d = l.map((m) => m.columnInMD), c = l.map((m) => m.columnInLG), r = l.map((m) => m.columnInEL), p = this.checkIsUniqueColumn(u) ? u[0] : null, a = this.checkIsUniqueColumn(d) ? d[0] : null, s = this.checkIsUniqueColumn(c) ? c[0] : null, y = this.checkIsUniqueColumn(r) ? r[0] : null;
1698
+ Object.assign(i.unifiedLayout, {
1699
+ uniqueColClassInSM: p,
1700
+ uniqueColClassInMD: a,
1701
+ uniqueColClassInLG: s,
1702
+ uniqueColClassInEL: y
1703
+ });
1704
+ }
1705
+ /**
1706
+ * 校验宽度样式值是否一致
1707
+ */
1708
+ checkIsUniqueColumn(n) {
1709
+ const o = new Set(n);
1710
+ return Array.from(o).length === 1;
1711
+ }
997
1712
  }
998
- class Fe extends xe {
1713
+ class at extends it {
999
1714
  constructor(t, n) {
1000
1715
  super(t, n);
1001
1716
  }
@@ -1019,75 +1734,68 @@ class Fe extends xe {
1019
1734
  });
1020
1735
  }
1021
1736
  }
1022
- function ke(e, t) {
1737
+ function lt(e, t) {
1023
1738
  const {
1024
1739
  canAccepts: n,
1025
- checkCanDeleteComponent: i,
1026
- checkCanMoveComponent: l,
1027
- hideNestedPaddingInDesginerView: u,
1028
- onAcceptMovedChildElement: y,
1029
- resolveComponentContext: p,
1030
- triggerBelongedComponentToMoveWhenMoved: m,
1031
- triggerBelongedComponentToDeleteWhenDeleted: s
1032
- } = ve(e), d = e.schema;
1033
- function o(a, r) {
1034
- return new Fe(a, t).getPropertyConfig(d, r);
1740
+ checkCanDeleteComponent: o,
1741
+ checkCanMoveComponent: i,
1742
+ hideNestedPaddingInDesginerView: l,
1743
+ onAcceptMovedChildElement: u,
1744
+ resolveComponentContext: d,
1745
+ triggerBelongedComponentToMoveWhenMoved: c,
1746
+ triggerBelongedComponentToDeleteWhenDeleted: r
1747
+ } = tt(e), p = e.schema;
1748
+ function a(s, y) {
1749
+ return new at(s, t).getPropertyConfig(p, y);
1035
1750
  }
1036
1751
  return {
1037
1752
  canAccepts: n,
1038
- checkCanDeleteComponent: i,
1039
- checkCanMoveComponent: l,
1040
- hideNestedPaddingInDesginerView: u,
1041
- onAcceptMovedChildElement: y,
1042
- resolveComponentContext: p,
1043
- triggerBelongedComponentToMoveWhenMoved: m,
1044
- triggerBelongedComponentToDeleteWhenDeleted: s,
1045
- getPropsConfig: o
1753
+ checkCanDeleteComponent: o,
1754
+ checkCanMoveComponent: i,
1755
+ hideNestedPaddingInDesginerView: l,
1756
+ onAcceptMovedChildElement: u,
1757
+ resolveComponentContext: d,
1758
+ triggerBelongedComponentToMoveWhenMoved: c,
1759
+ triggerBelongedComponentToDeleteWhenDeleted: r,
1760
+ getPropsConfig: a
1046
1761
  };
1047
1762
  }
1048
- const we = /* @__PURE__ */ O({
1763
+ const rt = /* @__PURE__ */ O({
1049
1764
  name: "FComboListDesign",
1050
- props: D,
1765
+ props: V,
1051
1766
  emits: ["clear", "update:modelValue", "change"],
1052
1767
  setup(e, t) {
1053
- const n = g(), i = E("designer-host-service"), l = E("design-item-context"), u = ke(l, i), y = J(n, l, u);
1054
- return G(() => {
1055
- n.value.componentInstance = y;
1056
- }), t.expose(y.value), () => M(A, {
1768
+ const n = g(), o = E("designer-host-service"), i = E("design-item-context"), l = lt(i, o), u = U(n, i, l);
1769
+ return D(() => {
1770
+ n.value.componentInstance = u;
1771
+ }), t.expose(u.value), () => k(et, {
1057
1772
  ref: n,
1058
- id: e.id,
1059
- disable: e.disabled,
1060
- readonly: e.readonly,
1061
- forcePlaceholder: e.forcePlaceholder,
1062
- editable: !1,
1063
1773
  buttonContent: e.dropDownIcon,
1774
+ readonly: !0,
1775
+ editable: !1,
1776
+ forcePlaceholder: !0,
1064
1777
  placeholder: e.placeholder,
1065
- enableClear: !1,
1066
- maxLength: e.maxLength,
1067
- tabIndex: e.tabIndex,
1068
- enableTitle: e.enableTitle,
1069
- multiSelect: e.multiSelect,
1070
- inputType: e.multiSelect ? "tag" : "text"
1778
+ enableClear: !0
1071
1779
  }, null);
1072
1780
  }
1073
- }), Me = (e) => {
1781
+ }), st = (e) => {
1074
1782
  const t = e;
1075
1783
  return t.install = function(n) {
1076
1784
  n.component(t.name, e);
1077
1785
  }, e;
1078
1786
  };
1079
- V.register = (e, t, n, i) => {
1080
- e["combo-list"] = V, t["combo-list"] = R;
1787
+ P.register = (e, t, n, o) => {
1788
+ e["combo-list"] = P, t["combo-list"] = H;
1081
1789
  };
1082
- V.registerDesigner = (e, t, n) => {
1083
- e["combo-list"] = we, t["combo-list"] = R;
1790
+ P.registerDesigner = (e, t, n) => {
1791
+ e["combo-list"] = rt, t["combo-list"] = H;
1084
1792
  };
1085
- const Ee = Me(V);
1793
+ const bt = st(P);
1086
1794
  export {
1087
- V as FComboList,
1088
- fe as Placement,
1089
- ye as ViewType,
1090
- D as comboListProps,
1091
- Ee as default,
1092
- R as propsResolver
1795
+ P as FComboList,
1796
+ we as Placement,
1797
+ xe as ViewType,
1798
+ V as comboListProps,
1799
+ bt as default,
1800
+ H as propsResolver
1093
1801
  };