@web-utils/component 2.70.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/address-input/index.mjs +16 -14
  2. package/awesome-button/index.mjs +30 -29
  3. package/card/index.mjs +42 -40
  4. package/carousel/index.mjs +27 -25
  5. package/chat/index.mjs +70 -59
  6. package/chunk-file-uploader/index.mjs +594 -35
  7. package/chunk-file-uploader/style.css +1 -1
  8. package/chunks/CountUp.f1a19f35.mjs +124 -0
  9. package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +8 -0
  10. package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +32 -0
  11. package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +356 -0
  12. package/chunks/ElementDialog.d8f3105c.mjs +211 -0
  13. package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +95 -0
  14. package/chunks/EmptyView.e2430422.mjs +51 -0
  15. package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +23 -0
  16. package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +37 -0
  17. package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +65 -0
  18. package/chunks/FormItem.2920ac0c.mjs +45 -0
  19. package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +258 -0
  20. package/chunks/FormItemGroup.41daddb6.mjs +64 -0
  21. package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +155 -0
  22. package/chunks/FyCurd.8acd2983.mjs +548 -0
  23. package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +2945 -0
  24. package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +47 -0
  25. package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +151 -0
  26. package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +22 -0
  27. package/chunks/FyForm.0294e494.mjs +439 -0
  28. package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +737 -0
  29. package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +93 -0
  30. package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +56 -0
  31. package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +158 -0
  32. package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +39 -0
  33. package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +102 -0
  34. package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +41 -0
  35. package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +15 -0
  36. package/chunks/IconTemp.42c48e1f.mjs +32 -0
  37. package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +23 -0
  38. package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +172 -0
  39. package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +23 -0
  40. package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +21 -0
  41. package/chunks/Page.81f4b8d9.mjs +32 -0
  42. package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +13 -0
  43. package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +26 -0
  44. package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +88 -0
  45. package/chunks/PageableTable.333cbdc1.mjs +335 -0
  46. package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +148 -0
  47. package/chunks/ResizeObserver.60f728f0.mjs +54 -0
  48. package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +13 -0
  49. package/chunks/TableColumn.8503272e.mjs +106 -0
  50. package/chunks/Toolbar.5c539dbb.mjs +24 -0
  51. package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +275 -0
  52. package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +31 -0
  53. package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +74 -0
  54. package/chunks/confirmable-mixin.26e1d0e0.mjs +197 -0
  55. package/chunks/{dataformat.f995e2f9.mjs → dataformat.816df805.mjs} +5 -5
  56. package/chunks/{dic.eaac0823.mjs → dic.3b4ba802.mjs} +40 -40
  57. package/chunks/{event.b5d855dd.mjs → event.4377230d.mjs} +2 -2
  58. package/chunks/{index.57f871af.mjs → index.d91bd77a.mjs} +7 -7
  59. package/chunks/{init.47f219b4.mjs → init.f0a03127.mjs} +2 -2
  60. package/chunks/{util.ae730cde.mjs → util.7844e2c2.mjs} +21 -21
  61. package/color-picker/index.mjs +200 -32
  62. package/confirm-button/index.mjs +1 -1
  63. package/confirmable/index.mjs +1 -1
  64. package/count-up/index.mjs +14 -17
  65. package/data-box/index.mjs +36 -33
  66. package/data-card/index.mjs +35 -33
  67. package/data-cardtext/index.mjs +29 -27
  68. package/data-display/index.mjs +37 -34
  69. package/data-icons/index.mjs +32 -29
  70. package/data-imgtext/index.mjs +30 -27
  71. package/data-operatext/index.mjs +41 -39
  72. package/data-panel/index.mjs +39 -36
  73. package/data-pay/index.mjs +26 -22
  74. package/data-price/index.mjs +34 -32
  75. package/data-progress/index.mjs +32 -28
  76. package/data-rotate/index.mjs +38 -35
  77. package/data-table-picker/index.mjs +25 -22
  78. package/data-tabs/index.mjs +35 -32
  79. package/dialog-form/index.mjs +41 -32
  80. package/dynamic-table/index.mjs +47 -42
  81. package/easy-popup/index.mjs +29 -56
  82. package/editable-progress/index.mjs +16 -14
  83. package/editable-tree/index.mjs +129 -476
  84. package/egd-collapse-item/index.mjs +1 -2
  85. package/element-dialog/index.mjs +37 -126
  86. package/empty-view/index.mjs +13 -31
  87. package/flex-column/index.mjs +1 -1
  88. package/flex-item/index.mjs +1 -1
  89. package/flex-row/index.mjs +1 -1
  90. package/flow/index.mjs +105 -40
  91. package/flow-designer/index.mjs +1190 -1114
  92. package/flow-node/index.mjs +15 -47
  93. package/flow-viewer/index.mjs +167 -78
  94. package/form-block/index.mjs +24 -22
  95. package/form-cascader/index.mjs +29 -29
  96. package/form-checkbox-group/index.mjs +76 -31
  97. package/form-date-picker/index.mjs +21 -20
  98. package/form-holder/index.mjs +16 -15
  99. package/form-input/index.mjs +30 -88
  100. package/form-input-email/index.mjs +28 -28
  101. package/form-input-id-card/index.mjs +37 -37
  102. package/form-input-number/index.mjs +219 -59
  103. package/form-input-phone-number/index.mjs +25 -25
  104. package/form-input-tag/index.mjs +160 -38
  105. package/form-input-time/index.mjs +23 -23
  106. package/form-item/index.mjs +15 -144
  107. package/form-item-group/index.mjs +15 -163
  108. package/form-radio-group/index.mjs +39 -38
  109. package/form-select/index.mjs +33 -32
  110. package/form-switch/index.mjs +26 -26
  111. package/form-textarea/index.mjs +26 -26
  112. package/form-view/index.mjs +46 -42
  113. package/fy-array/index.mjs +65 -61
  114. package/fy-cascader/index.mjs +14 -13
  115. package/fy-checkbox/index.mjs +37 -32
  116. package/fy-code/index.mjs +11 -14
  117. package/fy-curd/index.mjs +206 -2795
  118. package/fy-date/index.mjs +16 -57
  119. package/fy-draggable/index.mjs +21 -20
  120. package/fy-dynamic/index.mjs +64 -207
  121. package/fy-empty/index.mjs +12 -29
  122. package/fy-form/index.mjs +178 -732
  123. package/fy-form-design/index.mjs +1738 -1179
  124. package/fy-input/index.mjs +15 -101
  125. package/fy-input-color/index.mjs +17 -66
  126. package/fy-input-icon/index.mjs +21 -116
  127. package/fy-input-map/index.mjs +27 -24
  128. package/fy-input-number/index.mjs +23 -22
  129. package/fy-input-table/index.mjs +22 -18
  130. package/fy-input-tree/index.mjs +32 -28
  131. package/fy-progress/index.mjs +24 -23
  132. package/fy-radio/index.mjs +23 -18
  133. package/fy-rate/index.mjs +16 -49
  134. package/fy-select/index.mjs +29 -122
  135. package/fy-slider/index.mjs +18 -17
  136. package/fy-switch/index.mjs +21 -20
  137. package/fy-tabs/index.mjs +14 -48
  138. package/fy-time/index.mjs +20 -14
  139. package/fy-title/index.mjs +1 -1
  140. package/fy-tree/index.mjs +26 -20
  141. package/fy-u-editor/index.mjs +1 -1
  142. package/fy-upload/index.mjs +76 -74
  143. package/guide-steps/index.mjs +24 -22
  144. package/highlight-j-s/index.mjs +19 -29
  145. package/icon-temp/index.mjs +12 -30
  146. package/iframe-window/index.mjs +19 -18
  147. package/image-cropper/index.mjs +53 -51
  148. package/image-preview/index.mjs +27 -25
  149. package/input-number/index.mjs +63 -172
  150. package/input-number-range/index.mjs +24 -23
  151. package/license/index.mjs +1 -1
  152. package/loading-view/index.mjs +15 -33
  153. package/login/index.mjs +40 -35
  154. package/nav-bar/index.mjs +15 -30
  155. package/notice/index.mjs +19 -18
  156. package/package.json +1 -1
  157. package/page/index.mjs +12 -20
  158. package/page-header/index.mjs +13 -34
  159. package/page-index/index.mjs +34 -33
  160. package/page-index-top/index.mjs +100 -51
  161. package/page-skeleton/index.mjs +18 -35
  162. package/page-skeleton-new/index.mjs +16 -15
  163. package/pageable-table/index.mjs +85 -223
  164. package/pageable-view/index.mjs +34 -33
  165. package/present-view/index.mjs +75 -71
  166. package/record-video/index.mjs +1 -1
  167. package/resize-observer/index.mjs +21 -29
  168. package/search/index.mjs +29 -27
  169. package/search-popover/index.mjs +1 -1
  170. package/sign/index.mjs +1 -1
  171. package/split-pane/index.mjs +40 -45
  172. package/static-pageable-table/index.mjs +20 -18
  173. package/swiper/index.mjs +27 -25
  174. package/table-view/index.mjs +627 -89
  175. package/tag-render/index.mjs +21 -19
  176. package/text-ellipsis/index.mjs +13 -12
  177. package/tinymce-editor/index.mjs +73 -72
  178. package/toolbar/index.mjs +15 -208
  179. package/toolbar-button/index.mjs +32 -57
  180. package/verify/index.mjs +1 -1
  181. package/vue-cron/index.mjs +112 -104
  182. package/watermark/index.mjs +1 -1
  183. package/web-types.json +1 -1
  184. package/x-input-tag/index.mjs +51 -117
  185. package/chunks/FormTemp.7f91629d.mjs +0 -165
  186. package/chunks/confirmable-mixin.817b542f.mjs +0 -116
  187. package/chunks/form-input-mixin.4632ad36.mjs +0 -24
  188. package/chunks/form-item-mixin.ad148e7b.mjs +0 -140
  189. package/chunks/input-number-mixin.41a066be.mjs +0 -60
@@ -1,25 +1,584 @@
1
- import a from "simple-uploader.js";
2
- import { n } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
3
- function r(e) {
1
+ var m = (e, t, s) => new Promise((r, i) => {
2
+ var n = (a) => {
3
+ try {
4
+ u(s.next(a));
5
+ } catch (c) {
6
+ i(c);
7
+ }
8
+ }, o = (a) => {
9
+ try {
10
+ u(s.throw(a));
11
+ } catch (c) {
12
+ i(c);
13
+ }
14
+ }, u = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(n, o);
15
+ u((s = s.apply(e, t)).next());
16
+ });
17
+ import w from "simple-uploader.js";
18
+ import { n as l } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
19
+ function E(e) {
20
+ const t = Math.floor(e / 31536e3);
21
+ if (t)
22
+ return `${t} 年${o(t)}`;
23
+ const s = Math.floor((e %= 31536e3) / 86400);
24
+ if (s)
25
+ return `${s} 天${o(s)}`;
26
+ const r = Math.floor((e %= 86400) / 3600);
27
+ if (r)
28
+ return `${r} 时${o(r)}`;
29
+ const i = Math.floor((e %= 3600) / 60);
30
+ if (i)
31
+ return `${i} 分${o(i)}`;
32
+ const n = e % 60;
33
+ return `${n} 秒${o(n)}`;
34
+ function o(u) {
35
+ return u > 1, "";
36
+ }
37
+ }
38
+ function h(e) {
4
39
  return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
5
40
  }
6
- var u = function() {
7
- var e = this, t = e.$createElement, i = e._self._c || t;
8
- return i("div", {
41
+ const f = {
42
+ inject: ["uploader"]
43
+ }, _ = {
44
+ data() {
45
+ return {
46
+ support: !0
47
+ };
48
+ },
49
+ mounted() {
50
+ this.support = this.uploader.uploader.support;
51
+ }
52
+ }, v = ["fileProgress", "fileSuccess", "fileComplete", "fileError"];
53
+ var T = function() {
54
+ var e = this, t = e.$createElement, s = e._self._c || t;
55
+ return s("div", {
56
+ staticClass: "chunk-file-uploader-file",
57
+ attrs: {
58
+ status: e.status
59
+ }
60
+ }, [e._t("default", function() {
61
+ return [s("div", {
62
+ staticClass: "chunk-file-uploader-file-info"
63
+ }, [s("div", {
64
+ staticClass: "chunk-file-uploader-file-name",
65
+ attrs: {
66
+ title: e.file.name
67
+ }
68
+ }, [s("i", {
69
+ staticClass: "chunk-file-uploader-file-icon",
70
+ attrs: {
71
+ icon: e.fileCategory
72
+ }
73
+ }), e._v(e._s(e.file.name) + " ")]), s("div", {
74
+ staticClass: "chunk-file-uploader-file-size"
75
+ }, [e._v(" " + e._s(e.formatedSize) + " ")]), s("div", {
76
+ staticClass: "chunk-file-uploader-file-status"
77
+ }, [s("span", {
78
+ directives: [{
79
+ name: "show",
80
+ rawName: "v-show",
81
+ value: !["uploading", "md5"].includes(e.status),
82
+ expression: "!['uploading', 'md5'].includes(status)"
83
+ }]
84
+ }, [e._v(e._s(e.statusText))]), s("span", {
85
+ directives: [{
86
+ name: "show",
87
+ rawName: "v-show",
88
+ value: e.status === "md5",
89
+ expression: "status === 'md5'"
90
+ }]
91
+ }, [e._v(e._s(e.file.md5Progress))]), s("span", {
92
+ directives: [{
93
+ name: "show",
94
+ rawName: "v-show",
95
+ value: e.status === "uploading",
96
+ expression: "status === 'uploading'"
97
+ }],
98
+ staticStyle: {
99
+ "padding-left": "4px"
100
+ }
101
+ }, [s("span", [e._v(e._s(e.progressStyle.progress))]), e._v(" | "), s("em", [e._v(e._s(e.formatedAverageSpeed))]), e._v(" | "), s("i", [e._v(e._s(e.formatedTimeRemaining))])])]), s("div", {
102
+ staticClass: "chunk-file-uploader-file-actions"
103
+ }, [s("span", {
104
+ staticClass: "chunk-file-uploader-file-pause",
105
+ on: {
106
+ click: e.pause
107
+ }
108
+ }), s("span", {
109
+ staticClass: "chunk-file-uploader-file-resume",
110
+ on: {
111
+ click: e.resume
112
+ }
113
+ }, [e._v("️")]), s("span", {
114
+ staticClass: "chunk-file-uploader-file-retry",
115
+ on: {
116
+ click: e.retry
117
+ }
118
+ }), s("span", {
119
+ staticClass: "chunk-file-uploader-file-remove",
120
+ on: {
121
+ click: e.remove
122
+ }
123
+ })])])];
124
+ }, {
125
+ file: e.file,
126
+ list: e.list,
127
+ status: e.status,
128
+ paused: e.paused,
129
+ error: e.error,
130
+ response: e.response,
131
+ averageSpeed: e.averageSpeed,
132
+ formatedAverageSpeed: e.formatedAverageSpeed,
133
+ currentSpeed: e.currentSpeed,
134
+ isComplete: e.isComplete,
135
+ isUploading: e.isUploading,
136
+ size: e.size,
137
+ formatedSize: e.formatedSize,
138
+ uploadedSize: e.uploadedSize,
139
+ progress: e.progress,
140
+ progressStyle: e.progressStyle,
141
+ progressingClass: e.progressingClass,
142
+ timeRemaining: e.timeRemaining,
143
+ formatedTimeRemaining: e.formatedTimeRemaining,
144
+ type: e.type,
145
+ extension: e.extension,
146
+ fileCategory: e.fileCategory
147
+ })], 2);
148
+ }, F = [];
149
+ const R = {
150
+ name: "ChunkFileUploaderFile",
151
+ props: {
152
+ file: {
153
+ type: Object,
154
+ default() {
155
+ return {};
156
+ }
157
+ },
158
+ list: {
159
+ type: Boolean,
160
+ default: !1
161
+ }
162
+ },
163
+ data() {
164
+ return {
165
+ response: null,
166
+ paused: !1,
167
+ error: !1,
168
+ averageSpeed: 0,
169
+ currentSpeed: 0,
170
+ isComplete: !1,
171
+ isUploading: !1,
172
+ size: 0,
173
+ formatedSize: "",
174
+ uploadedSize: 0,
175
+ progress: 0,
176
+ timeRemaining: 0,
177
+ type: "",
178
+ extension: "",
179
+ progressingClass: ""
180
+ };
181
+ },
182
+ computed: {
183
+ fileCategory() {
184
+ const e = this.extension;
185
+ let s = this.file.isFolder ? "folder" : "unknown";
186
+ const i = this.file.uploader.opts.categoryMap || {
187
+ image: ["gif", "jpg", "jpeg", "png", "bmp", "webp"],
188
+ video: ["mp4", "m3u8", "rmvb", "avi", "swf", "3gp", "mkv", "flv"],
189
+ audio: ["mp3", "wav", "wma", "ogg", "aac", "flac"],
190
+ document: [
191
+ "doc",
192
+ "txt",
193
+ "docx",
194
+ "pages",
195
+ "epub",
196
+ "pdf",
197
+ "numbers",
198
+ "csv",
199
+ "xls",
200
+ "xlsx",
201
+ "keynote",
202
+ "ppt",
203
+ "pptx"
204
+ ]
205
+ };
206
+ return Object.keys(i).forEach((n) => {
207
+ i[n].indexOf(e) > -1 && (s = n);
208
+ }), s;
209
+ },
210
+ progressStyle() {
211
+ const e = Math.floor(this.progress * 100), t = `translateX(${Math.floor(e - 100)}%)`;
212
+ return {
213
+ progress: `${e}%`,
214
+ webkitTransform: t,
215
+ mozTransform: t,
216
+ msTransform: t,
217
+ transform: t
218
+ };
219
+ },
220
+ formatedAverageSpeed() {
221
+ return `${w.utils.formatSize(this.averageSpeed)} / s`;
222
+ },
223
+ status() {
224
+ const { isUploading: e, isComplete: t, isError: s, paused: r } = this, { md5Computing: i } = this.file;
225
+ return i ? "md5" : t ? "success" : s ? "error" : e ? "uploading" : r ? "paused" : "waiting";
226
+ },
227
+ statusText() {
228
+ const e = this.status, t = this.file.uploader.fileStatusText;
229
+ let s = e;
230
+ return typeof t == "function" ? s = t(e, this.response) : s = t[e], s || "";
231
+ },
232
+ formatedTimeRemaining() {
233
+ const e = this.timeRemaining, t = this.file;
234
+ if (e === Number.POSITIVE_INFINITY || e === 0)
235
+ return "";
236
+ let s = E(e);
237
+ const r = t.uploader.opts.parseTimeRemaining;
238
+ return r && (s = r(e, s)), s;
239
+ }
240
+ },
241
+ watch: {
242
+ status(e, t) {
243
+ t && e === "uploading" && t !== "uploading" ? this.tid = setTimeout(() => {
244
+ this.progressingClass = "uploader-file-progressing";
245
+ }, 200) : (clearTimeout(this.tid), this.progressingClass = "");
246
+ }
247
+ },
248
+ mounted() {
249
+ const e = ["paused", "error", "averageSpeed", "currentSpeed"], t = [
250
+ "isComplete",
251
+ "isUploading",
252
+ {
253
+ key: "size",
254
+ fn: "getSize"
255
+ },
256
+ {
257
+ key: "formatedSize",
258
+ fn: "getFormatSize"
259
+ },
260
+ {
261
+ key: "uploadedSize",
262
+ fn: "sizeUploaded"
263
+ },
264
+ "progress",
265
+ "timeRemaining",
266
+ {
267
+ key: "type",
268
+ fn: "getType"
269
+ },
270
+ {
271
+ key: "extension",
272
+ fn: "getExtension"
273
+ }
274
+ ];
275
+ e.forEach((i) => {
276
+ this[i] = this.file[i];
277
+ }), t.forEach((i) => {
278
+ typeof i == "string" ? this[i] = this.file[i]() : this[i.key] = this.file[i.fn]();
279
+ });
280
+ const s = this._handlers = {}, r = (i) => (s[i] = (...n) => {
281
+ this.fileEventsHandler(i, n);
282
+ }, s[i]);
283
+ v.forEach((i) => {
284
+ this.file.uploader.on(i, r(i));
285
+ });
286
+ },
287
+ destroyed() {
288
+ v.forEach((e) => {
289
+ this.file.uploader.off(e, this._handlers[e]);
290
+ }), this._handlers = null;
291
+ },
292
+ methods: {
293
+ _actionCheck() {
294
+ this.paused = this.file.paused, this.error = this.file.error, this.isUploading = this.file.isUploading();
295
+ },
296
+ pause() {
297
+ this.file.pause(), this._actionCheck(), this._fileProgress();
298
+ },
299
+ resume() {
300
+ this.file.resume(), this._actionCheck();
301
+ },
302
+ remove() {
303
+ this.$set(this.file, "canceled", !0), this.file.cancel();
304
+ },
305
+ retry() {
306
+ this.file.retry(), this._actionCheck();
307
+ },
308
+ processResponse(e) {
309
+ let t = e;
310
+ try {
311
+ t = JSON.parse(e);
312
+ } catch (s) {
313
+ }
314
+ this.response = t;
315
+ },
316
+ fileEventsHandler(e, t) {
317
+ const s = t[0], r = t[1], i = this.list ? s : r;
318
+ if (this.file === i) {
319
+ if (this.list && e === "fileSuccess") {
320
+ this.processResponse(t[2]);
321
+ return;
322
+ }
323
+ this[`_${e}`].apply(this, t);
324
+ }
325
+ },
326
+ _fileProgress() {
327
+ 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();
328
+ },
329
+ _fileSuccess(e, t, s) {
330
+ e && this.processResponse(s), this._fileProgress(), this.error = !1, this.isComplete = !0, this.isUploading = !1;
331
+ },
332
+ _fileComplete() {
333
+ this._fileSuccess();
334
+ },
335
+ _fileError(e, t, s) {
336
+ this._fileProgress(), this.processResponse(s), this.error = !0, this.isComplete = !1, this.isUploading = !1;
337
+ }
338
+ }
339
+ }, g = {};
340
+ var U = /* @__PURE__ */ l(
341
+ R,
342
+ T,
343
+ F,
344
+ !1,
345
+ b,
346
+ null,
347
+ null,
348
+ null
349
+ );
350
+ function b(e) {
351
+ for (let t in g)
352
+ this[t] = g[t];
353
+ }
354
+ const A = /* @__PURE__ */ function() {
355
+ return U.exports;
356
+ }();
357
+ var z = function() {
358
+ var e = this, t = e.$createElement, s = e._self._c || t;
359
+ return s("div", {
360
+ staticClass: "uploader-list"
361
+ }, [e._t("default", function() {
362
+ return [s("ul", e._l(e.fileList, function(r) {
363
+ return s("li", {
364
+ key: r.id
365
+ }, [s(A, {
366
+ attrs: {
367
+ file: r,
368
+ list: !0
369
+ }
370
+ })], 1);
371
+ }), 0)];
372
+ }, {
373
+ fileList: e.fileList
374
+ })], 2);
375
+ }, D = [];
376
+ const L = {
377
+ name: "ChunkFileUploaderList",
378
+ mixins: [f],
379
+ computed: {
380
+ fileList() {
381
+ return this.uploader.fileList;
382
+ }
383
+ }
384
+ }, y = {};
385
+ var M = /* @__PURE__ */ l(
386
+ L,
387
+ z,
388
+ D,
389
+ !1,
390
+ j,
391
+ null,
392
+ null,
393
+ null
394
+ );
395
+ function j(e) {
396
+ for (let t in y)
397
+ this[t] = y[t];
398
+ }
399
+ const N = /* @__PURE__ */ function() {
400
+ return M.exports;
401
+ }();
402
+ var P = function() {
403
+ var e = this, t = e.$createElement, s = e._self._c || t;
404
+ return s("label", {
405
+ directives: [{
406
+ name: "show",
407
+ rawName: "v-show",
408
+ value: e.support,
409
+ expression: "support"
410
+ }],
411
+ ref: "btn",
412
+ staticClass: "uploader-btn"
413
+ }, [e._t("default")], 2);
414
+ }, I = [];
415
+ const O = {
416
+ name: "ChunkFileUploaderButton",
417
+ mixins: [f, _],
418
+ props: {
419
+ directory: {
420
+ type: Boolean,
421
+ default: !1
422
+ },
423
+ single: {
424
+ type: Boolean,
425
+ default: !1
426
+ },
427
+ attrs: {
428
+ type: Object,
429
+ default() {
430
+ return {};
431
+ }
432
+ }
433
+ },
434
+ mounted() {
435
+ this.$nextTick(() => {
436
+ this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, this.attrs);
437
+ });
438
+ }
439
+ }, S = {};
440
+ var B = /* @__PURE__ */ l(
441
+ O,
442
+ P,
443
+ I,
444
+ !1,
445
+ V,
446
+ null,
447
+ null,
448
+ null
449
+ );
450
+ function V(e) {
451
+ for (let t in S)
452
+ this[t] = S[t];
453
+ }
454
+ const $ = /* @__PURE__ */ function() {
455
+ return B.exports;
456
+ }();
457
+ var H = function() {
458
+ var e = this, t = e.$createElement, s = e._self._c || t;
459
+ return s("div", {
460
+ directives: [{
461
+ name: "show",
462
+ rawName: "v-show",
463
+ value: e.support,
464
+ expression: "support"
465
+ }],
466
+ ref: "drop",
467
+ staticClass: "uploader-drop",
468
+ class: e.dropClass
469
+ }, [e._t("default")], 2);
470
+ }, Y = [];
471
+ const q = {
472
+ name: "ChunkFileUploaderDrop",
473
+ mixins: [f, _],
474
+ data() {
475
+ return {
476
+ dropClass: ""
477
+ };
478
+ },
479
+ mounted() {
480
+ return m(this, null, function* () {
481
+ yield this.$nextTick();
482
+ const e = this.$refs.drop, t = this.uploader.uploader;
483
+ t.assignDrop(e), t.on("dragenter", this.onDragEnter), t.on("dragleave", this.onDragLeave), t.on("drop", this.onDrop);
484
+ });
485
+ },
486
+ beforeDestroy() {
487
+ const e = this.$refs.drop, t = this.uploader.uploader;
488
+ t.off("dragenter", this.onDragEnter), t.off("dragleave", this.onDragLeave), t.off("drop", this.onDrop), t.unAssignDrop(e);
489
+ },
490
+ methods: {
491
+ onDragEnter() {
492
+ this.dropClass = "uploader-dragover";
493
+ },
494
+ onDragLeave() {
495
+ this.dropClass = "";
496
+ },
497
+ onDrop() {
498
+ this.dropClass = "uploader-droped";
499
+ }
500
+ }
501
+ }, C = {};
502
+ var J = /* @__PURE__ */ l(
503
+ q,
504
+ H,
505
+ Y,
506
+ !1,
507
+ X,
508
+ null,
509
+ null,
510
+ null
511
+ );
512
+ function X(e) {
513
+ for (let t in C)
514
+ this[t] = C[t];
515
+ }
516
+ const Z = /* @__PURE__ */ function() {
517
+ return J.exports;
518
+ }();
519
+ var G = function() {
520
+ var e = this, t = e.$createElement, s = e._self._c || t;
521
+ return s("div", {
522
+ directives: [{
523
+ name: "show",
524
+ rawName: "v-show",
525
+ value: !e.support,
526
+ expression: "!support"
527
+ }],
528
+ staticClass: "uploader-unsupport"
529
+ }, [e._t("default", function() {
530
+ return [e._m(0)];
531
+ })], 2);
532
+ }, K = [function() {
533
+ var e = this, t = e.$createElement, s = e._self._c || t;
534
+ return s("p", [e._v(" Your browser, unfortunately, is not supported by Uploader.js. The library requires support for "), s("a", {
535
+ attrs: {
536
+ href: "http://www.w3.org/TR/FileAPI/"
537
+ }
538
+ }, [e._v("the HTML5 File API")]), e._v(" along with "), s("a", {
539
+ attrs: {
540
+ href: "http://www.w3.org/TR/FileAPI/#normalization-of-params"
541
+ }
542
+ }, [e._v("file slicing")]), e._v(". ")]);
543
+ }];
544
+ const Q = {
545
+ name: "ChunkFileUploaderUnSupport",
546
+ mixins: [f, _]
547
+ }, x = {};
548
+ var W = /* @__PURE__ */ l(
549
+ Q,
550
+ G,
551
+ K,
552
+ !1,
553
+ ee,
554
+ null,
555
+ null,
556
+ null
557
+ );
558
+ function ee(e) {
559
+ for (let t in x)
560
+ this[t] = x[t];
561
+ }
562
+ const te = /* @__PURE__ */ function() {
563
+ return W.exports;
564
+ }();
565
+ var se = function() {
566
+ var e = this, t = e.$createElement, s = e._self._c || t;
567
+ return s("div", {
9
568
  staticClass: "uploader"
10
569
  }, [e._t("default", function() {
11
- return [i("ChunkFileUploaderUnSupport"), i("ChunkFileUploaderDrop", [i("p", [e._v("Drop files here to upload or")]), i("ChunkFileUploaderButton", [e._v("select files")]), i("ChunkFileUploaderButton", {
570
+ return [s(te), s(Z, [s("p", [e._v("Drop files here to upload or")]), s($, [e._v("select files")]), s($, {
12
571
  attrs: {
13
572
  directory: !0
14
573
  }
15
- }, [e._v(" select folder ")])], 1), i("ChunkFileUploaderList")];
574
+ }, [e._v(" select folder ")])], 1), s(N)];
16
575
  }, {
17
576
  files: e.files,
18
577
  fileList: e.fileList,
19
578
  started: e.started
20
579
  })], 2);
21
- }, f = [];
22
- const s = "fileAdded", l = "filesAdded", p = "uploadStart", h = {
580
+ }, ie = [];
581
+ const p = "fileAdded", d = "filesAdded", re = "uploadStart", ne = {
23
582
  name: "ChunkFileUploader",
24
583
  provide() {
25
584
  return {
@@ -59,23 +618,23 @@ const s = "fileAdded", l = "filesAdded", p = "uploadStart", h = {
59
618
  },
60
619
  created() {
61
620
  this.options.initialPaused = !this.autoStart;
62
- const e = new a(this.options);
63
- this.uploader = e, this.uploader.fileStatusText = this.fileStatusText, e.on("catchAll", this.allEvent), e.on(s, this.fileAdded), e.on(l, this.filesAdded), e.on("fileRemoved", this.fileRemoved), e.on("filesSubmitted", this.filesSubmitted);
621
+ const e = new w(this.options);
622
+ this.uploader = e, this.uploader.fileStatusText = this.fileStatusText, e.on("catchAll", this.allEvent), e.on(p, this.fileAdded), e.on(d, this.filesAdded), e.on("fileRemoved", this.fileRemoved), e.on("filesSubmitted", this.filesSubmitted);
64
623
  },
65
624
  destroyed() {
66
625
  const e = this.uploader;
67
- e.off("catchAll", this.allEvent), e.off(s, this.fileAdded), e.off(l, this.filesAdded), e.off("fileRemoved", this.fileRemoved), e.off("filesSubmitted", this.filesSubmitted), this.uploader = null;
626
+ e.off("catchAll", this.allEvent), e.off(p, this.fileAdded), e.off(d, this.filesAdded), e.off("fileRemoved", this.fileRemoved), e.off("filesSubmitted", this.filesSubmitted), this.uploader = null;
68
627
  },
69
628
  methods: {
70
629
  uploadStart() {
71
630
  this.started = !0;
72
631
  },
73
632
  fileAdded(e) {
74
- if (this.$emit(r(s), e), e.ignored)
633
+ if (this.$emit(h(p), e), e.ignored)
75
634
  return !1;
76
635
  },
77
636
  filesAdded(e, t) {
78
- if (this.$emit(r(l), e, t), e.ignored || t.ignored)
637
+ if (this.$emit(h(d), e, t), e.ignored || t.ignored)
79
638
  return !1;
80
639
  },
81
640
  fileRemoved(e) {
@@ -85,37 +644,37 @@ const s = "fileAdded", l = "filesAdded", p = "uploadStart", h = {
85
644
  this.files = this.uploader.files, this.fileList = this.uploader.fileList, this.autoStart && this.uploader.upload();
86
645
  },
87
646
  allEvent(...e) {
88
- const t = e[0], o = {
89
- [s]: !0,
90
- [l]: !0,
91
- [p]: "uploadStart"
647
+ const t = e[0], r = {
648
+ [p]: !0,
649
+ [d]: !0,
650
+ [re]: "uploadStart"
92
651
  }[t];
93
- if (o) {
94
- if (o === !0)
652
+ if (r) {
653
+ if (r === !0)
95
654
  return;
96
- this[o].apply(this, e.slice(1));
655
+ this[r].apply(this, e.slice(1));
97
656
  }
98
- e[0] = r(t), this.$emit.apply(this, e);
657
+ e[0] = h(t), this.$emit.apply(this, e);
99
658
  }
100
659
  }
101
- }, d = {};
102
- var c = /* @__PURE__ */ n(
103
- h,
104
- u,
105
- f,
660
+ }, k = {};
661
+ var oe = /* @__PURE__ */ l(
662
+ ne,
663
+ se,
664
+ ie,
106
665
  !1,
107
- _,
666
+ ae,
108
667
  null,
109
668
  null,
110
669
  null
111
670
  );
112
- function _(e) {
113
- for (let t in d)
114
- this[t] = d[t];
671
+ function ae(e) {
672
+ for (let t in k)
673
+ this[t] = k[t];
115
674
  }
116
- const S = /* @__PURE__ */ function() {
117
- return c.exports;
675
+ const de = /* @__PURE__ */ function() {
676
+ return oe.exports;
118
677
  }();
119
678
  export {
120
- S as default
679
+ de as default
121
680
  };
@@ -1 +1 @@
1
- .uploader{position:relative}
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:rgba(240,240,240,.2)}.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:rgba(0,0,0,.08)}.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}