@web-utils/component 4.0.15 → 5.0.0-beta01

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 (307) hide show
  1. package/address-input/index.mjs +76 -76
  2. package/affix/index.mjs +71 -78
  3. package/aside-menu/index.mjs +20 -31
  4. package/avatar/index.mjs +94 -82
  5. package/awesome-button/index.mjs +54 -71
  6. package/capsule-tab/index.mjs +27 -32
  7. package/card/index.mjs +86 -71
  8. package/carousel/index.mjs +45 -34
  9. package/chat/index.mjs +440 -276
  10. package/chunk-file-uploader/index.mjs +2 -445
  11. package/chunk-file-uploader/style.css +1 -1
  12. package/chunks/ChunkFileUploader.C3EA0e5t.mjs +114 -0
  13. package/chunks/EditableTree.C_IJBL5b.mjs +648 -0
  14. package/chunks/ElementBaseInfo.DyuFR6fE.mjs +209 -0
  15. package/chunks/ElementDialog.C0IjriTW.mjs +681 -0
  16. package/chunks/ElementForm.ButuYDPA.mjs +627 -0
  17. package/chunks/ElementListeners.Dg3e_dmp.mjs +656 -0
  18. package/chunks/ElementMultiInstance.Dmi79FqA.mjs +290 -0
  19. package/chunks/ElementOtherConfig.C2AddGTp.mjs +51 -0
  20. package/chunks/ElementProperties.CfV8UF7L.mjs +196 -0
  21. package/chunks/ElementTaskConfig.Bn7ycGGn.mjs +446 -0
  22. package/chunks/FlowCondition.C6PdqOAW.mjs +194 -0
  23. package/chunks/FlowDesigner.uJYFfKpR.mjs +5101 -0
  24. package/chunks/FormBlock.BEENc22F.mjs +117 -0
  25. package/chunks/FormCascader.CaM-oEhv.mjs +1226 -0
  26. package/chunks/FormInputTime.Bg3UIP8H.mjs +1773 -0
  27. package/chunks/FormItem.H9OOvNzT.mjs +90 -0
  28. package/chunks/FormItemGroup.D9eRy-cZ.mjs +147 -0
  29. package/chunks/FormSelect.CanodoAI.mjs +1472 -0
  30. package/chunks/FormSwitch.DTqdaFjv.mjs +296 -0
  31. package/chunks/FormTemp.DiI5EfgK.mjs +139 -0
  32. package/chunks/FyCurd.DMj1dMK9.mjs +2622 -0
  33. package/chunks/FyForm.vgR8ujEF.mjs +904 -0
  34. package/chunks/FyFormDesign.DEWT6LsX.mjs +5600 -0
  35. package/chunks/FyUEditor.D_rEYfll.mjs +221 -0
  36. package/chunks/FyUpload.B2QKfTxF.mjs +504 -0
  37. package/chunks/Keyboard.ItiRy7Gb.mjs +379 -0
  38. package/chunks/MonacoEditor.Bd5Kui-Y.mjs +301 -0
  39. package/chunks/PageableTable.Bujb0NUx.mjs +658 -0
  40. package/chunks/RecordVideo.B35_dLty.mjs +116 -0
  41. package/chunks/SignalAndMessage.CYVzlFuL.mjs +198 -0
  42. package/chunks/SplitPane.Dw96M0Yf.mjs +219 -0
  43. package/chunks/TableColumn.DJYkznbJ.mjs +180 -0
  44. package/chunks/TableView.DyIdIxAg.mjs +484 -0
  45. package/chunks/Toolbar.DHuXJAoG.mjs +219 -0
  46. package/chunks/UserTaskListeners.Bp-2qkHs.mjs +599 -0
  47. package/chunks/VueCron.GfjodnyM.mjs +1766 -0
  48. package/chunks/VueTreeSelect.9Ywl-I8e.mjs +1872 -0
  49. package/chunks/_plugin-vue_export-helper.7vrlOII_.mjs +8 -0
  50. package/chunks/checkbox.emIuFmnt.mjs +437 -0
  51. package/chunks/confirmable-mixin.BBil7dto.mjs +1646 -0
  52. package/chunks/core.DJv6Qrae.mjs +51 -0
  53. package/chunks/dataformat.Bfr4nOcA.mjs +144 -0
  54. package/chunks/dic.DgDfnovD.mjs +116 -0
  55. package/chunks/dictionary.5eKjWeAp.mjs +19 -0
  56. package/chunks/dictionary.DxZxP0ej.mjs +87 -0
  57. package/chunks/event.B4iwtUNO.mjs +4 -0
  58. package/chunks/event.eJ-c1Z3a.mjs +224 -0
  59. package/chunks/focus-trap.DT4GnqQI.mjs +211 -0
  60. package/chunks/form-input.D25eDRMq.mjs +34 -0
  61. package/chunks/form-item.CgmUuw_n.mjs +714 -0
  62. package/chunks/form-pick.Axem0gOO.mjs +7 -0
  63. package/chunks/form-validate.B1KPCHqN.mjs +11 -0
  64. package/chunks/icon.CbS8-322.mjs +259 -0
  65. package/chunks/init.DwpukyOB.mjs +115 -0
  66. package/chunks/input.PejnqwSH.mjs +547 -0
  67. package/chunks/install.yLcn5MLL.mjs +84 -0
  68. package/chunks/message.BCmee5N0.mjs +400 -0
  69. package/chunks/overlay.DubSnqma.mjs +122 -0
  70. package/chunks/packages.BGjydzjm.mjs +56 -0
  71. package/chunks/permission.DgEVNWlh.mjs +16 -0
  72. package/chunks/photo-swipe.BB0SJZg9.mjs +55 -0
  73. package/chunks/radio.BotKXqJr.mjs +274 -0
  74. package/chunks/scroll.CzORc5Zk.mjs +28 -0
  75. package/chunks/scrollbar.CAmrlKi9.mjs +345 -0
  76. package/chunks/slot.C6Ozd2e7.mjs +25 -0
  77. package/chunks/style.BmlGmjpO.mjs +325 -0
  78. package/chunks/sub-table-plus-props.B_lLth3j.mjs +28 -0
  79. package/chunks/tab-mixin.u0EZpx3j.mjs +70 -0
  80. package/chunks/tag.DPi-PLbb.mjs +141 -0
  81. package/chunks/teleport._VGEzK4d.mjs +22 -0
  82. package/chunks/tooltip.D50x7Rva.mjs +1926 -0
  83. package/chunks/typescript.DiWBU4nj.mjs +4 -0
  84. package/chunks/use-aria.BW7nWOl1.mjs +17 -0
  85. package/chunks/use-composition.mUaomyno.mjs +47 -0
  86. package/chunks/use-deprecated.BfDSbZS9.mjs +12 -0
  87. package/chunks/use-empty-values.Dy_r78F6.mjs +263 -0
  88. package/chunks/use-form-item.wsRjehHp.mjs +47 -0
  89. package/chunks/use-global-config.C9hs-O_x.mjs +56 -0
  90. package/chunks/use-id.CFO5NeoV.mjs +15 -0
  91. package/chunks/use-size.DxrwTUwf.mjs +18 -0
  92. package/chunks/util.B3sjVZoZ.mjs +103 -0
  93. package/chunks/util.g-WQEec9.mjs +223 -0
  94. package/chunks/utilSelf.ZED4DmCU.mjs +46 -0
  95. package/chunks/utils.Cs2fYBrT.mjs +60 -0
  96. package/chunks/utils.DsGhtCIO.mjs +14 -0
  97. package/chunks/validator.C4-z_t9p.mjs +5 -0
  98. package/chunks/vnode.D_SioRnx.mjs +14 -0
  99. package/code-mirror-editor/index.mjs +89 -88
  100. package/comment/index.mjs +62 -57
  101. package/configComponents.mjs +40 -50
  102. package/confirm-button/index.mjs +34 -46
  103. package/confirmable/index.mjs +7 -17
  104. package/context-menu/index.mjs +195 -174
  105. package/count-up/index.mjs +97 -105
  106. package/custom-scrollbar/index.mjs +91 -98
  107. package/data-box/index.mjs +64 -47
  108. package/data-card/index.mjs +60 -49
  109. package/data-card-text/index.mjs +63 -51
  110. package/data-display/index.mjs +71 -53
  111. package/data-icons/index.mjs +70 -53
  112. package/data-imgtext/index.mjs +67 -46
  113. package/data-operatext/index.mjs +51 -42
  114. package/data-panel/index.mjs +57 -47
  115. package/data-pay/index.mjs +105 -52
  116. package/data-price/index.mjs +48 -42
  117. package/data-progress/index.mjs +67 -48
  118. package/data-rotate/index.mjs +61 -47
  119. package/data-table-picker/index.mjs +119 -74
  120. package/data-tabs/index.mjs +67 -47
  121. package/dialog-form/index.mjs +139 -89
  122. package/dynamic-table/index.mjs +166 -114
  123. package/e-charts/index.mjs +174 -200
  124. package/easy-popup/index.mjs +91 -102
  125. package/editable-progress/index.mjs +112 -85
  126. package/editable-tree/index.mjs +2 -485
  127. package/element-dialog/index.mjs +2 -307
  128. package/element-listeners/style.css +1 -0
  129. package/element-multi-instance/style.css +1 -0
  130. package/ellipsis/index.mjs +124 -148
  131. package/empty-view/index.mjs +48 -65
  132. package/error-view/index.mjs +39 -51
  133. package/flex-column/index.mjs +32 -51
  134. package/flex-item/index.mjs +54 -64
  135. package/flex-row/index.mjs +32 -39
  136. package/flex-scroller/index.mjs +29 -30
  137. package/flow/index.mjs +240 -248
  138. package/flow-designer/index.mjs +2 -5983
  139. package/flow-designer/style.css +1 -1
  140. package/flow-node/index.mjs +56 -64
  141. package/flow-viewer/index.mjs +159 -157
  142. package/form-block/index.mjs +2 -149
  143. package/form-button/index.mjs +35 -47
  144. package/form-card/index.mjs +14 -25
  145. package/form-cascader/index.mjs +2 -116
  146. package/form-checkbox/index.mjs +89 -71
  147. package/form-checkbox-group/index.mjs +161 -116
  148. package/form-date-picker/index.mjs +155 -144
  149. package/form-holder/index.mjs +137 -110
  150. package/form-input/index.mjs +113 -87
  151. package/form-input-cron-expression/index.mjs +97 -79
  152. package/form-input-email/index.mjs +64 -52
  153. package/form-input-id-card/index.mjs +72 -55
  154. package/form-input-phone-number/index.mjs +71 -57
  155. package/form-input-tag/index.mjs +88 -62
  156. package/form-input-time/index.mjs +2 -74
  157. package/form-item/index.mjs +2 -5
  158. package/form-item-config-provider/index.mjs +46 -60
  159. package/form-item-group/index.mjs +2 -160
  160. package/form-radio-group/index.mjs +161 -122
  161. package/form-select/index.mjs +2 -181
  162. package/form-switch/index.mjs +2 -55
  163. package/form-table/index.mjs +131 -85
  164. package/form-table-plus/index.mjs +164 -109
  165. package/form-textarea/index.mjs +90 -57
  166. package/form-tree-select/index.mjs +89 -72
  167. package/form-tree-select-multiple/index.mjs +92 -78
  168. package/form-view/index.mjs +275 -211
  169. package/fy-array/index.mjs +121 -74
  170. package/fy-article/index.mjs +73 -60
  171. package/fy-cascader/index.mjs +113 -91
  172. package/fy-checkbox/index.mjs +96 -66
  173. package/fy-code/index.mjs +48 -50
  174. package/fy-curd/index.mjs +2 -1903
  175. package/fy-date/index.mjs +76 -42
  176. package/fy-draggable/index.mjs +322 -318
  177. package/fy-dynamic/index.mjs +259 -227
  178. package/fy-empty/index.mjs +35 -36
  179. package/fy-form/index.mjs +2 -17
  180. package/fy-form-design/index.mjs +2 -2890
  181. package/fy-form-design/style.css +1 -1
  182. package/fy-from/crud/zh.d.ts +6 -6
  183. package/fy-input/index.mjs +117 -99
  184. package/fy-input-color/index.mjs +77 -56
  185. package/fy-input-icon/index.mjs +129 -85
  186. package/fy-input-map/index.mjs +242 -186
  187. package/fy-input-number/index.mjs +74 -50
  188. package/fy-input-table/index.mjs +160 -109
  189. package/fy-input-tree/index.mjs +259 -182
  190. package/fy-progress/index.mjs +36 -40
  191. package/fy-radio/index.mjs +53 -38
  192. package/fy-rate/index.mjs +86 -71
  193. package/fy-select/index.mjs +223 -140
  194. package/fy-slider/index.mjs +68 -44
  195. package/fy-switch/index.mjs +67 -42
  196. package/fy-tabs/index.mjs +46 -48
  197. package/fy-time/index.mjs +81 -53
  198. package/fy-title/index.mjs +18 -27
  199. package/fy-tree/index.mjs +382 -292
  200. package/fy-u-editor/index.mjs +2 -357
  201. package/fy-upload/index.mjs +2 -423
  202. package/guide-steps/index.mjs +72 -73
  203. package/helper-function.d.ts +2 -30
  204. package/helper-function.mjs +41 -67
  205. package/highlight-j-s/index.mjs +50 -59
  206. package/icon-card/index.mjs +34 -36
  207. package/icon-temp/index.mjs +27 -27
  208. package/iframe-window/index.mjs +39 -33
  209. package/image-cropper/index.mjs +171 -75
  210. package/image-preview/index.mjs +187 -118
  211. package/image-viewer/index.mjs +69 -66
  212. package/index.d.ts +3 -9
  213. package/index.mjs +173 -488
  214. package/input-number-range/index.mjs +78 -59
  215. package/j-s-x-component/index.mjs +13 -15
  216. package/keyboard/index.mjs +2 -369
  217. package/license/index.mjs +106 -115
  218. package/loading-view/index.mjs +39 -51
  219. package/login/index.mjs +252 -125
  220. package/monaco-editor/index.mjs +2 -7
  221. package/name-avatar/index.mjs +61 -53
  222. package/nav-bar/index.mjs +33 -31
  223. package/not-implement/index.mjs +10 -22
  224. package/notice/index.mjs +100 -94
  225. package/package.json +3 -3
  226. package/page/index.mjs +18 -25
  227. package/page-header/index.mjs +27 -33
  228. package/page-index/index.mjs +121 -100
  229. package/page-index-top/index.mjs +79 -79
  230. package/page-skeleton/index.mjs +48 -45
  231. package/page-skeleton-new/index.mjs +79 -50
  232. package/pageable-table/index.mjs +2 -522
  233. package/pageable-view/index.mjs +279 -275
  234. package/photo-swipe/index.d.ts +4 -0
  235. package/photo-swipe/index.mjs +33 -36
  236. package/picker-table-view/index.mjs +224 -126
  237. package/present-view/index.mjs +266 -200
  238. package/queue/index.mjs +45 -53
  239. package/record-video/index.mjs +2 -134
  240. package/resize-observer/index.mjs +43 -46
  241. package/search/index.mjs +116 -109
  242. package/sign/index.mjs +103 -110
  243. package/sign-panel/index.mjs +182 -141
  244. package/skeleton/index.mjs +51 -54
  245. package/skeleton-panel/index.mjs +33 -38
  246. package/split-pane/index.mjs +3 -197
  247. package/stateful/index.mjs +69 -73
  248. package/static-pageable-table/index.mjs +72 -66
  249. package/sub-table/index.mjs +508 -219
  250. package/sub-table-plus/index.mjs +592 -19
  251. package/swiper/index.mjs +128 -121
  252. package/tab/index.mjs +117 -119
  253. package/tab-item/index.mjs +48 -56
  254. package/table-column/index.mjs +2 -5
  255. package/table-view/index.mjs +3 -334
  256. package/tabs-view/index.mjs +109 -106
  257. package/tag-render/index.mjs +79 -69
  258. package/text-ellipsis/index.mjs +94 -78
  259. package/toolbar/index.mjs +2 -255
  260. package/toolbar-button/index.mjs +145 -121
  261. package/verify/index.mjs +58 -64
  262. package/vue-cron/index.mjs +2 -1188
  263. package/vue-qr-code/index.mjs +30 -54
  264. package/vue-quill-editor/index.mjs +123 -99
  265. package/vue-tags-input/index.mjs +348 -431
  266. package/vue-tree-select/index.mjs +2 -2627
  267. package/vue-video-player/index.mjs +135 -136
  268. package/watermark/index.mjs +46 -74
  269. package/web-types.json +197 -975
  270. package/x-input-tag/index.mjs +144 -109
  271. package/chunks/ElementTaskConfig.AvBOzAni.mjs +0 -325
  272. package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
  273. package/chunks/FyForm.DriwCJ7b.mjs +0 -765
  274. package/chunks/MonacoEditor.D31t4FTy.mjs +0 -327
  275. package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
  276. package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
  277. package/chunks/TableColumn.BzivvXMF.mjs +0 -337
  278. package/chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs +0 -10
  279. package/chunks/confirmable-mixin.BFZb6pcK.mjs +0 -86
  280. package/chunks/dataformat.DJoNBlmI.mjs +0 -154
  281. package/chunks/dic.BinnDitI.mjs +0 -128
  282. package/chunks/dictionary.DqiP9x2m.mjs +0 -25
  283. package/chunks/event.DSlcqYHL.mjs +0 -236
  284. package/chunks/form-input.BtS_J5a2.mjs +0 -31
  285. package/chunks/form-pick.BFTIVn_i.mjs +0 -11
  286. package/chunks/form-validate.CVarNHKX.mjs +0 -12
  287. package/chunks/helper.BiMLcEEk.mjs +0 -41
  288. package/chunks/index.BmYCjxZQ.mjs +0 -47
  289. package/chunks/index.CIfe3UB3.mjs +0 -16
  290. package/chunks/index.Cn7aq-Et.mjs +0 -184
  291. package/chunks/init.xOlFpTyZ.mjs +0 -122
  292. package/chunks/packages.ByyangTp.mjs +0 -58
  293. package/chunks/permission.CO31YIkD.mjs +0 -16
  294. package/chunks/slot.DXIbhGat.mjs +0 -27
  295. package/chunks/tab-mixin.BNK6dxLN.mjs +0 -81
  296. package/chunks/util.DI42t5GU.mjs +0 -241
  297. package/color-picker/index.mjs +0 -157
  298. package/egd-collapse/index.mjs +0 -62
  299. package/egd-collapse-item/index.mjs +0 -72
  300. package/form-input-number/index.mjs +0 -70
  301. package/form-input-number/style.css +0 -1
  302. package/input-number/index.mjs +0 -233
  303. package/input-number/style.css +0 -1
  304. package/keep-view-alive/index.mjs +0 -117
  305. package/search-popover/index.mjs +0 -118
  306. package/search-popover/style.css +0 -1
  307. /package/{base.css → utils/style.css} +0 -0
@@ -1,445 +1,2 @@
1
- import m from "simple-uploader.js";
2
- import { n as a } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
- const c = ["fileProgress", "fileSuccess", "fileComplete", "fileError"];
4
- function g(s) {
5
- const e = Math.floor(s / 31536e3);
6
- if (e)
7
- return `${e} 年${n(e)}`;
8
- const t = Math.floor((s %= 31536e3) / 86400);
9
- if (t)
10
- return `${t} 天${n(t)}`;
11
- const r = Math.floor((s %= 86400) / 3600);
12
- if (r)
13
- return `${r} 时${n(r)}`;
14
- const i = Math.floor((s %= 3600) / 60);
15
- if (i)
16
- return `${i} 分${n(i)}`;
17
- const o = s % 60;
18
- return `${o} 秒${n(o)}`;
19
- function n(_) {
20
- return _ > 1, "";
21
- }
22
- }
23
- function p(s) {
24
- return s.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
25
- }
26
- const v = {
27
- name: "ChunkFileUploaderFile",
28
- props: {
29
- file: {
30
- type: Object,
31
- default() {
32
- return {};
33
- }
34
- },
35
- list: {
36
- type: Boolean,
37
- default: !1
38
- }
39
- },
40
- data() {
41
- return {
42
- response: null,
43
- paused: !1,
44
- error: !1,
45
- averageSpeed: 0,
46
- currentSpeed: 0,
47
- isComplete: !1,
48
- isUploading: !1,
49
- size: 0,
50
- formatedSize: "",
51
- uploadedSize: 0,
52
- progress: 0,
53
- timeRemaining: 0,
54
- type: "",
55
- extension: "",
56
- progressingClass: ""
57
- };
58
- },
59
- computed: {
60
- fileCategory() {
61
- const s = this.extension;
62
- let t = this.file.isFolder ? "folder" : "unknown";
63
- const i = this.file.uploader.opts.categoryMap || {
64
- image: ["gif", "jpg", "jpeg", "png", "bmp", "webp"],
65
- video: ["mp4", "m3u8", "rmvb", "avi", "swf", "3gp", "mkv", "flv"],
66
- audio: ["mp3", "wav", "wma", "ogg", "aac", "flac"],
67
- document: ["doc", "txt", "docx", "pages", "epub", "pdf", "numbers", "csv", "xls", "xlsx", "keynote", "ppt", "pptx"]
68
- };
69
- return Object.keys(i).forEach((o) => {
70
- i[o].indexOf(s) > -1 && (t = o);
71
- }), t;
72
- },
73
- progressStyle() {
74
- const s = Math.floor(this.progress * 100), e = `translateX(${Math.floor(s - 100)}%)`;
75
- return {
76
- progress: `${s}%`,
77
- webkitTransform: e,
78
- mozTransform: e,
79
- msTransform: e,
80
- transform: e
81
- };
82
- },
83
- formatedAverageSpeed() {
84
- return `${m.utils.formatSize(this.averageSpeed)} / s`;
85
- },
86
- status() {
87
- const { isUploading: s, isComplete: e, isError: t, paused: r } = this, { md5Computing: i } = this.file;
88
- return i ? "md5" : e ? "success" : t ? "error" : s ? "uploading" : r ? "paused" : "waiting";
89
- },
90
- statusText() {
91
- const s = this.status, e = this.file.uploader.fileStatusText;
92
- let t = s;
93
- return typeof e == "function" ? t = e(s, this.response) : t = e[s], t || "";
94
- },
95
- formatedTimeRemaining() {
96
- const s = this.timeRemaining, e = this.file;
97
- if (s === Number.POSITIVE_INFINITY || s === 0)
98
- return "";
99
- let t = g(s);
100
- const r = e.uploader.opts.parseTimeRemaining;
101
- return r && (t = r(s, t)), t;
102
- }
103
- },
104
- watch: {
105
- status(s, e) {
106
- e && s === "uploading" && e !== "uploading" ? this.tid = setTimeout(() => {
107
- this.progressingClass = "uploader-file-progressing";
108
- }, 200) : (clearTimeout(this.tid), this.progressingClass = "");
109
- }
110
- },
111
- mounted() {
112
- const s = ["paused", "error", "averageSpeed", "currentSpeed"], e = [
113
- "isComplete",
114
- "isUploading",
115
- {
116
- key: "size",
117
- fn: "getSize"
118
- },
119
- {
120
- key: "formatedSize",
121
- fn: "getFormatSize"
122
- },
123
- {
124
- key: "uploadedSize",
125
- fn: "sizeUploaded"
126
- },
127
- "progress",
128
- "timeRemaining",
129
- {
130
- key: "type",
131
- fn: "getType"
132
- },
133
- {
134
- key: "extension",
135
- fn: "getExtension"
136
- }
137
- ];
138
- s.forEach((i) => {
139
- this[i] = this.file[i];
140
- }), e.forEach((i) => {
141
- typeof i == "string" ? this[i] = this.file[i]() : this[i.key] = this.file[i.fn]();
142
- });
143
- const t = this._handlers = {}, r = (i) => (t[i] = (...o) => {
144
- this.fileEventsHandler(i, o);
145
- }, t[i]);
146
- c.forEach((i) => {
147
- this.file.uploader.on(i, r(i));
148
- });
149
- },
150
- destroyed() {
151
- c.forEach((s) => {
152
- this.file.uploader.off(s, this._handlers[s]);
153
- }), this._handlers = null;
154
- },
155
- methods: {
156
- _actionCheck() {
157
- this.paused = this.file.paused, this.error = this.file.error, this.isUploading = this.file.isUploading();
158
- },
159
- pause() {
160
- this.file.pause(), this._actionCheck(), this._fileProgress();
161
- },
162
- resume() {
163
- this.file.resume(), this._actionCheck();
164
- },
165
- remove() {
166
- this.$set(this.file, "canceled", !0), this.file.cancel();
167
- },
168
- retry() {
169
- this.file.retry(), this._actionCheck();
170
- },
171
- processResponse(s) {
172
- let e = s;
173
- try {
174
- e = JSON.parse(s);
175
- } catch {
176
- }
177
- this.response = e;
178
- },
179
- fileEventsHandler(s, e) {
180
- var o;
181
- const t = e[0], r = e[1], i = this.list ? t : r;
182
- if (this.file === i) {
183
- if (this.list && s === "fileSuccess") {
184
- this.processResponse(e[2]);
185
- return;
186
- }
187
- (o = this[`_${s}`]) == null || o.call(this, ...e);
188
- }
189
- },
190
- _fileProgress() {
191
- this.progress = this.file.progress(), this.averageSpeed = this.file.averageSpeed, this.currentSpeed = this.file.currentSpeed, this.timeRemaining = this.file.timeRemaining(), this.uploadedSize = this.file.sizeUploaded(), this._actionCheck();
192
- },
193
- _fileSuccess(s, e, t) {
194
- s && this.processResponse(t), this._fileProgress(), this.error = !1, this.isComplete = !0, this.isUploading = !1;
195
- },
196
- _fileComplete() {
197
- this._fileSuccess();
198
- },
199
- _fileError(s, e, t) {
200
- this._fileProgress(), this.processResponse(t), this.error = !0, this.isComplete = !1, this.isUploading = !1;
201
- }
202
- }
203
- };
204
- var S = function() {
205
- var e = this, t = e._self._c;
206
- return t("div", { staticClass: "chunk-file-uploader-file", attrs: { status: e.status } }, [e._t("default", function() {
207
- return [t("div", { staticClass: "chunk-file-uploader-file-info" }, [t("div", { staticClass: "chunk-file-uploader-file-name", attrs: { title: e.file.name } }, [t("i", { staticClass: "chunk-file-uploader-file-icon", attrs: { icon: e.fileCategory } }), e._v(e._s(e.file.name))]), t("div", { staticClass: "chunk-file-uploader-file-size" }, [e._v(" " + e._s(e.formatedSize) + " ")]), t("div", { staticClass: "chunk-file-uploader-file-status" }, [t("span", { directives: [{ name: "show", rawName: "v-show", value: !["uploading", "md5"].includes(e.status), expression: "!['uploading', 'md5'].includes(status)" }] }, [e._v(e._s(e.statusText))]), t("span", { directives: [{ name: "show", rawName: "v-show", value: e.status === "md5", expression: "status === 'md5'" }] }, [e._v(e._s(e.file.md5Progress))]), t("span", { directives: [{ name: "show", rawName: "v-show", value: e.status === "uploading", expression: "status === 'uploading'" }], staticStyle: { "padding-left": "4px" } }, [t("span", [e._v(e._s(e.progressStyle.progress))]), e._v(" | "), t("em", [e._v(e._s(e.formatedAverageSpeed))]), e._v(" | "), t("i", [e._v(e._s(e.formatedTimeRemaining))])])]), t("div", { staticClass: "chunk-file-uploader-file-actions" }, [t("span", { staticClass: "chunk-file-uploader-file-pause", on: { click: e.pause } }), t("span", { staticClass: "chunk-file-uploader-file-resume", on: { click: e.resume } }, [e._v("️")]), t("span", { staticClass: "chunk-file-uploader-file-retry", on: { click: e.retry } }), t("span", { staticClass: "chunk-file-uploader-file-remove", on: { click: e.remove } })])])];
208
- }, { file: e.file, list: e.list, status: e.status, paused: e.paused, error: e.error, response: e.response, averageSpeed: e.averageSpeed, formatedAverageSpeed: e.formatedAverageSpeed, currentSpeed: e.currentSpeed, isComplete: e.isComplete, isUploading: e.isUploading, size: e.size, formatedSize: e.formatedSize, uploadedSize: e.uploadedSize, progress: e.progress, progressStyle: e.progressStyle, progressingClass: e.progressingClass, timeRemaining: e.timeRemaining, formatedTimeRemaining: e.formatedTimeRemaining, type: e.type, extension: e.extension, fileCategory: e.fileCategory })], 2);
209
- }, y = [], C = /* @__PURE__ */ a(
210
- v,
211
- S,
212
- y,
213
- !1,
214
- null,
215
- null
216
- );
217
- const x = C.exports, d = {
218
- inject: ["uploader"]
219
- }, f = {
220
- data() {
221
- return {
222
- support: !0
223
- };
224
- },
225
- mounted() {
226
- this.support = this.uploader.uploader.support;
227
- }
228
- }, $ = {
229
- name: "ChunkFileUploaderList",
230
- mixins: [d],
231
- computed: {
232
- fileList() {
233
- return this.uploader.fileList;
234
- }
235
- }
236
- };
237
- var k = function() {
238
- var e = this, t = e._self._c;
239
- return t("div", { staticClass: "uploader-list" }, [e._t("default", function() {
240
- return [t("ul", e._l(e.fileList, function(r) {
241
- return t("li", { key: r.id }, [t(x, { attrs: { file: r, list: !0 } })], 1);
242
- }), 0)];
243
- }, { fileList: e.fileList })], 2);
244
- }, w = [], T = /* @__PURE__ */ a(
245
- $,
246
- k,
247
- w,
248
- !1,
249
- null,
250
- null
251
- );
252
- const E = T.exports, R = {
253
- name: "ChunkFileUploaderButton",
254
- mixins: [d, f],
255
- props: {
256
- directory: {
257
- type: Boolean,
258
- default: !1
259
- },
260
- single: {
261
- type: Boolean,
262
- default: !1
263
- },
264
- attrs: {
265
- type: Object,
266
- default() {
267
- return {};
268
- }
269
- }
270
- },
271
- mounted() {
272
- this.$nextTick(() => {
273
- this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, this.attrs);
274
- });
275
- }
276
- };
277
- var b = function() {
278
- var e = this, t = e._self._c;
279
- return t("label", { directives: [{ name: "show", rawName: "v-show", value: e.support, expression: "support" }], ref: "btn", staticClass: "uploader-btn" }, [e._t("default")], 2);
280
- }, F = [], A = /* @__PURE__ */ a(
281
- R,
282
- b,
283
- F,
284
- !1,
285
- null,
286
- null
287
- );
288
- const h = A.exports, z = {
289
- name: "ChunkFileUploaderDrop",
290
- mixins: [d, f],
291
- data() {
292
- return {
293
- dropClass: ""
294
- };
295
- },
296
- async mounted() {
297
- await this.$nextTick();
298
- const s = this.$refs.drop, e = this.uploader.uploader;
299
- e.assignDrop(s), e.on("dragenter", this.onDragEnter), e.on("dragleave", this.onDragLeave), e.on("drop", this.onDrop);
300
- },
301
- beforeDestroy() {
302
- const s = this.$refs.drop, e = this.uploader.uploader;
303
- e.off("dragenter", this.onDragEnter), e.off("dragleave", this.onDragLeave), e.off("drop", this.onDrop), e.unAssignDrop(s);
304
- },
305
- methods: {
306
- onDragEnter() {
307
- this.dropClass = "uploader-dragover";
308
- },
309
- onDragLeave() {
310
- this.dropClass = "";
311
- },
312
- onDrop() {
313
- this.dropClass = "uploader-droped";
314
- }
315
- }
316
- };
317
- var U = function() {
318
- var e = this, t = e._self._c;
319
- return t("div", { directives: [{ name: "show", rawName: "v-show", value: e.support, expression: "support" }], ref: "drop", staticClass: "uploader-drop", class: e.dropClass }, [e._t("default")], 2);
320
- }, D = [], L = /* @__PURE__ */ a(
321
- z,
322
- U,
323
- D,
324
- !1,
325
- null,
326
- null
327
- );
328
- const M = L.exports, N = {
329
- name: "ChunkFileUploaderUnSupport",
330
- mixins: [d, f]
331
- };
332
- var P = function() {
333
- var e = this, t = e._self._c;
334
- return t("div", { directives: [{ name: "show", rawName: "v-show", value: !e.support, expression: "!support" }], staticClass: "uploader-unsupport" }, [e._t("default", function() {
335
- return [e._m(0)];
336
- })], 2);
337
- }, I = [function() {
338
- var s = this, e = s._self._c;
339
- return e("p", [s._v(" Your browser, unfortunately, is not supported by Uploader.js. The library requires support for "), e("a", { attrs: { href: "http://www.w3.org/TR/FileAPI/" } }, [s._v("the HTML5 File API")]), s._v(" along with "), e("a", { attrs: { href: "http://www.w3.org/TR/FileAPI/#normalization-of-params" } }, [s._v("file slicing")]), s._v(". ")]);
340
- }], j = /* @__PURE__ */ a(
341
- N,
342
- P,
343
- I,
344
- !1,
345
- null,
346
- null
347
- );
348
- const O = j.exports, l = "fileAdded", u = "filesAdded", B = "uploadStart", V = {
349
- name: "ChunkFileUploader",
350
- provide() {
351
- return {
352
- uploader: this
353
- };
354
- },
355
- props: {
356
- options: {
357
- type: Object,
358
- default() {
359
- return {};
360
- }
361
- },
362
- autoStart: {
363
- type: Boolean,
364
- default: !0
365
- },
366
- fileStatusText: {
367
- type: [Object, Function],
368
- default() {
369
- return {
370
- success: "success",
371
- error: "error",
372
- uploading: "uploading",
373
- paused: "paused",
374
- waiting: "waiting"
375
- };
376
- }
377
- }
378
- },
379
- data() {
380
- return {
381
- started: !1,
382
- files: [],
383
- fileList: []
384
- };
385
- },
386
- created() {
387
- this.options.initialPaused = !this.autoStart;
388
- const s = new m(this.options);
389
- this.uploader = s, this.uploader.fileStatusText = this.fileStatusText, s.on("catchAll", this.allEvent), s.on(l, this.fileAdded), s.on(u, this.filesAdded), s.on("fileRemoved", this.fileRemoved), s.on("filesSubmitted", this.filesSubmitted);
390
- },
391
- destroyed() {
392
- const s = this.uploader;
393
- s.off("catchAll", this.allEvent), s.off(l, this.fileAdded), s.off(u, this.filesAdded), s.off("fileRemoved", this.fileRemoved), s.off("filesSubmitted", this.filesSubmitted), this.uploader = null;
394
- },
395
- methods: {
396
- uploadStart() {
397
- this.started = !0;
398
- },
399
- fileAdded(s) {
400
- if (this.$emit(p(l), s), s.ignored)
401
- return !1;
402
- },
403
- filesAdded(s, e) {
404
- if (this.$emit(p(u), s, e), s.ignored || e.ignored)
405
- return !1;
406
- },
407
- fileRemoved(s) {
408
- this.$emit("file-removed", s), this.files = this.uploader.files, this.fileList = this.uploader.fileList;
409
- },
410
- filesSubmitted() {
411
- this.files = this.uploader.files, this.fileList = this.uploader.fileList, this.autoStart && this.uploader.upload();
412
- },
413
- allEvent(...s) {
414
- var i;
415
- const e = s[0], r = {
416
- [l]: !0,
417
- [u]: !0,
418
- [B]: "uploadStart"
419
- }[e];
420
- if (r) {
421
- if (r === !0)
422
- return;
423
- (i = this[r]) == null || i.call(this, s.slice(1));
424
- }
425
- s[0] = p(e), this.$emit(...s);
426
- }
427
- }
428
- };
429
- var H = function() {
430
- var e = this, t = e._self._c;
431
- return t("div", { staticClass: "uploader" }, [e._t("default", function() {
432
- return [t(O), t(M, [t("p", [e._v("Drop files here to upload or")]), t(h, [e._v("select files")]), t(h, { attrs: { directory: !0 } }, [e._v(" select folder ")])], 1), t(E)];
433
- }, { files: e.files, fileList: e.fileList, started: e.started })], 2);
434
- }, Y = [], q = /* @__PURE__ */ a(
435
- V,
436
- H,
437
- Y,
438
- !1,
439
- null,
440
- null
441
- );
442
- const Z = q.exports;
443
- export {
444
- Z as default
445
- };
1
+ import { t as e } from "../chunks/ChunkFileUploader.C3EA0e5t.mjs";
2
+ export { e as default };
@@ -1 +1 @@
1
- .chunk-file-uploader-file{border-bottom:1px solid #cdcdcd;height:49px;line-height:49px;position:relative;overflow:hidden}.chunk-file-uploader-file[status=waiting] .chunk-file-uploader-file-pause,.chunk-file-uploader-file[status=uploading] .chunk-file-uploader-file-pause,.chunk-file-uploader-file[status=paused] .chunk-file-uploader-file-resume,.chunk-file-uploader-file[status=error] .chunk-file-uploader-file-retry{display:block}.chunk-file-uploader-file[status=success] .chunk-file-uploader-file-remove{display:none}.chunk-file-uploader-file[status=error] .chunk-file-uploader-file-progress{background:#ffe0e0}.chunk-file-uploader-file-progress{background:#e2eeff;width:100%;height:100%;position:absolute;transform:translate(-100%)}.chunk-file-uploader-file-progressing{transition:all .4s linear}.chunk-file-uploader-file-info{z-index:1;flex-direction:row;height:100%;display:flex;position:relative;overflow:hidden}.chunk-file-uploader-file-info:hover{background-color:#f0f0f033}.chunk-file-uploader-file-info i,.chunk-file-uploader-file-info em{font-style:normal}.chunk-file-uploader-file-name,.chunk-file-uploader-file-size,.chunk-file-uploader-file-meta,.chunk-file-uploader-file-status,.chunk-file-uploader-file-actions{height:100%;padding:0 10px;position:relative}.chunk-file-uploader-file-size,.chunk-file-uploader-file-meta,.chunk-file-uploader-file-status,.chunk-file-uploader-file-actions{flex-shrink:0}.chunk-file-uploader-file-name{white-space:nowrap;text-indent:14px;text-overflow:ellipsis;flex:auto;overflow:hidden}.chunk-file-uploader-file-icon{vertical-align:top;width:24px;height:24px;margin-top:13px;margin-right:8px;display:inline-block}.chunk-file-uploader-file-icon:before{color:gray;text-indent:0;content:"📃";height:100%;font-size:24px;line-height:1;display:block}.chunk-file-uploader-file-icon[icon=folder]:before{content:"📂"}.chunk-file-uploader-file-icon[icon=image]:before{content:"📊"}.chunk-file-uploader-file-icon[icon=video]:before{content:"📹"}.chunk-file-uploader-file-icon[icon=audio]:before{content:"🎵"}.chunk-file-uploader-file-icon[icon=document]:before{content:"📋"}.chunk-file-uploader-file-actions>span{float:left;cursor:pointer;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABkCAYAAAD0ZHJ6AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAARkSURBVGje7ZnfS1NRHMAH4ptPkvQSuAdBkCxD8FUQJMEULUgzy1KyyPVQ4JMiiP4Bvg6EwUQQfMmwhwRDshwaKUjDVCgoSdDNHkzTJZ6+Z37Purve8+PeTb2TM/ggu+ew89l33x8H9BBCPG7GowXTJej3+wnDvEm0JuLC04+EYWftVAUv+fiCvDUdQR1BHUEdQR3BTIygvixoQS14XgTtthLVdpNWwXRLqvQ724LplFRtyrYF0yVpFLQrKRVMh6RZ0I6kkmCqklaCqpKZH0FX56Crq9jVfdDVk0RfFrSgFsxkQVmLcdKCVrKySCrryhPEyYShhzOcrFtG0EoilfHHk1CRU5rF6ZjNZhlVOW6RnMSVyyilKies4pO41diVy8wIujoHXV3FGdMHXTtJKLFYTLhZtq4vC1rwXApCZTIqgR6g1PBMCO9DL3bMMSqBHqDU8EyISDAHiGKvWwcCQG2KgjlAFCDAOhAAap0K5gKLphk8mqJgLrCIgoxRJ4J5wKpJ7gAoMkn5EBXBPGDVJHcAFJmkfIhQcAql1oBpTvTol9gG9pm4RHAKpdaAaU706JfYBvaZuJVgPQrt4sFlnOh5MC/p3lmJYD0K7eLBZZzoeTAv6d5ZnuAYHjpgEOnk5F0ufhG6v1ggOIaHDhhEOjl5l4tfhO4vthLcwAMrFNvLJO5vEwhu4IEViu1lEve3WQmyoihQFBzG/V0CQVYUBYqCw7i/SxTBcpsRbFeIYLnNCLZbCY5b5KAnxRwct8hBj9McZFVMW0ihRNBuFdMWUigRlFaxuQ9WWYjRMTiIe5z0wSoLMToGB3GPsA9aTZIJoB+nRgBnM1tzOkkmgH6cGgGczWzNpzqLx3n/aULJJgezeNw07oxQySbVywKjBOgFRnDs+VEsx8FlgVEC9AIjOPb8KJYjvSzoG7UW1IJaUAtqQS14toLNM5fN5APdwBJA8G83Pk/aK/rgzVvXzeQD3cASQPBvNz5P2ssTzAaGUIrHEO6zI5gNDKEUjyHcxxWkh4Ylcowwk1QQpIeGJXKMMJO0EgwqyjGCioJBJvDrxRMSuVOTJEXfbz1/bHwWtBL0yoQehK6RucgE+bGzanzulQh6E3IgQV+xpc8kcrfuSO7eTfJ3ZYmQw0Oy9azVKOk1C/bJ5D5F38YPeLfx0rjWJxHsS0SqsSYuxySjj5qO5Oj7xQWy2VBtFOwzCy6ryH3YfE3uh64Y1xckgstJPydEjkkeHv07Iy4Xaao15+KCWTBx6M/db+T9xivSErqaJDdzXI6yLRE8Vgg0coex/SPJvT0SbWu0KpZtbgSpCH3NRt7I5OxHkObc6heU+/M/J5vrpBFM5GBLqCQux14COXs5CNXK5OjPGm1tSMrJSOMNYQ4mVTGV/L6zTL7+DovkbFUxbSW0Wo05l8hJWsU+cRWfSh+Mt5Lb1ck/J1TvVsdDaR/MiEni+llsdZuZp62EViu+96bpNjNPWwmtVnzvFd5m9IVVC54x/wA7gNvqFG9vXQAAAABJRU5ErkJggg==) no-repeat;width:16px;height:16px;margin-top:16px;margin-right:10px;display:none}.chunk-file-uploader-file-actions>span:hover{background-position-x:-21px}.chunk-file-uploader-file-actions .chunk-file-uploader-file-pause{background-position-y:0}.chunk-file-uploader-file-actions .chunk-file-uploader-file-resume{background-position-y:-17px}.chunk-file-uploader-file-actions .chunk-file-uploader-file-retry{background-position-y:-53px}.chunk-file-uploader-file-actions .chunk-file-uploader-file-remove{background-position-y:-34px;display:block}.uploader-list{position:relative}.uploader-list>ul{margin:0;padding:0;list-style:none}.uploader-btn{color:#666;cursor:pointer;background:0 0;border:1px solid #666;border-radius:2px;outline:none;padding:4px 8px;font-size:100%;line-height:1.4;display:inline-block;position:relative}.uploader-btn:hover{background-color:#00000014}.uploader-drop{background-color:#f5f5f5;border:1px dashed #ccc;padding:10px;position:relative;overflow:hidden}.uploader-dragover{background-color:#f7f7f7;border-color:#999}.uploader-unsupport{z-index:10;position:relative;overflow:hidden}.uploader{position:relative}
1
+ .uploader{position:relative}
@@ -0,0 +1,114 @@
1
+ import { t as e } from "./_plugin-vue_export-helper.7vrlOII_.mjs";
2
+ import { createElementBlock as t, createElementVNode as n, createTextVNode as r, createVNode as i, openBlock as a, renderSlot as o, resolveComponent as s, withCtx as c } from "vue";
3
+ import l from "simple-uploader.js";
4
+ //#region src/components/chunk-file-uploader/common/utils.js
5
+ function u(e) {
6
+ return e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
7
+ }
8
+ //#endregion
9
+ //#region src/components/chunk-file-uploader/ChunkFileUploader.vue
10
+ var d = "fileAdded", f = "filesAdded", p = "uploadStart", m = {
11
+ name: "ChunkFileUploader",
12
+ provide() {
13
+ return { uploader: this };
14
+ },
15
+ props: {
16
+ options: {
17
+ type: Object,
18
+ default() {
19
+ return {};
20
+ }
21
+ },
22
+ autoStart: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ fileStatusText: {
27
+ type: [Object, Function],
28
+ default() {
29
+ return {
30
+ success: "success",
31
+ error: "error",
32
+ uploading: "uploading",
33
+ paused: "paused",
34
+ waiting: "waiting"
35
+ };
36
+ }
37
+ }
38
+ },
39
+ emits: ["file-removed"],
40
+ data() {
41
+ return {
42
+ started: !1,
43
+ files: [],
44
+ fileList: []
45
+ };
46
+ },
47
+ created() {
48
+ this.options.initialPaused = !this.autoStart;
49
+ let e = new l(this.options);
50
+ this.uploader = e, this.uploader.fileStatusText = this.fileStatusText, e.on("catchAll", this.allEvent), e.on(d, this.fileAdded), e.on(f, this.filesAdded), e.on("fileRemoved", this.fileRemoved), e.on("filesSubmitted", this.filesSubmitted);
51
+ },
52
+ unmounted() {
53
+ let e = this.uploader;
54
+ e.off("catchAll", this.allEvent), e.off(d, this.fileAdded), e.off(f, this.filesAdded), e.off("fileRemoved", this.fileRemoved), e.off("filesSubmitted", this.filesSubmitted), this.uploader = null;
55
+ },
56
+ methods: {
57
+ uploadStart() {
58
+ this.started = !0;
59
+ },
60
+ fileAdded(e) {
61
+ if (this.$emit(u(d), e), e.ignored) return !1;
62
+ },
63
+ filesAdded(e, t) {
64
+ if (this.$emit(u(f), e, t), e.ignored || t.ignored) return !1;
65
+ },
66
+ fileRemoved(e) {
67
+ this.$emit("file-removed", e), this.files = this.uploader.files, this.fileList = this.uploader.fileList;
68
+ },
69
+ filesSubmitted() {
70
+ this.files = this.uploader.files, this.fileList = this.uploader.fileList, this.autoStart && this.uploader.upload();
71
+ },
72
+ allEvent(...e) {
73
+ let t = e[0], n = {
74
+ [d]: !0,
75
+ [f]: !0,
76
+ [p]: "uploadStart"
77
+ }[t];
78
+ if (n) {
79
+ var r;
80
+ if (n === !0) return;
81
+ (r = this[n]) == null || r.call(this, e.slice(1));
82
+ }
83
+ e[0] = u(t), this.$emit(...e);
84
+ }
85
+ }
86
+ }, h = { class: "uploader" };
87
+ function g(e, l, u, d, f, p) {
88
+ let m = s("ChunkFileUploaderUnSupport"), g = s("ChunkFileUploaderButton"), _ = s("ChunkFileUploaderDrop"), v = s("ChunkFileUploaderList");
89
+ return a(), t("div", h, [o(e.$slots, "default", {
90
+ files: f.files,
91
+ fileList: f.fileList,
92
+ started: f.started
93
+ }, () => [
94
+ i(m),
95
+ i(_, null, {
96
+ default: c(() => [
97
+ l[2] || (l[2] = n("p", null, "Drop files here to upload or", -1)),
98
+ i(g, null, {
99
+ default: c(() => [...l[0] || (l[0] = [r("select files", -1)])]),
100
+ _: 1
101
+ }),
102
+ i(g, { directory: !0 }, {
103
+ default: c(() => [...l[1] || (l[1] = [r(" select folder ", -1)])]),
104
+ _: 1
105
+ })
106
+ ]),
107
+ _: 1
108
+ }),
109
+ i(v)
110
+ ])]);
111
+ }
112
+ var _ = /* @__PURE__ */ e(m, [["render", g]]);
113
+ //#endregion
114
+ export { _ as t };