@farris/ui-vue 1.7.1 → 1.7.2-beta.2

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