@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.
- package/address-input/index.mjs +14 -14
- package/chat/index.mjs +39 -40
- package/chunk-file-uploader/index.mjs +35 -594
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/FormTemp.d079292b.mjs +139 -0
- package/chunks/{dataformat.816df805.mjs → dataformat.e655611c.mjs} +6 -6
- package/chunks/detail.d6f8e347.mjs +29 -0
- package/chunks/{dic.3b4ba802.mjs → dic.eaac0823.mjs} +40 -40
- package/chunks/{event.4377230d.mjs → event.10295951.mjs} +2 -2
- package/chunks/form-input-mixin.78a567bc.mjs +24 -0
- package/chunks/form-item-mixin.57cb2019.mjs +140 -0
- package/chunks/{index.d91bd77a.mjs → index.57f871af.mjs} +7 -7
- package/chunks/{init.f0a03127.mjs → init.47f219b4.mjs} +2 -2
- package/chunks/input-number-mixin.41a066be.mjs +60 -0
- package/chunks/{util.7844e2c2.mjs → util.ae730cde.mjs} +21 -21
- package/count-up/index.mjs +17 -14
- package/data-box/index.mjs +18 -19
- package/data-display/index.mjs +17 -18
- package/data-icons/index.mjs +16 -17
- package/data-panel/index.mjs +20 -21
- package/data-pay/index.mjs +15 -16
- package/data-progress/index.mjs +19 -20
- package/data-rotate/index.mjs +35 -36
- package/data-table-picker/index.mjs +23 -25
- package/data-tabs/index.mjs +15 -16
- package/dialog-form/index.mjs +11 -12
- package/dynamic-table/index.mjs +34 -35
- package/easy-popup/index.mjs +56 -29
- package/editable-tree/index.mjs +485 -134
- package/element-dialog/index.mjs +127 -37
- package/empty-view/index.mjs +31 -13
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow/index.mjs +40 -105
- package/flow-designer/index.mjs +555 -615
- package/flow-node/index.mjs +47 -15
- package/flow-viewer/index.mjs +78 -167
- package/form-cascader/index.mjs +24 -24
- package/form-checkbox-group/index.mjs +35 -79
- package/form-date-picker/index.mjs +22 -22
- package/form-holder/index.mjs +1 -1
- package/form-input/index.mjs +86 -28
- package/form-input-email/index.mjs +18 -18
- package/form-input-id-card/index.mjs +27 -27
- package/form-input-number/index.mjs +59 -219
- package/form-input-phone-number/index.mjs +27 -27
- package/form-input-tag/index.mjs +38 -160
- package/form-input-time/index.mjs +16 -16
- package/form-item/index.mjs +146 -15
- package/form-item-group/index.mjs +164 -14
- package/form-radio-group/index.mjs +41 -41
- package/form-select/index.mjs +20 -20
- package/form-switch/index.mjs +19 -19
- package/form-textarea/index.mjs +29 -29
- package/form-view/index.mjs +42 -46
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +15 -15
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +2824 -210
- package/fy-date/index.mjs +59 -17
- package/fy-draggable/index.mjs +1 -1
- package/fy-dynamic/index.mjs +208 -64
- package/fy-empty/index.mjs +29 -12
- package/fy-form/index.mjs +743 -178
- package/fy-form-design/index.mjs +1013 -1540
- package/fy-input/index.mjs +105 -17
- package/fy-input-color/index.mjs +67 -16
- package/fy-input-icon/index.mjs +119 -23
- package/fy-input-map/index.mjs +14 -15
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +19 -21
- package/fy-input-tree/index.mjs +3 -3
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +50 -16
- package/fy-select/index.mjs +126 -29
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +51 -15
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +23 -25
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +2 -2
- package/highlight-j-s/index.mjs +29 -19
- package/icon-temp/index.mjs +30 -12
- package/iframe-window/index.mjs +18 -19
- package/image-cropper/index.mjs +22 -23
- package/image-preview/index.mjs +1 -1
- package/input-number/index.mjs +173 -63
- package/license/index.mjs +1 -1
- package/loading-view/index.mjs +33 -15
- package/login/index.mjs +1 -1
- package/nav-bar/index.mjs +31 -15
- package/package.json +1 -1
- package/page/index.mjs +20 -12
- package/page-header/index.mjs +34 -13
- package/page-index-top/index.mjs +53 -100
- package/page-skeleton/index.mjs +35 -18
- package/page-skeleton-new/index.mjs +15 -16
- package/pageable-table/index.mjs +228 -86
- package/pageable-view/index.mjs +1 -1
- package/present-view/index.mjs +71 -75
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +29 -21
- package/search/index.mjs +9 -9
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/split-pane/index.mjs +45 -40
- package/swiper/index.mjs +13 -14
- package/table-view/index.mjs +97 -631
- package/text-ellipsis/index.mjs +1 -1
- package/tinymce-editor/index.mjs +63 -63
- package/toolbar/index.mjs +208 -15
- package/toolbar-button/index.mjs +56 -30
- package/verify/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +118 -49
- package/chunks/CountUp.f1a19f35.mjs +0 -124
- package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +0 -8
- package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +0 -32
- package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +0 -356
- package/chunks/ElementDialog.d8f3105c.mjs +0 -211
- package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +0 -95
- package/chunks/EmptyView.e2430422.mjs +0 -51
- package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +0 -23
- package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +0 -37
- package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +0 -65
- package/chunks/FormItem.2920ac0c.mjs +0 -45
- package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +0 -258
- package/chunks/FormItemGroup.41daddb6.mjs +0 -64
- package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +0 -155
- package/chunks/FyCurd.8acd2983.mjs +0 -548
- package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +0 -2945
- package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +0 -47
- package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +0 -151
- package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +0 -22
- package/chunks/FyForm.0294e494.mjs +0 -439
- package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +0 -737
- package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +0 -93
- package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +0 -56
- package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +0 -158
- package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +0 -39
- package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +0 -102
- package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +0 -41
- package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +0 -15
- package/chunks/IconTemp.42c48e1f.mjs +0 -32
- package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +0 -23
- package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +0 -172
- package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +0 -23
- package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +0 -21
- package/chunks/Page.81f4b8d9.mjs +0 -32
- package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +0 -13
- package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +0 -26
- package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +0 -88
- package/chunks/PageableTable.333cbdc1.mjs +0 -335
- package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +0 -148
- package/chunks/ResizeObserver.60f728f0.mjs +0 -54
- package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +0 -13
- package/chunks/TableColumn.8503272e.mjs +0 -106
- package/chunks/Toolbar.5c539dbb.mjs +0 -24
- package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +0 -275
- package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +0 -31
- package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +0 -74
|
@@ -1,584 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
42
|
-
|
|
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 [
|
|
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),
|
|
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
|
-
},
|
|
581
|
-
const
|
|
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
|
|
622
|
-
this.uploader = e, this.uploader.fileStatusText = this.fileStatusText, e.on("catchAll", this.allEvent), e.on(
|
|
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(
|
|
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(
|
|
74
|
+
if (this.$emit(r(s), e), e.ignored)
|
|
634
75
|
return !1;
|
|
635
76
|
},
|
|
636
77
|
filesAdded(e, t) {
|
|
637
|
-
if (this.$emit(
|
|
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],
|
|
648
|
-
[
|
|
649
|
-
[
|
|
650
|
-
[
|
|
88
|
+
const t = e[0], o = {
|
|
89
|
+
[s]: !0,
|
|
90
|
+
[l]: !0,
|
|
91
|
+
[p]: "uploadStart"
|
|
651
92
|
}[t];
|
|
652
|
-
if (
|
|
653
|
-
if (
|
|
93
|
+
if (o) {
|
|
94
|
+
if (o === !0)
|
|
654
95
|
return;
|
|
655
|
-
this[
|
|
96
|
+
this[o].apply(this, e.slice(1));
|
|
656
97
|
}
|
|
657
|
-
e[0] =
|
|
98
|
+
e[0] = r(t), this.$emit.apply(this, e);
|
|
658
99
|
}
|
|
659
100
|
}
|
|
660
|
-
},
|
|
661
|
-
var
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
101
|
+
}, d = {};
|
|
102
|
+
var c = /* @__PURE__ */ n(
|
|
103
|
+
h,
|
|
104
|
+
u,
|
|
105
|
+
f,
|
|
665
106
|
!1,
|
|
666
|
-
|
|
107
|
+
_,
|
|
667
108
|
null,
|
|
668
109
|
null,
|
|
669
110
|
null
|
|
670
111
|
);
|
|
671
|
-
function
|
|
672
|
-
for (let t in
|
|
673
|
-
this[t] =
|
|
112
|
+
function _(e) {
|
|
113
|
+
for (let t in d)
|
|
114
|
+
this[t] = d[t];
|
|
674
115
|
}
|
|
675
|
-
const
|
|
676
|
-
return
|
|
116
|
+
const S = /* @__PURE__ */ function() {
|
|
117
|
+
return c.exports;
|
|
677
118
|
}();
|
|
678
119
|
export {
|
|
679
|
-
|
|
120
|
+
S as default
|
|
680
121
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.uploader{position:relative}
|