@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,106 +1,109 @@
1
- var Se = Object.defineProperty;
2
- var ke = (e, t, n) => t in e ? Se(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var L = (e, t, n) => ke(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { ref as C, computed as B, createVNode as v, Fragment as Q, watch as N, withModifiers as Fe, withDirectives as Te, vModelText as Me, defineComponent as H, inject as X, onMounted as ce, nextTick as je } from "vue";
5
- import { cloneDeep as Ve } from "lodash-es";
6
- import { useIdentify as De, useHierarchy as Oe, useGroupData as Ie, usePagination as Pe, useDataView as Be, useSelection as Ae, useEdit as $e, useVisualDataBound as xe, useVisualDataCell as Le, useVisualDataRow as Ee, useVisualGroupRow as Ne, useVisualSummaryRow as He, useVisualData as Re } from "../data-view/index.esm.js";
7
- import { FCheckBox as Y } from "../checkbox/index.esm.js";
8
- import Ue from "../list-view/index.esm.js";
9
- import ue from "../button-edit/index.esm.js";
10
- import { getSchemaByType as re } from "../dynamic-resolver/index.esm.js";
11
- import { useDesignerComponent as Ge } from "../designer-canvas/index.esm.js";
12
- const de = {}, pe = {};
13
- function Z(e) {
14
- const { properties: t, title: n } = e, o = Object.keys(t).reduce((c, l) => (c[l] = t[l].type === "object" && t[l].properties ? Z(t[l]) : Ve(t[l].default), c), {});
15
- return o.id = `${n}-${Date.now()}`, o;
1
+ var Te = Object.defineProperty;
2
+ var Oe = (e, t, n) => t in e ? Te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var x = (e, t, n) => Oe(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { ref as v, computed as V, createVNode as h, Fragment as K, watch as N, withModifiers as Pe, withDirectives as Ve, vModelText as Ae, defineComponent as R, Teleport as De, createApp as Le, onUnmounted as Ee, inject as q, nextTick as Z, onMounted as ee, mergeProps as $e } from "vue";
5
+ import { isPlainObject as se, cloneDeep as fe } from "lodash-es";
6
+ import { useIdentify as xe, useHierarchy as Re, useGroupData as Ne, usePagination as Ue, useDataView as qe, useSelection as He, useEdit as Ge, useVisualDataBound as We, useVisualDataCell as _e, useVisualDataRow as ze, useVisualGroupRow as Xe, useVisualSummaryRow as Je, useVisualData as Qe } from "../data-view/index.esm.js";
7
+ import { FCheckBox as te } from "../checkbox/index.esm.js";
8
+ import Ye from "../list-view/index.esm.js";
9
+ import Ze from "../button-edit/index.esm.js";
10
+ import { resolveAppearance as Ke, getSchemaByType as ce } from "../dynamic-resolver/index.esm.js";
11
+ import { useDesignerComponent as me } from "../designer-canvas/index.esm.js";
12
+ import { useResponseLayoutEditorSetting as ye } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
13
+ import { BaseControlProperty as et } from "../property-panel/index.esm.js/src/composition/entity/base-property";
14
+ import { DgControl as tt } from "../designer-canvas/index.esm.js/src/composition/dg-control";
15
+ const ge = {}, he = {};
16
+ function ne(e) {
17
+ const { properties: t, title: n, ignore: o } = e, a = o && Array.isArray(o), r = Object.keys(t).reduce((s, f) => ((!a || !o.find((c) => c == f)) && (s[f] = t[f].type === "object" && t[f].properties ? ne(t[f]) : fe(t[f].default)), s), {});
18
+ return (!a || !o.find((s) => s == "id")) && (r.id = `${n}-${Date.now()}`), r;
16
19
  }
17
- function U(e, t = {}) {
18
- const n = de[e];
19
- if (n) {
20
- let o = Z(n);
21
- const c = pe[e];
22
- return o = c ? c({ getSchemaByType: U }, o, t) : o, o;
20
+ function H(e, t = {}, n) {
21
+ const o = ge[e];
22
+ if (o) {
23
+ let a = ne(o);
24
+ const r = he[e];
25
+ return a = r ? r({ getSchemaByType: H }, a, t, n) : a, a;
23
26
  }
24
27
  return null;
25
28
  }
26
- function _e(e, t) {
27
- const n = Z(t);
28
- return Object.keys(e).reduce((o, c) => (o[c] && typeof o[c] == "object" ? Object.assign(o[c], e[c]) : o[c] = e[c], o), n), n;
29
+ function nt(e, t) {
30
+ const n = ne(t);
31
+ return Object.keys(e).reduce((o, a) => (o[a] && se(o[a]) && se(e[a]) ? Object.assign(o[a], e[a]) : o[a] = e[a], o), n), n;
29
32
  }
30
- function qe(e, t) {
31
- return Object.keys(e).filter((o) => e[o] != null).reduce((o, c) => {
32
- if (t.has(c)) {
33
- const l = t.get(c);
34
- if (typeof l == "string")
35
- o[l] = e[c];
33
+ function ot(e, t) {
34
+ return Object.keys(e).filter((o) => e[o] != null).reduce((o, a) => {
35
+ if (t.has(a)) {
36
+ const r = t.get(a);
37
+ if (typeof r == "string")
38
+ o[r] = e[a];
36
39
  else {
37
- const u = l(c, e[c], e);
38
- Object.assign(o, u);
40
+ const s = r(a, e[a], e);
41
+ Object.assign(o, s);
39
42
  }
40
43
  } else
41
- o[c] = e[c];
44
+ o[a] = e[a];
42
45
  return o;
43
46
  }, {});
44
47
  }
45
- function We(e, t, n = /* @__PURE__ */ new Map()) {
46
- const o = _e(e, t);
47
- return qe(o, n);
48
+ function at(e, t, n = /* @__PURE__ */ new Map()) {
49
+ const o = nt(e, t);
50
+ return ot(o, n);
48
51
  }
49
- function ze(e = {}) {
50
- function t(y, h, i, r) {
52
+ function rt(e = {}) {
53
+ function t(l, g, i, d) {
51
54
  if (typeof i == "number")
52
- return r[y].length === i;
55
+ return d[l].length === i;
53
56
  if (typeof i == "object") {
54
- const g = Object.keys(i)[0], a = i[g];
55
- if (g === "not")
56
- return Number(r[y].length) !== Number(a);
57
- if (g === "moreThan")
58
- return Number(r[y].length) >= Number(a);
59
- if (g === "lessThan")
60
- return Number(r[y].length) <= Number(a);
57
+ const C = Object.keys(i)[0], u = i[C];
58
+ if (C === "not")
59
+ return Number(d[l].length) !== Number(u);
60
+ if (C === "moreThan")
61
+ return Number(d[l].length) >= Number(u);
62
+ if (C === "lessThan")
63
+ return Number(d[l].length) <= Number(u);
61
64
  }
62
65
  return !1;
63
66
  }
64
- function n(y, h, i, r) {
65
- return r[y] && r[y].propertyValue && String(r[y].propertyValue.value) === String(i);
67
+ function n(l, g, i, d) {
68
+ return d[l] && d[l].propertyValue && String(d[l].propertyValue.value) === String(i);
66
69
  }
67
70
  const o = /* @__PURE__ */ new Map([
68
71
  ["length", t],
69
72
  ["getProperty", n]
70
73
  ]);
71
- Object.keys(e).reduce((y, h) => (y.set(h, e[h]), y), o);
72
- function c(y, h) {
73
- const i = y;
74
- return typeof h == "number" ? [{ target: i, operator: "length", param: null, value: Number(h) }] : typeof h == "boolean" ? [{ target: i, operator: "getProperty", param: y, value: !!h }] : typeof h == "object" ? Object.keys(h).map((r) => {
75
- if (r === "length")
76
- return { target: i, operator: "length", param: null, value: h[r] };
77
- const g = r, a = h[r];
78
- return { target: i, operator: "getProperty", param: g, value: a };
74
+ Object.keys(e).reduce((l, g) => (l.set(g, e[g]), l), o);
75
+ function a(l, g) {
76
+ const i = l;
77
+ return typeof g == "number" ? [{ target: i, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: i, operator: "getProperty", param: l, value: !!g }] : typeof g == "object" ? Object.keys(g).map((d) => {
78
+ if (d === "length")
79
+ return { target: i, operator: "length", param: null, value: g[d] };
80
+ const C = d, u = g[d];
81
+ return { target: i, operator: "getProperty", param: C, value: u };
79
82
  }) : [];
80
83
  }
81
- function l(y) {
82
- return Object.keys(y).reduce((i, r) => {
83
- const g = c(r, y[r]);
84
- return i.push(...g), i;
84
+ function r(l) {
85
+ return Object.keys(l).reduce((i, d) => {
86
+ const C = a(d, l[d]);
87
+ return i.push(...C), i;
85
88
  }, []);
86
89
  }
87
- function u(y, h) {
88
- if (o.has(y.operator)) {
89
- const i = o.get(y.operator);
90
- return i && i(y.target, y.param, y.value, h) || !1;
90
+ function s(l, g) {
91
+ if (o.has(l.operator)) {
92
+ const i = o.get(l.operator);
93
+ return i && i(l.target, l.param, l.value, g) || !1;
91
94
  }
92
95
  return !1;
93
96
  }
94
- function f(y, h) {
95
- return l(y).reduce((g, a) => g && u(a, h), !0);
97
+ function f(l, g) {
98
+ return r(l).reduce((C, u) => C && s(u, g), !0);
96
99
  }
97
- function b(y, h) {
98
- const i = Object.keys(y), r = i.includes("allOf"), g = i.includes("anyOf"), a = r || g, d = (a ? y[a ? r ? "allOf" : "anyOf" : "allOf"] : [y]).map((F) => f(F, h));
99
- return r ? !d.includes(!1) : d.includes(!0);
100
+ function c(l, g) {
101
+ const i = Object.keys(l), d = i.includes("allOf"), C = i.includes("anyOf"), u = d || C, y = (u ? l[u ? d ? "allOf" : "anyOf" : "allOf"] : [l]).map((k) => f(k, g));
102
+ return d ? !y.includes(!1) : y.includes(!0);
100
103
  }
101
- return { parseValueSchema: b };
104
+ return { parseValueSchema: c };
102
105
  }
103
- const j = {
106
+ const B = {
104
107
  button: { type: "button", name: "按钮", icon: "Button" },
105
108
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
106
109
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -137,21 +140,22 @@ const j = {
137
140
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
138
141
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
139
142
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
140
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
141
- }, Je = {}, Xe = {};
142
- ze();
143
- function K(e, t, n = /* @__PURE__ */ new Map(), o = (u, f, b) => f, c = {}, l = (u) => u) {
144
- return de[t.title] = t, pe[t.title] = o, Je[t.title] = c, Xe[t.title] = l, (u = {}) => {
145
- const f = We(u, t, n), b = Object.keys(e).reduce((y, h) => (y[h] = e[h].default, y), {});
146
- return Object.assign(b, f);
143
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
144
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
145
+ }, it = {}, lt = {};
146
+ rt();
147
+ function z(e, t, n = /* @__PURE__ */ new Map(), o = (s, f, c) => f, a = {}, r = (s) => s) {
148
+ return ge[t.title] = t, he[t.title] = o, it[t.title] = a, lt[t.title] = r, (s = {}) => {
149
+ const f = at(s, t, n), c = Object.keys(e).reduce((l, g) => (l[g] = e[g].default, l), {});
150
+ return Object.assign(c, f);
147
151
  };
148
152
  }
149
- function ee(e, t) {
153
+ function oe(e, t) {
150
154
  return { customClass: t.class, customStyle: t.style };
151
155
  }
152
- const Qe = /* @__PURE__ */ new Map([
153
- ["appearance", ee]
154
- ]), Ye = "https://json-schema.org/draft/2020-12/schema", Ze = "https://farris-design.gitee.io/order.schema.json", Ke = "order", et = "A Farris Component", tt = "object", nt = {
156
+ const st = /* @__PURE__ */ new Map([
157
+ ["appearance", oe]
158
+ ]), ct = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-design.gitee.io/order.schema.json", dt = "order", pt = "A Farris Component", ft = "object", mt = {
155
159
  id: {
156
160
  description: "The unique identifier for a order",
157
161
  type: "string"
@@ -243,22 +247,22 @@ const Qe = /* @__PURE__ */ new Map([
243
247
  type: "sting",
244
248
  default: ""
245
249
  }
246
- }, ot = [
250
+ }, yt = [
247
251
  "id",
248
252
  "type"
249
- ], at = {
250
- $schema: Ye,
251
- $id: Ze,
252
- title: Ke,
253
- description: et,
254
- type: tt,
255
- properties: nt,
256
- required: ot
253
+ ], gt = {
254
+ $schema: ct,
255
+ $id: ut,
256
+ title: dt,
257
+ description: pt,
258
+ type: ft,
259
+ properties: mt,
260
+ required: yt
257
261
  };
258
- function rt(e, t, n) {
262
+ function ht(e, t, n) {
259
263
  return t;
260
264
  }
261
- const it = "order", lt = "A Farris Component", st = "object", ct = {
265
+ const bt = "order", vt = "A Farris Component", Ct = "object", wt = {
262
266
  basic: {
263
267
  description: "Basic Infomation",
264
268
  title: "基本信息",
@@ -340,12 +344,12 @@ const it = "order", lt = "A Farris Component", st = "object", ct = {
340
344
  }
341
345
  }
342
346
  }
343
- }, ut = {
344
- title: it,
345
- description: lt,
346
- type: st,
347
- categories: ct
348
- }, te = {
347
+ }, St = {
348
+ title: bt,
349
+ description: vt,
350
+ type: Ct,
351
+ categories: wt
352
+ }, ae = {
349
353
  dataSource: {
350
354
  type: Array,
351
355
  default: [
@@ -364,13 +368,13 @@ const it = "order", lt = "A Farris Component", st = "object", ct = {
364
368
  { id: "3", name: "开票日期", order: "asc" }
365
369
  ]
366
370
  }
367
- }, ie = K(te, at, Qe, rt, ut), dt = /* @__PURE__ */ new Map([
368
- ["appearance", ee]
371
+ }, ue = z(ae, gt, st, ht, St), kt = /* @__PURE__ */ new Map([
372
+ ["appearance", oe]
369
373
  ]);
370
- function pt(e, t, n) {
374
+ function Ft(e, t, n) {
371
375
  return t;
372
376
  }
373
- const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-design.gitee.io/list-view.schema.json", yt = "list-view", gt = "A Farris Component", ht = "object", bt = {
377
+ const It = "https://json-schema.org/draft/2020-12/schema", Mt = "https://farris-design.gitee.io/list-view.schema.json", jt = "list-view", Bt = "A Farris Component", Tt = "object", Ot = {
374
378
  id: {
375
379
  description: "The unique identifier for list-view",
376
380
  type: "string"
@@ -432,18 +436,18 @@ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-
432
436
  type: "boolean",
433
437
  default: !0
434
438
  }
435
- }, vt = [
439
+ }, Pt = [
436
440
  "id",
437
441
  "type"
438
- ], Ct = {
439
- $schema: ft,
440
- $id: mt,
441
- title: yt,
442
- description: gt,
443
- type: ht,
444
- properties: bt,
445
- required: vt
446
- }, wt = "list-view", St = "A Farris Component", kt = "object", Ft = {
442
+ ], Vt = {
443
+ $schema: It,
444
+ $id: Mt,
445
+ title: jt,
446
+ description: Bt,
447
+ type: Tt,
448
+ properties: Ot,
449
+ required: Pt
450
+ }, At = "list-view", Dt = "A Farris Component", Lt = "object", Et = {
447
451
  basic: {
448
452
  description: "Basic Infomation",
449
453
  title: "基本信息",
@@ -465,12 +469,12 @@ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-
465
469
  }
466
470
  }
467
471
  }
468
- }, Tt = {
469
- title: wt,
470
- description: St,
471
- type: kt,
472
- categories: Ft
473
- }, fe = {
472
+ }, $t = {
473
+ title: At,
474
+ description: Dt,
475
+ type: Lt,
476
+ categories: Et
477
+ }, be = {
474
478
  /** 列集合 */
475
479
  columns: {
476
480
  type: Array,
@@ -512,372 +516,383 @@ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-
512
516
  // 搜索启用高亮
513
517
  enableHighlightSearch: { type: Boolean, default: !0 }
514
518
  };
515
- K(fe, Ct, dt, pt, Tt);
516
- function Mt(e, t) {
517
- function n(l) {
518
- const u = [];
519
- let f = l.nextNode();
519
+ z(be, Vt, kt, Ft, $t);
520
+ function xt(e, t) {
521
+ function n(r) {
522
+ const s = [];
523
+ let f = r.nextNode();
520
524
  for (; f; )
521
- u.push(f), f = l.nextNode();
522
- return u;
523
- }
524
- function o(l, u) {
525
- const f = document.createTreeWalker(l, NodeFilter.SHOW_TEXT);
526
- return n(f).map((i) => ({ textNode: i, text: (i.textContent || "").toLocaleLowerCase() })).map(({ textNode: i, text: r }) => {
527
- const g = [];
528
- let a = 0;
529
- for (; a < r.length; ) {
530
- const m = r.indexOf(u, a);
525
+ s.push(f), f = r.nextNode();
526
+ return s;
527
+ }
528
+ function o(r, s) {
529
+ const f = document.createTreeWalker(r, NodeFilter.SHOW_TEXT);
530
+ return n(f).map((i) => ({ textNode: i, text: (i.textContent || "").toLocaleLowerCase() })).map(({ textNode: i, text: d }) => {
531
+ const C = [];
532
+ let u = 0;
533
+ for (; u < d.length; ) {
534
+ const m = d.indexOf(s, u);
531
535
  if (m === -1)
532
536
  break;
533
- g.push(m), a = m + u.length;
537
+ C.push(m), u = m + s.length;
534
538
  }
535
- return g.map((m) => {
536
- const s = new Range();
537
- return s.setStart(i, m), s.setEnd(i, m + u.length), s;
539
+ return C.map((m) => {
540
+ const p = new Range();
541
+ return p.setStart(i, m), p.setEnd(i, m + s.length), p;
538
542
  });
539
543
  }).flat();
540
544
  }
541
- function c(l) {
542
- if (!CSS.highlights || (CSS.highlights.clear(), !l || !t))
545
+ function a(r) {
546
+ if (!CSS.highlights || (CSS.highlights.clear(), !r || !t))
543
547
  return;
544
- const u = o(t.value, l.toLocaleLowerCase()), f = new Highlight(...u);
548
+ const s = o(t.value, r.toLocaleLowerCase()), f = new Highlight(...s);
545
549
  CSS.highlights.set("search-result", f);
546
550
  }
547
- return { search: c };
551
+ return { search: a };
548
552
  }
549
- function le(e, t, n, o, c, l, u, f, b, y) {
550
- const h = C(e.size), i = C(e.textField), r = C(e.titleField), g = C(e.multiSelect), a = C(e.disableField), {
553
+ function de(e, t, n, o, a, r, s, f, c, l) {
554
+ const g = v(e.size), i = v(e.textField), d = v(e.titleField), C = v(e.disableField), u = V(() => {
555
+ var F, I;
556
+ return ((F = e.selection) == null ? void 0 : F.multiSelect) && ((I = e.selection) == null ? void 0 : I.showCheckbox);
557
+ }), {
551
558
  onMouseenterItem: m,
552
- onMouseoverItem: s,
553
- onMouseoutItem: d
554
- } = l, {
555
- getKey: k,
556
- listViewItemClass: F,
557
- onCheckItem: D,
558
- onClickItem: S
559
- } = u, w = B(() => ({
560
- margin: h.value === "small" ? "0.25rem 0" : "10px 0"
559
+ onMouseoverItem: p,
560
+ onMouseoutItem: y
561
+ } = r, {
562
+ getKey: S,
563
+ listViewItemClass: k,
564
+ onCheckItem: j,
565
+ onClickItem: w
566
+ } = s, b = V(() => ({
567
+ margin: g.value === "small" ? "0.25rem 0" : "10px 0"
561
568
  }));
562
- function V(p, M, A) {
563
- return p.checked = f.findIndexInSelectedItems(p) > -1, v("li", {
564
- class: F(p, M),
565
- id: k(p, M),
566
- key: k(p, M),
567
- onClick: (T) => S(T, p, M),
568
- onMouseenter: (T) => m(T, p, M),
569
- onMouseover: (T) => s(T, p, M),
570
- onMouseout: (T) => d(T, p, M)
571
- }, [g.value && v("div", {
569
+ function T(F, I, O) {
570
+ return F.checked = f.findIndexInSelectedItems(F) > -1, h("li", {
571
+ class: k(F, I),
572
+ id: S(F, I),
573
+ key: S(F, I),
574
+ onClick: (M) => w(M, F, I),
575
+ onMouseenter: (M) => m(M, F, I),
576
+ onMouseover: (M) => p(M, F, I),
577
+ onMouseout: (M) => y(M, F, I)
578
+ }, [u.value && h("div", {
572
579
  class: "f-list-select",
573
- onClick: (T) => T.stopPropagation()
574
- }, [v(Y, {
575
- id: "list-" + k(p, M),
580
+ onClick: (M) => M.stopPropagation()
581
+ }, [h(te, {
582
+ id: "list-" + S(F, I),
576
583
  customClass: "listview-checkbox",
577
- disabled: p[a.value],
578
- checked: p.checked,
579
- "onUpdate:checked": (T) => p.checked = T,
580
- onChange: (T) => {
581
- D(p, M, !T.checked);
584
+ disabled: F[C.value],
585
+ checked: F.checked,
586
+ "onUpdate:checked": (M) => F.checked = M,
587
+ onChange: (M) => {
588
+ j(F, I, !M.checked);
582
589
  }
583
- }, null)]), v("div", {
590
+ }, null)]), h("div", {
584
591
  class: "f-list-content"
585
- }, [v("div", {
586
- style: w.value,
587
- title: p.raw[r.value] || p.raw[i.value]
588
- }, [p.raw[i.value]])])]);
592
+ }, [h("div", {
593
+ style: b.value,
594
+ title: F.raw[d.value] || F.raw[i.value]
595
+ }, [F.raw[i.value]])])]);
589
596
  }
590
597
  return {
591
- renderItem: V
598
+ renderItem: T
592
599
  };
593
600
  }
594
- function jt(e, t, n, o, c, l, u, f, b, y) {
595
- const h = C(e.multiSelect), i = C(e.disableField), {
596
- onMouseenterItem: r,
597
- onMouseoverItem: g,
598
- onMouseoutItem: a
599
- } = l, {
601
+ function Rt(e, t, n, o, a, r, s, f, c, l) {
602
+ const g = v(e.multiSelect), i = v(e.disableField), {
603
+ onMouseenterItem: d,
604
+ onMouseoverItem: C,
605
+ onMouseoutItem: u
606
+ } = r, {
600
607
  getKey: m,
601
- listViewItemClass: s,
602
- onCheckItem: d,
603
- onClickItem: k
604
- } = u;
605
- function F(S, w, V) {
606
- return t.slots.content ? v(Q, null, [t.slots.content && t.slots.content({
607
- item: S.raw,
608
- index: w,
609
- selectedItem: V
610
- })]) : v("div", {
608
+ listViewItemClass: p,
609
+ onCheckItem: y,
610
+ onClickItem: S
611
+ } = s;
612
+ function k(w, b, T) {
613
+ return t.slots.content ? h(K, null, [t.slots.content && t.slots.content({
614
+ item: w.raw,
615
+ index: b,
616
+ selectedItem: T
617
+ })]) : h("div", {
611
618
  style: "margin: 10px 0;"
612
- }, [S.raw.name]);
613
- }
614
- function D(S, w, V) {
615
- return v("li", {
616
- class: s(S, w),
617
- id: m(S, w),
618
- key: m(S, w),
619
- onClick: (p) => k(p, S, w),
620
- onMouseenter: (p) => r(p, S, w),
621
- onMouseover: (p) => g(p, S, w),
622
- onMouseout: (p) => a(p, S, w)
623
- }, [h.value && v("div", {
619
+ }, [w.raw.name]);
620
+ }
621
+ function j(w, b, T) {
622
+ return h("li", {
623
+ class: p(w, b),
624
+ id: m(w, b),
625
+ key: m(w, b),
626
+ onClick: (F) => S(F, w, b),
627
+ onMouseenter: (F) => d(F, w, b),
628
+ onMouseover: (F) => C(F, w, b),
629
+ onMouseout: (F) => u(F, w, b)
630
+ }, [g.value && h("div", {
624
631
  class: "f-list-select",
625
- onClick: (p) => p.stopPropagation()
626
- }, [v(Y, {
627
- id: "list-" + m(S, w),
632
+ onClick: (F) => F.stopPropagation()
633
+ }, [h(te, {
634
+ id: "list-" + m(w, b),
628
635
  customClass: "listview-checkbox",
629
- disabled: S[i.value] || !S.checked,
630
- checked: S.checked,
631
- "onUpdate:checked": (p) => S.checked = p,
632
- onChange: (p) => d(S, w, !p.checked)
633
- }, null)]), v("div", {
636
+ disabled: w[i.value] || !w.checked,
637
+ checked: w.checked,
638
+ "onUpdate:checked": (F) => w.checked = F,
639
+ onChange: (F) => y(w, b, !F.checked)
640
+ }, null)]), h("div", {
634
641
  class: "f-list-content"
635
- }, [F(S, w, V)])]);
642
+ }, [k(w, b, T)])]);
636
643
  }
637
644
  return {
638
- renderItem: D
645
+ renderItem: j
639
646
  };
640
647
  }
641
- function Vt(e, t, n, o, c, l, u, f, b, y) {
642
- const h = C(e.multiSelect), i = C(e.disableField), {
643
- onMouseenterItem: r,
644
- onMouseoverItem: g,
645
- onMouseoutItem: a
646
- } = l, {
648
+ function Nt(e, t, n, o, a, r, s, f, c, l) {
649
+ const g = v(e.multiSelect), i = v(e.disableField), {
650
+ onMouseenterItem: d,
651
+ onMouseoverItem: C,
652
+ onMouseoutItem: u
653
+ } = r, {
647
654
  getKey: m,
648
- listViewItemClass: s,
649
- onCheckItem: d,
650
- onClickItem: k
651
- } = u, {
652
- dragstart: F,
653
- dragenter: D,
654
- dragover: S,
655
- dragend: w
655
+ listViewItemClass: p,
656
+ onCheckItem: y,
657
+ onClickItem: S
658
+ } = s, {
659
+ dragstart: k,
660
+ dragenter: j,
661
+ dragover: w,
662
+ dragend: b
656
663
  } = o, {
657
- removeItem: V
658
- } = b, p = B(() => ({
659
- margin: h.value ? "10px 0" : "10px 0px 10px 14px"
664
+ removeItem: T
665
+ } = c, F = V(() => ({
666
+ margin: g.value ? "10px 0" : "10px 0px 10px 14px"
660
667
  }));
661
- function M(O) {
662
- return v("div", {
663
- style: p.value
664
- }, [O.raw.name]);
665
- }
666
- function A() {
667
- return t.slots.itemContent ? t.slots.itemContent : M;
668
- }
669
- const T = A();
670
- function $(O, P, E) {
671
- return v("li", {
672
- class: s(O, P),
673
- id: m(O, P),
674
- key: m(O, P),
675
- onClick: (I) => k(I, O, P),
676
- onMouseenter: (I) => r(I, O, P),
677
- onMouseover: (I) => g(I, O, P),
678
- onMouseout: (I) => a(I, O, P),
668
+ function I(P) {
669
+ return h("div", {
670
+ style: F.value
671
+ }, [P.raw.name]);
672
+ }
673
+ function O() {
674
+ return t.slots.itemContent ? t.slots.itemContent : I;
675
+ }
676
+ const M = O();
677
+ function D(P, L, E) {
678
+ return h("li", {
679
+ class: p(P, L),
680
+ id: m(P, L),
681
+ key: m(P, L),
682
+ onClick: (A) => S(A, P, L),
683
+ onMouseenter: (A) => d(A, P, L),
684
+ onMouseover: (A) => C(A, P, L),
685
+ onMouseout: (A) => u(A, P, L),
679
686
  draggable: "true",
680
- onDragstart: (I) => F(I, O, P),
681
- onDragenter: (I) => D(I, P),
682
- onDragend: (I) => w(I, O),
683
- onDragover: (I) => S(I, P)
684
- }, [h.value && v("div", {
687
+ onDragstart: (A) => k(A, P, L),
688
+ onDragenter: (A) => j(A, L),
689
+ onDragend: (A) => b(A, P),
690
+ onDragover: (A) => w(A, L)
691
+ }, [g.value && h("div", {
685
692
  class: "f-list-select",
686
- onClick: (I) => I.stopPropagation()
687
- }, [v(Y, {
688
- id: "list-" + m(O, P),
693
+ onClick: (A) => A.stopPropagation()
694
+ }, [h(te, {
695
+ id: "list-" + m(P, L),
689
696
  customClass: "listview-checkbox",
690
- disabled: O[i.value] || !O.checked,
691
- checked: O.checked,
692
- "onUpdate:checked": (I) => O.checked = I,
693
- onChange: (I) => d(O, P, !I.checked)
694
- }, null)]), v("div", {
697
+ disabled: P[i.value] || !P.checked,
698
+ checked: P.checked,
699
+ "onUpdate:checked": (A) => P.checked = A,
700
+ onChange: (A) => y(P, L, !A.checked)
701
+ }, null)]), h("div", {
695
702
  class: "f-list-content"
696
- }, [T(O)]), v("div", {
703
+ }, [M(P)]), h("div", {
697
704
  class: "f-list-remove",
698
- onClick: (I) => V(P)
699
- }, [v("div", {
705
+ onClick: (A) => T(L)
706
+ }, [h("div", {
700
707
  class: "f-list-remove-icon"
701
- }, [v("i", {
708
+ }, [h("i", {
702
709
  class: "f-icon f-icon-remove_face"
703
- }, null)])]), v("div", {
710
+ }, null)])]), h("div", {
704
711
  class: "f-list-handle"
705
- }, [v("div", null, [v("i", {
712
+ }, [h("div", null, [h("i", {
706
713
  class: "f-icon f-icon-drag-vertical"
707
714
  }, null)])])]);
708
715
  }
709
716
  return {
710
- renderItem: $
717
+ renderItem: D
711
718
  };
712
719
  }
713
- function Dt(e, t, n, o, c, l, u, f, b, y) {
720
+ function Ut(e, t, n, o, a, r, s, f, c, l) {
714
721
  var m;
715
- const h = C(((m = e.group) == null ? void 0 : m.groupFields) || []), {
722
+ const g = v(((m = e.group) == null ? void 0 : m.groupFields) || []), {
716
723
  collpaseGroupIconClass: i
717
- } = c, {
718
- toggleGroupRow: r
719
- } = y;
720
- function g(s, d) {
721
- d.collapse = !d.collapse, n.value = r(d.collapse ? "collapse" : "expand", d, n.value);
722
- }
723
- function a(s, d, k) {
724
- return s.layer > -1 && v("div", {
724
+ } = a, {
725
+ toggleGroupRow: d
726
+ } = l;
727
+ function C(p, y) {
728
+ y.collapse = !y.collapse, n.value = d(y.collapse ? "collapse" : "expand", y, n.value);
729
+ }
730
+ function u(p, y, S) {
731
+ return p.layer > -1 && h("div", {
725
732
  class: "f-navlookup-recentHeader",
726
- onClick: (F) => g(F, s)
727
- }, [v("div", {
733
+ onClick: (k) => C(k, p)
734
+ }, [h("div", {
728
735
  class: "fv-grid-group-row-icon"
729
- }, [v("span", {
730
- class: i(s)
731
- }, null)]), v("div", {
736
+ }, [h("span", {
737
+ class: i(p)
738
+ }, null)]), h("div", {
732
739
  class: "f-navlookup-recommandLabel"
733
- }, [s.raw[h.value[s.layer]]])]);
740
+ }, [p.raw[g.value[p.layer]]])]);
734
741
  }
735
742
  return {
736
- renderItem: a
743
+ renderItem: u
737
744
  };
738
745
  }
739
- function Ot() {
740
- const e = C(-1), t = C(""), n = C(-1), o = C(!1);
741
- function c(y, h, i) {
746
+ function qt() {
747
+ const e = v(-1), t = v(""), n = v(-1), o = v(!1);
748
+ function a(l, g, i) {
742
749
  n.value = i;
743
750
  }
744
- function l(y, h, i) {
751
+ function r(l, g, i) {
745
752
  o.value || (n.value = i);
746
753
  }
747
- function u(y, h, i) {
754
+ function s(l, g, i) {
748
755
  n.value = -1;
749
756
  }
750
757
  function f() {
751
758
  o.value = !0;
752
759
  }
753
- function b() {
760
+ function c() {
754
761
  o.value = !1;
755
762
  }
756
763
  return {
757
764
  activeIndex: e,
758
765
  focusedItemId: t,
759
766
  hoverIndex: n,
760
- onMouseenterItem: c,
761
- onMouseoverItem: l,
762
- onMouseoutItem: u,
763
- resumeHover: b,
767
+ onMouseenterItem: a,
768
+ onMouseoverItem: r,
769
+ onMouseoutItem: s,
770
+ resumeHover: c,
764
771
  suspendHover: f
765
772
  };
766
773
  }
767
- function It(e, t, n, o) {
768
- const c = C(e.idField), { dataView: l } = n, u = C(-1), f = C(!1), { activeIndex: b, focusedItemId: y, hoverIndex: h, resumeHover: i, suspendHover: r } = o;
769
- function g(d, k, F) {
770
- d.stopPropagation(), r(), k && setTimeout(() => {
771
- u.value = F, f.value = !0, k.moving = !0;
774
+ function Ht(e, t, n, o) {
775
+ const a = v(e.idField), { dataView: r } = n, s = v(-1), f = v(!1), { activeIndex: c, focusedItemId: l, hoverIndex: g, resumeHover: i, suspendHover: d } = o;
776
+ function C(y, S, k) {
777
+ y.stopPropagation(), d(), S && setTimeout(() => {
778
+ s.value = k, f.value = !0, S.moving = !0;
772
779
  });
773
780
  }
774
- function a(d, k) {
775
- if (d.preventDefault(), u.value !== k) {
776
- const F = l.value[u.value], D = l.value;
777
- D.splice(u.value, 1), D.splice(k, 0, F), u.value = k;
781
+ function u(y, S) {
782
+ if (y.preventDefault(), s.value !== S) {
783
+ const k = r.value[s.value], j = r.value;
784
+ j.splice(s.value, 1), j.splice(S, 0, k), s.value = S;
778
785
  }
779
786
  }
780
- function m(d, k) {
781
- d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "move");
787
+ function m(y, S) {
788
+ y.preventDefault(), y.dataTransfer && (y.dataTransfer.dropEffect = "move");
782
789
  }
783
- function s(d, k) {
784
- k && (k.moving = !1), l.value.forEach((F, D) => {
785
- F.__fv_index__ = D;
786
- }), f.value = !1, i(), h.value = k.raw.__fv_index__, b.value = k.raw.__fv_index__, y.value = k.raw[c.value], t.emit("change", l.value), t.emit("activeChange", k);
790
+ function p(y, S) {
791
+ S && (S.moving = !1), r.value.forEach((k, j) => {
792
+ k.__fv_index__ = j;
793
+ }), f.value = !1, i(), g.value = S.raw.__fv_index__, c.value = S.raw.__fv_index__, l.value = S.raw[a.value], t.emit("change", r.value), t.emit("activeChange", S);
787
794
  }
788
795
  return {
789
- dragstart: g,
790
- dragenter: a,
796
+ dragstart: C,
797
+ dragenter: u,
791
798
  dragover: m,
792
- dragend: s,
799
+ dragend: p,
793
800
  isDragging: f
794
801
  };
795
802
  }
796
- function Pt(e, t, n) {
803
+ function Gt(e, t, n) {
797
804
  const { dataView: o } = n;
798
- function c(l) {
799
- if (l > -1 && l < o.value.length) {
800
- const u = o.value.splice(l, 1);
801
- t.emit("removeItem", u[0]);
805
+ function a(r) {
806
+ if (r > -1 && r < o.value.length) {
807
+ const s = o.value.splice(r, 1);
808
+ t.emit("removeItem", s[0]);
802
809
  }
803
810
  }
804
- return { removeItem: c };
811
+ return { removeItem: a };
805
812
  }
806
- function Bt(e, t, n, o, c, l) {
807
- const u = C(e.idField), f = C(e.disableField), b = C(e.draggable), y = C(e.itemClass), h = C(e.selection.multiSelect ?? !1), i = C(e.selection.multiSelectMode);
808
- C(!0);
809
- const { isDragging: r } = o, { activeIndex: g, focusedItemId: a, hoverIndex: m } = c, { clearSelection: s, getSelectedItems: d, toggleSelectItem: k } = l, F = C(d());
810
- function D(T, $) {
811
- const O = {
813
+ function Wt(e, t, n, o, a, r) {
814
+ const s = v(e.idField), f = v(e.disableField), c = v(e.draggable), l = v(e.itemClass), g = v(e.selection.multiSelect ?? !1), i = v(e.selection.multiSelectMode), { isDragging: d } = o, { activeIndex: C, focusedItemId: u, hoverIndex: m } = a, { clearSelection: p, getSelectedItems: y, toggleSelectItem: S } = r, k = v(y());
815
+ function j(M, D) {
816
+ const P = {
817
+ "f-listview-item": !0,
812
818
  "f-list-view-group-item": !0,
813
- "f-list-view-draggable-item": b.value,
814
- "f-un-click": !T.checked,
815
- "f-un-select": !!T.raw[f.value],
816
- "f-listview-active": T.raw.__fv_index__ === g.value,
817
- "f-listview-hover": !r.value && $ === m.value,
818
- moving: !!T.moving
819
+ "f-list-view-draggable-item": c.value,
820
+ "f-un-click": !M.checked,
821
+ "f-un-select": !!M.raw[f.value],
822
+ // 'f-listview-active': item.raw.__fv_index__ === activeIndex.value,
823
+ // 多选
824
+ "f-listview-active": k.value.findIndex(
825
+ (E) => E[s.value] === M.raw[s.value]
826
+ ) > -1,
827
+ "f-listview-item-active": k.value.findIndex(
828
+ (E) => E[s.value] === M.raw[s.value]
829
+ ) > -1,
830
+ "f-listview-hover": !d.value && D === m.value,
831
+ "f-listview-item-hover": !d.value && D === m.value,
832
+ moving: !!M.moving
819
833
  };
820
- return y.value.split(" ").reduce((E, I) => (E[I] = !0, E), O), O;
834
+ return l.value.split(" ").reduce((E, A) => (E[A] = !0, E), P), P;
821
835
  }
822
- function S(T, $) {
823
- return T.raw[u.value] || "";
836
+ function w(M, D) {
837
+ return M.raw[s.value] || "";
824
838
  }
825
- const w = B(() => !h.value);
826
- function V(T, $, O) {
827
- T.checked = O, !T.raw[f.value] && (w.value && (a.value = T.raw[u.value]), k(T));
839
+ const b = V(() => !g.value);
840
+ function T(M, D, P) {
841
+ M.checked = P, !M.raw[f.value] && (b.value && (u.value = M.raw[s.value]), S(M));
828
842
  }
829
- const p = B(() => h.value && i.value === "OnCheckClearByClick"), M = B(() => !h.value || h.value && (i.value === "OnCheckAndClick" || i.value === "OnClick"));
830
- function A(T, $, O) {
831
- if ($.raw[f.value]) {
832
- T.preventDefault(), T.stopPropagation();
843
+ const F = V(() => g.value && i.value === "OnCheckClearByClick"), I = V(() => !g.value || g.value && (i.value === "OnCheckAndClick" || i.value === "OnClick"));
844
+ function O(M, D, P) {
845
+ if (D.raw[f.value]) {
846
+ M.preventDefault(), M.stopPropagation();
833
847
  return;
834
848
  }
835
- a.value = $.raw[u.value], g.value = O, p.value && s(n.value), M.value && (k($), F.value = d()), t.emit("clickItem", { data: F.value, index: O }), t.emit("activeChange", F.value);
849
+ u.value = D.raw[s.value], C.value = P, F.value && p(n.value), I.value && (S(D), k.value = y()), t.emit("clickItem", { data: k.value, index: P }), t.emit("activeChange", k.value);
836
850
  }
837
851
  return {
838
- getKey: S,
839
- listViewItemClass: D,
840
- onCheckItem: V,
841
- onClickItem: A
852
+ getKey: w,
853
+ listViewItemClass: j,
854
+ onCheckItem: T,
855
+ onClickItem: O
842
856
  };
843
857
  }
844
- function At(e, t, n, o, c, l, u) {
845
- const f = C(e.view), b = C(e.view === "CardView"), y = C({}), h = C("暂无数据"), i = Ot(), r = It(e, t, o, i), g = Pt(e, t, o), a = Bt(e, t, n, r, i, l), m = B(() => ({
858
+ function _t(e, t, n, o, a, r, s) {
859
+ const f = v(e.view), c = v(e.view === "CardView"), l = v({}), g = v("暂无数据"), i = qt(), d = Ht(e, t, o, i), C = Gt(e, t, o), u = Wt(e, t, n, d, i, r), m = V(() => ({
846
860
  "f-list-view-group": !0,
847
- "d-flex": b.value,
848
- "flex-wrap": b.value
849
- })), s = B(() => !!n.value && n.value.length > 0), d = B(() => n.value.length === 0), k = B(() => d.value && !t.slots.empty);
850
- function F() {
851
- return f.value === "SingleView" ? le : f.value === "DraggableView" ? Vt : (f.value === "ContentView" || f.value === "CardView") && t.slots.content ? jt : le;
861
+ "d-flex": c.value,
862
+ "flex-wrap": c.value
863
+ })), p = V(() => !!n.value && n.value.length > 0), y = V(() => n.value.length === 0);
864
+ V(() => y.value && !t.slots.empty);
865
+ function S() {
866
+ return f.value === "SingleView" ? de : f.value === "DraggableView" ? Nt : (f.value === "ContentView" || f.value === "CardView") && t.slots.content ? Rt : de;
852
867
  }
853
- const D = F(), {
854
- renderItem: S
855
- } = D(e, t, n, r, c, i, a, l, g, u), {
868
+ const k = S(), {
869
+ renderItem: j
870
+ } = k(e, t, n, d, a, i, u, r, C, s), {
856
871
  renderItem: w
857
- } = Dt(e, t, n, r, c, i, a, l, g, u), V = [S, w];
858
- function p() {
859
- return n.value.filter((T) => T.visible !== !1).map((T, $) => V[T.type](T, $, y));
872
+ } = Ut(e, t, n, d, a, i, u, r, C, s), b = [j, w];
873
+ function T() {
874
+ return n.value.filter((O) => O.visible !== !1).map((O, M) => b[O.type](O, M, l));
860
875
  }
861
- function M() {
862
- return v("div", {
876
+ function F() {
877
+ return h("div", {
863
878
  class: "f-list-view-emptydata"
864
- }, [v("p", {
879
+ }, [h("p", {
865
880
  class: "f-empty-title"
866
- }, [h.value])]);
881
+ }, [t.slots.empty ? t.slots.empty() : g.value])]);
867
882
  }
868
- function A() {
869
- return v("ul", {
883
+ function I() {
884
+ return h("ul", {
870
885
  class: m.value,
871
886
  style: "list-style: none;"
872
- }, [s.value && p(), k.value && M(), t.slots.empty && t.slots.empty()]);
887
+ }, [p.value && T(), y.value && F()]);
873
888
  }
874
889
  return {
875
- renderListArea: A
890
+ renderListArea: I
876
891
  };
877
892
  }
878
- function $t(e, t, n) {
893
+ function zt(e, t, n) {
879
894
  function o() {
880
- return t.slots.header && v("div", {
895
+ return t.slots.header && h("div", {
881
896
  class: "f-list-view-header"
882
897
  }, [t.slots.header()]);
883
898
  }
@@ -885,52 +900,52 @@ function $t(e, t, n) {
885
900
  renderHeader: o
886
901
  };
887
902
  }
888
- function se(e, t, n) {
889
- const o = C(e.headerClass), c = C(e.placeholder), l = C(""), u = B(() => !l.value), f = B(() => !!l.value);
890
- function b(r) {
891
- l.value = "";
903
+ function pe(e, t, n) {
904
+ const o = v(e.headerClass), a = v(e.placeholder), r = v(""), s = V(() => !r.value), f = V(() => !!r.value);
905
+ function c(d) {
906
+ r.value = "";
892
907
  }
893
- N(l, (r) => {
894
- e.enableHighlightSearch && n.search(r), t.emit("afterSearch", r);
908
+ N(r, (d) => {
909
+ e.enableHighlightSearch && n.search(d), t.emit("afterSearch", d);
895
910
  });
896
- const y = B(() => {
897
- const r = {
911
+ const l = V(() => {
912
+ const d = {
898
913
  "form-group": !0,
899
914
  "farris-form-group": !0
900
915
  };
901
- return o.value && o.value.split(" ").reduce((a, m) => (a[m] = !0, a), r), r;
916
+ return o.value && o.value.split(" ").reduce((u, m) => (u[m] = !0, u), d), d;
902
917
  });
903
- function h(r) {
918
+ function g(d) {
904
919
  }
905
920
  function i() {
906
- return v("div", {
921
+ return h("div", {
907
922
  class: "f-list-view-header",
908
- onClick: Fe(() => h, ["prevent", "stop"])
909
- }, [v("div", {
910
- class: y.value
911
- }, [v("div", {
923
+ onClick: Pe(() => g, ["prevent", "stop"])
924
+ }, [h("div", {
925
+ class: l.value
926
+ }, [h("div", {
912
927
  class: "farris-input-wrap"
913
- }, [v("div", {
928
+ }, [h("div", {
914
929
  class: "f-cmp-inputgroup"
915
- }, [v("div", {
930
+ }, [h("div", {
916
931
  class: "input-group f-state-editable"
917
- }, [Te(v("input", {
932
+ }, [Ve(h("input", {
918
933
  class: "form-control f-utils-fill text-left",
919
- "onUpdate:modelValue": (r) => l.value = r,
934
+ "onUpdate:modelValue": (d) => r.value = d,
920
935
  name: "input-group-value",
921
936
  type: "text",
922
- placeholder: c.value,
937
+ placeholder: a.value,
923
938
  autocomplete: "off"
924
- }, null), [[Me, l.value]]), v("div", {
939
+ }, null), [[Ae, r.value]]), h("div", {
925
940
  class: "input-group-append"
926
- }, [f.value && v("span", {
941
+ }, [f.value && h("span", {
927
942
  class: "input-group-text input-group-clear",
928
- onClick: (r) => b()
929
- }, [v("i", {
943
+ onClick: (d) => c()
944
+ }, [h("i", {
930
945
  class: "f-icon f-icon-close-circle"
931
- }, null)]), u.value && v("span", {
946
+ }, null)]), s.value && h("span", {
932
947
  class: "input-group-text"
933
- }, [v("span", {
948
+ }, [h("span", {
934
949
  class: "f-icon f-icon-search"
935
950
  }, null)])])])])])])]);
936
951
  }
@@ -938,60 +953,60 @@ function se(e, t, n) {
938
953
  renderHeader: i
939
954
  };
940
955
  }
941
- const me = /* @__PURE__ */ H({
956
+ const ve = /* @__PURE__ */ R({
942
957
  name: "FListView",
943
- props: fe,
958
+ props: be,
944
959
  emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
945
960
  setup(e, t) {
946
- const n = C(), o = C(!0), c = C(!1), l = C([]), u = 0, f = C(e.columns), b = De(e), y = Oe(e), h = Ie(e, b), i = Pe(e), r = Be(e, /* @__PURE__ */ new Map(), y, b, i), g = Ae(e, r, b, l, t), a = Mt(e, n), m = B(() => r.dataView.value.length), s = $e(e, b), d = xe(), k = Le(e, {}, d), F = Ee(e, s, y, b, d, k), D = Ne(e, b, k, F), S = He(e, b, k, F), w = Re(e, f, r, m, u, F, D, S), {
947
- getVisualData: V
948
- } = w;
949
- l.value = V(0, m.value + u - 1);
950
- const p = B(() => {
951
- const x = {
961
+ const n = v(), o = v(!0), a = v(!1), r = v([]), s = 0, f = v(e.columns), c = xe(e), l = Re(e), g = Ne(e, c), i = Ue(e), d = qe(e, /* @__PURE__ */ new Map(), l, c, i), C = He(e, d, c, r, t), u = xt(e, n), m = V(() => d.dataView.value.length), p = Ge(e, t, c), y = We(), S = _e(e, {}, y), k = ze(e, p, l, c, y, S), j = Xe(e, c, S, k), w = Je(e, c, S, k), b = Qe(e, f, d, m, s, k, j, w), {
962
+ getVisualData: T
963
+ } = b;
964
+ r.value = T(0, m.value + s - 1);
965
+ const F = V(() => {
966
+ const $ = {
952
967
  "f-list-view": !0,
953
968
  "f-list-view-multiple": e.multiSelect
954
969
  };
955
- return e.size !== "default" && (x[`${e.size}-item`] = !0), x;
956
- }), M = B(() => !!t.slots.footer || o.value);
957
- function A() {
958
- return e.header === "SearchBar" ? se : e.header === "ContentHeader" ? $t : se;
970
+ return e.size !== "default" && ($[`${e.size}-item`] = !0), $;
971
+ }), I = V(() => !!t.slots.footer || o.value);
972
+ function O() {
973
+ return e.header === "SearchBar" ? pe : e.header === "ContentHeader" ? zt : pe;
959
974
  }
960
- const T = A(), {
961
- renderHeader: $
962
- } = T(e, t, a), {
963
- renderListArea: O
964
- } = At(e, t, l, r, h, g, w);
965
- function P(x) {
966
- a.search(x);
975
+ const M = O(), {
976
+ renderHeader: D
977
+ } = M(e, t, u), {
978
+ renderListArea: P
979
+ } = _t(e, t, r, d, g, C, b);
980
+ function L($) {
981
+ u.search($);
967
982
  }
968
- function E(x) {
969
- x && (r.load(x), l.value = V(0, m.value + u - 1));
983
+ function E($) {
984
+ $ && (d.load($), r.value = T(0, m.value + s - 1));
970
985
  }
971
986
  t.expose({
972
- search: P,
987
+ search: L,
973
988
  updateDataSource: E
974
989
  });
975
- function I(x) {
976
- e.multiSelect && (x.preventDefault(), x.stopPropagation());
990
+ function A($) {
991
+ e.multiSelect && ($.preventDefault(), $.stopPropagation());
977
992
  }
978
- return () => v("div", {
979
- class: p.value,
980
- onClick: I
981
- }, [$(), v("div", {
993
+ return () => h("div", {
994
+ class: F.value,
995
+ onClick: A
996
+ }, [D(), h("div", {
982
997
  ref: n,
983
998
  class: "f-list-view-content",
984
999
  onMouseover: () => {
985
- c.value = !0;
1000
+ a.value = !0;
986
1001
  },
987
1002
  onMouseleave: () => {
988
- c.value = !1;
1003
+ a.value = !1;
989
1004
  }
990
- }, [O()]), M.value && v("div", {
1005
+ }, [P()]), I.value && h("div", {
991
1006
  class: "f-list-view-footer"
992
1007
  }, [t.slots.footer && t.slots.footer()])]);
993
1008
  }
994
- }), xt = {
1009
+ }), Xt = {
995
1010
  /**
996
1011
  * 组件标识
997
1012
  */
@@ -1017,7 +1032,7 @@ const me = /* @__PURE__ */ H({
1017
1032
  */
1018
1033
  customClass: { type: Object, default: {} }
1019
1034
  };
1020
- function Lt(e, t) {
1035
+ function Jt(e, t) {
1021
1036
  function n(o) {
1022
1037
  o.stopPropagation(), e.disabled || t.emit("click", o);
1023
1038
  }
@@ -1025,50 +1040,50 @@ function Lt(e, t) {
1025
1040
  onClickButton: n
1026
1041
  };
1027
1042
  }
1028
- function Et(e) {
1029
- const t = B(() => {
1043
+ function Qt(e) {
1044
+ const t = V(() => {
1030
1045
  const o = {
1031
1046
  "f-icon": !0
1032
1047
  };
1033
1048
  if (e.icon) {
1034
- const c = e.icon.trim().split(" ");
1035
- c && c.length && c.reduce((l, u) => (l[u] = !0, l), o);
1049
+ const a = e.icon.trim().split(" ");
1050
+ a && a.length && a.reduce((r, s) => (r[s] = !0, r), o);
1036
1051
  }
1037
1052
  return o;
1038
- }), n = B(() => !!(e.icon && e.icon.trim()));
1053
+ }), n = V(() => !!(e.icon && e.icon.trim()));
1039
1054
  return { iconClass: t, shouldShowIcon: n };
1040
1055
  }
1041
- const ye = /* @__PURE__ */ H({
1056
+ const Ce = /* @__PURE__ */ R({
1042
1057
  name: "FButton",
1043
- props: xt,
1058
+ props: Xt,
1044
1059
  emits: ["click"],
1045
1060
  setup(e, t) {
1046
1061
  const {
1047
1062
  onClickButton: n
1048
- } = Lt(e, t), {
1063
+ } = Jt(e, t), {
1049
1064
  iconClass: o,
1050
- shouldShowIcon: c
1051
- } = Et(e), l = B(() => {
1052
- const u = {
1065
+ shouldShowIcon: a
1066
+ } = Qt(e), r = V(() => {
1067
+ const s = {
1053
1068
  btn: !0,
1054
1069
  "btn-lg": e.size === "large",
1055
1070
  "btn-md": e.size !== "large" && e.size !== "small",
1056
1071
  "btn-sm": e.size === "small",
1057
- "btn-icontext": c.value
1072
+ "btn-icontext": a.value
1058
1073
  };
1059
- return u[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((f, b) => (f[b] = e.customClass[b], f), u), u;
1074
+ return s[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((f, c) => (f[c] = e.customClass[c], f), s), s;
1060
1075
  });
1061
- return () => v("button", {
1062
- class: l.value,
1076
+ return () => h("button", {
1077
+ class: r.value,
1063
1078
  disabled: e.disabled,
1064
- onClick: (u) => n(u)
1065
- }, [c.value && v("i", {
1079
+ onClick: (s) => n(s)
1080
+ }, [a.value && h("i", {
1066
1081
  class: o.value
1067
1082
  }, null), t.slots.default && t.slots.default()]);
1068
1083
  }
1069
- }), Nt = /* @__PURE__ */ new Map([
1070
- ["appearance", ee]
1071
- ]), Ht = "https://json-schema.org/draft/2020-12/schema", Rt = "https://farris-design.gitee.io/combo-list.schema.json", Ut = "combo-list", Gt = "A Farris Input Component", _t = "object", qt = {
1084
+ }), Yt = /* @__PURE__ */ new Map([
1085
+ ["appearance", oe]
1086
+ ]), Zt = "https://json-schema.org/draft/2020-12/schema", Kt = "https://farris-design.gitee.io/combo-list.schema.json", en = "combo-list", tn = "A Farris Input Component", nn = "object", on = {
1072
1087
  id: {
1073
1088
  description: "The unique identifier for a combo list",
1074
1089
  type: "string"
@@ -1096,6 +1111,11 @@ const ye = /* @__PURE__ */ H({
1096
1111
  type: "object",
1097
1112
  default: {}
1098
1113
  },
1114
+ disabled: {
1115
+ description: "",
1116
+ type: "boolean",
1117
+ default: !1
1118
+ },
1099
1119
  editable: {
1100
1120
  description: "",
1101
1121
  type: "boolean",
@@ -1123,7 +1143,7 @@ const ye = /* @__PURE__ */ H({
1123
1143
  valueField: {
1124
1144
  description: "",
1125
1145
  type: "string",
1126
- default: "value"
1146
+ default: "id"
1127
1147
  },
1128
1148
  titleField: {
1129
1149
  description: "",
@@ -1179,22 +1199,27 @@ const ye = /* @__PURE__ */ H({
1179
1199
  type: "sting",
1180
1200
  default: ""
1181
1201
  }
1182
- }, Wt = [
1202
+ }, an = [
1183
1203
  "id",
1184
1204
  "type"
1185
- ], zt = {
1186
- $schema: Ht,
1187
- $id: Rt,
1188
- title: Ut,
1189
- description: Gt,
1190
- type: _t,
1191
- properties: qt,
1192
- required: Wt
1205
+ ], rn = [
1206
+ "id",
1207
+ "appearance",
1208
+ "binding"
1209
+ ], ln = {
1210
+ $schema: Zt,
1211
+ $id: Kt,
1212
+ title: en,
1213
+ description: tn,
1214
+ type: nn,
1215
+ properties: on,
1216
+ required: an,
1217
+ ignore: rn
1193
1218
  };
1194
- function Jt(e, t, n) {
1219
+ function sn(e, t, n) {
1195
1220
  return t;
1196
1221
  }
1197
- const ne = {
1222
+ const re = {
1198
1223
  /**
1199
1224
  * 组件标识
1200
1225
  */
@@ -1271,7 +1296,7 @@ const ne = {
1271
1296
  * 可选,是否支持多选
1272
1297
  * 默认`false`
1273
1298
  */
1274
- multiSelect: { default: !1, type: Boolean },
1299
+ multiSelect: { type: Boolean, default: !1 },
1275
1300
  /**
1276
1301
  * 绑定值
1277
1302
  */
@@ -1360,11 +1385,11 @@ const ne = {
1360
1385
  },
1361
1386
  // 搜索启用高亮
1362
1387
  enableHighlightSearch: { type: Boolean, default: !0 }
1363
- }, ge = K(ne, zt, Nt, Jt), Xt = {
1388
+ }, we = z(re, ln, Yt, sn), cn = {
1364
1389
  dataSource: { type: Array, default: [] },
1365
1390
  enableSearch: { type: Boolean, default: !1 },
1366
1391
  idField: { type: String, default: "id" },
1367
- multiSelect: { default: !1, type: Boolean },
1392
+ multiSelect: { type: Boolean, default: !1 },
1368
1393
  selectedValues: { type: String, default: "" },
1369
1394
  separator: { type: String, default: "," },
1370
1395
  textField: { type: String, default: "name" },
@@ -1381,235 +1406,857 @@ const ne = {
1381
1406
  },
1382
1407
  // 搜索启用高亮
1383
1408
  enableHighlightSearch: { type: Boolean, default: !0 }
1384
- }, Qt = /* @__PURE__ */ H({
1409
+ }, un = /* @__PURE__ */ R({
1385
1410
  name: "FComboListContainer",
1386
- props: Xt,
1411
+ props: cn,
1387
1412
  emits: ["selectionChange"],
1388
1413
  setup(e, t) {
1389
- const n = C(), o = C(e.dataSource), c = C([]), l = C(e.separator), u = C(e.width), f = C(e.maxHeight), b = C(String(e.selectedValues).split(l.value));
1414
+ const n = v(), o = v(e.dataSource), a = v([]), r = v(e.separator), s = v(e.width), f = v(e.maxHeight), c = v(String(e.selectedValues).split(r.value)), l = V(() => e.multiSelect), g = V(() => ({
1415
+ enableSelectRow: !0,
1416
+ multiSelect: e.multiSelect,
1417
+ multiSelectMode: "OnCheckAndClick",
1418
+ showCheckbox: l.value,
1419
+ showSelectAll: !1,
1420
+ showSelection: !0
1421
+ }));
1390
1422
  N(e.dataSource, () => {
1391
1423
  o.value = e.dataSource;
1392
1424
  });
1393
- const y = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), h = B(() => {
1394
- const g = {};
1395
- return u.value !== void 0 && (g.width = `${u.value}px`), f.value !== void 0 && f.value > 0 && (g.maxHeight = `${f.value}px`), g;
1425
+ const i = V(() => e.enableSearch ? "SearchBar" : "ContentHeader"), d = V(() => {
1426
+ const m = {};
1427
+ return s.value !== void 0 && (m.width = `${s.value}px`), f.value !== void 0 && f.value > 0 && (m.maxHeight = `${f.value}px`), m;
1428
+ });
1429
+ function C(m) {
1430
+ a.value = m.map((p) => Object.assign({}, p)), c.value = m.map((p) => p[e.idField]), t.emit("selectionChange", a.value);
1431
+ }
1432
+ function u(m) {
1433
+ if (e.enableHighlightSearch)
1434
+ return;
1435
+ let p = [];
1436
+ typeof e.searchOption == "function" ? p = o.value.filter((y) => e.searchOption(m, y)) : p = o.value.filter((y) => y[e.valueField].indexOf(m) > -1 || y[e.textField].indexOf(m) > -1), n.value.updateDataSource(p);
1437
+ }
1438
+ return N([() => e.selectedValues], ([m]) => {
1439
+ c.value = m.split(r.value);
1440
+ }), () => h("div", {
1441
+ class: "f-combo-list-container pl-1",
1442
+ style: d.value
1443
+ }, [h(Ye, {
1444
+ ref: n,
1445
+ size: "small",
1446
+ itemClass: "f-combo-list-item",
1447
+ header: i.value,
1448
+ headerClass: "f-combo-list-search-box",
1449
+ data: o.value,
1450
+ idField: e.idField,
1451
+ textField: e.textField,
1452
+ titleField: e.titleField,
1453
+ multiSelect: e.multiSelect,
1454
+ selection: g.value,
1455
+ enableHighlightSearch: e.enableHighlightSearch,
1456
+ selectionValues: c.value,
1457
+ onSelectionChange: C,
1458
+ onAfterSearch: u
1459
+ }, null)]);
1460
+ }
1461
+ });
1462
+ function dn(e) {
1463
+ const t = v(""), n = v(e.modelValue), o = v(e.data || []), a = v(e.editable);
1464
+ function r(i) {
1465
+ const d = String(i).split(e.separator), C = d.map((p) => [p, !0]), u = new Map(C);
1466
+ return o.value.filter((p) => u.has(String(p[e.valueField]))).sort((p, y) => {
1467
+ const S = d.indexOf(p[e.valueField]), k = d.indexOf(y[e.valueField]);
1468
+ return S - k;
1469
+ });
1470
+ }
1471
+ function s(i) {
1472
+ const d = r(i).map((C) => C[e.textField]).join(e.separator);
1473
+ t.value = a.value ? d || i : d;
1474
+ }
1475
+ function f(i) {
1476
+ const d = i.split(e.separator).map((u) => [u, !0]), C = new Map(d);
1477
+ return o.value.filter((u) => C.has(u[e.textField]));
1478
+ }
1479
+ function c(i) {
1480
+ const d = {};
1481
+ return d[e.idField] = i, d[e.textField] = i, [d];
1482
+ }
1483
+ function l(i) {
1484
+ let d = f(i);
1485
+ const C = d && d.length > 0;
1486
+ return a.value && !C && (d = c(i)), d;
1487
+ }
1488
+ function g() {
1489
+ const { url: i, method: d = "GET", headers: C = {}, body: u = null } = e.remote, m = d.toLowerCase() == "get" ? { method: d, headers: C } : { method: d, headers: C, body: u };
1490
+ let p = !1;
1491
+ fetch(i, m).then((y) => {
1492
+ var k, j;
1493
+ if (y.status === 200)
1494
+ return p = !!((j = (k = y.headers) == null ? void 0 : k.get("content-type")) != null && j.includes("application/json")), p ? y.text() : y.json();
1495
+ throw new Error(y.statusText);
1496
+ }).then((y) => {
1497
+ o.value = p ? JSON.parse(y) : y;
1498
+ }).catch((y) => {
1499
+ console.error(y);
1500
+ });
1501
+ }
1502
+ return e.remote && g(), N(() => e.data, () => {
1503
+ o.value = e.data;
1504
+ }), N([o], ([i]) => {
1505
+ if (e.modelValue != null) {
1506
+ const d = i.find((C) => C[e.valueField] === e.modelValue);
1507
+ d && (t.value = d[e.textField]);
1508
+ }
1509
+ }), N(() => e.modelValue, (i) => {
1510
+ n.value = i, s(i);
1511
+ }), s(e.modelValue), { dataSource: o, displayText: t, editable: a, modelValue: n, getItemsByDisplayText: f, getItemsByValue: r, getSelectedItemsByDisplayText: l };
1512
+ }
1513
+ const G = /* @__PURE__ */ R({
1514
+ name: "FComboList",
1515
+ props: re,
1516
+ emits: ["clear", "update:modelValue", "change", "input"],
1517
+ setup(e, t) {
1518
+ const n = v(), o = v(e.disabled), a = v(e.enableClear), r = v(e.enableSearch), s = v(e.readonly), {
1519
+ dataSource: f,
1520
+ displayText: c,
1521
+ editable: l,
1522
+ modelValue: g,
1523
+ getSelectedItemsByDisplayText: i
1524
+ } = dn(e), d = V(() => e.multiSelect), C = V(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
1525
+ function u() {
1526
+ !d.value && n.value && n.value.hidePopup();
1527
+ }
1528
+ function m(w) {
1529
+ c.value = w.map((b) => b[e.textField]).join(e.separator), w.length === 1 ? g.value = w[0][e.valueField] : g.value = w.map((b) => b[e.valueField]).join(e.separator), t.emit("update:modelValue", g.value), t.emit("change", w, g.value), u();
1530
+ }
1531
+ function p() {
1532
+ s.value || n.value.togglePopup();
1533
+ }
1534
+ function y(w) {
1535
+ g.value = "", t.emit("update:modelValue", ""), t.emit("clear");
1536
+ }
1537
+ function S(w) {
1538
+ const b = i(w);
1539
+ m(b);
1540
+ }
1541
+ function k() {
1542
+ return c.value;
1543
+ }
1544
+ function j(w) {
1545
+ t.emit("input", w);
1546
+ }
1547
+ return t.expose({
1548
+ getDisplayText: k
1549
+ }), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([w, b, T, F, I]) => {
1550
+ o.value = w, l.value = b, a.value = T, r.value = F, s.value = I;
1551
+ }), () => h(Ze, {
1552
+ ref: n,
1553
+ id: e.id,
1554
+ disable: o.value,
1555
+ readonly: s.value,
1556
+ forcePlaceholder: e.forcePlaceholder,
1557
+ editable: l.value,
1558
+ buttonContent: e.dropDownIcon,
1559
+ placeholder: e.placeholder,
1560
+ enableClear: a.value,
1561
+ maxLength: e.maxLength,
1562
+ tabIndex: e.tabIndex,
1563
+ enableTitle: e.enableTitle,
1564
+ multiSelect: e.multiSelect,
1565
+ inputType: e.multiSelect ? e.viewType : "text",
1566
+ modelValue: c.value,
1567
+ "onUpdate:modelValue": (w) => c.value = w,
1568
+ focusOnCreated: e.focusOnCreated,
1569
+ selectOnCreated: e.selectOnCreated,
1570
+ onClear: y,
1571
+ onClick: p,
1572
+ onChange: S,
1573
+ onInput: j,
1574
+ beforeOpen: e.beforeOpen
1575
+ }, {
1576
+ default: () => [h(un, {
1577
+ idField: e.idField,
1578
+ valueField: e.valueField,
1579
+ textField: e.textField,
1580
+ titleField: e.titleField,
1581
+ dataSource: f.value,
1582
+ selectedValues: g.value,
1583
+ multiSelect: e.multiSelect,
1584
+ enableSearch: r.value,
1585
+ maxHeight: e.maxHeight,
1586
+ enableHighlightSearch: e.enableHighlightSearch,
1587
+ width: e.fitEditor ? C.value : void 0,
1588
+ onSelectionChange: m
1589
+ }, null)]
1590
+ });
1591
+ }
1592
+ }), pn = /* @__PURE__ */ new Map([
1593
+ ["appearance", Ke]
1594
+ ]);
1595
+ function fn(e, t, n) {
1596
+ return t;
1597
+ }
1598
+ const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-design.gitee.io/button-edit.schema.json", gn = "button-edit", hn = "A Farris Input Component", bn = "object", vn = {
1599
+ id: {
1600
+ description: "The unique identifier for a Input Group",
1601
+ type: "string"
1602
+ },
1603
+ type: {
1604
+ description: "The type string of Input Group component",
1605
+ type: "string",
1606
+ default: "button-edit"
1607
+ },
1608
+ appearance: {
1609
+ description: "",
1610
+ type: "object",
1611
+ properties: {
1612
+ class: {
1613
+ type: "string"
1614
+ },
1615
+ style: {
1616
+ type: "string"
1617
+ }
1618
+ },
1619
+ default: {}
1620
+ },
1621
+ binding: {
1622
+ description: "",
1623
+ type: "object",
1624
+ default: {}
1625
+ },
1626
+ disable: {
1627
+ type: "string",
1628
+ default: !1
1629
+ },
1630
+ editable: {
1631
+ description: "",
1632
+ type: "boolean",
1633
+ default: !0
1634
+ },
1635
+ enableLinkLabel: {
1636
+ description: "",
1637
+ type: "boolean",
1638
+ default: !1
1639
+ },
1640
+ label: {
1641
+ description: "",
1642
+ type: "string",
1643
+ default: ""
1644
+ },
1645
+ lableWidth: {
1646
+ description: "",
1647
+ type: "number"
1648
+ },
1649
+ placeholder: {
1650
+ description: "",
1651
+ type: "string",
1652
+ default: ""
1653
+ },
1654
+ readonly: {
1655
+ description: "",
1656
+ type: "boolean",
1657
+ default: !1
1658
+ },
1659
+ require: {
1660
+ description: "",
1661
+ type: "boolean",
1662
+ default: !1
1663
+ },
1664
+ tabindex: {
1665
+ description: "",
1666
+ type: "number",
1667
+ default: -1
1668
+ },
1669
+ textAlign: {
1670
+ description: "",
1671
+ type: "string",
1672
+ enum: [
1673
+ "left",
1674
+ "middle",
1675
+ "right"
1676
+ ],
1677
+ default: "left"
1678
+ },
1679
+ visible: {
1680
+ description: "",
1681
+ type: "boolean",
1682
+ default: !0
1683
+ },
1684
+ onBlur: {
1685
+ description: "",
1686
+ type: "string",
1687
+ default: ""
1688
+ },
1689
+ onClickLinkLabel: {
1690
+ description: "",
1691
+ type: "sting",
1692
+ default: ""
1693
+ },
1694
+ autoComplete: {
1695
+ description: "",
1696
+ type: "boolean",
1697
+ default: !1
1698
+ },
1699
+ buttonContent: {
1700
+ description: "",
1701
+ type: "string",
1702
+ default: ""
1703
+ },
1704
+ enableClear: {
1705
+ description: "",
1706
+ type: "boolean",
1707
+ default: !0
1708
+ },
1709
+ inputType: {
1710
+ description: "",
1711
+ type: "string",
1712
+ enum: [
1713
+ "text",
1714
+ "tag"
1715
+ ],
1716
+ default: "text"
1717
+ },
1718
+ multiSelect: {
1719
+ description: "",
1720
+ type: "boolean",
1721
+ default: !1
1722
+ },
1723
+ popup: {
1724
+ description: "",
1725
+ type: "object",
1726
+ properties: {
1727
+ footerButtons: {
1728
+ type: "array",
1729
+ default: []
1730
+ },
1731
+ height: {
1732
+ type: "number",
1733
+ default: 600
1734
+ },
1735
+ dataMapping: {
1736
+ type: "object"
1737
+ },
1738
+ contents: {
1739
+ type: "array",
1740
+ default: []
1741
+ },
1742
+ showMaxButton: {
1743
+ type: "boolean",
1744
+ default: !0
1745
+ },
1746
+ showCloseButton: {
1747
+ type: "boolean",
1748
+ default: !0
1749
+ },
1750
+ showFooter: {
1751
+ type: "boolean",
1752
+ default: !0
1753
+ },
1754
+ title: {
1755
+ type: "string",
1756
+ default: ""
1757
+ },
1758
+ width: {
1759
+ type: "number",
1760
+ default: 800
1761
+ }
1762
+ }
1763
+ },
1764
+ separator: {
1765
+ type: "string",
1766
+ default: ","
1767
+ },
1768
+ showButtonWhenDisabled: {
1769
+ description: "",
1770
+ type: "boolean",
1771
+ default: !1
1772
+ },
1773
+ wrapText: {
1774
+ type: "boolean",
1775
+ default: !1
1776
+ },
1777
+ onClear: {
1778
+ description: "",
1779
+ type: "string",
1780
+ default: ""
1781
+ }
1782
+ }, Cn = [
1783
+ "id",
1784
+ "type"
1785
+ ], wn = {
1786
+ $schema: mn,
1787
+ $id: yn,
1788
+ title: gn,
1789
+ description: hn,
1790
+ type: bn,
1791
+ properties: vn,
1792
+ required: Cn
1793
+ }, Sn = "buttonEdit", kn = "A Farris Component", Fn = "object", In = {
1794
+ basic: {
1795
+ description: "Basic Infomation",
1796
+ title: "基本信息",
1797
+ properties: {
1798
+ id: {
1799
+ description: "组件标识",
1800
+ title: "标识",
1801
+ type: "string",
1802
+ readonly: !0
1803
+ },
1804
+ type: {
1805
+ description: "组件类型",
1806
+ title: "控件类型",
1807
+ type: "select",
1808
+ editor: {
1809
+ type: "waiting for modification",
1810
+ enum: []
1811
+ }
1812
+ }
1813
+ }
1814
+ },
1815
+ behavior: {
1816
+ description: "Basic Infomation",
1817
+ title: "行为",
1818
+ properties: {
1819
+ editable: {
1820
+ description: "",
1821
+ title: "允许编辑",
1822
+ type: "boolean"
1823
+ },
1824
+ readonly: {
1825
+ description: "",
1826
+ title: "只读",
1827
+ type: "string"
1828
+ },
1829
+ required: {
1830
+ description: "",
1831
+ title: "必填",
1832
+ type: "boolean"
1833
+ },
1834
+ visible: {
1835
+ description: "",
1836
+ title: "可见",
1837
+ type: "boolean"
1838
+ },
1839
+ placeholder: {
1840
+ description: "",
1841
+ title: "提示文本",
1842
+ type: "string"
1843
+ },
1844
+ tabindex: {
1845
+ description: "",
1846
+ title: "tab索引",
1847
+ type: "number"
1848
+ },
1849
+ textAlign: {
1850
+ description: "",
1851
+ title: "对齐方式",
1852
+ type: "enum",
1853
+ editor: {
1854
+ type: "combo-list",
1855
+ textField: "name",
1856
+ valueField: "value",
1857
+ data: [
1858
+ {
1859
+ value: "left",
1860
+ name: "左对齐"
1861
+ },
1862
+ {
1863
+ value: "center",
1864
+ name: "居中对齐"
1865
+ },
1866
+ {
1867
+ value: "right",
1868
+ name: "右对齐"
1869
+ }
1870
+ ]
1871
+ }
1872
+ }
1873
+ }
1874
+ }
1875
+ }, Mn = {
1876
+ title: Sn,
1877
+ description: kn,
1878
+ type: Fn,
1879
+ categories: In
1880
+ }, Se = {
1881
+ /**
1882
+ * 组件标识
1883
+ */
1884
+ id: String,
1885
+ /**
1886
+ * 扩展按钮显示内容,这是一段现在扩展按钮中的html标签
1887
+ */
1888
+ buttonContent: { type: String, default: '<i class="f-icon f-icon-lookup"></i>' },
1889
+ buttonBehavior: { type: String, default: "Popup" },
1890
+ /**
1891
+ * 启用输入框自动完成功能
1892
+ */
1893
+ autoComplete: { type: Boolean, default: !1 },
1894
+ /**
1895
+ * 组件自定义样式
1896
+ */
1897
+ customClass: { type: String, default: "" },
1898
+ /**
1899
+ * 禁用组件,既不允许在输入框中录入,也不允许点击扩展按钮。
1900
+ */
1901
+ disable: { type: Boolean, default: !1 },
1902
+ /**
1903
+ * 允许在输入框中录入文本。
1904
+ */
1905
+ editable: { type: Boolean, default: !0 },
1906
+ /**
1907
+ * 显示清空文本按钮
1908
+ */
1909
+ enableClear: { type: Boolean, default: !1 },
1910
+ /**
1911
+ * 组件值
1912
+ */
1913
+ modelValue: { type: String, default: "" },
1914
+ /**
1915
+ * 将组件设置为只读,既不允许在输入框中录入,也不允许点击扩展按钮,但是允许复制输入框中的内容。
1916
+ */
1917
+ readonly: { type: Boolean, default: !1 },
1918
+ /**
1919
+ * 禁用组件时,是否显示扩展按钮
1920
+ */
1921
+ showButtonWhenDisabled: { type: Boolean, default: !1 },
1922
+ /**
1923
+ * 显示输入框的标签
1924
+ */
1925
+ enableTitle: { type: Boolean, default: !1 },
1926
+ /**
1927
+ * 输入框类型
1928
+ */
1929
+ inputType: { type: String, default: "text" },
1930
+ /**
1931
+ * 显示输入框提示信息
1932
+ */
1933
+ forcePlaceholder: { type: Boolean, default: !1 },
1934
+ /**
1935
+ * 输入框提示文本
1936
+ */
1937
+ placeholder: { type: String, default: "" },
1938
+ /**
1939
+ * 输入框最小长度
1940
+ */
1941
+ minLength: Number,
1942
+ /**
1943
+ * 输入框最大长度
1944
+ */
1945
+ maxLength: Number,
1946
+ /**
1947
+ * 输入框Tab键索引
1948
+ */
1949
+ tabIndex: Number,
1950
+ popupHost: { type: Object },
1951
+ popupRightBoundary: { type: Object },
1952
+ popupOffsetX: { type: Object },
1953
+ popupOnInput: { type: Boolean, default: !1 },
1954
+ popupOnFocus: { type: Boolean, default: !1 },
1955
+ popupMinWidth: { type: Number, default: 160 },
1956
+ modalOptions: { type: Object, default: {} },
1957
+ wrapText: { type: Boolean, default: !1 },
1958
+ /**
1959
+ * 可选,是否支持多选
1960
+ * 默认`false`
1961
+ */
1962
+ multiSelect: { type: Boolean, default: !1 },
1963
+ /**
1964
+ * 可选,分隔符
1965
+ * 默认`,`
1966
+ */
1967
+ separator: { type: String, default: "," },
1968
+ /** 对齐方式 */
1969
+ textAlign: { type: String, default: "left" },
1970
+ /**
1971
+ * 废弃
1972
+ */
1973
+ beforeClickButton: { type: Function, default: null },
1974
+ /**
1975
+ * 作为内嵌编辑器被创建后默认获得焦点
1976
+ */
1977
+ focusOnCreated: { type: Boolean, default: !1 },
1978
+ /**
1979
+ * 作为内嵌编辑器被创建后默认选中文本
1980
+ */
1981
+ selectOnCreated: { type: Boolean, default: !1 },
1982
+ /**
1983
+ * 打开前
1984
+ */
1985
+ beforeOpen: { type: Function, default: null },
1986
+ /** 更新方式 blur | change */
1987
+ updateOn: { type: String, default: "change" }
1988
+ };
1989
+ z(Se, wn, pn, fn, Mn);
1990
+ const jn = {
1991
+ popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
1992
+ host: { type: Object },
1993
+ backgroundColor: { type: String, default: "" }
1994
+ }, Bn = /* @__PURE__ */ R({
1995
+ name: "FOverlay",
1996
+ props: jn,
1997
+ emits: ["click"],
1998
+ setup(e, t) {
1999
+ const n = v(e.popupContentPosition), o = v(e.host), a = V(() => ({
2000
+ backgroundColor: e.backgroundColor || "",
2001
+ pointerEvents: "auto"
2002
+ }));
2003
+ function r(f) {
2004
+ t.emit("click"), f.preventDefault(), f.stopPropagation();
2005
+ }
2006
+ V(() => {
2007
+ const f = o.value;
2008
+ if (f) {
2009
+ const c = f.getBoundingClientRect(), {
2010
+ left: l,
2011
+ top: g,
2012
+ height: i
2013
+ } = c;
2014
+ return {
2015
+ left: l,
2016
+ top: g + i
2017
+ };
2018
+ }
2019
+ return n.value;
2020
+ });
2021
+ const s = V(() => ({
2022
+ // position: 'relative',
2023
+ // left: `${position.value.left}px`,
2024
+ // top: `${position.value.top}px`
2025
+ }));
2026
+ return () => h(De, {
2027
+ to: "body"
2028
+ }, {
2029
+ default: () => {
2030
+ var f, c;
2031
+ return [h("div", {
2032
+ class: "overlay-container",
2033
+ onClick: (l) => r(l),
2034
+ style: a.value
2035
+ }, [h("div", {
2036
+ style: s.value
2037
+ }, [(c = (f = t.slots).default) == null ? void 0 : c.call(f)])])];
2038
+ }
1396
2039
  });
1397
- function i(g) {
1398
- c.value = g.map((a) => Object.assign({}, a)), b.value = g.map((a) => a[e.idField]), t.emit("selectionChange", c.value);
2040
+ }
2041
+ });
2042
+ function Tn(e) {
2043
+ if (e.content && e.content.render)
2044
+ return e.content.render;
2045
+ if (e.render && typeof e.render == "function")
2046
+ return e.render;
2047
+ }
2048
+ function On(e) {
2049
+ const t = document.createElement("div");
2050
+ t.style.display = "contents";
2051
+ let n;
2052
+ const o = e.onClickCallback || (() => {
2053
+ }), a = () => {
2054
+ o(), n && n.unmount();
2055
+ };
2056
+ return n = Le({
2057
+ setup() {
2058
+ Ee(() => {
2059
+ document.body.removeChild(t);
2060
+ });
2061
+ const r = Tn(e);
2062
+ return () => h(Bn, {
2063
+ "popup-content-position": e.popupPosition,
2064
+ host: e.host,
2065
+ onClick: a,
2066
+ backgroundColor: e.backgroundColor
2067
+ }, {
2068
+ default: () => [r && r()]
2069
+ });
1399
2070
  }
1400
- function r(g) {
1401
- if (e.enableHighlightSearch)
1402
- return;
1403
- let a = [];
1404
- typeof e.searchOption == "function" ? a = o.value.filter((m) => e.searchOption(g, m)) : a = o.value.filter((m) => m[e.valueField].indexOf(g) > -1 || m[e.textField].indexOf(g) > -1), n.value.updateDataSource(a);
2071
+ }), document.body.appendChild(t), n.mount(t), n;
2072
+ }
2073
+ class Pn {
2074
+ static show(t) {
2075
+ return On(t);
2076
+ }
2077
+ }
2078
+ const Vn = Symbol("FModalService");
2079
+ function ke(e, t) {
2080
+ function n() {
2081
+ const o = e.beforeOpen || e.beforeClickButton || null;
2082
+ let a = Promise.resolve(!0);
2083
+ if (o) {
2084
+ const r = o(t.value);
2085
+ if (typeof r > "u")
2086
+ return a;
2087
+ typeof r == "boolean" ? a = Promise.resolve(r) : a = r;
1405
2088
  }
1406
- return N([() => e.selectedValues], ([g]) => {
1407
- b.value = g.split(l.value);
1408
- }), () => v("div", {
1409
- class: "f-combo-list-container pl-3",
1410
- style: h.value
1411
- }, [v(Ue, {
1412
- ref: n,
1413
- size: "small",
1414
- itemClass: "f-combo-list-item",
1415
- header: y.value,
1416
- headerClass: "f-combo-list-search-box",
1417
- data: o.value,
1418
- idField: e.idField,
1419
- textField: e.textField,
1420
- titleField: e.titleField,
1421
- multiSelect: e.multiSelect,
1422
- selection: {
1423
- enableSelectRow: !0,
1424
- multiSelect: !0,
1425
- multiSelectMode: "OnCheckAndClick",
1426
- showCheckbox: !0,
1427
- showSelectAll: !1,
1428
- showSelection: !0
1429
- },
1430
- enableHighlightSearch: e.enableHighlightSearch,
1431
- selectionValues: b.value,
1432
- onSelectionChange: i,
1433
- onAfterSearch: r
1434
- }, null)]);
2089
+ return a;
1435
2090
  }
1436
- });
1437
- function Yt(e) {
1438
- const t = C(""), n = C(e.modelValue), o = C(e.data || []), c = C(e.editable);
1439
- function l(i) {
1440
- const r = String(i).split(e.separator).map((a) => [a, !0]), g = new Map(r);
1441
- return o.value.filter((a) => g.has(String(a[e.valueField])));
2091
+ return { judgeCanOpen: n };
2092
+ }
2093
+ function An(e, t, n, o, a) {
2094
+ const r = v(e.buttonBehavior), s = v(e.popupOnInput), f = V(() => ({
2095
+ "input-group-append": !0,
2096
+ "append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
2097
+ })), { judgeCanOpen: c } = ke(e, a), l = V(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), g = q(Vn, null), i = v();
2098
+ async function d(m) {
2099
+ if (await c() && l.value) {
2100
+ const p = !!t.slots.default;
2101
+ if (r.value === "Modal") {
2102
+ const y = e.modalOptions, S = g == null ? void 0 : g.open({
2103
+ ...y,
2104
+ render: () => t.slots.default && t.slots.default()
2105
+ });
2106
+ i.value = S == null ? void 0 : S.modalRef;
2107
+ }
2108
+ r.value === "Overlay" && Pn.show({
2109
+ // host: buttonEditRef.value,
2110
+ host: document.body,
2111
+ backgroundColor: "rgba(0,0,0,.15)",
2112
+ render: () => t.slots.default && t.slots.default()
2113
+ }), p && r.value === "Popup" && o.togglePopup(!0), p && s.value && o.hidePopup(), t.emit("clickButton", { origin: m, value: e.modelValue });
2114
+ }
1442
2115
  }
1443
- function u(i) {
1444
- const r = l(i).map((g) => g[e.textField]).join(e.separator);
1445
- t.value = c.value ? r || i : r;
2116
+ function C(m) {
2117
+ t.emit("mouseEnterIcon", m);
1446
2118
  }
1447
- function f(i) {
1448
- const r = i.split(e.separator).map((a) => [a, !0]), g = new Map(r);
1449
- return o.value.filter((a) => g.has(a[e.textField]));
1450
- }
1451
- function b(i) {
1452
- const r = {};
1453
- return r[e.idField] = i, r[e.textField] = i, [r];
1454
- }
1455
- function y(i) {
1456
- let r = f(i);
1457
- const g = r && r.length > 0;
1458
- return c.value && !g && (r = b(i)), r;
1459
- }
1460
- function h() {
1461
- const { url: i, method: r = "GET", headers: g = {}, body: a = null } = e.remote, m = r.toLowerCase() == "get" ? { method: r, headers: g } : { method: r, headers: g, body: a };
1462
- let s = !1;
1463
- fetch(i, m).then((d) => {
1464
- var F, D;
1465
- if (d.status === 200)
1466
- return s = !!((D = (F = d.headers) == null ? void 0 : F.get("content-type")) != null && D.includes("application/json")), s ? d.text() : d.json();
1467
- throw new Error(d.statusText);
1468
- }).then((d) => {
1469
- o.value = s ? JSON.parse(d) : d;
1470
- }).catch((d) => {
1471
- console.error(d);
1472
- });
2119
+ function u(m) {
2120
+ t.emit("mouseLeaveIcon", m);
1473
2121
  }
1474
- return e.remote && h(), N(() => e.data, () => {
1475
- o.value = e.data;
1476
- }), N([o], ([i]) => {
1477
- if (e.modelValue) {
1478
- const r = i.find((g) => g[e.valueField] === e.modelValue);
1479
- r && (t.value = r[e.textField]);
1480
- }
1481
- }), N(() => e.modelValue, (i) => {
1482
- n.value = i, u(i);
1483
- }), u(e.modelValue), { dataSource: o, displayText: t, editable: c, modelValue: n, getItemsByDisplayText: f, getItemsByValue: l, getSelectedItemsByDisplayText: y };
2122
+ return {
2123
+ buttonGroupClass: f,
2124
+ onClickButton: d,
2125
+ onMouseEnterButton: C,
2126
+ onMouseLeaveButton: u,
2127
+ modalRef: i
2128
+ };
1484
2129
  }
1485
- const G = /* @__PURE__ */ H({
1486
- name: "FComboList",
1487
- props: ne,
1488
- emits: ["clear", "update:modelValue", "change", "input"],
1489
- setup(e, t) {
1490
- const n = C(), o = C(e.disabled), c = C(e.enableClear), l = C(e.enableSearch), u = C(e.readonly), {
1491
- dataSource: f,
1492
- displayText: b,
1493
- editable: y,
1494
- modelValue: h,
1495
- getSelectedItemsByDisplayText: i
1496
- } = Yt(e), r = B(() => e.multiSelect), g = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
1497
- function a() {
1498
- !r.value && n.value && n.value.hidePopup();
1499
- }
1500
- function m(S) {
1501
- b.value = S.map((w) => w[e.textField]).join(e.separator), S.length === 1 ? h.value = S[0][e.valueField] : h.value = S.map((w) => w[e.valueField]).join(e.separator), t.emit("update:modelValue", h.value), t.emit("change", S, h.value), a();
1502
- }
1503
- function s() {
1504
- u.value || n.value.togglePopup();
1505
- }
1506
- function d(S) {
1507
- h.value = "", t.emit("update:modelValue", ""), t.emit("clear");
1508
- }
1509
- function k(S) {
1510
- const w = i(S);
1511
- m(w);
1512
- }
1513
- function F() {
1514
- return b.value;
2130
+ function Dn(e, t, n, o) {
2131
+ const a = v(), r = v(!1), { judgeCanOpen: s } = ke(e, o);
2132
+ function f() {
2133
+ const i = a.value;
2134
+ i && i.show(n.value);
2135
+ }
2136
+ async function c(i = !1) {
2137
+ if (!!t.slots.default) {
2138
+ if (!i && !r.value && !await s())
2139
+ return;
2140
+ r.value = !r.value, await Z(), f();
1515
2141
  }
1516
- function D(S) {
1517
- t.emit("input", S);
2142
+ }
2143
+ async function l(i = !1) {
2144
+ if (!!t.slots.default) {
2145
+ if (!i && !await s())
2146
+ return;
2147
+ r.value = !0, await Z(), f();
1518
2148
  }
1519
- return t.expose({
1520
- getDisplayText: F
1521
- }), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([S, w, V, p, M]) => {
1522
- o.value = S, y.value = w, c.value = V, l.value = p, u.value = M;
1523
- }), () => v(ue, {
2149
+ }
2150
+ function g() {
2151
+ r.value = !1;
2152
+ }
2153
+ return { hidePopup: g, popup: l, shouldPopupContent: r, togglePopup: c, popoverRef: a };
2154
+ }
2155
+ function Ln(e, t, n) {
2156
+ const {
2157
+ buttonGroupClass: o
2158
+ } = n, a = v();
2159
+ return {
2160
+ renderButtonGroup: () => h("div", {
2161
+ id: `${e.id}-button-group`,
2162
+ class: o.value
2163
+ }, [t.slots.buttonContent ? h("span", {
2164
+ class: "input-group-text input-group-append-button"
2165
+ }, [t.slots.buttonContent()]) : e.buttonContent ? h("span", {
2166
+ class: "input-group-text input-group-append-button",
2167
+ innerHTML: e.buttonContent,
2168
+ ref: a
2169
+ }, null) : null]),
2170
+ buttonHandleElement: a
2171
+ };
2172
+ }
2173
+ const En = /* @__PURE__ */ R({
2174
+ name: "FButtonEdit",
2175
+ props: Se,
2176
+ emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
2177
+ setup(e, t) {
2178
+ const n = v(), o = q("design-item-context"), a = me(n, o), r = v(e.customClass), s = v(e.modelValue), f = Dn(e, t, n, s), c = An(e, t, n, f, s), l = v(), g = V(() => ({
2179
+ "f-cmp-inputgroup": !0,
2180
+ "input-group": !0,
2181
+ "f-state-disable": !0,
2182
+ "f-state-editable": !1,
2183
+ "f-state-readonly": !0
2184
+ }));
2185
+ ee(() => {
2186
+ n.value.componentInstance = a;
2187
+ }), t.expose(a.value);
2188
+ const i = V(() => {
2189
+ const C = {
2190
+ "f-button-edit": !0,
2191
+ "f-cmp-inputgroup": !0,
2192
+ "f-button-edit-nowrap": !e.wrapText
2193
+ };
2194
+ return r.value && r.value.split(" ").reduce((u, m) => (u[m] = !0, u), C), C;
2195
+ }), {
2196
+ renderButtonGroup: d
2197
+ } = Ln(e, t, c);
2198
+ return () => h("div", $e(t.attrs, {
1524
2199
  ref: n,
1525
- id: e.id,
1526
- disable: o.value,
1527
- readonly: u.value,
1528
- forcePlaceholder: e.forcePlaceholder,
1529
- editable: y.value,
1530
- buttonContent: e.dropDownIcon,
1531
- placeholder: e.placeholder,
1532
- enableClear: c.value,
1533
- maxLength: e.maxLength,
1534
- tabIndex: e.tabIndex,
1535
- enableTitle: e.enableTitle,
1536
- multiSelect: e.multiSelect,
1537
- inputType: e.multiSelect ? e.viewType : "text",
1538
- modelValue: b.value,
1539
- "onUpdate:modelValue": (S) => b.value = S,
1540
- focusOnCreated: e.focusOnCreated,
1541
- selectOnCreated: e.selectOnCreated,
1542
- onClear: d,
1543
- onClick: s,
1544
- onChange: k,
1545
- onInput: D,
1546
- beforeOpen: e.beforeOpen
1547
- }, {
1548
- default: () => [v(Qt, {
1549
- idField: e.idField,
1550
- valueField: e.valueField,
1551
- textField: e.textField,
1552
- titleField: e.titleField,
1553
- dataSource: f.value,
1554
- selectedValues: h.value,
1555
- multiSelect: e.multiSelect,
1556
- enableSearch: l.value,
1557
- maxHeight: e.maxHeight,
1558
- enableHighlightSearch: e.enableHighlightSearch,
1559
- width: e.fitEditor ? g.value : void 0,
1560
- onSelectionChange: m
1561
- }, null)]
1562
- });
2200
+ class: i.value,
2201
+ id: e.id
2202
+ }), [h("div", {
2203
+ class: g.value
2204
+ }, [h("input", {
2205
+ ref: l,
2206
+ class: "form-control",
2207
+ readonly: !0,
2208
+ placeholder: e.placeholder
2209
+ }, null), d()])]);
1563
2210
  }
1564
2211
  });
1565
- function Zt(e, t) {
2212
+ function $n(e, t) {
1566
2213
  e.schema;
1567
- const n = C(!0), o = C(!0);
1568
- function c(i) {
2214
+ const n = v(!0), o = v(!0);
2215
+ function a(i) {
1569
2216
  return !1;
1570
2217
  }
1571
- function l() {
2218
+ function r() {
1572
2219
  return !1;
1573
2220
  }
1574
- function u() {
2221
+ function s() {
1575
2222
  return !1;
1576
2223
  }
1577
2224
  function f() {
1578
2225
  return !0;
1579
2226
  }
1580
- function b(i) {
2227
+ function c(i) {
1581
2228
  }
1582
- function y() {
2229
+ function l() {
1583
2230
  }
1584
- function h(i) {
2231
+ function g(i) {
1585
2232
  return null;
1586
2233
  }
1587
2234
  return {
1588
- canAccepts: c,
1589
- checkCanDeleteComponent: l,
1590
- checkCanMoveComponent: u,
2235
+ canAccepts: a,
2236
+ checkCanDeleteComponent: r,
2237
+ checkCanMoveComponent: s,
1591
2238
  hideNestedPaddingInDesginerView: f,
1592
- onAcceptMovedChildElement: b,
1593
- resolveComponentContext: y,
2239
+ onAcceptMovedChildElement: c,
2240
+ resolveComponentContext: l,
1594
2241
  triggerBelongedComponentToMoveWhenMoved: n,
1595
2242
  triggerBelongedComponentToDeleteWhenDeleted: o,
1596
- getPropsConfig: h
2243
+ getPropsConfig: g
1597
2244
  };
1598
2245
  }
1599
- class Kt {
2246
+ class xn {
1600
2247
  constructor(t, n) {
1601
- L(this, "componentId");
1602
- L(this, "viewModelId");
1603
- L(this, "eventsEditorUtils");
1604
- L(this, "formSchemaUtils");
1605
- L(this, "formMetadataConverter");
1606
- L(this, "designViewModelUtils");
1607
- L(this, "designViewModelField");
1608
- L(this, "controlCreatorUtils");
1609
- L(this, "designerHostService");
1610
- L(this, "schemaService", null);
1611
- L(this, "metadataService", null);
1612
- L(this, "propertyConfig", {
2248
+ x(this, "componentId");
2249
+ x(this, "viewModelId");
2250
+ x(this, "eventsEditorUtils");
2251
+ x(this, "formSchemaUtils");
2252
+ x(this, "formMetadataConverter");
2253
+ x(this, "designViewModelUtils");
2254
+ x(this, "designViewModelField");
2255
+ x(this, "controlCreatorUtils");
2256
+ x(this, "designerHostService");
2257
+ x(this, "schemaService", null);
2258
+ x(this, "metadataService", null);
2259
+ x(this, "propertyConfig", {
1613
2260
  type: "object",
1614
2261
  categories: {}
1615
2262
  });
@@ -1625,7 +2272,7 @@ class Kt {
1625
2272
  if (n) {
1626
2273
  if (!this.designViewModelField) {
1627
2274
  const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1628
- this.designViewModelField = o.fields.find((c) => c.id === n);
2275
+ this.designViewModelField = o.fields.find((a) => a.id === n);
1629
2276
  }
1630
2277
  t.updateOn = this.designViewModelField.updateOn;
1631
2278
  }
@@ -1651,7 +2298,7 @@ class Kt {
1651
2298
  type: "combo-list",
1652
2299
  textField: "name",
1653
2300
  valueField: "value",
1654
- data: [{ value: t.type, name: j[t.type].name }]
2301
+ data: [{ value: t.type, name: B[t.type].name }]
1655
2302
  }
1656
2303
  }
1657
2304
  }
@@ -1677,13 +2324,26 @@ class Kt {
1677
2324
  }
1678
2325
  };
1679
2326
  }
2327
+ /**
2328
+ *
2329
+ * @param propertyId
2330
+ * @param componentInstance
2331
+ * @returns
2332
+ */
2333
+ updateElementByParentContainer(t, n) {
2334
+ const o = n && n.parent && n.parent.schema;
2335
+ if (!o)
2336
+ return;
2337
+ const a = o.contents.findIndex((s) => s.id === t), r = fe(o.contents[a]);
2338
+ o.contents.splice(a, 1), o.contents.splice(a, 0, r);
2339
+ }
1680
2340
  }
1681
- const R = class R {
2341
+ const U = class U {
1682
2342
  /**
1683
2343
  * 根据绑定字段类型获取可用的输入类控件
1684
2344
  */
1685
2345
  static getEditorTypesByMDataType(t) {
1686
- const n = R.fieldControlTypeMapping[t];
2346
+ const n = U.fieldControlTypeMapping[t];
1687
2347
  return n || [{ key: "", value: "" }];
1688
2348
  }
1689
2349
  /**
@@ -1691,9 +2351,9 @@ const R = class R {
1691
2351
  */
1692
2352
  static getAllInputTypes() {
1693
2353
  const t = [];
1694
- for (let n in R.fieldControlTypeMapping)
1695
- R.fieldControlTypeMapping[n].forEach((o) => {
1696
- t.find((c) => c.key === o.key && c.value === o.value) || t.push({ key: o.key, value: o.value });
2354
+ for (let n in U.fieldControlTypeMapping)
2355
+ U.fieldControlTypeMapping[n].forEach((o) => {
2356
+ t.find((a) => a.key === o.key && a.value === o.value) || t.push({ key: o.key, value: o.value });
1697
2357
  });
1698
2358
  return t;
1699
2359
  }
@@ -1701,66 +2361,68 @@ const R = class R {
1701
2361
  /**
1702
2362
  * <字段类型,可配置的控件类型列表>的映射
1703
2363
  */
1704
- L(R, "fieldControlTypeMapping", {
2364
+ x(U, "fieldControlTypeMapping", {
1705
2365
  String: [
1706
- { key: j["input-group"].type, value: j["input-group"].name },
1707
- { key: j.lookup.type, value: j.lookup.name },
1708
- { key: j["date-picker"].type, value: j["date-picker"].name },
1709
- { key: j["check-box"].type, value: j["check-box"].name },
1710
- { key: j["radio-group"].type, value: j["radio-group"].name },
1711
- { key: j["combo-list"].type, value: j["combo-list"].name },
1712
- { key: j.textarea.type, value: j.textarea.name }
2366
+ { key: B["input-group"].type, value: B["input-group"].name },
2367
+ { key: B.lookup.type, value: B.lookup.name },
2368
+ { key: B["date-picker"].type, value: B["date-picker"].name },
2369
+ { key: B["check-box"].type, value: B["check-box"].name },
2370
+ { key: B["radio-group"].type, value: B["radio-group"].name },
2371
+ { key: B["combo-list"].type, value: B["combo-list"].name },
2372
+ { key: B.textarea.type, value: B.textarea.name }
1713
2373
  ],
1714
2374
  Text: [
1715
- { key: j.textarea.type, value: j.textarea.name },
1716
- { key: j.lookup.type, value: j.lookup.name }
2375
+ { key: B.textarea.type, value: B.textarea.name },
2376
+ { key: B.lookup.type, value: B.lookup.name }
1717
2377
  ],
1718
2378
  Decimal: [
1719
- { key: j["number-spinner"].type, value: j["number-spinner"].name }
2379
+ { key: B["number-spinner"].type, value: B["number-spinner"].name }
1720
2380
  ],
1721
2381
  Integer: [
1722
- { key: j["number-spinner"].type, value: j["number-spinner"].name }
2382
+ { key: B["number-spinner"].type, value: B["number-spinner"].name }
1723
2383
  ],
1724
2384
  Number: [
1725
- { key: j["number-spinner"].type, value: j["number-spinner"].name }
2385
+ { key: B["number-spinner"].type, value: B["number-spinner"].name }
1726
2386
  ],
1727
2387
  BigNumber: [
1728
- { key: j["number-spinner"].type, value: j["number-spinner"].name }
2388
+ { key: B["number-spinner"].type, value: B["number-spinner"].name }
1729
2389
  ],
1730
2390
  Date: [
1731
- { key: j["date-picker"].type, value: j["date-picker"].name }
2391
+ { key: B["date-picker"].type, value: B["date-picker"].name }
1732
2392
  ],
1733
2393
  DateTime: [
1734
- { key: j["date-picker"].type, value: j["date-picker"].name }
2394
+ { key: B["date-picker"].type, value: B["date-picker"].name }
1735
2395
  ],
1736
2396
  Boolean: [
1737
- { key: j.switch.type, value: j.switch.name },
1738
- { key: j["check-box"].type, value: j["check-box"].name }
2397
+ { key: B.switch.type, value: B.switch.name },
2398
+ { key: B["check-box"].type, value: B["check-box"].name }
1739
2399
  ],
1740
2400
  Enum: [
1741
- { key: j["combo-list"].type, value: j["combo-list"].name },
1742
- { key: j["radio-group"].type, value: j["radio-group"].name }
2401
+ { key: B["combo-list"].type, value: B["combo-list"].name },
2402
+ { key: B["radio-group"].type, value: B["radio-group"].name }
1743
2403
  ],
1744
2404
  Object: [
1745
- { key: j.lookup.type, value: j.lookup.name },
1746
- { key: j["combo-list"].type, value: j["combo-list"].name },
1747
- { key: j["radio-group"].type, value: j["radio-group"].name }
2405
+ { key: B.lookup.type, value: B.lookup.name },
2406
+ { key: B["combo-list"].type, value: B["combo-list"].name },
2407
+ { key: B["radio-group"].type, value: B["radio-group"].name }
1748
2408
  ]
1749
2409
  });
1750
- let _ = R;
1751
- const en = C(0);
1752
- class tn extends Kt {
1753
- constructor(t, n) {
1754
- super(t, n);
1755
- }
1756
- getPropertyConfig(t, n) {
1757
- 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;
1758
- }
1759
- getBasicProperties(t, n) {
1760
- var u;
1761
- var o = this;
1762
- this.setDesignViewModelField(t);
1763
- const c = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
2410
+ let W = U;
2411
+ const Rn = v(0);
2412
+ class Nn extends xn {
2413
+ constructor(n, o) {
2414
+ super(n, o);
2415
+ x(this, "responseLayoutEditorFunction");
2416
+ this.responseLayoutEditorFunction = ye(this.formSchemaUtils);
2417
+ }
2418
+ getPropertyConfig(n, o) {
2419
+ 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;
2420
+ }
2421
+ getBasicProperties(n, o) {
2422
+ var f;
2423
+ var a = this;
2424
+ this.setDesignViewModelField(n);
2425
+ const r = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
1764
2426
  return {
1765
2427
  description: "Basic Information",
1766
2428
  title: "基本信息",
@@ -1772,8 +2434,8 @@ class tn extends Kt {
1772
2434
  readonly: !0
1773
2435
  },
1774
2436
  type: {
1775
- description: "组件类型",
1776
- title: "控件类型",
2437
+ description: "编辑器类型",
2438
+ title: "编辑器类型",
1777
2439
  type: "string",
1778
2440
  refreshPanelAfterChanged: !0,
1779
2441
  $converter: "/converter/change-editor.converter",
@@ -1782,7 +2444,7 @@ class tn extends Kt {
1782
2444
  textField: "value",
1783
2445
  valueField: "key",
1784
2446
  editable: !1,
1785
- data: o.designViewModelField ? _.getEditorTypesByMDataType((u = o.designViewModelField.type) == null ? void 0 : u.name) : _.getAllInputTypes()
2447
+ data: a.designViewModelField ? W.getEditorTypesByMDataType((f = a.designViewModelField.type) == null ? void 0 : f.name) : W.getAllInputTypes()
1786
2448
  }
1787
2449
  },
1788
2450
  label: {
@@ -1798,8 +2460,8 @@ class tn extends Kt {
1798
2460
  type: "field-selector",
1799
2461
  bindingType: { enable: !1 },
1800
2462
  editorParams: {
1801
- propertyData: t,
1802
- formBasicInfo: c
2463
+ propertyData: n,
2464
+ formBasicInfo: r
1803
2465
  },
1804
2466
  columns: [
1805
2467
  { field: "name", title: "字段名称" },
@@ -1807,22 +2469,27 @@ class tn extends Kt {
1807
2469
  { field: "fieldType", title: "字段类型" }
1808
2470
  ],
1809
2471
  textField: "bindingField",
1810
- data: l
2472
+ data: s
1811
2473
  }
1812
2474
  }
1813
2475
  },
1814
- setPropertyRelates(f, b) {
1815
- if (f)
1816
- switch (f && f.propertyID) {
2476
+ setPropertyRelates(c, l) {
2477
+ if (c)
2478
+ switch (c && c.propertyID) {
1817
2479
  case "type": {
1818
- o.changeControlType(t, f, n);
2480
+ a.changeControlType(n, c, o);
2481
+ break;
2482
+ }
2483
+ case "label": {
2484
+ c.needRefreshControlTree = !0;
1819
2485
  break;
1820
2486
  }
1821
2487
  }
1822
2488
  }
1823
2489
  };
1824
2490
  }
1825
- getAppearanceProperties(t) {
2491
+ getAppearanceProperties(n, o) {
2492
+ var a = this;
1826
2493
  return {
1827
2494
  title: "样式",
1828
2495
  description: "Appearance",
@@ -1843,61 +2510,74 @@ class tn extends Kt {
1843
2510
  description: "响应式列宽",
1844
2511
  title: "响应式列宽",
1845
2512
  type: "boolean",
1846
- visible: !1,
2513
+ visible: !0,
2514
+ // 这个属性,标记当属性变更得时候触发重新更新属性
2515
+ refreshPanelAfterChanged: !0,
1847
2516
  editor: {
1848
- type: "response-layout-editor-setting"
1849
- },
1850
- $converter: "/converter/response-form-layout.converter"
2517
+ type: "response-layout-editor-setting",
2518
+ initialState: a.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, a.componentId)
2519
+ }
1851
2520
  }
2521
+ },
2522
+ setPropertyRelates(r, s) {
2523
+ if (r)
2524
+ switch (r && r.propertyID) {
2525
+ case "responseLayout":
2526
+ a.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(r.propertyValue, a.componentId || n.id), a.updateUnifiedLayoutAfterResponseLayoutChanged(a.componentId), a.updateElementByParentContainer(n.id, o), delete n.responseLayout;
2527
+ break;
2528
+ case "class":
2529
+ a.updateUnifiedLayoutAfterControlChanged(r.propertyValue, n.id, this.componentId), a.updateElementByParentContainer(n.id, o);
2530
+ break;
2531
+ }
1852
2532
  }
1853
2533
  };
1854
2534
  }
1855
- getEditorProperties(t) {
1856
- return this.getComponentConfig(t);
2535
+ getEditorProperties(n) {
2536
+ return this.getComponentConfig(n);
1857
2537
  }
1858
2538
  /**
1859
2539
  * 卡片控件:切换控件类型后事件
1860
2540
  * @param propertyData 控件DOM属性
1861
2541
  * @param newControlType 新控件类型
1862
2542
  */
1863
- changeControlType(t, n, o) {
1864
- var y, h, i, r;
1865
- const c = n.propertyValue, l = o && o.parent && o.parent.schema;
1866
- if (!l)
2543
+ changeControlType(n, o, a) {
2544
+ var g, i, d, C;
2545
+ const r = o.propertyValue, s = a && a.parent && a.parent.schema;
2546
+ if (!s)
1867
2547
  return;
1868
- const u = l.contents.findIndex((g) => g.id === t.id), f = l.contents[u];
1869
- let b;
2548
+ const f = s.contents.findIndex((u) => u.id === n.id), c = s.contents[f];
2549
+ let l;
1870
2550
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
1871
2551
  editor: {
1872
- $type: c
2552
+ $type: r
1873
2553
  },
1874
2554
  name: this.designViewModelField.name,
1875
2555
  require: this.designViewModelField.require,
1876
2556
  readonly: this.designViewModelField.readonly
1877
- }, !1), b = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, c)), b || (b = re("form-group") || {}, b.editor = re(c) || {}, delete b.editor.id, delete b.editor.binding, delete b.editor.appearance), Object.assign(b, {
1878
- id: f.id,
1879
- appearance: f.appearance,
1880
- size: f.size,
1881
- label: f.label,
1882
- binding: f.binding,
1883
- visible: f.visible
1884
- }), Object.assign(b.editor, {
1885
- isTextArea: b.isTextArea && f.isTextArea,
1886
- placeholder: (y = f.editor) == null ? void 0 : y.placeholder,
1887
- holdPlace: (h = f.editor) == null ? void 0 : h.holdPlace,
1888
- readonly: (i = f.editor) == null ? void 0 : i.readonly,
1889
- require: (r = f.editor) == null ? void 0 : r.require
1890
- }), l.contents.splice(u, 1), l.contents.splice(u, 0, b), o.schema = Object.assign(f, b), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1891
- (g) => g.classList.remove("dgComponentSelected")
1892
- ), en.value++;
1893
- }
1894
- getComponentConfig(t, n = {}, o = {}) {
1895
- const c = Object.assign({
1896
- description: "组件信息",
1897
- title: "组件信息",
2557
+ }, !1), l = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), l || (l = ce("form-group") || {}, l.editor = ce(r) || {}, delete l.editor.id, delete l.editor.binding, delete l.editor.appearance), Object.assign(l, {
2558
+ id: c.id,
2559
+ appearance: c.appearance,
2560
+ size: c.size,
2561
+ label: c.label,
2562
+ binding: c.binding,
2563
+ visible: c.visible
2564
+ }), Object.assign(l.editor, {
2565
+ isTextArea: l.isTextArea && c.isTextArea,
2566
+ placeholder: (g = c.editor) == null ? void 0 : g.placeholder,
2567
+ holdPlace: (i = c.editor) == null ? void 0 : i.holdPlace,
2568
+ readonly: (d = c.editor) == null ? void 0 : d.readonly,
2569
+ require: (C = c.editor) == null ? void 0 : C.require
2570
+ }), s.contents.splice(f, 1), s.contents.splice(f, 0, l), a.schema = Object.assign(c, l), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
2571
+ (u) => u.classList.remove("dgComponentSelected")
2572
+ ), Rn.value++;
2573
+ }
2574
+ getComponentConfig(n, o = {}, a = {}) {
2575
+ const r = Object.assign({
2576
+ description: "编辑器",
2577
+ title: "编辑器",
1898
2578
  type: "input-group",
1899
2579
  $converter: "/converter/property-editor.converter"
1900
- }, n), l = Object.assign({
2580
+ }, o), s = Object.assign({
1901
2581
  readonly: {
1902
2582
  description: "",
1903
2583
  title: "只读",
@@ -1918,11 +2598,59 @@ class tn extends Kt {
1918
2598
  title: "提示文本",
1919
2599
  type: "string"
1920
2600
  }
1921
- }, o);
1922
- return { ...c, properties: { ...l } };
2601
+ }, a);
2602
+ return { ...r, properties: { ...s } };
2603
+ }
2604
+ /**
2605
+ * 修改某一输入控件的样式后更新Form的统一布局配置
2606
+ * @param controlClass 控件样式
2607
+ * @param controlId 控件Id
2608
+ * @param componentId 控件所在组件id
2609
+ */
2610
+ updateUnifiedLayoutAfterControlChanged(n, o, a) {
2611
+ const r = n.split(" ");
2612
+ let s = r.find((i) => /^col-([1-9]|10|11|12)$/.test(i)), f = r.find((i) => /^col-md-([1-9]|10|11|12)$/.test(i)), c = r.find((i) => /^col-xl-([1-9]|10|11|12)$/.test(i)), l = r.find((i) => /^col-el-([1-9]|10|11|12)$/.test(i));
2613
+ s = s || "col-12", f = f || "col-md-" + s.replace("col-", ""), c = c || "col-xl-" + f.replace("col-md-", ""), l = l || "col-el-" + c.replace("col-xl-", "");
2614
+ const g = {
2615
+ id: o,
2616
+ columnInSM: parseInt(s.replace("col-", ""), 10),
2617
+ columnInMD: parseInt(f.replace("col-md-", ""), 10),
2618
+ columnInLG: parseInt(c.replace("col-xl-", ""), 10),
2619
+ columnInEL: parseInt(l.replace("col-el-", ""), 10)
2620
+ };
2621
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(a, g);
2622
+ }
2623
+ /**
2624
+ * 修改控件布局配置后更新Form统一布局配置
2625
+ * @param componentId 组件Id
2626
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
2627
+ */
2628
+ updateUnifiedLayoutAfterResponseLayoutChanged(n, o) {
2629
+ const { formNode: a } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
2630
+ if (!a || !a.unifiedLayout)
2631
+ return;
2632
+ const r = [];
2633
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(a, r, 1), o) {
2634
+ const u = r.find((m) => m.id === o.id);
2635
+ Object.assign(u || {}, o);
2636
+ }
2637
+ const s = r.map((u) => u.columnInSM), f = r.map((u) => u.columnInMD), c = r.map((u) => u.columnInLG), l = r.map((u) => u.columnInEL), g = this.checkIsUniqueColumn(s) ? s[0] : null, i = this.checkIsUniqueColumn(f) ? f[0] : null, d = this.checkIsUniqueColumn(c) ? c[0] : null, C = this.checkIsUniqueColumn(l) ? l[0] : null;
2638
+ Object.assign(a.unifiedLayout, {
2639
+ uniqueColClassInSM: g,
2640
+ uniqueColClassInMD: i,
2641
+ uniqueColClassInLG: d,
2642
+ uniqueColClassInEL: C
2643
+ });
2644
+ }
2645
+ /**
2646
+ * 校验宽度样式值是否一致
2647
+ */
2648
+ checkIsUniqueColumn(n) {
2649
+ const o = new Set(n);
2650
+ return Array.from(o).length === 1;
1923
2651
  }
1924
2652
  }
1925
- class nn extends tn {
2653
+ class Un extends Nn {
1926
2654
  constructor(t, n) {
1927
2655
  super(t, n);
1928
2656
  }
@@ -1946,114 +2674,107 @@ class nn extends tn {
1946
2674
  });
1947
2675
  }
1948
2676
  }
1949
- function on(e, t) {
2677
+ function qn(e, t) {
1950
2678
  const {
1951
2679
  canAccepts: n,
1952
2680
  checkCanDeleteComponent: o,
1953
- checkCanMoveComponent: c,
1954
- hideNestedPaddingInDesginerView: l,
1955
- onAcceptMovedChildElement: u,
2681
+ checkCanMoveComponent: a,
2682
+ hideNestedPaddingInDesginerView: r,
2683
+ onAcceptMovedChildElement: s,
1956
2684
  resolveComponentContext: f,
1957
- triggerBelongedComponentToMoveWhenMoved: b,
1958
- triggerBelongedComponentToDeleteWhenDeleted: y
1959
- } = Zt(e), h = e.schema;
1960
- function i(r, g) {
1961
- return new nn(r, t).getPropertyConfig(h, g);
2685
+ triggerBelongedComponentToMoveWhenMoved: c,
2686
+ triggerBelongedComponentToDeleteWhenDeleted: l
2687
+ } = $n(e), g = e.schema;
2688
+ function i(d, C) {
2689
+ return new Un(d, t).getPropertyConfig(g, C);
1962
2690
  }
1963
2691
  return {
1964
2692
  canAccepts: n,
1965
2693
  checkCanDeleteComponent: o,
1966
- checkCanMoveComponent: c,
1967
- hideNestedPaddingInDesginerView: l,
1968
- onAcceptMovedChildElement: u,
2694
+ checkCanMoveComponent: a,
2695
+ hideNestedPaddingInDesginerView: r,
2696
+ onAcceptMovedChildElement: s,
1969
2697
  resolveComponentContext: f,
1970
- triggerBelongedComponentToMoveWhenMoved: b,
1971
- triggerBelongedComponentToDeleteWhenDeleted: y,
2698
+ triggerBelongedComponentToMoveWhenMoved: c,
2699
+ triggerBelongedComponentToDeleteWhenDeleted: l,
1972
2700
  getPropsConfig: i
1973
2701
  };
1974
2702
  }
1975
- const an = /* @__PURE__ */ H({
2703
+ const Hn = /* @__PURE__ */ R({
1976
2704
  name: "FComboListDesign",
1977
- props: ne,
2705
+ props: re,
1978
2706
  emits: ["clear", "update:modelValue", "change"],
1979
2707
  setup(e, t) {
1980
- const n = C(), o = X("designer-host-service"), c = X("design-item-context"), l = on(c, o), u = Ge(n, c, l);
1981
- return ce(() => {
1982
- n.value.componentInstance = u;
1983
- }), t.expose(u.value), () => v(ue, {
2708
+ const n = v(), o = q("designer-host-service"), a = q("design-item-context"), r = qn(a, o), s = me(n, a, r);
2709
+ return ee(() => {
2710
+ n.value.componentInstance = s;
2711
+ }), t.expose(s.value), () => h(En, {
1984
2712
  ref: n,
1985
- id: e.id,
1986
- disable: e.disabled,
1987
- readonly: e.readonly,
1988
- forcePlaceholder: e.forcePlaceholder,
1989
- editable: !1,
1990
2713
  buttonContent: e.dropDownIcon,
2714
+ readonly: !0,
2715
+ editable: !1,
2716
+ forcePlaceholder: !0,
1991
2717
  placeholder: e.placeholder,
1992
- enableClear: !1,
1993
- maxLength: e.maxLength,
1994
- tabIndex: e.tabIndex,
1995
- enableTitle: e.enableTitle,
1996
- multiSelect: e.multiSelect,
1997
- inputType: e.multiSelect ? "tag" : "text"
2718
+ enableClear: !0
1998
2719
  }, null);
1999
2720
  }
2000
- }), rn = (e) => {
2721
+ }), Gn = (e) => {
2001
2722
  const t = e;
2002
2723
  return t.install = function(n) {
2003
2724
  n.component(t.name, e);
2004
2725
  }, e;
2005
2726
  };
2006
2727
  G.register = (e, t, n, o) => {
2007
- e["combo-list"] = G, t["combo-list"] = ge;
2728
+ e["combo-list"] = G, t["combo-list"] = we;
2008
2729
  };
2009
2730
  G.registerDesigner = (e, t, n) => {
2010
- e["combo-list"] = an, t["combo-list"] = ge;
2731
+ e["combo-list"] = Hn, t["combo-list"] = we;
2011
2732
  };
2012
- const q = rn(G), z = /* @__PURE__ */ H({
2733
+ const _ = Gn(G), Q = /* @__PURE__ */ R({
2013
2734
  name: "FOrder",
2014
- props: te,
2735
+ props: ae,
2015
2736
  emits: ["change"],
2016
2737
  setup(e, t) {
2017
- const n = C(e.items), o = C("排序列"), c = C("排序方式"), l = C("添加排序列"), u = [{
2738
+ const n = v(e.items), o = v("排序列"), a = v("排序方式"), r = v("添加排序列"), s = [{
2018
2739
  id: "asc",
2019
2740
  name: "升序"
2020
2741
  }, {
2021
2742
  id: "desc",
2022
2743
  name: "降序"
2023
- }], f = C(/* @__PURE__ */ new Map());
2024
- function b() {
2025
- const s = n.value.map((d) => [d.id, !0]);
2026
- f.value = new Map(s);
2744
+ }], f = v(/* @__PURE__ */ new Map());
2745
+ function c() {
2746
+ const p = n.value.map((y) => [y.id, !0]);
2747
+ f.value = new Map(p);
2027
2748
  }
2028
- b();
2029
- const y = B(() => e.dataSource.map((s) => (s.disabled = f.value.has(s.id), s))), h = B(() => ({
2749
+ c();
2750
+ const l = V(() => e.dataSource.map((p) => (p.disabled = f.value.has(p.id), p))), g = V(() => ({
2030
2751
  "f-order": !0
2031
2752
  }));
2032
- function i(s) {
2033
- n.value = n.value.filter((d) => d.id !== s.id), b(), t.emit("change", n.value);
2753
+ function i(p) {
2754
+ n.value = n.value.filter((y) => y.id !== p.id), c(), t.emit("change", n.value);
2034
2755
  }
2035
- function r() {
2756
+ function d() {
2036
2757
  n.value = [...n.value, {
2037
2758
  id: Date.now().toString(),
2038
2759
  name: "",
2039
2760
  order: "asc"
2040
- }], b(), t.emit("change", n.value);
2761
+ }], c(), t.emit("change", n.value);
2041
2762
  }
2042
- function g(s) {
2043
- if (s && s.length === 1) {
2044
- const d = s[0], k = n.value.find((F) => F.id === d.id);
2045
- k && (k.name = d.name);
2763
+ function C(p) {
2764
+ if (p && p.length === 1) {
2765
+ const y = p[0], S = n.value.find((k) => k.id === y.id);
2766
+ S && (S.name = y.name);
2046
2767
  }
2047
- b(), t.emit("change", n.value);
2768
+ c(), t.emit("change", n.value);
2048
2769
  }
2049
- function a(s) {
2050
- if (s && s.length) {
2051
- const d = /* @__PURE__ */ new Map();
2052
- s.reduce((k, F) => (k.set(F.id, F), k), d), n.value = s.map((k) => d.get(k.id)), t.emit("change", n.value);
2770
+ function u(p) {
2771
+ if (p && p.length) {
2772
+ const y = /* @__PURE__ */ new Map();
2773
+ p.reduce((S, k) => (S.set(k.id, k), S), y), n.value = p.map((S) => y.get(S.id)), t.emit("change", n.value);
2053
2774
  }
2054
2775
  }
2055
2776
  function m() {
2056
- return v(me, {
2777
+ return h(ve, {
2057
2778
  style: "flex:1",
2058
2779
  data: n.value,
2059
2780
  draggable: !0,
@@ -2061,157 +2782,157 @@ const q = rn(G), z = /* @__PURE__ */ H({
2061
2782
  "keep-order": !0,
2062
2783
  itemClass: "f-order-item",
2063
2784
  onRemoveItem: i,
2064
- onChange: a
2785
+ onChange: u
2065
2786
  }, {
2066
- header: () => v("div", {
2787
+ header: () => h("div", {
2067
2788
  class: "f-order-header"
2068
- }, [v("span", {
2789
+ }, [h("span", {
2069
2790
  class: "f-order-header-order-field"
2070
- }, [o.value]), v("span", {
2791
+ }, [o.value]), h("span", {
2071
2792
  class: "f-order-header-order-type"
2072
- }, [c.value])]),
2073
- itemContent: (s) => v("div", {
2793
+ }, [a.value])]),
2794
+ itemContent: (p) => h("div", {
2074
2795
  class: "f-order-item-content"
2075
- }, [v(q, {
2796
+ }, [h(_, {
2076
2797
  class: "f-order-item-content-order-field",
2077
- data: y.value,
2798
+ data: l.value,
2078
2799
  valueField: "id",
2079
2800
  textField: "name",
2080
2801
  idField: "id",
2081
- modelValue: s.id,
2082
- "onUpdate:modelValue": (d) => s.id = d,
2083
- onChange: g,
2084
- onClear: g
2085
- }, null), v(q, {
2802
+ modelValue: p.id,
2803
+ "onUpdate:modelValue": (y) => p.id = y,
2804
+ onChange: C,
2805
+ onClear: C
2806
+ }, null), h(_, {
2086
2807
  class: "f-order-item-content-order-type",
2087
- data: u,
2808
+ data: s,
2088
2809
  valueField: "id",
2089
2810
  textField: "name",
2090
2811
  idField: "id",
2091
- modelValue: s.order,
2092
- "onUpdate:modelValue": (d) => s.order = d,
2093
- onChange: g
2812
+ modelValue: p.order,
2813
+ "onUpdate:modelValue": (y) => p.order = y,
2814
+ onChange: C
2094
2815
  }, null)]),
2095
- footer: () => v("div", {
2816
+ footer: () => h("div", {
2096
2817
  class: "f-order-footer"
2097
- }, [v(ye, {
2818
+ }, [h(Ce, {
2098
2819
  type: "link",
2099
2820
  class: "f-order-add-button",
2100
- onClick: r
2821
+ onClick: d
2101
2822
  }, {
2102
- default: () => v(Q, null, [v("span", {
2823
+ default: () => h(K, null, [h("span", {
2103
2824
  class: "f-order-add-icon"
2104
- }, [v("i", {
2825
+ }, [h("i", {
2105
2826
  class: "f-icon f-icon-add"
2106
- }, null)]), l.value])
2827
+ }, null)]), r.value])
2107
2828
  })])
2108
2829
  });
2109
2830
  }
2110
- return () => v("div", {
2111
- class: h.value
2831
+ return () => h("div", {
2832
+ class: g.value
2112
2833
  }, [m()]);
2113
2834
  }
2114
2835
  });
2115
- function ln(e, t, n) {
2116
- var S;
2836
+ function Wn(e, t, n) {
2837
+ var w;
2117
2838
  function o() {
2118
2839
  n != null && n.resolveComponentContext && n.resolveComponentContext();
2119
2840
  }
2120
2841
  o();
2121
- const c = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", u = C();
2842
+ const a = n && n.getStyles && n.getStyles() || "", r = n && n.getDesignerClass && n.getDesignerClass() || "", s = v();
2122
2843
  function f() {
2123
2844
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
2124
2845
  }
2125
- function b() {
2846
+ function c() {
2126
2847
  return !1;
2127
2848
  }
2128
- function y() {
2849
+ function l() {
2129
2850
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
2130
2851
  }
2131
- function h() {
2852
+ function g() {
2132
2853
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
2133
2854
  }
2134
- function i(w) {
2135
- if (!w || !w.value)
2855
+ function i(b) {
2856
+ if (!b || !b.value)
2136
2857
  return null;
2137
- if (w.value.schema && w.value.schema.type === "component")
2138
- return w.value;
2139
- const V = C(w == null ? void 0 : w.value.parent), p = i(V);
2140
- return p || null;
2858
+ if (b.value.schema && b.value.schema.type === "component")
2859
+ return b.value;
2860
+ const T = v(b == null ? void 0 : b.value.parent), F = i(T);
2861
+ return F || null;
2141
2862
  }
2142
- function r(w = t) {
2143
- const { componentInstance: V, designerItemElementRef: p } = w;
2144
- return !V || !V.value ? null : V.value.canMove ? p : r(w.parent);
2863
+ function d(b = t) {
2864
+ const { componentInstance: T, designerItemElementRef: F } = b;
2865
+ return !T || !T.value ? null : T.value.canMove ? F : d(b.parent);
2145
2866
  }
2146
- function g(w) {
2147
- return !!n && n.canAccepts(w);
2867
+ function C(b) {
2868
+ return !!n && n.canAccepts(b);
2148
2869
  }
2149
- function a() {
2870
+ function u() {
2150
2871
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
2151
2872
  }
2152
2873
  function m() {
2153
2874
  }
2154
- function s(w, V) {
2155
- V && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(V);
2875
+ function p(b, T) {
2876
+ T && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(T);
2156
2877
  }
2157
- function d(w) {
2158
- const { componentType: V } = w;
2159
- let p = U(V, w);
2160
- n && n.onResolveNewComponentSchema && (p = n.onResolveNewComponentSchema(w, p));
2161
- const M = V.toLowerCase().replace("-", "_");
2162
- return p && !p.id && p.type === V && (p.id = `${M}_${Math.random().toString().slice(2, 6)}`), p;
2878
+ function y(b, T) {
2879
+ const { componentType: F } = b;
2880
+ let I = H(F, b, T);
2881
+ n && n.onResolveNewComponentSchema && (I = n.onResolveNewComponentSchema(b, I));
2882
+ const O = F.toLowerCase().replace("-", "_");
2883
+ return I && !I.id && I.type === F && (I.id = `${O}_${Math.random().toString().slice(2, 6)}`), I;
2163
2884
  }
2164
- function k(w, V) {
2165
- const p = String(w.getAttribute("data-controltype")), M = w.getAttribute("data-feature"), A = M ? JSON.parse(M) : {};
2166
- A.parentComponentInstance = u.value;
2167
- let T = U(p, A);
2168
- n && n.onAcceptNewChildElement && (T = n.onAcceptNewChildElement(w, V, T));
2169
- const $ = p.toLowerCase().replace("-", "_");
2170
- return T && !T.id && T.type === p && (T.id = `${$}_${Math.random().toString().slice(2, 6)}`), T;
2885
+ function S(b, T) {
2886
+ const F = String(b.getAttribute("data-controltype")), I = b.getAttribute("data-feature"), O = I ? JSON.parse(I) : {};
2887
+ O.parentComponentInstance = s.value;
2888
+ let M = H(F, O);
2889
+ n && n.onAcceptNewChildElement && (M = n.onAcceptNewChildElement(b, T, M));
2890
+ const D = F.toLowerCase().replace("-", "_");
2891
+ return M && !M.id && M.type === F && (M.id = `${D}_${Math.random().toString().slice(2, 6)}`), M;
2171
2892
  }
2172
- function F(w) {
2893
+ function k(b) {
2173
2894
  }
2174
- function D(...w) {
2895
+ function j(...b) {
2175
2896
  if (n && n.getPropsConfig)
2176
- return n.getPropsConfig(...w);
2897
+ return n.getPropsConfig(...b);
2177
2898
  }
2178
- return u.value = {
2899
+ return s.value = {
2179
2900
  canMove: f(),
2180
- canSelectParent: b(),
2181
- canDelete: y(),
2182
- canNested: !h(),
2901
+ canSelectParent: c(),
2902
+ canDelete: l(),
2903
+ canNested: !g(),
2183
2904
  contents: t == null ? void 0 : t.schema.contents,
2184
2905
  elementRef: e,
2185
- parent: (S = t == null ? void 0 : t.parent) == null ? void 0 : S.componentInstance,
2906
+ parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
2186
2907
  schema: t == null ? void 0 : t.schema,
2187
- styles: c,
2188
- designerClass: l,
2189
- canAccepts: g,
2908
+ styles: a,
2909
+ designerClass: r,
2910
+ canAccepts: C,
2190
2911
  getBelongedComponentInstance: i,
2191
- getDraggableDesignItemElement: r,
2192
- getDraggingDisplayText: a,
2193
- getPropConfig: D,
2912
+ getDraggableDesignItemElement: d,
2913
+ getDraggingDisplayText: u,
2914
+ getPropConfig: j,
2194
2915
  getDragScopeElement: m,
2195
- onAcceptMovedChildElement: s,
2196
- onAcceptNewChildElement: k,
2197
- onChildElementMovedOut: F,
2198
- addNewChildComponentSchema: d,
2916
+ onAcceptMovedChildElement: p,
2917
+ onAcceptNewChildElement: S,
2918
+ onChildElementMovedOut: k,
2919
+ addNewChildComponentSchema: y,
2199
2920
  updateDragAndDropRules: o,
2200
- triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1),
2201
- triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
2202
- }, u;
2921
+ triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || v(!1),
2922
+ triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || v(!1)
2923
+ }, s;
2203
2924
  }
2204
- function sn() {
2925
+ function _n() {
2205
2926
  function e(t) {
2206
- var c, l;
2927
+ var a, r;
2207
2928
  if (!t)
2208
2929
  return !1;
2209
- const n = ((c = t.targetContainer) == null ? void 0 : c.componentInstance) && t.targetContainer.componentInstance.value;
2930
+ const n = ((a = t.targetContainer) == null ? void 0 : a.componentInstance) && t.targetContainer.componentInstance.value;
2210
2931
  if (!n)
2211
2932
  return !1;
2212
- const o = (l = n.schema.appearance) == null ? void 0 : l.class;
2933
+ const o = (r = n.schema.appearance) == null ? void 0 : r.class;
2213
2934
  if (t.controlCategory === "input" || t.controlType === "form-group") {
2214
- const u = n.schema.type, f = (u === "response-form" || u === "content-container") && o && o.includes("farris-form");
2935
+ const s = n.schema.type, f = (s === "response-form" || s === "content-container") && o && o.includes("farris-form");
2215
2936
  if (n.schema.type !== "response-layout-item" && !f)
2216
2937
  return !1;
2217
2938
  }
@@ -2221,7 +2942,7 @@ function sn() {
2221
2942
  basalDragulaRuleForContainer: e
2222
2943
  };
2223
2944
  }
2224
- const cn = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-design.gitee.io/dragging-rules.schema.json", dn = "Dragging Rules", pn = "The rules of designer canvas", fn = "object", mn = {
2945
+ const zn = "https://json-schema.org/draft/2020-12/schema", Xn = "https://farris-design.gitee.io/dragging-rules.schema.json", Jn = "Dragging Rules", Qn = "The rules of designer canvas", Yn = "object", Zn = {
2225
2946
  "f-page": {
2226
2947
  description: "The root class of page designed by farris.",
2227
2948
  type: "object",
@@ -2640,6 +3361,80 @@ const cn = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-
2640
3361
  "f-list-nav-left": {
2641
3362
  description: "",
2642
3363
  type: "object"
3364
+ },
3365
+ "f-struct-data-grid-in-nav": {
3366
+ description: "",
3367
+ type: "object",
3368
+ properties: {
3369
+ contents: {
3370
+ type: "object",
3371
+ properties: {
3372
+ "f-section-form": {
3373
+ description: "",
3374
+ type: "object",
3375
+ properties: {
3376
+ rules: {
3377
+ type: "object",
3378
+ properties: {
3379
+ canAccept: {
3380
+ type: "boolean",
3381
+ const: !1
3382
+ },
3383
+ fixed: {
3384
+ type: "boolean",
3385
+ const: !0
3386
+ },
3387
+ hidePadding: {
3388
+ type: "boolean",
3389
+ const: !0
3390
+ }
3391
+ }
3392
+ }
3393
+ }
3394
+ },
3395
+ "f-section-grid": {
3396
+ description: "",
3397
+ type: "object",
3398
+ properties: {
3399
+ rules: {
3400
+ type: "object",
3401
+ properties: {
3402
+ canAccept: {
3403
+ type: "boolean",
3404
+ const: !1
3405
+ },
3406
+ fixed: {
3407
+ type: "boolean",
3408
+ const: !0
3409
+ },
3410
+ hidePadding: {
3411
+ type: "boolean",
3412
+ const: !0
3413
+ }
3414
+ }
3415
+ }
3416
+ }
3417
+ }
3418
+ }
3419
+ },
3420
+ rules: {
3421
+ type: "object",
3422
+ properties: {
3423
+ canAccept: {
3424
+ type: "boolean",
3425
+ const: !1
3426
+ },
3427
+ fixed: {
3428
+ type: "boolean",
3429
+ const: !0
3430
+ },
3431
+ hidePadding: {
3432
+ type: "boolean",
3433
+ const: !0
3434
+ }
3435
+ }
3436
+ }
3437
+ }
2643
3438
  }
2644
3439
  }
2645
3440
  }
@@ -2785,268 +3580,335 @@ const cn = "https://json-schema.org/draft/2020-12/schema", un = "https://farris-
2785
3580
  description: "",
2786
3581
  type: "object"
2787
3582
  }
2788
- }, yn = [], gn = {
2789
- $schema: cn,
2790
- $id: un,
2791
- title: dn,
2792
- description: pn,
2793
- type: fn,
2794
- properties: mn,
2795
- required: yn
2796
- }, J = /* @__PURE__ */ new Map();
2797
- function hn() {
2798
- function e(a, m, s, d) {
2799
- var k;
2800
- if (typeof s == "number")
2801
- return ((k = d[a]) == null ? void 0 : k.length) === s;
2802
- if (typeof s == "object") {
2803
- const F = Object.keys(s)[0], D = s[F];
2804
- if (F === "not")
2805
- return Number(d[a].length) !== Number(D);
2806
- if (F === "moreThan")
2807
- return Number(d[a].length) >= Number(D);
2808
- if (F === "lessThan")
2809
- return Number(d[a].length) <= Number(D);
3583
+ }, Kn = {
3584
+ $schema: zn,
3585
+ $id: Xn,
3586
+ title: Jn,
3587
+ description: Qn,
3588
+ type: Yn,
3589
+ properties: Zn
3590
+ }, Y = /* @__PURE__ */ new Map();
3591
+ function eo() {
3592
+ function e(u, m, p, y) {
3593
+ var S;
3594
+ if (typeof p == "number")
3595
+ return ((S = y[u]) == null ? void 0 : S.length) === p;
3596
+ if (typeof p == "object") {
3597
+ const k = Object.keys(p)[0], j = p[k];
3598
+ if (k === "not")
3599
+ return Number(y[u].length) !== Number(j);
3600
+ if (k === "moreThan")
3601
+ return Number(y[u].length) >= Number(j);
3602
+ if (k === "lessThan")
3603
+ return Number(y[u].length) <= Number(j);
2810
3604
  }
2811
3605
  return !1;
2812
3606
  }
2813
- function t(a, m, s, d) {
2814
- return typeof s == "boolean" ? d.childrenClassList.includes(m) === !!s : !1;
3607
+ function t(u, m, p, y) {
3608
+ return typeof p == "boolean" ? y.childrenClassList.includes(m) === !!p : !1;
2815
3609
  }
2816
- function n(a, m, s, d) {
2817
- return typeof s == "boolean" ? d.parentClassList.includes(m) === !!s : !1;
3610
+ function n(u, m, p, y) {
3611
+ return typeof p == "boolean" ? y.parentClassList.includes(m) === !!p : !1;
2818
3612
  }
2819
- function o(a, m, s, d) {
2820
- return typeof s == "boolean" ? d.parentClassList.includes(m) === !!s : !1;
3613
+ function o(u, m, p, y) {
3614
+ return typeof p == "boolean" ? y.parentClassList.includes(m) === !!p : !1;
2821
3615
  }
2822
- const c = /* @__PURE__ */ new Map([
3616
+ const a = /* @__PURE__ */ new Map([
2823
3617
  ["length", e],
2824
3618
  ["hasChildren", t],
2825
3619
  ["hasSibling", o],
2826
3620
  ["hasParent", n]
2827
3621
  ]);
2828
- function l(a, m) {
2829
- const s = a;
2830
- return typeof m == "number" ? [{ target: s, operator: "length", param: null, value: Number(m) }] : typeof m == "object" ? Object.keys(m).map((d) => {
2831
- if (d === "length")
2832
- return { target: s, operator: "length", param: null, value: m[d] };
2833
- const k = d, F = m[d];
2834
- return { target: s, operator: a === "children" ? "hasChildren" : a === "parent" ? "hasParent" : "hasSibling", param: k, value: F };
3622
+ function r(u, m) {
3623
+ const p = u;
3624
+ return typeof m == "number" ? [{ target: p, operator: "length", param: null, value: Number(m) }] : typeof m == "object" ? Object.keys(m).map((y) => {
3625
+ if (y === "length")
3626
+ return { target: p, operator: "length", param: null, value: m[y] };
3627
+ const S = y, k = m[y];
3628
+ return { target: p, operator: u === "children" ? "hasChildren" : u === "parent" ? "hasParent" : "hasSibling", param: S, value: k };
2835
3629
  }) : [];
2836
3630
  }
2837
- function u(a, m) {
2838
- if (c.has(a.operator)) {
2839
- const s = c.get(a.operator);
2840
- return s && s(a.target, a.param, a.value, m) || !1;
3631
+ function s(u, m) {
3632
+ if (a.has(u.operator)) {
3633
+ const p = a.get(u.operator);
3634
+ return p && p(u.target, u.param, u.value, m) || !1;
2841
3635
  }
2842
3636
  return !1;
2843
3637
  }
2844
- function f(a, m) {
2845
- return Object.keys(a).reduce((F, D) => {
2846
- const S = l(D, a[D]);
2847
- return F.push(...S), F;
2848
- }, []).reduce((F, D) => F && u(D, m), !0);
3638
+ function f(u, m) {
3639
+ return Object.keys(u).reduce((k, j) => {
3640
+ const w = r(j, u[j]);
3641
+ return k.push(...w), k;
3642
+ }, []).reduce((k, j) => k && s(j, m), !0);
2849
3643
  }
2850
- function b(a, m) {
2851
- const s = Object.keys(a), d = s.includes("allOf"), k = s.includes("anyOf"), F = d || k, w = (F ? a[F ? d ? "allOf" : "anyOf" : "allOf"] : [a]).map((p) => f(p, m));
2852
- return d ? !w.includes(!1) : w.includes(!0);
3644
+ function c(u, m) {
3645
+ const p = Object.keys(u), y = p.includes("allOf"), S = p.includes("anyOf"), k = y || S, b = (k ? u[k ? y ? "allOf" : "anyOf" : "allOf"] : [u]).map((F) => f(F, m));
3646
+ return y ? !b.includes(!1) : b.includes(!0);
2853
3647
  }
2854
- function y(a, m) {
2855
- const s = a.const;
2856
- return s ? typeof s == "boolean" ? s : typeof s == "object" ? b(s, m) : !1 : !1;
3648
+ function l(u, m) {
3649
+ const p = u.const;
3650
+ return p ? typeof p == "boolean" ? p : typeof p == "object" ? c(p, m) : !1 : !1;
2857
3651
  }
2858
- function h(a) {
3652
+ function g(u) {
2859
3653
  return (m) => {
2860
- const s = { canAccept: !0, fixed: !1, hidePadding: !1 };
2861
- return a && a.properties && Object.keys(a.properties).reduce((d, k) => {
2862
- const F = a.properties[k];
2863
- return d[k] = y(F, m), d;
2864
- }, s), s;
3654
+ const p = { canAccept: !0, fixed: !1, hidePadding: !1 };
3655
+ return u && u.properties && Object.keys(u.properties).reduce((y, S) => {
3656
+ const k = u.properties[S];
3657
+ return y[S] = l(k, m), y;
3658
+ }, p), p;
2865
3659
  };
2866
3660
  }
2867
- function i(a, m, s) {
3661
+ function i(u, m, p) {
2868
3662
  if (m.type === "object" && m.properties) {
2869
- const { rules: d, contents: k } = m.properties;
2870
- s.set(a, h(d)), k && Object.keys(k.properties).forEach(
2871
- (F) => i(F, k.properties[F], s)
3663
+ const { rules: y, contents: S } = m.properties;
3664
+ p.set(u, g(y)), S && Object.keys(S.properties).forEach(
3665
+ (k) => i(k, S.properties[k], p)
2872
3666
  );
2873
3667
  }
2874
3668
  }
2875
- function r() {
2876
- const { properties: a } = gn;
2877
- Object.keys(a).forEach((m) => {
2878
- i(m, a[m], J);
3669
+ function d() {
3670
+ const { properties: u } = Kn;
3671
+ Object.keys(u).forEach((m) => {
3672
+ i(m, u[m], Y);
2879
3673
  });
2880
3674
  }
2881
- function g(a, m) {
2882
- const s = { canAccept: !0, fixed: !1, hidePadding: !0 };
2883
- return J.has(a) ? J.get(a)(m) : s;
3675
+ function C(u, m) {
3676
+ const p = { canAccept: !0, fixed: !1, hidePadding: !0 };
3677
+ return Y.has(u) ? Y.get(u)(m) : p;
2884
3678
  }
2885
- return r(), { getRuleValue: g };
3679
+ return d(), { getRuleValue: C };
2886
3680
  }
2887
- function bn(e, t) {
2888
- var V;
2889
- const n = e.schema, o = (V = e.parent) == null ? void 0 : V.schema, c = hn(), l = C(!1), u = C(!1);
2890
- let f = !0, b = !1, y, h = !1;
2891
- function i(p) {
2892
- return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ? p.sourceType === "control" && p.controlCategory === "input" || p.sourceType === "move" && p.controlType === "form-group" : !0;
3681
+ function to(e, t) {
3682
+ function n(c, l = null) {
3683
+ if (l) return l;
3684
+ const g = e.getComponentById(t);
3685
+ return e.selectNode(g, (i) => i.id === c);
3686
+ }
3687
+ function o(c) {
3688
+ const l = e.getComponentById(c);
3689
+ return !(!l || !l.componentType || !l.componentType.startsWith("form"));
3690
+ }
3691
+ function a(c) {
3692
+ const l = n(c.id), g = ye(e), i = [];
3693
+ g.getResonseFormLayoutConfig(l, i, 1);
3694
+ const d = i.map((j) => j.columnInSM), C = i.map((j) => j.columnInMD), u = i.map((j) => j.columnInLG), m = i.map((j) => j.columnInEL), p = r(d) ? d[0] : 0, y = r(C) ? C[0] : 0, S = r(u) ? u[0] : 0, k = r(m) ? m[0] : 0;
3695
+ return {
3696
+ uniqueColClassInSM: p,
3697
+ uniqueColClassInMD: y,
3698
+ uniqueColClassInLG: S,
3699
+ uniqueColClassInEL: k
3700
+ };
2893
3701
  }
2894
- function r(p) {
2895
- return !(!sn().basalDragulaRuleForContainer(p) || !f || !i(p));
3702
+ function r(c) {
3703
+ const l = new Set(c);
3704
+ return Array.from(l).length === 1;
2896
3705
  }
2897
- function g() {
2898
- l.value = !1, u.value = !1;
2899
- const p = n, M = p.appearance && p.appearance.class || "", A = M.split(" "), T = p.contents || [], $ = T.length ? T[0] : null, O = $ && $.appearance ? $.appearance.class : "", P = O ? O.split(" ") : [], E = T.length ? T.reduce((oe, W) => {
2900
- const ae = W && W.appearance ? W.appearance.class : "", we = ae ? ae.split(" ") : [];
2901
- return oe.push(...we), oe;
2902
- }, []) : [], I = o, x = I && I.appearance && I.appearance.class || "", he = x ? x.split(" ") : [];
2903
- y = {
2904
- componentClass: M,
2905
- componentClassList: A,
2906
- childContents: T,
2907
- firstChildContent: $,
2908
- firstChildClass: O,
2909
- firstChildClassList: P,
2910
- parent: I,
2911
- parentClass: x,
2912
- parentClassList: he,
2913
- children: T,
2914
- childrenClassList: E
3706
+ function s(c, l, g) {
3707
+ c = n(g, c), c.contents.forEach((i) => {
3708
+ if (i.type === tt.fieldset.type) {
3709
+ s(i, l, i.id);
3710
+ return;
3711
+ }
3712
+ i.appearance || (i.appearance = {});
3713
+ const d = i.appearance.class;
3714
+ i.appearance.class = f(d, l);
3715
+ });
3716
+ }
3717
+ function f(c, l) {
3718
+ let g, i, d, C, u = [];
3719
+ if (c) {
3720
+ const j = c.split(" "), w = j.filter((b) => b.startsWith("col-"));
3721
+ g = w.find((b) => /^col-([1-9]|10|11|12)$/.test(b)), i = w.find((b) => /^col-md-([1-9]|10|11|12)$/.test(b)), d = w.find((b) => /^col-xl-([1-9]|10|11|12)$/.test(b)), C = w.find((b) => /^col-el-([1-9]|10|11|12)$/.test(b)), u = j.filter((b) => !b.startsWith("col-"));
3722
+ }
3723
+ const m = l.uniqueColClassInSM ? "col-" + l.uniqueColClassInSM : g, p = l.uniqueColClassInMD ? "col-md-" + l.uniqueColClassInMD : i, y = l.uniqueColClassInLG ? "col-xl-" + l.uniqueColClassInLG : d, S = l.uniqueColClassInEL ? "col-el-" + l.uniqueColClassInEL : C;
3724
+ return [m, p, y, S].concat(u).join(" ");
3725
+ }
3726
+ return { checkIsInFormComponent: o, assembleUnifiedLayoutContext: a, changeFormControlsByUnifiedLayoutConfig: s };
3727
+ }
3728
+ class no extends et {
3729
+ constructor(t, n) {
3730
+ super(t, n);
3731
+ }
3732
+ getPropertyConfig(t, n) {
3733
+ var o = this;
3734
+ this.propertyConfig.categories.basic = this.getBasicPropConfig(t);
3735
+ const { checkIsInFormComponent: a, assembleUnifiedLayoutContext: r, changeFormControlsByUnifiedLayoutConfig: s } = to(this.formSchemaUtils, this.componentId), f = this.getAppearanceConfig(t);
3736
+ return f.properties.unifiedLayout = {
3737
+ title: "统一布局配置",
3738
+ description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
3739
+ visible: a(this.componentId),
3740
+ refreshPanelAfterChanged: !0,
3741
+ editor: {
3742
+ type: "response-form-layout-setting",
3743
+ initialState: r(t)
3744
+ }
3745
+ }, f.setPropertyRelates = function(c, l) {
3746
+ if (c)
3747
+ switch (c && c.propertyID) {
3748
+ case "unifiedLayout": {
3749
+ s(null, c.propertyValue, t.id), o.updateElementByParentContainer(t.id, n);
3750
+ break;
3751
+ }
3752
+ }
3753
+ }, this.propertyConfig.categories.appearance = f, this.propertyConfig;
3754
+ }
3755
+ }
3756
+ function oo(e, t) {
3757
+ var F;
3758
+ const n = e.schema, o = (F = e.parent) == null ? void 0 : F.schema, a = eo(), r = v(!1), s = v(!1);
3759
+ let f = !0, c = !1, l, g = !1;
3760
+ function i(I) {
3761
+ return l && l.componentClassList && l.componentClassList.includes("f-form-layout") && l.componentClassList.includes("farris-form") ? I.sourceType === "control" && I.controlCategory === "input" || I.sourceType === "move" && I.controlType === "form-group" : !0;
3762
+ }
3763
+ function d(I) {
3764
+ return !(!_n().basalDragulaRuleForContainer(I) || !f || !i(I));
3765
+ }
3766
+ function C() {
3767
+ r.value = !1, s.value = !1;
3768
+ const I = n, O = I.appearance && I.appearance.class || "", M = O.split(" "), D = I.contents || [], P = D.length ? D[0] : null, L = P && P.appearance ? P.appearance.class : "", E = L ? L.split(" ") : [], A = D.length ? D.reduce((ie, J) => {
3769
+ const le = J && J.appearance ? J.appearance.class : "", Be = le ? le.split(" ") : [];
3770
+ return ie.push(...Be), ie;
3771
+ }, []) : [], $ = o, X = $ && $.appearance && $.appearance.class || "", Fe = X ? X.split(" ") : [];
3772
+ l = {
3773
+ componentClass: O,
3774
+ componentClassList: M,
3775
+ childContents: D,
3776
+ firstChildContent: P,
3777
+ firstChildClass: L,
3778
+ firstChildClassList: E,
3779
+ parent: $,
3780
+ parentClass: X,
3781
+ parentClassList: Fe,
3782
+ children: D,
3783
+ childrenClassList: A
2915
3784
  };
2916
- const { canAccept: be, fixed: ve, hidePadding: Ce } = c.getRuleValue(A[0], y);
2917
- return f = be, b = Ce, h = ve, !0;
3785
+ const { canAccept: Ie, fixed: Me, hidePadding: je } = a.getRuleValue(M[0], l);
3786
+ return f = Ie, c = je, g = Me, !0;
2918
3787
  }
2919
- function a(p) {
2920
- je();
3788
+ function u(I) {
3789
+ Z();
2921
3790
  }
2922
3791
  function m() {
2923
3792
  return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
2924
3793
  }
2925
- function s(p, M) {
2926
- const A = n;
2927
- if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
2928
- const { label: O } = p, P = U("form-group");
2929
- return P.editor = M, P.label = O, d(P), delete P.editor.id, delete P.editor.binding, delete P.editor.appearance, delete P.editor.visible, P;
3794
+ function p(I, O) {
3795
+ const M = n;
3796
+ if ((M.appearance && M.appearance.class || "").split(" ").includes("f-form-layout")) {
3797
+ const { label: L } = I, E = H("form-group");
3798
+ return E.editor = O, E.label = L, y(E), delete E.editor.id, delete E.editor.binding, delete E.editor.appearance, delete E.editor.visible, E;
2930
3799
  }
2931
- return M;
2932
- }
2933
- function d(p) {
2934
- const M = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
2935
- if (M && M.schema && M.schema.componentType) {
2936
- const A = M.schema.componentType, T = k(A);
2937
- p.appearance || (p.appearance = {}), p.appearance.class = T;
3800
+ return O;
3801
+ }
3802
+ function y(I) {
3803
+ const O = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
3804
+ if (O && O.schema && O.schema.componentType) {
3805
+ const M = O.schema.formColumns;
3806
+ let D = S(M);
3807
+ D = t.formSchemaUtils.getControlClassByFormUnifiedLayout(D, "", e.schema), I.appearance || (I.appearance = {}), I.appearance.class = D;
2938
3808
  }
2939
3809
  }
2940
- function k(p) {
2941
- let M = "";
2942
- switch (p) {
2943
- case "form-col-1": {
2944
- M = "col-12 col-md-12 col-xl-12 col-el-12";
2945
- break;
2946
- }
2947
- case "form-col-12": {
2948
- M = "col-12 col-md-12 col-xl-12 col-el-12";
2949
- break;
2950
- }
2951
- case "form-col-2": {
2952
- M = "col-12 col-md-6 col-xl-6 col-el-6";
2953
- break;
2954
- }
2955
- case "form-col-3": {
2956
- M = "col-12 col-md-6 col-xl-4 col-el-4";
3810
+ function S(I) {
3811
+ let O = "";
3812
+ switch (I) {
3813
+ case 1: {
3814
+ O = "col-12 col-md-12 col-xl-12 col-el-12";
2957
3815
  break;
2958
3816
  }
2959
- case "form-col-4": {
2960
- M = "col-12 col-md-6 col-xl-3 col-el-2";
3817
+ case 2: {
3818
+ O = "col-12 col-md-6 col-xl-6 col-el-6";
2961
3819
  break;
2962
3820
  }
2963
- case "form-col-6": {
2964
- M = "col-12 col-md-6 col-xl-6 col-el-6";
3821
+ case 3: {
3822
+ O = "col-12 col-md-6 col-xl-4 col-el-4";
2965
3823
  break;
2966
3824
  }
2967
- case "frame": {
2968
- M = "col-12";
3825
+ case 4: {
3826
+ O = "col-12 col-md-6 col-xl-3 col-el-2";
2969
3827
  break;
2970
3828
  }
2971
3829
  }
2972
- return M;
3830
+ return O;
2973
3831
  }
2974
- function F(p, M, A) {
2975
- const T = n;
2976
- if ((T.appearance && T.appearance.class || "").split(" ").includes("f-form-layout")) {
2977
- const P = String(p.innerText), E = U("form-group");
2978
- return E.editor = A, E.label = P, E;
3832
+ function k(I, O, M) {
3833
+ const D = n;
3834
+ if ((D.appearance && D.appearance.class || "").split(" ").includes("f-form-layout")) {
3835
+ const E = String(I.innerText), A = H("form-group");
3836
+ return A.editor = M, A.label = E, A;
2979
3837
  }
2980
- return A;
2981
- }
2982
- function D() {
2983
- return !h;
3838
+ return M;
2984
3839
  }
2985
- function S() {
2986
- return !h;
3840
+ function j() {
3841
+ return !g;
2987
3842
  }
2988
3843
  function w() {
2989
- return b;
3844
+ return !g;
3845
+ }
3846
+ function b() {
3847
+ return c;
3848
+ }
3849
+ function T(I) {
3850
+ return new no(I, t).getPropertyConfig(n, e.componentInstance.value);
2990
3851
  }
2991
3852
  return {
2992
- canAccepts: r,
2993
- checkCanDeleteComponent: S,
2994
- checkCanMoveComponent: D,
3853
+ canAccepts: d,
3854
+ checkCanDeleteComponent: w,
3855
+ checkCanMoveComponent: j,
2995
3856
  getStyles: m,
2996
- hideNestedPaddingInDesginerView: w,
2997
- onAcceptNewChildElement: F,
2998
- onAcceptMovedChildElement: a,
2999
- resolveComponentContext: g,
3000
- onResolveNewComponentSchema: s,
3001
- triggerBelongedComponentToMoveWhenMoved: l,
3002
- triggerBelongedComponentToDeleteWhenDeleted: u
3857
+ getPropsConfig: T,
3858
+ hideNestedPaddingInDesginerView: b,
3859
+ onAcceptNewChildElement: k,
3860
+ onAcceptMovedChildElement: u,
3861
+ resolveComponentContext: C,
3862
+ onResolveNewComponentSchema: p,
3863
+ triggerBelongedComponentToMoveWhenMoved: r,
3864
+ triggerBelongedComponentToDeleteWhenDeleted: s
3003
3865
  };
3004
3866
  }
3005
- const vn = /* @__PURE__ */ H({
3867
+ const ao = /* @__PURE__ */ R({
3006
3868
  name: "FOrderDesign",
3007
- props: te,
3869
+ props: ae,
3008
3870
  emits: ["change"],
3009
3871
  setup(e, t) {
3010
- var D;
3011
- const n = C(e.items), o = C("排序列"), c = C("排序方式"), l = C("添加排序列"), u = [{
3872
+ var j;
3873
+ const n = v(e.items), o = v("排序列"), a = v("排序方式"), r = v("添加排序列"), s = [{
3012
3874
  id: "asc",
3013
3875
  name: "升序"
3014
3876
  }, {
3015
3877
  id: "desc",
3016
3878
  name: "降序"
3017
- }], f = C(/* @__PURE__ */ new Map()), b = C(), y = X("design-item-context"), h = bn(y.schema, (D = y.parent) == null ? void 0 : D.schema), i = ln(b, y, h);
3018
- ce(() => {
3019
- b.value.componentInstance = i;
3879
+ }], f = v(/* @__PURE__ */ new Map()), c = v(), l = q("design-item-context"), g = oo(l.schema, (j = l.parent) == null ? void 0 : j.schema), i = Wn(c, l, g);
3880
+ ee(() => {
3881
+ c.value.componentInstance = i;
3020
3882
  }), t.expose(i.value);
3021
- function r() {
3022
- const S = n.value.map((w) => [w.id, !0]);
3023
- f.value = new Map(S);
3883
+ function d() {
3884
+ const w = n.value.map((b) => [b.id, !0]);
3885
+ f.value = new Map(w);
3024
3886
  }
3025
- r();
3026
- const g = B(() => e.dataSource.map((S) => (S.disabled = f.value.has(S.id), S))), a = B(() => ({
3887
+ d();
3888
+ const C = V(() => e.dataSource.map((w) => (w.disabled = f.value.has(w.id), w))), u = V(() => ({
3027
3889
  "f-order": !0
3028
3890
  }));
3029
- function m(S) {
3030
- n.value = n.value.filter((w) => w.id !== S.id), r(), t.emit("change", n.value);
3891
+ function m(w) {
3892
+ n.value = n.value.filter((b) => b.id !== w.id), d(), t.emit("change", n.value);
3031
3893
  }
3032
- function s() {
3894
+ function p() {
3033
3895
  n.value = [...n.value, {
3034
3896
  id: Date.now().toString(),
3035
3897
  name: "",
3036
3898
  order: "asc"
3037
- }], r(), t.emit("change", n.value);
3899
+ }], d(), t.emit("change", n.value);
3038
3900
  }
3039
- function d(S) {
3040
- r(), t.emit("change", n.value);
3901
+ function y(w) {
3902
+ d(), t.emit("change", n.value);
3041
3903
  }
3042
- function k(S) {
3043
- if (S && S.length) {
3044
- const w = /* @__PURE__ */ new Map();
3045
- S.reduce((V, p) => (V.set(p.id, p), V), w), n.value = S.map((V) => w.get(V.id)), t.emit("change", n.value);
3904
+ function S(w) {
3905
+ if (w && w.length) {
3906
+ const b = /* @__PURE__ */ new Map();
3907
+ w.reduce((T, F) => (T.set(F.id, F), T), b), n.value = w.map((T) => b.get(T.id)), t.emit("change", n.value);
3046
3908
  }
3047
3909
  }
3048
- function F() {
3049
- return v(me, {
3910
+ function k() {
3911
+ return h(ve, {
3050
3912
  style: "flex:1",
3051
3913
  data: n.value,
3052
3914
  draggable: !0,
@@ -3054,71 +3916,71 @@ const vn = /* @__PURE__ */ H({
3054
3916
  "keep-order": !0,
3055
3917
  itemClass: "f-order-item",
3056
3918
  onRemoveItem: m,
3057
- onChange: k
3919
+ onChange: S
3058
3920
  }, {
3059
- header: () => v("div", {
3921
+ header: () => h("div", {
3060
3922
  class: "f-order-header"
3061
- }, [v("span", {
3923
+ }, [h("span", {
3062
3924
  class: "f-order-header-order-field"
3063
- }, [o.value]), v("span", {
3925
+ }, [o.value]), h("span", {
3064
3926
  class: "f-order-header-order-type"
3065
- }, [c.value])]),
3066
- itemContent: (S) => v("div", {
3927
+ }, [a.value])]),
3928
+ itemContent: (w) => h("div", {
3067
3929
  class: "f-order-item-content"
3068
- }, [v(q, {
3930
+ }, [h(_, {
3069
3931
  class: "f-order-item-content-order-field",
3070
- data: g.value,
3932
+ data: C.value,
3071
3933
  valueField: "id",
3072
3934
  textField: "name",
3073
3935
  idField: "id",
3074
- modelValue: S.id,
3075
- "onUpdate:modelValue": (w) => S.id = w,
3076
- onChange: d,
3077
- onClear: d
3078
- }, null), v(q, {
3936
+ modelValue: w.id,
3937
+ "onUpdate:modelValue": (b) => w.id = b,
3938
+ onChange: y,
3939
+ onClear: y
3940
+ }, null), h(_, {
3079
3941
  class: "f-order-item-content-order-type",
3080
- data: u,
3942
+ data: s,
3081
3943
  valueField: "id",
3082
3944
  textField: "name",
3083
3945
  idField: "id",
3084
- modelValue: S.order,
3085
- "onUpdate:modelValue": (w) => S.order = w,
3086
- onChange: d
3946
+ modelValue: w.order,
3947
+ "onUpdate:modelValue": (b) => w.order = b,
3948
+ onChange: y
3087
3949
  }, null)]),
3088
- footer: () => v("div", {
3950
+ footer: () => h("div", {
3089
3951
  class: "f-order-footer"
3090
- }, [v(ye, {
3952
+ }, [h(Ce, {
3091
3953
  type: "link",
3092
3954
  class: "f-order-add-button",
3093
- onClick: s
3955
+ onClick: p
3094
3956
  }, {
3095
- default: () => v(Q, null, [v("span", {
3957
+ default: () => h(K, null, [h("span", {
3096
3958
  class: "f-order-add-icon"
3097
- }, [v("i", {
3959
+ }, [h("i", {
3098
3960
  class: "f-icon f-icon-add"
3099
- }, null)]), l.value])
3961
+ }, null)]), r.value])
3100
3962
  })])
3101
3963
  });
3102
3964
  }
3103
- return () => v("div", {
3104
- ref: b,
3105
- class: a.value
3106
- }, [F()]);
3965
+ return () => h("div", {
3966
+ ref: c,
3967
+ class: u.value
3968
+ }, [k()]);
3107
3969
  }
3108
- }), Dn = {
3970
+ }), bo = {
3109
3971
  install(e) {
3110
- e.component(z.name, z);
3972
+ e.component(Q.name, Q);
3111
3973
  },
3112
3974
  register(e, t, n, o) {
3113
- e.order = z, t.order = ie;
3975
+ e.order = Q, t.order = ue;
3114
3976
  },
3115
3977
  registerDesigner(e, t, n) {
3116
- e.order = vn, t.order = ie;
3978
+ e.order = ao, t.order = ue;
3117
3979
  }
3118
3980
  };
3119
3981
  export {
3120
- z as FOrder,
3121
- Dn as default,
3122
- te as orderProps,
3123
- ie as propsResolver
3982
+ Q as FOrder,
3983
+ bo as default,
3984
+ ae as orderProps,
3985
+ ue as propsResolver
3124
3986
  };