@farris/ui-vue 1.2.9 → 1.3.1

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 (287) hide show
  1. package/components/accordion/index.esm.js +64 -64
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +521 -336
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +99 -97
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +496 -504
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +251 -259
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +696 -519
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +368 -376
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1141 -340
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +116 -116
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +986 -798
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +463 -998
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2233 -1057
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +335 -1002
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6193 -4702
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4562 -3294
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3420 -2623
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-canvas/index.css +1 -1
  40. package/components/designer-canvas/index.esm.js +914 -883
  41. package/components/designer-canvas/index.umd.cjs +1 -1
  42. package/components/designer-outline/index.esm.js +14 -13
  43. package/components/designer-outline/index.umd.cjs +1 -1
  44. package/components/dropdown/index.esm.js +204 -212
  45. package/components/dropdown/index.umd.cjs +2 -2
  46. package/components/dynamic-form/index.css +1 -0
  47. package/components/dynamic-form/index.esm.js +2795 -1835
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +180 -130
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +303 -290
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/events-editor/index.esm.js +328 -336
  54. package/components/events-editor/index.umd.cjs +1 -1
  55. package/components/expression-editor/index.esm.js +65 -65
  56. package/components/expression-editor/index.umd.cjs +1 -1
  57. package/components/external-container/index.css +1 -1
  58. package/components/external-container/index.esm.js +3349 -3626
  59. package/components/external-container/index.umd.cjs +1 -1
  60. package/components/field-selector/index.css +1 -1
  61. package/components/field-selector/index.esm.js +5344 -8588
  62. package/components/field-selector/index.umd.cjs +1 -1
  63. package/components/filter-bar/index.css +1 -1
  64. package/components/filter-bar/index.esm.js +2179 -2227
  65. package/components/filter-bar/index.umd.cjs +1 -1
  66. package/components/flow-canvas/index.css +1 -1
  67. package/components/flow-canvas/index.esm.js +684 -675
  68. package/components/flow-canvas/index.umd.cjs +1 -1
  69. package/components/image-cropper/index.esm.js +482 -490
  70. package/components/image-cropper/index.umd.cjs +1 -1
  71. package/components/input-group/index.esm.js +746 -569
  72. package/components/input-group/index.umd.cjs +1 -1
  73. package/components/layout/index.esm.js +409 -385
  74. package/components/layout/index.umd.cjs +1 -1
  75. package/components/list-nav/index.esm.js +348 -1019
  76. package/components/list-nav/index.umd.cjs +1 -1
  77. package/components/list-view/index.css +1 -1
  78. package/components/list-view/index.esm.js +3606 -2388
  79. package/components/list-view/index.umd.cjs +1 -1
  80. package/components/lookup/index.css +1 -1
  81. package/components/lookup/index.esm.js +10871 -8970
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.css +1 -1
  84. package/components/mapping-editor/index.esm.js +6019 -5631
  85. package/components/mapping-editor/index.umd.cjs +1 -1
  86. package/components/message-box/index.css +1 -1
  87. package/components/message-box/index.esm.js +511 -471
  88. package/components/message-box/index.umd.cjs +1 -1
  89. package/components/modal/index.css +1 -1
  90. package/components/modal/index.esm.js +438 -398
  91. package/components/modal/index.umd.cjs +1 -1
  92. package/components/nav/index.esm.js +912 -1281
  93. package/components/nav/index.umd.cjs +3 -3
  94. package/components/notify/index.esm.js +59 -53
  95. package/components/notify/index.umd.cjs +1 -1
  96. package/components/number-range/index.esm.js +660 -484
  97. package/components/number-range/index.umd.cjs +1 -1
  98. package/components/number-spinner/index.esm.js +682 -506
  99. package/components/number-spinner/index.umd.cjs +1 -1
  100. package/components/order/index.css +1 -1
  101. package/components/order/index.esm.js +1848 -1658
  102. package/components/order/index.umd.cjs +1 -1
  103. package/components/page-footer/index.esm.js +100 -100
  104. package/components/page-footer/index.umd.cjs +1 -1
  105. package/components/page-header/index.esm.js +1120 -1923
  106. package/components/page-header/index.umd.cjs +1 -1
  107. package/components/pagination/index.esm.js +875 -1214
  108. package/components/pagination/index.umd.cjs +1 -1
  109. package/components/popover/index.esm.js +71 -70
  110. package/components/popover/index.umd.cjs +1 -1
  111. package/components/progress/index.esm.js +229 -237
  112. package/components/progress/index.umd.cjs +3 -3
  113. package/components/property-editor/index.css +1 -1
  114. package/components/property-editor/index.esm.js +2314 -1521
  115. package/components/property-editor/index.umd.cjs +3 -3
  116. package/components/property-panel/index.esm.js +867 -868
  117. package/components/property-panel/index.umd.cjs +1 -1
  118. package/components/query-solution/index.css +1 -1
  119. package/components/query-solution/index.esm.js +4332 -3623
  120. package/components/query-solution/index.umd.cjs +1 -1
  121. package/components/radio-button/index.esm.js +72 -72
  122. package/components/radio-button/index.umd.cjs +1 -1
  123. package/components/radio-group/index.esm.js +613 -437
  124. package/components/radio-group/index.umd.cjs +1 -1
  125. package/components/rate/index.esm.js +255 -263
  126. package/components/rate/index.umd.cjs +1 -1
  127. package/components/response-layout/index.esm.js +144 -152
  128. package/components/response-layout/index.umd.cjs +1 -1
  129. package/components/response-layout-editor/index.css +1 -1
  130. package/components/response-layout-editor/index.esm.js +1101 -1038
  131. package/components/response-layout-editor/index.umd.cjs +1 -1
  132. package/components/response-toolbar/index.esm.js +935 -1750
  133. package/components/response-toolbar/index.umd.cjs +1 -1
  134. package/components/schema-selector/index.css +1 -1
  135. package/components/schema-selector/index.esm.js +5264 -5677
  136. package/components/schema-selector/index.umd.cjs +2 -2
  137. package/components/search-box/index.esm.js +151 -154
  138. package/components/search-box/index.umd.cjs +1 -1
  139. package/components/section/index.esm.js +438 -1125
  140. package/components/section/index.umd.cjs +1 -1
  141. package/components/smoke-detector/index.esm.js +93 -101
  142. package/components/smoke-detector/index.umd.cjs +1 -1
  143. package/components/splitter/index.esm.js +563 -1202
  144. package/components/splitter/index.umd.cjs +1 -1
  145. package/components/splitter/style.js +2 -0
  146. package/components/step/index.esm.js +248 -256
  147. package/components/step/index.umd.cjs +1 -1
  148. package/components/switch/index.esm.js +549 -373
  149. package/components/switch/index.umd.cjs +1 -1
  150. package/components/tabs/index.css +1 -1
  151. package/components/tabs/index.esm.js +2436 -3110
  152. package/components/tabs/index.umd.cjs +1 -1
  153. package/components/tags/index.esm.js +328 -336
  154. package/components/tags/index.umd.cjs +1 -1
  155. package/components/text/index.esm.js +339 -347
  156. package/components/text/index.umd.cjs +1 -1
  157. package/components/textarea/index.esm.js +554 -378
  158. package/components/textarea/index.umd.cjs +1 -1
  159. package/components/time-picker/index.css +1 -1
  160. package/components/time-picker/index.esm.js +1322 -1144
  161. package/components/time-picker/index.umd.cjs +1 -1
  162. package/components/transfer/index.css +1 -1
  163. package/components/transfer/index.esm.js +537 -543
  164. package/components/transfer/index.umd.cjs +1 -1
  165. package/components/tree-grid/index.css +1 -1
  166. package/components/tree-grid/index.esm.js +5113 -9426
  167. package/components/tree-grid/index.umd.cjs +1 -1
  168. package/components/tree-view/index.css +1 -0
  169. package/components/tree-view/index.esm.js +3900 -2677
  170. package/components/tree-view/index.umd.cjs +1 -1
  171. package/components/uploader/index.esm.js +568 -570
  172. package/components/uploader/index.umd.cjs +2 -2
  173. package/components/verify-detail/index.esm.js +266 -274
  174. package/components/verify-detail/index.umd.cjs +1 -1
  175. package/components/video/index.esm.js +553 -1052
  176. package/components/video/index.umd.cjs +1 -1
  177. package/components/weather/index.esm.js +558 -566
  178. package/components/weather/index.umd.cjs +5 -5
  179. package/farris.all.esm.js +22009 -22688
  180. package/farris.all.umd.cjs +9 -9
  181. package/index.css +1 -1
  182. package/package.json +1 -1
  183. package/types/capsule/src/capsule.props.d.ts +2 -2
  184. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  185. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  186. package/types/common/directive/area-response.d.ts +10 -0
  187. package/types/common/index.d.ts +9 -0
  188. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  189. package/types/common/types.d.ts +1 -1
  190. package/types/common/utils/encrypt.d.ts +2 -0
  191. package/types/common/utils/resolve-field.d.ts +2 -0
  192. package/types/common/utils/use-class.d.ts +7 -0
  193. package/types/component/src/component.props.d.ts +7 -0
  194. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  196. package/types/components.d.ts +1 -0
  197. package/types/condition/src/types.d.ts +2 -1
  198. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  199. package/types/data-grid/index.d.ts +11 -5
  200. package/types/data-grid/src/data-grid.component.d.ts +4 -2
  201. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  202. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  203. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  204. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  205. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  206. package/types/data-view/composition/types.d.ts +19 -4
  207. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  208. package/types/designer-canvas/index.d.ts +2 -1
  209. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  210. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  211. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  212. package/types/designer-canvas/src/composition/types.d.ts +2 -3
  213. package/types/designer-canvas/src/types.d.ts +2 -1
  214. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  215. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  216. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  217. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  218. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
  219. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  220. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  221. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  222. package/types/dynamic-form/src/types.d.ts +12 -1
  223. package/types/dynamic-resolver/index.d.ts +1 -0
  224. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  225. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  226. package/types/dynamic-resolver/src/types.d.ts +9 -0
  227. package/types/dynamic-view/index.d.ts +1 -0
  228. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  229. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  230. package/types/index.d.ts +2 -0
  231. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  232. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  233. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  234. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  235. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  236. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  237. package/types/lookup/src/composition/types.d.ts +8 -0
  238. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  239. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  240. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  241. package/types/lookup/src/composition/use-http.d.ts +9 -5
  242. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  243. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  244. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  245. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  246. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  247. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  248. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  249. package/types/modal/src/modal.component.d.ts +3 -0
  250. package/types/modal/src/modal.props.d.ts +4 -0
  251. package/types/page-header/src/page-header.props.d.ts +1 -0
  252. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  253. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  254. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  255. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  256. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  257. package/types/property-panel/index.d.ts +2 -1
  258. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  259. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  260. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  262. package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  264. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  266. package/types/query-solution/src/solutions.d.ts +108 -509
  267. package/types/response-layout-editor/index.d.ts +3 -1
  268. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  269. package/types/response-layout-editor/src/type.d.ts +21 -0
  270. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  271. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  272. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  273. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  274. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  275. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  276. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  277. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  278. package/types/tabs/src/tabs.props.d.ts +1 -0
  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/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  282. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  283. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  284. package/types/modal/src/composition/use-esc.d.ts +0 -1
  285. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  286. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  287. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,107 +1,106 @@
1
- var we = Object.defineProperty;
2
- var Se = (e, t, n) => t in e ? we(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var E = (e, t, n) => Se(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { ref as C, computed as B, createVNode as b, Fragment as Q, watch as N, withModifiers as ke, withDirectives as Fe, vModelText as je, defineComponent as H, inject as X, onMounted as ce, nextTick as Me } from "vue";
5
- import { cloneDeep as Te } from "lodash-es";
6
- import { useIdentify as Ve, useHierarchy as De, useGroupData as Oe, usePagination as Ie, useDataView as Pe, useSelection as Be, useEdit as Ae, useVisualDataBound as $e, useVisualDataCell as xe, useVisualDataRow as Le, useVisualGroupRow as Ee, useVisualSummaryRow as Ne, useVisualData as He } from "../data-view/index.esm.js";
7
- import { FCheckBox as Y } from "../checkbox/index.esm.js";
8
- import Re from "../list-view/index.esm.js";
9
- import Ue from "../button-edit/index.esm.js";
10
- import Ge from "../button-edit/index.esm.js/src/designer/button-edit.design.component";
11
- import { getSchemaByType as re } from "../dynamic-resolver/index.esm.js";
12
- import { useDesignerComponent as qe } from "../designer-canvas/index.esm.js";
1
+ var be = Object.defineProperty;
2
+ var Se = (e, t, n) => t in e ? be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var V = (e, t, n) => Se(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { ref as S, computed as B, createVNode as b, Fragment as Q, watch as G, withModifiers as we, withDirectives as ke, vModelText as Ie, defineComponent as R, Teleport as Fe, createApp as Me, onUnmounted as Be, inject as x, nextTick as X, onMounted as Y, mergeProps as Le } from "vue";
5
+ import { isPlainObject as le, cloneDeep as se } from "lodash-es";
6
+ import { useIdentify as Te, useHierarchy as Ve, useGroupData as De, usePagination as Oe, useDataView as Pe, useSelection as Ee, useEdit as Ae, useVisualDataBound as $e, useVisualDataCell as je, useVisualDataRow as Ne, useVisualGroupRow as Re, useVisualSummaryRow as Ge, useVisualData as Ue } from "../data-view/index.esm.js";
7
+ import { FCheckBox as Z } from "../checkbox/index.esm.js";
8
+ import xe from "../list-view/index.esm.js";
9
+ import qe from "../button-edit/index.esm.js";
10
+ import { resolveAppearance as We } from "../dynamic-resolver/index.esm.js";
11
+ import { useDesignerComponent as ce, DgControl as J } from "../designer-canvas/index.esm.js";
13
12
  const ue = {}, de = {};
14
- function Z(e) {
15
- const { properties: t, title: n, ignore: o } = e, s = o && Array.isArray(o), c = Object.keys(t).reduce((i, p) => ((!s || !o.find((g) => g == p)) && (i[p] = t[p].type === "object" && t[p].properties ? Z(t[p]) : Te(t[p].default)), i), {});
16
- return (!s || !o.find((i) => i == "id")) && (c.id = `${n}-${Date.now()}`), c;
13
+ function K(e) {
14
+ const { properties: t, title: n, ignore: a } = e, i = a && Array.isArray(a), l = Object.keys(t).reduce((r, d) => ((!i || !a.find((u) => u == d)) && (r[d] = t[d].type === "object" && t[d].properties ? K(t[d]) : se(t[d].default)), r), {});
15
+ return n && (!i || !a.find((r) => r == "id")) && (l.id = `${n}-${Date.now()}`), l;
17
16
  }
18
- function U(e, t = {}, n) {
19
- const o = ue[e];
20
- if (o) {
21
- let s = Z(o);
22
- const c = de[e];
23
- return s = c ? c({ getSchemaByType: U }, s, t, n) : s, s;
17
+ function ee(e, t = {}, n) {
18
+ const a = ue[e];
19
+ if (a) {
20
+ let i = K(a);
21
+ const l = de[e];
22
+ return i = l ? l({ getSchemaByType: ee }, i, t, n) : i, i;
24
23
  }
25
24
  return null;
26
25
  }
27
- function _e(e, t) {
28
- const n = Z(t);
29
- return Object.keys(e).reduce((o, s) => (o[s] && typeof o[s] == "object" ? Object.assign(o[s], e[s]) : o[s] = e[s], o), n), n;
26
+ function He(e, t) {
27
+ const n = K(t);
28
+ return Object.keys(e).reduce((a, i) => (a[i] && le(a[i]) && le(e[i]) ? Object.assign(a[i], e[i]) : a[i] = e[i], a), n), n;
30
29
  }
31
- function We(e, t) {
32
- return Object.keys(e).filter((o) => e[o] != null).reduce((o, s) => {
33
- if (t.has(s)) {
34
- const c = t.get(s);
35
- if (typeof c == "string")
36
- o[c] = e[s];
30
+ function _e(e, t) {
31
+ return Object.keys(e).filter((a) => e[a] != null).reduce((a, i) => {
32
+ if (t.has(i)) {
33
+ const l = t.get(i);
34
+ if (typeof l == "string")
35
+ a[l] = e[i];
37
36
  else {
38
- const i = c(s, e[s], e);
39
- Object.assign(o, i);
37
+ const r = l(i, e[i], e);
38
+ Object.assign(a, r);
40
39
  }
41
40
  } else
42
- o[s] = e[s];
43
- return o;
41
+ a[i] = e[i];
42
+ return a;
44
43
  }, {});
45
44
  }
46
45
  function ze(e, t, n = /* @__PURE__ */ new Map()) {
47
- const o = _e(e, t);
48
- return We(o, n);
46
+ const a = He(e, t);
47
+ return _e(a, n);
49
48
  }
50
- function Je(e = {}) {
51
- function t(y, h, l, r) {
52
- if (typeof l == "number")
53
- return r[y].length === l;
54
- if (typeof l == "object") {
55
- const S = Object.keys(l)[0], d = l[S];
56
- if (S === "not")
57
- return Number(r[y].length) !== Number(d);
58
- if (S === "moreThan")
59
- return Number(r[y].length) >= Number(d);
60
- if (S === "lessThan")
61
- return Number(r[y].length) <= Number(d);
49
+ function Xe(e = {}) {
50
+ function t(c, p, o, s) {
51
+ if (typeof o == "number")
52
+ return s[c].length === o;
53
+ if (typeof o == "object") {
54
+ const m = Object.keys(o)[0], y = o[m];
55
+ if (m === "not")
56
+ return Number(s[c].length) !== Number(y);
57
+ if (m === "moreThan")
58
+ return Number(s[c].length) >= Number(y);
59
+ if (m === "lessThan")
60
+ return Number(s[c].length) <= Number(y);
62
61
  }
63
62
  return !1;
64
63
  }
65
- function n(y, h, l, r) {
66
- return r[y] && r[y].propertyValue && String(r[y].propertyValue.value) === String(l);
64
+ function n(c, p, o, s) {
65
+ return s[c] && s[c].propertyValue && String(s[c].propertyValue.value) === String(o);
67
66
  }
68
- const o = /* @__PURE__ */ new Map([
67
+ const a = /* @__PURE__ */ new Map([
69
68
  ["length", t],
70
69
  ["getProperty", n]
71
70
  ]);
72
- Object.keys(e).reduce((y, h) => (y.set(h, e[h]), y), o);
73
- function s(y, h) {
74
- const l = y;
75
- return typeof h == "number" ? [{ target: l, operator: "length", param: null, value: Number(h) }] : typeof h == "boolean" ? [{ target: l, operator: "getProperty", param: y, value: !!h }] : typeof h == "object" ? Object.keys(h).map((r) => {
76
- if (r === "length")
77
- return { target: l, operator: "length", param: null, value: h[r] };
78
- const S = r, d = h[r];
79
- return { target: l, operator: "getProperty", param: S, value: d };
71
+ Object.keys(e).reduce((c, p) => (c.set(p, e[p]), c), a);
72
+ function i(c, p) {
73
+ const o = c;
74
+ return typeof p == "number" ? [{ target: o, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: o, operator: "getProperty", param: c, value: !!p }] : typeof p == "object" ? Object.keys(p).map((s) => {
75
+ if (s === "length")
76
+ return { target: o, operator: "length", param: null, value: p[s] };
77
+ const m = s, y = p[s];
78
+ return { target: o, operator: "getProperty", param: m, value: y };
80
79
  }) : [];
81
80
  }
82
- function c(y) {
83
- return Object.keys(y).reduce((l, r) => {
84
- const S = s(r, y[r]);
85
- return l.push(...S), l;
81
+ function l(c) {
82
+ return Object.keys(c).reduce((o, s) => {
83
+ const m = i(s, c[s]);
84
+ return o.push(...m), o;
86
85
  }, []);
87
86
  }
88
- function i(y, h) {
89
- if (o.has(y.operator)) {
90
- const l = o.get(y.operator);
91
- return l && l(y.target, y.param, y.value, h) || !1;
87
+ function r(c, p) {
88
+ if (a.has(c.operator)) {
89
+ const o = a.get(c.operator);
90
+ return o && o(c.target, c.param, c.value, p) || !1;
92
91
  }
93
92
  return !1;
94
93
  }
95
- function p(y, h) {
96
- return c(y).reduce((S, d) => S && i(d, h), !0);
94
+ function d(c, p) {
95
+ return l(c).reduce((m, y) => m && r(y, p), !0);
97
96
  }
98
- function g(y, h) {
99
- const l = Object.keys(y), r = l.includes("allOf"), S = l.includes("anyOf"), d = r || S, u = (d ? y[d ? r ? "allOf" : "anyOf" : "allOf"] : [y]).map((F) => p(F, h));
100
- return r ? !u.includes(!1) : u.includes(!0);
97
+ function u(c, p) {
98
+ const o = Object.keys(c), s = o.includes("allOf"), m = o.includes("anyOf"), y = s || m, v = (y ? c[y ? s ? "allOf" : "anyOf" : "allOf"] : [c]).map((w) => d(w, p));
99
+ return s ? !v.includes(!1) : v.includes(!0);
101
100
  }
102
- return { parseValueSchema: g };
101
+ return { parseValueSchema: u };
103
102
  }
104
- const T = {
103
+ const F = {
105
104
  button: { type: "button", name: "按钮", icon: "Button" },
106
105
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
107
106
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -138,20 +137,21 @@ const T = {
138
137
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
139
138
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
140
139
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
141
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
142
- }, Xe = {}, Qe = {};
143
- Je();
144
- function K(e, t, n = /* @__PURE__ */ new Map(), o = (i, p, g) => p, s = {}, c = (i) => i) {
145
- return ue[t.title] = t, de[t.title] = o, Xe[t.title] = s, Qe[t.title] = c, (i = {}) => {
146
- const p = ze(i, t, n), g = Object.keys(e).reduce((y, h) => (y[h] = e[h].default, y), {});
147
- return Object.assign(g, p);
140
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
141
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
142
+ }, Je = {}, Qe = {};
143
+ Xe();
144
+ function _(e, t, n = /* @__PURE__ */ new Map(), a = (r, d, u) => d, i = {}, l = (r) => r) {
145
+ return ue[t.title] = t, de[t.title] = a, Je[t.title] = i, Qe[t.title] = l, (r = {}) => {
146
+ const d = ze(r, t, n), u = Object.keys(e).reduce((c, p) => (c[p] = e[p].default, c), {});
147
+ return Object.assign(u, d);
148
148
  };
149
149
  }
150
- function ee(e, t) {
150
+ function te(e, t) {
151
151
  return { customClass: t.class, customStyle: t.style };
152
152
  }
153
153
  const Ye = /* @__PURE__ */ new Map([
154
- ["appearance", ee]
154
+ ["appearance", te]
155
155
  ]), Ze = "https://json-schema.org/draft/2020-12/schema", Ke = "https://farris-design.gitee.io/order.schema.json", et = "order", tt = "A Farris Component", nt = "object", ot = {
156
156
  id: {
157
157
  description: "The unique identifier for a order",
@@ -244,22 +244,22 @@ const Ye = /* @__PURE__ */ new Map([
244
244
  type: "sting",
245
245
  default: ""
246
246
  }
247
- }, at = [
247
+ }, lt = [
248
248
  "id",
249
249
  "type"
250
- ], rt = {
250
+ ], at = {
251
251
  $schema: Ze,
252
252
  $id: Ke,
253
253
  title: et,
254
254
  description: tt,
255
255
  type: nt,
256
256
  properties: ot,
257
- required: at
257
+ required: lt
258
258
  };
259
259
  function it(e, t, n) {
260
260
  return t;
261
261
  }
262
- const lt = "order", st = "A Farris Component", ct = "object", ut = {
262
+ const rt = "order", st = "A Farris Component", ct = "object", ut = {
263
263
  basic: {
264
264
  description: "Basic Infomation",
265
265
  title: "基本信息",
@@ -342,11 +342,11 @@ const lt = "order", st = "A Farris Component", ct = "object", ut = {
342
342
  }
343
343
  }
344
344
  }, dt = {
345
- title: lt,
345
+ title: rt,
346
346
  description: st,
347
347
  type: ct,
348
348
  categories: ut
349
- }, te = {
349
+ }, ne = {
350
350
  dataSource: {
351
351
  type: Array,
352
352
  default: [
@@ -365,13 +365,13 @@ const lt = "order", st = "A Farris Component", ct = "object", ut = {
365
365
  { id: "3", name: "开票日期", order: "asc" }
366
366
  ]
367
367
  }
368
- }, ie = K(te, rt, Ye, it, dt), pt = /* @__PURE__ */ new Map([
369
- ["appearance", ee]
368
+ }, ae = _(ne, at, Ye, it, dt), pt = /* @__PURE__ */ new Map([
369
+ ["appearance", te]
370
370
  ]);
371
371
  function ft(e, t, n) {
372
372
  return t;
373
373
  }
374
- const mt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-design.gitee.io/list-view.schema.json", gt = "list-view", ht = "A Farris Component", bt = "object", vt = {
374
+ const mt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-design.gitee.io/list-view.schema.json", ht = "list-view", gt = "A Farris Component", vt = "object", Ct = {
375
375
  id: {
376
376
  description: "The unique identifier for list-view",
377
377
  type: "string"
@@ -433,18 +433,18 @@ const mt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-
433
433
  type: "boolean",
434
434
  default: !0
435
435
  }
436
- }, Ct = [
436
+ }, bt = [
437
437
  "id",
438
438
  "type"
439
- ], wt = {
439
+ ], St = {
440
440
  $schema: mt,
441
441
  $id: yt,
442
- title: gt,
443
- description: ht,
444
- type: bt,
445
- properties: vt,
446
- required: Ct
447
- }, St = "list-view", kt = "A Farris Component", Ft = "object", jt = {
442
+ title: ht,
443
+ description: gt,
444
+ type: vt,
445
+ properties: Ct,
446
+ required: bt
447
+ }, wt = "list-view", kt = "A Farris Component", It = "object", Ft = {
448
448
  basic: {
449
449
  description: "Basic Infomation",
450
450
  title: "基本信息",
@@ -467,10 +467,10 @@ const mt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-
467
467
  }
468
468
  }
469
469
  }, Mt = {
470
- title: St,
470
+ title: wt,
471
471
  description: kt,
472
- type: Ft,
473
- categories: jt
472
+ type: It,
473
+ categories: Ft
474
474
  }, pe = {
475
475
  /** 列集合 */
476
476
  columns: {
@@ -513,193 +513,193 @@ const mt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-
513
513
  // 搜索启用高亮
514
514
  enableHighlightSearch: { type: Boolean, default: !0 }
515
515
  };
516
- K(pe, wt, pt, ft, Mt);
517
- function Tt(e, t) {
518
- function n(c) {
519
- const i = [];
520
- let p = c.nextNode();
521
- for (; p; )
522
- i.push(p), p = c.nextNode();
523
- return i;
524
- }
525
- function o(c, i) {
526
- const p = document.createTreeWalker(c, NodeFilter.SHOW_TEXT);
527
- return n(p).map((l) => ({ textNode: l, text: (l.textContent || "").toLocaleLowerCase() })).map(({ textNode: l, text: r }) => {
528
- const S = [];
529
- let d = 0;
530
- for (; d < r.length; ) {
531
- const f = r.indexOf(i, d);
516
+ _(pe, St, pt, ft, Mt);
517
+ function Bt(e, t) {
518
+ function n(l) {
519
+ const r = [];
520
+ let d = l.nextNode();
521
+ for (; d; )
522
+ r.push(d), d = l.nextNode();
523
+ return r;
524
+ }
525
+ function a(l, r) {
526
+ const d = document.createTreeWalker(l, NodeFilter.SHOW_TEXT);
527
+ return n(d).map((o) => ({ textNode: o, text: (o.textContent || "").toLocaleLowerCase() })).map(({ textNode: o, text: s }) => {
528
+ const m = [];
529
+ let y = 0;
530
+ for (; y < s.length; ) {
531
+ const f = s.indexOf(r, y);
532
532
  if (f === -1)
533
533
  break;
534
- S.push(f), d = f + i.length;
534
+ m.push(f), y = f + r.length;
535
535
  }
536
- return S.map((f) => {
537
- const a = new Range();
538
- return a.setStart(l, f), a.setEnd(l, f + i.length), a;
536
+ return m.map((f) => {
537
+ const g = new Range();
538
+ return g.setStart(o, f), g.setEnd(o, f + r.length), g;
539
539
  });
540
540
  }).flat();
541
541
  }
542
- function s(c) {
543
- if (!CSS.highlights || (CSS.highlights.clear(), !c || !t))
542
+ function i(l) {
543
+ if (!CSS.highlights || (CSS.highlights.clear(), !l || !t))
544
544
  return;
545
- const i = o(t.value, c.toLocaleLowerCase()), p = new Highlight(...i);
546
- CSS.highlights.set("search-result", p);
545
+ const r = a(t.value, l.toLocaleLowerCase()), d = new Highlight(...r);
546
+ CSS.highlights.set("search-result", d);
547
547
  }
548
- return { search: s };
548
+ return { search: i };
549
549
  }
550
- function le(e, t, n, o, s, c, i, p, g, y) {
551
- const h = C(e.size), l = C(e.textField), r = C(e.titleField), S = C(e.disableField), d = B(() => {
552
- var m, M;
553
- return ((m = e.selection) == null ? void 0 : m.multiSelect) && ((M = e.selection) == null ? void 0 : M.showCheckbox);
550
+ function ie(e, t, n, a, i, l, r, d, u, c) {
551
+ const p = S(e.size), o = S(e.textField), s = S(e.titleField), m = S(e.disableField), y = B(() => {
552
+ var I, O;
553
+ return ((I = e.selection) == null ? void 0 : I.multiSelect) && ((O = e.selection) == null ? void 0 : O.showCheckbox);
554
554
  }), {
555
555
  onMouseenterItem: f,
556
- onMouseoverItem: a,
557
- onMouseoutItem: u
558
- } = c, {
559
- getKey: k,
560
- listViewItemClass: F,
561
- onCheckItem: V,
562
- onClickItem: w
563
- } = i, v = B(() => ({
564
- margin: h.value === "small" ? "0.25rem 0" : "10px 0"
556
+ onMouseoverItem: g,
557
+ onMouseoutItem: v
558
+ } = l, {
559
+ getKey: C,
560
+ listViewItemClass: w,
561
+ onCheckItem: M,
562
+ onClickItem: h
563
+ } = r, k = B(() => ({
564
+ margin: p.value === "small" ? "0.25rem 0" : "10px 0"
565
565
  }));
566
- function D(m, M, A) {
567
- return m.checked = p.findIndexInSelectedItems(m) > -1, b("li", {
568
- class: F(m, M),
569
- id: k(m, M),
570
- key: k(m, M),
571
- onClick: (j) => w(j, m, M),
572
- onMouseenter: (j) => f(j, m, M),
573
- onMouseover: (j) => a(j, m, M),
574
- onMouseout: (j) => u(j, m, M)
575
- }, [d.value && b("div", {
566
+ function T(I, O, A) {
567
+ return I.checked = d.findIndexInSelectedItems(I) > -1, b("li", {
568
+ class: w(I, O),
569
+ id: C(I, O),
570
+ key: C(I, O),
571
+ onClick: (L) => h(L, I, O),
572
+ onMouseenter: (L) => f(L, I, O),
573
+ onMouseover: (L) => g(L, I, O),
574
+ onMouseout: (L) => v(L, I, O)
575
+ }, [y.value && b("div", {
576
576
  class: "f-list-select",
577
- onClick: (j) => j.stopPropagation()
578
- }, [b(Y, {
579
- id: "list-" + k(m, M),
577
+ onClick: (L) => L.stopPropagation()
578
+ }, [b(Z, {
579
+ id: "list-" + C(I, O),
580
580
  customClass: "listview-checkbox",
581
- disabled: m[S.value],
582
- checked: m.checked,
583
- "onUpdate:checked": (j) => m.checked = j,
584
- onChange: (j) => {
585
- V(m, M, !j.checked);
581
+ disabled: I[m.value],
582
+ checked: I.checked,
583
+ "onUpdate:checked": (L) => I.checked = L,
584
+ onChange: (L) => {
585
+ M(I, O, !L.checked);
586
586
  }
587
587
  }, null)]), b("div", {
588
588
  class: "f-list-content"
589
589
  }, [b("div", {
590
- style: v.value,
591
- title: m.raw[r.value] || m.raw[l.value]
592
- }, [m.raw[l.value]])])]);
590
+ style: k.value,
591
+ title: I.raw[s.value] || I.raw[o.value]
592
+ }, [I.raw[o.value]])])]);
593
593
  }
594
594
  return {
595
- renderItem: D
595
+ renderItem: T
596
596
  };
597
597
  }
598
- function Vt(e, t, n, o, s, c, i, p, g, y) {
599
- const h = C(e.multiSelect), l = C(e.disableField), {
600
- onMouseenterItem: r,
601
- onMouseoverItem: S,
602
- onMouseoutItem: d
603
- } = c, {
598
+ function Lt(e, t, n, a, i, l, r, d, u, c) {
599
+ const p = S(e.multiSelect), o = S(e.disableField), {
600
+ onMouseenterItem: s,
601
+ onMouseoverItem: m,
602
+ onMouseoutItem: y
603
+ } = l, {
604
604
  getKey: f,
605
- listViewItemClass: a,
606
- onCheckItem: u,
607
- onClickItem: k
608
- } = i;
609
- function F(w, v, D) {
605
+ listViewItemClass: g,
606
+ onCheckItem: v,
607
+ onClickItem: C
608
+ } = r;
609
+ function w(h, k, T) {
610
610
  return t.slots.content ? b(Q, null, [t.slots.content && t.slots.content({
611
- item: w.raw,
612
- index: v,
613
- selectedItem: D
611
+ item: h.raw,
612
+ index: k,
613
+ selectedItem: T
614
614
  })]) : b("div", {
615
615
  style: "margin: 10px 0;"
616
- }, [w.raw.name]);
616
+ }, [h.raw.name]);
617
617
  }
618
- function V(w, v, D) {
618
+ function M(h, k, T) {
619
619
  return b("li", {
620
- class: a(w, v),
621
- id: f(w, v),
622
- key: f(w, v),
623
- onClick: (m) => k(m, w, v),
624
- onMouseenter: (m) => r(m, w, v),
625
- onMouseover: (m) => S(m, w, v),
626
- onMouseout: (m) => d(m, w, v)
627
- }, [h.value && b("div", {
620
+ class: g(h, k),
621
+ id: f(h, k),
622
+ key: f(h, k),
623
+ onClick: (I) => C(I, h, k),
624
+ onMouseenter: (I) => s(I, h, k),
625
+ onMouseover: (I) => m(I, h, k),
626
+ onMouseout: (I) => y(I, h, k)
627
+ }, [p.value && b("div", {
628
628
  class: "f-list-select",
629
- onClick: (m) => m.stopPropagation()
630
- }, [b(Y, {
631
- id: "list-" + f(w, v),
629
+ onClick: (I) => I.stopPropagation()
630
+ }, [b(Z, {
631
+ id: "list-" + f(h, k),
632
632
  customClass: "listview-checkbox",
633
- disabled: w[l.value] || !w.checked,
634
- checked: w.checked,
635
- "onUpdate:checked": (m) => w.checked = m,
636
- onChange: (m) => u(w, v, !m.checked)
633
+ disabled: h[o.value] || !h.checked,
634
+ checked: h.checked,
635
+ "onUpdate:checked": (I) => h.checked = I,
636
+ onChange: (I) => v(h, k, !I.checked)
637
637
  }, null)]), b("div", {
638
638
  class: "f-list-content"
639
- }, [F(w, v, D)])]);
639
+ }, [w(h, k, T)])]);
640
640
  }
641
641
  return {
642
- renderItem: V
642
+ renderItem: M
643
643
  };
644
644
  }
645
- function Dt(e, t, n, o, s, c, i, p, g, y) {
646
- const h = C(e.multiSelect), l = C(e.disableField), {
647
- onMouseenterItem: r,
648
- onMouseoverItem: S,
649
- onMouseoutItem: d
650
- } = c, {
645
+ function Tt(e, t, n, a, i, l, r, d, u, c) {
646
+ const p = S(e.multiSelect), o = S(e.disableField), {
647
+ onMouseenterItem: s,
648
+ onMouseoverItem: m,
649
+ onMouseoutItem: y
650
+ } = l, {
651
651
  getKey: f,
652
- listViewItemClass: a,
653
- onCheckItem: u,
654
- onClickItem: k
655
- } = i, {
656
- dragstart: F,
657
- dragenter: V,
658
- dragover: w,
659
- dragend: v
660
- } = o, {
661
- removeItem: D
662
- } = g, m = B(() => ({
663
- margin: h.value ? "10px 0" : "10px 0px 10px 14px"
652
+ listViewItemClass: g,
653
+ onCheckItem: v,
654
+ onClickItem: C
655
+ } = r, {
656
+ dragstart: w,
657
+ dragenter: M,
658
+ dragover: h,
659
+ dragend: k
660
+ } = a, {
661
+ removeItem: T
662
+ } = u, I = B(() => ({
663
+ margin: p.value ? "10px 0" : "10px 0px 10px 14px"
664
664
  }));
665
- function M(O) {
665
+ function O(D) {
666
666
  return b("div", {
667
- style: m.value
668
- }, [O.raw.name]);
667
+ style: I.value
668
+ }, [D.raw.name]);
669
669
  }
670
670
  function A() {
671
- return t.slots.itemContent ? t.slots.itemContent : M;
671
+ return t.slots.itemContent ? t.slots.itemContent : O;
672
672
  }
673
- const j = A();
674
- function $(O, P, x) {
673
+ const L = A();
674
+ function $(D, E, N) {
675
675
  return b("li", {
676
- class: a(O, P),
677
- id: f(O, P),
678
- key: f(O, P),
679
- onClick: (I) => k(I, O, P),
680
- onMouseenter: (I) => r(I, O, P),
681
- onMouseover: (I) => S(I, O, P),
682
- onMouseout: (I) => d(I, O, P),
676
+ class: g(D, E),
677
+ id: f(D, E),
678
+ key: f(D, E),
679
+ onClick: (P) => C(P, D, E),
680
+ onMouseenter: (P) => s(P, D, E),
681
+ onMouseover: (P) => m(P, D, E),
682
+ onMouseout: (P) => y(P, D, E),
683
683
  draggable: "true",
684
- onDragstart: (I) => F(I, O, P),
685
- onDragenter: (I) => V(I, P),
686
- onDragend: (I) => v(I, O),
687
- onDragover: (I) => w(I, P)
688
- }, [h.value && b("div", {
684
+ onDragstart: (P) => w(P, D, E),
685
+ onDragenter: (P) => M(P, E),
686
+ onDragend: (P) => k(P, D),
687
+ onDragover: (P) => h(P, E)
688
+ }, [p.value && b("div", {
689
689
  class: "f-list-select",
690
- onClick: (I) => I.stopPropagation()
691
- }, [b(Y, {
692
- id: "list-" + f(O, P),
690
+ onClick: (P) => P.stopPropagation()
691
+ }, [b(Z, {
692
+ id: "list-" + f(D, E),
693
693
  customClass: "listview-checkbox",
694
- disabled: O[l.value] || !O.checked,
695
- checked: O.checked,
696
- "onUpdate:checked": (I) => O.checked = I,
697
- onChange: (I) => u(O, P, !I.checked)
694
+ disabled: D[o.value] || !D.checked,
695
+ checked: D.checked,
696
+ "onUpdate:checked": (P) => D.checked = P,
697
+ onChange: (P) => v(D, E, !P.checked)
698
698
  }, null)]), b("div", {
699
699
  class: "f-list-content"
700
- }, [j(O)]), b("div", {
700
+ }, [L(D)]), b("div", {
701
701
  class: "f-list-remove",
702
- onClick: (I) => D(P)
702
+ onClick: (P) => T(E)
703
703
  }, [b("div", {
704
704
  class: "f-list-remove-icon"
705
705
  }, [b("i", {
@@ -714,294 +714,296 @@ function Dt(e, t, n, o, s, c, i, p, g, y) {
714
714
  renderItem: $
715
715
  };
716
716
  }
717
- function Ot(e, t, n, o, s, c, i, p, g, y) {
717
+ function Vt(e, t, n, a, i, l, r, d, u, c) {
718
718
  var f;
719
- const h = C(((f = e.group) == null ? void 0 : f.groupFields) || []), {
720
- collpaseGroupIconClass: l
721
- } = s, {
722
- toggleGroupRow: r
723
- } = y;
724
- function S(a, u) {
725
- u.collapse = !u.collapse, n.value = r(u.collapse ? "collapse" : "expand", u, n.value);
726
- }
727
- function d(a, u, k) {
728
- return a.layer > -1 && b("div", {
719
+ const p = S(((f = e.group) == null ? void 0 : f.groupFields) || []), {
720
+ collpaseGroupIconClass: o
721
+ } = i, {
722
+ toggleGroupRow: s
723
+ } = c;
724
+ function m(g, v) {
725
+ v.collapse = !v.collapse, n.value = s(v.collapse ? "collapse" : "expand", v, n.value);
726
+ }
727
+ function y(g, v, C) {
728
+ return g.layer > -1 && b("div", {
729
729
  class: "f-navlookup-recentHeader",
730
- onClick: (F) => S(F, a)
730
+ onClick: (w) => m(w, g)
731
731
  }, [b("div", {
732
732
  class: "fv-grid-group-row-icon"
733
733
  }, [b("span", {
734
- class: l(a)
734
+ class: o(g)
735
735
  }, null)]), b("div", {
736
736
  class: "f-navlookup-recommandLabel"
737
- }, [a.raw[h.value[a.layer]]])]);
737
+ }, [g.raw[p.value[g.layer]]])]);
738
738
  }
739
739
  return {
740
- renderItem: d
740
+ renderItem: y
741
741
  };
742
742
  }
743
- function It() {
744
- const e = C(-1), t = C(""), n = C(-1), o = C(!1);
745
- function s(y, h, l) {
746
- n.value = l;
743
+ function Dt() {
744
+ const e = S(-1), t = S(""), n = S(-1), a = S(!1);
745
+ function i(c, p, o) {
746
+ n.value = o;
747
747
  }
748
- function c(y, h, l) {
749
- o.value || (n.value = l);
748
+ function l(c, p, o) {
749
+ a.value || (n.value = o);
750
750
  }
751
- function i(y, h, l) {
751
+ function r(c, p, o) {
752
752
  n.value = -1;
753
753
  }
754
- function p() {
755
- o.value = !0;
754
+ function d() {
755
+ a.value = !0;
756
756
  }
757
- function g() {
758
- o.value = !1;
757
+ function u() {
758
+ a.value = !1;
759
759
  }
760
760
  return {
761
761
  activeIndex: e,
762
762
  focusedItemId: t,
763
763
  hoverIndex: n,
764
- onMouseenterItem: s,
765
- onMouseoverItem: c,
766
- onMouseoutItem: i,
767
- resumeHover: g,
768
- suspendHover: p
764
+ onMouseenterItem: i,
765
+ onMouseoverItem: l,
766
+ onMouseoutItem: r,
767
+ resumeHover: u,
768
+ suspendHover: d
769
769
  };
770
770
  }
771
- function Pt(e, t, n, o) {
772
- const s = C(e.idField), { dataView: c } = n, i = C(-1), p = C(!1), { activeIndex: g, focusedItemId: y, hoverIndex: h, resumeHover: l, suspendHover: r } = o;
773
- function S(u, k, F) {
774
- u.stopPropagation(), r(), k && setTimeout(() => {
775
- i.value = F, p.value = !0, k.moving = !0;
771
+ function Ot(e, t, n, a) {
772
+ const i = S(e.idField), { dataView: l } = n, r = S(-1), d = S(!1), { activeIndex: u, focusedItemId: c, hoverIndex: p, resumeHover: o, suspendHover: s } = a;
773
+ function m(v, C, w) {
774
+ v.stopPropagation(), s(), C && setTimeout(() => {
775
+ r.value = w, d.value = !0, C.moving = !0;
776
776
  });
777
777
  }
778
- function d(u, k) {
779
- if (u.preventDefault(), i.value !== k) {
780
- const F = c.value[i.value], V = c.value;
781
- V.splice(i.value, 1), V.splice(k, 0, F), i.value = k;
778
+ function y(v, C) {
779
+ if (v.preventDefault(), r.value !== C) {
780
+ const w = l.value[r.value], M = l.value;
781
+ M.splice(r.value, 1), M.splice(C, 0, w), r.value = C;
782
782
  }
783
783
  }
784
- function f(u, k) {
785
- u.preventDefault(), u.dataTransfer && (u.dataTransfer.dropEffect = "move");
784
+ function f(v, C) {
785
+ v.preventDefault(), v.dataTransfer && (v.dataTransfer.dropEffect = "move");
786
786
  }
787
- function a(u, k) {
788
- k && (k.moving = !1), c.value.forEach((F, V) => {
789
- F.__fv_index__ = V;
790
- }), p.value = !1, l(), h.value = k.raw.__fv_index__, g.value = k.raw.__fv_index__, y.value = k.raw[s.value], t.emit("change", c.value), t.emit("activeChange", k);
787
+ function g(v, C) {
788
+ C && (C.moving = !1), l.value.forEach((w, M) => {
789
+ w.__fv_index__ = M;
790
+ }), d.value = !1, o(), p.value = C.raw.__fv_index__, u.value = C.raw.__fv_index__, c.value = C.raw[i.value], t.emit("change", l.value), t.emit("activeChange", C);
791
791
  }
792
792
  return {
793
- dragstart: S,
794
- dragenter: d,
793
+ dragstart: m,
794
+ dragenter: y,
795
795
  dragover: f,
796
- dragend: a,
797
- isDragging: p
796
+ dragend: g,
797
+ isDragging: d
798
798
  };
799
799
  }
800
- function Bt(e, t, n) {
801
- const { dataView: o } = n;
802
- function s(c) {
803
- if (c > -1 && c < o.value.length) {
804
- const i = o.value.splice(c, 1);
805
- t.emit("removeItem", i[0]);
800
+ function Pt(e, t, n) {
801
+ const { dataView: a } = n;
802
+ function i(l) {
803
+ if (l > -1 && l < a.value.length) {
804
+ const r = a.value.splice(l, 1);
805
+ t.emit("removeItem", r[0]);
806
806
  }
807
807
  }
808
- return { removeItem: s };
808
+ return { removeItem: i };
809
809
  }
810
- function At(e, t, n, o, s, c) {
811
- const i = C(e.idField), p = C(e.disableField), g = C(e.draggable), y = C(e.itemClass), h = C(e.selection.multiSelect ?? !1), l = C(e.selection.multiSelectMode), { isDragging: r } = o, { activeIndex: S, focusedItemId: d, hoverIndex: f } = s, { clearSelection: a, getSelectedItems: u, toggleSelectItem: k } = c, F = C(u());
812
- function V(j, $) {
813
- const O = {
810
+ function Et(e, t, n, a, i, l) {
811
+ const r = S(e.idField), d = S(e.disableField), u = S(e.draggable), c = S(e.itemClass), p = S(e.selection.multiSelect ?? !1), o = S(e.selection.multiSelectMode), { isDragging: s } = a, { activeIndex: m, focusedItemId: y, hoverIndex: f } = i, { clearSelection: g, getSelectedItems: v, toggleSelectItem: C } = l, w = S(v());
812
+ function M(L, $) {
813
+ const D = {
814
814
  "f-listview-item": !0,
815
815
  "f-list-view-group-item": !0,
816
- "f-list-view-draggable-item": g.value,
817
- "f-un-click": !j.checked,
818
- "f-un-select": !!j.raw[p.value],
816
+ "f-list-view-draggable-item": u.value,
817
+ "f-un-click": !L.checked,
818
+ "f-un-select": !!L.raw[d.value],
819
819
  // 'f-listview-active': item.raw.__fv_index__ === activeIndex.value,
820
820
  // 多选
821
- "f-listview-active": F.value.findIndex(
822
- (x) => x[i.value] === j.raw[i.value]
821
+ "f-listview-active": w.value.findIndex(
822
+ (N) => N[r.value] === L.raw[r.value]
823
823
  ) > -1,
824
- "f-listview-item-active": F.value.findIndex(
825
- (x) => x[i.value] === j.raw[i.value]
824
+ "f-listview-item-active": w.value.findIndex(
825
+ (N) => N[r.value] === L.raw[r.value]
826
826
  ) > -1,
827
- "f-listview-hover": !r.value && $ === f.value,
828
- moving: !!j.moving
827
+ "f-listview-hover": !s.value && $ === f.value,
828
+ "f-listview-item-hover": !s.value && $ === f.value,
829
+ moving: !!L.moving
829
830
  };
830
- return y.value.split(" ").reduce((x, I) => (x[I] = !0, x), O), O;
831
+ return c.value.split(" ").reduce((N, P) => (N[P] = !0, N), D), D;
831
832
  }
832
- function w(j, $) {
833
- return j.raw[i.value] || "";
833
+ function h(L, $) {
834
+ return L.raw[r.value] || "";
834
835
  }
835
- const v = B(() => !h.value);
836
- function D(j, $, O) {
837
- j.checked = O, !j.raw[p.value] && (v.value && (d.value = j.raw[i.value]), k(j));
836
+ const k = B(() => !p.value);
837
+ function T(L, $, D) {
838
+ L.checked = D, !L.raw[d.value] && (k.value && (y.value = L.raw[r.value]), C(L));
838
839
  }
839
- const m = B(() => h.value && l.value === "OnCheckClearByClick"), M = B(() => !h.value || h.value && (l.value === "OnCheckAndClick" || l.value === "OnClick"));
840
- function A(j, $, O) {
841
- if ($.raw[p.value]) {
842
- j.preventDefault(), j.stopPropagation();
840
+ const I = B(() => p.value && o.value === "OnCheckClearByClick"), O = B(() => !p.value || p.value && (o.value === "OnCheckAndClick" || o.value === "OnClick"));
841
+ function A(L, $, D) {
842
+ if ($.raw[d.value]) {
843
+ L.preventDefault(), L.stopPropagation();
843
844
  return;
844
845
  }
845
- d.value = $.raw[i.value], S.value = O, m.value && a(n.value), M.value && (k($), F.value = u()), t.emit("clickItem", { data: F.value, index: O }), t.emit("activeChange", F.value);
846
+ y.value = $.raw[r.value], m.value = D, I.value && g(n.value), O.value && (C($), w.value = v()), t.emit("clickItem", { data: w.value, index: D }), t.emit("activeChange", w.value);
846
847
  }
847
848
  return {
848
- getKey: w,
849
- listViewItemClass: V,
850
- onCheckItem: D,
849
+ getKey: h,
850
+ listViewItemClass: M,
851
+ onCheckItem: T,
851
852
  onClickItem: A
852
853
  };
853
854
  }
854
- function $t(e, t, n, o, s, c, i) {
855
- const p = C(e.view), g = C(e.view === "CardView"), y = C({}), h = C("暂无数据"), l = It(), r = Pt(e, t, o, l), S = Bt(e, t, o), d = At(e, t, n, r, l, c), f = B(() => ({
855
+ function At(e, t, n, a, i, l, r) {
856
+ const d = S(e.view), u = S(e.view === "CardView"), c = S({}), p = S("暂无数据"), o = Dt(), s = Ot(e, t, a, o), m = Pt(e, t, a), y = Et(e, t, n, s, o, l), f = B(() => ({
856
857
  "f-list-view-group": !0,
857
- "d-flex": g.value,
858
- "flex-wrap": g.value
859
- })), a = B(() => !!n.value && n.value.length > 0), u = B(() => n.value.length === 0), k = B(() => u.value && !t.slots.empty);
860
- function F() {
861
- return p.value === "SingleView" ? le : p.value === "DraggableView" ? Dt : (p.value === "ContentView" || p.value === "CardView") && t.slots.content ? Vt : le;
862
- }
863
- const V = F(), {
864
- renderItem: w
865
- } = V(e, t, n, r, s, l, d, c, S, i), {
866
- renderItem: v
867
- } = Ot(e, t, n, r, s, l, d, c, S, i), D = [w, v];
868
- function m() {
869
- return n.value.filter((j) => j.visible !== !1).map((j, $) => D[j.type](j, $, y));
870
- }
871
- function M() {
858
+ "d-flex": u.value,
859
+ "flex-wrap": u.value
860
+ })), g = B(() => !!n.value && n.value.length > 0), v = B(() => n.value.length === 0);
861
+ B(() => v.value && !t.slots.empty);
862
+ function C() {
863
+ return d.value === "SingleView" ? ie : d.value === "DraggableView" ? Tt : (d.value === "ContentView" || d.value === "CardView") && t.slots.content ? Lt : ie;
864
+ }
865
+ const w = C(), {
866
+ renderItem: M
867
+ } = w(e, t, n, s, i, o, y, l, m, r), {
868
+ renderItem: h
869
+ } = Vt(e, t, n, s, i, o, y, l, m, r), k = [M, h];
870
+ function T() {
871
+ return n.value.filter((A) => A.visible !== !1).map((A, L) => k[A.type](A, L, c));
872
+ }
873
+ function I() {
872
874
  return b("div", {
873
875
  class: "f-list-view-emptydata"
874
876
  }, [b("p", {
875
877
  class: "f-empty-title"
876
- }, [h.value])]);
878
+ }, [t.slots.empty ? t.slots.empty() : p.value])]);
877
879
  }
878
- function A() {
880
+ function O() {
879
881
  return b("ul", {
880
882
  class: f.value,
881
883
  style: "list-style: none;"
882
- }, [a.value && m(), k.value && M(), t.slots.empty && t.slots.empty()]);
884
+ }, [g.value && T(), v.value && I()]);
883
885
  }
884
886
  return {
885
- renderListArea: A
887
+ renderListArea: O
886
888
  };
887
889
  }
888
- function xt(e, t, n) {
889
- function o() {
890
+ function $t(e, t, n) {
891
+ function a() {
890
892
  return t.slots.header && b("div", {
891
893
  class: "f-list-view-header"
892
894
  }, [t.slots.header()]);
893
895
  }
894
896
  return {
895
- renderHeader: o
897
+ renderHeader: a
896
898
  };
897
899
  }
898
- function se(e, t, n) {
899
- const o = C(e.headerClass), s = C(e.placeholder), c = C(""), i = B(() => !c.value), p = B(() => !!c.value);
900
- function g(r) {
901
- c.value = "";
900
+ function re(e, t, n) {
901
+ const a = S(e.headerClass), i = S(e.placeholder), l = S(""), r = B(() => !l.value), d = B(() => !!l.value);
902
+ function u(s) {
903
+ l.value = "";
902
904
  }
903
- N(c, (r) => {
904
- e.enableHighlightSearch && n.search(r), t.emit("afterSearch", r);
905
+ G(l, (s) => {
906
+ e.enableHighlightSearch && n.search(s), t.emit("afterSearch", s);
905
907
  });
906
- const y = B(() => {
907
- const r = {
908
+ const c = B(() => {
909
+ const s = {
908
910
  "form-group": !0,
909
911
  "farris-form-group": !0
910
912
  };
911
- return o.value && o.value.split(" ").reduce((d, f) => (d[f] = !0, d), r), r;
913
+ return a.value && a.value.split(" ").reduce((y, f) => (y[f] = !0, y), s), s;
912
914
  });
913
- function h(r) {
915
+ function p(s) {
914
916
  }
915
- function l() {
917
+ function o() {
916
918
  return b("div", {
917
919
  class: "f-list-view-header",
918
- onClick: ke(() => h, ["prevent", "stop"])
920
+ onClick: we(() => p, ["prevent", "stop"])
919
921
  }, [b("div", {
920
- class: y.value
922
+ class: c.value
921
923
  }, [b("div", {
922
924
  class: "farris-input-wrap"
923
925
  }, [b("div", {
924
926
  class: "f-cmp-inputgroup"
925
927
  }, [b("div", {
926
928
  class: "input-group f-state-editable"
927
- }, [Fe(b("input", {
929
+ }, [ke(b("input", {
928
930
  class: "form-control f-utils-fill text-left",
929
- "onUpdate:modelValue": (r) => c.value = r,
931
+ "onUpdate:modelValue": (s) => l.value = s,
930
932
  name: "input-group-value",
931
933
  type: "text",
932
- placeholder: s.value,
934
+ placeholder: i.value,
933
935
  autocomplete: "off"
934
- }, null), [[je, c.value]]), b("div", {
936
+ }, null), [[Ie, l.value]]), b("div", {
935
937
  class: "input-group-append"
936
- }, [p.value && b("span", {
938
+ }, [d.value && b("span", {
937
939
  class: "input-group-text input-group-clear",
938
- onClick: (r) => g()
940
+ onClick: (s) => u()
939
941
  }, [b("i", {
940
942
  class: "f-icon f-icon-close-circle"
941
- }, null)]), i.value && b("span", {
943
+ }, null)]), r.value && b("span", {
942
944
  class: "input-group-text"
943
945
  }, [b("span", {
944
946
  class: "f-icon f-icon-search"
945
947
  }, null)])])])])])])]);
946
948
  }
947
949
  return {
948
- renderHeader: l
950
+ renderHeader: o
949
951
  };
950
952
  }
951
- const fe = /* @__PURE__ */ H({
953
+ const fe = /* @__PURE__ */ R({
952
954
  name: "FListView",
953
955
  props: pe,
954
956
  emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
955
957
  setup(e, t) {
956
- const n = C(), o = C(!0), s = C(!1), c = C([]), i = 0, p = C(e.columns), g = Ve(e), y = De(e), h = Oe(e, g), l = Ie(e), r = Pe(e, /* @__PURE__ */ new Map(), y, g, l), S = Be(e, r, g, c, t), d = Tt(e, n), f = B(() => r.dataView.value.length), a = Ae(e, t, g), u = $e(), k = xe(e, {}, u), F = Le(e, a, y, g, u, k), V = Ee(e, g, k, F), w = Ne(e, g, k, F), v = He(e, p, r, f, i, F, V, w), {
957
- getVisualData: D
958
- } = v;
959
- c.value = D(0, f.value + i - 1);
960
- const m = B(() => {
961
- const L = {
958
+ const n = S(), a = S(!0), i = S(!1), l = S([]), r = 0, d = S(e.columns), u = Te(e), c = Ve(e), p = De(e, u), o = Oe(e), s = Pe(e, /* @__PURE__ */ new Map(), c, u, o), m = Ee(e, s, u, l, t), y = Bt(e, n), f = B(() => s.dataView.value.length), g = Ae(e, t, u), v = $e(), C = je(e, {}, v), w = Ne(e, g, c, u, v, C), M = Re(e, u, C, w), h = Ge(e, u, C, w), k = Ue(e, d, s, f, r, w, M, h), {
959
+ getVisualData: T
960
+ } = k;
961
+ l.value = T(0, f.value + r - 1);
962
+ const I = B(() => {
963
+ const j = {
962
964
  "f-list-view": !0,
963
965
  "f-list-view-multiple": e.multiSelect
964
966
  };
965
- return e.size !== "default" && (L[`${e.size}-item`] = !0), L;
966
- }), M = B(() => !!t.slots.footer || o.value);
967
+ return e.size !== "default" && (j[`${e.size}-item`] = !0), j;
968
+ }), O = B(() => !!t.slots.footer || a.value);
967
969
  function A() {
968
- return e.header === "SearchBar" ? se : e.header === "ContentHeader" ? xt : se;
970
+ return e.header === "SearchBar" ? re : e.header === "ContentHeader" ? $t : re;
969
971
  }
970
- const j = A(), {
972
+ const L = A(), {
971
973
  renderHeader: $
972
- } = j(e, t, d), {
973
- renderListArea: O
974
- } = $t(e, t, c, r, h, S, v);
975
- function P(L) {
976
- d.search(L);
974
+ } = L(e, t, y), {
975
+ renderListArea: D
976
+ } = At(e, t, l, s, p, m, k);
977
+ function E(j) {
978
+ y.search(j);
977
979
  }
978
- function x(L) {
979
- L && (r.load(L), c.value = D(0, f.value + i - 1));
980
+ function N(j) {
981
+ j && (s.load(j), l.value = T(0, f.value + r - 1));
980
982
  }
981
983
  t.expose({
982
- search: P,
983
- updateDataSource: x
984
+ search: E,
985
+ updateDataSource: N
984
986
  });
985
- function I(L) {
986
- e.multiSelect && (L.preventDefault(), L.stopPropagation());
987
+ function P(j) {
988
+ e.multiSelect && (j.preventDefault(), j.stopPropagation());
987
989
  }
988
990
  return () => b("div", {
989
- class: m.value,
990
- onClick: I
991
+ class: I.value,
992
+ onClick: P
991
993
  }, [$(), b("div", {
992
994
  ref: n,
993
995
  class: "f-list-view-content",
994
996
  onMouseover: () => {
995
- s.value = !0;
997
+ i.value = !0;
996
998
  },
997
999
  onMouseleave: () => {
998
- s.value = !1;
1000
+ i.value = !1;
999
1001
  }
1000
- }, [O()]), M.value && b("div", {
1002
+ }, [D()]), O.value && b("div", {
1001
1003
  class: "f-list-view-footer"
1002
1004
  }, [t.slots.footer && t.slots.footer()])]);
1003
1005
  }
1004
- }), Lt = {
1006
+ }), jt = {
1005
1007
  /**
1006
1008
  * 组件标识
1007
1009
  */
@@ -1027,58 +1029,58 @@ const fe = /* @__PURE__ */ H({
1027
1029
  */
1028
1030
  customClass: { type: Object, default: {} }
1029
1031
  };
1030
- function Et(e, t) {
1031
- function n(o) {
1032
- o.stopPropagation(), e.disabled || t.emit("click", o);
1032
+ function Nt(e, t) {
1033
+ function n(a) {
1034
+ a.stopPropagation(), e.disabled || t.emit("click", a);
1033
1035
  }
1034
1036
  return {
1035
1037
  onClickButton: n
1036
1038
  };
1037
1039
  }
1038
- function Nt(e) {
1040
+ function Rt(e) {
1039
1041
  const t = B(() => {
1040
- const o = {
1042
+ const a = {
1041
1043
  "f-icon": !0
1042
1044
  };
1043
1045
  if (e.icon) {
1044
- const s = e.icon.trim().split(" ");
1045
- s && s.length && s.reduce((c, i) => (c[i] = !0, c), o);
1046
+ const i = e.icon.trim().split(" ");
1047
+ i && i.length && i.reduce((l, r) => (l[r] = !0, l), a);
1046
1048
  }
1047
- return o;
1049
+ return a;
1048
1050
  }), n = B(() => !!(e.icon && e.icon.trim()));
1049
1051
  return { iconClass: t, shouldShowIcon: n };
1050
1052
  }
1051
- const me = /* @__PURE__ */ H({
1053
+ const me = /* @__PURE__ */ R({
1052
1054
  name: "FButton",
1053
- props: Lt,
1055
+ props: jt,
1054
1056
  emits: ["click"],
1055
1057
  setup(e, t) {
1056
1058
  const {
1057
1059
  onClickButton: n
1058
- } = Et(e, t), {
1059
- iconClass: o,
1060
- shouldShowIcon: s
1061
- } = Nt(e), c = B(() => {
1062
- const i = {
1060
+ } = Nt(e, t), {
1061
+ iconClass: a,
1062
+ shouldShowIcon: i
1063
+ } = Rt(e), l = B(() => {
1064
+ const r = {
1063
1065
  btn: !0,
1064
1066
  "btn-lg": e.size === "large",
1065
1067
  "btn-md": e.size !== "large" && e.size !== "small",
1066
1068
  "btn-sm": e.size === "small",
1067
- "btn-icontext": s.value
1069
+ "btn-icontext": i.value
1068
1070
  };
1069
- return i[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((p, g) => (p[g] = e.customClass[g], p), i), i;
1071
+ return r[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((d, u) => (d[u] = e.customClass[u], d), r), r;
1070
1072
  });
1071
1073
  return () => b("button", {
1072
- class: c.value,
1074
+ class: l.value,
1073
1075
  disabled: e.disabled,
1074
- onClick: (i) => n(i)
1075
- }, [s.value && b("i", {
1076
- class: o.value
1076
+ onClick: (r) => n(r)
1077
+ }, [i.value && b("i", {
1078
+ class: a.value
1077
1079
  }, null), t.slots.default && t.slots.default()]);
1078
1080
  }
1079
- }), Ht = /* @__PURE__ */ new Map([
1080
- ["appearance", ee]
1081
- ]), Rt = "https://json-schema.org/draft/2020-12/schema", Ut = "https://farris-design.gitee.io/combo-list.schema.json", Gt = "combo-list", qt = "A Farris Input Component", _t = "object", Wt = {
1081
+ }), Gt = /* @__PURE__ */ new Map([
1082
+ ["appearance", te]
1083
+ ]), Ut = "https://json-schema.org/draft/2020-12/schema", xt = "https://farris-design.gitee.io/combo-list.schema.json", qt = "combo-list", Wt = "A Farris Input Component", Ht = "object", _t = {
1082
1084
  id: {
1083
1085
  description: "The unique identifier for a combo list",
1084
1086
  type: "string"
@@ -1197,24 +1199,24 @@ const me = /* @__PURE__ */ H({
1197
1199
  }, zt = [
1198
1200
  "id",
1199
1201
  "type"
1200
- ], Jt = [
1202
+ ], Xt = [
1201
1203
  "id",
1202
1204
  "appearance",
1203
1205
  "binding"
1204
- ], Xt = {
1205
- $schema: Rt,
1206
- $id: Ut,
1207
- title: Gt,
1208
- description: qt,
1209
- type: _t,
1210
- properties: Wt,
1206
+ ], Jt = {
1207
+ $schema: Ut,
1208
+ $id: xt,
1209
+ title: qt,
1210
+ description: Wt,
1211
+ type: Ht,
1212
+ properties: _t,
1211
1213
  required: zt,
1212
- ignore: Jt
1214
+ ignore: Xt
1213
1215
  };
1214
1216
  function Qt(e, t, n) {
1215
1217
  return t;
1216
1218
  }
1217
- const ne = {
1219
+ const oe = {
1218
1220
  /**
1219
1221
  * 组件标识
1220
1222
  */
@@ -1380,7 +1382,7 @@ const ne = {
1380
1382
  },
1381
1383
  // 搜索启用高亮
1382
1384
  enableHighlightSearch: { type: Boolean, default: !0 }
1383
- }, ye = K(ne, Xt, Ht, Qt), Yt = {
1385
+ }, ye = _(oe, Jt, Gt, Qt), Yt = {
1384
1386
  dataSource: { type: Array, default: [] },
1385
1387
  enableSearch: { type: Boolean, default: !1 },
1386
1388
  idField: { type: String, default: "id" },
@@ -1400,174 +1402,172 @@ const ne = {
1400
1402
  default: !1
1401
1403
  },
1402
1404
  // 搜索启用高亮
1403
- enableHighlightSearch: { type: Boolean, default: !0 },
1404
- // 是否展示复选框
1405
- showCheckbox: { type: Boolean, default: !1 }
1406
- }, Zt = /* @__PURE__ */ H({
1405
+ enableHighlightSearch: { type: Boolean, default: !0 }
1406
+ }, Zt = /* @__PURE__ */ R({
1407
1407
  name: "FComboListContainer",
1408
1408
  props: Yt,
1409
1409
  emits: ["selectionChange"],
1410
1410
  setup(e, t) {
1411
- const n = C(), o = C(e.dataSource), s = C([]), c = C(e.separator), i = C(e.width), p = C(e.maxHeight), g = C(String(e.selectedValues).split(c.value)), y = B(() => e.multiSelect), h = B(() => ({
1411
+ const n = S(), a = S(e.dataSource), i = S([]), l = S(e.separator), r = S(e.width), d = S(e.maxHeight), u = S(String(e.selectedValues).split(l.value)), c = B(() => e.multiSelect), p = B(() => ({
1412
1412
  enableSelectRow: !0,
1413
1413
  multiSelect: e.multiSelect,
1414
1414
  multiSelectMode: "OnCheckAndClick",
1415
- showCheckbox: y.value,
1415
+ showCheckbox: c.value,
1416
1416
  showSelectAll: !1,
1417
1417
  showSelection: !0
1418
1418
  }));
1419
- N(e.dataSource, () => {
1420
- o.value = e.dataSource;
1419
+ G(e.dataSource, () => {
1420
+ a.value = e.dataSource;
1421
1421
  });
1422
- const l = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), r = B(() => {
1422
+ const o = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), s = B(() => {
1423
1423
  const f = {};
1424
- return i.value !== void 0 && (f.width = `${i.value}px`), p.value !== void 0 && p.value > 0 && (f.maxHeight = `${p.value}px`), f;
1424
+ return r.value !== void 0 && (f.width = `${r.value}px`), d.value !== void 0 && d.value > 0 && (f.maxHeight = `${d.value}px`), f;
1425
1425
  });
1426
- function S(f) {
1427
- s.value = f.map((a) => Object.assign({}, a)), g.value = f.map((a) => a[e.idField]), t.emit("selectionChange", s.value);
1426
+ function m(f) {
1427
+ i.value = f.map((g) => Object.assign({}, g)), u.value = f.map((g) => g[e.idField]), t.emit("selectionChange", i.value);
1428
1428
  }
1429
- function d(f) {
1429
+ function y(f) {
1430
1430
  if (e.enableHighlightSearch)
1431
1431
  return;
1432
- let a = [];
1433
- typeof e.searchOption == "function" ? a = o.value.filter((u) => e.searchOption(f, u)) : a = o.value.filter((u) => u[e.valueField].indexOf(f) > -1 || u[e.textField].indexOf(f) > -1), n.value.updateDataSource(a);
1432
+ let g = [];
1433
+ typeof e.searchOption == "function" ? g = a.value.filter((v) => e.searchOption(f, v)) : g = a.value.filter((v) => v[e.valueField].indexOf(f) > -1 || v[e.textField].indexOf(f) > -1), n.value.updateDataSource(g);
1434
1434
  }
1435
- return N([() => e.selectedValues], ([f]) => {
1436
- g.value = f.split(c.value);
1435
+ return G([() => e.selectedValues], ([f]) => {
1436
+ u.value = f.split(l.value);
1437
1437
  }), () => b("div", {
1438
1438
  class: "f-combo-list-container pl-1",
1439
- style: r.value
1440
- }, [b(Re, {
1439
+ style: s.value
1440
+ }, [b(xe, {
1441
1441
  ref: n,
1442
1442
  size: "small",
1443
1443
  itemClass: "f-combo-list-item",
1444
- header: l.value,
1444
+ header: o.value,
1445
1445
  headerClass: "f-combo-list-search-box",
1446
- data: o.value,
1446
+ data: a.value,
1447
1447
  idField: e.idField,
1448
1448
  textField: e.textField,
1449
1449
  titleField: e.titleField,
1450
1450
  multiSelect: e.multiSelect,
1451
- selection: h.value,
1451
+ selection: p.value,
1452
1452
  enableHighlightSearch: e.enableHighlightSearch,
1453
- selectionValues: g.value,
1454
- onSelectionChange: S,
1455
- onAfterSearch: d
1453
+ selectionValues: u.value,
1454
+ onSelectionChange: m,
1455
+ onAfterSearch: y
1456
1456
  }, null)]);
1457
1457
  }
1458
1458
  });
1459
1459
  function Kt(e) {
1460
- const t = C(""), n = C(e.modelValue), o = C(e.data || []), s = C(e.editable);
1461
- function c(l) {
1462
- const r = String(l).split(e.separator), S = r.map((a) => [a, !0]), d = new Map(S);
1463
- return o.value.filter((a) => d.has(String(a[e.valueField]))).sort((a, u) => {
1464
- const k = r.indexOf(a[e.valueField]), F = r.indexOf(u[e.valueField]);
1465
- return k - F;
1460
+ const t = S(""), n = S(e.modelValue), a = S(e.data || []), i = S(e.editable);
1461
+ function l(o) {
1462
+ const s = String(o).split(e.separator), m = s.map((g) => [g, !0]), y = new Map(m);
1463
+ return a.value.filter((g) => y.has(String(g[e.valueField]))).sort((g, v) => {
1464
+ const C = s.indexOf(g[e.valueField]), w = s.indexOf(v[e.valueField]);
1465
+ return C - w;
1466
1466
  });
1467
1467
  }
1468
- function i(l) {
1469
- const r = c(l).map((S) => S[e.textField]).join(e.separator);
1470
- t.value = s.value ? r || l : r;
1471
- }
1472
- function p(l) {
1473
- const r = l.split(e.separator).map((d) => [d, !0]), S = new Map(r);
1474
- return o.value.filter((d) => S.has(d[e.textField]));
1475
- }
1476
- function g(l) {
1477
- const r = {};
1478
- return r[e.idField] = l, r[e.textField] = l, [r];
1479
- }
1480
- function y(l) {
1481
- let r = p(l);
1482
- const S = r && r.length > 0;
1483
- return s.value && !S && (r = g(l)), r;
1484
- }
1485
- function h() {
1486
- const { url: l, method: r = "GET", headers: S = {}, body: d = null } = e.remote, f = r.toLowerCase() == "get" ? { method: r, headers: S } : { method: r, headers: S, body: d };
1487
- let a = !1;
1488
- fetch(l, f).then((u) => {
1489
- var F, V;
1490
- if (u.status === 200)
1491
- return a = !!((V = (F = u.headers) == null ? void 0 : F.get("content-type")) != null && V.includes("application/json")), a ? u.text() : u.json();
1492
- throw new Error(u.statusText);
1493
- }).then((u) => {
1494
- o.value = a ? JSON.parse(u) : u;
1495
- }).catch((u) => {
1496
- console.error(u);
1468
+ function r(o) {
1469
+ const s = l(o).map((m) => m[e.textField]).join(e.separator);
1470
+ t.value = i.value ? s || o : s;
1471
+ }
1472
+ function d(o) {
1473
+ const s = o.split(e.separator).map((y) => [y, !0]), m = new Map(s);
1474
+ return a.value.filter((y) => m.has(y[e.textField]));
1475
+ }
1476
+ function u(o) {
1477
+ const s = {};
1478
+ return s[e.idField] = o, s[e.textField] = o, [s];
1479
+ }
1480
+ function c(o) {
1481
+ let s = d(o);
1482
+ const m = s && s.length > 0;
1483
+ return i.value && !m && (s = u(o)), s;
1484
+ }
1485
+ function p() {
1486
+ const { url: o, method: s = "GET", headers: m = {}, body: y = null } = e.remote, f = s.toLowerCase() == "get" ? { method: s, headers: m } : { method: s, headers: m, body: y };
1487
+ let g = !1;
1488
+ fetch(o, f).then((v) => {
1489
+ var w, M;
1490
+ if (v.status === 200)
1491
+ return g = !!((M = (w = v.headers) == null ? void 0 : w.get("content-type")) != null && M.includes("application/json")), g ? v.text() : v.json();
1492
+ throw new Error(v.statusText);
1493
+ }).then((v) => {
1494
+ a.value = g ? JSON.parse(v) : v;
1495
+ }).catch((v) => {
1496
+ console.error(v);
1497
1497
  });
1498
1498
  }
1499
- return e.remote && h(), N(() => e.data, () => {
1500
- o.value = e.data;
1501
- }), N([o], ([l]) => {
1502
- if (e.modelValue) {
1503
- const r = l.find((S) => S[e.valueField] === e.modelValue);
1504
- r && (t.value = r[e.textField]);
1499
+ return e.remote && p(), G(() => e.data, () => {
1500
+ a.value = e.data;
1501
+ }), G([a], ([o]) => {
1502
+ if (e.modelValue != null) {
1503
+ const s = o.find((m) => m[e.valueField] === e.modelValue);
1504
+ s && (t.value = s[e.textField]);
1505
1505
  }
1506
- }), N(() => e.modelValue, (l) => {
1507
- n.value = l, i(l);
1508
- }), i(e.modelValue), { dataSource: o, displayText: t, editable: s, modelValue: n, getItemsByDisplayText: p, getItemsByValue: c, getSelectedItemsByDisplayText: y };
1506
+ }), G(() => e.modelValue, (o) => {
1507
+ n.value = o, r(o);
1508
+ }), r(e.modelValue), { dataSource: a, displayText: t, editable: i, modelValue: n, getItemsByDisplayText: d, getItemsByValue: l, getSelectedItemsByDisplayText: c };
1509
1509
  }
1510
- const G = /* @__PURE__ */ H({
1510
+ const q = /* @__PURE__ */ R({
1511
1511
  name: "FComboList",
1512
- props: ne,
1512
+ props: oe,
1513
1513
  emits: ["clear", "update:modelValue", "change", "input"],
1514
1514
  setup(e, t) {
1515
- const n = C(), o = C(e.disabled), s = C(e.enableClear), c = C(e.enableSearch), i = C(e.readonly), {
1516
- dataSource: p,
1517
- displayText: g,
1518
- editable: y,
1519
- modelValue: h,
1520
- getSelectedItemsByDisplayText: l
1521
- } = Kt(e), r = B(() => e.multiSelect), S = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
1522
- function d() {
1523
- !r.value && n.value && n.value.hidePopup();
1515
+ const n = S(), a = S(e.disabled), i = S(e.enableClear), l = S(e.enableSearch), r = S(e.readonly), {
1516
+ dataSource: d,
1517
+ displayText: u,
1518
+ editable: c,
1519
+ modelValue: p,
1520
+ getSelectedItemsByDisplayText: o
1521
+ } = Kt(e), s = B(() => e.multiSelect), m = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
1522
+ function y() {
1523
+ !s.value && n.value && n.value.hidePopup();
1524
1524
  }
1525
- function f(w) {
1526
- g.value = w.map((v) => v[e.textField]).join(e.separator), w.length === 1 ? h.value = w[0][e.valueField] : h.value = w.map((v) => v[e.valueField]).join(e.separator), t.emit("update:modelValue", h.value), t.emit("change", w, h.value), d();
1525
+ function f(h) {
1526
+ u.value = h.map((k) => k[e.textField]).join(e.separator), h.length === 1 ? p.value = h[0][e.valueField] : p.value = h.map((k) => k[e.valueField]).join(e.separator), t.emit("update:modelValue", p.value), t.emit("change", h, p.value), y();
1527
1527
  }
1528
- function a() {
1529
- i.value || n.value.togglePopup();
1528
+ function g() {
1529
+ r.value || n.value.togglePopup();
1530
1530
  }
1531
- function u(w) {
1532
- h.value = "", t.emit("update:modelValue", ""), t.emit("clear");
1531
+ function v(h) {
1532
+ p.value = "", t.emit("update:modelValue", ""), t.emit("clear");
1533
1533
  }
1534
- function k(w) {
1535
- const v = l(w);
1536
- f(v);
1534
+ function C(h) {
1535
+ const k = o(h);
1536
+ f(k);
1537
1537
  }
1538
- function F() {
1539
- return g.value;
1538
+ function w() {
1539
+ return u.value;
1540
1540
  }
1541
- function V(w) {
1542
- t.emit("input", w);
1541
+ function M(h) {
1542
+ t.emit("input", h);
1543
1543
  }
1544
1544
  return t.expose({
1545
- getDisplayText: F
1546
- }), N([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([w, v, D, m, M]) => {
1547
- o.value = w, y.value = v, s.value = D, c.value = m, i.value = M;
1548
- }), () => b(Ue, {
1545
+ getDisplayText: w
1546
+ }), G([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([h, k, T, I, O]) => {
1547
+ a.value = h, c.value = k, i.value = T, l.value = I, r.value = O;
1548
+ }), () => b(qe, {
1549
1549
  ref: n,
1550
1550
  id: e.id,
1551
- disable: o.value,
1552
- readonly: i.value,
1551
+ disable: a.value,
1552
+ readonly: r.value,
1553
1553
  forcePlaceholder: e.forcePlaceholder,
1554
- editable: y.value,
1554
+ editable: c.value,
1555
1555
  buttonContent: e.dropDownIcon,
1556
1556
  placeholder: e.placeholder,
1557
- enableClear: s.value,
1557
+ enableClear: i.value,
1558
1558
  maxLength: e.maxLength,
1559
1559
  tabIndex: e.tabIndex,
1560
1560
  enableTitle: e.enableTitle,
1561
1561
  multiSelect: e.multiSelect,
1562
1562
  inputType: e.multiSelect ? e.viewType : "text",
1563
- modelValue: g.value,
1564
- "onUpdate:modelValue": (w) => g.value = w,
1563
+ modelValue: u.value,
1564
+ "onUpdate:modelValue": (h) => u.value = h,
1565
1565
  focusOnCreated: e.focusOnCreated,
1566
1566
  selectOnCreated: e.selectOnCreated,
1567
- onClear: u,
1568
- onClick: a,
1569
- onChange: k,
1570
- onInput: V,
1567
+ onClear: v,
1568
+ onClick: g,
1569
+ onChange: C,
1570
+ onInput: M,
1571
1571
  beforeOpen: e.beforeOpen
1572
1572
  }, {
1573
1573
  default: () => [b(Zt, {
@@ -1575,71 +1575,690 @@ const G = /* @__PURE__ */ H({
1575
1575
  valueField: e.valueField,
1576
1576
  textField: e.textField,
1577
1577
  titleField: e.titleField,
1578
- dataSource: p.value,
1579
- selectedValues: h.value,
1578
+ dataSource: d.value,
1579
+ selectedValues: p.value,
1580
1580
  multiSelect: e.multiSelect,
1581
- enableSearch: c.value,
1581
+ enableSearch: l.value,
1582
1582
  maxHeight: e.maxHeight,
1583
1583
  enableHighlightSearch: e.enableHighlightSearch,
1584
- width: e.fitEditor ? S.value : void 0,
1584
+ width: e.fitEditor ? m.value : void 0,
1585
1585
  onSelectionChange: f
1586
1586
  }, null)]
1587
1587
  });
1588
1588
  }
1589
+ }), en = /* @__PURE__ */ new Map([
1590
+ ["appearance", We]
1591
+ ]);
1592
+ function tn(e, t, n) {
1593
+ return t;
1594
+ }
1595
+ const nn = "https://json-schema.org/draft/2020-12/schema", on = "https://farris-design.gitee.io/button-edit.schema.json", ln = "button-edit", an = "A Farris Input Component", rn = "object", sn = {
1596
+ id: {
1597
+ description: "The unique identifier for a Input Group",
1598
+ type: "string"
1599
+ },
1600
+ type: {
1601
+ description: "The type string of Input Group component",
1602
+ type: "string",
1603
+ default: "button-edit"
1604
+ },
1605
+ appearance: {
1606
+ description: "",
1607
+ type: "object",
1608
+ properties: {
1609
+ class: {
1610
+ type: "string"
1611
+ },
1612
+ style: {
1613
+ type: "string"
1614
+ }
1615
+ },
1616
+ default: {}
1617
+ },
1618
+ binding: {
1619
+ description: "",
1620
+ type: "object",
1621
+ default: {}
1622
+ },
1623
+ disable: {
1624
+ type: "string",
1625
+ default: !1
1626
+ },
1627
+ editable: {
1628
+ description: "",
1629
+ type: "boolean",
1630
+ default: !0
1631
+ },
1632
+ enableLinkLabel: {
1633
+ description: "",
1634
+ type: "boolean",
1635
+ default: !1
1636
+ },
1637
+ label: {
1638
+ description: "",
1639
+ type: "string",
1640
+ default: ""
1641
+ },
1642
+ lableWidth: {
1643
+ description: "",
1644
+ type: "number"
1645
+ },
1646
+ placeholder: {
1647
+ description: "",
1648
+ type: "string",
1649
+ default: ""
1650
+ },
1651
+ readonly: {
1652
+ description: "",
1653
+ type: "boolean",
1654
+ default: !1
1655
+ },
1656
+ require: {
1657
+ description: "",
1658
+ type: "boolean",
1659
+ default: !1
1660
+ },
1661
+ tabindex: {
1662
+ description: "",
1663
+ type: "number",
1664
+ default: -1
1665
+ },
1666
+ textAlign: {
1667
+ description: "",
1668
+ type: "string",
1669
+ enum: [
1670
+ "left",
1671
+ "middle",
1672
+ "right"
1673
+ ],
1674
+ default: "left"
1675
+ },
1676
+ visible: {
1677
+ description: "",
1678
+ type: "boolean",
1679
+ default: !0
1680
+ },
1681
+ onBlur: {
1682
+ description: "",
1683
+ type: "string",
1684
+ default: ""
1685
+ },
1686
+ onClickLinkLabel: {
1687
+ description: "",
1688
+ type: "sting",
1689
+ default: ""
1690
+ },
1691
+ autoComplete: {
1692
+ description: "",
1693
+ type: "boolean",
1694
+ default: !1
1695
+ },
1696
+ buttonContent: {
1697
+ description: "",
1698
+ type: "string",
1699
+ default: ""
1700
+ },
1701
+ enableClear: {
1702
+ description: "",
1703
+ type: "boolean",
1704
+ default: !0
1705
+ },
1706
+ inputType: {
1707
+ description: "",
1708
+ type: "string",
1709
+ enum: [
1710
+ "text",
1711
+ "tag"
1712
+ ],
1713
+ default: "text"
1714
+ },
1715
+ multiSelect: {
1716
+ description: "",
1717
+ type: "boolean",
1718
+ default: !1
1719
+ },
1720
+ popup: {
1721
+ description: "",
1722
+ type: "object",
1723
+ properties: {
1724
+ footerButtons: {
1725
+ type: "array",
1726
+ default: []
1727
+ },
1728
+ height: {
1729
+ type: "number",
1730
+ default: 600
1731
+ },
1732
+ dataMapping: {
1733
+ type: "object"
1734
+ },
1735
+ contents: {
1736
+ type: "array",
1737
+ default: []
1738
+ },
1739
+ showMaxButton: {
1740
+ type: "boolean",
1741
+ default: !0
1742
+ },
1743
+ showCloseButton: {
1744
+ type: "boolean",
1745
+ default: !0
1746
+ },
1747
+ showFooter: {
1748
+ type: "boolean",
1749
+ default: !0
1750
+ },
1751
+ title: {
1752
+ type: "string",
1753
+ default: ""
1754
+ },
1755
+ width: {
1756
+ type: "number",
1757
+ default: 800
1758
+ }
1759
+ }
1760
+ },
1761
+ separator: {
1762
+ type: "string",
1763
+ default: ","
1764
+ },
1765
+ showButtonWhenDisabled: {
1766
+ description: "",
1767
+ type: "boolean",
1768
+ default: !1
1769
+ },
1770
+ wrapText: {
1771
+ type: "boolean",
1772
+ default: !1
1773
+ },
1774
+ onClear: {
1775
+ description: "",
1776
+ type: "string",
1777
+ default: ""
1778
+ }
1779
+ }, cn = [
1780
+ "id",
1781
+ "type"
1782
+ ], un = {
1783
+ $schema: nn,
1784
+ $id: on,
1785
+ title: ln,
1786
+ description: an,
1787
+ type: rn,
1788
+ properties: sn,
1789
+ required: cn
1790
+ }, dn = "buttonEdit", pn = "A Farris Component", fn = "object", mn = {
1791
+ basic: {
1792
+ description: "Basic Infomation",
1793
+ title: "基本信息",
1794
+ properties: {
1795
+ id: {
1796
+ description: "组件标识",
1797
+ title: "标识",
1798
+ type: "string",
1799
+ readonly: !0
1800
+ },
1801
+ type: {
1802
+ description: "组件类型",
1803
+ title: "控件类型",
1804
+ type: "select",
1805
+ editor: {
1806
+ type: "waiting for modification",
1807
+ enum: []
1808
+ }
1809
+ }
1810
+ }
1811
+ },
1812
+ behavior: {
1813
+ description: "Basic Infomation",
1814
+ title: "行为",
1815
+ properties: {
1816
+ editable: {
1817
+ description: "",
1818
+ title: "允许编辑",
1819
+ type: "boolean"
1820
+ },
1821
+ readonly: {
1822
+ description: "",
1823
+ title: "只读",
1824
+ type: "string"
1825
+ },
1826
+ required: {
1827
+ description: "",
1828
+ title: "必填",
1829
+ type: "boolean"
1830
+ },
1831
+ visible: {
1832
+ description: "",
1833
+ title: "可见",
1834
+ type: "boolean"
1835
+ },
1836
+ placeholder: {
1837
+ description: "",
1838
+ title: "提示文本",
1839
+ type: "string"
1840
+ },
1841
+ tabindex: {
1842
+ description: "",
1843
+ title: "tab索引",
1844
+ type: "number"
1845
+ },
1846
+ textAlign: {
1847
+ description: "",
1848
+ title: "对齐方式",
1849
+ type: "enum",
1850
+ editor: {
1851
+ type: "combo-list",
1852
+ textField: "name",
1853
+ valueField: "value",
1854
+ data: [
1855
+ {
1856
+ value: "left",
1857
+ name: "左对齐"
1858
+ },
1859
+ {
1860
+ value: "center",
1861
+ name: "居中对齐"
1862
+ },
1863
+ {
1864
+ value: "right",
1865
+ name: "右对齐"
1866
+ }
1867
+ ]
1868
+ }
1869
+ }
1870
+ }
1871
+ }
1872
+ }, yn = {
1873
+ title: dn,
1874
+ description: pn,
1875
+ type: fn,
1876
+ categories: mn
1877
+ }, he = {
1878
+ /**
1879
+ * 组件标识
1880
+ */
1881
+ id: String,
1882
+ /**
1883
+ * 扩展按钮显示内容,这是一段现在扩展按钮中的html标签
1884
+ */
1885
+ buttonContent: { type: String, default: '<i class="f-icon f-icon-lookup"></i>' },
1886
+ buttonBehavior: { type: String, default: "Popup" },
1887
+ /**
1888
+ * 启用输入框自动完成功能
1889
+ */
1890
+ autoComplete: { type: Boolean, default: !1 },
1891
+ /**
1892
+ * 组件自定义样式
1893
+ */
1894
+ customClass: { type: String, default: "" },
1895
+ /**
1896
+ * 禁用组件,既不允许在输入框中录入,也不允许点击扩展按钮。
1897
+ */
1898
+ disable: { type: Boolean, default: !1 },
1899
+ /**
1900
+ * 允许在输入框中录入文本。
1901
+ */
1902
+ editable: { type: Boolean, default: !0 },
1903
+ /**
1904
+ * 显示清空文本按钮
1905
+ */
1906
+ enableClear: { type: Boolean, default: !1 },
1907
+ /**
1908
+ * 组件值
1909
+ */
1910
+ modelValue: { type: String, default: "" },
1911
+ /**
1912
+ * 将组件设置为只读,既不允许在输入框中录入,也不允许点击扩展按钮,但是允许复制输入框中的内容。
1913
+ */
1914
+ readonly: { type: Boolean, default: !1 },
1915
+ /**
1916
+ * 禁用组件时,是否显示扩展按钮
1917
+ */
1918
+ showButtonWhenDisabled: { type: Boolean, default: !1 },
1919
+ /**
1920
+ * 显示输入框的标签
1921
+ */
1922
+ enableTitle: { type: Boolean, default: !1 },
1923
+ /**
1924
+ * 输入框类型
1925
+ */
1926
+ inputType: { type: String, default: "text" },
1927
+ /**
1928
+ * 显示输入框提示信息
1929
+ */
1930
+ forcePlaceholder: { type: Boolean, default: !1 },
1931
+ /**
1932
+ * 输入框提示文本
1933
+ */
1934
+ placeholder: { type: String, default: "" },
1935
+ /**
1936
+ * 输入框最小长度
1937
+ */
1938
+ minLength: Number,
1939
+ /**
1940
+ * 输入框最大长度
1941
+ */
1942
+ maxLength: Number,
1943
+ /**
1944
+ * 输入框Tab键索引
1945
+ */
1946
+ tabIndex: Number,
1947
+ popupHost: { type: Object },
1948
+ popupRightBoundary: { type: Object },
1949
+ popupOffsetX: { type: Object },
1950
+ popupOnInput: { type: Boolean, default: !1 },
1951
+ popupOnFocus: { type: Boolean, default: !1 },
1952
+ popupMinWidth: { type: Number, default: 160 },
1953
+ modalOptions: { type: Object, default: {} },
1954
+ wrapText: { type: Boolean, default: !1 },
1955
+ /**
1956
+ * 可选,是否支持多选
1957
+ * 默认`false`
1958
+ */
1959
+ multiSelect: { type: Boolean, default: !1 },
1960
+ /**
1961
+ * 可选,分隔符
1962
+ * 默认`,`
1963
+ */
1964
+ separator: { type: String, default: "," },
1965
+ /** 对齐方式 */
1966
+ textAlign: { type: String, default: "left" },
1967
+ /**
1968
+ * 废弃
1969
+ */
1970
+ beforeClickButton: { type: Function, default: null },
1971
+ /**
1972
+ * 作为内嵌编辑器被创建后默认获得焦点
1973
+ */
1974
+ focusOnCreated: { type: Boolean, default: !1 },
1975
+ /**
1976
+ * 作为内嵌编辑器被创建后默认选中文本
1977
+ */
1978
+ selectOnCreated: { type: Boolean, default: !1 },
1979
+ /**
1980
+ * 打开前
1981
+ */
1982
+ beforeOpen: { type: Function, default: null },
1983
+ /** 更新方式 blur | change */
1984
+ updateOn: { type: String, default: "change" }
1985
+ };
1986
+ _(he, un, en, tn, yn);
1987
+ const hn = {
1988
+ popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
1989
+ host: { type: Object },
1990
+ backgroundColor: { type: String, default: "" }
1991
+ }, gn = /* @__PURE__ */ R({
1992
+ name: "FOverlay",
1993
+ props: hn,
1994
+ emits: ["click"],
1995
+ setup(e, t) {
1996
+ const n = S(e.popupContentPosition), a = S(e.host), i = B(() => ({
1997
+ backgroundColor: e.backgroundColor || "",
1998
+ pointerEvents: "auto"
1999
+ }));
2000
+ function l(d) {
2001
+ t.emit("click"), d.preventDefault(), d.stopPropagation();
2002
+ }
2003
+ B(() => {
2004
+ const d = a.value;
2005
+ if (d) {
2006
+ const u = d.getBoundingClientRect(), {
2007
+ left: c,
2008
+ top: p,
2009
+ height: o
2010
+ } = u;
2011
+ return {
2012
+ left: c,
2013
+ top: p + o
2014
+ };
2015
+ }
2016
+ return n.value;
2017
+ });
2018
+ const r = B(() => ({
2019
+ // position: 'relative',
2020
+ // left: `${position.value.left}px`,
2021
+ // top: `${position.value.top}px`
2022
+ }));
2023
+ return () => b(Fe, {
2024
+ to: "body"
2025
+ }, {
2026
+ default: () => {
2027
+ var d, u;
2028
+ return [b("div", {
2029
+ class: "overlay-container",
2030
+ onClick: (c) => l(c),
2031
+ style: i.value
2032
+ }, [b("div", {
2033
+ style: r.value
2034
+ }, [(u = (d = t.slots).default) == null ? void 0 : u.call(d)])])];
2035
+ }
2036
+ });
2037
+ }
2038
+ });
2039
+ function vn(e) {
2040
+ if (e.content && e.content.render)
2041
+ return e.content.render;
2042
+ if (e.render && typeof e.render == "function")
2043
+ return e.render;
2044
+ }
2045
+ function Cn(e) {
2046
+ const t = document.createElement("div");
2047
+ t.style.display = "contents";
2048
+ let n;
2049
+ const a = e.onClickCallback || (() => {
2050
+ }), i = () => {
2051
+ a(), n && n.unmount();
2052
+ };
2053
+ return n = Me({
2054
+ setup() {
2055
+ Be(() => {
2056
+ document.body.removeChild(t);
2057
+ });
2058
+ const l = vn(e);
2059
+ return () => b(gn, {
2060
+ "popup-content-position": e.popupPosition,
2061
+ host: e.host,
2062
+ onClick: i,
2063
+ backgroundColor: e.backgroundColor
2064
+ }, {
2065
+ default: () => [l && l()]
2066
+ });
2067
+ }
2068
+ }), document.body.appendChild(t), n.mount(t), n;
2069
+ }
2070
+ class bn {
2071
+ static show(t) {
2072
+ return Cn(t);
2073
+ }
2074
+ }
2075
+ const Sn = Symbol("FModalService");
2076
+ function ge(e, t) {
2077
+ function n() {
2078
+ const a = e.beforeOpen || e.beforeClickButton || null;
2079
+ let i = Promise.resolve(!0);
2080
+ if (a) {
2081
+ const l = a(t.value);
2082
+ if (typeof l > "u")
2083
+ return i;
2084
+ typeof l == "boolean" ? i = Promise.resolve(l) : i = l;
2085
+ }
2086
+ return i;
2087
+ }
2088
+ return { judgeCanOpen: n };
2089
+ }
2090
+ function wn(e, t, n, a, i) {
2091
+ const l = S(e.buttonBehavior), r = S(e.popupOnInput), d = B(() => ({
2092
+ "input-group-append": !0,
2093
+ "append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
2094
+ })), { judgeCanOpen: u } = ge(e, i), c = B(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), p = x(Sn, null), o = S();
2095
+ async function s(f) {
2096
+ if (await u() && c.value) {
2097
+ const g = !!t.slots.default;
2098
+ if (l.value === "Modal") {
2099
+ const v = e.modalOptions, C = p == null ? void 0 : p.open({
2100
+ ...v,
2101
+ render: () => t.slots.default && t.slots.default()
2102
+ });
2103
+ o.value = C == null ? void 0 : C.modalRef;
2104
+ }
2105
+ l.value === "Overlay" && bn.show({
2106
+ // host: buttonEditRef.value,
2107
+ host: document.body,
2108
+ backgroundColor: "rgba(0,0,0,.15)",
2109
+ render: () => t.slots.default && t.slots.default()
2110
+ }), g && l.value === "Popup" && a.togglePopup(!0), g && r.value && a.hidePopup(), t.emit("clickButton", { origin: f, value: e.modelValue });
2111
+ }
2112
+ }
2113
+ function m(f) {
2114
+ t.emit("mouseEnterIcon", f);
2115
+ }
2116
+ function y(f) {
2117
+ t.emit("mouseLeaveIcon", f);
2118
+ }
2119
+ return {
2120
+ buttonGroupClass: d,
2121
+ onClickButton: s,
2122
+ onMouseEnterButton: m,
2123
+ onMouseLeaveButton: y,
2124
+ modalRef: o
2125
+ };
2126
+ }
2127
+ function kn(e, t, n, a) {
2128
+ const i = S(), l = S(!1), { judgeCanOpen: r } = ge(e, a);
2129
+ function d() {
2130
+ const o = i.value;
2131
+ o && o.show(n.value);
2132
+ }
2133
+ async function u(o = !1) {
2134
+ if (!!t.slots.default) {
2135
+ if (!o && !l.value && !await r())
2136
+ return;
2137
+ l.value = !l.value, await X(), d();
2138
+ }
2139
+ }
2140
+ async function c(o = !1) {
2141
+ if (!!t.slots.default) {
2142
+ if (!o && !await r())
2143
+ return;
2144
+ l.value = !0, await X(), d();
2145
+ }
2146
+ }
2147
+ function p() {
2148
+ l.value = !1;
2149
+ }
2150
+ return { hidePopup: p, popup: c, shouldPopupContent: l, togglePopup: u, popoverRef: i };
2151
+ }
2152
+ function In(e, t, n) {
2153
+ const {
2154
+ buttonGroupClass: a
2155
+ } = n, i = S();
2156
+ return {
2157
+ renderButtonGroup: () => b("div", {
2158
+ id: `${e.id}-button-group`,
2159
+ class: a.value
2160
+ }, [t.slots.buttonContent ? b("span", {
2161
+ class: "input-group-text input-group-append-button"
2162
+ }, [t.slots.buttonContent()]) : e.buttonContent ? b("span", {
2163
+ class: "input-group-text input-group-append-button",
2164
+ innerHTML: e.buttonContent,
2165
+ ref: i
2166
+ }, null) : null]),
2167
+ buttonHandleElement: i
2168
+ };
2169
+ }
2170
+ const Fn = /* @__PURE__ */ R({
2171
+ name: "FButtonEdit",
2172
+ props: he,
2173
+ emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
2174
+ setup(e, t) {
2175
+ const n = S(), a = x("design-item-context"), i = ce(n, a), l = S(e.customClass), r = S(e.modelValue), d = kn(e, t, n, r), u = wn(e, t, n, d, r), c = S(), p = B(() => ({
2176
+ "f-cmp-inputgroup": !0,
2177
+ "input-group": !0,
2178
+ "f-state-disable": !0,
2179
+ "f-state-editable": !1,
2180
+ "f-state-readonly": !0
2181
+ }));
2182
+ Y(() => {
2183
+ n.value.componentInstance = i;
2184
+ }), t.expose(i.value);
2185
+ const o = B(() => {
2186
+ const m = {
2187
+ "f-button-edit": !0,
2188
+ "f-cmp-inputgroup": !0,
2189
+ "f-button-edit-nowrap": !e.wrapText
2190
+ };
2191
+ return l.value && l.value.split(" ").reduce((y, f) => (y[f] = !0, y), m), m;
2192
+ }), {
2193
+ renderButtonGroup: s
2194
+ } = In(e, t, u);
2195
+ return () => b("div", Le(t.attrs, {
2196
+ ref: n,
2197
+ class: o.value,
2198
+ id: e.id
2199
+ }), [b("div", {
2200
+ class: p.value
2201
+ }, [b("input", {
2202
+ ref: c,
2203
+ class: "form-control",
2204
+ readonly: !0,
2205
+ placeholder: e.placeholder
2206
+ }, null), s()])]);
2207
+ }
1589
2208
  });
1590
- function en(e, t) {
2209
+ function Mn(e, t) {
1591
2210
  e.schema;
1592
- const n = C(!0), o = C(!0);
1593
- function s(l) {
2211
+ const n = S(!0), a = S(!0);
2212
+ function i(o) {
1594
2213
  return !1;
1595
2214
  }
1596
- function c() {
2215
+ function l() {
1597
2216
  return !1;
1598
2217
  }
1599
- function i() {
2218
+ function r() {
1600
2219
  return !1;
1601
2220
  }
1602
- function p() {
2221
+ function d() {
1603
2222
  return !0;
1604
2223
  }
1605
- function g(l) {
2224
+ function u(o) {
1606
2225
  }
1607
- function y() {
2226
+ function c() {
1608
2227
  }
1609
- function h(l) {
2228
+ function p(o) {
1610
2229
  return null;
1611
2230
  }
1612
2231
  return {
1613
- canAccepts: s,
1614
- checkCanDeleteComponent: c,
1615
- checkCanMoveComponent: i,
1616
- hideNestedPaddingInDesginerView: p,
1617
- onAcceptMovedChildElement: g,
1618
- resolveComponentContext: y,
2232
+ canAccepts: i,
2233
+ checkCanDeleteComponent: l,
2234
+ checkCanMoveComponent: r,
2235
+ hideNestedPaddingInDesginerView: d,
2236
+ onAcceptMovedChildElement: u,
2237
+ resolveComponentContext: c,
1619
2238
  triggerBelongedComponentToMoveWhenMoved: n,
1620
- triggerBelongedComponentToDeleteWhenDeleted: o,
1621
- getPropsConfig: h
2239
+ triggerBelongedComponentToDeleteWhenDeleted: a,
2240
+ getPropsConfig: p
1622
2241
  };
1623
2242
  }
1624
- class tn {
2243
+ class ve {
1625
2244
  constructor(t, n) {
1626
- E(this, "componentId");
1627
- E(this, "viewModelId");
1628
- E(this, "eventsEditorUtils");
1629
- E(this, "formSchemaUtils");
1630
- E(this, "formMetadataConverter");
1631
- E(this, "designViewModelUtils");
1632
- E(this, "designViewModelField");
1633
- E(this, "controlCreatorUtils");
1634
- E(this, "designerHostService");
1635
- E(this, "schemaService", null);
1636
- E(this, "metadataService", null);
1637
- E(this, "propertyConfig", {
2245
+ V(this, "componentId");
2246
+ V(this, "viewModelId");
2247
+ V(this, "eventsEditorUtils");
2248
+ V(this, "formSchemaUtils");
2249
+ V(this, "formMetadataConverter");
2250
+ V(this, "designViewModelUtils");
2251
+ V(this, "designViewModelField");
2252
+ V(this, "controlCreatorUtils");
2253
+ V(this, "designerHostService");
2254
+ V(this, "schemaService", null);
2255
+ V(this, "metadataService", null);
2256
+ V(this, "propertyConfig", {
1638
2257
  type: "object",
1639
2258
  categories: {}
1640
2259
  });
1641
- var o;
1642
- this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
2260
+ var a;
2261
+ this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((a = this.formSchemaUtils) == null ? void 0 : a.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
1643
2262
  }
1644
2263
  getTableInfo() {
1645
2264
  var t;
@@ -1649,8 +2268,8 @@ class tn {
1649
2268
  const n = t.binding && t.binding.type === "Form" && t.binding.field;
1650
2269
  if (n) {
1651
2270
  if (!this.designViewModelField) {
1652
- const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1653
- this.designViewModelField = o.fields.find((s) => s.id === n);
2271
+ const a = this.designViewModelUtils.getDgViewModel(this.viewModelId);
2272
+ this.designViewModelField = a.fields.find((i) => i.id === n);
1654
2273
  }
1655
2274
  t.updateOn = this.designViewModelField.updateOn;
1656
2275
  }
@@ -1676,7 +2295,7 @@ class tn {
1676
2295
  type: "combo-list",
1677
2296
  textField: "name",
1678
2297
  valueField: "value",
1679
- data: [{ value: t.type, name: T[t.type].name }]
2298
+ data: [{ value: t.type, name: F[t.type].name }]
1680
2299
  }
1681
2300
  }
1682
2301
  }
@@ -1702,13 +2321,26 @@ class tn {
1702
2321
  }
1703
2322
  };
1704
2323
  }
2324
+ /**
2325
+ *
2326
+ * @param propertyId
2327
+ * @param componentInstance
2328
+ * @returns
2329
+ */
2330
+ updateElementByParentContainer(t, n) {
2331
+ const a = n && n.parent && n.parent.schema;
2332
+ if (!a)
2333
+ return;
2334
+ const i = a.contents.findIndex((r) => r.id === t), l = se(a.contents[i]);
2335
+ a.contents.splice(i, 1), a.contents.splice(i, 0, l);
2336
+ }
1705
2337
  }
1706
- const R = class R {
2338
+ const U = class U {
1707
2339
  /**
1708
2340
  * 根据绑定字段类型获取可用的输入类控件
1709
2341
  */
1710
2342
  static getEditorTypesByMDataType(t) {
1711
- const n = R.fieldControlTypeMapping[t];
2343
+ const n = U.fieldControlTypeMapping[t];
1712
2344
  return n || [{ key: "", value: "" }];
1713
2345
  }
1714
2346
  /**
@@ -1716,9 +2348,9 @@ const R = class R {
1716
2348
  */
1717
2349
  static getAllInputTypes() {
1718
2350
  const t = [];
1719
- for (let n in R.fieldControlTypeMapping)
1720
- R.fieldControlTypeMapping[n].forEach((o) => {
1721
- t.find((s) => s.key === o.key && s.value === o.value) || t.push({ key: o.key, value: o.value });
2351
+ for (let n in U.fieldControlTypeMapping)
2352
+ U.fieldControlTypeMapping[n].forEach((a) => {
2353
+ t.find((i) => i.key === a.key && i.value === a.value) || t.push({ key: a.key, value: a.value });
1722
2354
  });
1723
2355
  return t;
1724
2356
  }
@@ -1726,66 +2358,175 @@ const R = class R {
1726
2358
  /**
1727
2359
  * <字段类型,可配置的控件类型列表>的映射
1728
2360
  */
1729
- E(R, "fieldControlTypeMapping", {
2361
+ V(U, "fieldControlTypeMapping", {
1730
2362
  String: [
1731
- { key: T["input-group"].type, value: T["input-group"].name },
1732
- { key: T.lookup.type, value: T.lookup.name },
1733
- { key: T["date-picker"].type, value: T["date-picker"].name },
1734
- { key: T["check-box"].type, value: T["check-box"].name },
1735
- { key: T["radio-group"].type, value: T["radio-group"].name },
1736
- { key: T["combo-list"].type, value: T["combo-list"].name },
1737
- { key: T.textarea.type, value: T.textarea.name }
2363
+ { key: F["input-group"].type, value: F["input-group"].name },
2364
+ { key: F.lookup.type, value: F.lookup.name },
2365
+ { key: F["date-picker"].type, value: F["date-picker"].name },
2366
+ { key: F["check-box"].type, value: F["check-box"].name },
2367
+ { key: F["check-group"].type, value: F["check-group"].name },
2368
+ { key: F["radio-group"].type, value: F["radio-group"].name },
2369
+ { key: F["combo-list"].type, value: F["combo-list"].name },
2370
+ { key: F.textarea.type, value: F.textarea.name }
1738
2371
  ],
1739
2372
  Text: [
1740
- { key: T.textarea.type, value: T.textarea.name },
1741
- { key: T.lookup.type, value: T.lookup.name }
2373
+ { key: F.textarea.type, value: F.textarea.name },
2374
+ { key: F.lookup.type, value: F.lookup.name }
1742
2375
  ],
1743
2376
  Decimal: [
1744
- { key: T["number-spinner"].type, value: T["number-spinner"].name }
2377
+ { key: F["number-spinner"].type, value: F["number-spinner"].name }
1745
2378
  ],
1746
2379
  Integer: [
1747
- { key: T["number-spinner"].type, value: T["number-spinner"].name }
2380
+ { key: F["number-spinner"].type, value: F["number-spinner"].name }
1748
2381
  ],
1749
2382
  Number: [
1750
- { key: T["number-spinner"].type, value: T["number-spinner"].name }
2383
+ { key: F["number-spinner"].type, value: F["number-spinner"].name }
1751
2384
  ],
1752
2385
  BigNumber: [
1753
- { key: T["number-spinner"].type, value: T["number-spinner"].name }
2386
+ { key: F["number-spinner"].type, value: F["number-spinner"].name }
1754
2387
  ],
1755
2388
  Date: [
1756
- { key: T["date-picker"].type, value: T["date-picker"].name }
2389
+ { key: F["date-picker"].type, value: F["date-picker"].name }
1757
2390
  ],
1758
2391
  DateTime: [
1759
- { key: T["date-picker"].type, value: T["date-picker"].name }
2392
+ { key: F["date-picker"].type, value: F["date-picker"].name }
1760
2393
  ],
1761
2394
  Boolean: [
1762
- { key: T.switch.type, value: T.switch.name },
1763
- { key: T["check-box"].type, value: T["check-box"].name }
2395
+ { key: F.switch.type, value: F.switch.name },
2396
+ { key: F["check-box"].type, value: F["check-box"].name }
1764
2397
  ],
1765
2398
  Enum: [
1766
- { key: T["combo-list"].type, value: T["combo-list"].name },
1767
- { key: T["radio-group"].type, value: T["radio-group"].name }
2399
+ { key: F["combo-list"].type, value: F["combo-list"].name },
2400
+ { key: F["radio-group"].type, value: F["radio-group"].name }
1768
2401
  ],
1769
2402
  Object: [
1770
- { key: T.lookup.type, value: T.lookup.name },
1771
- { key: T["combo-list"].type, value: T["combo-list"].name },
1772
- { key: T["radio-group"].type, value: T["radio-group"].name }
2403
+ { key: F.lookup.type, value: F.lookup.name },
2404
+ { key: F["combo-list"].type, value: F["combo-list"].name },
2405
+ { key: F["radio-group"].type, value: F["radio-group"].name }
1773
2406
  ]
1774
2407
  });
1775
- let q = R;
1776
- const nn = C(0);
1777
- class on extends tn {
1778
- constructor(t, n) {
1779
- super(t, n);
2408
+ let W = U;
2409
+ const Bn = S(0);
2410
+ class Ln {
2411
+ constructor() {
2412
+ /** 控件标题 */
2413
+ V(this, "label", "");
2414
+ /** 控件id */
2415
+ V(this, "id", "");
2416
+ /** 每个控件占用的栅格数 */
2417
+ V(this, "columnInSM", 12);
2418
+ V(this, "columnInMD", 6);
2419
+ V(this, "columnInLG", 3);
2420
+ V(this, "columnInEL", 2);
2421
+ /** 每个控件占用的列数 */
2422
+ V(this, "displayWidthInSM", 1);
2423
+ V(this, "displayWidthInMD", 1);
2424
+ V(this, "displayWidthInLG", 1);
2425
+ V(this, "displayWidthInEL", 1);
2426
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
2427
+ V(this, "displayColumnCountAtBreakPoint", "md");
2428
+ /** 控件所在行,传0即可-----编辑器内部使用 */
2429
+ V(this, "tagRow", 0);
2430
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
2431
+ V(this, "showTopBorder", 0);
2432
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
2433
+ V(this, "group", 1);
2434
+ /** 控件是否符合标准的class配置(设计器用的) */
2435
+ V(this, "isSupportedClass", !0);
2436
+ /** 控件所在分组id(设计器用的) */
2437
+ V(this, "fieldSetId", "");
1780
2438
  }
1781
- getPropertyConfig(t, n) {
1782
- 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;
2439
+ }
2440
+ function Ce(e) {
2441
+ let t, n;
2442
+ const a = /* @__PURE__ */ new Map();
2443
+ let i = [];
2444
+ function l(p, o) {
2445
+ const m = p.split(" ").filter((C) => C.startsWith("col-"));
2446
+ if (m.length === 0) {
2447
+ o.isSupportedClass = !1;
2448
+ return;
2449
+ }
2450
+ let y = m.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), f = m.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), g = m.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), v = m.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
2451
+ y = y || "col-12", o.columnInSM = parseInt(y.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), f = f || "col-md-" + o.columnInSM, o.columnInMD = parseInt(f.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), g = g || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(g.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), v = v || "col-el-" + o.columnInLG, o.columnInEL = parseInt(v.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
2452
+ }
2453
+ function r(p, o, s, m = !1) {
2454
+ let y = !1;
2455
+ p.contents.forEach((f) => {
2456
+ if (f.type === "fieldset") {
2457
+ s += 1, r(f, o, s, !0), y = !0;
2458
+ return;
2459
+ }
2460
+ y && (s += 1, y = !1);
2461
+ const g = f.appearance && f.appearance.class, v = new Ln();
2462
+ g ? l(g, v) : v.isSupportedClass = !1, v.label = f.label || f.id, v.id = f.id, v.group = s, m && (v.fieldSetId = p.id), n === f.id && (t = s), a.set(f.id, f), o.push(v);
2463
+ });
1783
2464
  }
1784
- getBasicProperties(t, n) {
1785
- var i;
1786
- var o = this;
1787
- this.setDesignViewModelField(t);
1788
- const s = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
2465
+ function d(p) {
2466
+ const o = e.getComponentById(p);
2467
+ if (!o || !o.componentType || !o.componentType.startsWith("form"))
2468
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
2469
+ const s = e.selectNode(o, (m) => m.type === J["response-form"].type);
2470
+ return !s || !s.contents || s.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: s };
2471
+ }
2472
+ function u(p, o) {
2473
+ o = o || p.id;
2474
+ const { result: s, message: m, formNode: y } = d(o);
2475
+ if (!s)
2476
+ return { result: s, message: m };
2477
+ n = p.id, i = [], a.clear();
2478
+ const f = y.contents[0].type === J.fieldset.type ? 0 : 1;
2479
+ r(y, i, f);
2480
+ const g = i.find((C) => !C.isSupportedClass);
2481
+ return {
2482
+ defaultState: {
2483
+ defaultGroupNumber: t || 1,
2484
+ model: g ? "customize" : "standard"
2485
+ },
2486
+ importData: i
2487
+ };
2488
+ }
2489
+ function c(p, o) {
2490
+ o = o;
2491
+ const { result: s, formNode: m } = d(o);
2492
+ if (!s)
2493
+ return "";
2494
+ const y = [];
2495
+ return p.forEach((f) => {
2496
+ var C;
2497
+ const g = a.get(f.id), v = g.appearance && g.appearance.class;
2498
+ if (v) {
2499
+ const M = v.split(" ").filter((A) => !A.startsWith("col-")), h = "col-" + f.columnInSM, k = "col-md-" + f.columnInMD, T = "col-xl-" + f.columnInLG, I = "col-el-" + f.columnInEL, O = [h, k, T, I].concat(M);
2500
+ g.appearance.class = O.join(" ");
2501
+ }
2502
+ if (f.fieldSetId) {
2503
+ const w = m.contents.find((h) => h.id === f.fieldSetId), M = y.find((h) => h.id === f.fieldSetId);
2504
+ M ? (C = M.contents) == null || C.push(g) : (y.push(w), w.contents = [g]);
2505
+ } else
2506
+ y.push(g);
2507
+ }), m.contents = y, m.id;
2508
+ }
2509
+ return {
2510
+ checkCanFindFormNode: d,
2511
+ checkCanOpenLayoutEditor: u,
2512
+ changeFormControlsByResponseLayoutConfig: c,
2513
+ getResonseFormLayoutConfig: r
2514
+ };
2515
+ }
2516
+ class Tn extends ve {
2517
+ constructor(n, a) {
2518
+ super(n, a);
2519
+ V(this, "responseLayoutEditorFunction");
2520
+ this.responseLayoutEditorFunction = Ce(this.formSchemaUtils);
2521
+ }
2522
+ getPropertyConfig(n, a) {
2523
+ return this.propertyConfig.categories.basic = this.getBasicProperties(n, a), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, a), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
2524
+ }
2525
+ getBasicProperties(n, a) {
2526
+ var d;
2527
+ var i = this;
2528
+ this.setDesignViewModelField(n);
2529
+ const l = this.formSchemaUtils.getFormMetadataBasicInfo(), r = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
1789
2530
  return {
1790
2531
  description: "Basic Information",
1791
2532
  title: "基本信息",
@@ -1807,7 +2548,7 @@ class on extends tn {
1807
2548
  textField: "value",
1808
2549
  valueField: "key",
1809
2550
  editable: !1,
1810
- data: o.designViewModelField ? q.getEditorTypesByMDataType((i = o.designViewModelField.type) == null ? void 0 : i.name) : q.getAllInputTypes()
2551
+ data: i.designViewModelField ? W.getEditorTypesByMDataType((d = i.designViewModelField.type) == null ? void 0 : d.name) : W.getAllInputTypes()
1811
2552
  }
1812
2553
  },
1813
2554
  label: {
@@ -1823,8 +2564,8 @@ class on extends tn {
1823
2564
  type: "field-selector",
1824
2565
  bindingType: { enable: !1 },
1825
2566
  editorParams: {
1826
- propertyData: t,
1827
- formBasicInfo: s
2567
+ propertyData: n,
2568
+ formBasicInfo: l
1828
2569
  },
1829
2570
  columns: [
1830
2571
  { field: "name", title: "字段名称" },
@@ -1832,26 +2573,27 @@ class on extends tn {
1832
2573
  { field: "fieldType", title: "字段类型" }
1833
2574
  ],
1834
2575
  textField: "bindingField",
1835
- data: c
2576
+ data: r
1836
2577
  }
1837
2578
  }
1838
2579
  },
1839
- setPropertyRelates(p, g) {
1840
- if (p)
1841
- switch (p && p.propertyID) {
2580
+ setPropertyRelates(u, c) {
2581
+ if (u)
2582
+ switch (u && u.propertyID) {
1842
2583
  case "type": {
1843
- o.changeControlType(t, p, n);
2584
+ i.changeControlType(n, u, a);
1844
2585
  break;
1845
2586
  }
1846
2587
  case "label": {
1847
- p.needRefreshControlTree = !0;
2588
+ u.needRefreshControlTree = !0;
1848
2589
  break;
1849
2590
  }
1850
2591
  }
1851
2592
  }
1852
2593
  };
1853
2594
  }
1854
- getAppearanceProperties(t) {
2595
+ getAppearanceProperties(n, a) {
2596
+ var i = this;
1855
2597
  return {
1856
2598
  title: "样式",
1857
2599
  description: "Appearance",
@@ -1872,61 +2614,74 @@ class on extends tn {
1872
2614
  description: "响应式列宽",
1873
2615
  title: "响应式列宽",
1874
2616
  type: "boolean",
1875
- visible: !1,
2617
+ visible: !0,
2618
+ // 这个属性,标记当属性变更得时候触发重新更新属性
2619
+ refreshPanelAfterChanged: !0,
1876
2620
  editor: {
1877
- type: "response-layout-editor-setting"
1878
- },
1879
- $converter: "/converter/response-form-layout.converter"
2621
+ type: "response-layout-editor-setting",
2622
+ initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, i.componentId)
2623
+ }
1880
2624
  }
2625
+ },
2626
+ setPropertyRelates(l, r) {
2627
+ if (l)
2628
+ switch (l && l.propertyID) {
2629
+ case "responseLayout":
2630
+ i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, i.componentId || n.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(n.id, a), delete n.responseLayout;
2631
+ break;
2632
+ case "class":
2633
+ i.updateUnifiedLayoutAfterControlChanged(l.propertyValue, n.id, this.componentId), i.updateElementByParentContainer(n.id, a);
2634
+ break;
2635
+ }
1881
2636
  }
1882
2637
  };
1883
2638
  }
1884
- getEditorProperties(t) {
1885
- return this.getComponentConfig(t);
2639
+ getEditorProperties(n) {
2640
+ return this.getComponentConfig(n);
1886
2641
  }
1887
2642
  /**
1888
2643
  * 卡片控件:切换控件类型后事件
1889
2644
  * @param propertyData 控件DOM属性
1890
2645
  * @param newControlType 新控件类型
1891
2646
  */
1892
- changeControlType(t, n, o) {
1893
- var y, h, l, r;
1894
- const s = n.propertyValue, c = o && o.parent && o.parent.schema;
1895
- if (!c)
2647
+ changeControlType(n, a, i) {
2648
+ var p, o, s, m;
2649
+ const l = a.propertyValue, r = i && i.parent && i.parent.schema;
2650
+ if (!r)
1896
2651
  return;
1897
- const i = c.contents.findIndex((S) => S.id === t.id), p = c.contents[i];
1898
- let g;
2652
+ const d = r.contents.findIndex((y) => y.id === n.id), u = r.contents[d];
2653
+ let c;
1899
2654
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
1900
2655
  editor: {
1901
- $type: s
2656
+ $type: l
1902
2657
  },
1903
2658
  name: this.designViewModelField.name,
1904
2659
  require: this.designViewModelField.require,
1905
2660
  readonly: this.designViewModelField.readonly
1906
- }, !1), g = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), g || (g = re("form-group") || {}, g.editor = re(s) || {}, delete g.editor.id, delete g.editor.binding, delete g.editor.appearance), Object.assign(g, {
1907
- id: p.id,
1908
- appearance: p.appearance,
1909
- size: p.size,
1910
- label: p.label,
1911
- binding: p.binding,
1912
- visible: p.visible
1913
- }), Object.assign(g.editor, {
1914
- isTextArea: g.isTextArea && p.isTextArea,
1915
- placeholder: (y = p.editor) == null ? void 0 : y.placeholder,
1916
- holdPlace: (h = p.editor) == null ? void 0 : h.holdPlace,
1917
- readonly: (l = p.editor) == null ? void 0 : l.readonly,
1918
- require: (r = p.editor) == null ? void 0 : r.require
1919
- }), c.contents.splice(i, 1), c.contents.splice(i, 0, g), o.schema = Object.assign(p, g), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1920
- (S) => S.classList.remove("dgComponentSelected")
1921
- ), nn.value++;
1922
- }
1923
- getComponentConfig(t, n = {}, o = {}) {
1924
- const s = Object.assign({
2661
+ }, !1), c = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), c || (c = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(c, {
2662
+ id: u.id,
2663
+ appearance: u.appearance,
2664
+ size: u.size,
2665
+ label: u.label,
2666
+ binding: u.binding,
2667
+ visible: u.visible
2668
+ }), Object.assign(c.editor, {
2669
+ isTextArea: c.isTextArea && u.isTextArea,
2670
+ placeholder: (p = u.editor) == null ? void 0 : p.placeholder,
2671
+ holdPlace: (o = u.editor) == null ? void 0 : o.holdPlace,
2672
+ readonly: (s = u.editor) == null ? void 0 : s.readonly,
2673
+ require: (m = u.editor) == null ? void 0 : m.require
2674
+ }), r.contents.splice(d, 1), r.contents.splice(d, 0, c), i.schema = Object.assign(u, c), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
2675
+ (y) => y.classList.remove("dgComponentSelected")
2676
+ ), Bn.value++;
2677
+ }
2678
+ getComponentConfig(n, a = {}, i = {}) {
2679
+ const l = Object.assign({
1925
2680
  description: "编辑器",
1926
2681
  title: "编辑器",
1927
2682
  type: "input-group",
1928
2683
  $converter: "/converter/property-editor.converter"
1929
- }, n), c = Object.assign({
2684
+ }, a), r = Object.assign({
1930
2685
  readonly: {
1931
2686
  description: "",
1932
2687
  title: "只读",
@@ -1947,11 +2702,59 @@ class on extends tn {
1947
2702
  title: "提示文本",
1948
2703
  type: "string"
1949
2704
  }
1950
- }, o);
1951
- return { ...s, properties: { ...c } };
2705
+ }, i);
2706
+ return { ...l, properties: { ...r } };
2707
+ }
2708
+ /**
2709
+ * 修改某一输入控件的样式后更新Form的统一布局配置
2710
+ * @param controlClass 控件样式
2711
+ * @param controlId 控件Id
2712
+ * @param componentId 控件所在组件id
2713
+ */
2714
+ updateUnifiedLayoutAfterControlChanged(n, a, i) {
2715
+ const l = n.split(" ");
2716
+ let r = l.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), d = l.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), u = l.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), c = l.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
2717
+ r = r || "col-12", d = d || "col-md-" + r.replace("col-", ""), u = u || "col-xl-" + d.replace("col-md-", ""), c = c || "col-el-" + u.replace("col-xl-", "");
2718
+ const p = {
2719
+ id: a,
2720
+ columnInSM: parseInt(r.replace("col-", ""), 10),
2721
+ columnInMD: parseInt(d.replace("col-md-", ""), 10),
2722
+ columnInLG: parseInt(u.replace("col-xl-", ""), 10),
2723
+ columnInEL: parseInt(c.replace("col-el-", ""), 10)
2724
+ };
2725
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(i, p);
2726
+ }
2727
+ /**
2728
+ * 修改控件布局配置后更新Form统一布局配置
2729
+ * @param componentId 组件Id
2730
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
2731
+ */
2732
+ updateUnifiedLayoutAfterResponseLayoutChanged(n, a) {
2733
+ const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
2734
+ if (!i || !i.unifiedLayout)
2735
+ return;
2736
+ const l = [];
2737
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, l, 1), a) {
2738
+ const y = l.find((f) => f.id === a.id);
2739
+ Object.assign(y || {}, a);
2740
+ }
2741
+ const r = l.map((y) => y.columnInSM), d = l.map((y) => y.columnInMD), u = l.map((y) => y.columnInLG), c = l.map((y) => y.columnInEL), p = this.checkIsUniqueColumn(r) ? r[0] : null, o = this.checkIsUniqueColumn(d) ? d[0] : null, s = this.checkIsUniqueColumn(u) ? u[0] : null, m = this.checkIsUniqueColumn(c) ? c[0] : null;
2742
+ Object.assign(i.unifiedLayout, {
2743
+ uniqueColClassInSM: p,
2744
+ uniqueColClassInMD: o,
2745
+ uniqueColClassInLG: s,
2746
+ uniqueColClassInEL: m
2747
+ });
2748
+ }
2749
+ /**
2750
+ * 校验宽度样式值是否一致
2751
+ */
2752
+ checkIsUniqueColumn(n) {
2753
+ const a = new Set(n);
2754
+ return Array.from(a).length === 1;
1952
2755
  }
1953
2756
  }
1954
- class an extends on {
2757
+ class Vn extends Tn {
1955
2758
  constructor(t, n) {
1956
2759
  super(t, n);
1957
2760
  }
@@ -1975,41 +2778,41 @@ class an extends on {
1975
2778
  });
1976
2779
  }
1977
2780
  }
1978
- function rn(e, t) {
2781
+ function Dn(e, t) {
1979
2782
  const {
1980
2783
  canAccepts: n,
1981
- checkCanDeleteComponent: o,
1982
- checkCanMoveComponent: s,
1983
- hideNestedPaddingInDesginerView: c,
1984
- onAcceptMovedChildElement: i,
1985
- resolveComponentContext: p,
1986
- triggerBelongedComponentToMoveWhenMoved: g,
1987
- triggerBelongedComponentToDeleteWhenDeleted: y
1988
- } = en(e), h = e.schema;
1989
- function l(r, S) {
1990
- return new an(r, t).getPropertyConfig(h, S);
2784
+ checkCanDeleteComponent: a,
2785
+ checkCanMoveComponent: i,
2786
+ hideNestedPaddingInDesginerView: l,
2787
+ onAcceptMovedChildElement: r,
2788
+ resolveComponentContext: d,
2789
+ triggerBelongedComponentToMoveWhenMoved: u,
2790
+ triggerBelongedComponentToDeleteWhenDeleted: c
2791
+ } = Mn(e), p = e.schema;
2792
+ function o(s, m) {
2793
+ return new Vn(s, t).getPropertyConfig(p, m);
1991
2794
  }
1992
2795
  return {
1993
2796
  canAccepts: n,
1994
- checkCanDeleteComponent: o,
1995
- checkCanMoveComponent: s,
1996
- hideNestedPaddingInDesginerView: c,
1997
- onAcceptMovedChildElement: i,
1998
- resolveComponentContext: p,
1999
- triggerBelongedComponentToMoveWhenMoved: g,
2000
- triggerBelongedComponentToDeleteWhenDeleted: y,
2001
- getPropsConfig: l
2797
+ checkCanDeleteComponent: a,
2798
+ checkCanMoveComponent: i,
2799
+ hideNestedPaddingInDesginerView: l,
2800
+ onAcceptMovedChildElement: r,
2801
+ resolveComponentContext: d,
2802
+ triggerBelongedComponentToMoveWhenMoved: u,
2803
+ triggerBelongedComponentToDeleteWhenDeleted: c,
2804
+ getPropsConfig: o
2002
2805
  };
2003
2806
  }
2004
- const ln = /* @__PURE__ */ H({
2807
+ const On = /* @__PURE__ */ R({
2005
2808
  name: "FComboListDesign",
2006
- props: ne,
2809
+ props: oe,
2007
2810
  emits: ["clear", "update:modelValue", "change"],
2008
2811
  setup(e, t) {
2009
- const n = C(), o = X("designer-host-service"), s = X("design-item-context"), c = rn(s, o), i = qe(n, s, c);
2010
- return ce(() => {
2011
- n.value.componentInstance = i;
2012
- }), t.expose(i.value), () => b(Ge, {
2812
+ const n = S(), a = x("designer-host-service"), i = x("design-item-context"), l = Dn(i, a), r = ce(n, i, l);
2813
+ return Y(() => {
2814
+ n.value.componentInstance = r;
2815
+ }), t.expose(r.value), () => b(Fn, {
2013
2816
  ref: n,
2014
2817
  buttonContent: e.dropDownIcon,
2015
2818
  readonly: !0,
@@ -2019,59 +2822,59 @@ const ln = /* @__PURE__ */ H({
2019
2822
  enableClear: !0
2020
2823
  }, null);
2021
2824
  }
2022
- }), sn = (e) => {
2825
+ }), Pn = (e) => {
2023
2826
  const t = e;
2024
2827
  return t.install = function(n) {
2025
2828
  n.component(t.name, e);
2026
2829
  }, e;
2027
2830
  };
2028
- G.register = (e, t, n, o) => {
2029
- e["combo-list"] = G, t["combo-list"] = ye;
2831
+ q.register = (e, t, n, a) => {
2832
+ e["combo-list"] = q, t["combo-list"] = ye;
2030
2833
  };
2031
- G.registerDesigner = (e, t, n) => {
2032
- e["combo-list"] = ln, t["combo-list"] = ye;
2834
+ q.registerDesigner = (e, t, n) => {
2835
+ e["combo-list"] = On, t["combo-list"] = ye;
2033
2836
  };
2034
- const _ = sn(G), z = /* @__PURE__ */ H({
2837
+ const H = Pn(q), z = /* @__PURE__ */ R({
2035
2838
  name: "FOrder",
2036
- props: te,
2839
+ props: ne,
2037
2840
  emits: ["change"],
2038
2841
  setup(e, t) {
2039
- const n = C(e.items), o = C("排序列"), s = C("排序方式"), c = C("添加排序列"), i = [{
2842
+ const n = S(e.items), a = S("排序列"), i = S("排序方式"), l = S("添加排序列"), r = [{
2040
2843
  id: "asc",
2041
2844
  name: "升序"
2042
2845
  }, {
2043
2846
  id: "desc",
2044
2847
  name: "降序"
2045
- }], p = C(/* @__PURE__ */ new Map());
2046
- function g() {
2047
- const a = n.value.map((u) => [u.id, !0]);
2048
- p.value = new Map(a);
2848
+ }], d = S(/* @__PURE__ */ new Map());
2849
+ function u() {
2850
+ const g = n.value.map((v) => [v.id, !0]);
2851
+ d.value = new Map(g);
2049
2852
  }
2050
- g();
2051
- const y = B(() => e.dataSource.map((a) => (a.disabled = p.value.has(a.id), a))), h = B(() => ({
2853
+ u();
2854
+ const c = B(() => e.dataSource.map((g) => (g.disabled = d.value.has(g.id), g))), p = B(() => ({
2052
2855
  "f-order": !0
2053
2856
  }));
2054
- function l(a) {
2055
- n.value = n.value.filter((u) => u.id !== a.id), g(), t.emit("change", n.value);
2857
+ function o(g) {
2858
+ n.value = n.value.filter((v) => v.id !== g.id), u(), t.emit("change", n.value);
2056
2859
  }
2057
- function r() {
2860
+ function s() {
2058
2861
  n.value = [...n.value, {
2059
2862
  id: Date.now().toString(),
2060
2863
  name: "",
2061
2864
  order: "asc"
2062
- }], g(), t.emit("change", n.value);
2865
+ }], u(), t.emit("change", n.value);
2063
2866
  }
2064
- function S(a) {
2065
- if (a && a.length === 1) {
2066
- const u = a[0], k = n.value.find((F) => F.id === u.id);
2067
- k && (k.name = u.name);
2867
+ function m(g) {
2868
+ if (g && g.length === 1) {
2869
+ const v = g[0], C = n.value.find((w) => w.id === v.id);
2870
+ C && (C.name = v.name);
2068
2871
  }
2069
- g(), t.emit("change", n.value);
2872
+ u(), t.emit("change", n.value);
2070
2873
  }
2071
- function d(a) {
2072
- if (a && a.length) {
2073
- const u = /* @__PURE__ */ new Map();
2074
- a.reduce((k, F) => (k.set(F.id, F), k), u), n.value = a.map((k) => u.get(k.id)), t.emit("change", n.value);
2874
+ function y(g) {
2875
+ if (g && g.length) {
2876
+ const v = /* @__PURE__ */ new Map();
2877
+ g.reduce((C, w) => (C.set(w.id, w), C), v), n.value = g.map((C) => v.get(C.id)), t.emit("change", n.value);
2075
2878
  }
2076
2879
  }
2077
2880
  function f() {
@@ -2082,1053 +2885,440 @@ const _ = sn(G), z = /* @__PURE__ */ H({
2082
2885
  view: "DraggableView",
2083
2886
  "keep-order": !0,
2084
2887
  itemClass: "f-order-item",
2085
- onRemoveItem: l,
2086
- onChange: d
2888
+ onRemoveItem: o,
2889
+ onChange: y
2087
2890
  }, {
2088
2891
  header: () => b("div", {
2089
2892
  class: "f-order-header"
2090
2893
  }, [b("span", {
2091
2894
  class: "f-order-header-order-field"
2092
- }, [o.value]), b("span", {
2895
+ }, [a.value]), b("span", {
2093
2896
  class: "f-order-header-order-type"
2094
- }, [s.value])]),
2095
- itemContent: (a) => b("div", {
2897
+ }, [i.value])]),
2898
+ itemContent: (g) => b("div", {
2096
2899
  class: "f-order-item-content"
2097
- }, [b(_, {
2900
+ }, [b(H, {
2098
2901
  class: "f-order-item-content-order-field",
2099
- data: y.value,
2902
+ data: c.value,
2100
2903
  valueField: "id",
2101
2904
  textField: "name",
2102
2905
  idField: "id",
2103
- modelValue: a.id,
2104
- "onUpdate:modelValue": (u) => a.id = u,
2105
- onChange: S,
2106
- onClear: S
2107
- }, null), b(_, {
2906
+ modelValue: g.id,
2907
+ "onUpdate:modelValue": (v) => g.id = v,
2908
+ onChange: m,
2909
+ onClear: m
2910
+ }, null), b(H, {
2108
2911
  class: "f-order-item-content-order-type",
2109
- data: i,
2912
+ data: r,
2110
2913
  valueField: "id",
2111
2914
  textField: "name",
2112
2915
  idField: "id",
2113
- modelValue: a.order,
2114
- "onUpdate:modelValue": (u) => a.order = u,
2115
- onChange: S
2916
+ modelValue: g.order,
2917
+ "onUpdate:modelValue": (v) => g.order = v,
2918
+ onChange: m
2116
2919
  }, null)]),
2117
2920
  footer: () => b("div", {
2118
2921
  class: "f-order-footer"
2119
2922
  }, [b(me, {
2120
2923
  type: "link",
2121
2924
  class: "f-order-add-button",
2122
- onClick: r
2925
+ onClick: s
2123
2926
  }, {
2124
2927
  default: () => b(Q, null, [b("span", {
2125
2928
  class: "f-order-add-icon"
2126
2929
  }, [b("i", {
2127
2930
  class: "f-icon f-icon-add"
2128
- }, null)]), c.value])
2931
+ }, null)]), l.value])
2129
2932
  })])
2130
2933
  });
2131
2934
  }
2132
2935
  return () => b("div", {
2133
- class: h.value
2936
+ class: p.value
2134
2937
  }, [f()]);
2135
2938
  }
2136
2939
  });
2137
- function cn(e, t, n) {
2138
- var w;
2139
- function o() {
2940
+ function En(e, t, n) {
2941
+ var M;
2942
+ function a() {
2140
2943
  n != null && n.resolveComponentContext && n.resolveComponentContext();
2141
2944
  }
2142
- o();
2143
- const s = n && n.getStyles && n.getStyles() || "", c = n && n.getDesignerClass && n.getDesignerClass() || "", i = C();
2144
- function p() {
2945
+ a();
2946
+ const i = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", r = S();
2947
+ function d() {
2145
2948
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
2146
2949
  }
2147
- function g() {
2950
+ function u() {
2148
2951
  return !1;
2149
2952
  }
2150
- function y() {
2953
+ function c() {
2151
2954
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
2152
2955
  }
2153
- function h() {
2956
+ function p() {
2154
2957
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
2155
2958
  }
2156
- function l(v) {
2157
- if (!v || !v.value)
2959
+ function o(h) {
2960
+ if (!h || !h.value)
2158
2961
  return null;
2159
- if (v.value.schema && v.value.schema.type === "component")
2160
- return v.value;
2161
- const D = C(v == null ? void 0 : v.value.parent), m = l(D);
2162
- return m || null;
2962
+ if (h.value.schema && h.value.schema.type === "component")
2963
+ return h.value;
2964
+ const k = S(h == null ? void 0 : h.value.parent), T = o(k);
2965
+ return T || null;
2163
2966
  }
2164
- function r(v = t) {
2165
- const { componentInstance: D, designerItemElementRef: m } = v;
2166
- return !D || !D.value ? null : D.value.canMove ? m : r(v.parent);
2967
+ function s(h = t) {
2968
+ const { componentInstance: k, designerItemElementRef: T } = h;
2969
+ return !k || !k.value ? null : k.value.canMove ? T : s(h.parent);
2167
2970
  }
2168
- function S(v) {
2169
- return !!n && n.canAccepts(v);
2971
+ function m(h) {
2972
+ return !!n && n.canAccepts(h);
2170
2973
  }
2171
- function d() {
2974
+ function y() {
2172
2975
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
2173
2976
  }
2174
2977
  function f() {
2175
2978
  }
2176
- function a(v, D) {
2177
- D && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(D);
2178
- }
2179
- function u(v, D) {
2180
- const { componentType: m } = v;
2181
- let M = U(m, v, D);
2182
- n && n.onResolveNewComponentSchema && (M = n.onResolveNewComponentSchema(v, M));
2183
- const A = m.toLowerCase().replace("-", "_");
2184
- return M && !M.id && M.type === m && (M.id = `${A}_${Math.random().toString().slice(2, 6)}`), M;
2979
+ function g(h, k) {
2980
+ k && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(k);
2185
2981
  }
2186
- function k(v, D) {
2187
- const m = String(v.getAttribute("data-controltype")), M = v.getAttribute("data-feature"), A = M ? JSON.parse(M) : {};
2188
- A.parentComponentInstance = i.value;
2189
- let j = U(m, A);
2190
- n && n.onAcceptNewChildElement && (j = n.onAcceptNewChildElement(v, D, j));
2191
- const $ = m.toLowerCase().replace("-", "_");
2192
- return j && !j.id && j.type === m && (j.id = `${$}_${Math.random().toString().slice(2, 6)}`), j;
2982
+ function v(h, k) {
2983
+ const { componentType: T } = h;
2984
+ let I = ee(T, h, k);
2985
+ n && n.onResolveNewComponentSchema && (I = n.onResolveNewComponentSchema(h, I));
2986
+ const O = T.toLowerCase().replace("-", "_");
2987
+ return I && !I.id && I.type === T && (I.id = `${O}_${Math.random().toString().slice(2, 6)}`), I;
2193
2988
  }
2194
- function F(v) {
2989
+ function C(h) {
2195
2990
  }
2196
- function V(...v) {
2991
+ function w(...h) {
2197
2992
  if (n && n.getPropsConfig)
2198
- return n.getPropsConfig(...v);
2993
+ return n.getPropsConfig(...h);
2199
2994
  }
2200
- return i.value = {
2201
- canMove: p(),
2202
- canSelectParent: g(),
2203
- canDelete: y(),
2204
- canNested: !h(),
2995
+ return r.value = {
2996
+ canMove: d(),
2997
+ canSelectParent: u(),
2998
+ canDelete: c(),
2999
+ canNested: !p(),
2205
3000
  contents: t == null ? void 0 : t.schema.contents,
2206
3001
  elementRef: e,
2207
- parent: (w = t == null ? void 0 : t.parent) == null ? void 0 : w.componentInstance,
3002
+ parent: (M = t == null ? void 0 : t.parent) == null ? void 0 : M.componentInstance,
2208
3003
  schema: t == null ? void 0 : t.schema,
2209
- styles: s,
2210
- designerClass: c,
2211
- canAccepts: S,
2212
- getBelongedComponentInstance: l,
2213
- getDraggableDesignItemElement: r,
2214
- getDraggingDisplayText: d,
2215
- getPropConfig: V,
3004
+ styles: i,
3005
+ designerClass: l,
3006
+ canAccepts: m,
3007
+ getBelongedComponentInstance: o,
3008
+ getDraggableDesignItemElement: s,
3009
+ getDraggingDisplayText: y,
3010
+ getPropConfig: w,
2216
3011
  getDragScopeElement: f,
2217
- onAcceptMovedChildElement: a,
2218
- onAcceptNewChildElement: k,
2219
- onChildElementMovedOut: F,
2220
- addNewChildComponentSchema: u,
2221
- updateDragAndDropRules: o,
2222
- triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1),
2223
- triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
2224
- }, i;
3012
+ onAcceptMovedChildElement: g,
3013
+ onChildElementMovedOut: C,
3014
+ addNewChildComponentSchema: v,
3015
+ updateDragAndDropRules: a,
3016
+ triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || S(!1),
3017
+ triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || S(!1)
3018
+ }, r;
2225
3019
  }
2226
- function un() {
2227
- function e(t) {
2228
- var s, c;
3020
+ function An() {
3021
+ function e(t, n) {
3022
+ var r;
2229
3023
  if (!t)
2230
3024
  return !1;
2231
- const n = ((s = t.targetContainer) == null ? void 0 : s.componentInstance) && t.targetContainer.componentInstance.value;
2232
- if (!n)
3025
+ const a = ((r = t.targetContainer) == null ? void 0 : r.componentInstance) && t.targetContainer.componentInstance.value;
3026
+ if (!a)
2233
3027
  return !1;
2234
- const o = (c = n.schema.appearance) == null ? void 0 : c.class;
2235
- if (t.controlCategory === "input" || t.controlType === "form-group") {
2236
- const i = n.schema.type, p = (i === "response-form" || i === "content-container") && o && o.includes("farris-form");
2237
- if (n.schema.type !== "response-layout-item" && !p)
2238
- return !1;
2239
- }
2240
- return t.controlType !== "field-set";
3028
+ const i = a.schema.type, l = n == null ? void 0 : n.formSchemaUtils.getComponentById(a.belongedComponentId);
3029
+ return !((t.controlCategory === "input" || t.controlType === "form-group") && ![F["response-layout-item"].type, F["response-form"].type].includes(i) || (t.controlType === F.tabs.type || t.controlType === F.section.type) && ((l == null ? void 0 : l.componentType) !== "frame" || ![F["content-container"].type, F["splitter-pane"].type, F["response-layout-item"].type].includes(i)));
2241
3030
  }
2242
3031
  return {
2243
3032
  basalDragulaRuleForContainer: e
2244
3033
  };
2245
3034
  }
2246
- const dn = "https://json-schema.org/draft/2020-12/schema", pn = "https://farris-design.gitee.io/dragging-rules.schema.json", fn = "Dragging Rules", mn = "The rules of designer canvas", yn = "object", gn = {
2247
- "f-page": {
2248
- description: "The root class of page designed by farris.",
2249
- type: "object",
2250
- properties: {
2251
- contents: {
2252
- type: "object",
2253
- properties: {
2254
- "f-page-header": {
2255
- description: "The class of page header designed by farris.",
2256
- type: "string"
2257
- },
2258
- "f-page-main": {
2259
- description: "The class of page body designed by farris.",
2260
- type: "object",
2261
- properties: {
2262
- contents: {
2263
- type: "object",
2264
- properties: {
2265
- "f-struct-like-card": {
2266
- description: "",
2267
- type: "object",
2268
- properties: {
2269
- contents: {
2270
- type: "object",
2271
- properties: {
2272
- "f-struct-form": {
2273
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
2274
- type: "object",
2275
- properties: {
2276
- contents: {
2277
- type: "object",
2278
- properties: {
2279
- "f-section-form": {
2280
- description: "The class of section which has wrapped a reponse-form component.",
2281
- type: "object",
2282
- properties: {
2283
- contents: {
2284
- type: "object",
2285
- properties: {
2286
- "f-form-layout": {
2287
- description: "The class of reponse form",
2288
- type: "object",
2289
- properties: {
2290
- rules: {
2291
- type: "object",
2292
- properties: {
2293
- canAccept: {
2294
- type: "boolean",
2295
- const: !0
2296
- },
2297
- fixed: {
2298
- type: "boolean",
2299
- const: !0
2300
- },
2301
- hidePadding: {
2302
- type: "boolean",
2303
- const: !1
2304
- }
2305
- }
2306
- }
2307
- }
2308
- }
2309
- }
2310
- },
2311
- rules: {
2312
- type: "object",
2313
- properties: {
2314
- canAccept: {
2315
- type: "boolean",
2316
- const: !1
2317
- },
2318
- fixed: {
2319
- type: "boolean",
2320
- const: !0
2321
- },
2322
- hidePadding: {
2323
- type: "boolean",
2324
- const: !0
2325
- }
2326
- }
2327
- }
2328
- }
2329
- }
2330
- }
2331
- },
2332
- rules: {
2333
- type: "object",
2334
- properties: {
2335
- canAccept: {
2336
- type: "boolean",
2337
- const: !1
2338
- },
2339
- fixed: {
2340
- type: "boolean",
2341
- const: !1
2342
- },
2343
- hidePadding: {
2344
- type: "boolean",
2345
- const: !0
2346
- }
2347
- }
2348
- }
2349
- }
2350
- },
2351
- "f-struct-wrapper": {
2352
- description: "",
2353
- type: "object",
2354
- properties: {
2355
- contents: {
2356
- type: "object",
2357
- properties: {
2358
- "f-section-tabs": {
2359
- description: "The class of section which has wrapped sub-grid tabs.",
2360
- type: "object",
2361
- properties: {
2362
- contents: {
2363
- type: "object",
2364
- properties: {
2365
- "f-tabs-in-card": {
2366
- description: "The class of tabs which contains sub-grid.",
2367
- type: "object",
2368
- properties: {
2369
- contents: {
2370
- type: "object",
2371
- properties: {
2372
- "f-struct-data-grid-in-card": {
2373
- description: "The class of sub-grid component",
2374
- type: "object",
2375
- properties: {
2376
- contents: {
2377
- type: "object",
2378
- properties: {
2379
- "f-grid-is-sub": {
2380
- description: "The class of sub-grid",
2381
- type: "object",
2382
- properties: {
2383
- rules: {
2384
- type: "object",
2385
- properties: {
2386
- canAccept: {
2387
- type: "boolean",
2388
- const: !0
2389
- },
2390
- fixed: {
2391
- type: "boolean",
2392
- const: !0
2393
- },
2394
- hidePadding: {
2395
- type: "boolean",
2396
- const: !1
2397
- }
2398
- }
2399
- }
2400
- }
2401
- }
2402
- }
2403
- },
2404
- rules: {
2405
- type: "object",
2406
- properties: {
2407
- canAccept: {
2408
- type: "boolean",
2409
- const: !1
2410
- },
2411
- fixed: {
2412
- type: "boolean",
2413
- const: !1
2414
- },
2415
- hidePadding: {
2416
- type: "boolean",
2417
- const: !0
2418
- }
2419
- }
2420
- }
2421
- }
2422
- }
2423
- }
2424
- },
2425
- rules: {
2426
- type: "object",
2427
- properties: {
2428
- canAccept: {
2429
- type: "boolean",
2430
- const: !1
2431
- },
2432
- fixed: {
2433
- type: "boolean",
2434
- const: !0
2435
- },
2436
- hidePadding: {
2437
- type: "boolean",
2438
- const: !0
2439
- }
2440
- }
2441
- }
2442
- }
2443
- }
2444
- }
2445
- },
2446
- rules: {
2447
- type: "object",
2448
- properties: {
2449
- canAccept: {
2450
- type: "boolean",
2451
- const: !1
2452
- },
2453
- fixed: {
2454
- type: "boolean",
2455
- const: !0
2456
- },
2457
- hidePadding: {
2458
- type: "boolean",
2459
- const: !0
2460
- }
2461
- }
2462
- }
2463
- }
2464
- },
2465
- "f-section-in-main": {
2466
- description: "The class of section which has wrapped a reponse-form component.",
2467
- type: "object",
2468
- properties: {
2469
- rules: {
2470
- type: "object",
2471
- properties: {
2472
- canAccept: {
2473
- type: "boolean",
2474
- const: !0
2475
- },
2476
- fixed: {
2477
- type: "boolean",
2478
- const: !0
2479
- },
2480
- hidePadding: {
2481
- type: "boolean",
2482
- const: !1
2483
- }
2484
- }
2485
- }
2486
- }
2487
- }
2488
- }
2489
- },
2490
- rules: {
2491
- type: "object",
2492
- properties: {
2493
- canAccept: {
2494
- type: "boolean",
2495
- const: !1
2496
- },
2497
- fixed: {
2498
- type: "boolean",
2499
- const: !1
2500
- },
2501
- hidePadding: {
2502
- type: "boolean",
2503
- const: !0
2504
- }
2505
- }
2506
- }
2507
- }
2508
- }
2509
- }
2510
- },
2511
- rules: {
2512
- type: "object",
2513
- properties: {
2514
- canAccept: {
2515
- type: "boolean",
2516
- const: !0
2517
- },
2518
- fixed: {
2519
- type: "boolean",
2520
- const: !0
2521
- },
2522
- hidePadding: {
2523
- type: "object",
2524
- const: {
2525
- allOf: [
2526
- {
2527
- sibling: 0,
2528
- parent: {
2529
- "f-page-main": !0
2530
- }
2531
- }
2532
- ]
2533
- }
2534
- }
2535
- }
2536
- }
2537
- }
2538
- },
2539
- "f-struct-data-grid": {
2540
- description: "",
2541
- type: "object",
2542
- properties: {
2543
- rules: {
2544
- type: "object",
2545
- properties: {
2546
- canAccept: {
2547
- type: "object",
2548
- const: !0
2549
- },
2550
- fixed: {
2551
- type: "boolean",
2552
- const: !0
2553
- },
2554
- hidePadding: {
2555
- type: "boolean",
2556
- const: !0
2557
- }
2558
- }
2559
- }
2560
- }
2561
- },
2562
- "f-page-main-content": {
2563
- description: "",
2564
- type: "object",
2565
- properties: {
2566
- contents: {
2567
- type: "object",
2568
- properties: {
2569
- "f-page-content-nav": {
2570
- description: "",
2571
- type: "object",
2572
- properties: {
2573
- contents: {
2574
- type: "object",
2575
- properties: {
2576
- "f-struct-data-grid-in-nav": {
2577
- description: "",
2578
- type: "object",
2579
- properties: {
2580
- contents: {
2581
- type: "object",
2582
- properties: {
2583
- "f-page-content-nav-extend": {
2584
- description: "",
2585
- type: "object"
2586
- },
2587
- "f-section-in-nav": {
2588
- description: "",
2589
- type: "object",
2590
- properties: {
2591
- rules: {
2592
- type: "object",
2593
- properties: {
2594
- canAccept: {
2595
- type: "boolean",
2596
- const: !1
2597
- },
2598
- fixed: {
2599
- type: "boolean",
2600
- const: !0
2601
- },
2602
- hidePadding: {
2603
- type: "boolean",
2604
- const: !1
2605
- }
2606
- }
2607
- }
2608
- }
2609
- }
2610
- }
2611
- },
2612
- rules: {
2613
- type: "object",
2614
- properties: {
2615
- canAccept: {
2616
- type: "boolean",
2617
- const: !0
2618
- },
2619
- fixed: {
2620
- type: "boolean",
2621
- const: !1
2622
- },
2623
- hidePadding: {
2624
- type: "boolean",
2625
- const: !0
2626
- }
2627
- }
2628
- }
2629
- }
2630
- }
2631
- }
2632
- }
2633
- }
2634
- },
2635
- "f-page-content-main": {
2636
- description: "",
2637
- type: "object",
2638
- properties: {}
2639
- }
2640
- }
2641
- }
2642
- }
2643
- },
2644
- "f-page-content": {
2645
- description: "",
2646
- type: "object",
2647
- properties: {
2648
- contents: {
2649
- type: "object",
2650
- properties: {
2651
- "f-page-content-nav": {
2652
- description: "",
2653
- type: "object",
2654
- properties: {
2655
- contents: {
2656
- type: "object",
2657
- properties: {
2658
- "f-list-nav": {
2659
- description: "",
2660
- type: "object"
2661
- },
2662
- "f-list-nav-left": {
2663
- description: "",
2664
- type: "object"
2665
- },
2666
- "f-struct-data-grid-in-nav": {
2667
- description: "",
2668
- type: "object",
2669
- properties: {
2670
- contents: {
2671
- type: "object",
2672
- properties: {
2673
- "f-section-form": {
2674
- description: "",
2675
- type: "object",
2676
- properties: {
2677
- rules: {
2678
- type: "object",
2679
- properties: {
2680
- canAccept: {
2681
- type: "boolean",
2682
- const: !1
2683
- },
2684
- fixed: {
2685
- type: "boolean",
2686
- const: !0
2687
- },
2688
- hidePadding: {
2689
- type: "boolean",
2690
- const: !0
2691
- }
2692
- }
2693
- }
2694
- }
2695
- },
2696
- "f-section-grid": {
2697
- description: "",
2698
- type: "object",
2699
- properties: {
2700
- rules: {
2701
- type: "object",
2702
- properties: {
2703
- canAccept: {
2704
- type: "boolean",
2705
- const: !1
2706
- },
2707
- fixed: {
2708
- type: "boolean",
2709
- const: !0
2710
- },
2711
- hidePadding: {
2712
- type: "boolean",
2713
- const: !0
2714
- }
2715
- }
2716
- }
2717
- }
2718
- }
2719
- }
2720
- },
2721
- rules: {
2722
- type: "object",
2723
- properties: {
2724
- canAccept: {
2725
- type: "boolean",
2726
- const: !1
2727
- },
2728
- fixed: {
2729
- type: "boolean",
2730
- const: !0
2731
- },
2732
- hidePadding: {
2733
- type: "boolean",
2734
- const: !0
2735
- }
2736
- }
2737
- }
2738
- }
2739
- }
2740
- }
2741
- }
2742
- },
2743
- rules: {
2744
- type: "object",
2745
- properties: {
2746
- canAccept: {
2747
- type: "boolean",
2748
- const: !1
2749
- },
2750
- fixed: {
2751
- type: "boolean",
2752
- const: !0
2753
- },
2754
- hidePadding: {
2755
- type: "boolean",
2756
- const: !0
2757
- }
2758
- }
2759
- }
2760
- },
2761
- "f-page-content-main": {
2762
- description: "",
2763
- type: "object",
2764
- properties: {
2765
- rules: {
2766
- type: "object",
2767
- properties: {
2768
- canAccept: {
2769
- type: "boolean",
2770
- const: !1
2771
- },
2772
- fixed: {
2773
- type: "boolean",
2774
- const: !1
2775
- },
2776
- hidePadding: {
2777
- type: "boolean",
2778
- const: !0
2779
- }
2780
- }
2781
- }
2782
- }
2783
- }
2784
- }
2785
- },
2786
- rules: {
2787
- type: "object",
2788
- properties: {
2789
- canAccept: {
2790
- type: "boolean",
2791
- const: !1
2792
- },
2793
- fixed: {
2794
- type: "boolean",
2795
- const: !0
2796
- },
2797
- hidePadding: {
2798
- type: "boolean",
2799
- const: !0
2800
- }
2801
- }
2802
- }
2803
- }
2804
- }
2805
- }
2806
- },
2807
- rules: {
2808
- type: "object",
2809
- properties: {
2810
- canAccept: {
2811
- type: "object",
2812
- const: {
2813
- anyOf: [
2814
- {
2815
- children: 0
2816
- },
2817
- {
2818
- children: {
2819
- length: {
2820
- not: 1
2821
- },
2822
- "f-struct-like-card": !0
2823
- }
2824
- },
2825
- {
2826
- children: {
2827
- "scroll-spy": !1,
2828
- "f-page-content": !1,
2829
- "f-struct-like-card": !1
2830
- }
2831
- }
2832
- ]
2833
- }
2834
- },
2835
- fixed: {
2836
- type: "boolean",
2837
- const: !0
2838
- },
2839
- hidePadding: {
2840
- type: "boolean",
2841
- const: !0
2842
- }
2843
- }
2844
- }
2845
- }
2846
- },
2847
- "f-page-footer": {
2848
- description: "The class of page footer designed by farris.",
2849
- type: "string"
3035
+ class $n {
3036
+ getTemplateRule(t, n) {
3037
+ const a = n == null ? void 0 : n.formSchemaUtils, i = a == null ? void 0 : a.getFormTemplateRule(), l = { canAccept: !0, canDelete: !0, canMove: !0 };
3038
+ if (!i)
3039
+ return l;
3040
+ const r = this.getComponentContext(t);
3041
+ return r.componentClassList.forEach((u) => {
3042
+ if (!u || !i[u])
3043
+ return;
3044
+ const { canMove: c, canDelete: p, canAccept: o } = i[u];
3045
+ l.canMove = l.canMove && this.resolveRuleValue(c, r), l.canDelete = l.canDelete && this.resolveRuleValue(p, r), l.canAccept = l.canAccept && this.resolveRuleValue(o, r);
3046
+ }), l;
3047
+ }
3048
+ resolveRuleValue(t, n) {
3049
+ return typeof t == "boolean" ? t : this.parseRuleValueSchema(t, n);
3050
+ }
3051
+ parseRuleValueSchema(t, n) {
3052
+ const a = t.invalidContext || [];
3053
+ let i = !0;
3054
+ for (const l of a) {
3055
+ if (l.firstLevelChild) {
3056
+ if (l.firstLevelChild.class) {
3057
+ const r = n.firstLevelChildClassList;
3058
+ if (r && !r.includes(l.firstLevelChild.class)) {
3059
+ i = !1;
3060
+ continue;
2850
3061
  }
2851
3062
  }
2852
- },
2853
- rules: {
2854
- type: "object",
2855
- properties: {
2856
- canAccept: {
2857
- type: "boolean",
2858
- const: !1
2859
- },
2860
- fixed: {
2861
- type: "boolean",
2862
- const: !0
2863
- },
2864
- hidePadding: {
2865
- type: "boolean",
2866
- const: !0
3063
+ if (l.firstLevelChild.type) {
3064
+ const r = n.firstLevelChildSchema;
3065
+ if (r && r.type !== l.firstLevelChild.type) {
3066
+ i = !1;
3067
+ continue;
2867
3068
  }
2868
3069
  }
2869
3070
  }
3071
+ if (l.secondLevelChild) {
3072
+ if (l.secondLevelChild.class) {
3073
+ const r = n.secondLevelChildClassList;
3074
+ if (r && !r.includes(l.secondLevelChild.class)) {
3075
+ i = !1;
3076
+ continue;
3077
+ }
3078
+ }
3079
+ if (l.secondLevelChild.type) {
3080
+ const r = n.secondLevelChildSchema;
3081
+ if (r && r.type !== l.secondLevelChild.type) {
3082
+ i = !1;
3083
+ continue;
3084
+ }
3085
+ }
3086
+ }
3087
+ if (l.parent) {
3088
+ if (l.parent.class) {
3089
+ const r = n.parentClassList;
3090
+ if (r && !r.includes(l.parent.class)) {
3091
+ i = !1;
3092
+ continue;
3093
+ }
3094
+ }
3095
+ if (l.parent.type) {
3096
+ const r = n.parentSchema;
3097
+ if (r && r.type !== l.parent.type) {
3098
+ i = !1;
3099
+ continue;
3100
+ }
3101
+ }
3102
+ }
3103
+ i = !0;
3104
+ break;
2870
3105
  }
2871
- },
2872
- "f-page-is-managelist": {
2873
- description: "The root class of mangement list page.",
2874
- type: "string"
2875
- },
2876
- "f-page-card": {
2877
- description: "",
2878
- type: "object"
2879
- },
2880
- "f-page-is-mainsubcard": {
2881
- description: "",
2882
- type: "object"
2883
- }
2884
- }, hn = {
2885
- $schema: dn,
2886
- $id: pn,
2887
- title: fn,
2888
- description: mn,
2889
- type: yn,
2890
- properties: gn
2891
- }, J = /* @__PURE__ */ new Map();
2892
- function bn() {
2893
- function e(d, f, a, u) {
2894
- var k;
2895
- if (typeof a == "number")
2896
- return ((k = u[d]) == null ? void 0 : k.length) === a;
2897
- if (typeof a == "object") {
2898
- const F = Object.keys(a)[0], V = a[F];
2899
- if (F === "not")
2900
- return Number(u[d].length) !== Number(V);
2901
- if (F === "moreThan")
2902
- return Number(u[d].length) >= Number(V);
2903
- if (F === "lessThan")
2904
- return Number(u[d].length) <= Number(V);
2905
- }
2906
- return !1;
3106
+ return !i;
2907
3107
  }
2908
- function t(d, f, a, u) {
2909
- return typeof a == "boolean" ? u.childrenClassList.includes(f) === !!a : !1;
2910
- }
2911
- function n(d, f, a, u) {
2912
- return typeof a == "boolean" ? u.parentClassList.includes(f) === !!a : !1;
2913
- }
2914
- function o(d, f, a, u) {
2915
- return typeof a == "boolean" ? u.parentClassList.includes(f) === !!a : !1;
3108
+ getComponentContext(t) {
3109
+ var f, g, v, C;
3110
+ const n = t.schema, a = n.appearance && n.appearance.class || "", i = a.split(" ") || [], l = n.contents || [], r = l.length ? l[0] : null, d = r && r.appearance ? r.appearance.class : "", u = d ? d.split(" ") : [], c = (f = r == null ? void 0 : r.contents) != null && f.length ? r == null ? void 0 : r.contents[0] : null, p = c && c.appearance ? c.appearance.class : "", o = p ? p.split(" ") : [], s = n.type === "component" ? (v = (g = t.parent) == null ? void 0 : g.parent) == null ? void 0 : v.schema : (C = t.parent) == null ? void 0 : C.schema, m = s && s.appearance && s.appearance.class || "", y = m ? m.split(" ") : [];
3111
+ return {
3112
+ componentClass: a,
3113
+ componentClassList: i,
3114
+ childContents: l,
3115
+ firstLevelChildSchema: r,
3116
+ firstLevelChildClass: d,
3117
+ firstLevelChildClassList: u,
3118
+ secondLevelChildSchema: c,
3119
+ secondLevelChildClass: p,
3120
+ secondLevelChildClassList: o,
3121
+ parentSchema: s,
3122
+ parentClass: m,
3123
+ parentClassList: y
3124
+ };
2916
3125
  }
2917
- const s = /* @__PURE__ */ new Map([
2918
- ["length", e],
2919
- ["hasChildren", t],
2920
- ["hasSibling", o],
2921
- ["hasParent", n]
2922
- ]);
2923
- function c(d, f) {
2924
- const a = d;
2925
- return typeof f == "number" ? [{ target: a, operator: "length", param: null, value: Number(f) }] : typeof f == "object" ? Object.keys(f).map((u) => {
2926
- if (u === "length")
2927
- return { target: a, operator: "length", param: null, value: f[u] };
2928
- const k = u, F = f[u];
2929
- return { target: a, operator: d === "children" ? "hasChildren" : d === "parent" ? "hasParent" : "hasSibling", param: k, value: F };
2930
- }) : [];
3126
+ }
3127
+ function jn(e, t) {
3128
+ function n(u, c = null) {
3129
+ if (c) return c;
3130
+ const p = e.getComponentById(t);
3131
+ return e.selectNode(p, (o) => o.id === u);
3132
+ }
3133
+ function a(u) {
3134
+ const c = e.getComponentById(u);
3135
+ return !(!c || !c.componentType || !c.componentType.startsWith("form"));
3136
+ }
3137
+ function i(u) {
3138
+ const c = n(u.id), p = Ce(e), o = [];
3139
+ p.getResonseFormLayoutConfig(c, o, 1);
3140
+ const s = o.map((M) => M.columnInSM), m = o.map((M) => M.columnInMD), y = o.map((M) => M.columnInLG), f = o.map((M) => M.columnInEL), g = l(s) ? s[0] : 0, v = l(m) ? m[0] : 0, C = l(y) ? y[0] : 0, w = l(f) ? f[0] : 0;
3141
+ return {
3142
+ uniqueColClassInSM: g,
3143
+ uniqueColClassInMD: v,
3144
+ uniqueColClassInLG: C,
3145
+ uniqueColClassInEL: w
3146
+ };
2931
3147
  }
2932
- function i(d, f) {
2933
- if (s.has(d.operator)) {
2934
- const a = s.get(d.operator);
2935
- return a && a(d.target, d.param, d.value, f) || !1;
2936
- }
2937
- return !1;
3148
+ function l(u) {
3149
+ const c = new Set(u);
3150
+ return Array.from(c).length === 1;
2938
3151
  }
2939
- function p(d, f) {
2940
- return Object.keys(d).reduce((F, V) => {
2941
- const w = c(V, d[V]);
2942
- return F.push(...w), F;
2943
- }, []).reduce((F, V) => F && i(V, f), !0);
2944
- }
2945
- function g(d, f) {
2946
- const a = Object.keys(d), u = a.includes("allOf"), k = a.includes("anyOf"), F = u || k, v = (F ? d[F ? u ? "allOf" : "anyOf" : "allOf"] : [d]).map((m) => p(m, f));
2947
- return u ? !v.includes(!1) : v.includes(!0);
2948
- }
2949
- function y(d, f) {
2950
- const a = d.const;
2951
- return a ? typeof a == "boolean" ? a : typeof a == "object" ? g(a, f) : !1 : !1;
2952
- }
2953
- function h(d) {
2954
- return (f) => {
2955
- const a = { canAccept: !0, fixed: !1, hidePadding: !1 };
2956
- return d && d.properties && Object.keys(d.properties).reduce((u, k) => {
2957
- const F = d.properties[k];
2958
- return u[k] = y(F, f), u;
2959
- }, a), a;
2960
- };
3152
+ function r(u, c, p) {
3153
+ u = n(p, u), u.contents.forEach((o) => {
3154
+ if (o.type === J.fieldset.type) {
3155
+ r(o, c, o.id);
3156
+ return;
3157
+ }
3158
+ o.appearance || (o.appearance = {});
3159
+ const s = o.appearance.class;
3160
+ o.appearance.class = d(s, c);
3161
+ });
2961
3162
  }
2962
- function l(d, f, a) {
2963
- if (f.type === "object" && f.properties) {
2964
- const { rules: u, contents: k } = f.properties;
2965
- a.set(d, h(u)), k && Object.keys(k.properties).forEach(
2966
- (F) => l(F, k.properties[F], a)
2967
- );
3163
+ function d(u, c) {
3164
+ let p, o, s, m, y = [];
3165
+ if (u) {
3166
+ const M = u.split(" "), h = M.filter((k) => k.startsWith("col-"));
3167
+ p = h.find((k) => /^col-([1-9]|10|11|12)$/.test(k)), o = h.find((k) => /^col-md-([1-9]|10|11|12)$/.test(k)), s = h.find((k) => /^col-xl-([1-9]|10|11|12)$/.test(k)), m = h.find((k) => /^col-el-([1-9]|10|11|12)$/.test(k)), y = M.filter((k) => !k.startsWith("col-"));
2968
3168
  }
3169
+ const f = c.uniqueColClassInSM ? "col-" + c.uniqueColClassInSM : p, g = c.uniqueColClassInMD ? "col-md-" + c.uniqueColClassInMD : o, v = c.uniqueColClassInLG ? "col-xl-" + c.uniqueColClassInLG : s, C = c.uniqueColClassInEL ? "col-el-" + c.uniqueColClassInEL : m;
3170
+ return [f, g, v, C].concat(y).join(" ");
2969
3171
  }
2970
- function r() {
2971
- const { properties: d } = hn;
2972
- Object.keys(d).forEach((f) => {
2973
- l(f, d[f], J);
2974
- });
3172
+ return { checkIsInFormComponent: a, assembleUnifiedLayoutContext: i, changeFormControlsByUnifiedLayoutConfig: r };
3173
+ }
3174
+ class Nn extends ve {
3175
+ constructor(t, n) {
3176
+ super(t, n);
2975
3177
  }
2976
- function S(d, f) {
2977
- const a = { canAccept: !0, fixed: !1, hidePadding: !0 };
2978
- return J.has(d) ? J.get(d)(f) : a;
3178
+ getPropertyConfig(t, n) {
3179
+ var a = this;
3180
+ this.propertyConfig.categories.basic = this.getBasicPropConfig(t);
3181
+ const { checkIsInFormComponent: i, assembleUnifiedLayoutContext: l, changeFormControlsByUnifiedLayoutConfig: r } = jn(this.formSchemaUtils, this.componentId), d = this.getAppearanceConfig(t);
3182
+ return d.properties.unifiedLayout = {
3183
+ title: "统一布局配置",
3184
+ description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
3185
+ visible: i(this.componentId),
3186
+ refreshPanelAfterChanged: !0,
3187
+ editor: {
3188
+ type: "response-form-layout-setting",
3189
+ initialState: l(t)
3190
+ }
3191
+ }, d.setPropertyRelates = function(u, c) {
3192
+ if (u)
3193
+ switch (u && u.propertyID) {
3194
+ case "unifiedLayout": {
3195
+ r(null, u.propertyValue, t.id), a.updateElementByParentContainer(t.id, n);
3196
+ break;
3197
+ }
3198
+ }
3199
+ }, this.propertyConfig.categories.appearance = d, this.propertyConfig;
2979
3200
  }
2980
- return r(), { getRuleValue: S };
2981
3201
  }
2982
- function vn(e, t) {
2983
- var D;
2984
- const n = e.schema, o = (D = e.parent) == null ? void 0 : D.schema, s = bn(), c = C(!1), i = C(!1);
2985
- let p = !0, g = !1, y, h = !1;
2986
- function l(m) {
2987
- return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ? m.sourceType === "control" && m.controlCategory === "input" || m.sourceType === "move" && m.controlType === "form-group" : !0;
2988
- }
2989
- function r(m) {
2990
- return !(!un().basalDragulaRuleForContainer(m) || !p || !l(m));
2991
- }
2992
- function S() {
2993
- c.value = !1, i.value = !1;
2994
- const m = n, M = m.appearance && m.appearance.class || "", A = M.split(" "), j = m.contents || [], $ = j.length ? j[0] : null, O = $ && $.appearance ? $.appearance.class : "", P = O ? O.split(" ") : [], x = j.length ? j.reduce((oe, W) => {
2995
- const ae = W && W.appearance ? W.appearance.class : "", Ce = ae ? ae.split(" ") : [];
2996
- return oe.push(...Ce), oe;
2997
- }, []) : [], I = o, L = I && I.appearance && I.appearance.class || "", ge = L ? L.split(" ") : [];
2998
- y = {
2999
- componentClass: M,
3000
- componentClassList: A,
3001
- childContents: j,
3002
- firstChildContent: $,
3003
- firstChildClass: O,
3004
- firstChildClassList: P,
3005
- parent: I,
3006
- parentClass: L,
3007
- parentClassList: ge,
3008
- children: j,
3009
- childrenClassList: x
3010
- };
3011
- const { canAccept: he, fixed: be, hidePadding: ve } = s.getRuleValue(A[0], y);
3012
- return p = he, g = ve, h = be, !0;
3202
+ function Rn(e, t) {
3203
+ const n = e.schema, a = new $n(), { canMove: i, canAccept: l, canDelete: r } = a.getTemplateRule(e, t);
3204
+ function d(C) {
3205
+ const w = a.getComponentContext(e);
3206
+ return w && w.componentClassList && w.componentClassList.includes("f-form-layout") && w.componentClassList.includes("farris-form") ? C.sourceType === "control" && C.controlCategory === "input" || C.sourceType === "move" && C.controlType === "form-group" : !0;
3013
3207
  }
3014
- function d(m) {
3015
- Me();
3208
+ function u(C) {
3209
+ return !(!An().basalDragulaRuleForContainer(C, t) || !l || !d(C));
3016
3210
  }
3017
- function f() {
3211
+ function c(C) {
3212
+ X();
3213
+ }
3214
+ function p() {
3018
3215
  return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
3019
3216
  }
3020
- function a(m, M) {
3021
- const A = n;
3022
- if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
3023
- const { label: O } = m, P = U("form-group");
3024
- return P.editor = M, P.label = O, u(P), delete P.editor.id, delete P.editor.binding, delete P.editor.appearance, delete P.editor.visible, P;
3217
+ function o(C, w) {
3218
+ const M = n;
3219
+ if ((M.appearance && M.appearance.class || "").split(" ").includes("f-form-layout")) {
3220
+ const { label: T } = C, I = ee("form-group");
3221
+ return I.editor = w, I.label = T, s(I), delete I.editor.id, delete I.editor.binding, delete I.editor.appearance, delete I.editor.visible, I;
3025
3222
  }
3026
- return M;
3027
- }
3028
- function u(m) {
3029
- const M = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
3030
- if (M && M.schema && M.schema.componentType) {
3031
- const A = M.schema.formColumns, j = k(A);
3032
- m.appearance || (m.appearance = {}), m.appearance.class = j;
3223
+ return w;
3224
+ }
3225
+ function s(C) {
3226
+ const w = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
3227
+ if (w && w.schema && w.schema.componentType) {
3228
+ const M = w.schema.formColumns;
3229
+ let h = m(M);
3230
+ h = t == null ? void 0 : t.formSchemaUtils.getControlClassByFormUnifiedLayout(h, "", e.schema), C.appearance || (C.appearance = {}), C.appearance.class = h;
3033
3231
  }
3034
3232
  }
3035
- function k(m) {
3036
- let M = "";
3037
- switch (m) {
3233
+ function m(C) {
3234
+ let w = "";
3235
+ switch (C) {
3038
3236
  case 1: {
3039
- M = "col-12 col-md-12 col-xl-12 col-el-12";
3237
+ w = "col-12";
3040
3238
  break;
3041
3239
  }
3042
3240
  case 2: {
3043
- M = "col-12 col-md-6 col-xl-6 col-el-6";
3241
+ w = "col-12 col-md-6 col-xl-6 col-el-6";
3044
3242
  break;
3045
3243
  }
3046
3244
  case 3: {
3047
- M = "col-12 col-md-6 col-xl-4 col-el-4";
3245
+ w = "col-12 col-md-6 col-xl-4 col-el-4";
3048
3246
  break;
3049
3247
  }
3050
3248
  case 4: {
3051
- M = "col-12 col-md-6 col-xl-3 col-el-2";
3249
+ w = "col-12 col-md-6 col-xl-3 col-el-2";
3052
3250
  break;
3053
3251
  }
3054
3252
  }
3055
- return M;
3253
+ return w;
3056
3254
  }
3057
- function F(m, M, A) {
3058
- const j = n;
3059
- if ((j.appearance && j.appearance.class || "").split(" ").includes("f-form-layout")) {
3060
- const P = String(m.innerText), x = U("form-group");
3061
- return x.editor = A, x.label = P, x;
3062
- }
3063
- return A;
3255
+ function y() {
3256
+ return i;
3064
3257
  }
3065
- function V() {
3066
- return !h;
3258
+ function f() {
3259
+ return r;
3067
3260
  }
3068
- function w() {
3069
- return !h;
3261
+ function g() {
3262
+ return !1;
3070
3263
  }
3071
- function v() {
3072
- return g;
3264
+ function v(C) {
3265
+ return new Nn(C, t).getPropertyConfig(n, e.componentInstance.value);
3073
3266
  }
3074
3267
  return {
3075
- canAccepts: r,
3076
- checkCanDeleteComponent: w,
3077
- checkCanMoveComponent: V,
3078
- getStyles: f,
3079
- hideNestedPaddingInDesginerView: v,
3080
- onAcceptNewChildElement: F,
3081
- onAcceptMovedChildElement: d,
3082
- resolveComponentContext: S,
3083
- onResolveNewComponentSchema: a,
3084
- triggerBelongedComponentToMoveWhenMoved: c,
3085
- triggerBelongedComponentToDeleteWhenDeleted: i
3268
+ canAccepts: u,
3269
+ checkCanDeleteComponent: f,
3270
+ checkCanMoveComponent: y,
3271
+ getStyles: p,
3272
+ getPropsConfig: v,
3273
+ hideNestedPaddingInDesginerView: g,
3274
+ onAcceptMovedChildElement: c,
3275
+ onResolveNewComponentSchema: o
3086
3276
  };
3087
3277
  }
3088
- const Cn = /* @__PURE__ */ H({
3278
+ const Gn = /* @__PURE__ */ R({
3089
3279
  name: "FOrderDesign",
3090
- props: te,
3280
+ props: ne,
3091
3281
  emits: ["change"],
3092
3282
  setup(e, t) {
3093
- var V;
3094
- const n = C(e.items), o = C("排序列"), s = C("排序方式"), c = C("添加排序列"), i = [{
3283
+ var M;
3284
+ const n = S(e.items), a = S("排序列"), i = S("排序方式"), l = S("添加排序列"), r = [{
3095
3285
  id: "asc",
3096
3286
  name: "升序"
3097
3287
  }, {
3098
3288
  id: "desc",
3099
3289
  name: "降序"
3100
- }], p = C(/* @__PURE__ */ new Map()), g = C(), y = X("design-item-context"), h = vn(y.schema, (V = y.parent) == null ? void 0 : V.schema), l = cn(g, y, h);
3101
- ce(() => {
3102
- g.value.componentInstance = l;
3103
- }), t.expose(l.value);
3104
- function r() {
3105
- const w = n.value.map((v) => [v.id, !0]);
3106
- p.value = new Map(w);
3290
+ }], d = S(/* @__PURE__ */ new Map()), u = S(), c = x("design-item-context"), p = Rn(c.schema, (M = c.parent) == null ? void 0 : M.schema), o = En(u, c, p);
3291
+ Y(() => {
3292
+ u.value.componentInstance = o;
3293
+ }), t.expose(o.value);
3294
+ function s() {
3295
+ const h = n.value.map((k) => [k.id, !0]);
3296
+ d.value = new Map(h);
3107
3297
  }
3108
- r();
3109
- const S = B(() => e.dataSource.map((w) => (w.disabled = p.value.has(w.id), w))), d = B(() => ({
3298
+ s();
3299
+ const m = B(() => e.dataSource.map((h) => (h.disabled = d.value.has(h.id), h))), y = B(() => ({
3110
3300
  "f-order": !0
3111
3301
  }));
3112
- function f(w) {
3113
- n.value = n.value.filter((v) => v.id !== w.id), r(), t.emit("change", n.value);
3302
+ function f(h) {
3303
+ n.value = n.value.filter((k) => k.id !== h.id), s(), t.emit("change", n.value);
3114
3304
  }
3115
- function a() {
3305
+ function g() {
3116
3306
  n.value = [...n.value, {
3117
3307
  id: Date.now().toString(),
3118
3308
  name: "",
3119
3309
  order: "asc"
3120
- }], r(), t.emit("change", n.value);
3310
+ }], s(), t.emit("change", n.value);
3121
3311
  }
3122
- function u(w) {
3123
- r(), t.emit("change", n.value);
3312
+ function v(h) {
3313
+ s(), t.emit("change", n.value);
3124
3314
  }
3125
- function k(w) {
3126
- if (w && w.length) {
3127
- const v = /* @__PURE__ */ new Map();
3128
- w.reduce((D, m) => (D.set(m.id, m), D), v), n.value = w.map((D) => v.get(D.id)), t.emit("change", n.value);
3315
+ function C(h) {
3316
+ if (h && h.length) {
3317
+ const k = /* @__PURE__ */ new Map();
3318
+ h.reduce((T, I) => (T.set(I.id, I), T), k), n.value = h.map((T) => k.get(T.id)), t.emit("change", n.value);
3129
3319
  }
3130
3320
  }
3131
- function F() {
3321
+ function w() {
3132
3322
  return b(fe, {
3133
3323
  style: "flex:1",
3134
3324
  data: n.value,
@@ -3137,71 +3327,71 @@ const Cn = /* @__PURE__ */ H({
3137
3327
  "keep-order": !0,
3138
3328
  itemClass: "f-order-item",
3139
3329
  onRemoveItem: f,
3140
- onChange: k
3330
+ onChange: C
3141
3331
  }, {
3142
3332
  header: () => b("div", {
3143
3333
  class: "f-order-header"
3144
3334
  }, [b("span", {
3145
3335
  class: "f-order-header-order-field"
3146
- }, [o.value]), b("span", {
3336
+ }, [a.value]), b("span", {
3147
3337
  class: "f-order-header-order-type"
3148
- }, [s.value])]),
3149
- itemContent: (w) => b("div", {
3338
+ }, [i.value])]),
3339
+ itemContent: (h) => b("div", {
3150
3340
  class: "f-order-item-content"
3151
- }, [b(_, {
3341
+ }, [b(H, {
3152
3342
  class: "f-order-item-content-order-field",
3153
- data: S.value,
3343
+ data: m.value,
3154
3344
  valueField: "id",
3155
3345
  textField: "name",
3156
3346
  idField: "id",
3157
- modelValue: w.id,
3158
- "onUpdate:modelValue": (v) => w.id = v,
3159
- onChange: u,
3160
- onClear: u
3161
- }, null), b(_, {
3347
+ modelValue: h.id,
3348
+ "onUpdate:modelValue": (k) => h.id = k,
3349
+ onChange: v,
3350
+ onClear: v
3351
+ }, null), b(H, {
3162
3352
  class: "f-order-item-content-order-type",
3163
- data: i,
3353
+ data: r,
3164
3354
  valueField: "id",
3165
3355
  textField: "name",
3166
3356
  idField: "id",
3167
- modelValue: w.order,
3168
- "onUpdate:modelValue": (v) => w.order = v,
3169
- onChange: u
3357
+ modelValue: h.order,
3358
+ "onUpdate:modelValue": (k) => h.order = k,
3359
+ onChange: v
3170
3360
  }, null)]),
3171
3361
  footer: () => b("div", {
3172
3362
  class: "f-order-footer"
3173
3363
  }, [b(me, {
3174
3364
  type: "link",
3175
3365
  class: "f-order-add-button",
3176
- onClick: a
3366
+ onClick: g
3177
3367
  }, {
3178
3368
  default: () => b(Q, null, [b("span", {
3179
3369
  class: "f-order-add-icon"
3180
3370
  }, [b("i", {
3181
3371
  class: "f-icon f-icon-add"
3182
- }, null)]), c.value])
3372
+ }, null)]), l.value])
3183
3373
  })])
3184
3374
  });
3185
3375
  }
3186
3376
  return () => b("div", {
3187
- ref: g,
3188
- class: d.value
3189
- }, [F()]);
3377
+ ref: u,
3378
+ class: y.value
3379
+ }, [w()]);
3190
3380
  }
3191
- }), In = {
3381
+ }), Qn = {
3192
3382
  install(e) {
3193
3383
  e.component(z.name, z);
3194
3384
  },
3195
- register(e, t, n, o) {
3196
- e.order = z, t.order = ie;
3385
+ register(e, t, n, a) {
3386
+ e.order = z, t.order = ae;
3197
3387
  },
3198
3388
  registerDesigner(e, t, n) {
3199
- e.order = Cn, t.order = ie;
3389
+ e.order = Gn, t.order = ae;
3200
3390
  }
3201
3391
  };
3202
3392
  export {
3203
3393
  z as FOrder,
3204
- In as default,
3205
- te as orderProps,
3206
- ie as propsResolver
3394
+ Qn as default,
3395
+ ne as orderProps,
3396
+ ae as propsResolver
3207
3397
  };