@farris/ui-vue 1.7.3 → 1.7.4

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 (396) hide show
  1. package/components/accordion/index.esm.js +312 -61
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +1482 -56
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +752 -8
  6. package/components/binding-selector/index.umd.cjs +1 -1
  7. package/components/button-group/index.esm.js +266 -110
  8. package/components/button-group/index.umd.cjs +1 -1
  9. package/components/calendar/index.esm.js +129 -128
  10. package/components/calendar/index.umd.cjs +2 -2
  11. package/components/code-editor/index.esm.js +237 -169
  12. package/components/code-editor/index.umd.cjs +3 -3
  13. package/components/collection-property-editor/index.esm.js +134 -133
  14. package/components/collection-property-editor/index.umd.cjs +2 -2
  15. package/components/color-picker/index.esm.js +812 -502
  16. package/components/color-picker/index.umd.cjs +1 -1
  17. package/components/combo-list/index.esm.js +323 -291
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +355 -174
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/comment/index.esm.js +134 -133
  22. package/components/comment/index.umd.cjs +2 -2
  23. package/components/common/index.esm.js +1 -1
  24. package/components/common/index.umd.cjs +1 -1
  25. package/components/component/index.esm.js +3791 -2760
  26. package/components/component/index.umd.cjs +8 -1
  27. package/components/condition/index.esm.js +2482 -492
  28. package/components/condition/index.umd.cjs +8 -1
  29. package/components/data-view/index.esm.js +1815 -1789
  30. package/components/data-view/index.umd.cjs +1 -1
  31. package/components/date-picker/index.esm.js +1 -1
  32. package/components/date-picker/index.umd.cjs +1 -1
  33. package/components/designer-canvas/index.esm.js +2975 -2615
  34. package/components/designer-canvas/index.umd.cjs +1 -1
  35. package/components/drawer/index.esm.js +397 -387
  36. package/components/drawer/index.umd.cjs +2 -2
  37. package/components/dropdown/index.esm.js +373 -124
  38. package/components/dropdown/index.umd.cjs +2 -2
  39. package/components/dynamic-form/index.esm.js +592 -1894
  40. package/components/dynamic-form/index.umd.cjs +1 -1
  41. package/components/dynamic-resolver/index.esm.js +250 -248
  42. package/components/dynamic-resolver/index.umd.cjs +2 -2
  43. package/components/dynamic-view/index.esm.js +427 -466
  44. package/components/dynamic-view/index.umd.cjs +1 -1
  45. package/components/event-parameter/index.esm.js +1 -1
  46. package/components/event-parameter/index.umd.cjs +1 -1
  47. package/components/events-editor/index.esm.js +1890 -1473
  48. package/components/events-editor/index.umd.cjs +3 -3
  49. package/components/expression-editor/index.css +1 -1
  50. package/components/expression-editor/index.esm.js +7371 -2
  51. package/components/expression-editor/index.umd.cjs +427 -1
  52. package/components/fieldset/index.esm.js +1 -1
  53. package/components/fieldset/index.umd.cjs +1 -1
  54. package/components/filter-bar/index.esm.js +2 -3
  55. package/components/filter-bar/index.umd.cjs +2 -2
  56. package/components/filter-condition-editor/index.css +1 -1
  57. package/components/filter-condition-editor/index.esm.js +9044 -425
  58. package/components/filter-condition-editor/index.umd.cjs +427 -1
  59. package/components/html-template/index.esm.js +33 -36
  60. package/components/html-template/index.umd.cjs +1 -1
  61. package/components/image-cropper/index.esm.js +615 -361
  62. package/components/image-cropper/index.umd.cjs +1 -1
  63. package/components/json-editor/index.esm.js +325 -247
  64. package/components/json-editor/index.umd.cjs +1 -1
  65. package/components/language-textbox/index.esm.js +269 -269
  66. package/components/language-textbox/index.umd.cjs +2 -2
  67. package/components/layout/index.esm.js +549 -163
  68. package/components/layout/index.umd.cjs +1 -1
  69. package/components/list-nav/index.esm.js +837 -39
  70. package/components/list-nav/index.umd.cjs +1 -1
  71. package/components/list-view/index.esm.js +427 -646
  72. package/components/list-view/index.umd.cjs +6 -6
  73. package/components/lookup/index.esm.js +3624 -3625
  74. package/components/lookup/index.umd.cjs +1 -1
  75. package/components/menu-lookup/index.esm.js +577 -536
  76. package/components/menu-lookup/index.umd.cjs +6 -6
  77. package/components/nav/index.esm.js +311 -31
  78. package/components/nav/index.umd.cjs +1 -1
  79. package/components/number-range/index.esm.js +1634 -189
  80. package/components/number-range/index.umd.cjs +1 -1
  81. package/components/number-spinner/index.esm.js +82 -82
  82. package/components/number-spinner/index.umd.cjs +1 -1
  83. package/components/order/index.esm.js +1190 -850
  84. package/components/order/index.umd.cjs +6 -6
  85. package/components/page-footer/index.esm.js +331 -48
  86. package/components/page-footer/index.umd.cjs +1 -1
  87. package/components/page-header/index.esm.js +110 -116
  88. package/components/page-header/index.umd.cjs +1 -1
  89. package/components/pagination/index.esm.js +509 -232
  90. package/components/pagination/index.umd.cjs +1 -1
  91. package/components/progress/index.esm.js +353 -148
  92. package/components/progress/index.umd.cjs +3 -3
  93. package/components/property-editor/index.esm.js +157 -153
  94. package/components/property-editor/index.umd.cjs +1 -1
  95. package/components/property-panel/index.esm.js +1825 -871
  96. package/components/property-panel/index.umd.cjs +12 -5
  97. package/components/query-solution/index.css +1 -1
  98. package/components/query-solution/index.esm.js +6075 -3863
  99. package/components/query-solution/index.umd.cjs +13 -6
  100. package/components/response-layout/index.esm.js +1 -1
  101. package/components/response-layout/index.umd.cjs +1 -1
  102. package/components/response-layout-editor/index.esm.js +1 -1
  103. package/components/response-layout-editor/index.umd.cjs +1 -1
  104. package/components/schema-selector/index.esm.js +2447 -2221
  105. package/components/schema-selector/index.umd.cjs +7 -7
  106. package/components/search-box/index.esm.js +244 -72
  107. package/components/search-box/index.umd.cjs +1 -1
  108. package/components/section/index.esm.js +134 -133
  109. package/components/section/index.umd.cjs +2 -2
  110. package/components/smoke-detector/index.esm.js +179 -8
  111. package/components/smoke-detector/index.umd.cjs +1 -1
  112. package/components/sort-condition-editor/index.css +1 -0
  113. package/components/sort-condition-editor/index.esm.js +9488 -4
  114. package/components/sort-condition-editor/index.umd.cjs +427 -1
  115. package/components/splitter/index.esm.js +1172 -142
  116. package/components/splitter/index.umd.cjs +1 -1
  117. package/components/step/index.esm.js +47 -48
  118. package/components/step/index.umd.cjs +1 -1
  119. package/components/tabs/index.esm.js +490 -419
  120. package/components/tabs/index.umd.cjs +1 -1
  121. package/components/text/index.esm.js +217 -73
  122. package/components/text/index.umd.cjs +1 -1
  123. package/components/textarea/index.esm.js +29 -27
  124. package/components/textarea/index.umd.cjs +2 -2
  125. package/components/transfer/index.esm.js +760 -543
  126. package/components/transfer/index.umd.cjs +5 -5
  127. package/components/tree-grid/index.esm.js +105 -104
  128. package/components/tree-grid/index.umd.cjs +1 -1
  129. package/components/tree-view/index.esm.js +320 -153
  130. package/components/tree-view/index.umd.cjs +1 -1
  131. package/components/uploader/index.esm.js +1125 -634
  132. package/components/uploader/index.umd.cjs +2 -2
  133. package/components/verify-detail/index.esm.js +359 -106
  134. package/components/verify-detail/index.umd.cjs +1 -1
  135. package/components/video/index.esm.js +222 -89
  136. package/components/video/index.umd.cjs +1 -1
  137. package/components/weather/index.esm.js +290 -199
  138. package/components/weather/index.umd.cjs +1 -1
  139. package/designer/data-grid/index.esm.js +5191 -4407
  140. package/designer/data-grid/index.umd.cjs +17 -10
  141. package/designer/drawer/index.esm.js +576 -567
  142. package/designer/drawer/index.umd.cjs +2 -2
  143. package/designer/dynamic-form/index.esm.js +1418 -1154
  144. package/designer/dynamic-form/index.umd.cjs +8 -1
  145. package/designer/farris-designer.all.esm.js +12665 -12117
  146. package/designer/farris-designer.all.umd.cjs +12 -12
  147. package/designer/list-view/index.esm.js +327 -327
  148. package/designer/list-view/index.umd.cjs +3 -3
  149. package/designer/modal/index.esm.js +29 -137
  150. package/designer/modal/index.umd.cjs +1 -1
  151. package/designer/radio-group/index.esm.js +0 -1
  152. package/designer/radio-group/index.umd.cjs +1 -1
  153. package/designer/response-layout-editor/index.esm.js +1 -1
  154. package/designer/response-layout-editor/index.umd.cjs +1 -1
  155. package/designer/response-toolbar/index.esm.js +9 -9
  156. package/designer/response-toolbar/index.umd.cjs +1 -1
  157. package/designer/section/index.esm.js +1 -6
  158. package/designer/section/index.umd.cjs +1 -1
  159. package/designer/tabs/index.esm.js +2829 -2540
  160. package/designer/tabs/index.umd.cjs +2 -2
  161. package/designer/tree-grid/index.esm.js +822 -464
  162. package/designer/tree-grid/index.umd.cjs +1 -1
  163. package/farris.all.esm.js +69725 -68244
  164. package/farris.all.umd.cjs +92 -92
  165. package/index.css +1 -1
  166. package/package.json +1 -1
  167. package/types/accordion/src/accordion.props.d.ts +1 -0
  168. package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
  169. package/types/avatar/src/avatar.props.d.ts +1 -0
  170. package/types/binding-selector/index.d.ts +54 -0
  171. package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
  172. package/types/button-group/index.d.ts +0 -15
  173. package/types/button-group/src/button-group.props.d.ts +1 -0
  174. package/types/code-editor/index.d.ts +1 -0
  175. package/types/code-editor/src/code-textbox.component.d.ts +6 -6
  176. package/types/code-editor/src/code-textbox.props.d.ts +2 -0
  177. package/types/color-picker/index.d.ts +15 -0
  178. package/types/color-picker/src/color-picker.props.d.ts +1 -0
  179. package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
  180. package/types/combo-list/src/property-config/combo-list.property-config.d.ts +14 -2
  181. package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
  182. package/types/component/index.d.ts +2 -0
  183. package/types/component/src/component.props.d.ts +8 -0
  184. package/types/components.d.ts +6 -1
  185. package/types/condition/index.d.ts +55 -0
  186. package/types/designer-toolbox/index.d.ts +3 -0
  187. package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
  188. package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
  189. package/types/designer-toolbox/src/types.d.ts +21 -0
  190. package/types/designer.d.ts +13 -0
  191. package/types/dropdown/index.d.ts +6 -27
  192. package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
  193. package/types/dropdown/src/dropdown.props.d.ts +1 -0
  194. package/types/dynamic-form/designer.d.ts +1 -3
  195. package/types/dynamic-form/index.d.ts +3 -9
  196. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
  197. package/types/dynamic-resolver/index.d.ts +0 -3
  198. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
  199. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
  200. package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
  201. package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
  202. package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
  203. package/types/dynamic-view/src/components/maps.d.ts +104 -92
  204. package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
  205. package/types/filter-condition-editor/index.d.ts +9 -0
  206. package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
  207. package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
  208. package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
  209. package/types/flow-canvas/index.d.ts +3 -0
  210. package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → flow-canvas/src/components/flow-node-item.component.d.ts} +1 -1
  211. package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
  212. package/types/flow-canvas/src/composition/types.d.ts +42 -0
  213. package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
  214. package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
  215. package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
  216. package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
  217. package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
  218. package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
  219. package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
  220. package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
  221. package/types/index.d.ts +1 -0
  222. package/types/json-editor/src/json-editor.props.d.ts +1 -0
  223. package/types/layout/index.d.ts +0 -1
  224. package/types/layout/src/components/layout-pane.props.d.ts +1 -0
  225. package/types/layout/src/layout.props.d.ts +1 -0
  226. package/types/list-nav/index.d.ts +5 -24
  227. package/types/list-nav/src/list-nav.props.d.ts +1 -0
  228. package/types/list-view/index.d.ts +0 -1
  229. package/types/list-view/src/composition/use-draggable.d.ts +1 -1
  230. package/types/lookup/index.d.ts +1 -1
  231. package/types/lookup/src/components/popup-container.component.d.ts +3 -3
  232. package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
  233. package/types/modal/designer.d.ts +0 -2
  234. package/types/nav/index.d.ts +20 -24
  235. package/types/nav/src/nav.props.d.ts +1 -0
  236. package/types/number-range/src/number-range.props.d.ts +1 -0
  237. package/types/order/index.d.ts +5 -36
  238. package/types/order/src/designer/order.design.component.d.ts +1 -1
  239. package/types/order/src/order.props.d.ts +1 -0
  240. package/types/page-footer/index.d.ts +2 -0
  241. package/types/page-footer/src/page-footer.props.d.ts +1 -0
  242. package/types/pagination/index.d.ts +0 -15
  243. package/types/pagination/src/pagination.props.d.ts +1 -0
  244. package/types/progress/src/progress.props.d.ts +1 -0
  245. package/types/query-solution/index.d.ts +1 -1
  246. package/types/radio-group/designer.d.ts +1 -2
  247. package/types/search-box/index.d.ts +17 -1
  248. package/types/search-box/src/search-box.props.d.ts +1 -0
  249. package/types/section/designer.d.ts +0 -1
  250. package/types/smoke-detector/index.d.ts +2 -0
  251. package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
  252. package/types/sort-condition-editor/index.d.ts +7 -2
  253. package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
  254. package/types/splitter/index.d.ts +0 -1
  255. package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
  256. package/types/splitter/src/splitter.props.d.ts +1 -0
  257. package/types/tabs/designer.d.ts +0 -1
  258. package/types/tabs/index.d.ts +1 -0
  259. package/types/text/index.d.ts +20 -24
  260. package/types/text/src/text.props.d.ts +1 -0
  261. package/types/transfer/src/transfer.props.d.ts +1 -0
  262. package/types/tree-view/src/tree-view.props.d.ts +1 -0
  263. package/types/uploader/src/uploader.props.d.ts +1 -0
  264. package/types/verify-detail/index.d.ts +5 -58
  265. package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
  266. package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
  267. package/types/video/index.d.ts +20 -24
  268. package/types/video/src/video.props.d.ts +1 -0
  269. package/components/dynamic-form/index.css +0 -1
  270. package/designer/accordion/index.esm.js +0 -257
  271. package/designer/accordion/index.umd.cjs +0 -1
  272. package/designer/avatar/index.esm.js +0 -1460
  273. package/designer/avatar/index.umd.cjs +0 -1
  274. package/designer/binding-selector/index.esm.js +0 -792
  275. package/designer/binding-selector/index.umd.cjs +0 -1
  276. package/designer/button-group/index.esm.js +0 -282
  277. package/designer/button-group/index.umd.cjs +0 -1
  278. package/designer/code-editor/index.esm.js +0 -75
  279. package/designer/code-editor/index.umd.cjs +0 -1
  280. package/designer/color-picker/index.esm.js +0 -1096
  281. package/designer/color-picker/index.umd.cjs +0 -1
  282. package/designer/combo-list/index.esm.js +0 -1095
  283. package/designer/combo-list/index.umd.cjs +0 -1
  284. package/designer/combo-tree/index.esm.js +0 -186
  285. package/designer/combo-tree/index.umd.cjs +0 -1
  286. package/designer/component/index.css +0 -1
  287. package/designer/component/index.esm.js +0 -5002
  288. package/designer/component/index.umd.cjs +0 -1
  289. package/designer/condition/index.esm.js +0 -1899
  290. package/designer/condition/index.umd.cjs +0 -1
  291. package/designer/dropdown/index.esm.js +0 -261
  292. package/designer/dropdown/index.umd.cjs +0 -1
  293. package/designer/expression-editor/index.css +0 -1
  294. package/designer/expression-editor/index.esm.js +0 -7006
  295. package/designer/expression-editor/index.umd.cjs +0 -427
  296. package/designer/filter-condition-editor/index.css +0 -1
  297. package/designer/filter-condition-editor/index.esm.js +0 -4795
  298. package/designer/filter-condition-editor/index.umd.cjs +0 -1
  299. package/designer/html-template/index.esm.js +0 -718
  300. package/designer/html-template/index.umd.cjs +0 -1
  301. package/designer/image-cropper/index.esm.js +0 -765
  302. package/designer/image-cropper/index.umd.cjs +0 -1
  303. package/designer/json-editor/index.esm.js +0 -83
  304. package/designer/json-editor/index.umd.cjs +0 -1
  305. package/designer/language-textbox/index.esm.js +0 -783
  306. package/designer/language-textbox/index.umd.cjs +0 -8
  307. package/designer/layout/index.esm.js +0 -430
  308. package/designer/layout/index.umd.cjs +0 -1
  309. package/designer/list-nav/index.esm.js +0 -802
  310. package/designer/list-nav/index.umd.cjs +0 -1
  311. package/designer/lookup/index.esm.js +0 -2083
  312. package/designer/lookup/index.umd.cjs +0 -1
  313. package/designer/menu-lookup/index.esm.js +0 -46
  314. package/designer/menu-lookup/index.umd.cjs +0 -1
  315. package/designer/nav/index.esm.js +0 -284
  316. package/designer/nav/index.umd.cjs +0 -1
  317. package/designer/number-range/index.esm.js +0 -1616
  318. package/designer/number-range/index.umd.cjs +0 -1
  319. package/designer/order/index.css +0 -1
  320. package/designer/order/index.esm.js +0 -2196
  321. package/designer/order/index.umd.cjs +0 -18
  322. package/designer/page-footer/index.esm.js +0 -290
  323. package/designer/page-footer/index.umd.cjs +0 -1
  324. package/designer/page-header/index.esm.js +0 -1003
  325. package/designer/page-header/index.umd.cjs +0 -1
  326. package/designer/pagination/index.esm.js +0 -591
  327. package/designer/pagination/index.umd.cjs +0 -1
  328. package/designer/progress/index.esm.js +0 -213
  329. package/designer/progress/index.umd.cjs +0 -1
  330. package/designer/search-box/index.esm.js +0 -245
  331. package/designer/search-box/index.umd.cjs +0 -1
  332. package/designer/smoke-detector/index.css +0 -1
  333. package/designer/smoke-detector/index.esm.js +0 -178
  334. package/designer/smoke-detector/index.umd.cjs +0 -1
  335. package/designer/sort-condition-editor/index.esm.js +0 -138
  336. package/designer/sort-condition-editor/index.umd.cjs +0 -1
  337. package/designer/splitter/index.esm.js +0 -1120
  338. package/designer/splitter/index.umd.cjs +0 -1
  339. package/designer/step/index.esm.js +0 -226
  340. package/designer/step/index.umd.cjs +0 -1
  341. package/designer/text/index.esm.js +0 -147
  342. package/designer/text/index.umd.cjs +0 -1
  343. package/designer/transfer/index.esm.js +0 -254
  344. package/designer/transfer/index.umd.cjs +0 -1
  345. package/designer/tree-view/index.esm.js +0 -313
  346. package/designer/tree-view/index.umd.cjs +0 -1
  347. package/designer/uploader/index.esm.js +0 -1190
  348. package/designer/uploader/index.umd.cjs +0 -2
  349. package/designer/verify-detail/index.esm.js +0 -258
  350. package/designer/verify-detail/index.umd.cjs +0 -1
  351. package/designer/video/index.esm.js +0 -136
  352. package/designer/video/index.umd.cjs +0 -1
  353. package/designer/weather/index.css +0 -1
  354. package/designer/weather/index.esm.js +0 -6244
  355. package/designer/weather/index.umd.cjs +0 -14
  356. package/types/accordion/designer.d.ts +0 -44
  357. package/types/avatar/designer.d.ts +0 -29
  358. package/types/button-group/designer.d.ts +0 -29
  359. package/types/code-editor/designer.d.ts +0 -5
  360. package/types/color-picker/designer.d.ts +0 -29
  361. package/types/combo-list/designer.d.ts +0 -29
  362. package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
  363. package/types/combo-tree/designer.d.ts +0 -5
  364. package/types/component/designer.d.ts +0 -35
  365. package/types/condition/designer.d.ts +0 -56
  366. package/types/dropdown/designer.d.ts +0 -6
  367. package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
  368. package/types/expression-editor/designer.d.ts +0 -9
  369. package/types/filter-condition-editor/designer.d.ts +0 -10
  370. package/types/html-template/designer.d.ts +0 -31
  371. package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
  372. package/types/image-cropper/designer.d.ts +0 -4
  373. package/types/json-editor/designer.d.ts +0 -5
  374. package/types/layout/designer.d.ts +0 -32
  375. package/types/list-nav/designer.d.ts +0 -6
  376. package/types/menu-lookup/designer.d.ts +0 -5
  377. package/types/nav/designer.d.ts +0 -6
  378. package/types/number-range/designer.d.ts +0 -29
  379. package/types/order/designer.d.ts +0 -6
  380. package/types/page-footer/designer.d.ts +0 -6
  381. package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
  382. package/types/pagination/designer.d.ts +0 -29
  383. package/types/progress/designer.d.ts +0 -29
  384. package/types/search-box/designer.d.ts +0 -52
  385. package/types/smoke-detector/designer.d.ts +0 -6
  386. package/types/sort-condition-editor/designer.d.ts +0 -9
  387. package/types/splitter/designer.d.ts +0 -32
  388. package/types/step/designer.d.ts +0 -6
  389. package/types/text/designer.d.ts +0 -6
  390. package/types/transfer/designer.d.ts +0 -35
  391. package/types/tree-view/designer.d.ts +0 -29
  392. package/types/uploader/designer.d.ts +0 -141
  393. package/types/verify-detail/designer.d.ts +0 -6
  394. package/types/video/designer.d.ts +0 -6
  395. /package/{designer → components}/condition/index.css +0 -0
  396. /package/{designer → components}/uploader/index.css +0 -0
@@ -1,17 +1,19 @@
1
- var Ee = Object.defineProperty;
2
- var Be = (t, e, l) => e in t ? Ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : t[e] = l;
3
- var U = (t, e, l) => Be(t, typeof e != "symbol" ? e + "" : e, l);
4
- import { defineComponent as $, toRefs as fe, createVNode as n, Fragment as _, createTextVNode as T, ref as B, watch as q, inject as Q, getCurrentInstance as He, onMounted as Se, onUnmounted as pe, computed as A, reactive as Pe, createApp as De, Transition as Ae, mergeProps as Me, provide as Ne, resolveComponent as V } from "vue";
5
- import { useDateFormat as Oe, withInstall as Re } from "../common/index.esm.js";
6
- import { LocaleService as de } from "../locale/index.esm.js";
7
- const Ue = {
1
+ var Oe = Object.defineProperty;
2
+ var Ue = (t, e, n) => e in t ? Oe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var L = (t, e, n) => Ue(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { defineComponent as K, toRefs as fe, createVNode as l, Fragment as J, createTextVNode as x, ref as B, watch as Q, inject as Z, getCurrentInstance as Ie, onMounted as ve, onUnmounted as me, computed as N, reactive as ze, createApp as je, Transition as Le, mergeProps as qe, provide as $e, resolveComponent as V, onBeforeMount as Ve } from "vue";
5
+ import { resolveAppearance as _e, createPropsResolver as Qe } from "../dynamic-resolver/index.esm.js";
6
+ import { useDateFormat as Ke, withInstall as We } from "../common/index.esm.js";
7
+ import { LocaleService as ce } from "../locale/index.esm.js";
8
+ import { useDesignerComponent as Ye } from "../designer-canvas/index.esm.js";
9
+ const Xe = {
8
10
  // 是否被选中
9
11
  checked: { type: Boolean, default: !1 },
10
12
  // 进度条状态 默认'normal'
11
13
  id: { type: String, default: "" },
12
14
  // 禁用
13
15
  disabled: { type: Boolean, default: !1 }
14
- }, Le = {
16
+ }, Ge = {
15
17
  // 是否显示进度条信息
16
18
  showInfo: { type: Boolean, default: !0 },
17
19
  // 进度条状态 默认'normal'
@@ -19,7 +21,7 @@ const Ue = {
19
21
  // 已完成的分段百分比
20
22
  percent: { type: Number, default: 0 },
21
23
  maxWidth: { type: Number, default: 0 }
22
- }, je = {
24
+ }, Je = {
23
25
  /**
24
26
  * 按钮文本
25
27
  */
@@ -52,123 +54,402 @@ const Ue = {
52
54
  * 附件服务器端服务注入的Token
53
55
  */
54
56
  uploadServerToken: { type: String, default: "" }
55
- }, ze = /* @__PURE__ */ $({
57
+ }, Ze = /* @__PURE__ */ K({
56
58
  name: "FUploadProgress",
57
- props: Le,
59
+ props: Ge,
58
60
  setup(t, e) {
59
61
  const {
60
- showInfo: l,
61
- status: i,
62
+ showInfo: n,
63
+ status: s,
62
64
  maxWidth: a,
63
- percent: s
65
+ percent: i
64
66
  } = fe(t);
65
- return () => n("div", {
66
- class: ["f-progress upload-progress", "upload-progress-status-" + i.value, "f-progress-status-" + i.value, "upload-progress-line", l.value ? "upload-progress-show-info" : ""]
67
- }, [n("div", {
67
+ return () => l("div", {
68
+ class: ["f-progress upload-progress", "upload-progress-status-" + s.value, "f-progress-status-" + s.value, "upload-progress-line", n.value ? "upload-progress-show-info" : ""]
69
+ }, [l("div", {
68
70
  class: "upload-progress-outer",
69
71
  style: {
70
72
  "max-width": a.value > 0 ? a.value + "px" : "auto"
71
73
  }
72
- }, [n("div", {
74
+ }, [l("div", {
73
75
  class: "upload-progress-inner"
74
- }, [n("div", {
76
+ }, [l("div", {
75
77
  class: "upload-progress-bg f-progress-bg",
76
78
  style: {
77
- width: s.value + "%"
79
+ width: i.value + "%"
78
80
  }
79
- }, null)])]), l.value ? n("span", {
81
+ }, null)])]), n.value ? l("span", {
80
82
  class: "upload-progress-text"
81
- }, [i.value === "error" || i.value === "success" ? n("span", {
82
- class: ["upload-progress-text-icon f-icon", "f-icon-" + i.value]
83
- }, null) : n(_, null, [s.value, T("%")])]) : ""]);
83
+ }, [s.value === "error" || s.value === "success" ? l("span", {
84
+ class: ["upload-progress-text-icon f-icon", "f-icon-" + s.value]
85
+ }, null) : l(J, null, [i.value, x("%")])]) : ""]);
84
86
  }
85
- }), Ie = /* @__PURE__ */ $({
87
+ }), Te = /* @__PURE__ */ K({
86
88
  name: "FPreviewCheckbox",
87
- props: Ue,
89
+ props: Xe,
88
90
  emits: ["checkedChange"],
89
91
  setup(t, e) {
90
92
  const {
91
- disabled: l
92
- } = fe(t), i = B(t.checked), a = (s) => {
93
- s.stopPropagation(), l.value || (i.value = !i.value, e.emit("checkedChange", {
94
- checked: i.value,
93
+ disabled: n
94
+ } = fe(t), s = B(t.checked), a = (i) => {
95
+ i.stopPropagation(), n.value || (s.value = !s.value, e.emit("checkedChange", {
96
+ checked: s.value,
95
97
  id: t.id
96
98
  }));
97
99
  };
98
- return q(() => t.checked, (s) => {
99
- i.value = s;
100
- }), () => n("div", {
100
+ return Q(() => t.checked, (i) => {
101
+ s.value = i;
102
+ }), () => l("div", {
101
103
  class: "preview-checkbox d-inline-flex align-middle"
102
- }, [n("div", {
104
+ }, [l("div", {
103
105
  class: "custom-control custom-checkbox f-checkradio-single m-0"
104
- }, [n("input", {
106
+ }, [l("input", {
105
107
  title: "custom-control-input",
106
108
  class: "custom-control-input",
107
109
  type: "checkbox",
108
- disabled: l.value,
109
- checked: i.value
110
- }, null), n("label", {
110
+ disabled: n.value,
111
+ checked: s.value
112
+ }, null), l("label", {
111
113
  class: "custom-control-label",
112
- onClick: (s) => a(s),
113
- onMousedown: (s) => s.stopPropagation()
114
+ onClick: (i) => a(i),
115
+ onMousedown: (i) => i.stopPropagation()
114
116
  }, null)])]);
115
117
  }
116
- }), qe = /* @__PURE__ */ $({
118
+ }), Ee = /* @__PURE__ */ K({
117
119
  name: "FFileSelect",
118
- props: je,
120
+ props: Je,
119
121
  emits: ["change", "stateChange"],
120
122
  setup(t, e) {
121
- const l = Q("uploaderService");
122
- l.setUploadContext(e);
123
- const i = He(), a = B("*");
124
- let s;
125
- const c = () => {
126
- s.files && (e.emit("change", s.files), l.handleFiles(s.files), s.value = null);
123
+ const n = Z("uploaderService");
124
+ n.setUploadContext(e);
125
+ const s = Ie(), a = B("*");
126
+ let i;
127
+ const d = () => {
128
+ i.files && (e.emit("change", i.files), n.handleFiles(i.files), i.value = null);
127
129
  };
128
130
  function u() {
129
- s.value = null, l.reset();
131
+ i.value = null, n.reset();
130
132
  }
131
- q(() => t.disabled, () => {
133
+ Q(() => t.disabled, () => {
132
134
  u();
133
- }), q(() => t.uploadedCount, (p) => {
134
- l.setOptions({
135
- uploadedCount: p
135
+ }), Q(() => t.uploadedCount, (f) => {
136
+ n.setOptions({
137
+ uploadedCount: f
136
138
  });
137
- }), q(() => t.extendConfig, (p) => {
138
- l.setExtendServerConfig(p);
139
+ }), Q(() => t.extendConfig, (f) => {
140
+ n.setExtendServerConfig(f);
139
141
  });
140
- function m(p) {
141
- p && p.stopPropagation(), s.click();
142
+ function v(f) {
143
+ f && f.stopPropagation(), i.click();
142
144
  }
143
- function C(p) {
144
- l.handleUploadEvent(p);
145
+ function C(f) {
146
+ n.handleUploadEvent(f);
145
147
  }
146
- return Se(() => {
147
- var p, F;
148
- s = (p = i == null ? void 0 : i.proxy) == null ? void 0 : p.$refs.uploadInput, u(), l.setOptions(t.options), l.setExtendServerConfig(t.extendConfig), a.value = (((F = t.options) == null ? void 0 : F.allowedContentTypes) || ["*"]).join(",");
149
- }), pe(() => {
148
+ return ve(() => {
149
+ var f, T;
150
+ i = (f = s == null ? void 0 : s.proxy) == null ? void 0 : f.$refs.uploadInput, u(), n.setOptions(t.options), n.setExtendServerConfig(t.extendConfig), a.value = (((T = t.options) == null ? void 0 : T.allowedContentTypes) || ["*"]).join(",");
151
+ }), me(() => {
150
152
  }), e.expose({
151
153
  handleUploadEvent: C
152
- }), () => n(_, null, [n("input", {
154
+ }), () => l(J, null, [l("input", {
153
155
  ref: "uploadInput",
154
156
  type: "file",
155
157
  class: "ffileupload--browser",
156
158
  disabled: t.disabled,
157
159
  multiple: t.enableMulti,
158
160
  accept: a.value,
159
- onChange: () => c(),
161
+ onChange: () => d(),
160
162
  style: "width: 10px",
161
163
  title: "uploadInput"
162
- }, null), n("div", {
164
+ }, null), l("div", {
163
165
  class: ["upload-container", t.disabled ? "f-state-disabled" : ""],
164
- onClick: (p) => m(p),
166
+ onClick: (f) => v(f),
165
167
  title: t.selectText
166
- }, [n("i", {
168
+ }, [l("i", {
167
169
  class: "f-icon f-icon-upload upload-icon",
168
170
  style: "top: 2px;position: relative;"
169
171
  }, null), t.selectText])]);
170
172
  }
171
- }), $e = {
173
+ }), et = "https://json-schema.org/draft/2020-12/schema", tt = "https://farris-design.gitee.io/uploader.schema.json", lt = "uploader", nt = "A Farris Component", it = "object", st = {
174
+ id: {
175
+ description: "The unique identifier for uploader",
176
+ type: "string"
177
+ },
178
+ type: {
179
+ description: "The type string of uploader",
180
+ type: "string",
181
+ default: "uploader"
182
+ },
183
+ appearance: {
184
+ description: "",
185
+ type: "object",
186
+ properties: {
187
+ class: {
188
+ type: "string"
189
+ },
190
+ style: {
191
+ type: "string"
192
+ }
193
+ },
194
+ default: {}
195
+ },
196
+ binding: {
197
+ description: "",
198
+ type: "object",
199
+ default: {}
200
+ },
201
+ disable: {
202
+ type: "boolean",
203
+ default: !1
204
+ },
205
+ placeholder: {
206
+ description: "",
207
+ type: "string",
208
+ default: ""
209
+ },
210
+ readonly: {
211
+ description: "",
212
+ type: "boolean",
213
+ default: !1
214
+ },
215
+ tabindex: {
216
+ description: "",
217
+ type: "number",
218
+ default: -1
219
+ },
220
+ visible: {
221
+ description: "",
222
+ type: "boolean",
223
+ default: !0
224
+ }
225
+ }, at = [
226
+ "id",
227
+ "type"
228
+ ], ot = {
229
+ $schema: et,
230
+ $id: tt,
231
+ title: lt,
232
+ description: nt,
233
+ type: it,
234
+ properties: st,
235
+ required: at
236
+ }, rt = /* @__PURE__ */ new Map([
237
+ ["appearance", _e]
238
+ ]);
239
+ function ut(t, e, n) {
240
+ return e;
241
+ }
242
+ const dt = "uploader", ct = "A Farris Component", pt = "object", ft = {
243
+ basic: {
244
+ description: "Basic Infomation",
245
+ title: "基本信息",
246
+ properties: {
247
+ id: {
248
+ description: "组件标识",
249
+ title: "标识",
250
+ type: "string",
251
+ readonly: !0
252
+ },
253
+ type: {
254
+ description: "组件类型",
255
+ title: "控件类型",
256
+ type: "select",
257
+ editor: {
258
+ type: "waiting for modification",
259
+ enum: []
260
+ }
261
+ }
262
+ }
263
+ },
264
+ appearance: {
265
+ description: "外观",
266
+ title: "外观",
267
+ properties: {
268
+ contentFill: {
269
+ description: "内容填充",
270
+ title: "内容填充",
271
+ type: "boolean"
272
+ }
273
+ }
274
+ },
275
+ server: {
276
+ description: "服务器配置",
277
+ title: "服务器配置",
278
+ properties: {
279
+ rootId: {
280
+ description: "附件服务器根目录",
281
+ title: "附件服务器根目录",
282
+ type: "string"
283
+ },
284
+ formId: {
285
+ description: "必填,根据【附件信息】业务字段所在位置区分:1、在子表,二级目录建议绑定主表ID。2:在主表:二级目录建议填写当前表数据ID",
286
+ title: "二级目录",
287
+ type: "string"
288
+ }
289
+ }
290
+ },
291
+ upload: {
292
+ description: "上传配置",
293
+ title: "上传配置",
294
+ properties: {
295
+ uploadVisible: {
296
+ description: "上传按钮是否可见",
297
+ title: "上传是否可见",
298
+ type: "boolean"
299
+ },
300
+ uploadDisabled: {
301
+ description: "禁用时,上传按钮可见,但不可用",
302
+ title: "上传是否禁用",
303
+ type: "boolean"
304
+ },
305
+ allowEmpty: {
306
+ description: "运行时是否允许不上传附件",
307
+ title: "是否允许为空",
308
+ type: "boolean"
309
+ },
310
+ uploadSelectText: {
311
+ description: "选择文件按钮文本",
312
+ title: "选择文件按钮文本",
313
+ type: "string"
314
+ },
315
+ uploadOptions: {
316
+ description: "附件上传配置",
317
+ title: "附件上传配置",
318
+ type: "cascade",
319
+ isExpand: !0,
320
+ properties: {
321
+ maxUploads: {
322
+ description: "值为0时表示不限制上传个数",
323
+ title: "最大上传个数",
324
+ type: "number"
325
+ },
326
+ maxFileSize: {
327
+ description: "单个附件最大值(MB)",
328
+ title: "单个附件最大值(MB)",
329
+ type: "number"
330
+ },
331
+ allowedContentTypes: {
332
+ description: "允许上传附件类型",
333
+ title: "允许上传附件类型",
334
+ type: "string"
335
+ },
336
+ notAllowedCharsInFileName: {
337
+ description: "文件名禁用字符",
338
+ title: "文件名禁用字符",
339
+ type: "string"
340
+ }
341
+ }
342
+ },
343
+ enableUploadedCount: {
344
+ description: "是否启用已上传个数限制",
345
+ title: "是否启用已上传个数限制",
346
+ type: "select",
347
+ editor: {
348
+ type: "waiting for modification",
349
+ enum: []
350
+ }
351
+ },
352
+ uploadEnableMulti: {
353
+ description: "是否启用多选附件上传",
354
+ title: "是否启用多选附件上传",
355
+ type: "select",
356
+ editor: {
357
+ type: "waiting for modification",
358
+ enum: []
359
+ }
360
+ },
361
+ enableSliceUpload: {
362
+ description: "是否启用分片上传",
363
+ title: "是否启用分片上传",
364
+ type: "select",
365
+ editor: {
366
+ type: "waiting for modification",
367
+ enum: []
368
+ }
369
+ },
370
+ chunkSize: {
371
+ description: "分片上传时,每片的大小。单位:M",
372
+ title: "分片大小(M)",
373
+ type: "number"
374
+ }
375
+ }
376
+ },
377
+ preview: {
378
+ description: "附件预览",
379
+ title: "附件预览",
380
+ properties: {
381
+ previewVisible: {
382
+ description: "预览是否可见",
383
+ title: "预览是否可见",
384
+ type: "boolean"
385
+ },
386
+ previewReadonly: {
387
+ description: "预览是否只读",
388
+ title: "预览是否只读",
389
+ type: "boolean"
390
+ },
391
+ fieldIdKey: {
392
+ description: "附件ID字段",
393
+ title: "附件ID字段",
394
+ type: "string",
395
+ editor: {
396
+ type: "field-selector"
397
+ }
398
+ },
399
+ fileNameKey: {
400
+ description: "附件名称字段",
401
+ title: "附件名称字段",
402
+ type: "string",
403
+ editor: {
404
+ type: "field-selector"
405
+ }
406
+ },
407
+ previewEnableMulti: {
408
+ description: "是否启用批量操作",
409
+ title: "是否启用批量操作",
410
+ type: "boolean"
411
+ },
412
+ noDelete: {
413
+ description: "是否禁止删除附件",
414
+ title: "是否禁止删除附件",
415
+ type: "boolean"
416
+ },
417
+ noPreview: {
418
+ description: "是否禁止预览",
419
+ title: "是否禁止预览",
420
+ type: "boolean"
421
+ },
422
+ previewDateFormat: {
423
+ description: "附件上传时间字段的格式化设置,请注意此属性仅针对附件上传时间一个字段,若有自定义预览列,请在预览列编辑器中单独设置时间格式。",
424
+ title: "附件上传时间格式化",
425
+ type: "select",
426
+ editor: {
427
+ type: "waiting for modification",
428
+ enum: []
429
+ }
430
+ },
431
+ fileSortOrderKey: {
432
+ description: "排序字段",
433
+ title: "排序字段",
434
+ type: "string"
435
+ },
436
+ orderType: {
437
+ description: "排序类型",
438
+ title: "排序类型",
439
+ type: "select",
440
+ editor: {
441
+ type: "waiting for modification",
442
+ enum: []
443
+ }
444
+ }
445
+ }
446
+ }
447
+ }, vt = {
448
+ title: dt,
449
+ description: ct,
450
+ type: pt,
451
+ categories: ft
452
+ }, he = {
172
453
  /** 内容区域填充 */
173
454
  contentFill: { type: Boolean, default: !1 },
174
455
  /** 排序字段 */
@@ -232,68 +513,68 @@ const Ue = {
232
513
  * 提示服务注入的Token
233
514
  */
234
515
  notifyServiceToken: { type: String, default: "" }
235
- };
236
- var L = /* @__PURE__ */ ((t) => (t[t.Queue = 0] = "Queue", t[t.Uploading = 1] = "Uploading", t[t.Done = 2] = "Done", t[t.Cancelled = 3] = "Cancelled", t[t.Remove = 4] = "Remove", t[t.Error = 5] = "Error", t))(L || {});
237
- class Ve {
238
- constructor(e = {}, l = {}) {
516
+ }, Be = Qe(he, ot, rt, ut, vt);
517
+ var q = /* @__PURE__ */ ((t) => (t[t.Queue = 0] = "Queue", t[t.Uploading = 1] = "Uploading", t[t.Done = 2] = "Done", t[t.Cancelled = 3] = "Cancelled", t[t.Remove = 4] = "Remove", t[t.Error = 5] = "Error", t))(q || {});
518
+ class mt {
519
+ constructor(e = {}, n = {}) {
239
520
  /**
240
521
  * 上传配置
241
522
  */
242
- U(this, "uploadConfig");
523
+ L(this, "uploadConfig");
243
524
  /**
244
525
  * 删除配置
245
526
  */
246
- U(this, "removeConfig");
247
- const i = { type: "config", url: "", timeout: 0, headers: null, data: {} };
248
- this.uploadConfig = Object.assign({}, i, e), this.removeConfig = Object.assign({}, i, l);
527
+ L(this, "removeConfig");
528
+ const s = { type: "config", url: "", timeout: 0, headers: null, data: {} };
529
+ this.uploadConfig = Object.assign({}, s, e), this.removeConfig = Object.assign({}, s, n);
249
530
  }
250
531
  }
251
- function ve(t, e) {
252
- const { formatTo: l } = Oe();
253
- return l(t, e);
254
- }
255
532
  function ge(t, e) {
533
+ const { formatTo: n } = Ke();
534
+ return n(t, e);
535
+ }
536
+ function be(t, e) {
256
537
  if (!e)
257
538
  return "";
258
- let l = "";
259
- return t.indexOf(".") === -1 && e.hasOwnProperty(t) ? l = e[t] : l = t.split(".").reduce((i, a) => i ? i[a] : null, e), l;
539
+ let n = "";
540
+ return t.indexOf(".") === -1 && e.hasOwnProperty(t) ? n = e[t] : n = t.split(".").reduce((s, a) => s ? s[a] : null, e), n;
260
541
  }
261
- function _e(t) {
262
- return (e, l) => {
542
+ function ht(t) {
543
+ return (e, n) => {
263
544
  if (!e.hasOwnProperty(t) || e[t] === void 0 || e[t] === null)
264
545
  return 1;
265
- if (!l.hasOwnProperty(t) || l[t] === void 0 || l[t] === null)
546
+ if (!n.hasOwnProperty(t) || n[t] === void 0 || n[t] === null)
266
547
  return -1;
267
548
  if (t !== "createTime") {
268
- let s = "", c = "";
269
- return t.indexOf(".") > -1 ? (s = ge(t, e), c = ge(t, l)) : (s = e[t], c = l[t]), s > c ? 1 : -1;
549
+ let i = "", d = "";
550
+ return t.indexOf(".") > -1 ? (i = be(t, e), d = be(t, n)) : (i = e[t], d = n[t]), i > d ? 1 : -1;
270
551
  }
271
- const i = new Date(e[t]), a = new Date(l[t]);
272
- return i.getTime() > a.getTime() ? -1 : 1;
552
+ const s = new Date(e[t]), a = new Date(n[t]);
553
+ return s.getTime() > a.getTime() ? -1 : 1;
273
554
  };
274
555
  }
275
- function Qe(t) {
276
- return (t || []).findIndex((l) => l === "*") === -1;
556
+ function He(t) {
557
+ return (t || []).findIndex((n) => n === "*") === -1;
277
558
  }
278
- function We(t) {
559
+ function De(t) {
279
560
  return t !== "0 Byte";
280
561
  }
281
- function W(t) {
562
+ function ie(t) {
282
563
  if (t === 0)
283
564
  return "0 Byte";
284
- const e = 1024, l = ["Bytes", "KB", "MB", "GB", "TB", "PB"], i = Math.floor(Math.log(t) / Math.log(e));
285
- return parseFloat((t / e ** i).toFixed(2)) + " " + l[i];
565
+ const e = 1024, n = ["Bytes", "KB", "MB", "GB", "TB", "PB"], s = Math.floor(Math.log(t) / Math.log(e));
566
+ return parseFloat((t / e ** s).toFixed(2)) + " " + n[s];
286
567
  }
287
- function Ke(t, e) {
288
- return t && (t.hasOwnProperty("allowedContentTypes") && (e.allowedContentTypes = t.allowedContentTypes || ["*"], e.allowedContentTypes = e.allowedContentTypes && e.allowedContentTypes.length > 0 ? e.allowedContentTypes : ["*"]), t.hasOwnProperty("maxUploads") && (e.maxUploads = t.maxUploads || 0), t.hasOwnProperty("maxFileSize") && (e.maxFileSize = W(1024 * 1024 * (parseInt(String(t.maxFileSize), 10) || 1)))), e;
568
+ function Ae(t, e) {
569
+ return t && (t.hasOwnProperty("allowedContentTypes") && (e.allowedContentTypes = t.allowedContentTypes || ["*"], e.allowedContentTypes = e.allowedContentTypes && e.allowedContentTypes.length > 0 ? e.allowedContentTypes : ["*"]), t.hasOwnProperty("maxUploads") && (e.maxUploads = t.maxUploads || 0), t.hasOwnProperty("maxFileSize") && (e.maxFileSize = ie(1024 * 1024 * (parseInt(String(t.maxFileSize), 10) || 1)))), e;
289
570
  }
290
- function ye(t) {
571
+ function xe(t) {
291
572
  let e = "ffilepreview--filetype";
292
573
  if (!t)
293
574
  return e + "-any";
294
- const l = t.lastIndexOf(".");
295
- let i = "";
296
- switch (l > -1 && (i = t.substring(l + 1).toLocaleLowerCase()), i) {
575
+ const n = t.lastIndexOf(".");
576
+ let s = "";
577
+ switch (n > -1 && (s = t.substring(n + 1).toLocaleLowerCase()), s) {
297
578
  case "pdf":
298
579
  e += "-pdf";
299
580
  break;
@@ -334,156 +615,156 @@ function ye(t) {
334
615
  }
335
616
  return e;
336
617
  }
337
- function we(t) {
618
+ function Ce(t) {
338
619
  var e;
339
620
  if (t.type === "done")
340
621
  return 100;
341
622
  if (t.file && t.file.progress) {
342
- if (t.file.progress.status === L.Uploading) {
343
- const l = ((e = t.file.progress.data) == null ? void 0 : e.percentage) || 5;
344
- return l > 5 ? l : 5;
623
+ if (t.file.progress.status === q.Uploading) {
624
+ const n = ((e = t.file.progress.data) == null ? void 0 : e.percentage) || 5;
625
+ return n > 5 ? n : 5;
345
626
  }
346
627
  return 5;
347
628
  }
348
629
  return 5;
349
630
  }
350
- function Ye(t) {
631
+ function gt(t) {
351
632
  let e = t;
352
- return t ? (typeof t == "string" && (e = parseInt(t, 10)), W(e)) : "0 Byte";
633
+ return t ? (typeof t == "string" && (e = parseInt(t, 10)), ie(e)) : "0 Byte";
353
634
  }
354
- const Xe = () => Math.random().toString(36).substring(7);
355
- function be(t, e) {
635
+ const wt = () => Math.random().toString(36).substring(7);
636
+ function Fe(t, e) {
356
637
  return {
357
638
  fileIndex: e,
358
- id: Xe(),
639
+ id: wt(),
359
640
  name: t.name,
360
641
  size: t.size,
361
642
  type: t.type,
362
643
  form: new FormData(),
363
644
  progress: {
364
- status: L.Queue,
645
+ status: q.Queue,
365
646
  data: {
366
647
  percentage: 0,
367
648
  speed: 0,
368
- speedHuman: `${W(0)}/s`,
649
+ speedHuman: `${ie(0)}/s`,
369
650
  startTime: null,
370
651
  endTime: null,
371
652
  eta: null,
372
653
  etaHuman: null
373
654
  }
374
655
  },
375
- lastModifiedDate: ve(new Date(t.lastModified), "yyyy-MM-dd HH:mm:ss"),
656
+ lastModifiedDate: ge(new Date(t.lastModified), "yyyy-MM-dd HH:mm:ss"),
376
657
  nativeFile: t
377
658
  };
378
659
  }
379
- function xe(t) {
660
+ function Se(t) {
380
661
  const e = [];
381
- return t.forEach((l) => {
382
- const i = { id: "", name: "", size: 0, type: "", extend: null, extendHeaders: null, createTime: "" };
383
- for (const a in i) {
384
- const s = a.replace("extend", "response").replace("createTime", "lastModifiedDate");
385
- l.hasOwnProperty(s) && (s === "lastModifiedDate" ? i[a] = ve(l[s], "yyyy-MM-dd HH:mm:ss") : i[a] = l[s]);
662
+ return t.forEach((n) => {
663
+ const s = { id: "", name: "", size: 0, type: "", extend: null, extendHeaders: null, createTime: "" };
664
+ for (const a in s) {
665
+ const i = a.replace("extend", "response").replace("createTime", "lastModifiedDate");
666
+ n.hasOwnProperty(i) && (i === "lastModifiedDate" ? s[a] = ge(n[i], "yyyy-MM-dd HH:mm:ss") : s[a] = n[i]);
386
667
  }
387
- e.push(i);
668
+ e.push(s);
388
669
  }), e;
389
670
  }
390
- function Ge(t, e) {
671
+ function yt(t, e) {
391
672
  return t ? e <= t * 1024 * 1024 : !0;
392
673
  }
393
- function Je(t) {
674
+ function bt(t) {
394
675
  return t.find((e) => e === "*") !== void 0;
395
676
  }
396
- function Ze(t, e) {
397
- if (!t || t.length === 0 || Je(t))
677
+ function xt(t, e) {
678
+ if (!t || t.length === 0 || bt(t))
398
679
  return !0;
399
680
  if (e.lastIndexOf(".") < 0)
400
681
  return !1;
401
- const l = e.substr(e.lastIndexOf("."));
682
+ const n = e.substr(e.lastIndexOf("."));
402
683
  return t.findIndex(
403
- (i) => i.toLowerCase() === l.toLowerCase()
684
+ (s) => s.toLowerCase() === n.toLowerCase()
404
685
  ) > -1;
405
686
  }
406
- function et(t) {
687
+ function Ct(t) {
407
688
  if (t)
408
689
  return t.split(`
409
- `).map((e) => e.split(/: */, 2)).filter((e) => e[0]).reduce((e, l) => (e[l[0]] = l[1], e), {});
690
+ `).map((e) => e.split(/: */, 2)).filter((e) => e[0]).reduce((e, n) => (e[n[0]] = n[1], e), {});
410
691
  }
411
- function Ce(t) {
692
+ function ke(t) {
412
693
  return new Date(t * 1e3).toISOString().substr(11, 8);
413
694
  }
414
- class tt extends Ve {
415
- upload(e, l, i, a) {
416
- const s = e[0];
417
- return new Promise((c, u) => {
418
- var R, w;
419
- const m = l.url || i.url || "", C = l.method || "POST", p = l.data || {}, F = l.headers || {}, y = new XMLHttpRequest(), H = (/* @__PURE__ */ new Date()).getTime();
420
- let k = ((R = s.progress) == null ? void 0 : R.data) && s.progress.data.startTime || H, E = 0, g = null;
421
- y.upload.addEventListener("progress", (b) => {
422
- var P;
695
+ class Ft extends mt {
696
+ upload(e, n, s, a) {
697
+ const i = e[0];
698
+ return new Promise((d, u) => {
699
+ var I, y;
700
+ const v = n.url || s.url || "", C = n.method || "POST", f = n.data || {}, T = n.headers || {}, h = new XMLHttpRequest(), D = (/* @__PURE__ */ new Date()).getTime();
701
+ let E = ((I = i.progress) == null ? void 0 : I.data) && i.progress.data.startTime || D, H = 0, g = null;
702
+ h.upload.addEventListener("progress", (b) => {
703
+ var A;
423
704
  if (b.lengthComputable) {
424
- const S = Math.round(b.loaded * 100 / b.total), j = (/* @__PURE__ */ new Date()).getTime() - H;
425
- E = Math.round(b.loaded / j * 1e3), k = ((P = s.progress) == null ? void 0 : P.data) && s.progress.data.startTime || (/* @__PURE__ */ new Date()).getTime(), g = Math.ceil((b.total - b.loaded) / E), s.progress = {
426
- status: L.Uploading,
705
+ const k = Math.round(b.loaded * 100 / b.total), j = (/* @__PURE__ */ new Date()).getTime() - D;
706
+ H = Math.round(b.loaded / j * 1e3), E = ((A = i.progress) == null ? void 0 : A.data) && i.progress.data.startTime || (/* @__PURE__ */ new Date()).getTime(), g = Math.ceil((b.total - b.loaded) / H), i.progress = {
707
+ status: q.Uploading,
427
708
  data: {
428
- percentage: S,
429
- speed: E,
430
- speedHuman: `${W(E)}/s`,
431
- startTime: k,
709
+ percentage: k,
710
+ speed: H,
711
+ speedHuman: `${ie(H)}/s`,
712
+ startTime: E,
432
713
  endTime: null,
433
714
  eta: g,
434
- etaHuman: Ce(g)
715
+ etaHuman: ke(g)
435
716
  }
436
- }, a({ type: "uploading", files: [s] });
717
+ }, a({ type: "uploading", files: [i] });
437
718
  }
438
- }, !1), y.upload.addEventListener("error", (b) => {
719
+ }, !1), h.upload.addEventListener("error", (b) => {
439
720
  u(b);
440
- }), y.onreadystatechange = () => {
441
- if (y.readyState === XMLHttpRequest.DONE) {
442
- const b = Math.round(s.size / ((/* @__PURE__ */ new Date()).getTime() - k) * 1e3);
443
- s.progress = {
444
- status: L.Done,
721
+ }), h.onreadystatechange = () => {
722
+ if (h.readyState === XMLHttpRequest.DONE) {
723
+ const b = Math.round(i.size / ((/* @__PURE__ */ new Date()).getTime() - E) * 1e3);
724
+ i.progress = {
725
+ status: q.Done,
445
726
  data: {
446
727
  percentage: 100,
447
728
  speed: b,
448
- speedHuman: `${W(b)}/s`,
449
- startTime: k,
729
+ speedHuman: `${ie(b)}/s`,
730
+ startTime: E,
450
731
  endTime: (/* @__PURE__ */ new Date()).getTime(),
451
732
  eta: g,
452
- etaHuman: Ce(g || 0)
733
+ etaHuman: ke(g || 0)
453
734
  }
454
- }, s.responseStatus = y.status;
735
+ }, i.responseStatus = h.status;
455
736
  try {
456
- s.response = JSON.parse(y.response);
737
+ i.response = JSON.parse(h.response);
457
738
  } catch {
458
- s.response = y.response;
739
+ i.response = h.response;
459
740
  }
460
- s.responseHeaders = et(y.getAllResponseHeaders()), c({ type: "done", files: [s] });
741
+ i.responseHeaders = Ct(h.getAllResponseHeaders()), d({ type: "done", files: [i] });
461
742
  }
462
- }, y.open(C, m, !0), y.withCredentials = !!l.withCredentials;
743
+ }, h.open(C, v, !0), h.withCredentials = !!n.withCredentials;
463
744
  try {
464
- const b = s.nativeFile;
465
- Object.keys(F).forEach((S) => y.setRequestHeader(S, F[S]));
466
- let P;
467
- l.includeWebKitFormBoundary !== !1 ? (Object.keys(p).forEach((S) => {
745
+ const b = i.nativeFile;
746
+ Object.keys(T).forEach((k) => h.setRequestHeader(k, T[k]));
747
+ let A;
748
+ n.includeWebKitFormBoundary !== !1 ? (Object.keys(f).forEach((k) => {
468
749
  var j;
469
- return (j = s.form) == null ? void 0 : j.append(S, p[S]);
470
- }), (w = s.form) == null || w.append(l.fieldName || "file", b, b.name), P = s.form) : P = b, y.send(P);
750
+ return (j = i.form) == null ? void 0 : j.append(k, f[k]);
751
+ }), (y = i.form) == null || y.append(n.fieldName || "file", b, b.name), A = i.form) : A = b, h.send(A);
471
752
  } catch (b) {
472
753
  u(b);
473
754
  }
474
755
  return () => {
475
- y.abort();
756
+ h.abort();
476
757
  };
477
758
  });
478
759
  }
479
760
  // 删除附件
480
- remove(e, l, i, a) {
481
- return new Promise((s, c) => {
482
- s({ type: "removed", files: e });
761
+ remove(e, n, s, a) {
762
+ return new Promise((i, d) => {
763
+ i({ type: "removed", files: e });
483
764
  });
484
765
  }
485
766
  }
486
- const lt = {
767
+ const St = {
487
768
  showCloseButton: { type: Boolean, default: !0 },
488
769
  position: { type: String, default: "top-center" },
489
770
  timeout: { type: Number, default: 3e3 },
@@ -496,247 +777,247 @@ const lt = {
496
777
  animate: { type: String, default: "fadeIn" },
497
778
  options: { type: Object },
498
779
  safeHtml: { type: Boolean, default: !0 }
499
- }, nt = {
780
+ }, kt = {
500
781
  showCloseButton: { type: Boolean, default: !0 },
501
782
  animate: { type: String, default: "fadeIn" },
502
783
  options: { type: Object }
503
- }, ce = /* @__PURE__ */ $({
784
+ }, pe = /* @__PURE__ */ K({
504
785
  name: "Toast",
505
- props: nt,
786
+ props: kt,
506
787
  emits: ["close", "click"],
507
788
  setup: (t, e) => {
508
- const l = B(t.animate), i = "fadeOut", a = A(() => t.options), s = B(!1), c = A(() => a.value.title && a.value.message), u = A(() => !a.value.title && a.value.message), m = A(() => {
509
- const w = {
510
- animated: s.value,
789
+ const n = B(t.animate), s = "fadeOut", a = N(() => t.options), i = B(!1), d = N(() => a.value.title && a.value.message), u = N(() => !a.value.title && a.value.message), v = N(() => {
790
+ const y = {
791
+ animated: i.value,
511
792
  toast: !0,
512
- "toast--only-content": !c.value
793
+ "toast--only-content": !d.value
513
794
  };
514
- return w[t.animate] = !1, w[i] = s.value, w["toasty-type-" + a.value.type] = !0, a.value.theme && (w[a.value.theme] = !0), w;
515
- }), C = A(() => {
516
- const P = `f-icon-${a.value && a.value.type ? a.value.type.replace("toasty-type-", "") : "default"}`, S = {
795
+ return y[t.animate] = !1, y[s] = i.value, y["toasty-type-" + a.value.type] = !0, a.value.theme && (y[a.value.theme] = !0), y;
796
+ }), C = N(() => {
797
+ const A = `f-icon-${a.value && a.value.type ? a.value.type.replace("toasty-type-", "") : "default"}`, k = {
517
798
  "f-icon": !0
518
799
  };
519
- return S[P] = !0, S;
520
- }), p = A(() => a.value.title || a.value.message), F = A(() => t.showCloseButton), y = A(() => !!a.value.buttons || !!e.slots.default), H = A(() => de.getLocale() === "en" ? {
800
+ return k[A] = !0, k;
801
+ }), f = N(() => a.value.title || a.value.message), T = N(() => t.showCloseButton), h = N(() => !!a.value.buttons || !!e.slots.default), D = N(() => ce.getLocale() === "en" ? {
521
802
  wordBreak: "keep-all",
522
803
  overflowWrap: "break-word"
523
804
  } : {});
524
- function k(w) {
525
- w.stopPropagation(), w.preventDefault(), s.value = !1, setTimeout(() => {
805
+ function E(y) {
806
+ y.stopPropagation(), y.preventDefault(), i.value = !1, setTimeout(() => {
526
807
  e.emit("close", a.value);
527
808
  }, 200);
528
809
  }
529
- function E(w, b) {
810
+ function H(y, b) {
530
811
  }
531
- function g(w) {
532
- return `f-preten-link ${w.customClass ? w.customClass : ""}`;
812
+ function g(y) {
813
+ return `f-preten-link ${y.customClass ? y.customClass : ""}`;
533
814
  }
534
- q(l, () => {
535
- l.value;
815
+ Q(n, () => {
816
+ n.value;
536
817
  });
537
- const R = () => {
538
- var w;
539
- return n(_, null, [n("div", {
818
+ const I = () => {
819
+ var y;
820
+ return l(J, null, [l("div", {
540
821
  class: "after-toast-msg text-right"
541
- }, [!e.slots.default && ((w = a.value.buttons) == null ? void 0 : w.map((b) => n("span", {
822
+ }, [!e.slots.default && ((y = a.value.buttons) == null ? void 0 : y.map((b) => l("span", {
542
823
  class: g(b),
543
- onClick: (P) => void 0
824
+ onClick: (A) => void 0
544
825
  }, [b.text]))), e.slots.default && e.slots.default()])]);
545
826
  };
546
- return () => n("div", {
547
- class: m.value,
827
+ return () => l("div", {
828
+ class: v.value,
548
829
  style: "min-height:44px"
549
- }, [F.value && n("button", {
550
- title: de.getLocaleValue("messageBox.close"),
830
+ }, [T.value && l("button", {
831
+ title: ce.getLocaleValue("messageBox.close"),
551
832
  class: "toast-close f-btn-icon f-bare",
552
- onClick: k
553
- }, [n("span", {
833
+ onClick: E
834
+ }, [l("span", {
554
835
  class: "f-icon modal_close"
555
- }, null)]), p.value && n("section", {
836
+ }, null)]), f.value && l("section", {
556
837
  class: "modal-tips"
557
- }, [!c.value && n("div", {
838
+ }, [!d.value && l("div", {
558
839
  class: "float-left modal-tips-iconwrap"
559
- }, [n("span", {
840
+ }, [l("span", {
560
841
  class: C.value
561
- }, null)]), n("div", {
842
+ }, null)]), l("div", {
562
843
  class: "modal-tips-content"
563
- }, [c.value && n(_, null, [n("h5", {
844
+ }, [d.value && l(J, null, [l("h5", {
564
845
  class: "toast-title modal-tips-title",
565
846
  innerHTML: a.value.title
566
- }, null), n("p", {
847
+ }, null), l("p", {
567
848
  class: "toast-msg",
568
849
  innerHTML: a.value.message,
569
- style: H.value
570
- }, null), y.value && R()]), u.value && (a.value.buttons ? n("div", {
850
+ style: D.value
851
+ }, null), h.value && I()]), u.value && (a.value.buttons ? l("div", {
571
852
  class: "toast-title-btns-wrapper d-flex"
572
- }, [n("h5", {
853
+ }, [l("h5", {
573
854
  class: "toast-title modal-tips-title only-toast-msg",
574
- style: H.value,
855
+ style: D.value,
575
856
  innerHTML: a.value.message
576
- }, null), n("div", {
857
+ }, null), l("div", {
577
858
  class: "after-toast-title text-right ml-auto"
578
- }, [R()])]) : n("h5", {
859
+ }, [I()])]) : l("h5", {
579
860
  class: "toast-title modal-tips-title only-toast-msg",
580
- style: H.value,
861
+ style: D.value,
581
862
  innerHTML: a.value.message
582
863
  }, null))])])]);
583
864
  }
584
- }), le = /* @__PURE__ */ $({
865
+ }), re = /* @__PURE__ */ K({
585
866
  name: "Notify",
586
- props: lt,
867
+ props: St,
587
868
  emits: ["close", "empty"],
588
869
  setup(t, e) {
589
- const l = A(() => ({
870
+ const n = N(() => ({
590
871
  "farris-notify": !0
591
- })), i = {
872
+ })), s = {
592
873
  left: 12,
593
874
  right: 12,
594
875
  top: 20,
595
876
  bottom: 12
596
- }, a = B(), s = B(t.options), c = B(t.showCloseButton), u = A(() => t.position || "bottom-right"), m = A(() => t.timeout != null ? t.timeout : 3e3), C = A(() => {
597
- const y = t.bottom ? t.bottom : i.bottom, H = t.top ? t.top : i.top, k = {
877
+ }, a = B(), i = B(t.options), d = B(t.showCloseButton), u = N(() => t.position || "bottom-right"), v = N(() => t.timeout != null ? t.timeout : 3e3), C = N(() => {
878
+ const h = t.bottom ? t.bottom : s.bottom, D = t.top ? t.top : s.top, E = {
598
879
  transition: "all 0.2s ease",
599
- left: u.value.indexOf("left") > -1 ? `${t.left ? t.left : i.left}px` : "",
600
- right: u.value.indexOf("right") > -1 ? `${t.right ? t.right : i.right}px` : "",
601
- top: u.value.indexOf("top") > -1 ? `${H}px` : "",
602
- bottom: u.value.indexOf("bottom") > -1 ? `${y}px` : ""
880
+ left: u.value.indexOf("left") > -1 ? `${t.left ? t.left : s.left}px` : "",
881
+ right: u.value.indexOf("right") > -1 ? `${t.right ? t.right : s.right}px` : "",
882
+ top: u.value.indexOf("top") > -1 ? `${D}px` : "",
883
+ bottom: u.value.indexOf("bottom") > -1 ? `${h}px` : ""
603
884
  };
604
- return u.value.indexOf("center") > -1 && (k.left = "50%", k.marginLeft = "calc(-24rem / 2)", u.value === "center-center" && (k.top = "50%", k.transform = "translate(-50%, -50%)")), k;
885
+ return u.value.indexOf("center") > -1 && (E.left = "50%", E.marginLeft = "calc(-24rem / 2)", u.value === "center-center" && (E.top = "50%", E.transform = "translate(-50%, -50%)")), E;
605
886
  });
606
- function p(y) {
887
+ function f(h) {
607
888
  e.emit("close");
608
889
  }
609
- m.value && setTimeout(() => {
610
- p();
611
- }, m.value), e.expose({
612
- closeToast: p,
890
+ v.value && setTimeout(() => {
891
+ f();
892
+ }, v.value), e.expose({
893
+ closeToast: f,
613
894
  container: a,
614
895
  notifyPosition: u
615
896
  });
616
- function F(y, H) {
617
- p();
897
+ function T(h, D) {
898
+ f();
618
899
  }
619
- return () => n("div", {
620
- class: l.value,
900
+ return () => l("div", {
901
+ class: n.value,
621
902
  style: C.value,
622
903
  ref: a
623
- }, [n(ce, {
624
- options: s.value,
625
- showCloseButton: c.value,
904
+ }, [l(pe, {
905
+ options: i.value,
906
+ showCloseButton: d.value,
626
907
  animate: t.animate,
627
- onClose: (y) => F(y, s.value)
908
+ onClose: (h) => T(h, i.value)
628
909
  }, null)]);
629
910
  }
630
911
  });
631
- class Fe {
912
+ class Me {
632
913
  constructor() {
633
- U(this, "notifyRefs", []);
634
- U(this, "globalConfig", Pe({}));
914
+ L(this, "notifyRefs", []);
915
+ L(this, "globalConfig", ze({}));
635
916
  }
636
917
  escapeAllHtml(e) {
637
918
  if (typeof e != "string" || !e)
638
919
  return "";
639
- const l = document.createElement("div");
640
- return l.textContent = e || "", l.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g, "");
920
+ const n = document.createElement("div");
921
+ return n.textContent = e || "", n.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;").replace(/\\r/g, "");
641
922
  }
642
923
  createNotifyInstance(e) {
643
- const l = this, a = Object.assign({
924
+ const n = this, a = Object.assign({
644
925
  timeout: 3e3,
645
926
  position: "bottom-right",
646
927
  showCloseButton: !0,
647
928
  safeHtml: !0
648
929
  }, this.globalConfig, {
649
930
  ...e
650
- }), s = document.createElement("div");
651
- s.style.display = "contents";
652
- const c = De({
931
+ }), i = document.createElement("div");
932
+ i.style.display = "contents";
933
+ const d = je({
653
934
  setup() {
654
935
  var C;
655
936
  const u = B();
656
- function m() {
937
+ function v() {
657
938
  u.value.container.style.transform = "scale(0)", setTimeout(() => {
658
- l.updateNotifyPositionForClose(a, u), c.unmount();
939
+ n.updateNotifyPositionForClose(a, u), d.unmount();
659
940
  }, 220);
660
941
  }
661
942
  if (a.position.indexOf("top") > -1) {
662
- const p = l.getNotifyInstances(a.position), F = p[p.length - 1];
663
- if (F) {
664
- const y = F.value.container.getBoundingClientRect();
665
- a.top = y.bottom;
943
+ const f = n.getNotifyInstances(a.position), T = f[f.length - 1];
944
+ if (T) {
945
+ const h = T.value.container.getBoundingClientRect();
946
+ a.top = h.bottom;
666
947
  }
667
948
  }
668
- return a.safeHtml && ((C = a.options) != null && C.message) && (a.options.message = l.escapeAllHtml(a.options.message)), pe(() => {
669
- document.body.removeChild(s);
670
- }), Se(() => {
671
- l.updateNotifyPositionForCreate(a, u);
672
- }), () => n(Ae, {
949
+ return a.safeHtml && ((C = a.options) != null && C.message) && (a.options.message = n.escapeAllHtml(a.options.message)), me(() => {
950
+ document.body.removeChild(i);
951
+ }), ve(() => {
952
+ n.updateNotifyPositionForCreate(a, u);
953
+ }), () => l(Le, {
673
954
  mode: "out-in",
674
955
  name: "fade",
675
956
  appear: !0
676
957
  }, {
677
- default: () => [n(le, Me({
958
+ default: () => [l(re, qe({
678
959
  ref: u
679
960
  }, a, {
680
- onClose: m
961
+ onClose: v
681
962
  }), null)]
682
963
  });
683
964
  }
684
965
  });
685
- return c.provide("NotifyService", this), document.body.appendChild(s), c.use(de.i18n), c.mount(s), c;
966
+ return d.provide("NotifyService", this), document.body.appendChild(i), d.use(ce.i18n), d.mount(i), d;
686
967
  }
687
968
  getNotifyInstances(e) {
688
- return this.notifyRefs.filter((l) => l.value.notifyPosition === e);
969
+ return this.notifyRefs.filter((n) => n.value.notifyPosition === e);
689
970
  }
690
- updateNotifyPositionForCreate(e, l) {
971
+ updateNotifyPositionForCreate(e, n) {
691
972
  if (this.notifyRefs && this.notifyRefs.length) {
692
- const i = window.innerHeight;
973
+ const s = window.innerHeight;
693
974
  e.position.indexOf("bottom") > -1 && this.getNotifyInstances(e.position).forEach((a) => {
694
- const s = a.value.container.getBoundingClientRect();
695
- a.value.container.style.bottom = s.height + i - s.bottom + "px";
975
+ const i = a.value.container.getBoundingClientRect();
976
+ a.value.container.style.bottom = i.height + s - i.bottom + "px";
696
977
  });
697
978
  }
698
- this.notifyRefs = [...this.notifyRefs, l];
979
+ this.notifyRefs = [...this.notifyRefs, n];
699
980
  }
700
- updateNotifyPositionForClose(e, l) {
701
- const i = this.notifyRefs.indexOf(l);
981
+ updateNotifyPositionForClose(e, n) {
982
+ const s = this.notifyRefs.indexOf(n);
702
983
  if (e.position.indexOf("top") > -1) {
703
- const a = this.getNotifyInstances(e.position), s = a.indexOf(l);
704
- a.slice(s + 1).forEach((c) => {
705
- c.value.container.style.top = c.value.container.offsetTop - c.value.container.offsetHeight + "px";
984
+ const a = this.getNotifyInstances(e.position), i = a.indexOf(n);
985
+ a.slice(i + 1).forEach((d) => {
986
+ d.value.container.style.top = d.value.container.offsetTop - d.value.container.offsetHeight + "px";
706
987
  });
707
988
  }
708
- i > -1 && this.notifyRefs.splice(i, 1);
989
+ s > -1 && this.notifyRefs.splice(s, 1);
709
990
  }
710
991
  show(e) {
711
992
  return this.createNotifyInstance(e);
712
993
  }
713
- buildNotifyProps(e, l) {
714
- let i = "", a = "", s, c, u;
715
- typeof l == "string" ? i = l : l && (i = l.message || "", a = l.title || "", c = l.position || null, u = l.showCloseButton != null ? l.showCloseButton : null, s = l.timeout != null ? l.timeout : null);
994
+ buildNotifyProps(e, n) {
995
+ let s = "", a = "", i, d, u;
996
+ typeof n == "string" ? s = n : n && (s = n.message || "", a = n.title || "", d = n.position || null, u = n.showCloseButton != null ? n.showCloseButton : null, i = n.timeout != null ? n.timeout : null);
716
997
  const C = {
717
998
  options: {
718
999
  type: e,
719
- message: i,
1000
+ message: s,
720
1001
  title: a
721
1002
  }
722
1003
  };
723
- return c != null && (C.position = c), u != null && (C.showCloseButton = u), s != null && (C.timeout = s), C;
1004
+ return d != null && (C.position = d), u != null && (C.showCloseButton = u), i != null && (C.timeout = i), C;
724
1005
  }
725
1006
  info(e) {
726
- const l = this.buildNotifyProps("info", e);
727
- return this.show(l);
1007
+ const n = this.buildNotifyProps("info", e);
1008
+ return this.show(n);
728
1009
  }
729
1010
  success(e) {
730
- const l = this.buildNotifyProps("success", e);
731
- return this.show(l);
1011
+ const n = this.buildNotifyProps("success", e);
1012
+ return this.show(n);
732
1013
  }
733
1014
  warning(e) {
734
- const l = this.buildNotifyProps("warning", e);
735
- return this.show(l);
1015
+ const n = this.buildNotifyProps("warning", e);
1016
+ return this.show(n);
736
1017
  }
737
1018
  error(e) {
738
- const l = this.buildNotifyProps("error", e);
739
- return this.show(l);
1019
+ const n = this.buildNotifyProps("error", e);
1020
+ return this.show(n);
740
1021
  }
741
1022
  close(e) {
742
1023
  e && e.unmount();
@@ -747,162 +1028,162 @@ class Fe {
747
1028
  }), this.notifyRefs.length = 0;
748
1029
  }
749
1030
  }
750
- const st = Symbol("NOTIFY_SERVICE_TOKEN");
751
- le.install = (t) => {
752
- t.component(le.name, le), t.component(ce.name, ce);
753
- const e = new Fe();
754
- t.provide(st, e), t.provide("FNotifyService", e);
1031
+ const Tt = Symbol("NOTIFY_SERVICE_TOKEN");
1032
+ re.install = (t) => {
1033
+ t.component(re.name, re), t.component(pe.name, pe);
1034
+ const e = new Me();
1035
+ t.provide(Tt, e), t.provide("FNotifyService", e);
755
1036
  };
756
- const at = (t = "") => {
1037
+ const Et = (t = "") => {
757
1038
  let e;
758
- return t && Q(t, null) && (e = Q(t)), e || (e = new Fe()), e;
759
- }, it = (t = "") => {
1039
+ return t && Z(t, null) && (e = Z(t)), e || (e = new Me()), e;
1040
+ }, Bt = (t = "") => {
760
1041
  let e;
761
- if (t && Q(t, null)) {
762
- const l = Q(t);
763
- l && l() && (e = l());
1042
+ if (t && Z(t, null)) {
1043
+ const n = Z(t);
1044
+ n && n() && (e = n());
764
1045
  }
765
- return e || (e = new tt()), e;
766
- }, Te = {
767
- getNotify: at,
768
- getServerAPI: it
1046
+ return e || (e = new Ft()), e;
1047
+ }, Pe = {
1048
+ getNotify: Et,
1049
+ getServerAPI: Bt
769
1050
  };
770
- function ot(t, e, l) {
771
- const i = Te.getNotify(t.notifyServiceToken), a = B(t.fileInfos), {
772
- disabled: s,
773
- uploadVisible: c,
1051
+ function Re(t, e, n) {
1052
+ const s = Pe.getNotify(t.notifyServiceToken), a = B(t.fileInfos), {
1053
+ disabled: i,
1054
+ uploadVisible: d,
774
1055
  uploadDisabled: u,
775
- previewVisible: m,
1056
+ previewVisible: v,
776
1057
  orderField: C,
777
- previewEnableMulti: p,
778
- downloadButtonDisable: F,
779
- previewColumns: y,
780
- uploadEnableMulti: H,
781
- previewButtonDisable: k
782
- } = fe(t), E = B(!1), g = B([]), R = A(() => g.value.length), w = B([]), b = B("");
783
- function P(o) {
784
- (!o.length || g.value.length !== o.length) && (E.value = !1);
785
- const v = [...o.map((h) => (h.hasOwnProperty("size") || (h.size = void 0), h.hasOwnProperty("createTime") || (h.createTime = void 0), p.value && (h.checked = !!g.value.find((O) => O.id === h.id) || E.value), h))];
786
- return v.sort(_e(C.value)), p.value && (g.value = [...v].filter((h) => h.checked)), v;
1058
+ previewEnableMulti: f,
1059
+ downloadButtonDisable: T,
1060
+ previewColumns: h,
1061
+ uploadEnableMulti: D,
1062
+ previewButtonDisable: E
1063
+ } = fe(t), H = B(!1), g = B([]), I = N(() => g.value.length), y = B([]), b = B("");
1064
+ function A(o) {
1065
+ (!o.length || g.value.length !== o.length) && (H.value = !1);
1066
+ const m = [...o.map((w) => (w.hasOwnProperty("size") || (w.size = void 0), w.hasOwnProperty("createTime") || (w.createTime = void 0), f.value && (w.checked = !!g.value.find((z) => z.id === w.id) || H.value), w))];
1067
+ return m.sort(ht(C.value)), f.value && (g.value = [...m].filter((w) => w.checked)), m;
787
1068
  }
788
- const S = B(P(a.value));
789
- q(() => t.fileInfos, (o) => {
790
- S.value = P(o);
1069
+ const k = B(A(a.value));
1070
+ Q(() => t.fileInfos, (o) => {
1071
+ k.value = A(o);
791
1072
  });
792
- const j = (o, d) => {
793
- o.stopImmediatePropagation(), e.emit("fileDownloadEvent", { fileInfos: [d], name: "" });
794
- }, ne = (o, d) => {
795
- o.stopImmediatePropagation(), !k.value && e.emit("filePreviewEvent", d);
796
- }, se = (o, d, v) => {
797
- d.checked && (g.value = g.value.filter((h) => h.id !== d.id)), e.emit("fileRemoveEvent", d), v.handleUploadEvent({ type: "remove", file: d });
798
- }, K = (o, d = "preview") => o.formatter ? !0 : d === "preview" ? ["state", "name", "action", "size", "createTime"].findIndex((h) => h === o.field) > -1 : d === "upload" ? ["state", "name", "size"].findIndex((h) => h === o.field) > -1 : !1, Y = (o) => !(o.field === "state" && (u.value || !c.value)), ae = (o) => o.lastIndexOf(".") > 0 ? o.substring(0, o.lastIndexOf(".")) : "", X = (o) => {
799
- if (o.stopImmediatePropagation(), R.value > 1) {
800
- let d = "";
801
- d = ae(g.value[0].name), e.emit("fileDownloadEvent", {
1073
+ const j = (o, c) => {
1074
+ o.stopImmediatePropagation(), e.emit("fileDownloadEvent", { fileInfos: [c], name: "" });
1075
+ }, ee = (o, c) => {
1076
+ o.stopImmediatePropagation(), !E.value && e.emit("filePreviewEvent", c);
1077
+ }, te = (o, c, m) => {
1078
+ c.checked && (g.value = g.value.filter((w) => w.id !== c.id)), e.emit("fileRemoveEvent", c), m.handleUploadEvent({ type: "remove", file: c });
1079
+ }, W = (o, c = "preview") => o.formatter ? !0 : c === "preview" ? ["state", "name", "action", "size", "createTime"].findIndex((w) => w === o.field) > -1 : c === "upload" ? ["state", "name", "size"].findIndex((w) => w === o.field) > -1 : !1, Y = (o) => !(o.field === "state" && (u.value || !d.value)), le = (o) => o.lastIndexOf(".") > 0 ? o.substring(0, o.lastIndexOf(".")) : "", X = (o) => {
1080
+ if (o.stopImmediatePropagation(), I.value > 1) {
1081
+ let c = "";
1082
+ c = le(g.value[0].name), e.emit("fileDownloadEvent", {
802
1083
  fileInfos: g.value,
803
- name: d
1084
+ name: c
804
1085
  });
805
1086
  }
806
- }, ie = (o) => {
1087
+ }, _ = (o) => {
807
1088
  o.stopImmediatePropagation(), e.emit("fileRemoveEvent", g.value);
808
1089
  }, G = (o) => {
809
- const d = S.value;
810
- o.checked ? (d.forEach((v) => {
811
- v.checked = !0;
812
- }), g.value = [...S.value], E.value = !0) : (g.value = [], d.forEach((v) => {
813
- v.checked = !1;
814
- }), E.value = !1), e.emit("previewMultiSelectedEvent", g.value);
815
- }, N = (o, d) => {
816
- o && (o.stopImmediatePropagation(), o.stopPropagation()), (!b.value || d.id !== b.value) && (b.value = d.id, e.emit("selectedEvent", d));
817
- }, oe = (o) => {
818
- const d = g.value.findIndex((O) => O.id === o.id), v = d > -1, h = S.value.find((O) => O.id === o.id);
819
- h && (h.checked = o.checked), o.checked && !v && h && g.value.push(h), !o.checked && v && g.value.splice(d, 1), S.value.length > 0 && (g.value.length === S.value.length ? E.value = !0 : E.value = !1), N(null, h), e.emit("previewMultiSelectedEvent", g.value);
820
- }, J = (o) => {
821
- var d;
822
- (d = l == null ? void 0 : l.value) == null || d.handleUploadEvent(o);
823
- }, re = (o) => {
824
- J({ type: "upload", file: o });
825
- }, I = (o, d) => {
826
- let v = [];
827
- o.files && o.files.length > 0 ? v = o.files : typeof o.file < "u" && (v = [o.file]), d = d || o.type, v.map((h) => {
828
- const O = w.value.findIndex((z) => {
829
- var te;
830
- return typeof h < "u" && ((te = z == null ? void 0 : z.file) == null ? void 0 : te.id) === h.id;
1090
+ const c = k.value;
1091
+ o.checked ? (c.forEach((m) => {
1092
+ m.checked = !0;
1093
+ }), g.value = [...k.value], H.value = !0) : (g.value = [], c.forEach((m) => {
1094
+ m.checked = !1;
1095
+ }), H.value = !1), e.emit("previewMultiSelectedEvent", g.value);
1096
+ }, M = (o, c) => {
1097
+ o && (o.stopImmediatePropagation(), o.stopPropagation()), (!b.value || c.id !== b.value) && (b.value = c.id, e.emit("selectedEvent", c));
1098
+ }, F = (o) => {
1099
+ const c = g.value.findIndex((z) => z.id === o.id), m = c > -1, w = k.value.find((z) => z.id === o.id);
1100
+ w && (w.checked = o.checked), o.checked && !m && w && g.value.push(w), !o.checked && m && g.value.splice(c, 1), k.value.length > 0 && (g.value.length === k.value.length ? H.value = !0 : H.value = !1), M(null, w), e.emit("previewMultiSelectedEvent", g.value);
1101
+ }, O = (o) => {
1102
+ var c;
1103
+ (c = n == null ? void 0 : n.value) == null || c.handleUploadEvent(o);
1104
+ }, ne = (o) => {
1105
+ O({ type: "upload", file: o });
1106
+ }, P = (o, c) => {
1107
+ let m = [];
1108
+ o.files && o.files.length > 0 ? m = o.files : typeof o.file < "u" && (m = [o.file]), c = c || o.type, m.map((w) => {
1109
+ const z = y.value.findIndex(($) => {
1110
+ var oe;
1111
+ return typeof w < "u" && ((oe = $ == null ? void 0 : $.file) == null ? void 0 : oe.id) === w.id;
831
1112
  });
832
- O > -1 && (w.value[O] = { type: d, file: h });
1113
+ z > -1 && (y.value[z] = { type: c, file: w });
833
1114
  });
834
- }, ue = (o) => {
1115
+ }, de = (o) => {
835
1116
  if (o.files) {
836
- const d = o.files.map((v) => v.id);
837
- w.value = w.value.filter((v) => !(d.findIndex((O) => {
838
- var z;
839
- return O === ((z = v == null ? void 0 : v.file) == null ? void 0 : z.id);
840
- }) > -1)), J({
1117
+ const c = o.files.map((m) => m.id);
1118
+ y.value = y.value.filter((m) => !(c.findIndex((z) => {
1119
+ var $;
1120
+ return z === (($ = m == null ? void 0 : m.file) == null ? void 0 : $.id);
1121
+ }) > -1)), O({
841
1122
  type: "hide",
842
- id: d.join(",")
1123
+ id: c.join(",")
843
1124
  });
844
1125
  }
845
- }, Z = (o) => {
846
- let d = "warning";
847
- (o.type === "cancelled" || o.type === "removed") && (d = "success");
848
- const v = o.hasOwnProperty("message") ? o.message : "";
849
- i.show({
850
- options: { type: d, message: v },
1126
+ }, se = (o) => {
1127
+ let c = "warning";
1128
+ (o.type === "cancelled" || o.type === "removed") && (c = "success");
1129
+ const m = o.hasOwnProperty("message") ? o.message : "";
1130
+ s.show({
1131
+ options: { type: c, message: m },
851
1132
  position: "top-center"
852
1133
  });
853
- }, ee = (o) => {
1134
+ }, ae = (o) => {
854
1135
  if (o.type === "addedToQueue" && typeof o.file < "u")
855
- w.value.push({ type: o.type, file: o.file }), re(o.file);
1136
+ y.value.push({ type: o.type, file: o.file }), ne(o.file);
856
1137
  else if (o.type === "start")
857
- I(o, "start");
1138
+ P(o, "start");
858
1139
  else if (o.type === "done") {
859
- I(o, "done");
860
- const d = (o.files || []).map((v) => ({
1140
+ P(o, "done");
1141
+ const c = (o.files || []).map((m) => ({
861
1142
  checked: !1,
862
- id: v.id,
863
- name: v.name,
864
- size: v.size,
865
- createTime: ve(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss")
1143
+ id: m.id,
1144
+ name: m.name,
1145
+ size: m.size,
1146
+ createTime: ge(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss")
866
1147
  }));
867
- a.value = [...d, ...S.value], ue(o), e.emit("fUploadDoneEvent", xe(o.files || [])), e.emit("uploadDoneEvent", xe(o.files || []));
1148
+ a.value = [...c, ...k.value], de(o), e.emit("fUploadDoneEvent", Se(o.files || [])), e.emit("uploadDoneEvent", Se(o.files || []));
868
1149
  } else if (o.type === "cancelled" || o.type === "removed" || o.type === "error") {
869
- const d = a.value.filter((v) => o.files && o.files.findIndex((h) => v.id === h.id) < 0);
870
- a.value = [...d], Z(o);
871
- } else o.type === "rejected" && typeof o.file < "u" && Z(o);
1150
+ const c = a.value.filter((m) => o.files && o.files.findIndex((w) => m.id === w.id) < 0);
1151
+ a.value = [...c], se(o);
1152
+ } else o.type === "rejected" && typeof o.file < "u" && se(o);
872
1153
  };
873
- return pe(() => {
1154
+ return me(() => {
874
1155
  }), {
875
- disabled: s,
876
- uploadVisible: c,
1156
+ disabled: i,
1157
+ uploadVisible: d,
877
1158
  uploadDisabled: u,
878
- downloadButtonDisable: F,
879
- previewVisible: m,
880
- previewColumns: y,
881
- uploadFiles: w,
882
- innerFileInfos: S,
883
- previewEnableMulti: p,
884
- previewMultiSelectedLength: R,
885
- previewSelectAllBtnChecked: E,
886
- uploadEnableMulti: H,
1159
+ downloadButtonDisable: T,
1160
+ previewVisible: v,
1161
+ previewColumns: h,
1162
+ uploadFiles: y,
1163
+ innerFileInfos: k,
1164
+ previewEnableMulti: f,
1165
+ previewMultiSelectedLength: I,
1166
+ previewSelectAllBtnChecked: H,
1167
+ uploadEnableMulti: D,
887
1168
  previewCurrentId: b,
888
- multiFileRemoveHandler: ie,
889
- previewMultiSelectChangeHandler: oe,
1169
+ multiFileRemoveHandler: _,
1170
+ previewMultiSelectChangeHandler: F,
890
1171
  fileMultiDownloadHandler: X,
891
1172
  selectOrCancelAllHandler: G,
892
- hasColumnHtmlFunc: K,
1173
+ hasColumnHtmlFunc: W,
893
1174
  showPreviewStateColumn: Y,
894
- rowSelectedHandler: N,
1175
+ rowSelectedHandler: M,
895
1176
  fileDownloadHandler: j,
896
- filePreviewHandler: ne,
897
- fileRemoveHandler: se,
898
- handleStateChange: ee
1177
+ filePreviewHandler: ee,
1178
+ fileRemoveHandler: te,
1179
+ handleStateChange: ae
899
1180
  };
900
1181
  }
901
- class rt {
902
- constructor(e, l) {
1182
+ class Ht {
1183
+ constructor(e, n) {
903
1184
  // 记录在上传的附件数组
904
- U(this, "queue");
905
- U(this, "uploadOpts", {
1185
+ L(this, "queue");
1186
+ L(this, "uploadOpts", {
906
1187
  // 默认不限制,0代表不限制 Number.POSITIVE_INFINITY
907
1188
  allowedContentTypes: ["*"],
908
1189
  maxUploads: 0,
@@ -914,10 +1195,10 @@ class rt {
914
1195
  /**
915
1196
  * 服务器端扩展
916
1197
  */
917
- U(this, "extendServerConfig", null);
918
- U(this, "uploadServerSer");
919
- U(this, "uploadContext", null);
920
- this.stateChangeRecord = e, this.serverToken = l, this.queue = [], this.uploadServerSer = Te.getServerAPI(this.serverToken);
1198
+ L(this, "extendServerConfig", null);
1199
+ L(this, "uploadServerSer");
1200
+ L(this, "uploadContext", null);
1201
+ this.stateChangeRecord = e, this.serverToken = n, this.queue = [], this.uploadServerSer = Pe.getServerAPI(this.serverToken);
921
1202
  }
922
1203
  setUploadContext(e) {
923
1204
  this.uploadContext = e;
@@ -926,21 +1207,21 @@ class rt {
926
1207
  * 处理从服务器端返回的结果
927
1208
  */
928
1209
  handleResultFromServer(e) {
929
- var l, i;
1210
+ var n, s;
930
1211
  switch (e.type) {
931
1212
  case "removed":
932
1213
  this.queue = this.queue.filter(
933
1214
  (a) => {
934
- var s;
935
- return ((s = a.progress) == null ? void 0 : s.status) !== L.Remove;
1215
+ var i;
1216
+ return ((i = a.progress) == null ? void 0 : i.status) !== q.Remove;
936
1217
  }
937
1218
  ), e.hasOwnProperty("message") || (e.message = "被删除"), this.stateChangeRecord.value = e;
938
1219
  break;
939
1220
  case "error":
940
- this.queue = this.queue.filter((a) => e.files && e.files.findIndex((s) => a.id === s.id) < 0), (l = this.uploadContext) == null || l.emit("stateChange", e);
1221
+ this.queue = this.queue.filter((a) => e.files && e.files.findIndex((i) => a.id === i.id) < 0), (n = this.uploadContext) == null || n.emit("stateChange", e);
941
1222
  break;
942
1223
  default:
943
- (i = this.uploadContext) == null || i.emit("stateChange", e);
1224
+ (s = this.uploadContext) == null || s.emit("stateChange", e);
944
1225
  }
945
1226
  }
946
1227
  setOptions(e) {
@@ -951,37 +1232,37 @@ class rt {
951
1232
  * @param incomingFiles
952
1233
  */
953
1234
  handleFiles(e) {
954
- var i;
955
- const l = Array.from(e).reduce(
956
- (a, s, c) => {
1235
+ var s;
1236
+ const n = Array.from(e).reduce(
1237
+ (a, i, d) => {
957
1238
  var C;
958
- const u = a.length + this.queue.length + 1, m = this.rejectedReason(
959
- s.name,
1239
+ const u = a.length + this.queue.length + 1, v = this.rejectedReason(
1240
+ i.name,
960
1241
  u,
961
- s.size
1242
+ i.size
962
1243
  );
963
- if (m.allowed)
964
- a = a.concat(s);
1244
+ if (v.allowed)
1245
+ a = a.concat(i);
965
1246
  else {
966
- const p = be(
967
- s,
968
- c
1247
+ const f = Fe(
1248
+ i,
1249
+ d
969
1250
  );
970
1251
  (C = this.uploadContext) == null || C.emit("stateChange", {
971
1252
  type: "rejected",
972
- file: p,
973
- message: m.message
1253
+ file: f,
1254
+ message: v.message
974
1255
  });
975
1256
  }
976
1257
  return a;
977
1258
  },
978
1259
  []
979
1260
  );
980
- [].map.call(l, (a, s) => {
1261
+ [].map.call(n, (a, i) => {
981
1262
  var u;
982
- const c = be(a, s);
983
- this.queue.push(c), (u = this.uploadContext) == null || u.emit("stateChange", { type: "addedToQueue", file: c });
984
- }), (i = this.uploadContext) == null || i.emit("stateChange", { type: "allAddedToQueue" });
1263
+ const d = Fe(a, i);
1264
+ this.queue.push(d), (u = this.uploadContext) == null || u.emit("stateChange", { type: "addedToQueue", file: d });
1265
+ }), (s = this.uploadContext) == null || s.emit("stateChange", { type: "allAddedToQueue" });
985
1266
  }
986
1267
  /**
987
1268
  * 获取上传被拒绝的理由
@@ -990,11 +1271,11 @@ class rt {
990
1271
  * @param size
991
1272
  * @returns
992
1273
  */
993
- rejectedReason(e, l, i) {
994
- let a = !1, s = "";
995
- return this.queue.findIndex((u) => u.name === e) > -1 ? s = "上传失败:已存在同名文件" : this.uploadOpts.allowedContentTypes && !Ze(this.uploadOpts.allowedContentTypes, e) ? s = `上传失败:只允许上传${this.uploadOpts.allowedContentTypes.join(",")}类型的文档` : this.exceedMaxUpload(l) ? s = `上传失败:文件总个数超出${this.uploadOpts.maxUploads}限制` : Ge(this.uploadOpts.maxFileSize, i) ? i === 0 ? s = "上传失败:不允许文件为空" : a = !0 : s = `上传失败:单个文件大小超出${this.uploadOpts.maxFileSize}MB的限制`, {
1274
+ rejectedReason(e, n, s) {
1275
+ let a = !1, i = "";
1276
+ return this.queue.findIndex((u) => u.name === e) > -1 ? i = "上传失败:已存在同名文件" : this.uploadOpts.allowedContentTypes && !xt(this.uploadOpts.allowedContentTypes, e) ? i = `上传失败:只允许上传${this.uploadOpts.allowedContentTypes.join(",")}类型的文档` : this.exceedMaxUpload(n) ? i = `上传失败:文件总个数超出${this.uploadOpts.maxUploads}限制` : yt(this.uploadOpts.maxFileSize, s) ? s === 0 ? i = "上传失败:不允许文件为空" : a = !0 : i = `上传失败:单个文件大小超出${this.uploadOpts.maxFileSize}MB的限制`, {
996
1277
  allowed: a,
997
- message: s
1278
+ message: i
998
1279
  };
999
1280
  }
1000
1281
  /**
@@ -1005,15 +1286,15 @@ class rt {
1005
1286
  exceedMaxUpload(e = 0) {
1006
1287
  if (!this.uploadOpts || !this.uploadOpts.maxUploads)
1007
1288
  return !1;
1008
- const l = this.uploadOpts.uploadedCount || 0;
1009
- return this.uploadOpts.maxUploads > 0 && (this.uploadOpts.maxUploads <= l || e + l > this.uploadOpts.maxUploads);
1289
+ const n = this.uploadOpts.uploadedCount || 0;
1290
+ return this.uploadOpts.maxUploads > 0 && (this.uploadOpts.maxUploads <= n || e + n > this.uploadOpts.maxUploads);
1010
1291
  }
1011
1292
  /**
1012
1293
  * 从前端传来事件,进行服务器端方法类型判断
1013
1294
  * @param input
1014
1295
  */
1015
1296
  handleUploadEvent(e) {
1016
- var l, i;
1297
+ var n, s;
1017
1298
  switch (e.type) {
1018
1299
  case "upload":
1019
1300
  const a = this.queue.findIndex(
@@ -1025,38 +1306,38 @@ class rt {
1025
1306
  });
1026
1307
  break;
1027
1308
  case "remove":
1028
- if (!((l = e == null ? void 0 : e.file) != null && l.id))
1309
+ if (!((n = e == null ? void 0 : e.file) != null && n.id))
1029
1310
  return;
1030
- const s = this.queue.findIndex(
1311
+ const i = this.queue.findIndex(
1031
1312
  (u) => {
1032
- var m;
1033
- return u.id === ((m = e == null ? void 0 : e.file) == null ? void 0 : m.id);
1313
+ var v;
1314
+ return u.id === ((v = e == null ? void 0 : e.file) == null ? void 0 : v.id);
1034
1315
  }
1035
1316
  );
1036
- if (s !== -1 && this.queue[s] && this.queue[s].progress) {
1037
- const { progress: u } = this.queue[s];
1038
- u && (u.status = L.Remove);
1317
+ if (i !== -1 && this.queue[i] && this.queue[i].progress) {
1318
+ const { progress: u } = this.queue[i];
1319
+ u && (u.status = q.Remove);
1039
1320
  }
1040
1321
  this.serverMethod({ files: [e.file], event: e });
1041
1322
  break;
1042
1323
  case "removeAll":
1043
- const c = this.queue.filter(
1324
+ const d = this.queue.filter(
1044
1325
  (u) => {
1045
- var m;
1046
- return ((m = u == null ? void 0 : u.progress) == null ? void 0 : m.status) === L.Queue;
1326
+ var v;
1327
+ return ((v = u == null ? void 0 : u.progress) == null ? void 0 : v.status) === q.Queue;
1047
1328
  }
1048
1329
  );
1049
- c.length && ((i = this.uploadContext) == null || i.emit("stateChange", {
1330
+ d.length && ((s = this.uploadContext) == null || s.emit("stateChange", {
1050
1331
  type: "cancelled",
1051
- files: c,
1332
+ files: d,
1052
1333
  message: "删除附件成功"
1053
1334
  }), this.queue = this.queue.filter(
1054
1335
  (u) => {
1055
- var m;
1056
- return ((m = u == null ? void 0 : u.progress) == null ? void 0 : m.status) !== L.Queue;
1336
+ var v;
1337
+ return ((v = u == null ? void 0 : u.progress) == null ? void 0 : v.status) !== q.Queue;
1057
1338
  }
1058
1339
  )), this.queue.length && (e.type = "remove", this.queue.forEach((u) => {
1059
- u.progress && (u.progress.status = L.Remove);
1340
+ u.progress && (u.progress.status = q.Remove);
1060
1341
  }), this.serverMethod({ files: this.queue, event: e }));
1061
1342
  break;
1062
1343
  }
@@ -1074,22 +1355,22 @@ class rt {
1074
1355
  * @returns
1075
1356
  */
1076
1357
  serverMethod(e) {
1077
- let l;
1358
+ let n;
1078
1359
  switch (e.event.type) {
1079
1360
  case "upload":
1080
- l = this.upload(e.files, e.event, (i) => this.handleResultFromServer(i));
1361
+ n = this.upload(e.files, e.event, (s) => this.handleResultFromServer(s));
1081
1362
  break;
1082
1363
  case "removeAll":
1083
1364
  case "remove":
1084
- l = this.remove(e.files, e.event, (i) => this.handleResultFromServer(i));
1365
+ n = this.remove(e.files, e.event, (s) => this.handleResultFromServer(s));
1085
1366
  break;
1086
1367
  default:
1087
- l = null;
1368
+ n = null;
1088
1369
  }
1089
- l && l.then((i) => {
1090
- this.handleResultFromServer(i);
1091
- }).catch((i) => {
1092
- this.handleResultFromServer(i);
1370
+ n && n.then((s) => {
1371
+ this.handleResultFromServer(s);
1372
+ }).catch((s) => {
1373
+ this.handleResultFromServer(s);
1093
1374
  });
1094
1375
  }
1095
1376
  /**
@@ -1098,9 +1379,9 @@ class rt {
1098
1379
  * @param event
1099
1380
  * @returns
1100
1381
  */
1101
- upload(e, l, i) {
1382
+ upload(e, n, s) {
1102
1383
  var a;
1103
- return (a = this.uploadContext) == null || a.emit("stateChange", { type: "start", files: e }), this.uploadServerSer.upload(e, l, this.extendServerConfig, i);
1384
+ return (a = this.uploadContext) == null || a.emit("stateChange", { type: "start", files: e }), this.uploadServerSer.upload(e, n, this.extendServerConfig, s);
1104
1385
  }
1105
1386
  /**
1106
1387
  * 删除附件
@@ -1108,8 +1389,8 @@ class rt {
1108
1389
  * @param event
1109
1390
  * @returns
1110
1391
  */
1111
- remove(e, l, i) {
1112
- return this.uploadServerSer.remove(e, l, this.extendServerConfig, i);
1392
+ remove(e, n, s) {
1393
+ return this.uploadServerSer.remove(e, n, this.extendServerConfig, s);
1113
1394
  }
1114
1395
  /**
1115
1396
  * 重置
@@ -1124,332 +1405,542 @@ class rt {
1124
1405
  this.reset();
1125
1406
  }
1126
1407
  }
1127
- const ut = /* @__PURE__ */ $({
1408
+ const ue = /* @__PURE__ */ K({
1128
1409
  name: "FUploader",
1129
1410
  components: {
1130
- "f-upload-progress": ze,
1131
- "f-preview-checkbox": Ie,
1132
- "f-file-select": qe
1411
+ "f-upload-progress": Ze,
1412
+ "f-preview-checkbox": Te,
1413
+ "f-file-select": Ee
1133
1414
  },
1134
- props: $e,
1415
+ props: he,
1135
1416
  emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fileRemovedEvent", "fUploadDoneEvent", "uploadDoneEvent"],
1136
1417
  setup(t, e) {
1137
- const l = B(), i = new rt(l, t.uploadServerToken);
1138
- Ne("uploaderService", i);
1139
- const a = B(t.customInfo), s = Ke(t.uploadOptions, {
1418
+ const n = B(), s = new Ht(n, t.uploadServerToken);
1419
+ $e("uploaderService", s);
1420
+ const a = B(t.customInfo), i = Ae(t.uploadOptions, {
1140
1421
  // 允许上传的文件类型
1141
1422
  allowedContentTypes: ["*"],
1142
1423
  // 默认不限制附件上传个数
1143
1424
  maxUploads: 0,
1144
1425
  // 单位KB,默认是12M
1145
1426
  maxFileSize: "12MB"
1146
- }), c = B(null), {
1427
+ }), d = B(null), {
1147
1428
  disabled: u,
1148
- uploadVisible: m,
1429
+ uploadVisible: v,
1149
1430
  uploadDisabled: C,
1150
- downloadButtonDisable: p,
1151
- previewVisible: F,
1152
- previewColumns: y,
1153
- uploadFiles: H,
1154
- innerFileInfos: k,
1155
- previewEnableMulti: E,
1431
+ downloadButtonDisable: f,
1432
+ previewVisible: T,
1433
+ previewColumns: h,
1434
+ uploadFiles: D,
1435
+ innerFileInfos: E,
1436
+ previewEnableMulti: H,
1156
1437
  previewMultiSelectedLength: g,
1157
- previewSelectAllBtnChecked: R,
1158
- uploadEnableMulti: w,
1438
+ previewSelectAllBtnChecked: I,
1439
+ uploadEnableMulti: y,
1159
1440
  previewCurrentId: b,
1160
- multiFileRemoveHandler: P,
1161
- previewMultiSelectChangeHandler: S,
1441
+ multiFileRemoveHandler: A,
1442
+ previewMultiSelectChangeHandler: k,
1162
1443
  fileMultiDownloadHandler: j,
1163
- selectOrCancelAllHandler: ne,
1164
- rowSelectedHandler: se,
1165
- hasColumnHtmlFunc: K,
1444
+ selectOrCancelAllHandler: ee,
1445
+ rowSelectedHandler: te,
1446
+ hasColumnHtmlFunc: W,
1166
1447
  showPreviewStateColumn: Y,
1167
- fileDownloadHandler: ae,
1448
+ fileDownloadHandler: le,
1168
1449
  filePreviewHandler: X,
1169
- fileRemoveHandler: ie,
1450
+ fileRemoveHandler: _,
1170
1451
  handleStateChange: G
1171
- } = ot(t, e, c);
1172
- q(l, (r) => {
1452
+ } = Re(t, e, d);
1453
+ Q(n, (r) => {
1173
1454
  switch (G(r), r.type) {
1174
1455
  case "removed":
1175
1456
  e.emit("fileRemovedEvent", r.files[0]);
1176
1457
  break;
1177
1458
  }
1178
1459
  });
1179
- const N = A(() => k.value.length > 0);
1180
- function oe() {
1460
+ const M = N(() => E.value.length > 0);
1461
+ function F() {
1181
1462
  var r;
1182
- return Qe((s == null ? void 0 : s.allowedContentTypes) || []) ? n("li", null, [n("span", null, [T("支持类型:")]), n("span", {
1463
+ return He((i == null ? void 0 : i.allowedContentTypes) || []) ? l("li", null, [l("span", null, [x("支持类型:")]), l("span", {
1183
1464
  class: "support-info--item-detail",
1184
1465
  style: "margin-right:4px;"
1185
- }, [(r = s.allowedContentTypes) == null ? void 0 : r.join(""), T(",")])]) : "";
1466
+ }, [(r = i.allowedContentTypes) == null ? void 0 : r.join(""), x(",")])]) : "";
1186
1467
  }
1187
- function J() {
1188
- return We((s == null ? void 0 : s.maxFileSize) || "") ? n("li", null, [n("span", null, [T("单个文件限制:")]), n("span", {
1468
+ function O() {
1469
+ return De((i == null ? void 0 : i.maxFileSize) || "") ? l("li", null, [l("span", null, [x("单个文件限制:")]), l("span", {
1189
1470
  class: "support-info--item-detail"
1190
- }, [s.maxFileSize, T(",   ")])]) : "";
1471
+ }, [i.maxFileSize, x(",   ")])]) : "";
1191
1472
  }
1192
- function re() {
1193
- return ((s == null ? void 0 : s.maxUploads) || 0) > 0 && n("li", null, [n("span", null, [T("文件总数限制:")]), n("span", {
1473
+ function ne() {
1474
+ return ((i == null ? void 0 : i.maxUploads) || 0) > 0 && l("li", null, [l("span", null, [x("文件总数限制:")]), l("span", {
1194
1475
  class: "support-info--item-detail"
1195
- }, [s.maxUploads, T("个")])]);
1476
+ }, [i.maxUploads, x("个")])]);
1196
1477
  }
1197
- function I() {
1198
- return m.value && !C.value && !u.value ? n("div", {
1478
+ function P() {
1479
+ return v.value && !C.value && !u.value ? l("div", {
1199
1480
  class: "ffileupload--support-info"
1200
- }, [a.value ? n("ul", {
1481
+ }, [a.value ? l("ul", {
1201
1482
  class: "support-info--wrapper"
1202
- }, [n("li", null, [n("span", {
1483
+ }, [l("li", null, [l("span", {
1203
1484
  class: "support-info--item-detail",
1204
1485
  innerHTML: a.value
1205
- }, null)])]) : n("ul", {
1486
+ }, null)])]) : l("ul", {
1206
1487
  class: "support-info--wrapper"
1207
- }, [oe(), J(), re()])]) : null;
1488
+ }, [F(), O(), ne()])]) : null;
1208
1489
  }
1209
- function ue(r) {
1210
- var f, x, M;
1211
- return n("div", {
1490
+ function de(r) {
1491
+ var p, S, U;
1492
+ return l("div", {
1212
1493
  class: "uploadAndpreview--title-container"
1213
- }, [n("div", {
1494
+ }, [l("div", {
1214
1495
  class: "ffilepreview--item-icon"
1215
- }, [n("span", {
1216
- class: ["ffilepreview--filetype-icon", ye(((f = r.file) == null ? void 0 : f.name) || "")]
1217
- }, null)]), n("div", {
1496
+ }, [l("span", {
1497
+ class: ["ffilepreview--filetype-icon", xe(((p = r.file) == null ? void 0 : p.name) || "")]
1498
+ }, null)]), l("div", {
1218
1499
  class: "uploadAndpreview--right"
1219
- }, [n("a", {
1500
+ }, [l("a", {
1220
1501
  class: "item-content--title",
1221
- title: (x = r.file) == null ? void 0 : x.name
1222
- }, [((M = r.file) == null ? void 0 : M.name) || "无名称"]), n(V("f-upload-progress"), {
1502
+ title: (S = r.file) == null ? void 0 : S.name
1503
+ }, [((U = r.file) == null ? void 0 : U.name) || "无名称"]), l(V("f-upload-progress"), {
1223
1504
  status: r.type === "done" ? "success" : "active",
1224
- percent: we(r),
1505
+ percent: Ce(r),
1225
1506
  maxWidth: 300
1226
1507
  }, null)])]);
1227
1508
  }
1228
- function Z(r) {
1229
- return n("div", {
1509
+ function se(r) {
1510
+ return l("div", {
1230
1511
  class: "uploadAndpreview--title-container"
1231
- }, [n("div", {
1512
+ }, [l("div", {
1232
1513
  class: "ffilepreview--item-icon"
1233
- }, [n("span", {
1234
- class: ["ffilepreview--filetype-icon", ye(r.name)]
1235
- }, null)]), n("div", {
1514
+ }, [l("span", {
1515
+ class: ["ffilepreview--filetype-icon", xe(r.name)]
1516
+ }, null)]), l("div", {
1236
1517
  class: "uploadAndpreview--right"
1237
- }, [n("a", {
1518
+ }, [l("a", {
1238
1519
  class: ["item-content--title", "previewButtonDisable.value?'no-preview':''"],
1239
1520
  title: r.name,
1240
- onClick: (f) => X(f, r)
1521
+ onClick: (p) => X(p, r)
1241
1522
  }, [r.name])])]);
1242
1523
  }
1243
- function ee(r, f, x) {
1244
- return n("div", {
1524
+ function ae(r, p, S) {
1525
+ return l("div", {
1245
1526
  class: "uploadAndpreview--filesize-container"
1246
- }, [r === "preview" && x ? n("span", null, [Ye(x.size)]) : null, r === "upload" && f ? n("span", null, [we(f)]) : null]);
1527
+ }, [r === "preview" && S ? l("span", null, [gt(S.size)]) : null, r === "upload" && p ? l("span", null, [Ce(p)]) : null]);
1247
1528
  }
1248
- function o(r, f) {
1249
- return f && f.type === "error" ? n("div", {
1529
+ function o(r, p) {
1530
+ return p && p.type === "error" ? l("div", {
1250
1531
  class: "uploadAndpreview--state-container"
1251
- }, [n("p", {
1532
+ }, [l("p", {
1252
1533
  class: "upload-state--uploaded"
1253
- }, [n("i", {
1534
+ }, [l("i", {
1254
1535
  class: "f-icon f-icon-message_warning text-danger"
1255
- }, null), n("span", null, [T("存在异常")])])]) : n("div", {
1536
+ }, null), l("span", null, [x("存在异常")])])]) : l("div", {
1256
1537
  class: "uploadAndpreview--state-container"
1257
- }, [r === "upload" ? f && f.type !== "done" ? n("p", {
1538
+ }, [r === "upload" ? p && p.type !== "done" ? l("p", {
1258
1539
  class: "upload-state--uploading"
1259
- }, [n("i", {
1540
+ }, [l("i", {
1260
1541
  class: "f-icon f-icon-clock text-warning"
1261
- }, null), n("span", null, [T("正在上传...")])]) : n("p", {
1542
+ }, null), l("span", null, [x("正在上传...")])]) : l("p", {
1262
1543
  class: "upload-state--uploaded"
1263
- }, [n("i", {
1544
+ }, [l("i", {
1264
1545
  class: "f-icon f-icon-success text-success"
1265
- }, null), n("span", null, [T("上传成功")])]) : r === "preview" ? n("p", {
1546
+ }, null), l("span", null, [x("上传成功")])]) : r === "preview" ? l("p", {
1266
1547
  class: "upload-state--uploaded"
1267
- }, [n("i", {
1548
+ }, [l("i", {
1268
1549
  class: "f-icon f-icon-success text-success"
1269
- }, null), n("span", null, [T("已上传")])]) : ""]);
1550
+ }, null), l("span", null, [x("已上传")])]) : ""]);
1270
1551
  }
1271
- function d(r) {
1272
- return n("div", {
1552
+ function c(r) {
1553
+ return l("div", {
1273
1554
  class: "uploadAndpreview--action-container"
1274
- }, [p.value ? "" : n("button", {
1555
+ }, [f.value ? "" : l("button", {
1275
1556
  class: "btn preview-btn",
1276
1557
  title: "下载",
1277
- onClick: (f) => ae(f, r)
1278
- }, [n("span", {
1558
+ onClick: (p) => le(p, r)
1559
+ }, [l("span", {
1279
1560
  class: "f-icon f-icon-enclosure_download"
1280
- }, null)]), t.previewButtonDisable ? "" : n("button", {
1561
+ }, null)]), t.previewButtonDisable ? "" : l("button", {
1281
1562
  class: "btn preview-btn",
1282
1563
  title: "预览",
1283
- onClick: (f) => X(f, r)
1284
- }, [n("span", {
1564
+ onClick: (p) => X(p, r)
1565
+ }, [l("span", {
1285
1566
  class: "f-icon f-icon-enclosure_browse"
1286
- }, null)]), t.deleteButtonDisable ? "" : n("button", {
1567
+ }, null)]), t.deleteButtonDisable ? "" : l("button", {
1287
1568
  class: "btn preview-btn",
1288
1569
  title: "删除",
1289
- onClick: (f) => ie(f, r, i)
1290
- }, [n("span", {
1570
+ onClick: (p) => _(p, r, s)
1571
+ }, [l("span", {
1291
1572
  class: "f-icon f-icon-enclosure_delete",
1292
1573
  style: "top: -1px"
1293
1574
  }, null)])]);
1294
1575
  }
1295
- function v(r) {
1296
- return n("div", {
1576
+ function m(r) {
1577
+ return l("div", {
1297
1578
  class: "uploadAndpreview--date-container"
1298
1579
  }, [r.createTime || ""]);
1299
1580
  }
1300
- function h(r, f, x, M) {
1301
- let D;
1302
- if (r = r || "preview", M.formatter)
1303
- return D = M.formatter(x[M.field] || "", r, r === "preview" ? x : f, M), D;
1304
- if (r === "preview" && x)
1305
- switch (M.field) {
1581
+ function w(r, p, S, U) {
1582
+ let R;
1583
+ if (r = r || "preview", U.formatter)
1584
+ return R = U.formatter(S[U.field] || "", r, r === "preview" ? S : p, U), R;
1585
+ if (r === "preview" && S)
1586
+ switch (U.field) {
1306
1587
  case "state":
1307
- D = o("preview", null);
1588
+ R = o("preview", null);
1308
1589
  break;
1309
1590
  case "name":
1310
- D = Z(x);
1591
+ R = se(S);
1311
1592
  break;
1312
1593
  case "action":
1313
- D = d(x);
1594
+ R = c(S);
1314
1595
  break;
1315
1596
  case "size":
1316
- D = ee(r, f, x);
1597
+ R = ae(r, p, S);
1317
1598
  break;
1318
1599
  case "createTime":
1319
- D = v(x);
1600
+ R = m(S);
1320
1601
  break;
1321
1602
  default:
1322
- D = `<div>${x[M.field] || ""} </div>`;
1603
+ R = `<div>${S[U.field] || ""} </div>`;
1323
1604
  }
1324
- if (r === "upload" && f)
1325
- switch (M.field) {
1605
+ if (r === "upload" && p)
1606
+ switch (U.field) {
1326
1607
  case "state":
1327
- D = o("upload", f);
1608
+ R = o("upload", p);
1328
1609
  break;
1329
1610
  case "name":
1330
- D = ue(f);
1611
+ R = de(p);
1331
1612
  break;
1332
1613
  case "size":
1333
- D = ee(r, f, x);
1614
+ R = ae(r, p, S);
1334
1615
  break;
1335
1616
  default:
1336
- D = "";
1617
+ R = "";
1337
1618
  }
1338
- return D;
1619
+ return R;
1339
1620
  }
1340
- function O() {
1341
- return m.value ? n("div", {
1621
+ function z() {
1622
+ return v.value ? l("div", {
1342
1623
  class: "header--left-container"
1343
- }, [n(V("f-file-select"), {
1344
- ref: c,
1624
+ }, [l(V("f-file-select"), {
1625
+ ref: d,
1345
1626
  disabled: C.value,
1346
1627
  selectText: t.selectText,
1347
1628
  uploadedCount: t.uploadedCount,
1348
1629
  uploadServerToken: t.uploadServerToken,
1349
- enableMulti: w.value,
1630
+ enableMulti: y.value,
1350
1631
  options: t.uploadOptions,
1351
1632
  extendConfig: t.extendConfig,
1352
1633
  onStateChange: (r) => G(r)
1353
1634
  }, null)]) : null;
1354
1635
  }
1355
- function z() {
1356
- return !m.value && F.value && N.value ? n("div", {
1636
+ function $() {
1637
+ return !v.value && T.value && M.value ? l("div", {
1357
1638
  class: "header--left-container header--countInfo"
1358
- }, [n("p", {
1639
+ }, [l("p", {
1359
1640
  class: "m-0"
1360
- }, [T("共"), n("span", {
1641
+ }, [x("共"), l("span", {
1361
1642
  class: "count"
1362
- }, [H.value.length + k.value.length]), T("个附件"), g.value > 0 ? n(_, null, [T("(已选"), n("span", {
1643
+ }, [D.value.length + E.value.length]), x("个附件"), g.value > 0 ? l(J, null, [x("(已选"), l("span", {
1363
1644
  class: "count-selected"
1364
- }, [g.value]), T("个)")]) : ""])]) : null;
1645
+ }, [g.value]), x("个)")]) : ""])]) : null;
1365
1646
  }
1366
- function te() {
1367
- return (!p.value || !t.deleteButtonDisable) && F.value && N.value ? n("div", {
1647
+ function oe() {
1648
+ return (!f.value || !t.deleteButtonDisable) && T.value && M.value ? l("div", {
1368
1649
  class: "header--right-container"
1369
- }, [p.value ? null : n("button", {
1650
+ }, [f.value ? null : l("button", {
1370
1651
  class: "btn btn-primary f-btn-ml",
1371
1652
  disabled: g.value === 0,
1372
- onClick: (x) => j(x)
1373
- }, [T("下载")]), t.deleteButtonDisable.value ? null : n("button", {
1653
+ onClick: (S) => j(S)
1654
+ }, [x("下载")]), t.deleteButtonDisable.value ? null : l("button", {
1374
1655
  class: "btn btn-secondary f-btn-ml",
1375
1656
  disabled: g.value === 0,
1376
- onClick: (x) => P(x)
1377
- }, [T("删除")])]) : null;
1657
+ onClick: (S) => A(S)
1658
+ }, [x("删除")])]) : null;
1378
1659
  }
1379
- function he() {
1380
- return y.value.map((r) => Y(r) ? n("th", {
1660
+ function we() {
1661
+ return h.value.map((r) => Y(r) ? l("th", {
1381
1662
  style: {
1382
1663
  width: r.width ? r.width + "px" : "auto"
1383
1664
  },
1384
1665
  class: [!u.value && r.checkbox && r.checkbox ? "td--hascheckbox" : ""]
1385
- }, [!u.value && E.value && r.checkbox ? n(V("f-preview-checkbox"), {
1666
+ }, [!u.value && H.value && r.checkbox ? l(V("f-preview-checkbox"), {
1386
1667
  class: "preview-checkbox",
1387
1668
  id: "previewMultiBtn",
1388
- checked: R.value,
1389
- onCheckedChange: (f) => ne(f)
1669
+ checked: I.value,
1670
+ onCheckedChange: (p) => ee(p)
1390
1671
  }, null) : null, r.title]) : null);
1391
1672
  }
1392
- function ke() {
1393
- return H.value.map((r) => {
1394
- var f;
1395
- return n("tr", {
1673
+ function Ne() {
1674
+ return D.value.map((r) => {
1675
+ var p;
1676
+ return l("tr", {
1396
1677
  class: "uploadAndpreview--upload-item",
1397
- id: "uploadAndpreview--upload-item" + (((f = r == null ? void 0 : r.file) == null ? void 0 : f.id) || "")
1398
- }, [y.value.map((x) => {
1399
- var M;
1400
- return n("td", {
1401
- class: [!u.value && x.checkbox && x.checkbox ? "td--hascheckbox" : ""]
1402
- }, [E.value && x.checkbox ? n(V("f-preview-checkbox"), {
1403
- id: (M = r == null ? void 0 : r.file) == null ? void 0 : M.id,
1678
+ id: "uploadAndpreview--upload-item" + (((p = r == null ? void 0 : r.file) == null ? void 0 : p.id) || "")
1679
+ }, [h.value.map((S) => {
1680
+ var U;
1681
+ return l("td", {
1682
+ class: [!u.value && S.checkbox && S.checkbox ? "td--hascheckbox" : ""]
1683
+ }, [H.value && S.checkbox ? l(V("f-preview-checkbox"), {
1684
+ id: (U = r == null ? void 0 : r.file) == null ? void 0 : U.id,
1404
1685
  checked: r.checked,
1405
1686
  disabled: r.type !== "done",
1406
1687
  class: "preview-checkbox",
1407
- onCheckedChange: (D) => S(D)
1408
- }, null) : null, K(x, "upload") ? h("upload", r, null, x) : null]);
1688
+ onCheckedChange: (R) => k(R)
1689
+ }, null) : null, W(S, "upload") ? w("upload", r, null, S) : null]);
1409
1690
  })]);
1410
1691
  });
1411
1692
  }
1412
- function me() {
1413
- return k.value.map((r) => n("tr", {
1693
+ function ye() {
1694
+ return E.value.map((r) => l("tr", {
1414
1695
  class: ["uploadAndpreview--preview-item", b.value === r.id ? "uploadAndpreview--currentfile" : ""],
1415
1696
  id: "uploadAndpreview--preview-item" + r.id,
1416
- onClick: (f) => se(f, r)
1417
- }, [y.value.map((f) => Y(f) ? n("td", {
1418
- class: [!u.value && f.checkbox && f.checkbox ? "td--hascheckbox" : ""]
1419
- }, [!u.value && E.value && f.checkbox ? n(V("f-preview-checkbox"), {
1697
+ onClick: (p) => te(p, r)
1698
+ }, [h.value.map((p) => Y(p) ? l("td", {
1699
+ class: [!u.value && p.checkbox && p.checkbox ? "td--hascheckbox" : ""]
1700
+ }, [!u.value && H.value && p.checkbox ? l(V("f-preview-checkbox"), {
1420
1701
  id: r.id,
1421
1702
  checked: r.checked,
1422
1703
  class: "preview-checkbox",
1423
- onCheckedChange: (x) => S(x)
1424
- }, null) : null, K(f, "preview") ? h("preview", null, r, f) : n("div", {
1704
+ onCheckedChange: (S) => k(S)
1705
+ }, null) : null, W(p, "preview") ? w("preview", null, r, p) : l("div", {
1425
1706
  class: "text-truncate",
1426
- innerHTML: h("preview", null, r, f)
1707
+ innerHTML: w("preview", null, r, p)
1427
1708
  }, null)]) : null)]));
1428
1709
  }
1429
- return () => u.value ? n("div", {
1710
+ return () => u.value ? l("div", {
1430
1711
  class: "fv-upload-and-preview"
1431
- }, [N.value ? null : I(), F.value ? n("div", {
1712
+ }, [M.value ? null : P(), T.value ? l("div", {
1432
1713
  class: "uploadAndpreview--content"
1433
- }, [N.value ? n("table", {
1714
+ }, [M.value ? l("table", {
1434
1715
  class: "table table-bordered uploadAndpreview--table"
1435
- }, [n("thead", null, [he()]), n("tbody", null, [me()])]) : n("p", {
1716
+ }, [l("thead", null, [we()]), l("tbody", null, [ye()])]) : l("p", {
1436
1717
  class: "uploadAndpreview--nodata"
1437
- }, [T("无附件信息")])]) : null, N.value ? I() : null]) : n("div", {
1718
+ }, [x("无附件信息")])]) : null, M.value ? P() : null]) : l("div", {
1438
1719
  class: "fv-upload-and-preview"
1439
- }, [n("div", {
1720
+ }, [l("div", {
1440
1721
  class: "uploadAndpreview--header"
1441
- }, [O(), z(), te()]), N.value ? null : I(), F.value || m.value ? n("div", {
1722
+ }, [z(), $(), oe()]), M.value ? null : P(), T.value || v.value ? l("div", {
1442
1723
  class: "uploadAndpreview--content"
1443
- }, [(p.value || !m.value) && H.value.length === 0 && !N.value ? n("p", {
1724
+ }, [(f.value || !v.value) && D.value.length === 0 && !M.value ? l("p", {
1444
1725
  class: "uploadAndpreview--nodata"
1445
- }, [T("无附件信息")]) : "", H.value.length > 0 || N ? n("table", {
1726
+ }, [x("无附件信息")]) : "", D.value.length > 0 || M ? l("table", {
1446
1727
  class: "table table-bordered uploadAndpreview--table"
1447
- }, [n("thead", null, [he()]), n("tbody", null, [ke(), me()])]) : null]) : null, N.value ? I() : null]);
1728
+ }, [l("thead", null, [we()]), l("tbody", null, [Ne(), ye()])]) : null]) : null, M.value ? P() : null]);
1448
1729
  }
1449
- }), vt = Re(ut);
1730
+ }), Dt = /* @__PURE__ */ K({
1731
+ name: "FUploaderDesign",
1732
+ components: {
1733
+ "f-preview-checkbox": Te,
1734
+ "f-file-select": Ee
1735
+ },
1736
+ props: he,
1737
+ emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fUploadDoneEvent", "uploadDoneEvent"],
1738
+ setup(t, e) {
1739
+ const n = B(t.customInfo), s = Ae(t.uploadOptions, {
1740
+ // 允许上传的文件类型
1741
+ allowedContentTypes: ["*"],
1742
+ // 默认不限制附件上传个数
1743
+ maxUploads: 0,
1744
+ // 单位KB,默认是12M
1745
+ maxFileSize: "12MB"
1746
+ }), a = B(null), i = [{
1747
+ id: "attach01",
1748
+ name: ""
1749
+ }, {
1750
+ id: "attach02",
1751
+ name: ""
1752
+ }], {
1753
+ disabled: d,
1754
+ uploadVisible: u,
1755
+ uploadDisabled: v,
1756
+ downloadButtonDisable: C,
1757
+ previewVisible: f,
1758
+ previewColumns: T,
1759
+ previewEnableMulti: h,
1760
+ previewCurrentId: D,
1761
+ showPreviewStateColumn: E
1762
+ } = Re(t, e, a);
1763
+ function H() {
1764
+ var F;
1765
+ return He((s == null ? void 0 : s.allowedContentTypes) || []) ? l("li", null, [l("span", null, [x("支持类型:")]), l("span", {
1766
+ class: "support-info--item-detail",
1767
+ style: "margin-right:4px;"
1768
+ }, [(F = s.allowedContentTypes) == null ? void 0 : F.join(""), x(",")])]) : null;
1769
+ }
1770
+ function g() {
1771
+ return De((s == null ? void 0 : s.maxFileSize) || "") ? l("li", null, [l("span", null, [x("单个文件限制:")]), l("span", {
1772
+ class: "support-info--item-detail"
1773
+ }, [s.maxFileSize, x(",   ")])]) : null;
1774
+ }
1775
+ function I() {
1776
+ return ((s == null ? void 0 : s.maxUploads) || 0) > 0 ? l("li", null, [l("span", null, [x("文件总数限制:")]), l("span", {
1777
+ class: "support-info--item-detail"
1778
+ }, [s.maxUploads, x("个")])]) : null;
1779
+ }
1780
+ function y() {
1781
+ return u.value && !v.value && !d.value ? l("div", {
1782
+ class: "ffileupload--support-info"
1783
+ }, [n.value ? l("ul", {
1784
+ class: "support-info--wrapper"
1785
+ }, [l("li", null, [l("span", {
1786
+ class: "support-info--item-detail",
1787
+ innerHTML: n.value
1788
+ }, null)])]) : l("ul", {
1789
+ class: "support-info--wrapper"
1790
+ }, [H(), g(), I()])]) : null;
1791
+ }
1792
+ function b(F) {
1793
+ return l("div", {
1794
+ class: "uploadAndpreview--title-container"
1795
+ }, [l("div", {
1796
+ class: "ffilepreview--item-icon"
1797
+ }, [l("span", {
1798
+ class: "ffilepreview--filetype-icon"
1799
+ }, null)]), l("div", {
1800
+ class: "uploadAndpreview--right"
1801
+ }, [l("span", {
1802
+ class: "ffilepreview--preview-block"
1803
+ }, null)])]);
1804
+ }
1805
+ function A(F) {
1806
+ return l("div", {
1807
+ class: "uploadAndpreview--filesize-container"
1808
+ }, [l("span", {
1809
+ class: "ffilepreview--preview-block"
1810
+ }, null)]);
1811
+ }
1812
+ function k() {
1813
+ return l("div", {
1814
+ class: "uploadAndpreview--state-container"
1815
+ }, [l("p", {
1816
+ class: "upload-state--uploaded"
1817
+ }, [l("i", {
1818
+ class: "f-icon f-icon-success text-success"
1819
+ }, null), l("span", null, [x("已上传")])])]);
1820
+ }
1821
+ function j(F) {
1822
+ return l("div", {
1823
+ class: "uploadAndpreview--action-container"
1824
+ }, [C.value ? "" : l("button", {
1825
+ class: "btn preview-btn",
1826
+ title: "下载"
1827
+ }, [l("span", {
1828
+ class: "f-icon f-icon-enclosure_download"
1829
+ }, null)]), t.previewButtonDisable ? "" : l("button", {
1830
+ class: "btn preview-btn",
1831
+ title: "预览"
1832
+ }, [l("span", {
1833
+ class: "f-icon f-icon-enclosure_browse"
1834
+ }, null)]), t.deleteButtonDisable ? "" : l("button", {
1835
+ class: "btn preview-btn",
1836
+ title: "删除"
1837
+ }, [l("span", {
1838
+ class: "f-icon f-icon-enclosure_delete",
1839
+ style: "top: -1px"
1840
+ }, null)])]);
1841
+ }
1842
+ function ee(F) {
1843
+ return l("div", {
1844
+ class: "uploadAndpreview--date-container"
1845
+ }, [x(" "), l("span", {
1846
+ class: "ffilepreview--preview-block"
1847
+ }, null)]);
1848
+ }
1849
+ function te(F, O, ne) {
1850
+ let P = null;
1851
+ if (F = F || "preview", F === "preview" && O)
1852
+ switch (ne.field) {
1853
+ case "state":
1854
+ P = k();
1855
+ break;
1856
+ case "name":
1857
+ P = b();
1858
+ break;
1859
+ case "action":
1860
+ P = j();
1861
+ break;
1862
+ case "size":
1863
+ P = A();
1864
+ break;
1865
+ case "createTime":
1866
+ P = ee();
1867
+ break;
1868
+ default:
1869
+ P = l("span", {
1870
+ class: "ffilepreview--preview-block"
1871
+ }, null);
1872
+ }
1873
+ return P;
1874
+ }
1875
+ function W() {
1876
+ return u.value ? l("div", {
1877
+ class: "header--left-container"
1878
+ }, [l(V("f-file-select"), {
1879
+ ref: a,
1880
+ disabled: v.value,
1881
+ selectText: t.selectText
1882
+ }, null)]) : null;
1883
+ }
1884
+ function Y() {
1885
+ return (!C.value || !t.deleteButtonDisable) && f.value ? l("div", {
1886
+ class: "header--right-container"
1887
+ }, [C.value ? null : l("button", {
1888
+ class: "btn btn-primary f-btn-ml",
1889
+ disabled: !0
1890
+ }, [x("下载")]), t.deleteButtonDisable.value ? null : l("button", {
1891
+ class: "btn btn-secondary f-btn-ml",
1892
+ disabled: !0
1893
+ }, [x("删除")])]) : null;
1894
+ }
1895
+ function le() {
1896
+ return T.value.map((F) => E(F) ? l("th", {
1897
+ style: {
1898
+ width: F.width ? F.width + "px" : "auto"
1899
+ },
1900
+ class: [!d.value && F.checkbox && F.checkbox ? "td--hascheckbox" : ""]
1901
+ }, [!d.value && h.value && F.checkbox ? l(V("f-preview-checkbox"), {
1902
+ class: "preview-checkbox",
1903
+ id: "previewMultiBtn"
1904
+ }, null) : null, F.title]) : null);
1905
+ }
1906
+ function X() {
1907
+ return i.map((F) => l("tr", {
1908
+ class: ["uploadAndpreview--preview-item", D.value === F.id ? "uploadAndpreview--currentfile" : ""],
1909
+ id: "uploadAndpreview--preview-item" + F.id
1910
+ }, [T.value.map((O) => E(O) ? l("td", {
1911
+ class: [!d.value && O.checkbox && O.checkbox ? "td--hascheckbox" : ""]
1912
+ }, [!d.value && h.value && O.checkbox ? l(V("f-preview-checkbox"), {
1913
+ class: "preview-checkbox"
1914
+ }, null) : null, te("preview", F, O)]) : null)]));
1915
+ }
1916
+ Ve(() => {
1917
+ });
1918
+ const _ = B(), G = Z("design-item-context"), M = Ye(_, G);
1919
+ return ve(() => {
1920
+ _.value.componentInstance = M;
1921
+ }), e.expose(M.value), () => l("div", {
1922
+ class: "fv-upload-and-preview",
1923
+ ref: _
1924
+ }, [f.value || u.value ? l(J, null, [d.value ? null : l("div", {
1925
+ class: "uploadAndpreview--header"
1926
+ }, [W(), Y()]), l("div", {
1927
+ class: "uploadAndpreview--content"
1928
+ }, [l("table", {
1929
+ class: "table table-bordered uploadAndpreview--table"
1930
+ }, [l("thead", null, [le()]), l("tbody", null, [X()])])]), y()]) : null]);
1931
+ }
1932
+ });
1933
+ ue.register = (t, e, n, s) => {
1934
+ t.uploader = ue, e.uploader = Be;
1935
+ };
1936
+ ue.registerDesigner = (t, e, n) => {
1937
+ t.uploader = Dt, e.uploader = Be;
1938
+ };
1939
+ const Ut = We(ue);
1450
1940
  export {
1451
- ut as FUploader,
1452
- Ve as UploadServerAPI,
1453
- vt as default,
1454
- $e as uploaderProps
1941
+ ue as FUploader,
1942
+ mt as UploadServerAPI,
1943
+ Ut as default,
1944
+ Be as propsResolver,
1945
+ he as uploaderProps
1455
1946
  };