@mobilon-dev/chotto 0.3.100 → 0.3.103
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/dist/chotto.css +1 -1
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +4 -3
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +72 -119
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +2 -2
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +109 -88
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +334 -225
- package/dist/components/3_compounds/ChatInput/icons/ArrowIcon.vue.js +40 -0
- package/dist/hooks/uploadFile/generatePreview.js +19 -18
- package/dist/hooks/useMessageDraft.js +85 -65
- package/dist/index.js +159 -157
- package/dist/locale/en.js +4 -0
- package/dist/locale/ru.js +4 -0
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/components/2_chatinput_elements/FilePreview/stories/FilePreview.stories.d.ts +3 -3
- package/dist/types/components/2_chatinput_elements/FilePreview/styles/types.d.ts +135 -127
- package/dist/types/components/2_chatinput_elements/FileUploader/FileUploader.vue.d.ts +9 -0
- package/dist/types/components/3_compounds/ChatInput/ChatInput.vue.d.ts +14 -3
- package/dist/types/components/3_compounds/ChatInput/icons/ArrowIcon.vue.d.ts +2 -0
- package/dist/types/components/3_compounds/ChatInput/icons/index.d.ts +1 -0
- package/dist/types/components/3_compounds/ChatInput/styles/types.d.ts +74 -0
- package/dist/types/hooks/useMessageDraft.d.ts +10 -3
- package/dist/types/locale/en.d.ts +4 -0
- package/dist/types/locale/ru.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import o from "./FilePreview.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/* empty css */
|
|
4
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-592e055e"]]);
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
p as default
|
|
7
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as _, inject as b, ref as g, computed as N, createElementBlock as l, openBlock as i, createElementVNode as n, createBlock as m, createCommentVNode as o, toDisplayString as c, Teleport as V, createVNode as C, Transition as T, withCtx as d, unref as u } from "vue";
|
|
2
|
+
import U from "../../2_modals/ModalFullscreen/ModalFullscreen.vue.js";
|
|
3
3
|
import "../../../hooks/useMessageDraft.js";
|
|
4
4
|
import "../../../hooks/useSearchModel.js";
|
|
5
5
|
import { useTheme as B } from "../../../hooks/useTheme.js";
|
|
@@ -11,20 +11,16 @@ import "../../../locale/useLocale.js";
|
|
|
11
11
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
12
12
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
13
13
|
import "../../../functions/parseMarkdown.js";
|
|
14
|
-
|
|
15
|
-
const j = { class: "preview__container" }, F = { class: "preview__block" }, O = ["src"], q = ["src"], G = {
|
|
14
|
+
const x = { class: "preview" }, z = ["src", "alt"], F = ["src"], M = {
|
|
16
15
|
key: 2,
|
|
17
|
-
|
|
18
|
-
},
|
|
16
|
+
class: "pi pi-play preview__thumb-play"
|
|
17
|
+
}, S = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "pi pi-file preview__icon"
|
|
20
|
+
}, j = { class: "preview__info" }, A = ["title"], E = {
|
|
19
21
|
key: 0,
|
|
20
22
|
class: "preview__size"
|
|
21
|
-
},
|
|
22
|
-
key: 1,
|
|
23
|
-
class: "preview__audio-time"
|
|
24
|
-
}, ee = {
|
|
25
|
-
key: 2,
|
|
26
|
-
class: "preview__audio-time"
|
|
27
|
-
}, ie = { class: "preview__reset" }, te = ["src"], le = ["src"], ye = /* @__PURE__ */ V({
|
|
23
|
+
}, O = ["aria-label"], P = ["src"], $ = ["src", "alt"], ee = /* @__PURE__ */ _({
|
|
28
24
|
__name: "FilePreview",
|
|
29
25
|
props: {
|
|
30
26
|
fileInfo: {
|
|
@@ -33,124 +29,81 @@ const j = { class: "preview__container" }, F = { class: "preview__block" }, O =
|
|
|
33
29
|
}
|
|
34
30
|
},
|
|
35
31
|
emits: ["reset"],
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
setup(e, { emit: v }) {
|
|
33
|
+
const p = b("chatAppId"), { getTheme: r } = B(p), s = e, I = v, a = g(!1), h = N(
|
|
34
|
+
() => !!s.fileInfo.previewUrl && (s.fileInfo.isImage || s.fileInfo.isVideo)
|
|
35
|
+
);
|
|
36
|
+
function w() {
|
|
37
|
+
a.value = !1;
|
|
40
38
|
}
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
})), a.value && a.value.addEventListener("loadedmetadata", () => {
|
|
53
|
-
a.value && (d.value = a.value.duration, (a.value.duration == 1 / 0 || Number.isNaN(a.value.duration)) && (a.value.currentTime = 1e101, a.value.addEventListener("timeupdate", () => {
|
|
54
|
-
a.value && (a.value.currentTime = 0, d.value = a.value.duration);
|
|
55
|
-
}, { once: !0 })));
|
|
56
|
-
});
|
|
57
|
-
}), (m, l) => (o(), n("div", j, [
|
|
58
|
-
i("div", F, [
|
|
59
|
-
t.fileInfo.isImage ? (o(), n("div", {
|
|
39
|
+
function y(f) {
|
|
40
|
+
const t = f.target;
|
|
41
|
+
t.currentTime === 0 && (t.currentTime = 0.1);
|
|
42
|
+
}
|
|
43
|
+
return (f, t) => (i(), l("div", x, [
|
|
44
|
+
h.value ? (i(), l("div", {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "preview__thumb",
|
|
47
|
+
onClick: t[0] || (t[0] = (k) => a.value = !0)
|
|
48
|
+
}, [
|
|
49
|
+
e.fileInfo.isImage ? (i(), l("img", {
|
|
60
50
|
key: 0,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
src: t.fileInfo.previewUrl,
|
|
66
|
-
alt: "Image Preview",
|
|
67
|
-
class: "preview__image"
|
|
68
|
-
}, null, 8, O),
|
|
69
|
-
l[3] || (l[3] = i("div", { class: "preview__shadow" }, [
|
|
70
|
-
i("span", { class: "pi pi-plus-circle" })
|
|
71
|
-
], -1))
|
|
72
|
-
])) : t.fileInfo.isVideo ? (o(), n("div", {
|
|
51
|
+
src: e.fileInfo.previewUrl,
|
|
52
|
+
alt: e.fileInfo.fileName,
|
|
53
|
+
class: "preview__thumb-media"
|
|
54
|
+
}, null, 8, z)) : e.fileInfo.isVideo ? (i(), l("video", {
|
|
73
55
|
key: 1,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
style: { "font-size": "1rem", margin: "auto" }
|
|
90
|
-
}, null, -1)),
|
|
91
|
-
i("audio", {
|
|
92
|
-
ref_key: "audio",
|
|
93
|
-
ref: e,
|
|
94
|
-
src: t.fileInfo.previewUrl
|
|
95
|
-
}, null, 8, H),
|
|
96
|
-
i("button", {
|
|
97
|
-
class: "preview__audio-control",
|
|
98
|
-
onClick: P
|
|
99
|
-
}, [
|
|
100
|
-
k(i("span", J, null, 512), [
|
|
101
|
-
[g, !u.value]
|
|
102
|
-
]),
|
|
103
|
-
k(i("span", K, null, 512), [
|
|
104
|
-
[g, u.value]
|
|
105
|
-
])
|
|
106
|
-
])
|
|
107
|
-
])) : (o(), n("div", Q, [...l[6] || (l[6] = [
|
|
108
|
-
i("span", {
|
|
109
|
-
class: "pi pi-file",
|
|
110
|
-
style: { "font-size": "2.5rem" }
|
|
111
|
-
}, null, -1)
|
|
112
|
-
])]))
|
|
113
|
-
]),
|
|
114
|
-
i("div", R, [
|
|
115
|
-
i("div", W, [
|
|
116
|
-
i("span", X, c(t.fileInfo.fileName), 1),
|
|
117
|
-
!t.fileInfo.isAudio && !t.fileInfo.isVideo ? (o(), n("span", Y, c(t.fileInfo.fileSize), 1)) : r("", !0),
|
|
118
|
-
t.fileInfo.isAudio ? (o(), n("span", Z, c(`${S.value} / ${y.value}`), 1)) : r("", !0),
|
|
119
|
-
t.fileInfo.isVideo ? (o(), n("span", ee, c(y.value), 1)) : r("", !0)
|
|
120
|
-
]),
|
|
121
|
-
i("div", ie, [
|
|
122
|
-
i("span", {
|
|
123
|
-
class: "pi pi-times",
|
|
124
|
-
onClick: l[2] || (l[2] = (f) => E("reset"))
|
|
125
|
-
})
|
|
126
|
-
])
|
|
56
|
+
src: e.fileInfo.previewUrl,
|
|
57
|
+
class: "preview__thumb-media",
|
|
58
|
+
muted: "",
|
|
59
|
+
playsinline: "",
|
|
60
|
+
preload: "metadata",
|
|
61
|
+
onLoadedmetadata: y
|
|
62
|
+
}, null, 40, F)) : o("", !0),
|
|
63
|
+
e.fileInfo.isVideo ? (i(), l("span", M)) : o("", !0)
|
|
64
|
+
])) : (i(), l("span", S)),
|
|
65
|
+
n("div", j, [
|
|
66
|
+
n("span", {
|
|
67
|
+
class: "preview__name",
|
|
68
|
+
title: e.fileInfo.fileName
|
|
69
|
+
}, c(e.fileInfo.fileName), 9, A),
|
|
70
|
+
e.fileInfo.fileSize ? (i(), l("span", E, c(e.fileInfo.fileSize), 1)) : o("", !0)
|
|
127
71
|
]),
|
|
128
|
-
(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
72
|
+
n("button", {
|
|
73
|
+
type: "button",
|
|
74
|
+
class: "preview__reset",
|
|
75
|
+
"aria-label": e.fileInfo.fileName,
|
|
76
|
+
onClick: t[1] || (t[1] = (k) => I("reset"))
|
|
77
|
+
}, [...t[2] || (t[2] = [
|
|
78
|
+
n("span", { class: "pi pi-times" }, null, -1)
|
|
79
|
+
])], 8, O),
|
|
80
|
+
(i(), m(V, { to: "body" }, [
|
|
81
|
+
C(T, { name: "modal-fade" }, {
|
|
82
|
+
default: d(() => [
|
|
83
|
+
a.value ? (i(), m(U, {
|
|
132
84
|
key: 0,
|
|
133
|
-
theme:
|
|
134
|
-
title:
|
|
135
|
-
onClose:
|
|
85
|
+
theme: u(r)().theme ? u(r)().theme : "light",
|
|
86
|
+
title: e.fileInfo.fileName,
|
|
87
|
+
onClose: w
|
|
136
88
|
}, {
|
|
137
|
-
default:
|
|
138
|
-
|
|
89
|
+
default: d(() => [
|
|
90
|
+
e.fileInfo.isVideo ? (i(), l("video", {
|
|
139
91
|
key: 0,
|
|
140
92
|
class: "preview__modal-video",
|
|
141
|
-
src:
|
|
93
|
+
src: e.fileInfo.previewUrl,
|
|
142
94
|
controls: "",
|
|
143
|
-
autoplay: ""
|
|
144
|
-
|
|
145
|
-
|
|
95
|
+
autoplay: "",
|
|
96
|
+
playsinline: ""
|
|
97
|
+
}, null, 8, P)) : o("", !0),
|
|
98
|
+
e.fileInfo.isImage ? (i(), l("img", {
|
|
146
99
|
key: 1,
|
|
147
100
|
class: "preview__modal-image",
|
|
148
|
-
src:
|
|
149
|
-
alt:
|
|
150
|
-
}, null, 8,
|
|
101
|
+
src: e.fileInfo.previewUrl,
|
|
102
|
+
alt: e.fileInfo.fileName
|
|
103
|
+
}, null, 8, $)) : o("", !0)
|
|
151
104
|
]),
|
|
152
105
|
_: 1
|
|
153
|
-
}, 8, ["theme", "title"])) :
|
|
106
|
+
}, 8, ["theme", "title"])) : o("", !0)
|
|
154
107
|
]),
|
|
155
108
|
_: 1
|
|
156
109
|
})
|
|
@@ -159,5 +112,5 @@ const j = { class: "preview__container" }, F = { class: "preview__block" }, O =
|
|
|
159
112
|
}
|
|
160
113
|
});
|
|
161
114
|
export {
|
|
162
|
-
|
|
115
|
+
ee as default
|
|
163
116
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FileUploader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0d65ea38"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { buildFilePreview as
|
|
3
|
-
import { uploadFile as
|
|
4
|
-
import { useMessageDraft as
|
|
1
|
+
import { defineComponent as H, ref as n, inject as S, computed as _, unref as U, watchEffect as L, watch as O, onMounted as $, onUnmounted as T, createElementBlock as w, openBlock as A, Fragment as R, createCommentVNode as X, createElementVNode as d, normalizeClass as q, createVNode as G } from "vue";
|
|
2
|
+
import { buildFilePreview as J } from "../../../hooks/uploadFile/generatePreview.js";
|
|
3
|
+
import { uploadFile as K } from "../../../hooks/uploadFile/uploadFile.js";
|
|
4
|
+
import { MAX_ATTACHED_FILES as D, useMessageDraft as Q, getDraftFiles as C } from "../../../hooks/useMessageDraft.js";
|
|
5
5
|
import "../../../hooks/useSearchModel.js";
|
|
6
6
|
import "../../../hooks/useTheme.js";
|
|
7
7
|
import "../../../hooks/useEmojiNative.js";
|
|
@@ -12,14 +12,14 @@ import "../../../locale/useLocale.js";
|
|
|
12
12
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
13
13
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
14
14
|
import "../../../functions/parseMarkdown.js";
|
|
15
|
-
import
|
|
16
|
-
const
|
|
15
|
+
import W from "./icons/FileUploaderIcon.vue.js";
|
|
16
|
+
const Y = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "file-uploader__status file-uploader__status--uploading"
|
|
19
|
-
},
|
|
19
|
+
}, Z = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "file-uploader__status file-uploader__status--error"
|
|
22
|
-
},
|
|
22
|
+
}, ee = ["disabled"], Fe = /* @__PURE__ */ H({
|
|
23
23
|
__name: "FileUploader",
|
|
24
24
|
props: {
|
|
25
25
|
filebumpUrl: {
|
|
@@ -29,111 +29,132 @@ const Q = {
|
|
|
29
29
|
state: {
|
|
30
30
|
type: String,
|
|
31
31
|
default: "active"
|
|
32
|
+
},
|
|
33
|
+
maxAttachedFiles: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: void 0
|
|
32
36
|
}
|
|
33
37
|
},
|
|
34
38
|
emits: ["fileUploaded"],
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
setup(v, { emit: te }) {
|
|
40
|
+
const s = v, r = n(""), a = n(), M = n();
|
|
41
|
+
M.value;
|
|
42
|
+
const u = S("chatAppId"), N = S("maxAttachedFiles", D), { addMessageFiles: V, getMessage: g, setRecordingMessage: E } = Q(u), F = _(() => {
|
|
43
|
+
const t = s.maxAttachedFiles;
|
|
44
|
+
if (typeof t == "number" && t > 0) return Math.floor(t);
|
|
45
|
+
const e = U(N);
|
|
46
|
+
return typeof e == "number" && e > 0 ? Math.floor(e) : D;
|
|
47
|
+
}), f = n("#5F5F5F"), p = n("#404040"), y = n(!1);
|
|
48
|
+
let c = null;
|
|
49
|
+
const h = () => {
|
|
50
|
+
if (!u) {
|
|
51
|
+
f.value = "#5F5F5F", p.value = "#404040";
|
|
43
52
|
return;
|
|
44
53
|
}
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
47
|
-
|
|
54
|
+
const t = document.getElementById(u);
|
|
55
|
+
if (!t) {
|
|
56
|
+
f.value = "#5F5F5F", p.value = "#404040";
|
|
48
57
|
return;
|
|
49
58
|
}
|
|
50
|
-
const e = window.getComputedStyle(
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
const e = window.getComputedStyle(t), l = e.getPropertyValue("--chotto-fileuploader-trigger-color").trim(), i = e.getPropertyValue("--chotto-fileuploader-trigger-hover-color").trim();
|
|
60
|
+
f.value = l || "#5F5F5F", p.value = i || "#404040";
|
|
61
|
+
}, B = _(() => y.value ? p.value : f.value);
|
|
62
|
+
L(() => {
|
|
63
|
+
h();
|
|
55
64
|
});
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
const m = _(() => C(g()).length < F.value), b = () => {
|
|
66
|
+
a.value && (a.value.value = "");
|
|
67
|
+
}, P = () => F.value - C(g()).length, I = async (t) => {
|
|
68
|
+
const e = t.slice(0, Math.max(0, P()));
|
|
69
|
+
if (e.length) {
|
|
70
|
+
r.value = "uploading", E(!0);
|
|
71
|
+
try {
|
|
72
|
+
const l = [];
|
|
73
|
+
for (const i of e) {
|
|
74
|
+
const o = await K(
|
|
75
|
+
typeof s.filebumpUrl == "string" ? s.filebumpUrl : null,
|
|
76
|
+
i
|
|
77
|
+
);
|
|
78
|
+
o.status == "success" ? l.push({
|
|
79
|
+
url: o.url,
|
|
80
|
+
name: o.name,
|
|
81
|
+
size: o.size,
|
|
82
|
+
type: o.type,
|
|
83
|
+
preview: J(o.name, o.preview)
|
|
84
|
+
}) : r.value = "error";
|
|
75
85
|
}
|
|
86
|
+
l.length ? (V(l, F.value), r.value !== "error" && (r.value = "success")) : r.value !== "error" && (r.value = "error");
|
|
87
|
+
} finally {
|
|
88
|
+
E(!1);
|
|
89
|
+
}
|
|
76
90
|
}
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
await
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
}, j = async () => {
|
|
92
|
+
var l;
|
|
93
|
+
const t = (l = a.value) == null ? void 0 : l.files, e = t ? Array.from(t) : [];
|
|
94
|
+
b(), await I(e);
|
|
95
|
+
}, z = () => {
|
|
96
|
+
a.value && m.value && s.state == "active" && (b(), a.value.click());
|
|
97
|
+
}, x = async (t) => {
|
|
98
|
+
var i;
|
|
99
|
+
if (!m.value || s.state !== "active") return;
|
|
100
|
+
const e = (i = t.clipboardData) == null ? void 0 : i.items;
|
|
101
|
+
if (!e) return;
|
|
102
|
+
const l = [];
|
|
103
|
+
for (const o of e)
|
|
104
|
+
if (o.type.indexOf("image") !== -1) {
|
|
105
|
+
const k = o.getAsFile();
|
|
106
|
+
k && l.push(k);
|
|
107
|
+
}
|
|
108
|
+
l.length && (t.preventDefault(), await I(l));
|
|
89
109
|
};
|
|
90
|
-
return
|
|
91
|
-
() =>
|
|
92
|
-
(
|
|
93
|
-
|
|
110
|
+
return O(
|
|
111
|
+
() => C(g()).length,
|
|
112
|
+
(t) => {
|
|
113
|
+
t || (r.value = "", b());
|
|
94
114
|
}
|
|
95
|
-
),
|
|
96
|
-
if (window.addEventListener("paste",
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
e.forEach((
|
|
100
|
-
|
|
115
|
+
), $(() => {
|
|
116
|
+
if (window.addEventListener("paste", x), h(), u) {
|
|
117
|
+
const t = document.getElementById(u);
|
|
118
|
+
t && (c = new MutationObserver((e) => {
|
|
119
|
+
e.forEach((l) => {
|
|
120
|
+
l.type === "attributes" && l.attributeName === "data-theme" && h();
|
|
101
121
|
});
|
|
102
|
-
}),
|
|
122
|
+
}), c.observe(t, {
|
|
103
123
|
attributes: !0,
|
|
104
124
|
attributeFilter: ["data-theme"]
|
|
105
125
|
}));
|
|
106
126
|
}
|
|
107
|
-
}),
|
|
108
|
-
window.removeEventListener("paste",
|
|
109
|
-
}), (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
])])) :
|
|
114
|
-
|
|
115
|
-
])])) :
|
|
116
|
-
|
|
127
|
+
}), T(() => {
|
|
128
|
+
window.removeEventListener("paste", x), c && (c.disconnect(), c = null);
|
|
129
|
+
}), (t, e) => (A(), w(R, null, [
|
|
130
|
+
r.value === "uploading" ? (A(), w("div", Y, [...e[2] || (e[2] = [
|
|
131
|
+
d("span", null, "Загрузка", -1),
|
|
132
|
+
d("span", null, "файла...", -1)
|
|
133
|
+
])])) : r.value === "error" ? (A(), w("div", Z, [...e[3] || (e[3] = [
|
|
134
|
+
d("span", null, "Ошибка при загрузке файла.", -1)
|
|
135
|
+
])])) : X("", !0),
|
|
136
|
+
d("span", {
|
|
117
137
|
ref_key: "triggerElement",
|
|
118
|
-
ref:
|
|
119
|
-
class:
|
|
120
|
-
disabled: !
|
|
121
|
-
onClick:
|
|
122
|
-
onMouseenter: e[0] || (e[0] = (
|
|
123
|
-
onMouseleave: e[1] || (e[1] = (
|
|
138
|
+
ref: M,
|
|
139
|
+
class: q(["file-uploader__trigger", { "file-uploader__disabled": !m.value || v.state == "disabled" }]),
|
|
140
|
+
disabled: !m.value || v.state == "disabled",
|
|
141
|
+
onClick: z,
|
|
142
|
+
onMouseenter: e[0] || (e[0] = (l) => y.value = !0),
|
|
143
|
+
onMouseleave: e[1] || (e[1] = (l) => y.value = !1)
|
|
124
144
|
}, [
|
|
125
|
-
|
|
126
|
-
], 42,
|
|
127
|
-
|
|
145
|
+
G(U(W), { fill: B.value }, null, 8, ["fill"])
|
|
146
|
+
], 42, ee),
|
|
147
|
+
d("input", {
|
|
128
148
|
ref_key: "fileInput",
|
|
129
|
-
ref:
|
|
149
|
+
ref: a,
|
|
130
150
|
style: { display: "none" },
|
|
131
151
|
type: "file",
|
|
132
|
-
|
|
152
|
+
multiple: "",
|
|
153
|
+
onChange: j
|
|
133
154
|
}, null, 544)
|
|
134
155
|
], 64));
|
|
135
156
|
}
|
|
136
157
|
});
|
|
137
158
|
export {
|
|
138
|
-
|
|
159
|
+
Fe as default
|
|
139
160
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ChatInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-9692636b"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|