@web-utils/component 3.0.2 → 3.0.3

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 (166) hide show
  1. package/address-input/index.mjs +14 -14
  2. package/chat/index.mjs +39 -40
  3. package/chunk-file-uploader/index.mjs +35 -594
  4. package/chunk-file-uploader/style.css +1 -1
  5. package/chunks/FormTemp.d079292b.mjs +139 -0
  6. package/chunks/{dataformat.816df805.mjs → dataformat.e655611c.mjs} +6 -6
  7. package/chunks/detail.d6f8e347.mjs +29 -0
  8. package/chunks/{dic.3b4ba802.mjs → dic.eaac0823.mjs} +40 -40
  9. package/chunks/{event.4377230d.mjs → event.10295951.mjs} +2 -2
  10. package/chunks/form-input-mixin.78a567bc.mjs +24 -0
  11. package/chunks/form-item-mixin.57cb2019.mjs +140 -0
  12. package/chunks/{index.d91bd77a.mjs → index.57f871af.mjs} +7 -7
  13. package/chunks/{init.f0a03127.mjs → init.47f219b4.mjs} +2 -2
  14. package/chunks/input-number-mixin.41a066be.mjs +60 -0
  15. package/chunks/{util.7844e2c2.mjs → util.ae730cde.mjs} +21 -21
  16. package/count-up/index.mjs +17 -14
  17. package/data-box/index.mjs +18 -19
  18. package/data-display/index.mjs +17 -18
  19. package/data-icons/index.mjs +16 -17
  20. package/data-panel/index.mjs +20 -21
  21. package/data-pay/index.mjs +15 -16
  22. package/data-progress/index.mjs +19 -20
  23. package/data-rotate/index.mjs +35 -36
  24. package/data-table-picker/index.mjs +23 -25
  25. package/data-tabs/index.mjs +15 -16
  26. package/dialog-form/index.mjs +11 -12
  27. package/dynamic-table/index.mjs +34 -35
  28. package/easy-popup/index.mjs +56 -29
  29. package/editable-tree/index.mjs +485 -134
  30. package/element-dialog/index.mjs +127 -37
  31. package/empty-view/index.mjs +31 -13
  32. package/flex-column/index.mjs +1 -1
  33. package/flex-item/index.mjs +1 -1
  34. package/flex-row/index.mjs +1 -1
  35. package/flow/index.mjs +40 -105
  36. package/flow-designer/index.mjs +555 -615
  37. package/flow-node/index.mjs +47 -15
  38. package/flow-viewer/index.mjs +78 -167
  39. package/form-cascader/index.mjs +24 -24
  40. package/form-checkbox-group/index.mjs +35 -79
  41. package/form-date-picker/index.mjs +22 -22
  42. package/form-holder/index.mjs +1 -1
  43. package/form-input/index.mjs +86 -28
  44. package/form-input-email/index.mjs +18 -18
  45. package/form-input-id-card/index.mjs +27 -27
  46. package/form-input-number/index.mjs +59 -219
  47. package/form-input-phone-number/index.mjs +27 -27
  48. package/form-input-tag/index.mjs +38 -160
  49. package/form-input-time/index.mjs +16 -16
  50. package/form-item/index.mjs +146 -15
  51. package/form-item-group/index.mjs +164 -14
  52. package/form-radio-group/index.mjs +41 -41
  53. package/form-select/index.mjs +20 -20
  54. package/form-switch/index.mjs +19 -19
  55. package/form-textarea/index.mjs +29 -29
  56. package/form-view/index.mjs +42 -46
  57. package/fy-array/index.mjs +2 -2
  58. package/fy-cascader/index.mjs +15 -15
  59. package/fy-checkbox/index.mjs +1 -1
  60. package/fy-code/index.mjs +1 -1
  61. package/fy-curd/index.mjs +2824 -210
  62. package/fy-date/index.mjs +59 -17
  63. package/fy-draggable/index.mjs +1 -1
  64. package/fy-dynamic/index.mjs +208 -64
  65. package/fy-empty/index.mjs +29 -12
  66. package/fy-form/index.mjs +743 -178
  67. package/fy-form-design/index.mjs +1013 -1540
  68. package/fy-input/index.mjs +105 -17
  69. package/fy-input-color/index.mjs +67 -16
  70. package/fy-input-icon/index.mjs +119 -23
  71. package/fy-input-map/index.mjs +14 -15
  72. package/fy-input-number/index.mjs +1 -1
  73. package/fy-input-table/index.mjs +19 -21
  74. package/fy-input-tree/index.mjs +3 -3
  75. package/fy-radio/index.mjs +1 -1
  76. package/fy-rate/index.mjs +50 -16
  77. package/fy-select/index.mjs +126 -29
  78. package/fy-slider/index.mjs +2 -2
  79. package/fy-switch/index.mjs +1 -1
  80. package/fy-tabs/index.mjs +51 -15
  81. package/fy-time/index.mjs +1 -1
  82. package/fy-title/index.mjs +1 -1
  83. package/fy-tree/index.mjs +23 -25
  84. package/fy-u-editor/index.mjs +1 -1
  85. package/fy-upload/index.mjs +2 -2
  86. package/highlight-j-s/index.mjs +29 -19
  87. package/icon-temp/index.mjs +30 -12
  88. package/iframe-window/index.mjs +18 -19
  89. package/image-cropper/index.mjs +22 -23
  90. package/image-preview/index.mjs +1 -1
  91. package/input-number/index.mjs +173 -63
  92. package/license/index.mjs +1 -1
  93. package/loading-view/index.mjs +33 -15
  94. package/login/index.mjs +1 -1
  95. package/nav-bar/index.mjs +31 -15
  96. package/package.json +1 -1
  97. package/page/index.mjs +20 -12
  98. package/page-header/index.mjs +34 -13
  99. package/page-index-top/index.mjs +53 -100
  100. package/page-skeleton/index.mjs +35 -18
  101. package/page-skeleton-new/index.mjs +15 -16
  102. package/pageable-table/index.mjs +228 -86
  103. package/pageable-view/index.mjs +1 -1
  104. package/present-view/index.mjs +71 -75
  105. package/record-video/index.mjs +1 -1
  106. package/resize-observer/index.mjs +29 -21
  107. package/search/index.mjs +9 -9
  108. package/search-popover/index.mjs +1 -1
  109. package/sign/index.mjs +1 -1
  110. package/split-pane/index.mjs +45 -40
  111. package/swiper/index.mjs +13 -14
  112. package/table-view/index.mjs +97 -631
  113. package/text-ellipsis/index.mjs +1 -1
  114. package/tinymce-editor/index.mjs +63 -63
  115. package/toolbar/index.mjs +208 -15
  116. package/toolbar-button/index.mjs +56 -30
  117. package/verify/index.mjs +1 -1
  118. package/watermark/index.mjs +1 -1
  119. package/web-types.json +1 -1
  120. package/x-input-tag/index.mjs +118 -49
  121. package/chunks/CountUp.f1a19f35.mjs +0 -124
  122. package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +0 -8
  123. package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +0 -32
  124. package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +0 -356
  125. package/chunks/ElementDialog.d8f3105c.mjs +0 -211
  126. package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +0 -95
  127. package/chunks/EmptyView.e2430422.mjs +0 -51
  128. package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +0 -23
  129. package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +0 -37
  130. package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +0 -65
  131. package/chunks/FormItem.2920ac0c.mjs +0 -45
  132. package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +0 -258
  133. package/chunks/FormItemGroup.41daddb6.mjs +0 -64
  134. package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +0 -155
  135. package/chunks/FyCurd.8acd2983.mjs +0 -548
  136. package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +0 -2945
  137. package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +0 -47
  138. package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +0 -151
  139. package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +0 -22
  140. package/chunks/FyForm.0294e494.mjs +0 -439
  141. package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +0 -737
  142. package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +0 -93
  143. package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +0 -56
  144. package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +0 -158
  145. package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +0 -39
  146. package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +0 -102
  147. package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +0 -41
  148. package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +0 -15
  149. package/chunks/IconTemp.42c48e1f.mjs +0 -32
  150. package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +0 -23
  151. package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +0 -172
  152. package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +0 -23
  153. package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +0 -21
  154. package/chunks/Page.81f4b8d9.mjs +0 -32
  155. package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +0 -13
  156. package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +0 -26
  157. package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +0 -88
  158. package/chunks/PageableTable.333cbdc1.mjs +0 -335
  159. package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +0 -148
  160. package/chunks/ResizeObserver.60f728f0.mjs +0 -54
  161. package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +0 -13
  162. package/chunks/TableColumn.8503272e.mjs +0 -106
  163. package/chunks/Toolbar.5c539dbb.mjs +0 -24
  164. package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +0 -275
  165. package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +0 -31
  166. package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +0 -74
@@ -1,584 +1,25 @@
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) {
1
+ import a from "simple-uploader.js";
2
+ import { n } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
3
+ function r(e) {
39
4
  return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
40
5
  }
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", {
6
+ var u = function() {
7
+ var e = this, t = e.$createElement, i = e._self._c || t;
8
+ return i("div", {
568
9
  staticClass: "uploader"
569
10
  }, [e._t("default", function() {
570
- return [s(te), s(Z, [s("p", [e._v("Drop files here to upload or")]), s($, [e._v("select files")]), s($, {
11
+ return [i("ChunkFileUploaderUnSupport"), i("ChunkFileUploaderDrop", [i("p", [e._v("Drop files here to upload or")]), i("ChunkFileUploaderButton", [e._v("select files")]), i("ChunkFileUploaderButton", {
571
12
  attrs: {
572
13
  directory: !0
573
14
  }
574
- }, [e._v(" select folder ")])], 1), s(N)];
15
+ }, [e._v(" select folder ")])], 1), i("ChunkFileUploaderList")];
575
16
  }, {
576
17
  files: e.files,
577
18
  fileList: e.fileList,
578
19
  started: e.started
579
20
  })], 2);
580
- }, ie = [];
581
- const p = "fileAdded", d = "filesAdded", re = "uploadStart", ne = {
21
+ }, f = [];
22
+ const s = "fileAdded", l = "filesAdded", p = "uploadStart", h = {
582
23
  name: "ChunkFileUploader",
583
24
  provide() {
584
25
  return {
@@ -618,23 +59,23 @@ const p = "fileAdded", d = "filesAdded", re = "uploadStart", ne = {
618
59
  },
619
60
  created() {
620
61
  this.options.initialPaused = !this.autoStart;
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);
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);
623
64
  },
624
65
  destroyed() {
625
66
  const e = this.uploader;
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;
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;
627
68
  },
628
69
  methods: {
629
70
  uploadStart() {
630
71
  this.started = !0;
631
72
  },
632
73
  fileAdded(e) {
633
- if (this.$emit(h(p), e), e.ignored)
74
+ if (this.$emit(r(s), e), e.ignored)
634
75
  return !1;
635
76
  },
636
77
  filesAdded(e, t) {
637
- if (this.$emit(h(d), e, t), e.ignored || t.ignored)
78
+ if (this.$emit(r(l), e, t), e.ignored || t.ignored)
638
79
  return !1;
639
80
  },
640
81
  fileRemoved(e) {
@@ -644,37 +85,37 @@ const p = "fileAdded", d = "filesAdded", re = "uploadStart", ne = {
644
85
  this.files = this.uploader.files, this.fileList = this.uploader.fileList, this.autoStart && this.uploader.upload();
645
86
  },
646
87
  allEvent(...e) {
647
- const t = e[0], r = {
648
- [p]: !0,
649
- [d]: !0,
650
- [re]: "uploadStart"
88
+ const t = e[0], o = {
89
+ [s]: !0,
90
+ [l]: !0,
91
+ [p]: "uploadStart"
651
92
  }[t];
652
- if (r) {
653
- if (r === !0)
93
+ if (o) {
94
+ if (o === !0)
654
95
  return;
655
- this[r].apply(this, e.slice(1));
96
+ this[o].apply(this, e.slice(1));
656
97
  }
657
- e[0] = h(t), this.$emit.apply(this, e);
98
+ e[0] = r(t), this.$emit.apply(this, e);
658
99
  }
659
100
  }
660
- }, k = {};
661
- var oe = /* @__PURE__ */ l(
662
- ne,
663
- se,
664
- ie,
101
+ }, d = {};
102
+ var c = /* @__PURE__ */ n(
103
+ h,
104
+ u,
105
+ f,
665
106
  !1,
666
- ae,
107
+ _,
667
108
  null,
668
109
  null,
669
110
  null
670
111
  );
671
- function ae(e) {
672
- for (let t in k)
673
- this[t] = k[t];
112
+ function _(e) {
113
+ for (let t in d)
114
+ this[t] = d[t];
674
115
  }
675
- const de = /* @__PURE__ */ function() {
676
- return oe.exports;
116
+ const S = /* @__PURE__ */ function() {
117
+ return c.exports;
677
118
  }();
678
119
  export {
679
- de as default
120
+ S as default
680
121
  };
@@ -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: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}
1
+ .uploader{position:relative}