@web-utils/component 4.0.15 → 4.0.16
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 +13 -15
- package/card/index.mjs +18 -20
- package/carousel/index.mjs +10 -12
- package/chat/index.mjs +45 -56
- package/chunk-file-uploader/index.mjs +36 -378
- package/chunk-file-uploader/style.css +1 -1
- package/chunks/ElementBaseInfo.ZADwixb5.mjs +125 -0
- package/chunks/ElementForm.CQ3PN5qj.mjs +223 -0
- package/chunks/ElementListeners.De_PRuIm.mjs +215 -0
- package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +181 -0
- package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
- package/chunks/ElementProperties.CosfDrlW.mjs +112 -0
- package/chunks/{ElementTaskConfig.AvBOzAni.mjs → ElementTaskConfig.Bko0kgTp.mjs} +55 -63
- package/chunks/FlowCondition.Y6qEYi1T.mjs +102 -0
- package/chunks/FormTemp.BQxO5IQq.mjs +123 -0
- package/chunks/SignalAndMessage.Bb5PFX0N.mjs +85 -0
- package/chunks/UserTaskListeners.Bv3BDfEI.mjs +169 -0
- package/chunks/{confirmable-mixin.BFZb6pcK.mjs → confirmable-mixin.B2TtLAdk.mjs} +1 -1
- package/chunks/core.0Exl13Mz.mjs +54 -0
- package/chunks/{dataformat.DJoNBlmI.mjs → dataformat.CpqOeGBl.mjs} +6 -6
- package/chunks/{dic.BinnDitI.mjs → dic.Dkl-leRW.mjs} +9 -9
- package/chunks/dictionary.DGt59Ir7.mjs +68 -0
- package/chunks/{event.DSlcqYHL.mjs → event.9aDS6jcw.mjs} +2 -2
- package/chunks/{form-input.BtS_J5a2.mjs → form-input.CvFdwlEV.mjs} +2 -2
- package/chunks/form-item.LWjePsPa.mjs +233 -0
- package/chunks/{index.CIfe3UB3.mjs → index.9OxHjTIE.mjs} +2 -2
- package/chunks/{index.Cn7aq-Et.mjs → index.B2TRddqf.mjs} +8 -8
- package/chunks/{init.xOlFpTyZ.mjs → init.DAsXSoLW.mjs} +2 -2
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{util.DI42t5GU.mjs → util.DqFv_pWg.mjs} +22 -22
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/chunks/utils.DRcxC1Fb.mjs +60 -0
- package/color-picker/index.mjs +22 -101
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/data-box/index.mjs +12 -15
- package/data-card/index.mjs +10 -12
- package/data-card-text/index.mjs +10 -12
- package/data-display/index.mjs +15 -17
- package/data-icons/index.mjs +13 -16
- package/data-imgtext/index.mjs +15 -18
- package/data-operatext/index.mjs +14 -16
- package/data-panel/index.mjs +13 -16
- package/data-pay/index.mjs +16 -20
- package/data-price/index.mjs +14 -16
- package/data-progress/index.mjs +13 -17
- package/data-rotate/index.mjs +12 -15
- package/data-table-picker/index.mjs +15 -18
- package/data-tabs/index.mjs +12 -15
- package/dialog-form/index.mjs +16 -18
- package/dynamic-table/index.mjs +25 -30
- package/editable-progress/index.mjs +9 -11
- package/editable-tree/index.mjs +52 -56
- package/egd-collapse-item/index.mjs +9 -9
- package/element-dialog/index.mjs +22 -23
- package/element-listeners/style.css +1 -0
- package/element-multi-instance/style.css +1 -0
- 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 +10 -11
- package/flow-designer/index.mjs +699 -1973
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +9 -9
- package/form-block/index.mjs +32 -34
- package/form-cascader/index.mjs +23 -24
- package/form-checkbox/index.mjs +16 -17
- package/form-checkbox-group/index.mjs +20 -23
- package/form-date-picker/index.mjs +18 -20
- package/form-holder/index.mjs +13 -14
- package/form-input/index.mjs +14 -15
- package/form-input-cron-expression/index.mjs +19 -22
- package/form-input-email/index.mjs +15 -16
- package/form-input-id-card/index.mjs +12 -13
- package/form-input-number/index.mjs +16 -17
- package/form-input-phone-number/index.mjs +21 -22
- package/form-input-tag/index.mjs +14 -15
- package/form-input-time/index.mjs +14 -15
- package/form-item/index.mjs +140 -3
- package/form-item-group/index.mjs +28 -31
- package/form-radio-group/index.mjs +27 -28
- package/form-select/index.mjs +21 -23
- package/form-switch/index.mjs +16 -17
- package/form-table/index.mjs +16 -17
- package/form-table-plus/index.mjs +21 -22
- package/form-textarea/index.mjs +15 -16
- package/form-tree-select/index.mjs +14 -15
- package/form-tree-select-multiple/index.mjs +14 -15
- package/form-view/index.mjs +35 -39
- package/fy-array/index.mjs +33 -37
- package/fy-cascader/index.mjs +16 -17
- package/fy-checkbox/index.mjs +11 -13
- package/fy-code/index.mjs +10 -10
- package/fy-curd/index.mjs +1128 -1152
- package/fy-date/index.mjs +10 -11
- package/fy-draggable/index.mjs +9 -10
- package/fy-dynamic/index.mjs +22 -25
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +638 -15
- package/fy-form-design/index.mjs +1307 -1345
- package/fy-from/crud/zh.d.ts +6 -6
- package/fy-input/index.mjs +12 -14
- package/fy-input-color/index.mjs +13 -15
- package/fy-input-icon/index.mjs +20 -23
- package/fy-input-map/index.mjs +28 -31
- package/fy-input-number/index.mjs +9 -10
- package/fy-input-table/index.mjs +18 -22
- package/fy-input-tree/index.mjs +33 -37
- package/fy-progress/index.mjs +9 -10
- package/fy-radio/index.mjs +15 -16
- package/fy-rate/index.mjs +10 -11
- package/fy-select/index.mjs +25 -29
- package/fy-slider/index.mjs +11 -12
- package/fy-switch/index.mjs +9 -10
- package/fy-tabs/index.mjs +15 -17
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +18 -24
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +74 -76
- package/guide-steps/index.mjs +11 -13
- package/iframe-window/index.mjs +9 -10
- package/image-cropper/index.mjs +28 -30
- package/image-preview/index.mjs +12 -14
- package/index.mjs +72 -72
- package/input-number/index.mjs +13 -14
- package/input-number-range/index.mjs +11 -12
- package/license/index.mjs +1 -1
- package/login/index.mjs +21 -26
- package/nav-bar/index.mjs +9 -10
- package/notice/index.mjs +9 -10
- package/package.json +1 -1
- package/page-index/index.mjs +12 -13
- package/page-index-top/index.mjs +23 -28
- package/page-skeleton/index.mjs +14 -14
- package/page-skeleton-new/index.mjs +8 -9
- package/pageable-table/index.mjs +172 -182
- package/pageable-view/index.mjs +15 -16
- package/picker-table-view/index.mjs +49 -58
- package/present-view/index.mjs +35 -39
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/search/index.mjs +20 -22
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/skeleton-panel/index.mjs +9 -10
- package/split-pane/index.mjs +36 -37
- package/static-pageable-table/index.mjs +11 -13
- package/sub-table/index.mjs +36 -49
- package/sub-table-plus/index.mjs +229 -18
- package/swiper/index.mjs +11 -12
- package/table-column/index.mjs +223 -3
- package/table-view/index.mjs +52 -60
- package/tabs-view/index.mjs +17 -19
- package/tag-render/index.mjs +16 -18
- package/text-ellipsis/index.mjs +9 -10
- package/toolbar/index.mjs +13 -14
- package/toolbar-button/index.mjs +13 -14
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +259 -267
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +21 -24
- package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
- package/chunks/FyForm.DriwCJ7b.mjs +0 -765
- package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
- package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
- package/chunks/TableColumn.BzivvXMF.mjs +0 -337
|
@@ -1,351 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { n
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const e = Math.floor(s / 31536e3);
|
|
6
|
-
if (e)
|
|
7
|
-
return `${e} 年${n(e)}`;
|
|
8
|
-
const t = Math.floor((s %= 31536e3) / 86400);
|
|
9
|
-
if (t)
|
|
10
|
-
return `${t} 天${n(t)}`;
|
|
11
|
-
const r = Math.floor((s %= 86400) / 3600);
|
|
12
|
-
if (r)
|
|
13
|
-
return `${r} 时${n(r)}`;
|
|
14
|
-
const i = Math.floor((s %= 3600) / 60);
|
|
15
|
-
if (i)
|
|
16
|
-
return `${i} 分${n(i)}`;
|
|
17
|
-
const o = s % 60;
|
|
18
|
-
return `${o} 秒${n(o)}`;
|
|
19
|
-
function n(_) {
|
|
20
|
-
return _ > 1, "";
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function p(s) {
|
|
24
|
-
return s.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
1
|
+
import a from "simple-uploader.js";
|
|
2
|
+
import { n } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
3
|
+
function r(e) {
|
|
4
|
+
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
25
5
|
}
|
|
26
|
-
const
|
|
27
|
-
name: "ChunkFileUploaderFile",
|
|
28
|
-
props: {
|
|
29
|
-
file: {
|
|
30
|
-
type: Object,
|
|
31
|
-
default() {
|
|
32
|
-
return {};
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
list: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: !1
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
response: null,
|
|
43
|
-
paused: !1,
|
|
44
|
-
error: !1,
|
|
45
|
-
averageSpeed: 0,
|
|
46
|
-
currentSpeed: 0,
|
|
47
|
-
isComplete: !1,
|
|
48
|
-
isUploading: !1,
|
|
49
|
-
size: 0,
|
|
50
|
-
formatedSize: "",
|
|
51
|
-
uploadedSize: 0,
|
|
52
|
-
progress: 0,
|
|
53
|
-
timeRemaining: 0,
|
|
54
|
-
type: "",
|
|
55
|
-
extension: "",
|
|
56
|
-
progressingClass: ""
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
computed: {
|
|
60
|
-
fileCategory() {
|
|
61
|
-
const s = this.extension;
|
|
62
|
-
let t = this.file.isFolder ? "folder" : "unknown";
|
|
63
|
-
const i = this.file.uploader.opts.categoryMap || {
|
|
64
|
-
image: ["gif", "jpg", "jpeg", "png", "bmp", "webp"],
|
|
65
|
-
video: ["mp4", "m3u8", "rmvb", "avi", "swf", "3gp", "mkv", "flv"],
|
|
66
|
-
audio: ["mp3", "wav", "wma", "ogg", "aac", "flac"],
|
|
67
|
-
document: ["doc", "txt", "docx", "pages", "epub", "pdf", "numbers", "csv", "xls", "xlsx", "keynote", "ppt", "pptx"]
|
|
68
|
-
};
|
|
69
|
-
return Object.keys(i).forEach((o) => {
|
|
70
|
-
i[o].indexOf(s) > -1 && (t = o);
|
|
71
|
-
}), t;
|
|
72
|
-
},
|
|
73
|
-
progressStyle() {
|
|
74
|
-
const s = Math.floor(this.progress * 100), e = `translateX(${Math.floor(s - 100)}%)`;
|
|
75
|
-
return {
|
|
76
|
-
progress: `${s}%`,
|
|
77
|
-
webkitTransform: e,
|
|
78
|
-
mozTransform: e,
|
|
79
|
-
msTransform: e,
|
|
80
|
-
transform: e
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
formatedAverageSpeed() {
|
|
84
|
-
return `${m.utils.formatSize(this.averageSpeed)} / s`;
|
|
85
|
-
},
|
|
86
|
-
status() {
|
|
87
|
-
const { isUploading: s, isComplete: e, isError: t, paused: r } = this, { md5Computing: i } = this.file;
|
|
88
|
-
return i ? "md5" : e ? "success" : t ? "error" : s ? "uploading" : r ? "paused" : "waiting";
|
|
89
|
-
},
|
|
90
|
-
statusText() {
|
|
91
|
-
const s = this.status, e = this.file.uploader.fileStatusText;
|
|
92
|
-
let t = s;
|
|
93
|
-
return typeof e == "function" ? t = e(s, this.response) : t = e[s], t || "";
|
|
94
|
-
},
|
|
95
|
-
formatedTimeRemaining() {
|
|
96
|
-
const s = this.timeRemaining, e = this.file;
|
|
97
|
-
if (s === Number.POSITIVE_INFINITY || s === 0)
|
|
98
|
-
return "";
|
|
99
|
-
let t = g(s);
|
|
100
|
-
const r = e.uploader.opts.parseTimeRemaining;
|
|
101
|
-
return r && (t = r(s, t)), t;
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
watch: {
|
|
105
|
-
status(s, e) {
|
|
106
|
-
e && s === "uploading" && e !== "uploading" ? this.tid = setTimeout(() => {
|
|
107
|
-
this.progressingClass = "uploader-file-progressing";
|
|
108
|
-
}, 200) : (clearTimeout(this.tid), this.progressingClass = "");
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
mounted() {
|
|
112
|
-
const s = ["paused", "error", "averageSpeed", "currentSpeed"], e = [
|
|
113
|
-
"isComplete",
|
|
114
|
-
"isUploading",
|
|
115
|
-
{
|
|
116
|
-
key: "size",
|
|
117
|
-
fn: "getSize"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
key: "formatedSize",
|
|
121
|
-
fn: "getFormatSize"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
key: "uploadedSize",
|
|
125
|
-
fn: "sizeUploaded"
|
|
126
|
-
},
|
|
127
|
-
"progress",
|
|
128
|
-
"timeRemaining",
|
|
129
|
-
{
|
|
130
|
-
key: "type",
|
|
131
|
-
fn: "getType"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
key: "extension",
|
|
135
|
-
fn: "getExtension"
|
|
136
|
-
}
|
|
137
|
-
];
|
|
138
|
-
s.forEach((i) => {
|
|
139
|
-
this[i] = this.file[i];
|
|
140
|
-
}), e.forEach((i) => {
|
|
141
|
-
typeof i == "string" ? this[i] = this.file[i]() : this[i.key] = this.file[i.fn]();
|
|
142
|
-
});
|
|
143
|
-
const t = this._handlers = {}, r = (i) => (t[i] = (...o) => {
|
|
144
|
-
this.fileEventsHandler(i, o);
|
|
145
|
-
}, t[i]);
|
|
146
|
-
c.forEach((i) => {
|
|
147
|
-
this.file.uploader.on(i, r(i));
|
|
148
|
-
});
|
|
149
|
-
},
|
|
150
|
-
destroyed() {
|
|
151
|
-
c.forEach((s) => {
|
|
152
|
-
this.file.uploader.off(s, this._handlers[s]);
|
|
153
|
-
}), this._handlers = null;
|
|
154
|
-
},
|
|
155
|
-
methods: {
|
|
156
|
-
_actionCheck() {
|
|
157
|
-
this.paused = this.file.paused, this.error = this.file.error, this.isUploading = this.file.isUploading();
|
|
158
|
-
},
|
|
159
|
-
pause() {
|
|
160
|
-
this.file.pause(), this._actionCheck(), this._fileProgress();
|
|
161
|
-
},
|
|
162
|
-
resume() {
|
|
163
|
-
this.file.resume(), this._actionCheck();
|
|
164
|
-
},
|
|
165
|
-
remove() {
|
|
166
|
-
this.$set(this.file, "canceled", !0), this.file.cancel();
|
|
167
|
-
},
|
|
168
|
-
retry() {
|
|
169
|
-
this.file.retry(), this._actionCheck();
|
|
170
|
-
},
|
|
171
|
-
processResponse(s) {
|
|
172
|
-
let e = s;
|
|
173
|
-
try {
|
|
174
|
-
e = JSON.parse(s);
|
|
175
|
-
} catch {
|
|
176
|
-
}
|
|
177
|
-
this.response = e;
|
|
178
|
-
},
|
|
179
|
-
fileEventsHandler(s, e) {
|
|
180
|
-
var o;
|
|
181
|
-
const t = e[0], r = e[1], i = this.list ? t : r;
|
|
182
|
-
if (this.file === i) {
|
|
183
|
-
if (this.list && s === "fileSuccess") {
|
|
184
|
-
this.processResponse(e[2]);
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
(o = this[`_${s}`]) == null || o.call(this, ...e);
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
_fileProgress() {
|
|
191
|
-
this.progress = this.file.progress(), this.averageSpeed = this.file.averageSpeed, this.currentSpeed = this.file.currentSpeed, this.timeRemaining = this.file.timeRemaining(), this.uploadedSize = this.file.sizeUploaded(), this._actionCheck();
|
|
192
|
-
},
|
|
193
|
-
_fileSuccess(s, e, t) {
|
|
194
|
-
s && this.processResponse(t), this._fileProgress(), this.error = !1, this.isComplete = !0, this.isUploading = !1;
|
|
195
|
-
},
|
|
196
|
-
_fileComplete() {
|
|
197
|
-
this._fileSuccess();
|
|
198
|
-
},
|
|
199
|
-
_fileError(s, e, t) {
|
|
200
|
-
this._fileProgress(), this.processResponse(t), this.error = !0, this.isComplete = !1, this.isUploading = !1;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
var S = function() {
|
|
205
|
-
var e = this, t = e._self._c;
|
|
206
|
-
return t("div", { staticClass: "chunk-file-uploader-file", attrs: { status: e.status } }, [e._t("default", function() {
|
|
207
|
-
return [t("div", { staticClass: "chunk-file-uploader-file-info" }, [t("div", { staticClass: "chunk-file-uploader-file-name", attrs: { title: e.file.name } }, [t("i", { staticClass: "chunk-file-uploader-file-icon", attrs: { icon: e.fileCategory } }), e._v(e._s(e.file.name))]), t("div", { staticClass: "chunk-file-uploader-file-size" }, [e._v(" " + e._s(e.formatedSize) + " ")]), t("div", { staticClass: "chunk-file-uploader-file-status" }, [t("span", { directives: [{ name: "show", rawName: "v-show", value: !["uploading", "md5"].includes(e.status), expression: "!['uploading', 'md5'].includes(status)" }] }, [e._v(e._s(e.statusText))]), t("span", { directives: [{ name: "show", rawName: "v-show", value: e.status === "md5", expression: "status === 'md5'" }] }, [e._v(e._s(e.file.md5Progress))]), t("span", { directives: [{ name: "show", rawName: "v-show", value: e.status === "uploading", expression: "status === 'uploading'" }], staticStyle: { "padding-left": "4px" } }, [t("span", [e._v(e._s(e.progressStyle.progress))]), e._v(" | "), t("em", [e._v(e._s(e.formatedAverageSpeed))]), e._v(" | "), t("i", [e._v(e._s(e.formatedTimeRemaining))])])]), t("div", { staticClass: "chunk-file-uploader-file-actions" }, [t("span", { staticClass: "chunk-file-uploader-file-pause", on: { click: e.pause } }), t("span", { staticClass: "chunk-file-uploader-file-resume", on: { click: e.resume } }, [e._v("️")]), t("span", { staticClass: "chunk-file-uploader-file-retry", on: { click: e.retry } }), t("span", { staticClass: "chunk-file-uploader-file-remove", on: { click: e.remove } })])])];
|
|
208
|
-
}, { file: e.file, list: e.list, status: e.status, paused: e.paused, error: e.error, response: e.response, averageSpeed: e.averageSpeed, formatedAverageSpeed: e.formatedAverageSpeed, currentSpeed: e.currentSpeed, isComplete: e.isComplete, isUploading: e.isUploading, size: e.size, formatedSize: e.formatedSize, uploadedSize: e.uploadedSize, progress: e.progress, progressStyle: e.progressStyle, progressingClass: e.progressingClass, timeRemaining: e.timeRemaining, formatedTimeRemaining: e.formatedTimeRemaining, type: e.type, extension: e.extension, fileCategory: e.fileCategory })], 2);
|
|
209
|
-
}, y = [], C = /* @__PURE__ */ a(
|
|
210
|
-
v,
|
|
211
|
-
S,
|
|
212
|
-
y,
|
|
213
|
-
!1,
|
|
214
|
-
null,
|
|
215
|
-
null
|
|
216
|
-
);
|
|
217
|
-
const x = C.exports, d = {
|
|
218
|
-
inject: ["uploader"]
|
|
219
|
-
}, f = {
|
|
220
|
-
data() {
|
|
221
|
-
return {
|
|
222
|
-
support: !0
|
|
223
|
-
};
|
|
224
|
-
},
|
|
225
|
-
mounted() {
|
|
226
|
-
this.support = this.uploader.uploader.support;
|
|
227
|
-
}
|
|
228
|
-
}, $ = {
|
|
229
|
-
name: "ChunkFileUploaderList",
|
|
230
|
-
mixins: [d],
|
|
231
|
-
computed: {
|
|
232
|
-
fileList() {
|
|
233
|
-
return this.uploader.fileList;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
var k = function() {
|
|
238
|
-
var e = this, t = e._self._c;
|
|
239
|
-
return t("div", { staticClass: "uploader-list" }, [e._t("default", function() {
|
|
240
|
-
return [t("ul", e._l(e.fileList, function(r) {
|
|
241
|
-
return t("li", { key: r.id }, [t(x, { attrs: { file: r, list: !0 } })], 1);
|
|
242
|
-
}), 0)];
|
|
243
|
-
}, { fileList: e.fileList })], 2);
|
|
244
|
-
}, w = [], T = /* @__PURE__ */ a(
|
|
245
|
-
$,
|
|
246
|
-
k,
|
|
247
|
-
w,
|
|
248
|
-
!1,
|
|
249
|
-
null,
|
|
250
|
-
null
|
|
251
|
-
);
|
|
252
|
-
const E = T.exports, R = {
|
|
253
|
-
name: "ChunkFileUploaderButton",
|
|
254
|
-
mixins: [d, f],
|
|
255
|
-
props: {
|
|
256
|
-
directory: {
|
|
257
|
-
type: Boolean,
|
|
258
|
-
default: !1
|
|
259
|
-
},
|
|
260
|
-
single: {
|
|
261
|
-
type: Boolean,
|
|
262
|
-
default: !1
|
|
263
|
-
},
|
|
264
|
-
attrs: {
|
|
265
|
-
type: Object,
|
|
266
|
-
default() {
|
|
267
|
-
return {};
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
mounted() {
|
|
272
|
-
this.$nextTick(() => {
|
|
273
|
-
this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, this.attrs);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
var b = function() {
|
|
278
|
-
var e = this, t = e._self._c;
|
|
279
|
-
return t("label", { directives: [{ name: "show", rawName: "v-show", value: e.support, expression: "support" }], ref: "btn", staticClass: "uploader-btn" }, [e._t("default")], 2);
|
|
280
|
-
}, F = [], A = /* @__PURE__ */ a(
|
|
281
|
-
R,
|
|
282
|
-
b,
|
|
283
|
-
F,
|
|
284
|
-
!1,
|
|
285
|
-
null,
|
|
286
|
-
null
|
|
287
|
-
);
|
|
288
|
-
const h = A.exports, z = {
|
|
289
|
-
name: "ChunkFileUploaderDrop",
|
|
290
|
-
mixins: [d, f],
|
|
291
|
-
data() {
|
|
292
|
-
return {
|
|
293
|
-
dropClass: ""
|
|
294
|
-
};
|
|
295
|
-
},
|
|
296
|
-
async mounted() {
|
|
297
|
-
await this.$nextTick();
|
|
298
|
-
const s = this.$refs.drop, e = this.uploader.uploader;
|
|
299
|
-
e.assignDrop(s), e.on("dragenter", this.onDragEnter), e.on("dragleave", this.onDragLeave), e.on("drop", this.onDrop);
|
|
300
|
-
},
|
|
301
|
-
beforeDestroy() {
|
|
302
|
-
const s = this.$refs.drop, e = this.uploader.uploader;
|
|
303
|
-
e.off("dragenter", this.onDragEnter), e.off("dragleave", this.onDragLeave), e.off("drop", this.onDrop), e.unAssignDrop(s);
|
|
304
|
-
},
|
|
305
|
-
methods: {
|
|
306
|
-
onDragEnter() {
|
|
307
|
-
this.dropClass = "uploader-dragover";
|
|
308
|
-
},
|
|
309
|
-
onDragLeave() {
|
|
310
|
-
this.dropClass = "";
|
|
311
|
-
},
|
|
312
|
-
onDrop() {
|
|
313
|
-
this.dropClass = "uploader-droped";
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
var U = function() {
|
|
318
|
-
var e = this, t = e._self._c;
|
|
319
|
-
return t("div", { directives: [{ name: "show", rawName: "v-show", value: e.support, expression: "support" }], ref: "drop", staticClass: "uploader-drop", class: e.dropClass }, [e._t("default")], 2);
|
|
320
|
-
}, D = [], L = /* @__PURE__ */ a(
|
|
321
|
-
z,
|
|
322
|
-
U,
|
|
323
|
-
D,
|
|
324
|
-
!1,
|
|
325
|
-
null,
|
|
326
|
-
null
|
|
327
|
-
);
|
|
328
|
-
const M = L.exports, N = {
|
|
329
|
-
name: "ChunkFileUploaderUnSupport",
|
|
330
|
-
mixins: [d, f]
|
|
331
|
-
};
|
|
332
|
-
var P = function() {
|
|
333
|
-
var e = this, t = e._self._c;
|
|
334
|
-
return t("div", { directives: [{ name: "show", rawName: "v-show", value: !e.support, expression: "!support" }], staticClass: "uploader-unsupport" }, [e._t("default", function() {
|
|
335
|
-
return [e._m(0)];
|
|
336
|
-
})], 2);
|
|
337
|
-
}, I = [function() {
|
|
338
|
-
var s = this, e = s._self._c;
|
|
339
|
-
return e("p", [s._v(" Your browser, unfortunately, is not supported by Uploader.js. The library requires support for "), e("a", { attrs: { href: "http://www.w3.org/TR/FileAPI/" } }, [s._v("the HTML5 File API")]), s._v(" along with "), e("a", { attrs: { href: "http://www.w3.org/TR/FileAPI/#normalization-of-params" } }, [s._v("file slicing")]), s._v(". ")]);
|
|
340
|
-
}], j = /* @__PURE__ */ a(
|
|
341
|
-
N,
|
|
342
|
-
P,
|
|
343
|
-
I,
|
|
344
|
-
!1,
|
|
345
|
-
null,
|
|
346
|
-
null
|
|
347
|
-
);
|
|
348
|
-
const O = j.exports, l = "fileAdded", u = "filesAdded", B = "uploadStart", V = {
|
|
6
|
+
const s = "fileAdded", l = "filesAdded", u = "uploadStart", f = {
|
|
349
7
|
name: "ChunkFileUploader",
|
|
350
8
|
provide() {
|
|
351
9
|
return {
|
|
@@ -385,61 +43,61 @@ const O = j.exports, l = "fileAdded", u = "filesAdded", B = "uploadStart", V = {
|
|
|
385
43
|
},
|
|
386
44
|
created() {
|
|
387
45
|
this.options.initialPaused = !this.autoStart;
|
|
388
|
-
const
|
|
389
|
-
this.uploader =
|
|
46
|
+
const e = new a(this.options);
|
|
47
|
+
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);
|
|
390
48
|
},
|
|
391
49
|
destroyed() {
|
|
392
|
-
const
|
|
393
|
-
|
|
50
|
+
const e = this.uploader;
|
|
51
|
+
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;
|
|
394
52
|
},
|
|
395
53
|
methods: {
|
|
396
54
|
uploadStart() {
|
|
397
55
|
this.started = !0;
|
|
398
56
|
},
|
|
399
|
-
fileAdded(
|
|
400
|
-
if (this.$emit(
|
|
57
|
+
fileAdded(e) {
|
|
58
|
+
if (this.$emit(r(s), e), e.ignored)
|
|
401
59
|
return !1;
|
|
402
60
|
},
|
|
403
|
-
filesAdded(
|
|
404
|
-
if (this.$emit(
|
|
61
|
+
filesAdded(e, t) {
|
|
62
|
+
if (this.$emit(r(l), e, t), e.ignored || t.ignored)
|
|
405
63
|
return !1;
|
|
406
64
|
},
|
|
407
|
-
fileRemoved(
|
|
408
|
-
this.$emit("file-removed",
|
|
65
|
+
fileRemoved(e) {
|
|
66
|
+
this.$emit("file-removed", e), this.files = this.uploader.files, this.fileList = this.uploader.fileList;
|
|
409
67
|
},
|
|
410
68
|
filesSubmitted() {
|
|
411
69
|
this.files = this.uploader.files, this.fileList = this.uploader.fileList, this.autoStart && this.uploader.upload();
|
|
412
70
|
},
|
|
413
|
-
allEvent(...
|
|
414
|
-
var
|
|
415
|
-
const
|
|
71
|
+
allEvent(...e) {
|
|
72
|
+
var d;
|
|
73
|
+
const t = e[0], o = {
|
|
74
|
+
[s]: !0,
|
|
416
75
|
[l]: !0,
|
|
417
|
-
[u]:
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
if (r === !0)
|
|
76
|
+
[u]: "uploadStart"
|
|
77
|
+
}[t];
|
|
78
|
+
if (o) {
|
|
79
|
+
if (o === !0)
|
|
422
80
|
return;
|
|
423
|
-
(
|
|
81
|
+
(d = this[o]) == null || d.call(this, e.slice(1));
|
|
424
82
|
}
|
|
425
|
-
|
|
83
|
+
e[0] = r(t), this.$emit(...e);
|
|
426
84
|
}
|
|
427
85
|
}
|
|
428
86
|
};
|
|
429
|
-
var
|
|
430
|
-
var
|
|
431
|
-
return
|
|
432
|
-
return [
|
|
433
|
-
}, { files:
|
|
434
|
-
},
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
87
|
+
var p = function() {
|
|
88
|
+
var t = this, i = t._self._c;
|
|
89
|
+
return i("div", { staticClass: "uploader" }, [t._t("default", function() {
|
|
90
|
+
return [i("ChunkFileUploaderUnSupport"), i("ChunkFileUploaderDrop", [i("p", [t._v("Drop files here to upload or")]), i("ChunkFileUploaderButton", [t._v("select files")]), i("ChunkFileUploaderButton", { attrs: { directory: !0 } }, [t._v(" select folder ")])], 1), i("ChunkFileUploaderList")];
|
|
91
|
+
}, { files: t.files, fileList: t.fileList, started: t.started })], 2);
|
|
92
|
+
}, h = [], c = /* @__PURE__ */ n(
|
|
93
|
+
f,
|
|
94
|
+
p,
|
|
95
|
+
h,
|
|
438
96
|
!1,
|
|
439
97
|
null,
|
|
440
98
|
null
|
|
441
99
|
);
|
|
442
|
-
const
|
|
100
|
+
const v = c.exports;
|
|
443
101
|
export {
|
|
444
|
-
|
|
102
|
+
v as default
|
|
445
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.uploader{position:relative}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { fastClone as o } from "@web-utils/core";
|
|
2
|
+
import { a as l, g as r } from "./utils.DRcxC1Fb.mjs";
|
|
3
|
+
import { n as m } from "./_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
4
|
+
const c = {
|
|
5
|
+
name: "ElementBaseInfo",
|
|
6
|
+
inject: {
|
|
7
|
+
prefix: "prefix",
|
|
8
|
+
width: "width"
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
id: String,
|
|
12
|
+
idEditDisabled: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !0
|
|
15
|
+
},
|
|
16
|
+
element: Object,
|
|
17
|
+
bpmnInstances: Object
|
|
18
|
+
},
|
|
19
|
+
data() {
|
|
20
|
+
return {
|
|
21
|
+
skipExpression: "",
|
|
22
|
+
requiredComment: null,
|
|
23
|
+
businessObject: {},
|
|
24
|
+
attrs: {
|
|
25
|
+
commentInForm: null,
|
|
26
|
+
commentOrder: null,
|
|
27
|
+
commentNodeIds: null,
|
|
28
|
+
commentLabel: null
|
|
29
|
+
},
|
|
30
|
+
nodes: []
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
watch: {
|
|
34
|
+
id: "init"
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
init(n) {
|
|
38
|
+
const e = this.bpmnInstances.elementRegistry.filter((i) => i.type === "bpmn:UserTask");
|
|
39
|
+
this.nodes = e.map(({ businessObject: { id: i, name: a } }) => ({ label: a, value: i }));
|
|
40
|
+
const { businessObject: s } = this.element;
|
|
41
|
+
if (n ? (this.businessObject = o(s), this.businessObject.$type === "bpmn:SubProcess" && this.$set(this.businessObject, "isExpanded", this.element.di.isExpanded)) : this.businessObject = {}, this.businessObject.$type === "bpmn:UserTask")
|
|
42
|
+
for (const i in this.attrs) {
|
|
43
|
+
let a = r(s, `${this.prefix}:${i}`);
|
|
44
|
+
i === "commentNodeIds" && (a = a ? a.split(",") : []), this.attrs[i] = a;
|
|
45
|
+
}
|
|
46
|
+
this.skipExpression = r(s, `${this.prefix}:skipExpression`);
|
|
47
|
+
let t = r(s, `${this.prefix}:requiredComment`);
|
|
48
|
+
t || (t = "Y"), this.requiredComment = t;
|
|
49
|
+
},
|
|
50
|
+
updateBaseInfo(n) {
|
|
51
|
+
const { modeling: e } = this.bpmnInstances;
|
|
52
|
+
if (n === "id") {
|
|
53
|
+
e.updateProperties(this.element, {
|
|
54
|
+
id: this.businessObject[n],
|
|
55
|
+
di: { id: `${this.businessObject[n]}_di` }
|
|
56
|
+
});
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (n === "isExpanded") {
|
|
60
|
+
e.toggleCollapse(this.element);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
e.updateProperties(this.element, { [n]: this.businessObject[n] });
|
|
64
|
+
},
|
|
65
|
+
updateProp(n, e) {
|
|
66
|
+
if (n === "commentInForm") {
|
|
67
|
+
if (!e)
|
|
68
|
+
for (const s in this.attrs)
|
|
69
|
+
s !== "commentInForm" && (this.attrs[s] = null, l(this.bpmnInstances, this.element, `${this.prefix}:${s}`, this.attrs[s]));
|
|
70
|
+
} else n === "commentNodeIds" ? e = e != null && e.length ? e.join(",") : null : e = e || null;
|
|
71
|
+
l(this.bpmnInstances, this.element, `${this.prefix}:${n}`, e);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
var u = function() {
|
|
76
|
+
var e = this, s = e._self._c;
|
|
77
|
+
return s("div", { staticClass: "panel-tab__content" }, [s("ElForm", { attrs: { size: "mini", "label-width": "90px" }, nativeOn: { submit: function(t) {
|
|
78
|
+
t.preventDefault();
|
|
79
|
+
} } }, [s("ElFormItem", { attrs: { label: "ID" } }, [s("ElInput", { attrs: { disabled: e.idEditDisabled, clearable: "" }, on: { input: function(t) {
|
|
80
|
+
return e.updateBaseInfo("id");
|
|
81
|
+
} }, model: { value: e.businessObject.id, callback: function(t) {
|
|
82
|
+
e.$set(e.businessObject, "id", t);
|
|
83
|
+
}, expression: "businessObject.id" } })], 1), s("ElFormItem", { attrs: { label: "名称" } }, [s("ElInput", { attrs: { clearable: "" }, on: { input: function(t) {
|
|
84
|
+
return e.updateBaseInfo("name");
|
|
85
|
+
} }, model: { value: e.businessObject.name, callback: function(t) {
|
|
86
|
+
e.$set(e.businessObject, "name", t);
|
|
87
|
+
}, expression: "businessObject.name" } })], 1), e.businessObject.$type === "bpmn:UserTask" ? [s("ElFormItem", { attrs: { label: "跳过表达式" } }, [s("ElInput", { attrs: { clearable: "" }, on: { input: (t) => e.updateProp("skipExpression", t) }, model: { value: e.skipExpression, callback: function(t) {
|
|
88
|
+
e.skipExpression = t;
|
|
89
|
+
}, expression: "skipExpression" } })], 1), s("ElFormItem", { attrs: { label: "意见必填" } }, [s("ElSwitch", { attrs: { "active-text": "是", "active-value": "Y", "inactive-text": "否", "inactive-value": "N" }, on: { input: (t) => e.updateProp("requiredComment", t) }, model: { value: e.requiredComment, callback: function(t) {
|
|
90
|
+
e.requiredComment = t;
|
|
91
|
+
}, expression: "requiredComment" } })], 1), s("ElFormItem", { attrs: { label: "意见在表单" } }, [s("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: (t) => e.updateProp("commentInForm", t) }, model: { value: e.attrs.commentInForm, callback: function(t) {
|
|
92
|
+
e.$set(e.attrs, "commentInForm", t);
|
|
93
|
+
}, expression: "attrs.commentInForm" } })], 1), e.attrs.commentInForm ? [s("ElFormItem", { attrs: { label: "意见名称" } }, [s("ElInput", { attrs: { clearable: "" }, on: { input: (t) => e.updateProp("commentLabel", t) }, model: { value: e.attrs.commentLabel, callback: function(t) {
|
|
94
|
+
e.$set(e.attrs, "commentLabel", t);
|
|
95
|
+
}, expression: "attrs.commentLabel" } })], 1), s("ElFormItem", { attrs: { label: "意见聚合" } }, [s("ElSelect", { attrs: { multiple: "", clearable: "" }, on: { input: (t) => e.updateProp("commentNodeIds", t) }, model: { value: e.attrs.commentNodeIds, callback: function(t) {
|
|
96
|
+
e.$set(e.attrs, "commentNodeIds", t);
|
|
97
|
+
}, expression: "attrs.commentNodeIds" } }, e._l(e.nodes, function(t) {
|
|
98
|
+
return s("ElOption", { key: t.value, attrs: { label: t.label, value: t.value } });
|
|
99
|
+
}), 1)], 1), s("ElFormItem", { attrs: { label: "意见排序号" } }, [s("ElInput", { attrs: { clearable: "" }, on: { input: (t) => e.updateProp("commentOrder", t) }, model: { value: e.attrs.commentOrder, callback: function(t) {
|
|
100
|
+
e.$set(e.attrs, "commentOrder", t);
|
|
101
|
+
}, expression: "attrs.commentOrder" } })], 1)] : e._e()] : e._e(), e.businessObject.$type === "bpmn:Process" ? [s("ElFormItem", { attrs: { label: "版本标签" } }, [s("ElInput", { attrs: { clearable: "" }, on: { input: function(t) {
|
|
102
|
+
return e.updateBaseInfo("versionTag");
|
|
103
|
+
} }, model: { value: e.businessObject.versionTag, callback: function(t) {
|
|
104
|
+
e.$set(e.businessObject, "versionTag", t);
|
|
105
|
+
}, expression: "businessObject.versionTag" } })], 1), s("ElFormItem", { attrs: { label: "可执行" } }, [s("ElSwitch", { attrs: { "active-text": "是", "inactive-text": "否" }, on: { input: function(t) {
|
|
106
|
+
return e.updateBaseInfo("isExecutable");
|
|
107
|
+
} }, model: { value: e.businessObject.isExecutable, callback: function(t) {
|
|
108
|
+
e.$set(e.businessObject, "isExecutable", t);
|
|
109
|
+
}, expression: "businessObject.isExecutable" } })], 1)] : e._e(), e.businessObject.$type === "bpmn:SubProcess" ? s("ElFormItem", { attrs: { label: "状态" } }, [s("ElSwitch", { attrs: { "active-text": "展开", "inactive-text": "折叠" }, on: { input: function(t) {
|
|
110
|
+
return e.updateBaseInfo("isExpanded");
|
|
111
|
+
} }, model: { value: e.businessObject.isExpanded, callback: function(t) {
|
|
112
|
+
e.$set(e.businessObject, "isExpanded", t);
|
|
113
|
+
}, expression: "businessObject.isExpanded" } })], 1) : e._e()], 2)], 1);
|
|
114
|
+
}, b = [], p = /* @__PURE__ */ m(
|
|
115
|
+
c,
|
|
116
|
+
u,
|
|
117
|
+
b,
|
|
118
|
+
!1,
|
|
119
|
+
null,
|
|
120
|
+
null
|
|
121
|
+
);
|
|
122
|
+
const E = p.exports;
|
|
123
|
+
export {
|
|
124
|
+
E as default
|
|
125
|
+
};
|