@farris/ui-vue 1.7.0-beta.4 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (563) hide show
  1. package/components/accordion/index.esm.js +61 -312
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +56 -1481
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +8 -752
  6. package/components/binding-selector/index.umd.cjs +1 -1
  7. package/components/button-edit/index.esm.js +358 -351
  8. package/components/button-edit/index.umd.cjs +1 -1
  9. package/components/button-group/index.esm.js +110 -266
  10. package/components/button-group/index.umd.cjs +1 -1
  11. package/components/calendar/index.esm.js +1371 -1284
  12. package/components/calendar/index.umd.cjs +30 -30
  13. package/components/code-editor/index.esm.js +169 -237
  14. package/components/code-editor/index.umd.cjs +3 -3
  15. package/components/collection-property-editor/index.esm.js +382 -351
  16. package/components/collection-property-editor/index.umd.cjs +2 -2
  17. package/components/color-picker/index.esm.js +502 -812
  18. package/components/color-picker/index.umd.cjs +1 -1
  19. package/components/combo-list/index.esm.js +197 -183
  20. package/components/combo-list/index.umd.cjs +1 -1
  21. package/components/combo-tree/index.esm.js +199 -364
  22. package/components/combo-tree/index.umd.cjs +1 -1
  23. package/components/comment/index.esm.js +1501 -1465
  24. package/components/comment/index.umd.cjs +6 -6
  25. package/components/common/index.esm.js +136 -100
  26. package/components/common/index.umd.cjs +1 -1
  27. package/components/component/index.css +1 -1
  28. package/components/component/index.esm.js +2662 -3647
  29. package/components/component/index.umd.cjs +1 -8
  30. package/components/condition/index.esm.js +492 -2449
  31. package/components/condition/index.umd.cjs +1 -8
  32. package/components/content-container/index.esm.js +252 -241
  33. package/components/content-container/index.umd.cjs +1 -1
  34. package/components/data-grid/index.esm.js +505 -409
  35. package/components/data-grid/index.umd.cjs +1 -1
  36. package/components/data-view/index.esm.js +3326 -3258
  37. package/components/data-view/index.umd.cjs +1 -1
  38. package/components/date-picker/index.esm.js +1709 -1634
  39. package/components/date-picker/index.umd.cjs +1 -1
  40. package/components/designer-canvas/index.css +1 -1
  41. package/components/designer-canvas/index.esm.js +2693 -3021
  42. package/components/designer-canvas/index.umd.cjs +1 -1
  43. package/components/designer-outline/index.esm.js +102 -98
  44. package/components/designer-outline/index.umd.cjs +1 -1
  45. package/components/drawer/index.esm.js +409 -358
  46. package/components/drawer/index.umd.cjs +2 -2
  47. package/components/dropdown/index.esm.js +124 -373
  48. package/components/dropdown/index.umd.cjs +2 -2
  49. package/components/dynamic-form/index.esm.js +760 -573
  50. package/components/dynamic-form/index.umd.cjs +1 -1
  51. package/components/dynamic-resolver/index.esm.js +354 -327
  52. package/components/dynamic-resolver/index.umd.cjs +2 -2
  53. package/components/dynamic-view/index.esm.js +413 -359
  54. package/components/dynamic-view/index.umd.cjs +1 -1
  55. package/components/event-parameter/index.esm.js +1 -1
  56. package/components/event-parameter/index.umd.cjs +1 -1
  57. package/components/events-editor/index.css +1 -1
  58. package/components/events-editor/index.esm.js +1535 -1941
  59. package/components/events-editor/index.umd.cjs +3 -3
  60. package/components/expression-editor/index.css +1 -1
  61. package/components/expression-editor/index.esm.js +2 -7317
  62. package/components/expression-editor/index.umd.cjs +1 -427
  63. package/components/field-selector/index.esm.js +13 -13
  64. package/components/field-selector/index.umd.cjs +1 -1
  65. package/components/fieldset/index.esm.js +140 -123
  66. package/components/fieldset/index.umd.cjs +1 -1
  67. package/components/filter-bar/index.esm.js +1021 -1012
  68. package/components/filter-bar/index.umd.cjs +2 -2
  69. package/components/filter-condition-editor/index.css +1 -1
  70. package/components/filter-condition-editor/index.esm.js +448 -9000
  71. package/components/filter-condition-editor/index.umd.cjs +1 -427
  72. package/components/html-template/index.esm.js +167 -147
  73. package/components/html-template/index.umd.cjs +1 -1
  74. package/components/image/index.esm.js +372 -352
  75. package/components/image/index.umd.cjs +2 -2
  76. package/components/image-cropper/index.esm.js +361 -615
  77. package/components/image-cropper/index.umd.cjs +1 -1
  78. package/components/json-editor/index.esm.js +247 -325
  79. package/components/json-editor/index.umd.cjs +1 -1
  80. package/components/language-textbox/index.esm.js +835 -421
  81. package/components/language-textbox/index.umd.cjs +2 -2
  82. package/components/layout/index.esm.js +163 -549
  83. package/components/layout/index.umd.cjs +1 -1
  84. package/components/list-nav/index.esm.js +39 -836
  85. package/components/list-nav/index.umd.cjs +1 -1
  86. package/components/list-view/index.esm.js +690 -474
  87. package/components/list-view/index.umd.cjs +6 -8
  88. package/components/loading/index.esm.js +128 -97
  89. package/components/loading/index.umd.cjs +2 -2
  90. package/components/locale/index.esm.js +361 -340
  91. package/components/locale/index.umd.cjs +5 -5
  92. package/components/lookup/index.css +1 -1
  93. package/components/lookup/index.esm.js +3396 -3368
  94. package/components/lookup/index.umd.cjs +1 -1
  95. package/components/mapping-editor/index.css +1 -1
  96. package/components/mapping-editor/index.esm.js +1684 -1584
  97. package/components/mapping-editor/index.umd.cjs +1 -1
  98. package/components/menu-lookup/index.esm.js +586 -609
  99. package/components/menu-lookup/index.umd.cjs +6 -6
  100. package/components/message-box/index.css +1 -1
  101. package/components/message-box/index.esm.js +357 -353
  102. package/components/message-box/index.umd.cjs +1 -1
  103. package/components/modal/index.esm.js +325 -318
  104. package/components/modal/index.umd.cjs +1 -1
  105. package/components/nav/index.esm.js +31 -311
  106. package/components/nav/index.umd.cjs +1 -1
  107. package/components/number-range/index.esm.js +189 -1633
  108. package/components/number-range/index.umd.cjs +1 -1
  109. package/components/number-spinner/index.esm.js +195 -175
  110. package/components/number-spinner/index.umd.cjs +1 -1
  111. package/components/order/index.esm.js +761 -1057
  112. package/components/order/index.umd.cjs +7 -9
  113. package/components/page-footer/index.esm.js +48 -331
  114. package/components/page-footer/index.umd.cjs +1 -1
  115. package/components/page-header/index.esm.js +92 -73
  116. package/components/page-header/index.umd.cjs +1 -1
  117. package/components/pagination/index.esm.js +195 -472
  118. package/components/pagination/index.umd.cjs +1 -1
  119. package/components/popover/index.esm.js +77 -76
  120. package/components/popover/index.umd.cjs +1 -1
  121. package/components/progress/index.esm.js +148 -353
  122. package/components/progress/index.umd.cjs +3 -3
  123. package/components/property-editor/index.esm.js +74 -68
  124. package/components/property-editor/index.umd.cjs +1 -1
  125. package/components/property-panel/index.esm.js +872 -1800
  126. package/components/property-panel/index.umd.cjs +5 -12
  127. package/components/query-solution/index.css +1 -1
  128. package/components/query-solution/index.esm.js +4223 -6205
  129. package/components/query-solution/index.umd.cjs +6 -13
  130. package/components/response-layout/index.esm.js +206 -170
  131. package/components/response-layout/index.umd.cjs +1 -1
  132. package/components/response-layout-editor/index.esm.js +1 -1
  133. package/components/response-layout-editor/index.umd.cjs +1 -1
  134. package/components/response-toolbar/index.esm.js +378 -359
  135. package/components/response-toolbar/index.umd.cjs +1 -1
  136. package/components/schema-selector/index.esm.js +2491 -2653
  137. package/components/schema-selector/index.umd.cjs +8 -10
  138. package/components/search-box/index.esm.js +79 -240
  139. package/components/search-box/index.umd.cjs +1 -1
  140. package/components/section/index.esm.js +304 -289
  141. package/components/section/index.umd.cjs +2 -2
  142. package/components/smoke-detector/index.esm.js +8 -179
  143. package/components/smoke-detector/index.umd.cjs +1 -1
  144. package/components/sort-condition-editor/index.esm.js +4 -9421
  145. package/components/sort-condition-editor/index.umd.cjs +1 -427
  146. package/components/splitter/index.esm.js +142 -1171
  147. package/components/splitter/index.umd.cjs +1 -1
  148. package/components/step/index.esm.js +48 -47
  149. package/components/step/index.umd.cjs +1 -1
  150. package/components/tabs/index.esm.js +460 -513
  151. package/components/tabs/index.umd.cjs +1 -1
  152. package/components/text/index.esm.js +73 -217
  153. package/components/text/index.umd.cjs +1 -1
  154. package/components/time-picker/index.esm.js +380 -375
  155. package/components/time-picker/index.umd.cjs +1 -1
  156. package/components/tooltip/index.esm.js +40 -40
  157. package/components/tooltip/index.umd.cjs +1 -1
  158. package/components/transfer/index.esm.js +551 -771
  159. package/components/transfer/index.umd.cjs +6 -8
  160. package/components/tree-grid/index.esm.js +250 -235
  161. package/components/tree-grid/index.umd.cjs +1 -1
  162. package/components/tree-view/index.esm.js +157 -314
  163. package/components/tree-view/index.umd.cjs +1 -1
  164. package/components/uploader/index.esm.js +634 -1125
  165. package/components/uploader/index.umd.cjs +2 -2
  166. package/components/verify-detail/index.esm.js +106 -359
  167. package/components/verify-detail/index.umd.cjs +1 -1
  168. package/components/video/index.esm.js +89 -222
  169. package/components/video/index.umd.cjs +1 -1
  170. package/components/weather/index.esm.js +199 -290
  171. package/components/weather/index.umd.cjs +1 -1
  172. package/designer/accordion/index.esm.js +257 -0
  173. package/designer/accordion/index.umd.cjs +1 -0
  174. package/designer/avatar/index.esm.js +227 -0
  175. package/designer/avatar/index.umd.cjs +1 -0
  176. package/designer/binding-selector/index.esm.js +792 -0
  177. package/designer/binding-selector/index.umd.cjs +1 -0
  178. package/designer/button-edit/index.esm.js +210 -203
  179. package/designer/button-edit/index.umd.cjs +1 -1
  180. package/designer/button-group/index.esm.js +282 -0
  181. package/designer/button-group/index.umd.cjs +1 -0
  182. package/designer/checkbox/index.esm.js +51 -45
  183. package/designer/checkbox/index.umd.cjs +1 -1
  184. package/designer/checkbox-group/index.esm.js +89 -83
  185. package/designer/checkbox-group/index.umd.cjs +1 -1
  186. package/designer/code-editor/index.esm.js +75 -0
  187. package/designer/code-editor/index.umd.cjs +1 -0
  188. package/designer/color-picker/index.esm.js +1096 -0
  189. package/designer/color-picker/index.umd.cjs +1 -0
  190. package/designer/combo-list/index.esm.js +1095 -0
  191. package/designer/combo-list/index.umd.cjs +1 -0
  192. package/designer/combo-tree/index.esm.js +186 -0
  193. package/designer/combo-tree/index.umd.cjs +1 -0
  194. package/designer/component/index.css +1 -0
  195. package/designer/component/index.esm.js +5002 -0
  196. package/designer/component/index.umd.cjs +1 -0
  197. package/designer/condition/index.esm.js +1899 -0
  198. package/designer/condition/index.umd.cjs +1 -0
  199. package/designer/data-grid/index.esm.js +5580 -6213
  200. package/designer/data-grid/index.umd.cjs +10 -17
  201. package/designer/data-view/index.esm.js +212 -191
  202. package/designer/data-view/index.umd.cjs +2 -2
  203. package/designer/date-picker/index.esm.js +621 -607
  204. package/designer/date-picker/index.umd.cjs +1 -1
  205. package/designer/drawer/index.css +1 -1
  206. package/designer/drawer/index.esm.js +869 -620
  207. package/designer/drawer/index.umd.cjs +2 -2
  208. package/designer/dropdown/index.esm.js +261 -0
  209. package/designer/dropdown/index.umd.cjs +1 -0
  210. package/designer/dynamic-form/index.esm.js +1166 -1384
  211. package/designer/dynamic-form/index.umd.cjs +1 -8
  212. package/designer/expression-editor/index.css +1 -0
  213. package/designer/expression-editor/index.esm.js +7006 -0
  214. package/designer/expression-editor/index.umd.cjs +427 -0
  215. package/designer/farris-designer.all.esm.js +10309 -10617
  216. package/designer/farris-designer.all.umd.cjs +17 -19
  217. package/designer/filter-condition-editor/index.css +1 -0
  218. package/designer/filter-condition-editor/index.esm.js +4795 -0
  219. package/designer/filter-condition-editor/index.umd.cjs +1 -0
  220. package/designer/html-template/index.esm.js +718 -0
  221. package/designer/html-template/index.umd.cjs +1 -0
  222. package/designer/image-cropper/index.esm.js +765 -0
  223. package/designer/image-cropper/index.umd.cjs +1 -0
  224. package/designer/index.css +1 -1
  225. package/designer/input-group/index.esm.js +72 -66
  226. package/designer/input-group/index.umd.cjs +1 -1
  227. package/designer/json-editor/index.esm.js +83 -0
  228. package/designer/json-editor/index.umd.cjs +1 -0
  229. package/designer/language-textbox/index.esm.js +783 -0
  230. package/designer/language-textbox/index.umd.cjs +8 -0
  231. package/designer/layout/index.esm.js +430 -0
  232. package/designer/layout/index.umd.cjs +1 -0
  233. package/designer/list-nav/index.esm.js +802 -0
  234. package/designer/list-nav/index.umd.cjs +1 -0
  235. package/designer/list-view/index.esm.js +864 -844
  236. package/designer/list-view/index.umd.cjs +7 -9
  237. package/designer/lookup/index.esm.js +2083 -0
  238. package/designer/lookup/index.umd.cjs +1 -0
  239. package/designer/menu-lookup/index.esm.js +46 -0
  240. package/designer/menu-lookup/index.umd.cjs +1 -0
  241. package/designer/modal/index.esm.js +137 -29
  242. package/designer/modal/index.umd.cjs +1 -1
  243. package/designer/nav/index.esm.js +284 -0
  244. package/designer/nav/index.umd.cjs +1 -0
  245. package/designer/number-range/index.esm.js +1616 -0
  246. package/designer/number-range/index.umd.cjs +1 -0
  247. package/designer/number-spinner/index.esm.js +19 -17
  248. package/designer/number-spinner/index.umd.cjs +1 -1
  249. package/designer/order/index.css +1 -0
  250. package/designer/order/index.esm.js +2196 -0
  251. package/designer/order/index.umd.cjs +18 -0
  252. package/designer/page-footer/index.esm.js +290 -0
  253. package/designer/page-footer/index.umd.cjs +1 -0
  254. package/designer/page-header/index.esm.js +1003 -0
  255. package/designer/page-header/index.umd.cjs +1 -0
  256. package/designer/pagination/index.esm.js +591 -0
  257. package/designer/pagination/index.umd.cjs +1 -0
  258. package/designer/progress/index.esm.js +213 -0
  259. package/designer/progress/index.umd.cjs +1 -0
  260. package/designer/radio-group/index.esm.js +978 -949
  261. package/designer/radio-group/index.umd.cjs +1 -1
  262. package/designer/response-layout-editor/index.esm.js +1 -1
  263. package/designer/response-layout-editor/index.umd.cjs +1 -1
  264. package/designer/response-toolbar/index.esm.js +1471 -1416
  265. package/designer/response-toolbar/index.umd.cjs +1 -1
  266. package/designer/search-box/index.esm.js +245 -0
  267. package/designer/search-box/index.umd.cjs +1 -0
  268. package/designer/section/index.esm.js +83 -78
  269. package/designer/section/index.umd.cjs +1 -1
  270. package/designer/smoke-detector/index.css +1 -0
  271. package/designer/smoke-detector/index.esm.js +178 -0
  272. package/designer/smoke-detector/index.umd.cjs +1 -0
  273. package/designer/sort-condition-editor/index.esm.js +138 -0
  274. package/designer/sort-condition-editor/index.umd.cjs +1 -0
  275. package/designer/splitter/index.esm.js +1120 -0
  276. package/designer/splitter/index.umd.cjs +1 -0
  277. package/designer/step/index.esm.js +226 -0
  278. package/designer/step/index.umd.cjs +1 -0
  279. package/designer/switch/index.esm.js +10 -10
  280. package/designer/switch/index.umd.cjs +1 -1
  281. package/designer/tabs/index.css +1 -1
  282. package/designer/tabs/index.esm.js +2447 -2698
  283. package/designer/tabs/index.umd.cjs +2 -2
  284. package/designer/text/index.esm.js +147 -0
  285. package/designer/text/index.umd.cjs +1 -0
  286. package/designer/time-picker/index.esm.js +101 -100
  287. package/designer/time-picker/index.umd.cjs +1 -1
  288. package/designer/transfer/index.esm.js +254 -0
  289. package/designer/transfer/index.umd.cjs +1 -0
  290. package/designer/tree-grid/index.esm.js +473 -810
  291. package/designer/tree-grid/index.umd.cjs +1 -1
  292. package/designer/tree-view/index.esm.js +313 -0
  293. package/designer/tree-view/index.umd.cjs +1 -0
  294. package/designer/uploader/index.esm.js +1190 -0
  295. package/designer/uploader/index.umd.cjs +2 -0
  296. package/designer/verify-detail/index.esm.js +258 -0
  297. package/designer/verify-detail/index.umd.cjs +1 -0
  298. package/designer/video/index.esm.js +136 -0
  299. package/designer/video/index.umd.cjs +1 -0
  300. package/designer/weather/index.css +1 -0
  301. package/designer/weather/index.esm.js +6244 -0
  302. package/designer/weather/index.umd.cjs +14 -0
  303. package/farris.all.esm.js +69941 -70514
  304. package/farris.all.umd.cjs +117 -117
  305. package/index.css +1 -1
  306. package/locales/filter-bar/ui/en.json +2 -1
  307. package/locales/filter-bar/ui/zh-CHS.json +2 -1
  308. package/locales/filter-bar/ui/zh-CHT.json +2 -1
  309. package/locales/query-solution/ui/en.json +1 -1
  310. package/locales/query-solution/ui/zh-CHS.json +1 -1
  311. package/locales/query-solution/ui/zh-CHT.json +1 -1
  312. package/locales/ui/en.json +3 -2
  313. package/locales/ui/zh-CHS.json +3 -2
  314. package/locales/ui/zh-CHT.json +3 -2
  315. package/package.json +1 -1
  316. package/types/accordion/designer.d.ts +44 -0
  317. package/types/accordion/src/accordion.props.d.ts +0 -1
  318. package/types/accordion/src/components/accordion-item.props.d.ts +0 -1
  319. package/types/avatar/designer.d.ts +29 -0
  320. package/types/avatar/src/avatar.props.d.ts +0 -1
  321. package/types/avatar/src/property-config/avatar.property-config.d.ts +1 -1
  322. package/types/{expression-editor/index.d.ts → binding-selector/designer.d.ts} +6 -6
  323. package/types/binding-selector/index.d.ts +0 -54
  324. package/types/binding-selector/src/binding-selector.props.d.ts +0 -1
  325. package/types/button-group/designer.d.ts +29 -0
  326. package/types/button-group/index.d.ts +15 -0
  327. package/types/button-group/src/button-group.props.d.ts +0 -1
  328. package/types/calendar/src/calendar.props.d.ts +1 -0
  329. package/types/calendar/src/components/month/month-view.component.d.ts +6 -6
  330. package/types/calendar/src/composition/use-calendar-events.d.ts +1 -1
  331. package/types/calendar/src/composition/use-locales.d.ts +1 -0
  332. package/types/calendar/src/property-config/calendar.property-config.d.ts +2 -0
  333. package/types/capsule/src/capsule-item.component.d.ts +6 -6
  334. package/types/checkbox/designer.d.ts +2 -0
  335. package/types/checkbox-group/designer.d.ts +2 -0
  336. package/types/code-editor/designer.d.ts +5 -0
  337. package/types/code-editor/index.d.ts +0 -1
  338. package/types/code-editor/src/code-textbox.component.d.ts +6 -6
  339. package/types/code-editor/src/code-textbox.props.d.ts +0 -2
  340. package/types/color-picker/designer.d.ts +29 -0
  341. package/types/color-picker/index.d.ts +0 -15
  342. package/types/color-picker/src/color-picker.props.d.ts +0 -1
  343. package/types/combo-list/designer.d.ts +29 -0
  344. package/types/combo-list/src/combo-list.props.d.ts +1 -0
  345. package/types/combo-list/src/designer/combo-list.design.props.d.ts +6 -0
  346. package/types/combo-tree/designer.d.ts +5 -0
  347. package/types/combo-tree/src/combo-tree.props.d.ts +0 -1
  348. package/types/combo-tree/src/components/tree-container.component.d.ts +7 -7
  349. package/types/comment/src/comment.props.d.ts +4 -0
  350. package/types/comment/src/designer/comment.design.props.d.ts +4 -0
  351. package/types/common/index.d.ts +1 -0
  352. package/types/common/utils/use-mobile.d.ts +1 -0
  353. package/types/component/designer.d.ts +35 -0
  354. package/types/component/index.d.ts +0 -2
  355. package/types/component/src/component.props.d.ts +0 -8
  356. package/types/component/src/composition/field-tree-builder.d.ts +1 -0
  357. package/types/components.d.ts +2 -6
  358. package/types/condition/designer.d.ts +56 -0
  359. package/types/condition/index.d.ts +0 -55
  360. package/types/content-container/index.d.ts +3 -2
  361. package/types/content-container/src/content-container.props.d.ts +1 -0
  362. package/types/data-grid/designer.d.ts +2 -0
  363. package/types/data-grid/index.d.ts +5 -2
  364. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  365. package/types/data-grid/src/designer/grid-field-editor.props.d.ts +1 -0
  366. package/types/data-view/composition/types.d.ts +7 -1
  367. package/types/data-view/composition/use-mobile.d.ts +3 -0
  368. package/types/data-view/designer/property-config/use-command-option.d.ts +11 -0
  369. package/types/data-view/index.d.ts +1 -0
  370. package/types/designer-canvas/src/composition/designer-canvas-changed.d.ts +3 -3
  371. package/types/designer-canvas/src/composition/dg-control.d.ts +8 -0
  372. package/types/designer-outline/src/designer-outline.component.d.ts +3 -3
  373. package/types/designer-outline/src/types.d.ts +5 -1
  374. package/types/drawer/designer.d.ts +12 -0
  375. package/types/drawer/src/designer/drawer-toolbar.design.props.d.ts +12 -0
  376. package/types/drawer/src/designer/drawer.design.component.d.ts +8 -0
  377. package/types/drawer/src/designer/drawer.design.props.d.ts +4 -0
  378. package/types/drawer/src/schema/schema-mapper.d.ts +1 -0
  379. package/types/drawer/src/schema/schema-resolver.d.ts +1 -0
  380. package/types/dropdown/designer.d.ts +6 -0
  381. package/types/dropdown/index.d.ts +27 -6
  382. package/types/dropdown/src/dropdown.item.component.d.ts +2 -2
  383. package/types/dropdown/src/dropdown.props.d.ts +0 -1
  384. package/types/dynamic-form/designer.d.ts +3 -1
  385. package/types/dynamic-form/index.d.ts +4 -3
  386. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +6 -6
  387. package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +11 -0
  388. package/types/dynamic-resolver/index.d.ts +3 -0
  389. package/types/dynamic-resolver/src/props-resolver.d.ts +2 -0
  390. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
  391. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
  392. package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
  393. package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
  394. package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
  395. package/types/dynamic-view/src/components/maps.d.ts +883 -1
  396. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  397. package/types/dynamic-view/src/types.d.ts +4 -0
  398. package/types/expression-editor/designer.d.ts +9 -0
  399. package/types/field-selector/index.d.ts +2 -1
  400. package/types/fieldset/index.d.ts +3 -2
  401. package/types/fieldset/src/fieldset.props.d.ts +1 -0
  402. package/types/filter-bar/src/composition/types.d.ts +1 -1
  403. package/types/filter-bar/src/composition/use-size.d.ts +2 -2
  404. package/types/filter-bar/src/locale/locale.d.ts +1 -0
  405. package/types/filter-condition-editor/designer.d.ts +10 -0
  406. package/types/filter-condition-editor/index.d.ts +0 -9
  407. package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
  408. package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
  409. package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +0 -1
  410. package/types/html-template/designer.d.ts +31 -0
  411. package/types/html-template/src/designer/html-template.design.props.d.ts +9 -0
  412. package/types/html-template/src/html-template.props.d.ts +2 -0
  413. package/types/image-cropper/designer.d.ts +4 -0
  414. package/types/image-cropper/src/image-cropper.props.d.ts +0 -1
  415. package/types/index.d.ts +0 -1
  416. package/types/input-group/designer.d.ts +2 -0
  417. package/types/json-editor/designer.d.ts +5 -0
  418. package/types/json-editor/src/components/editable-combo/editable-combo.component.d.ts +3 -3
  419. package/types/json-editor/src/components/editable-combo/popup-container.component.d.ts +3 -3
  420. package/types/json-editor/src/json-editor.props.d.ts +0 -1
  421. package/types/language-textbox/index.d.ts +6 -6
  422. package/types/language-textbox/src/language-textbox.component.d.ts +2 -2
  423. package/types/language-textbox/src/language-textbox.props.d.ts +1 -0
  424. package/types/layout/index.d.ts +1 -0
  425. package/types/layout/src/components/layout-pane.props.d.ts +0 -1
  426. package/types/layout/src/layout.props.d.ts +0 -1
  427. package/types/list-nav/index.d.ts +24 -5
  428. package/types/list-nav/src/list-nav.props.d.ts +0 -1
  429. package/types/list-view/index.d.ts +1 -0
  430. package/types/list-view/src/composition/use-draggable.d.ts +1 -1
  431. package/types/list-view/src/designer/list-view.design.props.d.ts +1 -0
  432. package/types/list-view/src/list-view-table.props.d.ts +1 -0
  433. package/types/loading/index.d.ts +6 -6
  434. package/types/loading/src/loading.component.d.ts +3 -3
  435. package/types/lookup/index.d.ts +1 -1
  436. package/types/lookup/src/components/popup-container.component.d.ts +6 -6
  437. package/types/lookup/src/lookup.props.d.ts +1 -0
  438. package/types/lookup/src/property-config/external-lookup.property-config.d.ts +1 -0
  439. package/types/lookup/src/property-config/lookup.property-config.d.ts +1 -0
  440. package/types/menu-lookup/designer.d.ts +5 -0
  441. package/types/menu-lookup/src/menu-lookup.props.d.ts +0 -1
  442. package/types/message-box/index.d.ts +6 -6
  443. package/types/message-box/src/message-box.component.d.ts +3 -3
  444. package/types/modal/designer.d.ts +2 -0
  445. package/types/modal/index.d.ts +30 -24
  446. package/types/modal/src/modal.component.d.ts +15 -12
  447. package/types/modal/src/modal.props.d.ts +4 -0
  448. package/types/nav/designer.d.ts +6 -0
  449. package/types/nav/index.d.ts +24 -20
  450. package/types/nav/src/nav.props.d.ts +0 -1
  451. package/types/notify/index.d.ts +3 -3
  452. package/types/notify/src/notify.component.d.ts +2 -2
  453. package/types/number-range/designer.d.ts +29 -0
  454. package/types/number-range/src/number-range.props.d.ts +0 -1
  455. package/types/number-spinner/src/composition/types.d.ts +1 -0
  456. package/types/order/designer.d.ts +6 -0
  457. package/types/order/index.d.ts +36 -5
  458. package/types/order/src/designer/order.design.component.d.ts +1 -1
  459. package/types/order/src/order.props.d.ts +0 -1
  460. package/types/page-footer/designer.d.ts +6 -0
  461. package/types/page-footer/index.d.ts +0 -2
  462. package/types/page-footer/src/page-footer.props.d.ts +0 -1
  463. package/types/page-header/index.d.ts +3 -2
  464. package/types/page-header/src/designer/page-header.design.props.d.ts +20 -0
  465. package/types/page-header/src/page-header.props.d.ts +2 -0
  466. package/types/pagination/designer.d.ts +29 -0
  467. package/types/pagination/index.d.ts +15 -0
  468. package/types/pagination/src/pagination.props.d.ts +0 -1
  469. package/types/popover/index.d.ts +3 -3
  470. package/types/popover/src/composition/use-resize.d.ts +1 -1
  471. package/types/popover/src/popover.component.d.ts +2 -2
  472. package/types/progress/designer.d.ts +29 -0
  473. package/types/progress/src/progress.props.d.ts +0 -1
  474. package/types/property-panel/src/property-panel.component.d.ts +3 -3
  475. package/types/query-solution/index.d.ts +4 -4
  476. package/types/query-solution/src/composition/types.d.ts +8 -2
  477. package/types/query-solution/src/composition/use-header.d.ts +2 -2
  478. package/types/query-solution/src/composition/use-solution-utils.d.ts +1 -1
  479. package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
  480. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -0
  481. package/types/query-solution/src/designer/solution-preset-config/solution-preset.props.d.ts +1 -0
  482. package/types/query-solution/src/query-solution.props.d.ts +1 -0
  483. package/types/radio-group/designer.d.ts +4 -1
  484. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +1 -0
  485. package/types/response-layout/index.d.ts +3 -2
  486. package/types/response-layout/src/component/response-layout-item.props.d.ts +1 -0
  487. package/types/response-layout/src/property-config/response-layout-splitter/response-layout-splitter.props.d.ts +1 -0
  488. package/types/response-layout/src/response-layout.props.d.ts +1 -0
  489. package/types/response-toolbar/designer.d.ts +2 -1
  490. package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +1 -0
  491. package/types/search-box/designer.d.ts +52 -0
  492. package/types/search-box/index.d.ts +1 -17
  493. package/types/search-box/src/components/search-box-container.component.d.ts +3 -3
  494. package/types/search-box/src/search-box.props.d.ts +0 -1
  495. package/types/section/designer.d.ts +1 -0
  496. package/types/smoke-detector/designer.d.ts +6 -0
  497. package/types/smoke-detector/index.d.ts +0 -2
  498. package/types/smoke-detector/src/smoke-detector.props.d.ts +0 -1
  499. package/types/sort-condition-editor/designer.d.ts +9 -0
  500. package/types/sort-condition-editor/index.d.ts +2 -7
  501. package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +0 -1
  502. package/types/splitter/designer.d.ts +32 -0
  503. package/types/splitter/index.d.ts +1 -0
  504. package/types/splitter/src/components/splitter-pane.props.d.ts +0 -1
  505. package/types/splitter/src/splitter.props.d.ts +0 -1
  506. package/types/step/designer.d.ts +6 -0
  507. package/types/tabs/designer.d.ts +1 -0
  508. package/types/tabs/index.d.ts +0 -1
  509. package/types/tabs/src/composition/types.d.ts +1 -0
  510. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +1 -0
  511. package/types/tags/index.d.ts +3 -3
  512. package/types/tags/src/tags.component.d.ts +1 -1
  513. package/types/text/designer.d.ts +6 -0
  514. package/types/text/index.d.ts +24 -20
  515. package/types/text/src/text.props.d.ts +0 -1
  516. package/types/time-picker/src/components/time.component.d.ts +3 -3
  517. package/types/transfer/designer.d.ts +35 -0
  518. package/types/transfer/src/transfer.props.d.ts +0 -1
  519. package/types/tree-view/designer.d.ts +29 -0
  520. package/types/tree-view/src/tree-view.props.d.ts +0 -1
  521. package/types/uploader/designer.d.ts +141 -0
  522. package/types/uploader/index.d.ts +6 -6
  523. package/types/uploader/src/components/upload-progress.component.d.ts +3 -3
  524. package/types/uploader/src/uploader.component.d.ts +3 -3
  525. package/types/uploader/src/uploader.props.d.ts +0 -1
  526. package/types/verify-detail/designer.d.ts +6 -0
  527. package/types/verify-detail/index.d.ts +58 -5
  528. package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
  529. package/types/verify-detail/src/verify-detail.props.d.ts +0 -1
  530. package/types/video/designer.d.ts +6 -0
  531. package/types/video/index.d.ts +24 -20
  532. package/types/video/src/video.props.d.ts +0 -1
  533. package/components/sort-condition-editor/index.css +0 -1
  534. package/package.zip +0 -0
  535. package/types/designer-toolbox/index.d.ts +0 -3
  536. package/types/designer-toolbox/src/toolbox.component.d.ts +0 -14
  537. package/types/designer-toolbox/src/toolbox.props.d.ts +0 -29
  538. package/types/designer-toolbox/src/types.d.ts +0 -21
  539. package/types/designer.d.ts +0 -13
  540. package/types/flow-canvas/index.d.ts +0 -3
  541. package/types/flow-canvas/src/components/flow-node-item.component.d.ts +0 -8
  542. package/types/flow-canvas/src/components/flow-node-item.props.d.ts +0 -3
  543. package/types/flow-canvas/src/composition/types.d.ts +0 -42
  544. package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +0 -2
  545. package/types/flow-canvas/src/composition/use-connections.d.ts +0 -2
  546. package/types/flow-canvas/src/composition/use-curve.d.ts +0 -4
  547. package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +0 -2
  548. package/types/flow-canvas/src/composition/use-drawing.d.ts +0 -4
  549. package/types/flow-canvas/src/flow-canvas.component.d.ts +0 -8
  550. package/types/flow-canvas/src/flow-canvas.props.d.ts +0 -3
  551. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +0 -2
  552. package/types/layout/src/designer/layout-pane.design.component.d.ts +0 -8
  553. package/types/layout/src/designer/layout-use-designer-rules.d.ts +0 -2
  554. package/types/layout/src/designer/layout.design.component.d.ts +0 -8
  555. package/types/layout/src/schema/schema-mapper.d.ts +0 -2
  556. package/types/layout/src/schema/schema-resolver.d.ts +0 -2
  557. package/types/list-nav/src/designer/use-designer-rules.d.ts +0 -2
  558. package/types/list-nav/src/property-config/list-nav.property-config.d.ts +0 -8
  559. package/types/list-nav/src/schema/schema-mapper.d.ts +0 -2
  560. package/types/list-nav/src/schema/schema-resolver.d.ts +0 -2
  561. /package/{components → designer}/condition/index.css +0 -0
  562. /package/{components → designer}/uploader/index.css +0 -0
  563. /package/types/{list-nav/src/designer/list-nav.design.component.d.ts → dynamic-form/src/component/form-control/form-control.component.d.ts} +0 -0
@@ -1,92 +1,11 @@
1
- var Ae = Object.defineProperty;
2
- var $e = (e, t, r) => t in e ? Ae(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var I = (e, t, r) => $e(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { ref as M, computed as W, watch as Y, defineComponent as _, onBeforeUnmount as ke, withDirectives as ce, createVNode as O, resolveDirective as de, createTextVNode as Re, mergeProps as me, inject as K, onMounted as we } from "vue";
5
- import { FDynamicFormGroup as Ue, dynamicFormGroupProps as ze, FDynamicFormLabel as We } from "../dynamic-form/index.esm.js";
6
- import { cloneDeep as te, isPlainObject as ve } from "lodash-es";
7
- import { useDateFormat as xe, resolveField as Ze, useNumberFormat as Je, useThirdComponent as Ve, useTextBoxDesign as _e, areaResponseDirective as Qe } from "../common/index.esm.js";
8
- import { LocaleService as re } from "../locale/index.esm.js";
9
- import Xe from "../accordion/index.esm.js";
10
- import Ye from "../avatar/index.esm.js";
11
- import He from "../../designer/button-edit/index.esm.js";
12
- import De from "../button-group/index.esm.js";
13
- import Ke from "../calendar/index.esm.js";
14
- import et from "../../designer/capsule/index.esm.js";
15
- import he from "../../designer/checkbox/index.esm.js";
16
- import ye from "../../designer/checkbox-group/index.esm.js";
17
- import le from "../combo-list/index.esm.js";
18
- import tt from "../combo-tree/index.esm.js";
19
- import rt from "../component/index.esm.js";
20
- import nt from "../color-picker/index.esm.js";
21
- import ot from "../content-container/index.esm.js";
22
- import it from "../../designer/date-picker/index.esm.js";
23
- import at from "../../designer/data-grid/index.esm.js";
24
- import lt from "../dropdown/index.esm.js";
25
- import st from "../../designer/dynamic-form/index.esm.js";
26
- import ut from "../events-editor/index.esm.js";
27
- import ct from "../filter-bar/index.esm.js";
28
- import dt from "../field-selector/index.esm.js";
29
- import mt from "../binding-selector/index.esm.js";
30
- import pt from "../image-cropper/index.esm.js";
31
- import ft from "../../designer/input-group/index.esm.js";
32
- import gt from "../layout/index.esm.js";
33
- import vt from "../list-nav/index.esm.js";
34
- import ht from "../../designer/list-view/index.esm.js";
35
- import yt from "../lookup/index.esm.js";
36
- import bt from "../mapping-editor/index.esm.js";
37
- import Ft from "../nav/index.esm.js";
38
- import Ct from "../number-range/index.esm.js";
39
- import Tt from "../../designer/number-spinner/index.esm.js";
40
- import kt from "../order/index.esm.js";
41
- import wt from "../page-header/index.esm.js";
42
- import xt from "../page-footer/index.esm.js";
43
- import Vt from "../pagination/index.esm.js";
44
- import St from "../progress/index.esm.js";
45
- import Et from "../query-solution/index.esm.js";
46
- import It from "../../designer/radio-group/index.esm.js";
47
- import Lt from "../../designer/rate/index.esm.js";
48
- import Pt from "../../designer/response-toolbar/index.esm.js";
49
- import Ot from "../response-layout/index.esm.js";
50
- import Bt from "../../designer/response-layout-editor/index.esm.js";
51
- import Mt from "../search-box/index.esm.js";
52
- import Nt from "../../designer/section/index.esm.js";
53
- import jt from "../smoke-detector/index.esm.js";
54
- import Gt from "../splitter/index.esm.js";
55
- import qt from "../step/index.esm.js";
56
- import At from "../../designer/switch/index.esm.js";
57
- import $t from "../../designer/tabs/index.esm.js";
58
- import Rt from "../../designer/tags/index.esm.js";
59
- import Ut from "../text/index.esm.js";
60
- import zt from "../../designer/time-picker/index.esm.js";
61
- import Wt from "../transfer/index.esm.js";
62
- import Zt from "../tree-view/index.esm.js";
63
- import Jt from "../uploader/index.esm.js";
64
- import _t from "../verify-detail/index.esm.js";
65
- import Qt from "../video/index.esm.js";
66
- import Xt from "../../designer/textarea/index.esm.js";
67
- import Yt from "../schema-selector/index.esm.js";
68
- import Ht from "../../designer/tree-grid/index.esm.js";
69
- import Dt from "../event-parameter/index.esm.js";
70
- import Kt from "../filter-condition-editor/index.esm.js";
71
- import er from "../fieldset/index.esm.js";
72
- import tr from "../sort-condition-editor/index.esm.js";
73
- import rr from "../menu-lookup/index.esm.js";
74
- import nr from "../../designer/drawer/index.esm.js";
75
- import or from "../json-editor/index.esm.js";
76
- import ir from "../property-editor/index.esm.js";
77
- import ar from "../expression-editor/index.esm.js";
78
- import lr from "../code-editor/index.esm.js";
79
- import sr from "../html-template/index.esm.js";
80
- import ur from "../collection-property-editor/index.esm.js";
81
- import cr from "../../designer/modal/index.esm.js";
82
- import dr from "../external-container/index.esm.js";
83
- import mr from "../language-textbox/index.esm.js";
84
- import pr from "../image/index.esm.js";
85
- import fr from "../comment/index.esm.js";
86
- import { createPropsResolver as gr, propertyConfigSchemaMapForDesigner as vr } from "../dynamic-resolver/index.esm.js";
87
- import { useDesignerComponent as Se, DgControl as y } from "../designer-canvas/index.esm.js";
88
- import { InputBaseProperty as hr } from "../property-panel/index.esm.js";
89
- const pe = {
1
+ var Z = Object.defineProperty;
2
+ var z = (r, e, t) => e in r ? Z(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var n = (r, e, t) => z(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { cloneDeep as j } from "lodash-es";
5
+ import { useDateFormat as A, resolveField as H, useNumberFormat as K } from "../common/index.esm.js";
6
+ import { LocaleService as W } from "../locale/index.esm.js";
7
+ import { ref as X } from "vue";
8
+ const Te = {
90
9
  conditions: { type: Array, default: [] },
91
10
  fields: { type: Array, default: [] },
92
11
  key: { type: String, default: "" },
@@ -96,98 +15,99 @@ const pe = {
96
15
  isControlInline: {
97
16
  type: [Boolean, String],
98
17
  default: "auto",
99
- validator: (e) => [!0, !1, "auto"].includes(e)
18
+ validator: (r) => [!0, !1, "auto"].includes(r)
100
19
  },
101
20
  /**
102
21
  * 条件项统一的样式
103
22
  */
104
23
  itemClass: { type: Boolean, default: "col-12 col-md-6 col-xl-3 col-el-2" }
105
24
  };
106
- class yr {
107
- constructor(t = { value: [] }, r) {
108
- I(this, "editorType", "check-box");
109
- I(this, "value");
110
- I(this, "valueType", "boolean");
25
+ var _ = /* @__PURE__ */ ((r) => (r[r.IntType = 0] = "IntType", r[r.StringType = 1] = "StringType", r[r.BoolType = 2] = "BoolType", r))(_ || {}), P = /* @__PURE__ */ ((r) => (r[r.Value = 0] = "Value", r[r.SmartHelp = 1] = "SmartHelp", r[r.Enum = 2] = "Enum", r[r.Express = 3] = "Express", r))(P || {});
26
+ class $ {
27
+ constructor(e = { value: [] }, t) {
28
+ n(this, "editorType", "check-box");
29
+ n(this, "value");
30
+ n(this, "valueType", "boolean");
111
31
  // 编辑器配置
112
- I(this, "editiorConfig");
113
- const o = (Array.isArray(t.value) ? t.value : typeof t.value == "string" ? t.value.split(",") : []).map((m) => JSON.parse(m));
114
- this.value = o, this.editiorConfig = Object.assign({}, r);
32
+ n(this, "editiorConfig");
33
+ const f = (Array.isArray(e.value) ? e.value : typeof e.value == "string" ? e.value.split(",") : []).map((b) => JSON.parse(b));
34
+ this.value = f, this.editiorConfig = Object.assign({}, t);
115
35
  }
116
36
  clear() {
117
37
  this.value = [];
118
38
  }
119
- setValue(t) {
120
- this.value = t;
39
+ setValue(e) {
40
+ this.value = e;
121
41
  }
122
42
  getValue() {
123
43
  return this.value;
124
44
  }
125
45
  getDisplayText() {
126
- return this.value.map((t) => t ? "是" : "否").join(",");
46
+ return this.value.map((e) => e ? "是" : "否").join(",");
127
47
  }
128
48
  isEmpty() {
129
49
  return this.value.length === 0;
130
50
  }
131
51
  }
132
- class br {
133
- constructor(t = { textValue: "", value: "", valueField: "" }, r) {
134
- I(this, "editorType", "combo-lookup");
135
- I(this, "textValue");
136
- I(this, "value");
137
- I(this, "valueField");
138
- I(this, "valueType", "text");
52
+ class D {
53
+ constructor(e = { textValue: "", value: "", valueField: "" }, t) {
54
+ n(this, "editorType", "combo-lookup");
55
+ n(this, "textValue");
56
+ n(this, "value");
57
+ n(this, "valueField");
58
+ n(this, "valueType", "text");
139
59
  // 编辑器配置
140
- I(this, "editiorConfig");
141
- this.textValue = t == null ? void 0 : t.textValue, this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.valueField = t == null ? void 0 : t.valueField;
60
+ n(this, "editiorConfig");
61
+ this.textValue = e == null ? void 0 : e.textValue, this.value = e == null ? void 0 : e.value, this.editiorConfig = Object.assign({}, t), this.valueField = e == null ? void 0 : e.valueField;
142
62
  }
143
63
  clear() {
144
64
  this.value = "", this.valueField = "", this.textValue = "";
145
65
  }
146
- getPropValue(t, r) {
147
- if (r.length > 1) {
148
- const n = r.shift();
149
- return t[n] ? this.getPropValue(t[n], r) : null;
66
+ getPropValue(e, t) {
67
+ if (t.length > 1) {
68
+ const o = t.shift();
69
+ return e[o] ? this.getPropValue(e[o], t) : null;
150
70
  }
151
- return t[r[0]];
71
+ return e[t[0]];
152
72
  }
153
- getTextValue(t) {
154
- const r = t.split("."), n = this.value.split(",").map((o) => this.getPropValue(o, te(r)));
155
- return n && n.length ? n.join(",") : "";
73
+ getTextValue(e) {
74
+ const t = e.split("."), o = this.value.split(",").map((f) => this.getPropValue(f, j(t)));
75
+ return o && o.length ? o.join(",") : "";
156
76
  }
157
77
  getValue() {
158
- const t = this.valueField.split("."), r = this.value.split(",").map((n) => this.getPropValue(n, te(t)));
159
- return r && r.length ? r.join(",") : "";
78
+ const e = this.valueField.split("."), t = this.value.split(",").map((o) => this.getPropValue(o, j(e)));
79
+ return t && t.length ? t.join(",") : "";
160
80
  }
161
81
  getDisplayText() {
162
82
  return this.getValue();
163
83
  }
164
- setValue(t) {
84
+ setValue(e) {
165
85
  throw new Error("Method not implemented.");
166
86
  }
167
87
  isEmpty() {
168
88
  return !this.valueField;
169
89
  }
170
90
  }
171
- class oe {
172
- constructor(t = { value: "", displayFormat: "", valueFormat: "" }, r) {
173
- I(this, "editorType", "date-picker");
174
- I(this, "value");
175
- I(this, "valueType", "datetime");
176
- I(this, "displayFormat", "");
177
- I(this, "valueFormat", "");
91
+ class S {
92
+ constructor(e = { value: "", displayFormat: "", valueFormat: "" }, t) {
93
+ n(this, "editorType", "date-picker");
94
+ n(this, "value");
95
+ n(this, "valueType", "datetime");
96
+ n(this, "displayFormat", "");
97
+ n(this, "valueFormat", "");
178
98
  // 编辑器配置
179
- I(this, "editiorConfig");
180
- this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (r == null ? void 0 : r.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (r == null ? void 0 : r.valueFormat) || "";
99
+ n(this, "editiorConfig");
100
+ this.value = e == null ? void 0 : e.value, this.editiorConfig = Object.assign({}, t), this.displayFormat = (e == null ? void 0 : e.displayFormat) || (t == null ? void 0 : t.displayFormat) || "", this.valueFormat = (e == null ? void 0 : e.valueFormat) || (t == null ? void 0 : t.valueFormat) || "";
181
101
  }
182
102
  formatValue() {
183
- const { formatTo: t, parseToDate: r } = xe();
103
+ const { formatTo: e, parseToDate: t } = A();
184
104
  if (!this.value)
185
105
  return "";
186
- const n = r(this.value, this.valueFormat);
187
- return t(n, this.displayFormat);
106
+ const o = t(this.value, this.valueFormat);
107
+ return e(o, this.displayFormat);
188
108
  }
189
- setValue(t) {
190
- this.value = t;
109
+ setValue(e) {
110
+ this.value = e;
191
111
  }
192
112
  getValue() {
193
113
  return this.value;
@@ -202,28 +122,28 @@ class oe {
202
122
  this.value = void 0;
203
123
  }
204
124
  }
205
- class fe {
206
- constructor(t = { begin: "", end: "", displayFormat: "", valueFormat: "" }, r = {}) {
207
- I(this, "editorType", "date-range");
208
- I(this, "begin", "");
209
- I(this, "end", "");
210
- I(this, "valueType", "datetime");
211
- I(this, "value", "");
125
+ class N {
126
+ constructor(e = { begin: "", end: "", displayFormat: "", valueFormat: "" }, t = {}) {
127
+ n(this, "editorType", "date-range");
128
+ n(this, "begin", "");
129
+ n(this, "end", "");
130
+ n(this, "valueType", "datetime");
131
+ n(this, "value", "");
212
132
  // 编辑器配置
213
- I(this, "editiorConfig");
214
- I(this, "displayFormat", "");
215
- I(this, "valueFormat", "");
216
- this.begin = (t == null ? void 0 : t.begin) || "", this.end = (t == null ? void 0 : t.end) || "", this.editiorConfig = Object.assign({}, r, { delimiter: "~" }), this.displayFormat = (t == null ? void 0 : t.displayFormat) || (r == null ? void 0 : r.displayFormat) || "", this.valueFormat = (t == null ? void 0 : t.valueFormat) || (r == null ? void 0 : r.valueFormat) || "", this.value = (this.begin === null ? "" : this.begin) + "~" + (this.end === null ? "" : this.end);
133
+ n(this, "editiorConfig");
134
+ n(this, "displayFormat", "");
135
+ n(this, "valueFormat", "");
136
+ this.begin = (e == null ? void 0 : e.begin) || "", this.end = (e == null ? void 0 : e.end) || "", this.editiorConfig = Object.assign({}, t, { delimiter: "~" }), this.displayFormat = (e == null ? void 0 : e.displayFormat) || (t == null ? void 0 : t.displayFormat) || "", this.valueFormat = (e == null ? void 0 : e.valueFormat) || (t == null ? void 0 : t.valueFormat) || "", this.value = (this.begin === null ? "" : this.begin) + "~" + (this.end === null ? "" : this.end);
217
137
  }
218
138
  clear() {
219
139
  this.begin = "", this.end = "", this.value = "";
220
140
  }
221
- formatValue(t) {
222
- const { formatTo: r, parseToDate: n } = xe();
223
- if (!t)
141
+ formatValue(e) {
142
+ const { formatTo: t, parseToDate: o } = A();
143
+ if (!e)
224
144
  return "";
225
- const o = n(t, this.valueFormat);
226
- return r(o, this.displayFormat);
145
+ const f = o(e, this.valueFormat);
146
+ return t(f, this.displayFormat);
227
147
  }
228
148
  getValue() {
229
149
  return {
@@ -235,10 +155,10 @@ class fe {
235
155
  getDisplayText() {
236
156
  return !this.begin && !this.end ? "" : (this.begin === null ? "" : this.formatValue(this.begin)) + "~" + (this.end === null ? "" : this.formatValue(this.end));
237
157
  }
238
- setValue(t) {
239
- if (t) {
240
- const r = t.split(this.editiorConfig.delimiter);
241
- this.begin = r[0] || "", this.end = r[1] || "", this.value = t;
158
+ setValue(e) {
159
+ if (e) {
160
+ const t = e.split(this.editiorConfig.delimiter);
161
+ this.begin = t[0] || "", this.end = t[1] || "", this.value = e;
242
162
  } else
243
163
  this.clear();
244
164
  }
@@ -246,38 +166,45 @@ class fe {
246
166
  return !this.begin && !this.end;
247
167
  }
248
168
  }
249
- class Ee {
250
- constructor(t = { value: "", valueList: [] }, r) {
251
- I(this, "editorType", "combo-list");
252
- I(this, "value");
253
- I(this, "valueType", "enum");
254
- I(this, "valueList", []);
169
+ class ee extends S {
170
+ constructor(t = { value: "", displayFormat: "", valueFormat: "" }, o) {
171
+ super(t, o);
172
+ n(this, "editorType", "datetime-picker");
173
+ }
174
+ }
175
+ class R {
176
+ constructor(e = { value: "", valueList: [] }, t) {
177
+ n(this, "editorType", "combo-list");
178
+ n(this, "value");
179
+ n(this, "valueType", "enum");
180
+ n(this, "valueList", []);
255
181
  // 编辑器配置
256
- I(this, "editiorConfig");
257
- this.value = t == null ? void 0 : t.value, this.editiorConfig = Object.assign({}, r), this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
182
+ n(this, "editiorConfig");
183
+ this.value = e == null ? void 0 : e.value, this.editiorConfig = Object.assign({}, t), this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (e == null ? void 0 : e.valueList) || [];
258
184
  }
259
185
  clear() {
260
- this.value = "";
186
+ const e = typeof this.value;
187
+ this.value = e === "string" ? "" : void 0;
261
188
  }
262
189
  getValue() {
263
190
  return this.value;
264
191
  }
265
192
  getDisplayText() {
266
- var o, m;
267
- const t = typeof this.value;
268
- let r = "", n = [];
269
- switch (t) {
193
+ var f, b;
194
+ const e = typeof this.value;
195
+ let t = "", o = [];
196
+ switch (e) {
270
197
  case "string":
271
- n = this.value.split(",") || [], r = this.valueList.filter((i) => n.indexOf(i.value + "") > -1).map((i) => i.name).join(",");
198
+ o = this.value.split(",") || [], t = this.valueList.filter((l) => o.indexOf(l.value + "") > -1).map((l) => l.name).join(",");
272
199
  break;
273
200
  case "boolean":
274
- r = ((o = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : o.name) || "";
201
+ t = ((f = this.valueList.find((l) => l.value === this.value)) == null ? void 0 : f.name) || "";
275
202
  break;
276
203
  case "number":
277
- r = ((m = this.valueList.find((i) => i.value === this.value)) == null ? void 0 : m.name) || "";
204
+ t = ((b = this.valueList.find((l) => l.value === this.value)) == null ? void 0 : b.name) || "";
278
205
  break;
279
206
  }
280
- return r;
207
+ return t;
281
208
  }
282
209
  // setValue(data: { value: string; displayText: string }) {
283
210
  // // this.displayText = data.dispalyText;
@@ -285,42 +212,42 @@ class Ee {
285
212
  // this.value = enumValues;
286
213
  // return this.displayText;
287
214
  // }
288
- setValue(t) {
289
- this.value = t.value;
215
+ setValue(e) {
216
+ this.value = e.value;
290
217
  }
291
218
  isEmpty() {
292
219
  return !this.value && this.value !== !1 && this.value !== 0;
293
220
  }
294
221
  }
295
- class Fr {
296
- constructor(t = { value: "", displayText: "", displayField: "", isInputText: !1 }, r) {
297
- I(this, "editorType", "input-group");
222
+ class te {
223
+ constructor(e = { value: "", displayText: "", displayField: "", isInputText: !1 }, t) {
224
+ n(this, "editorType", "input-group");
298
225
  // 通过弹窗返回的若干个值对象构成的数组
299
- I(this, "value");
300
- I(this, "valueType", "text");
226
+ n(this, "value");
227
+ n(this, "valueType", "text");
301
228
  // 控件内显示的值
302
- I(this, "displayText");
229
+ n(this, "displayText");
303
230
  // 弹窗模式下,取列表中哪个字段的值映射到当前字段
304
- I(this, "valueField");
231
+ n(this, "valueField");
305
232
  // 是否是手动输入的值
306
- I(this, "isInputText");
233
+ n(this, "isInputText");
307
234
  // 编辑器配置
308
- I(this, "editiorConfig");
309
- this.value = t == null ? void 0 : t.value, this.displayText = t == null ? void 0 : t.displayText, this.valueField = t == null ? void 0 : t.displayField, this.isInputText = t == null ? void 0 : t.isInputText, this.editiorConfig = Object.assign({}, r);
235
+ n(this, "editiorConfig");
236
+ this.value = e == null ? void 0 : e.value, this.displayText = e == null ? void 0 : e.displayText, this.valueField = e == null ? void 0 : e.displayField, this.isInputText = e == null ? void 0 : e.isInputText, this.editiorConfig = Object.assign({}, t);
310
237
  }
311
238
  clear() {
312
239
  this.value = "", this.displayText = "", this.valueField = "";
313
240
  }
314
- getPropValue(t, r) {
315
- if (r.length > 1) {
316
- const n = r.shift();
317
- return t[n] ? this.getPropValue(t[n], r) : "";
241
+ getPropValue(e, t) {
242
+ if (t.length > 1) {
243
+ const o = t.shift();
244
+ return e[o] ? this.getPropValue(e[o], t) : "";
318
245
  }
319
- return t[r[0]];
246
+ return e[t[0]];
320
247
  }
321
- getTextValue(t) {
322
- const r = t.split("."), n = this.value.map((o) => this.getPropValue(o, te(r)));
323
- return n && n.length ? n.join(",") : "";
248
+ getTextValue(e) {
249
+ const t = e.split("."), o = this.value.map((f) => this.getPropValue(f, j(t)));
250
+ return o && o.length ? o.join(",") : "";
324
251
  }
325
252
  getValue() {
326
253
  return this.value;
@@ -328,65 +255,65 @@ class Fr {
328
255
  getDisplayText() {
329
256
  return this.getValue();
330
257
  }
331
- setValue(t) {
258
+ setValue(e) {
332
259
  throw new Error("Method not implemented.");
333
260
  }
334
261
  isEmpty() {
335
- var t;
336
- return !this.displayText && (this.value == null || !((t = this.value) != null && t.length));
337
- }
338
- }
339
- class Cr {
340
- constructor(t = { mapFields: [], value: "", valueField: "", isInputText: !1, helpId: "" }, r) {
341
- I(this, "editorType", "lookup");
342
- I(this, "helpId");
343
- I(this, "mapFields");
344
- I(this, "value");
345
- I(this, "valueField");
346
- I(this, "valueType", "text");
262
+ var e;
263
+ return !this.displayText && (this.value == null || !((e = this.value) != null && e.length));
264
+ }
265
+ }
266
+ class re {
267
+ constructor(e = { mapFields: [], value: "", valueField: "", isInputText: !1, helpId: "" }, t) {
268
+ n(this, "editorType", "lookup");
269
+ n(this, "helpId");
270
+ n(this, "mapFields");
271
+ n(this, "value");
272
+ n(this, "valueField");
273
+ n(this, "valueType", "text");
347
274
  // 帮助的值是否为手动输入的任意值,对应帮助的任意输入属性nosearch
348
- I(this, "isInputText");
275
+ n(this, "isInputText");
349
276
  // 编辑器配置
350
- I(this, "editiorConfig");
351
- this.editiorConfig = Object.assign({}, r), this.value = (t == null ? void 0 : t.value) || "", this.valueField = (t == null ? void 0 : t.valueField) || (r == null ? void 0 : r.valueField), this.mapFields = t.mapFields, this.isInputText = (t == null ? void 0 : t.isInputText) || (r == null ? void 0 : r.isInputText), this.helpId = (t == null ? void 0 : t.helpId) || (r == null ? void 0 : r.helpId);
277
+ n(this, "editiorConfig");
278
+ this.editiorConfig = Object.assign({}, t), this.value = (e == null ? void 0 : e.value) || "", this.valueField = (e == null ? void 0 : e.valueField) || (t == null ? void 0 : t.valueField), this.mapFields = e.mapFields, this.isInputText = (e == null ? void 0 : e.isInputText) || (t == null ? void 0 : t.isInputText), this.helpId = (e == null ? void 0 : e.helpId) || (t == null ? void 0 : t.helpId);
352
279
  }
353
280
  clear() {
354
281
  this.value = "", this.mapFields = [];
355
282
  }
356
283
  getValue() {
357
- return this.mapFields.map((t) => Ze(t, this.valueField || "id")).join(",");
284
+ return this.mapFields.map((e) => H(e, this.valueField || "id")).join(",");
358
285
  }
359
286
  getDisplayText() {
360
287
  return this.value;
361
288
  }
362
- setValue(t) {
289
+ setValue(e) {
363
290
  throw new Error("Method not implemented.");
364
291
  }
365
292
  isEmpty() {
366
293
  return !this.mapFields.length;
367
294
  }
368
295
  }
369
- class Tr extends oe {
370
- constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
371
- super(r, n);
372
- I(this, "editorType", "month-picker");
296
+ class se extends S {
297
+ constructor(t = { value: "", displayFormat: "", valueFormat: "" }, o) {
298
+ super(t, o);
299
+ n(this, "editorType", "month-picker");
373
300
  }
374
301
  }
375
- class kr extends fe {
376
- constructor(r = { begin: "", end: "", displayFormat: "", valueFormat: "" }, n) {
377
- super(r, n);
378
- I(this, "editorType", "month-range");
302
+ class ne extends N {
303
+ constructor(t = { begin: "", end: "", displayFormat: "", valueFormat: "" }, o) {
304
+ super(t, o);
305
+ n(this, "editorType", "month-range");
379
306
  }
380
307
  }
381
- class wr {
382
- constructor(t = { begin: null, end: null }, r) {
383
- I(this, "editorType", "number-range");
384
- I(this, "begin");
385
- I(this, "end");
386
- I(this, "valueType", "number");
308
+ class oe {
309
+ constructor(e = { begin: null, end: null }, t) {
310
+ n(this, "editorType", "number-range");
311
+ n(this, "begin");
312
+ n(this, "end");
313
+ n(this, "valueType", "number");
387
314
  // 编辑器配置
388
- I(this, "editiorConfig");
389
- this.editiorConfig = Object.assign({}, r), this.begin = (t == null ? void 0 : t.begin) == null ? null : parseFloat(t.begin), this.end = (t == null ? void 0 : t.end) == null ? null : parseFloat(t.end);
315
+ n(this, "editiorConfig");
316
+ this.editiorConfig = Object.assign({}, t), this.begin = (e == null ? void 0 : e.begin) == null ? null : parseFloat(e.begin), this.end = (e == null ? void 0 : e.end) == null ? null : parseFloat(e.end);
390
317
  }
391
318
  clear() {
392
319
  this.begin = null, this.end = null;
@@ -400,23 +327,23 @@ class wr {
400
327
  getDisplayText() {
401
328
  return this.begin === null && this.end === null ? "" : (this.begin === null ? "" : this.begin) + "~" + (this.end === null ? "" : this.end);
402
329
  }
403
- setValue(t) {
404
- this.begin = t.begin == null ? null : parseFloat(t.begin), this.end = t.end == null ? null : parseFloat(t.end);
330
+ setValue(e) {
331
+ this.begin = e.begin == null ? null : parseFloat(e.begin), this.end = e.end == null ? null : parseFloat(e.end);
405
332
  }
406
333
  isEmpty() {
407
334
  return this.begin == null && this.end == null;
408
335
  }
409
336
  }
410
- class xr {
411
- constructor(t = { value: "" }, r) {
412
- I(this, "editorType", "number-spinner");
413
- I(this, "value");
414
- I(this, "valueType", "number");
337
+ class ue {
338
+ constructor(e = { value: "" }, t) {
339
+ n(this, "editorType", "number-spinner");
340
+ n(this, "value");
341
+ n(this, "valueType", "number");
415
342
  // 编辑器配置
416
- I(this, "editiorConfig");
417
- this.editiorConfig = Object.assign({}, r);
418
- const n = parseFloat(t.value);
419
- this.value = isNaN(n) ? null : n;
343
+ n(this, "editiorConfig");
344
+ this.editiorConfig = Object.assign({}, t);
345
+ const o = parseFloat(e.value);
346
+ this.value = isNaN(o) ? null : o;
420
347
  }
421
348
  clear() {
422
349
  this.value = null;
@@ -427,25 +354,25 @@ class xr {
427
354
  getDisplayText() {
428
355
  if (this.isEmpty())
429
356
  return "";
430
- const { formatTo: t } = Je();
431
- return t(this.value, this.editiorConfig);
357
+ const { formatTo: e } = K();
358
+ return e(this.value, this.editiorConfig);
432
359
  }
433
- setValue(t) {
434
- this.value = isNaN(parseFloat(t)) ? null : t;
360
+ setValue(e) {
361
+ this.value = isNaN(parseFloat(e)) ? null : e;
435
362
  }
436
363
  isEmpty() {
437
364
  return this.value == null || isNaN(this.value);
438
365
  }
439
366
  }
440
- class Vr {
441
- constructor(t = { value: null, valueList: [] }, r) {
442
- I(this, "editorType", "radio-group");
443
- I(this, "value");
444
- I(this, "valueType", "enum");
445
- I(this, "valueList", []);
367
+ class le {
368
+ constructor(e = { value: null, valueList: [] }, t) {
369
+ n(this, "editorType", "radio-group");
370
+ n(this, "value");
371
+ n(this, "valueType", "enum");
372
+ n(this, "valueList", []);
446
373
  // 编辑器配置
447
- I(this, "editiorConfig");
448
- this.editiorConfig = Object.assign({}, r), this.value = t == null ? void 0 : t.value, this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (t == null ? void 0 : t.valueList) || [];
374
+ n(this, "editiorConfig");
375
+ this.editiorConfig = Object.assign({}, t), this.value = e == null ? void 0 : e.value, this.editiorConfig.data && this.editiorConfig.data.length ? this.valueList = this.editiorConfig.data : this.valueList = (e == null ? void 0 : e.valueList) || [];
449
376
  }
450
377
  clear() {
451
378
  this.value = void 0, this.valueList = [];
@@ -454,30 +381,30 @@ class Vr {
454
381
  return this.value;
455
382
  }
456
383
  getDisplayText() {
457
- var t;
458
- return ((t = this.valueList.find((r) => r.value === this.value)) == null ? void 0 : t.name) || "";
384
+ var e;
385
+ return ((e = this.valueList.find((t) => t.value === this.value)) == null ? void 0 : e.name) || "";
459
386
  }
460
- setValue(t) {
461
- this.value = t;
387
+ setValue(e) {
388
+ this.value = e;
462
389
  }
463
390
  isEmpty() {
464
391
  return !this.value && this.value !== 0 && this.value !== !1;
465
392
  }
466
393
  }
467
- class Sr extends oe {
468
- constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
469
- super(r, n);
470
- I(this, "editorType", "year-picker");
394
+ class ae extends S {
395
+ constructor(t = { value: "", displayFormat: "", valueFormat: "" }, o) {
396
+ super(t, o);
397
+ n(this, "editorType", "year-picker");
471
398
  }
472
399
  }
473
- class Ie {
474
- constructor(t = { value: "" }, r) {
475
- I(this, "editorType", "text");
476
- I(this, "value");
477
- I(this, "valueType", "text");
400
+ class U {
401
+ constructor(e = { value: "" }, t) {
402
+ n(this, "editorType", "text");
403
+ n(this, "value");
404
+ n(this, "valueType", "text");
478
405
  // 编辑器配置
479
- I(this, "editiorConfig");
480
- this.value = t.value;
406
+ n(this, "editiorConfig");
407
+ this.value = e.value;
481
408
  }
482
409
  clear() {
483
410
  this.value = void 0;
@@ -488,656 +415,79 @@ class Ie {
488
415
  getDisplayText() {
489
416
  return this.getValue();
490
417
  }
491
- setValue(t) {
492
- this.value = t;
418
+ setValue(e) {
419
+ this.value = e;
493
420
  }
494
421
  isEmpty() {
495
422
  return !this.value;
496
423
  }
497
424
  }
498
- class Er extends oe {
499
- constructor(r = { value: "", displayFormat: "", valueFormat: "" }, n) {
500
- super(r, n);
501
- I(this, "editorType", "datetime-picker");
502
- }
503
- }
504
- class Ir extends fe {
505
- constructor(r = { begin: "", end: "", displayFormat: "", valueFormat: "" }, n = {}) {
506
- super(r, n);
507
- // 这个属性会在后面进行比对
508
- I(this, "editorType", "datetime-range");
509
- I(this, "valueType", "datetime");
510
- }
511
- }
512
- class Lr extends Ee {
513
- constructor(r = { value: "", valueList: [] }, n) {
514
- super(r, n);
515
- I(this, "editorType", "check-group");
516
- }
517
- }
518
- function Le() {
519
- function e(t, r, n) {
520
- switch (t) {
521
- case "check-box":
522
- return new yr(r, n);
523
- case "combo-list":
524
- return new Ee(r, n);
525
- case "combo-lookup":
526
- return new br(r, n);
527
- case "input-group":
528
- return new Fr(r, n);
529
- case "year-picker":
530
- return new Sr(r, n);
531
- case "date-picker":
532
- return new oe(r, n);
533
- case "datetime-range":
534
- return new Ir(r, n);
535
- case "date-range":
536
- return new fe(r, n);
537
- case "datetime-picker":
538
- return new Er(r, n);
539
- case "lookup":
540
- return new Cr(r, n);
541
- case "month-picker":
542
- return new Tr(r, n);
543
- case "month-range":
544
- return new kr(r, n);
545
- case "number-range":
546
- return new wr(r, n);
547
- case "number-spinner":
548
- return new xr(r, n);
549
- case "radio-group":
550
- return new Vr(r, n);
551
- case "check-group":
552
- return new Lr(r, n);
553
- default:
554
- return new Ie(r, n);
555
- }
556
- }
557
- return { createConditionValue: e };
558
- }
559
- function Pe(e = "query-solution") {
560
- function t(i) {
561
- let u = "input-group";
562
- switch (i) {
563
- case "year-picker":
564
- case "month-picker":
565
- case "month-range":
566
- case "date-range":
567
- case "datetime-range":
568
- case "datetime-picker":
569
- u = "date-picker";
570
- break;
571
- default:
572
- u = i;
573
- }
574
- return u;
575
- }
576
- function r(i) {
577
- const u = i.editor ? i.editor.type : "input-group";
578
- return i.editor.type = t(u), i.editor.type === "date-picker" ? (u.indexOf("range") > -1 && (i.editor.enablePeriod = !0), u.indexOf("datetime") > -1 && (i.editor.showTime = !0), u.indexOf("year") > -1 && (i.editor.selectMode = "year"), u.indexOf("month") > -1 && (i.editor.selectMode = "month"), i.editor.weekSelect && (i.editor.selectMode = "week")) : i.editor.type === "number-spinner" || i.editor.type === "number-range" ? (i.editor.showZero = !0, i.editor.nullable = !0, i.editor.needValid = !0) : i.editor.type === "combo-list" ? i.editor.enableClear = !0 : i.editor.type === "check-group" && e === "filter-bar" && (i.editor.direction = "vertical"), u === "input-group" && !i.editor.placeholder && (i.editor.placeholder = re.getLocaleValue("input-group.placeholder")), i.editor;
579
- }
580
- function n(i) {
581
- return i.map((S) => Object.assign({}, S)).map((S) => (S.visible = Object.prototype.hasOwnProperty.call(S, "visible") ? S.visible : !0, S.editor = r(S), S));
582
- }
583
- function o(i, u, S, g) {
584
- switch (i.value.editorType) {
585
- case "combo-list":
586
- g.newValue && (i.value.valueList = g.newValue.map((v) => ({ name: v.name, value: v.value })));
587
- break;
588
- case "radio-group":
589
- i.value.valueList = [S.data.find((v) => v.value === u)];
590
- break;
591
- case "year-range":
592
- case "month-range":
593
- case "date-range":
594
- case "datetime-range":
595
- i.value.setValue(u);
596
- break;
597
- }
598
- }
599
- function m(i, u, S) {
600
- var h, p, f, E, c, b;
601
- const g = te((h = i.get(u.fieldCode)) == null ? void 0 : h.editor), v = (p = i.get(u.fieldCode)) == null ? void 0 : p.id, l = (f = i.get(u.fieldCode)) == null ? void 0 : f.visible;
602
- let s = !0;
603
- return ((E = u.value) == null ? void 0 : E.editorType) === "lookup" && g ? (g.idValue = (c = u.value.mapFields) == null ? void 0 : c.map((w) => w.id).join(","), g.onClear = () => {
604
- u.value.mapFields = [], S(u, "");
605
- }, g["onUpdate:dataMapping"] = (w) => {
606
- u.value.mapFields = w.items, S(u, u.value.getValue());
607
- }, s = !1) : ((b = u.value) == null ? void 0 : b.editorType) === "number-range" && g ? (g.beginValue = u.value.begin, g.onBeginValueChange = (w) => {
608
- u.value.begin = w, S(u, w);
609
- }, g.endValue = u.value.end, g.onEndValueChange = (w) => {
610
- u.value.end = w, S(u, w);
611
- }, s = !1) : g && ["year-range", "month-range", "date-range", "datetime-range"].find((w) => {
612
- var j;
613
- return w === ((j = u.value) == null ? void 0 : j.editorType);
614
- }) && (g.beginValue = u.value.begin, g.endValue = u.value.end), Object.prototype.hasOwnProperty.call(u, "disabled") && (g.disabled = u.disabled), { id: v, editor: g, visible: l, needEmitChange: s };
615
- }
616
- return { getSingleControlType: r, convertToControls: n, conditionChangeHandler: o, renderFieldConditionEditor: m };
617
- }
618
- function ge(e, t, r = "query-solution") {
619
- const { convertToControls: n } = Pe(r), o = M(e.fields), m = M([]), i = /* @__PURE__ */ new Map(), { createConditionValue: u } = Le();
620
- function S(v = !0) {
621
- v && (o.value = n(o.value)), o.value.reduce((l, s) => (l.set(s.labelCode, s), l), i);
622
- }
623
- function g(v) {
624
- return v.forEach((l) => {
625
- if (l) {
626
- const s = i.get(l.fieldCode);
627
- s.controlType && (l.value = u(s.controlType, l.value, s.editor));
628
- }
629
- }), v;
630
- }
631
- return { convertToControls: n, fields: o, fieldMap: i, fieldConditions: m, loadFieldConfigs: S, initialConditionValue: g };
632
- }
633
- function Oe(e, t, r) {
634
- const n = M(null), o = M(r), m = M(0);
635
- function i(v, l) {
636
- let s = null;
637
- return function() {
638
- const h = arguments;
639
- s ? (clearTimeout(s), s = setTimeout(() => {
640
- s = null, v(...h);
641
- }, 200)) : (v(...h), s = setTimeout(() => {
642
- s = null;
643
- }, 200));
644
- };
645
- }
646
- function u() {
647
- o.value && (n.value = new ResizeObserver(i((v) => {
648
- const l = v[0];
649
- m.value = l.contentRect.width;
650
- })), n.value.observe(o.value));
651
- }
652
- function S(v) {
653
- let s = "col-12";
654
- return v > 250 * 6 ? s = "col-2" : v > 250 * 4 ? s = "col-3" : v > 250 * 3 ? s = "col-4" : v > 250 * 2 && (s = "col-6"), s;
655
- }
656
- const g = W(() => S(m.value));
657
- return Y([r], ([v]) => {
658
- o.value = v, u();
659
- }), {
660
- conditionClass: g,
661
- resizeObserver: n
662
- };
663
- }
664
- const be = /* @__PURE__ */ _({
665
- name: "FConditionFields",
666
- props: pe,
667
- emits: ["valueChange", "blur", "focus", "click", "input"],
668
- setup(e, t) {
669
- const r = M(), n = re.getLocale(), o = M(e.key), m = M(e.conditions), {
670
- renderFieldConditionEditor: i,
671
- conditionChangeHandler: u
672
- } = Pe(), S = ge(e), {
673
- initialConditionValue: g,
674
- fieldMap: v,
675
- loadFieldConfigs: l
676
- } = S, s = Oe(e, t, r), {
677
- resizeObserver: h
678
- } = s;
679
- l(!0), g(m.value), ke(() => {
680
- var c;
681
- (c = h.value) == null || c.unobserve(r.value);
682
- }), Y(() => e.conditions, () => {
683
- m.value = e.conditions, g(m.value);
684
- });
685
- const p = W(() => ({
686
- // row: true,
687
- "f-utils-flex-row-wrap": !0,
688
- "farris-form": !0,
689
- "condition-div": !0,
690
- "farris-form-controls-inline": !n || e.isControlInline === !0 || e.isControlInline === "auto" && n !== "en"
691
- }));
692
- function f(c, b, w, j) {
693
- u(c, b, w, j), t.emit("valueChange", b, c);
694
- }
695
- function E() {
696
- return m.value.map((c) => {
697
- var z;
698
- const {
699
- id: b,
700
- editor: w,
701
- needEmitChange: j,
702
- visible: q
703
- } = i(v, c, f);
704
- let G = ((z = w == null ? void 0 : w.appearance) == null ? void 0 : z.class) || e.itemClass;
705
- return w != null && w.multiLineLabel && (G = G + " farris-group-multi-label"), O(Ue, {
706
- id: b,
707
- key: b,
708
- visible: q,
709
- customClass: G,
710
- label: (w == null ? void 0 : w.showLabel) === !1 ? " " : c.fieldName,
711
- editor: w,
712
- required: w == null ? void 0 : w.required,
713
- modelValue: c.value.value,
714
- "onUpdate:modelValue": (A) => c.value.value = A,
715
- onChange: (A, a) => {
716
- j && f(c, A, w, a);
717
- }
718
- }, null);
719
- });
720
- }
721
- return () => ce(O("div", {
722
- class: p.value,
723
- key: o.value,
724
- ref: r
725
- }, [E()]), [[de("area-response")]]);
726
- }
727
- }), Pr = {
728
- customClass: { type: String, default: "" },
729
- customStyle: { type: String, defaut: "" },
730
- /** 控制是否可见 */
731
- visible: { type: Boolean, default: !0 },
732
- /** 内部控件布局是否响应国际化 */
733
- adaptForLanguage: { type: Boolean, default: !0 }
734
- }, ie = /* @__PURE__ */ _({
735
- name: "FResponseForm",
736
- props: Pr,
737
- emits: [],
738
- setup(e, t) {
739
- const r = M(), n = W(() => {
740
- const o = re.getLocale(), m = e.customClass.split(" "), i = {
741
- "drag-container": !0
742
- };
743
- return m.reduce((u, S) => (u[S] = !0, u), i), e.adaptForLanguage && o && (i["farris-form-controls-inline"] = o !== "en"), i;
744
- });
745
- return () => e.visible && ce(O("div", {
746
- ref: r,
747
- class: n.value,
748
- style: e.customStyle
749
- }, [t.slots.default && t.slots.default()]), [[de("area-response")]]);
750
- }
751
- }), Be = {
752
- id: { type: String, default: "" },
753
- customClass: { type: String, default: "" },
754
- customStyle: { type: String, default: "" },
755
- /** 筛选组件配置器,具体配置项可查看各组件文档 */
756
- editor: { type: Object, default: {} },
757
- label: { type: String, default: "" },
758
- /** value is uncertain because type is uncertain, default value should not be set */
759
- modelValue: { type: [String, Boolean, Array, Number] },
760
- // readonly: { type: Boolean, default: false },
761
- visible: { type: Boolean, default: !0 },
762
- required: { type: Boolean, default: !1 },
763
- showLabel: { type: Boolean, default: !0 },
764
- /**
765
- * visible相当于showLabel为true,none相当于showLabel为false
766
- */
767
- showLabelType: { type: String, default: "visible" },
768
- type: { type: String, default: "input-group" },
769
- componentId: { type: String, default: "" },
770
- errors: { type: Object, default: null },
771
- fill: { type: Boolean, default: !1 }
772
- }, Or = {
773
- id: { type: String },
774
- required: { type: Boolean, default: !1 },
775
- text: { type: String, default: "" },
776
- title: { type: String },
777
- valid: { type: Boolean, default: !0 },
778
- inValidTip: { type: String, default: "" },
779
- /**
780
- * 实际支持 'visible'可见 | 'reserve-space' 占位不显示
781
- */
782
- showType: { type: String, default: "visible" }
783
- }, Br = /* @__PURE__ */ _({
784
- name: "FDynamicFormLabel",
785
- props: Or,
786
- emits: [],
787
- setup(e, t) {
788
- M(e.title || e.text);
789
- const r = M(e.required), n = M(e.text), o = M(e.valid), m = M(e.inValidTip);
790
- Y(() => e.text, () => {
791
- n.value = e.text;
792
- }), Y(() => e.required, (v, l) => {
793
- v !== l && (r.value = v);
794
- }), Y([() => e.valid, () => e.inValidTip], ([v, l]) => {
795
- o.value = v, m.value = l;
796
- });
797
- const i = W(() => o.value ? n.value : m.value), u = W(() => o.value ? "" : "color:red"), S = W(() => ({
798
- "col-form-label": !0,
799
- // 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
800
- "f-width-auto": r.value && (e.showType === "none" || !n.value)
801
- })), g = W(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || r.value || !!n.value && e.showType !== "none");
802
- return () => g.value && O("label", {
803
- class: S.value,
804
- title: i.value,
805
- style: u.value
806
- }, [!o.value && O("span", {
807
- class: "f-icon f-icon-warning mr-1",
808
- style: "color: red; min-width: 16px;",
809
- title: m.value
810
- }, null), O("span", {
811
- class: "farris-label-text"
812
- }, [r.value && O("span", {
813
- class: "farris-label-info text-danger"
814
- }, [Re("*")]), e.showType === "visible" && n.value])]);
815
- }
816
- }), { globalStorageKey: Mr } = Ve(), F = {}, C = {}, T = {}, V = {};
817
- let Fe = !1;
818
- async function Nr() {
819
- if (!Fe) {
820
- Fe = !0, Ye.register(F, C, T, V), Xe.register(F, C, T, V), He.register(F, C, T, V), De.register(F, C, T, V), Ke.register(F, C, T, V), et.register(F, C, T, V), he.register(F, C, T, V), ye.register(F, C, T, V), he.register(F, C, T, V), ye.register(F, C, T, V), le.register(F, C, T, V), tt.register(F, C, T, V), rt.register(F, C, T, V), ot.register(F, C, T, V), nt.register(F, C, T, V), it.register(F, C, T, V), at.register(F, C, T, V), lt.register(F, C, T, V), st.register(F, C, T, V), ut.register(F, C, T, V), ar.register(F, C, T, V), ct.register(F, C, T, V), dt.register(F, C, T, V), Kt.register(F, C, T, V), pt.register(F, C, T, V), ft.register(F, C, T, V), gt.register(F, C, T, V), ht.register(F, C, T, V), vt.register(F, C, T, V), yt.register(F, C, T, V), bt.register(F, C, T, V), Ft.register(F, C, T, V), Ct.register(F, C, T, V), Tt.register(F, C, T, V), kt.register(F, C, T, V), wt.register(F, C, T, V), xt.register(F, C, T, V), Vt.register(F, C, T, V), St.register(F, C, T, V), Et.register(F, C, T, V), It.register(F, C, T, V), Lt.register(F, C, T, V), Ot.register(F, C, T, V), Bt.register(F, C, T, V), Pt.register(F, C, T, V), Yt.register(F, C, T), Mt.register(F, C, T, V), Nt.register(F, C, T, V), jt.register(F, C, T, V), Gt.register(F, C, T, V), qt.register(F, C, T, V), At.register(F, C, T, V), tr.register(F, C, T, V), $t.register(F, C, T, V), Rt.register(F, C, T, V), Ut.register(F, C, T, V), zt.register(F, C, T, V), Wt.register(F, C, T, V), Zt.register(F, C, T, V), _t.register(F, C, T, V), Jt.register(F, C, T, V), Qt.register(F, C, T, V), Xt.register(F, C, T, V), Ht.register(F, C, T, V), mt.register(F, C, T, V), Dt.register(F, C, T, V), er.register(F, C, T, V), rr.register(F, C, T, V), nr.register(F, C, T, V), or.register(F, C, T, V), ir.register(F, C, T, V), lr.register(F, C, T, V), sr.register(F, C, T, V), ur.register(F, C, T, V), cr.register(F, C, T, V), dr.register(F, C, T, V), mr.register(F, C, T, V), pr.register(F, C, T, V), fr.register(F, C, T, V);
821
- const e = window[Mr];
822
- if (e)
823
- for (const t in e)
824
- e[t].createPropsResolver = gr, e[t].register(F, C, T);
825
- }
826
- }
827
- function jr() {
828
- Nr();
829
- function e(i) {
830
- const u = F[i];
831
- if (!u)
832
- throw new Error(`Could not find the editor of type '${i}'`);
833
- return u;
834
- }
835
- function t(i, u) {
836
- const S = C[i];
837
- return S ? S(u) : {};
838
- }
839
- function r(i) {
840
- switch (i) {
841
- case "check-box":
842
- return "onChangeValue";
843
- case "switch":
844
- return "onModelValueChanged";
845
- case "check-group":
846
- return "onChangeValue";
847
- case "combo-list":
848
- case "combo-tree":
849
- return "onChange";
850
- case "combo-lookup":
851
- return "";
852
- case "year-range":
853
- case "year-picker":
854
- case "month-range":
855
- case "month-picker":
856
- case "date-range":
857
- case "datetime-range":
858
- case "datetime-picker":
859
- return "onDatePicked";
860
- case "date-picker":
861
- return "onUpdate:modelValue";
862
- case "time-picker":
863
- return "onValueChange";
864
- case "input-group":
865
- return "onChange";
866
- case "lookup":
867
- case "sort-condition-editor":
868
- case "filter-condition-editor":
869
- case "code-editor":
870
- case "language-textbox":
871
- case "rich-text-editor":
872
- return "onUpdate:modelValue";
873
- case "number-range":
874
- return "onValueChange";
875
- case "number-spinner":
876
- return "onValueChange";
877
- case "radio-group":
878
- return "onChangeValue";
879
- case "text":
880
- return "";
881
- case "events-editor":
882
- return "onSavedCommandListChanged";
883
- case "grid-field-editor":
884
- case "item-collection-editor":
885
- case "response-form-layout-setting":
886
- case "response-layout-editor-setting":
887
- case "response-layout-splitter":
888
- case "menu-lookup":
889
- case "json-editor":
890
- return "onChange";
891
- case "field-selector":
892
- case "binding-selector":
893
- return "onFieldSelected";
894
- case "schema-selector":
895
- return "onSchemaSelected";
896
- case "mapping-editor":
897
- return "onMappingFieldsChanged";
898
- case "textarea":
899
- return "onChange";
900
- case "query-solution-config":
901
- case "solution-preset":
902
- case "filter-bar-config":
903
- return "onFieldsChanged";
904
- case "property-editor":
905
- return "onValueChange";
906
- case "expression-editor":
907
- return "onExpressionChanged";
908
- case "collection-property-editor":
909
- return "onValueChange";
910
- default:
911
- return "onUpdate:modelValue";
912
- }
913
- }
914
- function n(i) {
915
- switch (i) {
916
- case "combo-list":
917
- case "input-group":
918
- case "textarea":
919
- return "onClear";
920
- }
921
- }
922
- function o(i) {
923
- switch (i) {
924
- case "input-group":
925
- case "textarea":
926
- return "onMousedownEvent";
927
- }
928
- }
929
- function m(i) {
930
- switch (i) {
931
- case "input-group":
932
- case "textarea":
933
- return "onMouseupEvent";
934
- }
935
- }
936
- return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: r, getClearFunctionName: n, getMousedownFunctionName: o, getMouseupFunctionName: m };
937
- }
938
- const Gr = {
939
- /**
940
- * 显示的错误信息
941
- */
942
- errors: {
943
- type: Object,
944
- default: null
945
- }
946
- }, qr = /* @__PURE__ */ _({
947
- name: "FValidationMessage",
948
- props: Gr,
949
- emits: [],
950
- setup(e, t) {
951
- const r = M(e.errors);
952
- Y(() => e.errors, (m) => {
953
- r.value = m;
954
- });
955
- const n = M(!0), o = W(() => {
956
- if (r.value) {
957
- const m = Object.keys(r.value).map((i) => {
958
- var u;
959
- return (u = r.value[i]) == null ? void 0 : u.name;
960
- });
961
- return m.length ? m.join(" ") : "";
962
- }
963
- return "";
964
- });
965
- return () => o.value && O("div", {
966
- class: "farris-feedback f-state-invalid",
967
- onClick: () => n.value = !n.value
968
- }, [!n.value && O("span", {
969
- class: "f-icon f-icon-message_warning f-feedback-icon"
970
- }, null), n.value && O("span", {
971
- class: "f-feedback-message"
972
- }, [o.value])]);
973
- }
974
- }), se = /* @__PURE__ */ _({
975
- name: "FDynamicFormGroup",
976
- props: Be,
977
- emits: ["change", "update:modelValue"],
978
- setup(e, t) {
979
- var k;
980
- const r = M(e.id), n = M(e.customClass), o = M(e.editor), m = M(e.label), i = M(e.modelValue), u = M(e.readonly), S = M(((k = e.editor) == null ? void 0 : k.required) || e.required), g = M(e.showLabel), v = M(e.visible);
981
- M(e.type);
982
- const l = M(), s = M(e.errors), h = W(() => g.value ? e.showLabelType : "none"), {
983
- resolveEditorProps: p,
984
- resolveEditorType: f,
985
- getChangeFunctionName: E,
986
- getClearFunctionName: c
987
- } = jr(), b = W(() => ({
988
- "form-group": !0,
989
- "farris-form-group": !0,
990
- "common-group": !0,
991
- "q-state-readonly": u.value
992
- })), w = W(() => {
993
- if (e.fill)
994
- return {
995
- maxWidth: "none"
996
- };
997
- });
998
- function j(d, L, x) {
999
- i.value = L !== void 0 ? L : d, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
1000
- newValue: d,
1001
- newModelValue: L,
1002
- parameters: x
1003
- });
1004
- }
1005
- function q() {
1006
- t.emit("update:modelValue", "");
1007
- }
1008
- function G(d) {
1009
- return (...L) => {
1010
- q(), typeof d == "function" && d(...L);
1011
- };
1012
- }
1013
- function z(d) {
1014
- return (L, x, P) => {
1015
- j(L, x, P), typeof d == "function" && d(L, x, P);
1016
- };
1017
- }
1018
- const A = W(() => {
1019
- const d = o.value.type || "input-group", L = f(d), x = p(d, o.value), P = E(d), B = c(o.value.type);
1020
- return B && (x[B] = G(x[B])), P && (x[P] = z(x[P])), (x.id == null || x.id === "") && (x.id = r.value), d === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (x.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (x.onEndValueChange = o.value.onEndValueChange)) : d === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" ? (x["onUpdate:idValue"] = o.value["onUpdate:idValue"], x.id = r.value) : d === "collection-property-editor" && o.value.onSelectionChange && typeof o.value.onSelectionChange == "function" ? x.onSelectionChange = o.value.onSelectionChange : d === "property-editor" && (x.onBeforeOpenVariables = o.value.onBeforeOpenVariables), () => O(L, me({
1021
- ref: l
1022
- }, x, {
1023
- modelValue: i.value,
1024
- "onUpdate:modelValue": (U) => i.value = U
1025
- }), t.slots);
1026
- });
1027
- function a() {
1028
- return O(qr, {
1029
- id: `${r.value}-validation-message`,
1030
- errors: s.value
1031
- }, null);
1032
- }
1033
- return Y([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([d, L, x, P, B, U, $, J, Z, H]) => {
1034
- var D;
1035
- r.value = d, n.value = L, o.value = x, m.value = P, i.value = B, u.value = U, S.value = ((D = o.value) == null ? void 0 : D.required) || $, g.value = J, v.value = Z, s.value = H;
1036
- }), t.expose({
1037
- editorRef: l
1038
- }), () => v.value && O("div", {
1039
- id: `${r.value}-form-group`,
1040
- class: n.value,
1041
- style: e.customStyle
1042
- }, [O("div", {
1043
- class: "farris-group-wrap",
1044
- style: w.value
1045
- }, [O("div", {
1046
- class: b.value
1047
- }, [O(Br, {
1048
- id: `${r.value}-lable`,
1049
- showType: h.value,
1050
- required: S.value,
1051
- text: m.value,
1052
- title: m.value
1053
- }, null), O("div", {
1054
- class: "farris-input-wrap"
1055
- }, [A.value(), a()])])])]);
1056
- }
1057
- });
1058
- ie.install = (e) => {
1059
- e.component(ie.name, ie).component(se.name, se);
1060
- };
1061
- var Ar = /* @__PURE__ */ ((e) => (e[e.IntType = 0] = "IntType", e[e.StringType = 1] = "StringType", e[e.BoolType = 2] = "BoolType", e))(Ar || {}), Me = /* @__PURE__ */ ((e) => (e[e.Value = 0] = "Value", e[e.SmartHelp = 1] = "SmartHelp", e[e.Enum = 2] = "Enum", e[e.Express = 3] = "Express", e))(Me || {});
1062
- function $r() {
1063
- const { getLocaleValue: e } = re;
1064
- return { conditionListLocale: {
1065
- // 添加条件
1066
- add: e("condition.add"),
1067
- // 生成条件组
1068
- create: e("condition.create"),
1069
- // 重置
1070
- reset: e("condition.reset"),
1071
- and: e("condition.and"),
1072
- or: e("condition.or")
1073
- } };
1074
- }
1075
- function Rr() {
1076
- const { getLocaleValue: e } = re;
425
+ function ce() {
426
+ const { getLocaleValue: r } = W;
1077
427
  return { operatorsLocale: {
1078
- equal: e("operators.equal"),
1079
- notEqual: e("operators.notEqual"),
1080
- greater: e("operators.greater"),
1081
- greaterOrEqual: e("operators.greaterOrEqual"),
1082
- lessOrEqual: e("operators.lessOrEqual"),
1083
- less: e("operators.less"),
1084
- contains: e("operators.contains"),
1085
- startWith: e("operators.startWith"),
1086
- endWith: e("operators.endWith")
428
+ equal: r("operators.equal"),
429
+ notEqual: r("operators.notEqual"),
430
+ greater: r("operators.greater"),
431
+ greaterOrEqual: r("operators.greaterOrEqual"),
432
+ lessOrEqual: r("operators.lessOrEqual"),
433
+ less: r("operators.less"),
434
+ contains: r("operators.contains"),
435
+ startWith: r("operators.startWith"),
436
+ endWith: r("operators.endWith")
1087
437
  } };
1088
438
  }
1089
- var Ne = /* @__PURE__ */ ((e) => (e.Equal = "0", e.NotEqual = "1", e.Greater = "2", e.GreaterOrEqual = "3", e.Less = "4", e.LessOrEqual = "5", e.Like = "6", e.LikeStartWith = "7", e.LikeEndWith = "8", e.In = "9", e.NotIn = "10", e))(Ne || {});
1090
- function Ur() {
1091
- const { operatorsLocale: e } = Rr();
439
+ var J = /* @__PURE__ */ ((r) => (r.Equal = "0", r.NotEqual = "1", r.Greater = "2", r.GreaterOrEqual = "3", r.Less = "4", r.LessOrEqual = "5", r.Like = "6", r.LikeStartWith = "7", r.LikeEndWith = "8", r.In = "9", r.NotIn = "10", r))(J || {});
440
+ function ie() {
441
+ const { operatorsLocale: r } = ce();
1092
442
  return [
1093
443
  {
1094
444
  value: "0",
1095
- name: e.equal
445
+ name: r.equal
1096
446
  // 等于
1097
447
  },
1098
448
  {
1099
449
  value: "1",
1100
- name: e.equal
450
+ name: r.equal
1101
451
  // 不等于
1102
452
  },
1103
453
  {
1104
454
  value: "2",
1105
- name: e.equal
455
+ name: r.equal
1106
456
  // 大于
1107
457
  },
1108
458
  {
1109
459
  value: "3",
1110
- name: e.equal
460
+ name: r.equal
1111
461
  // 大于等于
1112
462
  },
1113
463
  {
1114
464
  value: "4",
1115
- name: e.less
465
+ name: r.less
1116
466
  // 小于
1117
467
  },
1118
468
  {
1119
469
  value: "5",
1120
- name: e.lessOrEqual
470
+ name: r.lessOrEqual
1121
471
  // 小于等于
1122
472
  },
1123
473
  {
1124
474
  value: "6",
1125
- name: e.contains
475
+ name: r.contains
1126
476
  // 包含
1127
477
  },
1128
478
  {
1129
479
  value: "7",
1130
- name: e.startWith
480
+ name: r.startWith
1131
481
  // 开始是
1132
482
  },
1133
483
  {
1134
484
  value: "8",
1135
- name: e.endWith
485
+ name: r.endWith
1136
486
  // 结束是
1137
487
  }
1138
488
  ];
1139
489
  }
1140
- const zr = {
490
+ const he = {
1141
491
  "button-edit": ["0", "1", " 6", "7", "8"],
1142
492
  "check-box": ["0"],
1143
493
  "combo-list": ["0", "1"],
@@ -1157,1636 +507,329 @@ const zr = {
1157
507
  "radio-group": ["0"],
1158
508
  text: ["0", "1", " 6", "7", "8"]
1159
509
  };
1160
- function Wr(e, t, r) {
1161
- const { fieldMap: n } = r;
1162
- function o(m) {
1163
- const i = n.get(m.fieldCode);
1164
- if (!i)
510
+ function Ce(r, e, t) {
511
+ const { fieldMap: o } = t;
512
+ function f(b) {
513
+ const l = o.get(b.fieldCode);
514
+ if (!l)
1165
515
  return [];
1166
- const u = i.editor.type, S = new Set(zr[u]);
1167
- return Ur().filter((v) => S.has(v.value));
516
+ const h = l.editor.type, v = new Set(he[h]);
517
+ return ie().filter((k) => v.has(k.value));
1168
518
  }
1169
- return { getCompareOperators: o };
519
+ return { getCompareOperators: f };
1170
520
  }
1171
- function Zr() {
1172
- const e = M({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
1173
- let n = 0;
1174
- function o() {
521
+ function xe() {
522
+ const r = X({ relation: 0, items: [], children: [], path: [], groupId: 0, level: 0 }), e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
523
+ let o = 0;
524
+ function f() {
1175
525
  return {
1176
526
  id: "",
1177
527
  fieldCode: "",
1178
528
  fieldName: "",
1179
- compareType: Ne.Equal,
1180
- valueType: Me.Value,
1181
- value: new Ie(),
529
+ compareType: J.Equal,
530
+ valueType: P.Value,
531
+ value: new U(),
1182
532
  relation: 0,
1183
533
  conditionId: Date.now()
1184
534
  };
1185
535
  }
1186
- function m(a, k) {
1187
- return { relation: a, items: [], children: [], path: [], groupId: ++n, level: k };
1188
- }
1189
- function i() {
1190
- const a = Object.assign({}, e.value);
1191
- r.forEach((k, d) => {
1192
- k.groupId === a.groupId && r.set(d, a);
1193
- }), t.forEach((k, d) => {
1194
- k.groupId === a.groupId && t.set(d, a);
1195
- }), e.value = a;
1196
- }
1197
- function u(a) {
1198
- const k = /* @__PURE__ */ new Map();
1199
- let d = 0;
1200
- return a.forEach((L, x) => {
1201
- var P, B;
1202
- if (d += ((P = L.lBracket) == null ? void 0 : P.length) || 0, k.set(x, d), d -= ((B = L.rBracket) == null ? void 0 : B.length) || 0, d < 0)
536
+ function b(s, a) {
537
+ return { relation: s, items: [], children: [], path: [], groupId: ++o, level: a };
538
+ }
539
+ function l() {
540
+ const s = Object.assign({}, r.value);
541
+ t.forEach((a, u) => {
542
+ a.groupId === s.groupId && t.set(u, s);
543
+ }), e.forEach((a, u) => {
544
+ a.groupId === s.groupId && e.set(u, s);
545
+ }), r.value = s;
546
+ }
547
+ function h(s) {
548
+ const a = /* @__PURE__ */ new Map();
549
+ let u = 0;
550
+ return s.forEach((c, i) => {
551
+ var d, p;
552
+ if (u += ((d = c.lBracket) == null ? void 0 : d.length) || 0, a.set(i, u), u -= ((p = c.rBracket) == null ? void 0 : p.length) || 0, u < 0)
1203
553
  throw new Error("The right bracket is out of range.");
1204
- }), k;
554
+ }), a;
1205
555
  }
1206
- function S(a, k, d, L, x) {
1207
- for (let P = 0; P < k; P++) {
1208
- const B = a + (P + 1), U = m(x, B);
1209
- d.children.push(U), r.set(U.groupId, d), d = d.children[d.children.length - 1], L.push(d);
556
+ function v(s, a, u, c, i) {
557
+ for (let d = 0; d < a; d++) {
558
+ const p = s + (d + 1), F = b(i, p);
559
+ u.children.push(F), t.set(F.groupId, u), u = u.children[u.children.length - 1], c.push(u);
1210
560
  }
1211
- return d;
561
+ return u;
1212
562
  }
1213
- function g(a, k, d, L, x) {
1214
- for (let $ = k; $ <= 0; $++)
1215
- L.pop();
1216
- const P = L[L.length - 1];
1217
- if (!P)
563
+ function g(s, a, u, c, i) {
564
+ for (let m = a; m <= 0; m++)
565
+ c.pop();
566
+ const d = c[c.length - 1];
567
+ if (!d)
1218
568
  throw new Error("The group path is out of range");
1219
- const B = a + k, U = m(x, B);
1220
- return P.children.push(U), r.set(U.groupId, P), d = P.children[P.children.length - 1], L.push(d), d;
569
+ const p = s + a, F = b(i, p);
570
+ return d.children.push(F), t.set(F.groupId, d), u = d.children[d.children.length - 1], c.push(u), u;
1221
571
  }
1222
- function v(a, k, d, L) {
1223
- d.pop();
1224
- const x = d[d.length - 1], P = m(L, a);
1225
- return x.children.push(P), r.set(P.groupId, x), k = x.children[x.children.length - 1], d.push(k), k;
572
+ function k(s, a, u, c) {
573
+ u.pop();
574
+ const i = u[u.length - 1], d = b(c, s);
575
+ return i.children.push(d), t.set(d.groupId, i), a = i.children[i.children.length - 1], u.push(a), a;
1226
576
  }
1227
- function l(a, k, d, L, x, P) {
1228
- let B = a[a.length - 1];
1229
- if (!B)
577
+ function q(s, a, u, c, i, d) {
578
+ let p = s[s.length - 1];
579
+ if (!p)
1230
580
  throw new Error("The group path is out of range");
1231
- const U = k.get(L) || 0, $ = k.get(d) || 0;
1232
- if (d < 0 || d === L)
1233
- return a[a.length - 1];
1234
- const J = U - $, Z = x && x.relation !== void 0 ? x.relation : 1;
1235
- return B = J > 0 ? S($, J, B, a, Z) : B, B = J < 0 ? g($, J, B, a, Z) : B, B = J === 0 && $ > 0 && U > 0 && x && P && !!x.rBracket && !!P.lBracket ? v($, B, a, Z) : B, B;
1236
- }
1237
- function s(a) {
1238
- const d = { relation: a.length && a[0].relation !== void 0 ? a[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, L = [d], x = u(a);
1239
- return a.forEach((P, B) => {
1240
- const U = B - 1, $ = a[U], J = l(L, x, U, B, $, P);
1241
- J.items.push(P), t.set(P.conditionId, J);
1242
- }), e.value = d, d;
1243
- }
1244
- function h() {
1245
- const a = o();
1246
- t.set(a.conditionId, e.value), e.value.items.push(a);
1247
- }
1248
- function p(a) {
1249
- if (!a)
581
+ const F = a.get(c) || 0, m = a.get(u) || 0;
582
+ if (u < 0 || u === c)
583
+ return s[s.length - 1];
584
+ const C = F - m, M = i && i.relation !== void 0 ? i.relation : 1;
585
+ return p = C > 0 ? v(m, C, p, s, M) : p, p = C < 0 ? g(m, C, p, s, M) : p, p = C === 0 && m > 0 && F > 0 && i && d && !!i.rBracket && !!d.lBracket ? k(m, p, s, M) : p, p;
586
+ }
587
+ function x(s) {
588
+ const u = { relation: s.length && s[0].relation !== void 0 ? s[0].relation : 1, items: [], children: [], path: [], groupId: 0, level: 0 }, c = [u], i = h(s);
589
+ return s.forEach((d, p) => {
590
+ const F = p - 1, m = s[F], C = q(c, i, F, p, m, d);
591
+ C.items.push(d), e.set(d.conditionId, C);
592
+ }), r.value = u, u;
593
+ }
594
+ function I() {
595
+ const s = f();
596
+ e.set(s.conditionId, r.value), r.value.items.push(s);
597
+ }
598
+ function V(s) {
599
+ if (!s)
1250
600
  return;
1251
- const k = t.get(a.conditionId);
1252
- if (k) {
1253
- const d = k.items.findIndex((x) => x.conditionId === a.conditionId) + 1, L = o();
1254
- t.set(L.conditionId, k), k.items.splice(d, 0, L), i();
1255
- }
1256
- }
1257
- function f(a, k, d, L) {
1258
- a.reduce((x, P) => {
1259
- const B = P.conditionId !== void 0, U = P.groupId !== void 0;
1260
- if (B) {
1261
- const $ = P;
1262
- d.push($), x.items.set($.conditionId, $);
601
+ const a = e.get(s.conditionId);
602
+ if (a) {
603
+ const u = a.items.findIndex((i) => i.conditionId === s.conditionId) + 1, c = f();
604
+ e.set(c.conditionId, a), a.items.splice(u, 0, c), l();
605
+ }
606
+ }
607
+ function w(s, a, u, c) {
608
+ s.reduce((i, d) => {
609
+ const p = d.conditionId !== void 0, F = d.groupId !== void 0;
610
+ if (p) {
611
+ const m = d;
612
+ u.push(m), i.items.set(m.conditionId, m);
1263
613
  }
1264
- if (U) {
1265
- const $ = P;
1266
- L.push($), x.groups.set($.groupId, $);
614
+ if (F) {
615
+ const m = d;
616
+ c.push(m), i.groups.set(m.groupId, m);
1267
617
  }
1268
- return x;
1269
- }, k);
618
+ return i;
619
+ }, a);
1270
620
  }
1271
- function E(a, k, d, L, x) {
1272
- a && (a.items = k.length ? a.items.filter((P) => !d.has(P.conditionId)) : a.items, a.children = L.length ? a.children.filter((P) => !x.has(P.groupId)) : a.children);
621
+ function E(s, a, u, c, i) {
622
+ s && (s.items = a.length ? s.items.filter((d) => !u.has(d.conditionId)) : s.items, s.children = c.length ? s.children.filter((d) => !i.has(d.groupId)) : s.children);
1273
623
  }
1274
- function c(a, k, d) {
1275
- k.forEach((L) => {
1276
- a.items.push(L), t.set(L.conditionId, a);
1277
- }), d.forEach((L) => {
1278
- a.children.push(L), r.set(L.groupId, a);
624
+ function L(s, a, u) {
625
+ a.forEach((c) => {
626
+ s.items.push(c), e.set(c.conditionId, s);
627
+ }), u.forEach((c) => {
628
+ s.children.push(c), t.set(c.groupId, s);
1279
629
  });
1280
630
  }
1281
- function b(a) {
1282
- const k = a[0], d = k.conditionId !== void 0 ? t.get(k.conditionId) : r.get(k.groupId), L = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, x = [], P = [];
1283
- if (d) {
1284
- f(a, L, x, P), E(d, x, L.items, P, L.groups);
1285
- const B = m(d.relation, d.level + 1);
1286
- c(B, x, P), d.children.push(B), r.set(B.groupId, d), i();
1287
- }
1288
- }
1289
- function w(a) {
1290
- const k = [...a.items], d = [...a.children], L = r.get(a.groupId);
1291
- L && (L.children = L.children.filter((x) => x.groupId !== a.groupId), r.delete(a.groupId), k.forEach((x) => {
1292
- L.items.push(x), t.set(x.conditionId, L);
1293
- }), d.forEach((x) => {
1294
- L.children.push(x), r.set(x.groupId, L);
1295
- }), i());
1296
- }
1297
- function j(a) {
1298
- a.relation = a.relation === 1 ? 2 : 1, i();
1299
- }
1300
- let q;
1301
- function G(a) {
1302
- const { relation: k } = a;
1303
- return (a.children && a.children.length ? a.children.map((L, x, P) => {
1304
- const B = q(L);
1305
- return B[0].lBracket = (B[0].lBracket || "") + "(", B[B.length - 1].rBracket = (B[B.length - 1].rBracket || "") + ")", B[B.length - 1].relation = x < P.length - 1 ? k : 0, B;
631
+ function O(s) {
632
+ const a = s[0], u = a.conditionId !== void 0 ? e.get(a.conditionId) : t.get(a.groupId), c = { items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Map() }, i = [], d = [];
633
+ if (u) {
634
+ w(s, c, i, d), E(u, i, c.items, d, c.groups);
635
+ const p = b(u.relation, u.level + 1);
636
+ L(p, i, d), u.children.push(p), t.set(p.groupId, u), l();
637
+ }
638
+ }
639
+ function y(s) {
640
+ const a = [...s.items], u = [...s.children], c = t.get(s.groupId);
641
+ c && (c.children = c.children.filter((i) => i.groupId !== s.groupId), t.delete(s.groupId), a.forEach((i) => {
642
+ c.items.push(i), e.set(i.conditionId, c);
643
+ }), u.forEach((i) => {
644
+ c.children.push(i), t.set(i.groupId, c);
645
+ }), l());
646
+ }
647
+ function T(s) {
648
+ s.relation = s.relation === 1 ? 2 : 1, l();
649
+ }
650
+ let B;
651
+ function Q(s) {
652
+ const { relation: a } = s;
653
+ return (s.children && s.children.length ? s.children.map((c, i, d) => {
654
+ const p = B(c);
655
+ return p[0].lBracket = (p[0].lBracket || "") + "(", p[p.length - 1].rBracket = (p[p.length - 1].rBracket || "") + ")", p[p.length - 1].relation = i < d.length - 1 ? a : 0, p;
1306
656
  }) : []).flat();
1307
657
  }
1308
- q = (a = e.value) => {
1309
- const { relation: k } = a, d = a.items.map((x, P, B) => (x.lBracket = P === 0 ? "(" : "", x.rBracket = P === B.length - 1 ? ")" : "", x.relation = P < B.length - 1 ? k || 1 : 0, x)), L = G(a);
1310
- return [...d, ...L];
658
+ B = (s = r.value) => {
659
+ const { relation: a } = s, u = s.items.map((i, d, p) => (i.lBracket = d === 0 ? "(" : "", i.rBracket = d === p.length - 1 ? ")" : "", i.relation = d < p.length - 1 ? a || 1 : 0, i)), c = Q(s);
660
+ return [...u, ...c];
1311
661
  };
1312
- function z(a) {
1313
- const k = a || e.value;
1314
- if (k.children.length && k.children.forEach((d) => {
1315
- z(d);
1316
- }), k.level === 0 && !k.items.length && k.children.length === 1) {
1317
- const d = k.children[0];
1318
- e.value.relation = d.relation, w(d);
1319
- } else k.items.length === 0 && k.children.length <= 1 && w(k);
1320
- }
1321
- function A(a) {
1322
- const k = t.get(a.conditionId);
1323
- k && (k.items = k.items.filter((d) => d.conditionId !== a.conditionId), t.delete(a.conditionId), z(), i());
662
+ function G(s) {
663
+ const a = s || r.value;
664
+ if (a.children.length && a.children.forEach((u) => {
665
+ G(u);
666
+ }), a.level === 0 && !a.items.length && a.children.length === 1) {
667
+ const u = a.children[0];
668
+ r.value.relation = u.relation, y(u);
669
+ } else a.items.length === 0 && a.children.length <= 1 && y(a);
670
+ }
671
+ function Y(s) {
672
+ const a = e.get(s.conditionId);
673
+ a && (a.items = a.items.filter((u) => u.conditionId !== s.conditionId), e.delete(s.conditionId), G(), l());
1324
674
  }
1325
675
  return {
1326
- addCondition: h,
1327
- changeGroupRelation: j,
1328
- conditionGroupMap: t,
1329
- getConditions: q,
1330
- group: b,
1331
- groupParentMap: r,
1332
- insertConditionTo: p,
1333
- loadConditionGroup: s,
1334
- refresh: i,
1335
- removeCondition: A,
1336
- rootGroup: e,
1337
- unGroup: w
676
+ addCondition: I,
677
+ changeGroupRelation: T,
678
+ conditionGroupMap: e,
679
+ getConditions: B,
680
+ group: O,
681
+ groupParentMap: t,
682
+ insertConditionTo: V,
683
+ loadConditionGroup: x,
684
+ refresh: l,
685
+ removeCondition: Y,
686
+ rootGroup: r,
687
+ unGroup: y
1338
688
  };
1339
689
  }
1340
- function Jr(e, t, r) {
1341
- const n = M(/* @__PURE__ */ new Set()), o = M(/* @__PURE__ */ new Set()), { conditionGroupMap: m, groupParentMap: i } = r;
1342
- let u, S;
1343
- function g(c) {
1344
- let b = u.level <= c.level ? u : c, w = u.level > c.level ? u : c;
1345
- const j = [];
1346
- for (; w && b && w !== b; )
1347
- w.level > b.level ? (j.push(w), w = i.get(w.groupId)) : w.level === b.level && (b = i.get(b.groupId), b && j.unshift(b));
1348
- return j;
1349
- }
1350
- function v(c) {
1351
- o.value.add(c.groupId), c.items.forEach((b) => n.value.add(b.conditionId)), c.children.forEach((b) => v(b));
1352
- }
1353
- function l(c) {
1354
- const { conditionId: b } = c;
1355
- n.value.add(b), u = n.value.size === 0 ? m.get(b) : u;
1356
- const w = m.get(c.conditionId);
1357
- g(w).forEach((q) => v(q));
1358
- }
1359
- const s = W(() => n.value.size === 0 && o.value.size === 1), h = function(c) {
1360
- o.value.delete(c.groupId), c.items.forEach((w) => S(w)), c.children.forEach((w) => !s.value && h(w));
1361
- const b = i.get(c.groupId);
1362
- b && o.value.has(b.groupId) && h(b);
1363
- };
1364
- S = function(c) {
1365
- const { conditionId: b } = c;
1366
- if (n.value.has(b) && n.value.delete(b), o.value.size > 0) {
1367
- const w = m.get(b);
1368
- w && o.value.has(w.groupId) && h(w);
1369
- }
1370
- };
1371
- function p(c) {
1372
- const { conditionId: b } = c;
1373
- n.value.size === 0 && (u = m.get(b)), n.value.has(b) ? S(c) : l(c);
1374
- }
1375
- function f() {
1376
- const c = [];
1377
- return u && (u.items.filter((b) => n.value.has(b.conditionId)).forEach((b) => c.push(b)), u.children.filter((b) => o.value.has(b.groupId)).forEach((b) => c.push(b))), c;
1378
- }
1379
- function E() {
1380
- n.value.clear(), o.value.clear();
1381
- }
1382
- return { clear: E, getSelectedGroupItem: f, selectedItems: n, toggleSelect: p };
1383
- }
1384
- const ae = /* @__PURE__ */ _({
1385
- name: "FConditionList",
1386
- props: pe,
1387
- emits: ["valueChange", "labelCodeChange", "compareTypeChange"],
1388
- setup(e, t) {
1389
- const r = M(e.key), n = M(e.conditions), o = ge(e, t, "filter-bar"), {
1390
- convertToControls: m,
1391
- fields: i,
1392
- fieldMap: u,
1393
- loadFieldConfigs: S
1394
- } = o, g = Zr(), {
1395
- addCondition: v,
1396
- changeGroupRelation: l,
1397
- getConditions: s,
1398
- group: h,
1399
- insertConditionTo: p,
1400
- loadConditionGroup: f,
1401
- refresh: E,
1402
- removeCondition: c,
1403
- rootGroup: b,
1404
- unGroup: w
1405
- } = g, {
1406
- createConditionValue: j
1407
- } = Le(), q = Jr(e, t, g), {
1408
- selectedItems: G,
1409
- toggleSelect: z
1410
- } = q, {
1411
- getCompareOperators: A
1412
- } = Wr(e, t, o), {
1413
- conditionListLocale: a
1414
- } = $r();
1415
- S(!1), i.value = m(i.value), f(n.value);
1416
- function k(N) {
1417
- var Q;
1418
- const R = ((Q = u.get(N.fieldCode)) == null ? void 0 : Q.editor) || {
1419
- type: "text"
1420
- };
1421
- N.value = j(R.type, void 0), t.emit("labelCodeChange", N);
1422
- }
1423
- function d(N, R) {
1424
- t.emit("compareTypeChange", R);
1425
- }
1426
- function L() {
1427
- }
1428
- t.expose({
1429
- getConditions: s
1430
- });
1431
- function x(N, R) {
1432
- t.emit("valueChange", N, R);
1433
- }
1434
- function P(N) {
1435
- return O("div", {
1436
- class: "condition-list-item-type mr-3"
1437
- }, [O(le, {
1438
- "value-field": "labelCode",
1439
- "text-field": "name",
1440
- "id-field": "id",
1441
- data: i.value,
1442
- modelValue: N.fieldCode,
1443
- "onUpdate:modelValue": (R) => N.fieldCode = R,
1444
- onChange: (R) => k(N)
1445
- }, null)]);
1446
- }
1447
- function B(N) {
1448
- return O("div", {
1449
- class: "condition-list-item-compare mr-3"
1450
- }, [O(le, {
1451
- "value-field": "value",
1452
- "text-field": "name",
1453
- "id-field": "id",
1454
- data: A(N),
1455
- modelValue: N.compareType,
1456
- "onUpdate:modelValue": (R) => N.compareType = R,
1457
- onChange: (R) => d(R, N)
1458
- }, null)]);
1459
- }
1460
- function U(N) {
1461
- var R;
1462
- return O("div", {
1463
- class: "condition-list-item-control mr-3"
1464
- }, [O(se, {
1465
- editor: (R = u.get(N.fieldCode)) == null ? void 0 : R.editor,
1466
- showLabel: !1,
1467
- modelValue: N.value.value,
1468
- "onUpdate:modelValue": (Q) => N.value.value = Q,
1469
- onChange: (Q) => {
1470
- x(Q, N);
1471
- }
1472
- }, null)]);
1473
- }
1474
- function $(N) {
1475
- return [O("div", {
1476
- class: "condition-list-item-extend"
1477
- }, [O("span", {
1478
- class: "f-icon f-icon-plus-sm mr-2",
1479
- onClick: () => p(N)
1480
- }, null), O("span", {
1481
- class: "f-icon f-icon-minus-sm",
1482
- onClick: () => c(N)
1483
- }, null)]), O("div", {
1484
- class: "custom-control custom-checkbox"
1485
- }, [O("input", {
1486
- title: "selection",
1487
- class: "custom-control-input",
1488
- type: "checkbox",
1489
- checked: G.value.has(N.conditionId)
1490
- }, null), O("label", {
1491
- class: "custom-control-label",
1492
- onClick: () => z(N)
1493
- }, null)])];
1494
- }
1495
- function J(N) {
1496
- return N.items.map((R) => O("div", {
1497
- class: "condition-list-item",
1498
- key: R.conditionId
1499
- }, [P(R), B(R), U(R), $(R)]));
1500
- }
1501
- function Z(N) {
1502
- return O("div", {
1503
- class: "condition-list-relation"
1504
- }, [O("span", {
1505
- class: "condition-list-relation-close f-icon-filter-cancel btn-link",
1506
- onClick: () => w(N)
1507
- }, null), O("span", {
1508
- class: "condition-list-relation-text btn-link",
1509
- onClick: () => l(N)
1510
- }, [N.relation === 1 ? a.and : a.or])]);
1511
- }
1512
- function H(N) {
1513
- return O("div", {
1514
- class: "condition-list-content"
1515
- }, [O("div", {
1516
- class: "condition-list-content-group"
1517
- }, [J(N), N.children && N.children.map((R) => H(R))]), Z(N)]);
1518
- }
1519
- function D() {
1520
- h(q.getSelectedGroupItem()), q.clear();
1521
- }
1522
- function ne() {
1523
- return O("div", {
1524
- class: "condition-list-bottom"
1525
- }, [O("div", {
1526
- class: "add-condition-btn mb-1 mr-3",
1527
- onClick: v
1528
- }, [O("span", {
1529
- class: "f-icon f-icon-filter-add"
1530
- }, null), O("span", {
1531
- class: "ml-1"
1532
- }, [a.add])]), O("div", {
1533
- class: "add-condition-btn mb-1",
1534
- onClick: D
1535
- }, [O("span", {
1536
- class: "f-icon f-icon-filter-grouping"
1537
- }, null), O("span", {
1538
- class: "ml-1"
1539
- }, [a.create])]), O("div", {
1540
- class: "condition-list-reset add-condition-btn",
1541
- onClick: L
1542
- }, [a.reset])]);
1543
- }
1544
- return () => O("div", {
1545
- class: "condition-list",
1546
- key: r.value
1547
- }, [O("div", {
1548
- class: "condition-list-body"
1549
- }, [H(b.value)]), ne()]);
1550
- }
1551
- }), _r = {}, Qr = {}, { globalStorageKey: yi } = Ve(), Xr = {
1552
- id: { Type: String, default: "" },
1553
- /** 是否自动完成 */
1554
- autocomplete: { Type: String, default: "off" },
1555
- /** 自定义CLASS */
1556
- customClass: { Type: String, default: "" },
1557
- /** 禁用 */
1558
- disabled: { Type: Boolean, default: !1 },
1559
- /** 允许编辑 */
1560
- editable: { Type: Boolean, default: !0 },
1561
- /** 启用清除按钮 */
1562
- enableClear: { Type: Boolean, default: !0 },
1563
- /** 启用提示文本 */
1564
- enableTitle: { Type: Boolean, default: !0 },
1565
- /** 能否查看密码 */
1566
- enableViewPassword: { Type: Boolean, default: !0 },
1567
- /** 始终显示占位符文本 */
1568
- forcePlaceholder: { Type: Boolean, default: !1 },
1569
- /** 扩展按钮 */
1570
- groupText: { Type: String, default: "" },
1571
- /** 密码模式 */
1572
- showType: { Type: String, default: "text" },
1573
- /** 密码模式 --废弃*/
1574
- type: { Type: String, default: "text" },
1575
- /** 最大值 */
1576
- max: { type: [Number, String] },
1577
- /** 最小值 */
1578
- min: { type: [Number, String] },
1579
- /** 最大长度 */
1580
- maxLength: { Type: Number || void 0, default: void 0 },
1581
- /** 最小长度 */
1582
- minLength: { Type: Number || void 0, default: void 0 },
1583
- /** 组件值 */
1584
- modelValue: { Type: String || Boolean, default: "" },
1585
- /** 隐藏边线 */
1586
- showBorder: { Type: Boolean, default: !0 },
1587
- /** 步长 */
1588
- step: { Type: Number, default: 1 },
1589
- /** 启用提示信息 */
1590
- placeholder: { Type: String, default: "" },
1591
- precision: { Type: Number, default: 0 },
1592
- /** 只读 */
1593
- readonly: { Type: Boolean, default: !1 },
1594
- /** 当组件禁用或只读时显示后边的按钮 */
1595
- showButtonWhenDisabled: { Type: Boolean, default: !1 },
1596
- /** tab索引 */
1597
- tabIndex: { Type: Number, default: 0 },
1598
- /** 文本在输入框中的对齐方式 */
1599
- textAlign: { Type: String, default: "left" },
1600
- /** 是否启用前置扩展信息;在输入框前面 显示 ① 图标鼠标滑过后显示 */
1601
- useExtendInfo: { Type: Boolean, default: !1 },
1602
- /** 前置扩展信息 */
1603
- extendInfo: { Type: String, default: "" },
1604
- /** 输入值 */
1605
- value: { Type: String, default: "" },
1606
- /** 是否撑开高度 */
1607
- autoHeight: { type: Boolean, default: !1 },
1608
- /** 自动聚焦 */
1609
- autofocus: { type: Boolean, default: !1 },
1610
- /** 文本区域可见的行数 */
1611
- rows: { type: Number, default: 2 },
1612
- /** 展示输入文本数量 */
1613
- showCount: { type: Boolean, default: !1 },
1614
- showZero: { type: Boolean, default: !1 },
1615
- /**
1616
- * 作为内嵌编辑器被创建后默认获得焦点
1617
- */
1618
- focusOnCreated: { type: Boolean, default: !1 },
1619
- /**
1620
- * 作为内嵌编辑器被创建后默认选中文本
1621
- */
1622
- selectOnCreated: { type: Boolean, default: !1 },
1623
- /**
1624
- * modelValue 更新时机, 默认 blur; 可选值:blur | input
1625
- * - blur: 离开焦点时更新
1626
- * - change: 输入时更新
1627
- */
1628
- updateOn: { type: String, default: "blur" },
1629
- formatValidation: { type: Object, default: {} },
1630
- /**
1631
- * 是否启用快捷键
1632
- */
1633
- keyboard: { type: Boolean, default: !0 }
1634
- }, je = [
1635
- { key: "none", value: "无" },
1636
- { key: "cellNumber", value: "手机号" },
1637
- { key: "tel", value: "座机号/传真号" },
1638
- { key: "telOrCell", value: "手机号/座机号/传真号" },
1639
- { key: "postCode", value: "邮编" },
1640
- { key: "email", value: "电子邮箱" },
1641
- { key: "idCode", value: "身份证号" },
1642
- { key: "carCode", value: "车牌号" },
1643
- { key: "subjectCode", value: "10位数字会计科目代码" },
1644
- { key: "custom", value: "自定义" }
1645
- ];
1646
- function Yr(e) {
1647
- switch (e) {
1648
- case "none":
1649
- return "";
1650
- case "cellNumber":
1651
- return "^1[0-9]{10}$";
1652
- case "tel":
1653
- return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$";
1654
- case "telOrCell":
1655
- return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$|^1[0-9]{10}$";
1656
- case "postCode":
1657
- return "^[1-9]\\d{5}(?!\\d)$";
1658
- case "workCode":
1659
- return "^\\d{8}$";
1660
- case "email":
1661
- return "^[A-Za-z\\d]+([-_.][A-Za-z\\d]+)*@([A-Za-z\\d]+[-.])+[A-Za-z]{2,5}$";
1662
- case "idCode":
1663
- return "^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))(0[1-9]|([1|2][0-9])|3[0-1])((\\d{4})|\\d{3}X)$";
1664
- case "carCode":
1665
- return "^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][·\\s]?[A-HJ-NP-Z0-9]{4,5}[挂学警港澳]?|粤[Z港澳][·\\s]?[港澳][0-9A-HJ-NP-Z]{4}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?([DF][0-9A-HJ-NP-Z][0-9]{4}|[0-9]{5}[DF])[挂港澳]?|[使领][0-9]{3}[·\\s]?[0-9]{3}|临[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?[0-9A-Z]{4,5}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z]?[·\\s]?警[0-9A-Z]{4}|[军海空][A-Z][·\\s]?[0-9]{4,5}|WJ(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]|\\d{2})[·\\s]?[0-9A-Z]{4,5})$";
1666
- case "carCodeNew":
1667
- return "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))$";
1668
- case "subjectCode":
1669
- return "^\\d{10}$";
1670
- }
1671
- return "";
1672
- }
1673
- function Hr(e) {
1674
- var t;
1675
- return "请输入正确的" + ((t = je.find((r) => r.key === e)) == null ? void 0 : t.value);
1676
- }
1677
- const Dr = {
1678
- convertTo: (e, t, r, n) => {
1679
- e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation.type = r, e.editor.formatValidation.expression = Yr(r), e.editor.formatValidation.message = Hr(r);
1680
- },
1681
- convertFrom: (e, t, r) => e.editor.formatValidation ? t === "type" ? e.editor.formatValidation[t] || "none" : e.editor.formatValidation[t] : "none"
1682
- }, Ce = {
1683
- convertTo: (e, t, r, n) => {
1684
- e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation[t] = r;
1685
- },
1686
- convertFrom: (e, t, r) => e.editor.formatValidation ? e.editor.formatValidation[t] : e.editor[t]
1687
- };
1688
- class Kr extends hr {
1689
- constructor(t, r) {
1690
- super(t, r);
1691
- }
1692
- getPropertyConfig(t, r) {
1693
- return super.getPropertyConfig(t, r), this.propertyConfig.categories.formatValidation = this.getFormatValidation(t), this.propertyConfig;
1694
- }
1695
- getEditorProperties(t) {
1696
- var n, o;
1697
- let r;
1698
- if (((n = t == null ? void 0 : t.binding) == null ? void 0 : n.type) === "Form") {
1699
- const m = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
1700
- (o = m == null ? void 0 : m.schemaField) != null && o.type && (r = m.schemaField.type.length);
1701
- }
1702
- return this.getComponentConfig(t, {}, {
1703
- maxLength: {
1704
- description: "文本字数最大长度",
1705
- title: "最大长度",
1706
- type: "number",
1707
- editor: {
1708
- nullable: !0,
1709
- min: 0,
1710
- useThousands: !1,
1711
- max: r,
1712
- needValid: !0
1713
- }
1714
- },
1715
- showType: {
1716
- description: "指定是文本框还是密码框",
1717
- title: "展示类型",
1718
- type: "enum",
1719
- editor: {
1720
- type: "combo-list",
1721
- data: [
1722
- { id: "text", name: "文本框" },
1723
- { id: "password", name: "密码框" }
1724
- ]
1725
- },
1726
- refreshPanelAfterChanged: !0,
1727
- defaultValue: "text"
1728
- },
1729
- enableViewPassword: {
1730
- description: "",
1731
- title: "能否查看密码",
1732
- visible: t.editor.showType === "password",
1733
- type: "boolean"
1734
- }
1735
- });
1736
- }
1737
- getGridFieldEdtiorProperties(t) {
1738
- var n, o;
1739
- let r;
1740
- if (((n = t == null ? void 0 : t.binding) == null ? void 0 : n.type) === "Form") {
1741
- const m = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
1742
- (o = m == null ? void 0 : m.schemaField) != null && o.type && (r = m.schemaField.type.length);
1743
- }
1744
- return this.getComponentConfig(t, {}, {
1745
- maxLength: {
1746
- description: "文本字数最大长度",
1747
- title: "最大长度",
1748
- type: "number",
1749
- editor: {
1750
- nullable: !0,
1751
- min: 0,
1752
- useThousands: !1,
1753
- max: r
1754
- }
1755
- },
1756
- showType: {
1757
- description: "指定是文本框还是密码框",
1758
- title: "展示类型",
1759
- type: "enum",
1760
- editor: {
1761
- type: "combo-list",
1762
- data: [
1763
- { id: "text", name: "文本框" },
1764
- { id: "password", name: "密码框" }
1765
- ]
1766
- },
1767
- refreshPanelAfterChanged: !0,
1768
- defaultValue: "text"
1769
- },
1770
- enableViewPassword: {
1771
- description: "",
1772
- title: "能否查看密码",
1773
- visible: t.editor.showType === "password",
1774
- type: "boolean"
1775
- }
1776
- });
1777
- }
1778
- getFormatValidation(t) {
1779
- var n, o, m, i;
1780
- const r = {
1781
- title: "输入格式校验",
1782
- description: "输入校验",
1783
- hide: !((n = t.binding) != null && n.field),
1784
- properties: {
1785
- type: {
1786
- title: "格式类型",
1787
- type: "enum",
1788
- description: "格式类型",
1789
- defaultValue: "",
1790
- editor: {
1791
- type: "combo-list",
1792
- textField: "value",
1793
- valueField: "key",
1794
- idField: "key",
1795
- editable: !1,
1796
- data: je
1797
- },
1798
- refreshPanelAfterChanged: !0,
1799
- $converter: Dr,
1800
- parentPropertyID: "formatValidation"
1801
- }
1802
- }
1803
- };
1804
- return (o = t.editor.formatValidation) != null && o.type && ((m = t.editor.formatValidation) == null ? void 0 : m.type) !== "none" && (r.properties.message = {
1805
- title: "输入错误提示",
1806
- type: "string",
1807
- description: "输入错误提示",
1808
- $converter: Ce,
1809
- parentPropertyID: "formatValidation"
1810
- }), ((i = t.editor.formatValidation) == null ? void 0 : i.type) === "custom" && (r.properties.expression = {
1811
- title: "匹配正则",
1812
- type: "string",
1813
- description: "匹配正则",
1814
- $converter: Ce,
1815
- parentPropertyID: "formatValidation"
1816
- }), r;
690
+ class de extends N {
691
+ constructor(t = { begin: "", end: "", displayFormat: "", valueFormat: "" }, o = {}) {
692
+ super(t, o);
693
+ // 这个属性会在后面进行比对
694
+ n(this, "editorType", "datetime-range");
695
+ n(this, "valueType", "datetime");
1817
696
  }
1818
697
  }
1819
- function en(e, t) {
1820
- const r = e.schema;
1821
- function n(o, m) {
1822
- return new Kr(o, t).getPropertyConfig(r, m);
698
+ class pe extends R {
699
+ constructor(t = { value: "", valueList: [] }, o) {
700
+ super(t, o);
701
+ n(this, "editorType", "check-group");
1823
702
  }
1824
- return { getPropsConfig: n };
1825
703
  }
1826
- const tn = /* @__PURE__ */ _({
1827
- name: "FInputGroupDesign",
1828
- props: Xr,
1829
- emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
1830
- setup(e, t) {
1831
- const r = M(e.modelValue), n = M(e.modelValue), o = _e(e, t, r, n), {
1832
- inputGroupClass: m,
1833
- inputType: i,
1834
- inputGroupStyle: u
1835
- } = o, S = M(), g = K("designer-host-service"), v = K("design-item-context"), l = en(v, g), s = Se(S, v, l), h = W(() => e.showType === "password" ? "password" : "");
1836
- return we(() => {
1837
- S.value.componentInstance = s;
1838
- }), t.expose(s.value), () => O("div", {
1839
- id: "inputGroup",
1840
- ref: S,
1841
- class: m.value,
1842
- style: u.value
1843
- }, [O("input", {
1844
- class: "form-control",
1845
- type: e.showType,
1846
- placeholder: e.placeholder,
1847
- value: h.value
1848
- }, null), e.showType === "password" && e.enableViewPassword && O("span", {
1849
- class: "input-group-append"
1850
- }, [O("span", {
1851
- class: "input-group-text"
1852
- }, [O("span", {
1853
- class: "f-icon f-icon-eye"
1854
- }, null)])])]);
1855
- }
1856
- });
1857
- function rn() {
1858
- function e(i, u) {
1859
- const S = Qr[i];
1860
- return S ? S(u) : {};
1861
- }
1862
- function t(i) {
1863
- return _r[i] || tn;
1864
- }
1865
- function r(i) {
1866
- }
1867
- function n(i) {
1868
- }
1869
- function o(i) {
1870
- }
1871
- function m(i) {
1872
- }
1873
- return { getChangeFunctionName: r, getClearFunctionName: n, resolveEditorProps: e, resolveEditorType: t, getMousedownFunctionName: o, getMouseupFunctionName: m };
1874
- }
1875
- function nn(e = {}) {
1876
- function t(g, v, l, s) {
1877
- if (typeof l == "number")
1878
- return s[g].length === l;
1879
- if (typeof l == "object") {
1880
- const h = Object.keys(l)[0], p = l[h];
1881
- if (h === "not")
1882
- return Number(s[g].length) !== Number(p);
1883
- if (h === "moreThan")
1884
- return Number(s[g].length) >= Number(p);
1885
- if (h === "lessThan")
1886
- return Number(s[g].length) <= Number(p);
1887
- }
1888
- return !1;
1889
- }
1890
- function r(g, v, l, s) {
1891
- return s[g] && s[g].propertyValue && String(s[g].propertyValue.value) === String(l);
1892
- }
1893
- const n = /* @__PURE__ */ new Map([
1894
- ["length", t],
1895
- ["getProperty", r]
1896
- ]);
1897
- Object.keys(e).reduce((g, v) => (g.set(v, e[v]), g), n);
1898
- function o(g, v) {
1899
- const l = g;
1900
- return typeof v == "number" ? [{ target: l, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: l, operator: "getProperty", param: g, value: !!v }] : typeof v == "object" ? Object.keys(v).map((s) => {
1901
- if (s === "length")
1902
- return { target: l, operator: "length", param: null, value: v[s] };
1903
- const h = s, p = v[s];
1904
- return { target: l, operator: "getProperty", param: h, value: p };
1905
- }) : [];
1906
- }
1907
- function m(g) {
1908
- return Object.keys(g).reduce((l, s) => {
1909
- const h = o(s, g[s]);
1910
- return l.push(...h), l;
1911
- }, []);
1912
- }
1913
- function i(g, v) {
1914
- if (n.has(g.operator)) {
1915
- const l = n.get(g.operator);
1916
- return l && l(g.target, g.param, g.value, v) || !1;
704
+ function Ie() {
705
+ function r(e, t, o) {
706
+ switch (e) {
707
+ case "check-box":
708
+ return new $(t, o);
709
+ case "combo-list":
710
+ return new R(t, o);
711
+ case "combo-lookup":
712
+ return new D(t, o);
713
+ case "input-group":
714
+ return new te(t, o);
715
+ case "year-picker":
716
+ return new ae(t, o);
717
+ case "date-picker":
718
+ return new S(t, o);
719
+ case "datetime-range":
720
+ return new de(t, o);
721
+ case "date-range":
722
+ return new N(t, o);
723
+ case "datetime-picker":
724
+ return new ee(t, o);
725
+ case "lookup":
726
+ return new re(t, o);
727
+ case "month-picker":
728
+ return new se(t, o);
729
+ case "month-range":
730
+ return new ne(t, o);
731
+ case "number-range":
732
+ return new oe(t, o);
733
+ case "number-spinner":
734
+ return new ue(t, o);
735
+ case "radio-group":
736
+ return new le(t, o);
737
+ case "check-group":
738
+ return new pe(t, o);
739
+ default:
740
+ return new U(t, o);
1917
741
  }
1918
- return !1;
1919
- }
1920
- function u(g, v) {
1921
- return m(g).reduce((h, p) => h && i(p, v), !0);
1922
- }
1923
- function S(g, v) {
1924
- const l = Object.keys(g), s = l.includes("allOf"), h = l.includes("anyOf"), p = s || h, c = (p ? g[p ? s ? "allOf" : "anyOf" : "allOf"] : [g]).map((w) => u(w, v));
1925
- return s ? !c.includes(!1) : c.includes(!0);
1926
742
  }
1927
- return { parseValueSchema: S };
743
+ return { createConditionValue: r };
1928
744
  }
1929
- const on = {
1930
- convertTo: (e, t, r, n) => {
1931
- e.appearance || (e.appearance = {}), e.appearance[t] = r;
1932
- },
1933
- convertFrom: (e, t, r) => e.appearance ? e.appearance[t] : e[t]
1934
- }, an = {
1935
- convertFrom: (e, t, r) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : ""
1936
- }, ln = {
1937
- convertTo: (e, t, r, n) => {
1938
- e.editor && (e.editor[t] = r);
1939
- },
1940
- convertFrom: (e, t, r) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
1941
- }, sn = {
1942
- button: { type: "button", name: "按钮" },
1943
- "response-toolbar": { type: "response-toolbar", name: "工具栏" },
1944
- "response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
1945
- "content-container": { type: "content-container", name: "容器" },
1946
- "input-group": { type: "input-group", name: "文本" },
1947
- textarea: { type: "textarea", name: "多行文本" },
1948
- lookup: { type: "lookup", name: "帮助" },
1949
- "number-spinner": { type: "number-spinner", name: "数值" },
1950
- "date-picker": { type: "date-picker", name: "日期" },
1951
- switch: { type: "switch", name: "开关" },
1952
- "radio-group": { type: "radio-group", name: "单选组" },
1953
- "check-box": { type: "check-box", name: "复选框" },
1954
- "check-group": { type: "check-group", name: "复选框组" },
1955
- "combo-list": { type: "combo-list", name: "下拉列表" },
1956
- "response-form": { type: "response-form", name: "卡片面板" },
1957
- "response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
1958
- "response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
1959
- "tree-grid": { type: "tree-grid", name: "树表格" },
1960
- "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
1961
- "data-grid": { type: "data-grid", name: "表格" },
1962
- "data-grid-column": { type: "data-grid-column", name: "表格列" },
1963
- module: { type: "Module", name: "模块" },
1964
- component: { type: "component", name: "组件" },
1965
- tabs: { type: "tabs", name: "标签页" },
1966
- "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
1967
- "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
1968
- "html-template": { type: "html-template", name: "模板容器" },
1969
- "time-picker": { type: "time-picker", name: "时间选择" },
1970
- section: { type: "section", name: "分组面板" },
1971
- "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
1972
- "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
1973
- splitter: { type: "splitter", name: "分栏面板" },
1974
- "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
1975
- "component-ref": { type: "component-ref", name: "组件引用节点" },
1976
- uploader: { type: "uploader", name: "附件上传" },
1977
- "page-header": { type: "page-header", name: "页头" },
1978
- "page-footer": { type: "page-footer", name: "页脚" },
1979
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
1980
- fieldset: { type: "fieldset", name: "分组" },
1981
- "query-solution": { type: "query-solution", name: "筛选方案" },
1982
- drawer: { type: "drawer", name: "抽屉" },
1983
- "external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
1984
- "list-nav": { type: "list-nav", name: "列表导航" },
1985
- "list-view": { type: "list-view", name: "列表" },
1986
- "filter-bar": { type: "filter-bar", name: "筛选条" },
1987
- "language-textbox": { type: "language-textbox", name: "多语输入框" },
1988
- image: { type: "image", name: "图像" },
1989
- "discussion-editor": { type: "discussion-editor", name: "评论编辑区" },
1990
- "discussion-list": { type: "discussion-list", name: "评论列表" },
1991
- comment: { type: "comment", name: "评论区" },
1992
- "rich-text-editor": { type: "rich-text-editor", name: "富文本编辑器", icon: "rich-text-box" },
1993
- calendar: { type: "calendar", name: "日历", icon: "date-picker" }
1994
- }, un = {
1995
- convertFrom: (e, t, r) => {
1996
- var o;
1997
- const n = e.editor && e.editor[t] ? e.editor[t] : e[t];
1998
- return ((o = sn[n]) == null ? void 0 : o.name) || n;
1999
- }
2000
- }, cn = {
2001
- convertTo: (e, t, r, n) => {
2002
- e[t] = e[t];
2003
- },
2004
- convertFrom: (e, t, r) => e.editor ? r.getRealEditorType(e.editor.type) : ""
2005
- }, dn = {
2006
- convertTo: (e, t, r, n) => {
2007
- (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = r : e.formatter = {
2008
- [t]: r
2009
- });
2010
- },
2011
- convertFrom: (e, t, r) => {
2012
- if (e.formatter) {
2013
- if (t === "trueText")
2014
- return e.formatter.trueText;
2015
- if (t === "falseText")
2016
- return e.formatter.falseText;
2017
- if (t === "prefix")
2018
- return e.formatter.prefix;
2019
- if (t === "suffix")
2020
- return e.formatter.suffix;
2021
- if (t === "precision")
2022
- return e.formatter.precision;
2023
- if (t === "decimal")
2024
- return e.formatter.decimal;
2025
- if (t === "thousand")
2026
- return e.formatter.thousand;
2027
- if (t === "dateFormat")
2028
- return e.formatter.dateFormat || "yyyy-MM-dd";
2029
- if (t === "customFormat")
2030
- return e.formatter.customFormat;
2031
- if (t === "type")
2032
- return e.formatter.type || "none";
2033
- }
2034
- return "none";
2035
- }
2036
- }, mn = {
2037
- convertTo: (e, t, r, n) => {
2038
- e.command ? e.command[t] = r : e.command = {
2039
- [t]: r
2040
- }, t === "enableType" && r === "default" && (e.command.enable = !0, e.command.commands = [
2041
- {
2042
- text: "编辑",
2043
- type: "primary",
2044
- command: "edit"
2045
- },
2046
- {
2047
- text: "删除",
2048
- type: "danger",
2049
- command: "remove"
2050
- }
2051
- ]), t === "enableType" && r === "custom" && (e.command.enable = !0, e.command.commands = [
2052
- {
2053
- value: "add",
2054
- text: "增加",
2055
- type: "link"
2056
- },
2057
- {
2058
- value: "edit",
2059
- text: "编辑",
2060
- type: "danger"
2061
- },
2062
- {
2063
- value: "remove",
2064
- text: "删除",
2065
- type: "remove"
2066
- }
2067
- ]), t === "enableType" && r === "unable" && (e.command.enable = !1);
2068
- },
2069
- convertFrom: (e, t, r) => {
2070
- var n, o;
2071
- if (e.command) {
2072
- if (t === "enableType") {
2073
- const m = (o = (n = e.command) == null ? void 0 : n.commands) == null ? void 0 : o.find((i) => i.command === "edit" && i.type === "primary");
2074
- return e.command.enable ? m ? "default" : "custom" : "unable";
2075
- }
2076
- if (t === "commands")
2077
- return e.command.enableType === "custom" ? e.command.commands : [];
2078
- if (t === "formatter")
2079
- return e.command.formatter;
2080
- }
2081
- return "";
2082
- }
2083
- }, pn = {
2084
- convertTo: (e, t, r, n) => {
2085
- e.column ? e.column[t] = r : e.column = {
2086
- [t]: r
2087
- }, t === "fitColumns" && r && (e.column.fitMode || (e.column.fitMode = "average"));
2088
- },
2089
- convertFrom: (e, t, r) => {
2090
- if (e.column) {
2091
- if (t === "fitColumns")
2092
- return e.column.fitColumns;
2093
- if (t === "fitMode")
2094
- return e.column.fitMode;
2095
- }
2096
- return "";
2097
- }
2098
- }, fn = {
2099
- convertTo: (e, t, r, n) => {
2100
- e.summary ? e.summary[t] = r : e.summary = {
2101
- [t]: r
2102
- }, t === "enable" && r && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
2103
- enable: r,
2104
- groupFields: []
2105
- });
2106
- },
2107
- convertFrom: (e, t, r) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
2108
- }, gn = {
2109
- convertTo: (e, t, r, n) => {
2110
- e.group ? e.group[t] = r : e.group = {
2111
- [t]: r
2112
- }, t === "enable" && r && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
2113
- enable: r,
2114
- groupFields: [],
2115
- showSummary: !1
2116
- });
2117
- },
2118
- convertFrom: (e, t, r) => {
2119
- if (e.group) {
2120
- if (t === "enable")
2121
- return e.group.enable;
2122
- if (t === "showSummary")
2123
- return e.group.showSummary;
2124
- }
2125
- }
2126
- }, vn = {
2127
- convertFrom: (e, t) => e.binding ? e.binding.path : "",
2128
- convertTo: (e, t, r) => {
2129
- if (r && r.length > 0) {
2130
- const n = r[0];
2131
- e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = n.bindingField, e.binding.field = n.id, e.binding.fullPath = n.path, e.path = n.bindingPath;
2132
- }
2133
- }
2134
- }, hn = {
2135
- convertTo: (e, t, r, n) => {
2136
- e.pagination || (e.pagination = {}), e.pagination[t] = r;
2137
- },
2138
- convertFrom: (e, t, r) => e.pagination ? e.pagination[t] : e[t]
2139
- }, yn = {
2140
- convertTo: (e, t, r, n) => {
2141
- e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = r;
2142
- },
2143
- convertFrom: (e, t, r) => e.rowNumber ? e.rowNumber[t] : e[t]
2144
- }, bn = {
2145
- convertTo: (e, t, r, n) => {
2146
- e.selection || (e.selection = {}), e.selection[t] = r;
2147
- },
2148
- convertFrom: (e, t, r) => {
2149
- var n, o;
2150
- return t === "showCheckbox" ? (n = e.selection) != null && n.multiSelect ? !0 : (o = e.selection) == null ? void 0 : o.showCheckbox : e.selection ? e.selection[t] : e[t];
2151
- }
2152
- }, Fn = {
2153
- convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
2154
- }, Cn = {
2155
- convertFrom: (e, t) => e[t] || "",
2156
- convertTo: (e, t, r) => {
2157
- e[t] = r;
2158
- }
2159
- }, Tn = {
2160
- convertTo: (e, t, r, n) => {
2161
- e.size || (e.size = {}), e.size[t] = r;
2162
- },
2163
- convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
2164
- }, kn = {
2165
- convertFrom: (e, t, r) => {
2166
- var n, o;
2167
- return (n = e.formatter) != null && n.data && t === "formatterEnumData" && !e.formatterEnumData ? (o = e.formatter) == null ? void 0 : o.data : e.formatterEnumData;
2168
- }
2169
- }, wn = {
2170
- convertTo: (e, t, r, n) => {
2171
- e.sort || (e.sort = {}), e.sort[t] = r;
2172
- },
2173
- convertFrom: (e, t, r) => {
2174
- var n, o;
2175
- if (t === "mode")
2176
- return ((n = e.sort) == null ? void 0 : n.mode) || "client";
2177
- if (t === "multiSort")
2178
- return !!((o = e.sort) != null && o.multiSort);
2179
- }
2180
- }, xn = {
2181
- convertTo: (e, t, r, n) => {
2182
- e.filter || (e.filter = {}), e.filter[t] = r;
2183
- },
2184
- convertFrom: (e, t, r) => {
2185
- var n;
2186
- if (t === "mode")
2187
- return ((n = e.filter) == null ? void 0 : n.mode) || "client";
2188
- }
2189
- }, Vn = {
2190
- convertTo: (e, t, r, n) => {
2191
- e.rowOption ? e.rowOption[t] = r : e.rowOption = {
2192
- [t]: r
2193
- };
2194
- },
2195
- convertFrom: (e, t, r) => {
2196
- if (e.rowOption) {
2197
- if (t === "customRowStyle")
2198
- return e.rowOption.customRowStyle;
2199
- if (t === "customCellStyle")
2200
- return e.rowOption.customCellStyle;
2201
- }
2202
- return "";
2203
- }
2204
- }, Sn = {
2205
- convertTo: (e, t, r, n) => {
2206
- (e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[t] = r, t === "columnTemplateType" && r === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
2207
- <span class="f-pretend-link f-cursor-pointer"
2208
- @click="(ctx)=>viewModel.current.${e.onClickLinkCommand || ""}({id: rowData.id,context: ctx})">
2209
- {{rowData.${e.field}}}
2210
- </span>` : e.columnTemplate = `
2211
- <span class="f-pretend-link f-cursor-pointer">
2212
- {{rowData.${e.field}}}
2213
- </span>`), t === "columnTemplateType" && r === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && r === "custom" && (e.columnTemplate = ""));
2214
- },
2215
- convertFrom: (e, t, r) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
2216
- };
2217
- function En(e, t, r) {
2218
- const n = /* @__PURE__ */ new Map([
2219
- ["/converter/appearance.converter", on],
2220
- ["/converter/buttons.converter", an],
2221
- ["/converter/property-editor.converter", ln],
2222
- ["/converter/items-count.converter", Fn],
2223
- ["/converter/type.converter", un],
2224
- ["/converter/change-editor.converter", cn],
2225
- ["/converter/change-formatter.converter", dn],
2226
- ["/converter/column-command.converter", mn],
2227
- ["/converter/column-option.converter", pn],
2228
- ["/converter/summary.converter", fn],
2229
- ["/converter/group.converter", gn],
2230
- ["/converter/form-group-label.converter", Cn],
2231
- ["/converter/field-selector.converter", vn],
2232
- ["/converter/pagination.converter", hn],
2233
- ["/converter/row-number.converter", yn],
2234
- ["/converter/grid-selection.converter", bn],
2235
- ["/converter/size.converter", Tn],
2236
- ["/converter/change-formatter-enum.converter", kn],
2237
- ["/converter/grid-sort.converter", wn],
2238
- ["/converter/grid-filter.converter", xn],
2239
- ["/converter/row-option.converter", Vn],
2240
- ["/converter/change-formatter-type.converter", Sn]
2241
- ]), o = /* @__PURE__ */ new Map([
2242
- ["string", { type: "input-group", enableClear: !1 }],
2243
- ["boolean", {
2244
- type: "combo-list",
2245
- textField: "name",
2246
- valueField: "value",
2247
- idField: "value",
2248
- enableClear: !1,
2249
- editable: !1,
2250
- data: [
2251
- {
2252
- value: !0,
2253
- name: "是"
2254
- },
2255
- {
2256
- value: !1,
2257
- name: "否"
2258
- }
2259
- ]
2260
- }],
2261
- ["enum", { type: "combo-list", maxHeight: 128, enableClear: !1, editable: !1 }],
2262
- ["array", { type: "button-edit" }],
2263
- ["number", { type: "number-spinner", placeholder: "" }],
2264
- ["events-editor", { type: "events-editor", hide: !0 }]
2265
- ]), m = nn();
2266
- function i(p, f) {
2267
- return () => m.parseValueSchema(p, f);
2268
- }
2269
- function u(p, f, E) {
2270
- return p.includes("visible") && f.visible !== void 0 ? typeof f.visible == "boolean" ? () => !!f.visible : f.visible === void 0 ? !0 : i(f.visible, E) : () => !0;
2271
- }
2272
- function S(p, f, E) {
2273
- return p.includes("readonly") && f.readonly !== void 0 ? typeof f.readonly == "boolean" ? () => !!f.readonly : i(f.readonly, E) : () => !1;
2274
- }
2275
- function g(p, f) {
2276
- const E = p.$converter || f;
2277
- return typeof E == "string" && E && n.has(E) ? n.get(E) || null : E || null;
2278
- }
2279
- function v(p, f, E, c, b, w = "", j = "") {
2280
- return Object.keys(p).map((G) => {
2281
- const z = M(1), A = G, a = p[G], k = Object.keys(a), d = a.title, L = a.type, x = o.get(L) || { type: "input-group", enableClear: !1 }, P = a.editor ? Object.assign({}, x, a.editor) : Object.assign({}, x), B = u(k, a, f), U = S(k, a, f);
2282
- P.readonly = P.readonly === void 0 ? U() : P.readonly;
2283
- const $ = a.type === "cascade" ? v(a.properties, f, E, c, b, w, j) : [], J = !0;
2284
- let Z = g(a, j);
2285
- const H = W({
2286
- get() {
2287
- if (z.value) {
2288
- if (["class", "style"].find((qe) => qe === A) && !Z && (Z = n.get("/converter/appearance.converter") || null), Z && Z.convertFrom)
2289
- return Z.convertFrom(E, G, b, w);
2290
- const X = E[G];
2291
- return Object.prototype.hasOwnProperty.call(a, "defaultValue") && (X === void 0 || typeof X == "string" && X === "") ? a.type === "boolean" ? a.defaultValue : a.defaultValue || "" : X;
2292
- }
2293
- return null;
2294
- },
2295
- set(X) {
2296
- z.value += 1, Z && Z.convertTo ? (Z.convertTo(c, G, X, b, w), Z.convertTo(E, G, X, b, w)) : (c[G] = X, E[G] = X);
2297
- }
2298
- }), { refreshPanelAfterChanged: D, description: ne, isExpand: N, parentPropertyID: R } = a, Q = { propertyID: A, propertyName: d, propertyType: L, propertyValue: H, editor: P, visible: B, readonly: U, cascadeConfig: $, hideCascadeTitle: J, refreshPanelAfterChanged: D, description: ne, isExpand: N, parentPropertyID: R };
2299
- return f[A] = Q, Q;
2300
- });
2301
- }
2302
- function l(p, f, E = {}) {
2303
- const c = {}, b = e[p];
2304
- return b && b.categories ? Object.keys(b.categories).map((j) => {
2305
- const q = b.categories[j], G = q == null ? void 0 : q.title, z = v(q.properties || {}, c, {}, E, f);
2306
- return { categoryId: j, categoryName: G, properties: z };
2307
- }) : [];
2308
- }
2309
- function s(p, f, E, c, b = "") {
2310
- const w = f.$ref.schema, j = f.$ref.converter, q = E[w], G = q.type, z = r(q), A = {}, a = e[G];
2311
- if (a && a.categories) {
2312
- const k = a.categories[p], d = k == null ? void 0 : k.title;
2313
- j && Object.keys(k.properties).forEach((P) => {
2314
- k.properties[P].$converter = j;
2315
- });
2316
- const L = (k == null ? void 0 : k.properties) || {}, x = v(L, A, z, q, c, b);
2317
- return { categoryId: p, categoryName: d, properties: x };
2318
- }
2319
- return { categoryId: p, categoryName: "", properties: [] };
2320
- }
2321
- function h(p, f, E, c, b) {
2322
- const w = p.type, j = r(p), q = {};
2323
- let G = b || e[w];
2324
- if (G && Object.keys(G).length === 0 && E && E.getPropConfig && (G = E.getPropConfig(c)), G && G.categories) {
2325
- const z = [];
2326
- return Object.keys(G.categories).map((A) => {
2327
- const a = G.categories[A];
2328
- if (a.$ref) {
2329
- z.push(s(A, a, p, f, c));
2330
- return;
2331
- }
2332
- const k = a == null ? void 0 : a.title, d = a == null ? void 0 : a.tabId, L = a == null ? void 0 : a.tabName, x = a == null ? void 0 : a.hide, P = a == null ? void 0 : a.hideTitle, B = v(a.properties || {}, q, j, p, f, c, a.$converter), { setPropertyRelates: U } = a, $ = a == null ? void 0 : a.parentPropertyID;
2333
- z.push({ categoryId: A, categoryName: k, tabId: d, tabName: L, hide: x, properties: B, hideTitle: P, setPropertyRelates: U, parentPropertyID: $ });
2334
- }), z;
745
+ function Ve(r = "query-solution") {
746
+ function e(l) {
747
+ let h = "input-group";
748
+ switch (l) {
749
+ case "year-picker":
750
+ case "month-picker":
751
+ case "month-range":
752
+ case "date-range":
753
+ case "datetime-range":
754
+ case "datetime-picker":
755
+ h = "date-picker";
756
+ break;
757
+ default:
758
+ h = l;
2335
759
  }
2336
- return [];
760
+ return h;
2337
761
  }
2338
- return {
2339
- getPropertyConfigBySchema: h,
2340
- getPropertyConfigByType: l,
2341
- propertyConverterMap: n
2342
- };
2343
- }
2344
- function In(e, t) {
2345
- let r;
2346
- function n(l) {
2347
- const { properties: s, title: h, ignore: p } = l, f = p && Array.isArray(p), E = Object.keys(s).reduce((c, b) => ((!f || !p.find((w) => w === b)) && (c[b] = s[b].type === "object" && s[b].properties ? n(s[b]) : te(s[b].default)), c), {});
2348
- if (h && (!f || !p.find((c) => c === "id"))) {
2349
- const c = h.toLowerCase().replace(/-/g, "_");
2350
- E.id = `${c}_${Math.random().toString().slice(2, 6)}`;
2351
- }
2352
- return E;
762
+ function t(l) {
763
+ const h = l.editor ? l.editor.type : "input-group";
764
+ return l.editor.type = e(h), l.editor.type === "date-picker" ? (h.indexOf("range") > -1 && (l.editor.enablePeriod = !0), h.indexOf("datetime") > -1 && (l.editor.showTime = !0), h.indexOf("year") > -1 && (l.editor.selectMode = "year"), h.indexOf("month") > -1 && (l.editor.selectMode = "month"), l.editor.weekSelect && (l.editor.selectMode = "week")) : l.editor.type === "number-spinner" || l.editor.type === "number-range" ? (l.editor.showZero = !0, l.editor.nullable = !0, l.editor.needValid = !0) : l.editor.type === "check-group" && r === "filter-bar" ? l.editor.direction = "vertical" : (l.editor.type === "lookup" || l.editor.type === "combo-list") && (l.editor.enableClear = Object.prototype.hasOwnProperty.call(l.editor, "enableClear") ? l.editor.enableClear : !0), h === "input-group" && !l.editor.placeholder && (l.editor.placeholder = W.getLocaleValue("input-group.placeholder")), l.editor;
2353
765
  }
2354
766
  function o(l) {
2355
- const { properties: s, title: h, required: p } = l;
2356
- if (p && Array.isArray(p)) {
2357
- const f = p.reduce((E, c) => (E[c] = s[c].type === "object" && s[c].properties ? n(s[c]) : te(s[c].default), E), {});
2358
- if (h && p.find((E) => E === "id")) {
2359
- const E = h.toLowerCase().replace(/-/g, "_");
2360
- f.id = `${E}_${Math.random().toString().slice(2, 6)}`;
2361
- }
2362
- return f;
2363
- }
2364
- return {
2365
- type: h
2366
- };
2367
- }
2368
- function m(l, s = {}, h) {
2369
- const p = e[l];
2370
- if (p) {
2371
- let f = o(p);
2372
- const E = t[l];
2373
- return f = E ? E({ getSchemaByType: m }, f, s, h) : f, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(f), f;
2374
- }
2375
- return null;
2376
- }
2377
- function i(l, s) {
2378
- const h = n(s);
2379
- return Object.keys(h).reduce((p, f) => (Object.prototype.hasOwnProperty.call(l, f) && (p[f] && ve(p[f]) && ve(l[f] || !l[f]) ? Object.assign(p[f], l[f] || {}) : p[f] = l[f]), p), h), h;
2380
- }
2381
- function u(l, s) {
2382
- return Object.keys(l).filter((p) => l[p] != null).reduce((p, f) => {
2383
- if (s.has(f)) {
2384
- const E = s.get(f);
2385
- if (typeof E == "string")
2386
- p[E] = l[f];
2387
- else {
2388
- const c = E(f, l[f], l);
2389
- Object.assign(p, c);
2390
- }
2391
- } else
2392
- p[f] = l[f];
2393
- return p;
2394
- }, {});
2395
- }
2396
- function S(l, s, h = /* @__PURE__ */ new Map()) {
2397
- const p = i(l, s);
2398
- return u(p, h);
2399
- }
2400
- function g(l) {
2401
- var h;
2402
- const s = l.type;
2403
- if (s) {
2404
- const p = e[s];
2405
- if (!p)
2406
- return l;
2407
- const f = i(l, p), E = ((h = l.editor) == null ? void 0 : h.type) || "";
2408
- if (E) {
2409
- const c = e[E], b = i(l.editor, c);
2410
- f.editor = b;
2411
- }
2412
- return f;
2413
- }
2414
- return l;
2415
- }
2416
- function v(l) {
2417
- r = l;
2418
- }
2419
- return { getSchemaByType: m, resolveSchemaWithDefaultValue: g, resolveSchemaToProps: S, mappingSchemaToProps: u, setDesignerContext: v };
2420
- }
2421
- const Ln = {}, Pn = {}, { resolveSchemaWithDefaultValue: On } = In(Ln, Pn), Bn = {}, Mn = {};
2422
- En(Bn, Mn, On);
2423
- const ee = class ee {
2424
- /**
2425
- * 根据绑定字段类型获取可用的输入类控件
2426
- */
2427
- static getEditorTypesByMDataType(t, r = !1, n = "") {
2428
- if (r)
2429
- return [{ key: y["language-textbox"].type, value: y["language-textbox"].name }];
2430
- let o = ee.fieldControlTypeMapping[t];
2431
- if (n === "data-grid-column" && (o != null && o.length)) {
2432
- const m = [y["check-group"].type, y["radio-group"].type, y.image.type];
2433
- o = o.filter((i) => !m.includes(i.key));
2434
- }
2435
- return o;
2436
- }
2437
- /**
2438
- * 获取所有输入类控件
2439
- */
2440
- static getAllInputTypes() {
2441
- const t = [];
2442
- for (const r in ee.fieldControlTypeMapping)
2443
- ee.fieldControlTypeMapping[r].forEach((n) => {
2444
- t.find((o) => o.key === n.key && o.value === n.value) || t.push({ key: n.key, value: n.value });
2445
- });
2446
- return t;
2447
- }
2448
- /**
2449
- * 提供schema字段基础属性和DOM控件属性的映射
2450
- * @param control 控件元数据
2451
- */
2452
- static mappingDomPropAndSchemaProp(t, r) {
2453
- var m;
2454
- const n = (m = t.editor) == null ? void 0 : m.type, o = [];
2455
- return (t.type === y["data-grid-column"].type || t.type === y["tree-grid-column"].type) && r && r.categoryId && r.categoryId.indexOf("gridFieldEditor") < 0 && o.push({ domField: "title", schemaField: "name" }), o.push({ domField: "label", schemaField: "name" }), o.push({ domField: "editor.required", schemaField: "require" }), o.push({ domField: "editor.readonly", schemaField: "readonly" }), (n === y["input-group"].type || n === y.textarea.type || n === y["number-spinner"].type) && o.push({ domField: "editor.maxLength", schemaField: "type.length" }), n === y["number-spinner"].type && o.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === y["data-grid-column"].type || t.type === y["tree-grid-column"].type) && o.push({ domField: "formatter.precision", schemaField: "type.precision" }), (n === y["combo-list"].type || n === y["radio-group"].type) && o.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === y["data-grid-column"].type || t.type === y["tree-grid-column"].type) && o.push({ domField: "formatter.data", schemaField: "type.enumValues" }), n === y["date-picker"].type && (o.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), o.push({ domField: "editor.fieldType", schemaField: "type.name" })), n === y["number-spinner"].type && (o.push({ domField: "editor.max", schemaField: "editor.maxValue" }), o.push({ domField: "editor.min", schemaField: "editor.minValue" })), n === y.lookup.type && (o.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), o.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), o.push({ domField: "editor.textField", schemaField: "editor.textField" }), o.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), o.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), o.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), o.push({ domField: "path", schemaField: "bindingPath" }), o.push({ domField: "binding.path", schemaField: "bindingField" }), o.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === y["data-grid-column"].type || t.type === y["tree-grid-column"].type) && o.push({ domField: "field", schemaField: "bindingPath" }), o;
767
+ return l.map((v) => Object.assign({}, v)).map((v) => (v.visible = Object.prototype.hasOwnProperty.call(v, "visible") ? v.visible : !0, v.editor = t(v), v));
2456
768
  }
2457
- };
2458
- /**
2459
- * <字段类型,可配置的控件类型列表>的映射
2460
- */
2461
- I(ee, "fieldControlTypeMapping", {
2462
- String: [
2463
- { key: y["input-group"].type, value: y["input-group"].name },
2464
- { key: y.lookup.type, value: y.lookup.name },
2465
- { key: y.image.type, value: y.image.name },
2466
- { key: y["date-picker"].type, value: y["date-picker"].name },
2467
- { key: y.switch.type, value: y.switch.name },
2468
- { key: y["check-box"].type, value: y["check-box"].name },
2469
- { key: y["check-group"].type, value: y["check-group"].name },
2470
- { key: y["radio-group"].type, value: y["radio-group"].name },
2471
- { key: y["combo-list"].type, value: y["combo-list"].name },
2472
- { key: y.textarea.type, value: y.textarea.name },
2473
- { key: y["time-picker"].type, value: y["time-picker"].name }
2474
- ],
2475
- Text: [
2476
- { key: y.textarea.type, value: y.textarea.name },
2477
- { key: y.lookup.type, value: y.lookup.name },
2478
- { key: y.image.type, value: y.image.name },
2479
- { key: y["rich-text-editor"].type, value: y["rich-text-editor"].name }
2480
- ],
2481
- Decimal: [
2482
- { key: y["number-spinner"].type, value: y["number-spinner"].name }
2483
- ],
2484
- Integer: [
2485
- { key: y["number-spinner"].type, value: y["number-spinner"].name }
2486
- ],
2487
- Number: [
2488
- { key: y["number-spinner"].type, value: y["number-spinner"].name },
2489
- { key: y.switch.type, value: y.switch.name },
2490
- { key: y["check-box"].type, value: y["check-box"].name }
2491
- ],
2492
- BigNumber: [
2493
- { key: y["number-spinner"].type, value: y["number-spinner"].name }
2494
- ],
2495
- Date: [
2496
- { key: y["date-picker"].type, value: y["date-picker"].name }
2497
- ],
2498
- DateTime: [
2499
- { key: y["date-picker"].type, value: y["date-picker"].name }
2500
- ],
2501
- Boolean: [
2502
- { key: y.switch.type, value: y.switch.name },
2503
- { key: y["check-box"].type, value: y["check-box"].name }
2504
- ],
2505
- Enum: [
2506
- { key: y["combo-list"].type, value: y["combo-list"].name },
2507
- { key: y["radio-group"].type, value: y["radio-group"].name }
2508
- ],
2509
- Object: [
2510
- { key: y.lookup.type, value: y.lookup.name },
2511
- { key: y["combo-list"].type, value: y["combo-list"].name },
2512
- { key: y["radio-group"].type, value: y["radio-group"].name }
2513
- ]
2514
- });
2515
- let Te = ee;
2516
- var ue = /* @__PURE__ */ ((e) => (e.Form = "Form", e.Variable = "Variable", e))(ue || {}), Ge = /* @__PURE__ */ ((e) => (e.SimpleField = "SimpleField", e.ComplexField = "ComplexField", e))(Ge || {});
2517
- function Nn(e, t, r) {
2518
- function n() {
2519
- const i = r.componentId;
2520
- if (!i)
2521
- return !1;
2522
- const u = e.formSchemaUtils.getViewModelIdByComponentId(i);
2523
- if (!u)
2524
- return !1;
2525
- const { schema: S } = t, { designViewModelUtils: g } = e, v = g.getDgViewModel(u), l = v == null ? void 0 : v.fields.find((s) => s.id === S.binding.field);
2526
- return !(!l || l.$type !== Ge.SimpleField);
2527
- }
2528
- function o() {
2529
- const { schema: i } = t;
2530
- return !!e.formSchemaUtils.getVariableById(i.binding.field);
2531
- }
2532
- function m() {
2533
- var S;
2534
- const { schema: i } = t;
2535
- let u = !0;
2536
- if (!e || !((S = i.binding) != null && S.field))
2537
- return u;
2538
- switch (i.binding.type) {
2539
- case ue.Form: {
2540
- u = n();
769
+ function f(l, h, v, g) {
770
+ switch (l.value.editorType) {
771
+ case "combo-list":
772
+ g.newValue && (l.value.valueList = g.newValue.map((k) => ({ name: k.name, value: k.value })));
773
+ break;
774
+ case "radio-group":
775
+ l.value.valueList = [v.data.find((k) => k.value === h)];
776
+ break;
777
+ case "year-range":
778
+ case "month-range":
779
+ case "date-range":
780
+ case "datetime-range":
781
+ l.value.setValue(h);
2541
782
  break;
2542
- }
2543
- case ue.Variable:
2544
- u = o();
2545
- }
2546
- return u;
2547
- }
2548
- return { checkBindingFieldValidation: m };
2549
- }
2550
- const jn = /* @__PURE__ */ _({
2551
- name: "FDynamicFormGroupDesign",
2552
- props: ze,
2553
- emits: ["change", "update:modelValue"],
2554
- setup(e, t) {
2555
- var z;
2556
- const r = M(e.id), n = M(e.customClass), o = M(e.editor), m = M(e.label), i = M(e.modelValue), u = M(!0), S = M(((z = e.editor) == null ? void 0 : z.required) === !0), g = M(e.showLabel);
2557
- M(e.type);
2558
- const v = M(), l = K("designer-host-service"), s = K("design-item-context"), h = W(() => g.value ? e.showLabelType : "none"), {
2559
- resolveEditorProps: p,
2560
- resolveEditorType: f
2561
- } = rn(), E = W(() => ({
2562
- "form-group": !0,
2563
- "farris-form-group": !0,
2564
- "common-group": !0,
2565
- "q-state-readonly": u.value,
2566
- "form-group-in-canvas": !0
2567
- })), c = W(() => {
2568
- const A = o.value.type || "input-group", a = f(A), k = p(A, o.value);
2569
- return () => O(a, me({
2570
- ref: v
2571
- }, k, {
2572
- modelValue: i.value,
2573
- "onUpdate:modelValue": (d) => i.value = d
2574
- }), null);
2575
- });
2576
- Y([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.showLabel], ([A, a, k, d, L, x, P]) => {
2577
- var B;
2578
- r.value = A, n.value = a, o.value = {
2579
- ...k
2580
- }, m.value = d, i.value = L, u.value = x, S.value = ((B = o.value) == null ? void 0 : B.required) === !0, g.value = P;
2581
- }, {
2582
- deep: !0
2583
- });
2584
- const w = !K("external-container-id"), {
2585
- checkBindingFieldValidation: j
2586
- } = Nn(l, s, e);
2587
- function q() {
2588
- const A = w ? j() : !0;
2589
- return O(We, {
2590
- id: `${r.value}-lable`,
2591
- showType: h.value,
2592
- required: S.value,
2593
- text: m.value,
2594
- title: m.value,
2595
- valid: A,
2596
- inValidTip: "绑定信息已失效,请切换绑定或移除控件"
2597
- }, null);
2598
- }
2599
- const G = W(() => {
2600
- if (e.fill)
2601
- return {
2602
- maxWidth: "none"
2603
- };
2604
- });
2605
- return t.expose({
2606
- editorRef: v
2607
- }), () => O("div", {
2608
- id: `${r.value}-input-group`,
2609
- class: n.value
2610
- }, [O("div", {
2611
- class: "farris-group-wrap",
2612
- style: G.value
2613
- }, [O("div", {
2614
- class: E.value
2615
- }, [q(), O("div", {
2616
- class: "farris-input-wrap"
2617
- }, [c.value()])])])]);
2618
- }
2619
- });
2620
- function Gn(e, t) {
2621
- function r() {
2622
- return !0;
2623
- }
2624
- function n() {
2625
- return !0;
2626
- }
2627
- function o() {
2628
- return !1;
2629
- }
2630
- function m() {
2631
- return !0;
2632
- }
2633
- function i(l) {
2634
- var c;
2635
- const s = t == null ? void 0 : t.designViewModelUtils, h = t == null ? void 0 : t.formSchemaUtils, p = (c = e == null ? void 0 : e.componentInstance.value) == null ? void 0 : c.belongedComponentId;
2636
- if (!p || !s || !h)
2637
- return;
2638
- const f = h.getViewModelIdByComponentId(p), E = s.getDgViewModel(f);
2639
- E && E.removeField([l]);
2640
- }
2641
- function u(l, s) {
2642
- const h = t == null ? void 0 : t.formSchemaUtils, { schema: p } = e;
2643
- if (h.getComponents().find((E) => {
2644
- let c = h.getControlsInCmpWidthBinding(E.viewModel, l);
2645
- if (c = c.filter((b) => {
2646
- var j;
2647
- if (b.id === p.id)
2648
- return !1;
2649
- const w = s.type === "visible" ? b[s.type] : (j = b.editor) == null ? void 0 : j[s.type];
2650
- if (w && w.type === "Expression" && w.expressionId === s.id)
2651
- return !0;
2652
- }), c.length)
2653
- return !0;
2654
- }))
2655
- return !0;
2656
- }
2657
- function S(l) {
2658
- var p;
2659
- const s = t == null ? void 0 : t.formSchemaUtils, { schema: h } = e;
2660
- if (s.getExpressions().length) {
2661
- const f = s.getExpressions(), E = f.findIndex((c) => c.target === l);
2662
- E > -1 && ((p = f[E].rules) == null || p.map((c) => {
2663
- var b;
2664
- switch (c.type) {
2665
- case "visible":
2666
- case "readonly":
2667
- case "required": {
2668
- const w = c.type === "visible" ? h[c.type] : (b = h.editor) == null ? void 0 : b[c.type];
2669
- w && w.type === "Expression" && w.expressionId === c.id && (u(l, c) || (c.needDelete = !0));
2670
- break;
2671
- }
2672
- default:
2673
- u(l, c) || (c.needDelete = !0);
2674
- }
2675
- }), f[E].rules = f[E].rules.filter((c) => !c.needDelete));
2676
783
  }
2677
784
  }
2678
- function g() {
2679
- var s, h;
2680
- const l = (s = e == null ? void 0 : e.parent) == null ? void 0 : s.componentInstance.value;
2681
- ((h = l == null ? void 0 : l.schema) == null ? void 0 : h.type) === y["response-layout-item"].type && (l != null && l.schema.appearance.class) && (l.schema.appearance.class = l.schema.appearance.class.replace("f-form-layout", ""), l.schema.appearance.class = l.schema.appearance.class.replace("farris-form", ""), l.schema.appearance.class = l.schema.appearance.class.replace("farris-form-controls-inline", ""), l.schema.appearance.class = l.schema.appearance.class.replace("farris-form-auto", ""), l.schema.appearance.class = l.schema.appearance.class.trim().replace(" ", " "));
2682
- }
2683
- function v() {
2684
- const { schema: l } = e, s = l.binding && l.binding.field;
2685
- s && (i(s), S(s)), g();
2686
- }
2687
- return {
2688
- canAccepts: o,
2689
- checkCanDeleteComponent: n,
2690
- checkCanMoveComponent: r,
2691
- hideNestedPaddingInDesginerView: m,
2692
- onRemoveComponent: v
2693
- };
785
+ function b(l, h, v) {
786
+ var I, V, w, E, L, O;
787
+ const g = j((I = l.get(h.fieldCode)) == null ? void 0 : I.editor), k = (V = l.get(h.fieldCode)) == null ? void 0 : V.id, q = Object.prototype.hasOwnProperty.call(h, "visible") ? h.visible : (w = l.get(h.fieldCode)) == null ? void 0 : w.visible;
788
+ let x = !0;
789
+ if (((E = h.value) == null ? void 0 : E.editorType) === "lookup" && g) {
790
+ g.idValue = (L = h.value.mapFields) == null ? void 0 : L.map((T) => T.id).join(",");
791
+ const { onClear: y } = g;
792
+ g.onClear = (T) => {
793
+ h.value.mapFields = [], v(h, ""), y && y(T);
794
+ }, g["onUpdate:dataMapping"] = (T) => {
795
+ h.value.mapFields = T.items || [], v(h, h.value.getValue());
796
+ }, x = !1;
797
+ } else ((O = h.value) == null ? void 0 : O.editorType) === "number-range" && g ? (g.beginValue = h.value.begin, g.onBeginValueChange = (y) => {
798
+ h.value.begin = y, v(h, y);
799
+ }, g.endValue = h.value.end, g.onEndValueChange = (y) => {
800
+ h.value.end = y, v(h, y);
801
+ }, x = !1) : g && ["year-range", "month-range", "date-range", "datetime-range"].find((y) => {
802
+ var T;
803
+ return y === ((T = h.value) == null ? void 0 : T.editorType);
804
+ }) && (g.beginValue = h.value.begin, g.endValue = h.value.end);
805
+ return Object.prototype.hasOwnProperty.call(h, "disabled") && (g.disabled = h.disabled), { id: k, editor: g, visible: q, needEmitChange: x };
806
+ }
807
+ return { getSingleControlType: t, convertToControls: o, conditionChangeHandler: f, renderFieldConditionEditor: b };
2694
808
  }
2695
- const qn = /* @__PURE__ */ _({
2696
- name: "FFormGroupDesign",
2697
- props: Be,
2698
- emits: [],
2699
- setup(e, t) {
2700
- const r = M(), n = K("design-item-context"), o = K("designer-host-service"), m = Gn(n, o), i = Se(r, n, m);
2701
- return we(() => {
2702
- r.value.componentInstance = i, i.value.getPropConfig = (...u) => {
2703
- var g, v, l;
2704
- let S = vr[e.editor.type];
2705
- return S && Object.keys(S).length === 0 && ((g = r.value) != null && g.editorRef) && ((l = (v = r.value) == null ? void 0 : v.editorRef) != null && l.getPropConfig) && (S = r.value.editorRef.getPropConfig(...u, i.value)), S;
2706
- };
2707
- }), t.expose(i.value), () => O(jn, me(e, {
2708
- ref: r
2709
- }), null);
2710
- }
2711
- }), bi = /* @__PURE__ */ _({
2712
- name: "FConditionFieldsDesign",
2713
- directives: {
2714
- "area-response": Qe
2715
- },
2716
- props: pe,
2717
- emits: ["valueChange", "blur", "focus", "click", "input"],
2718
- setup(e, t) {
2719
- const r = M(), n = M(e.key), o = M(e.conditions), m = ge(e), {
2720
- fieldMap: i,
2721
- loadFieldConfigs: u
2722
- } = m, S = Oe(e, t, r), {
2723
- resizeObserver: g
2724
- } = S;
2725
- u(!0), ke(() => {
2726
- var s;
2727
- (s = g.value) == null || s.unobserve(r.value);
2728
- }), Y(() => e.conditions, () => {
2729
- o.value = e.conditions;
2730
- });
2731
- const v = W(() => ({
2732
- // row: true,
2733
- "f-utils-flex-row-wrap": !0,
2734
- "farris-form": !0,
2735
- "condition-div": !0
2736
- }));
2737
- function l() {
2738
- return o.value.map((s) => {
2739
- var f, E;
2740
- const h = (f = i.get(s.fieldCode)) == null ? void 0 : f.editor;
2741
- h && (h.disabled = !0);
2742
- let p = ((E = h == null ? void 0 : h.appearance) == null ? void 0 : E.class) || e.itemClass;
2743
- return h != null && h.multiLineLabel && (p = p + " farris-group-multi-label"), O(qn, {
2744
- customClass: p,
2745
- label: (h == null ? void 0 : h.showLabel) === !1 ? " " : s.fieldName,
2746
- required: h == null ? void 0 : h.required,
2747
- editor: h,
2748
- type: "form-group"
2749
- }, null);
2750
- });
2751
- }
2752
- return () => ce(O("div", {
2753
- class: v.value,
2754
- key: n.value,
2755
- ref: r
2756
- }, [l()]), [[de("area-response")]]);
2757
- }
2758
- });
2759
- ae.install = (e) => {
2760
- e.component(be.name, be).component(ae.name, ae);
2761
- };
2762
809
  export {
2763
- yr as CheckBoxValue,
2764
- Ee as ComboListValue,
2765
- br as ComboLookupValue,
2766
- Ne as CompareType,
2767
- zr as CompareTypeInEditor,
2768
- oe as DatePickerValue,
2769
- fe as DateRangeValue,
2770
- Er as DateTimePickerValue,
2771
- Ar as EnumType,
2772
- be as FConditionFields,
2773
- bi as FConditionFieldsDesign,
2774
- ae as FConditionList,
2775
- Fr as InputGroupValue,
2776
- Cr as LookupValue,
2777
- Tr as MonthPickerValue,
2778
- kr as MonthRangeValue,
2779
- wr as NumberRangeValue,
2780
- xr as NumberSpinnerValue,
2781
- Vr as RadioGroupValue,
2782
- Ie as TextValue,
2783
- Me as ValueType,
2784
- Sr as YearPickerValue,
2785
- pe as conditionProps,
2786
- ae as default,
2787
- Ur as getCompareTypeName,
2788
- Wr as useCompare,
2789
- Zr as useCondition,
2790
- Pe as useConditionUtils,
2791
- Le as useConditionValue
810
+ $ as CheckBoxValue,
811
+ R as ComboListValue,
812
+ D as ComboLookupValue,
813
+ J as CompareType,
814
+ he as CompareTypeInEditor,
815
+ S as DatePickerValue,
816
+ N as DateRangeValue,
817
+ ee as DateTimePickerValue,
818
+ _ as EnumType,
819
+ te as InputGroupValue,
820
+ re as LookupValue,
821
+ se as MonthPickerValue,
822
+ ne as MonthRangeValue,
823
+ oe as NumberRangeValue,
824
+ ue as NumberSpinnerValue,
825
+ le as RadioGroupValue,
826
+ U as TextValue,
827
+ P as ValueType,
828
+ ae as YearPickerValue,
829
+ Te as conditionProps,
830
+ ie as getCompareTypeName,
831
+ Ce as useCompare,
832
+ xe as useCondition,
833
+ Ve as useConditionUtils,
834
+ Ie as useConditionValue
2792
835
  };