@mobilon-dev/chotto 0.3.79 → 0.3.81
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/1_icons/MessageStatus/ErrorStatusIcon.vue.js +7 -0
- package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ErrorStatusIcon.vue2.js +5 -5
- package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +7 -0
- package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +7 -0
- package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ReadStatusIcon.vue2.js +1 -1
- package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +7 -0
- package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ReceivedStatusIcon.vue2.js +9 -9
- package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +7 -0
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +2 -2
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +132 -139
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +2 -2
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +5 -5
- package/dist/index.js +233 -223
- 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_chatlist_elements/ChatItem/styles/types.d.ts +6 -4
- package/dist/types/components/3_compounds/ChatInput/styles/types.d.ts +2 -0
- package/dist/types/components/index.d.ts +5 -0
- package/package.json +1 -1
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/ErrorStatusIcon.vue.js +0 -7
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/PendingStatusIcon.vue.js +0 -7
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/ReadStatusIcon.vue.js +0 -7
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/ReceivedStatusIcon.vue.js +0 -7
- package/dist/components/2_feed_elements/MessageStatusIndicator/icons/SentStatusIcon.vue.js +0 -7
- /package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/PendingStatusIcon.vue2.js +0 -0
- /package/dist/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/SentStatusIcon.vue2.js +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ErrorStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/PendingStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ReadStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/ReceivedStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/SentStatusIcon.vue.d.ts +0 -0
- /package/dist/types/components/{2_feed_elements/MessageStatusIndicator/icons → 1_icons/MessageStatus}/index.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as n, computed as C, createElementBlock as o, openBlock as l, normalizeStyle as c, normalizeClass as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as n, computed as C, createElementBlock as o, openBlock as l, normalizeStyle as c, normalizeClass as f, createStaticVNode as p } from "vue";
|
|
2
|
+
const d = /* @__PURE__ */ n({
|
|
3
3
|
name: "ErrorStatusIcon",
|
|
4
4
|
__name: "ErrorStatusIcon",
|
|
5
5
|
props: {
|
|
@@ -23,7 +23,7 @@ const f = /* @__PURE__ */ n({
|
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
25
|
return (e, r) => (l(), o("svg", {
|
|
26
|
-
class:
|
|
26
|
+
class: f(a.value),
|
|
27
27
|
style: c(s.value),
|
|
28
28
|
width: "16",
|
|
29
29
|
height: "16",
|
|
@@ -31,10 +31,10 @@ const f = /* @__PURE__ */ n({
|
|
|
31
31
|
fill: "none",
|
|
32
32
|
xmlns: "http://www.w3.org/2000/svg"
|
|
33
33
|
}, [...r[0] || (r[0] = [
|
|
34
|
-
|
|
34
|
+
p('<g clip-path="url(#clip0_7935_4)" data-v-44ff6442><path d="M8 15C6.14348 15 4.36301 14.2625 3.05025 12.9497C1.7375 11.637 1 9.85652 1 8C1 6.14348 1.7375 4.36301 3.05025 3.05025C4.36301 1.7375 6.14348 1 8 1C9.85652 1 11.637 1.7375 12.9497 3.05025C14.2625 4.36301 15 6.14348 15 8C15 9.85652 14.2625 11.637 12.9497 12.9497C11.637 14.2625 9.85652 15 8 15ZM8 16C10.1217 16 12.1566 15.1571 13.6569 13.6569C15.1571 12.1566 16 10.1217 16 8C16 5.87827 15.1571 3.84344 13.6569 2.34315C12.1566 0.842855 10.1217 0 8 0C5.87827 0 3.84344 0.842855 2.34315 2.34315C0.842855 3.84344 0 5.87827 0 8C0 10.1217 0.842855 12.1566 2.34315 13.6569C3.84344 15.1571 5.87827 16 8 16Z" fill="currentColor" data-v-44ff6442></path><path d="M7.00195 11.0011C7.00195 10.8698 7.02782 10.7397 7.07807 10.6184C7.12833 10.4971 7.20199 10.3868 7.29485 10.294C7.38771 10.2011 7.49794 10.1275 7.61927 10.0772C7.7406 10.027 7.87063 10.0011 8.00195 10.0011C8.13328 10.0011 8.26331 10.027 8.38464 10.0772C8.50596 10.1275 8.6162 10.2011 8.70906 10.294C8.80192 10.3868 8.87558 10.4971 8.92583 10.6184C8.97609 10.7397 9.00195 10.8698 9.00195 11.0011C9.00195 11.2663 8.8966 11.5207 8.70906 11.7082C8.52152 11.8957 8.26717 12.0011 8.00195 12.0011C7.73674 12.0011 7.48238 11.8957 7.29485 11.7082C7.10731 11.5207 7.00195 11.2663 7.00195 11.0011ZM7.09995 4.99609C7.08664 4.86993 7.09999 4.74239 7.13915 4.62172C7.17831 4.50106 7.24241 4.38998 7.32727 4.29568C7.41214 4.20139 7.51588 4.12599 7.63176 4.07438C7.74765 4.02276 7.87309 3.99609 7.99995 3.99609C8.12681 3.99609 8.25226 4.02276 8.36814 4.07438C8.48403 4.12599 8.58777 4.20139 8.67263 4.29568C8.7575 4.38998 8.82159 4.50106 8.86075 4.62172C8.89991 4.74239 8.91327 4.86993 8.89995 4.99609L8.54995 8.50309C8.53819 8.64087 8.47516 8.76921 8.37331 8.86273C8.27146 8.95625 8.13823 9.00815 7.99995 9.00815C7.86168 9.00815 7.72844 8.95625 7.6266 8.86273C7.52475 8.76921 7.46171 8.64087 7.44995 8.50309L7.09995 4.99609Z" fill="currentColor" data-v-44ff6442></path></g><defs data-v-44ff6442><clipPath id="clip0_7935_4" data-v-44ff6442><rect width="16" height="16" fill="white" data-v-44ff6442></rect></clipPath></defs>', 2)
|
|
35
35
|
])], 6));
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
d as default
|
|
40
40
|
};
|
|
@@ -31,7 +31,7 @@ const h = /* @__PURE__ */ c({
|
|
|
31
31
|
fill: "none",
|
|
32
32
|
xmlns: "http://www.w3.org/2000/svg"
|
|
33
33
|
}, [...a[0] || (a[0] = [
|
|
34
|
-
d('<g clip-path="url(#clip0_8155_1633)" data-v-
|
|
34
|
+
d('<g clip-path="url(#clip0_8155_1633)" data-v-e13c479a><path d="M15.4433 5.44329C15.5014 5.38518 15.5475 5.31619 15.5789 5.24027C15.6104 5.16434 15.6266 5.08297 15.6266 5.00079C15.6266 4.91861 15.6104 4.83723 15.5789 4.76131C15.5475 4.68539 15.5014 4.6164 15.4433 4.55829C15.3852 4.50018 15.3162 4.45408 15.2403 4.42264C15.1643 4.39119 15.083 4.375 15.0008 4.375C14.9186 4.375 14.8372 4.39119 14.7613 4.42264C14.6854 4.45408 14.6164 4.50018 14.5583 4.55829L6.25079 12.867L2.31829 8.93329C2.26018 8.87518 2.19119 8.82908 2.11527 8.79763C2.03934 8.76619 1.95797 8.75 1.87579 8.75C1.70982 8.75 1.55065 8.81593 1.43329 8.93329C1.31593 9.05065 1.25 9.20982 1.25 9.37579C1.25 9.54176 1.31593 9.70093 1.43329 9.81829L5.80829 14.1933C5.86635 14.2515 5.93532 14.2977 6.01125 14.3292C6.08718 14.3607 6.16858 14.3769 6.25079 14.3769C6.333 14.3769 6.4144 14.3607 6.49033 14.3292C6.56626 14.2977 6.63523 14.2515 6.69329 14.1933L15.4433 5.44329ZM10.1833 14.1933L9.06329 13.072L9.94704 12.1883L10.6258 12.867L18.9333 4.55829C19.0506 4.44093 19.2098 4.375 19.3758 4.375C19.5418 4.375 19.7009 4.44093 19.8183 4.55829C19.9356 4.67565 20.0016 4.83482 20.0016 5.00079C20.0016 5.16676 19.9356 5.32593 19.8183 5.44329L11.0683 14.1933C11.0102 14.2515 10.9413 14.2977 10.8653 14.3292C10.7894 14.3607 10.708 14.3769 10.6258 14.3769C10.5436 14.3769 10.4622 14.3607 10.3862 14.3292C10.3103 14.2977 10.2413 14.2515 10.1833 14.1933Z" fill="currentColor" data-v-e13c479a></path><path d="M6.69329 8.93329L7.81329 10.0545L6.92954 10.9383L5.80829 9.81829C5.69093 9.70093 5.625 9.54176 5.625 9.37579C5.625 9.20982 5.69093 9.05065 5.80829 8.93329C5.92565 8.81593 6.08482 8.75 6.25079 8.75C6.41676 8.75 6.57593 8.81593 6.69329 8.93329Z" fill="currentColor" data-v-e13c479a></path></g><defs data-v-e13c479a><clipPath id="clip0_8155_1633" data-v-e13c479a><rect width="20" height="20" fill="white" data-v-e13c479a></rect></clipPath></defs>', 2)
|
|
35
35
|
])], 6));
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as n, computed as i, createElementBlock as l, openBlock as C, normalizeStyle as o, normalizeClass as p, createStaticVNode as d } from "vue";
|
|
2
|
+
const f = /* @__PURE__ */ n({
|
|
3
3
|
name: "ReceivedStatusIcon",
|
|
4
4
|
__name: "ReceivedStatusIcon",
|
|
5
5
|
props: {
|
|
@@ -12,8 +12,8 @@ const h = /* @__PURE__ */ l({
|
|
|
12
12
|
default: ""
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const e =
|
|
15
|
+
setup(c) {
|
|
16
|
+
const e = c, s = i(() => `status-icon status-icon--received ${e.class}`.trim()), r = i(() => {
|
|
17
17
|
if (e.size === "inherit")
|
|
18
18
|
return {};
|
|
19
19
|
const t = typeof e.size == "number" ? `${e.size}px` : e.size;
|
|
@@ -22,19 +22,19 @@ const h = /* @__PURE__ */ l({
|
|
|
22
22
|
height: t
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
|
-
return (t, a) => (
|
|
26
|
-
class: p(
|
|
27
|
-
style:
|
|
25
|
+
return (t, a) => (C(), l("svg", {
|
|
26
|
+
class: p(s.value),
|
|
27
|
+
style: o(r.value),
|
|
28
28
|
width: "20",
|
|
29
29
|
height: "20",
|
|
30
30
|
viewBox: "0 0 20 20",
|
|
31
31
|
fill: "none",
|
|
32
32
|
xmlns: "http://www.w3.org/2000/svg"
|
|
33
33
|
}, [...a[0] || (a[0] = [
|
|
34
|
-
d('<g clip-path="url(#clip0_7951_852)" data-v-
|
|
34
|
+
d('<g clip-path="url(#clip0_7951_852)" data-v-f32ac6e1><path d="M15.4423 5.44329C15.5004 5.38518 15.5465 5.31619 15.578 5.24027C15.6094 5.16434 15.6256 5.08297 15.6256 5.00079C15.6256 4.91861 15.6094 4.83723 15.578 4.76131C15.5465 4.68539 15.5004 4.6164 15.4423 4.55829C15.3842 4.50018 15.3152 4.45408 15.2393 4.42264C15.1634 4.39119 15.082 4.375 14.9998 4.375C14.9176 4.375 14.8363 4.39119 14.7603 4.42264C14.6844 4.45408 14.6154 4.50018 14.5573 4.55829L6.24981 12.867L2.31731 8.93329C2.2592 8.87518 2.19022 8.82908 2.11429 8.79764C2.03837 8.76619 1.95699 8.75 1.87481 8.75C1.70884 8.75 1.54967 8.81593 1.43231 8.93329C1.31495 9.05065 1.24902 9.20982 1.24902 9.37579C1.24902 9.54176 1.31495 9.70093 1.43231 9.81829L5.80731 14.1933C5.86537 14.2515 5.93434 14.2977 6.01027 14.3292C6.0862 14.3607 6.1676 14.3769 6.24981 14.3769C6.33202 14.3769 6.41342 14.3607 6.48936 14.3292C6.56529 14.2977 6.63426 14.2515 6.69231 14.1933L15.4423 5.44329ZM10.1823 14.1933L9.06231 13.072L9.94606 12.1883L10.6248 12.867L18.9323 4.55829C19.0497 4.44093 19.2088 4.375 19.3748 4.375C19.5408 4.375 19.7 4.44093 19.8173 4.55829C19.9347 4.67565 20.0006 4.83482 20.0006 5.00079C20.0006 5.16676 19.9347 5.32593 19.8173 5.44329L11.0673 14.1933C11.0093 14.2515 10.9403 14.2977 10.8644 14.3292C10.7884 14.3607 10.707 14.3769 10.6248 14.3769C10.5426 14.3769 10.4612 14.3607 10.3853 14.3292C10.3093 14.2977 10.2404 14.2515 10.1823 14.1933Z" fill="currentColor" data-v-f32ac6e1></path><path d="M6.69231 8.93329L7.81231 10.0545L6.92856 10.9383L5.80731 9.81829C5.68995 9.70093 5.62402 9.54176 5.62402 9.37579C5.62402 9.20982 5.68995 9.05065 5.80731 8.93329C5.92467 8.81593 6.08384 8.75 6.24981 8.75C6.41578 8.75 6.57495 8.81593 6.69231 8.93329Z" fill="currentColor" data-v-f32ac6e1></path></g><defs data-v-f32ac6e1><clipPath id="clip0_7951_852" data-v-f32ac6e1><rect width="20" height="20" fill="white" data-v-f32ac6e1></rect></clipPath></defs>', 2)
|
|
35
35
|
])], 6));
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
f as default
|
|
40
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ChatItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-36147cda"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ht, inject as ft, useId as gt, ref as I, computed as p, watch as yt, onMounted as vt, nextTick as B, onUnmounted as pt, createElementBlock as s, openBlock as o, createElementVNode as r, createCommentVNode as l, withModifiers as kt, normalizeClass as b, normalizeStyle as W, createVNode as A, withCtx as V, toDisplayString as f, createBlock as m, resolveDynamicComponent as xt, Teleport as _t, unref as d, Fragment as Ct, renderList as wt } from "vue";
|
|
2
2
|
import { getStatus as It, statuses as Tt } from "../../../functions/getStatusMessage.js";
|
|
3
3
|
import "../../../functions/parseMarkdown.js";
|
|
4
4
|
import { t as U } from "../../../locale/useLocale.js";
|
|
@@ -9,59 +9,55 @@ import { useTheme as Mt } from "../../../hooks/useTheme.js";
|
|
|
9
9
|
/* empty css */
|
|
10
10
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
11
11
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
12
|
-
import
|
|
12
|
+
import $ from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
13
13
|
import Et from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import Ut from "
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
|
|
14
|
+
import St from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
|
|
15
|
+
import Bt from "../../1_icons/AvatarIcon.vue.js";
|
|
16
|
+
import bt from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
|
|
17
|
+
import At from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
|
|
18
|
+
import Vt from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
|
|
19
|
+
import Ut from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
|
|
20
|
+
import Lt from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
|
|
21
|
+
import Dt from "./icons/AudioIcon.vue.js";
|
|
22
|
+
import Nt from "./icons/FileIcon.vue.js";
|
|
23
|
+
import Rt from "./icons/ImageIcon.vue.js";
|
|
24
|
+
import Xt from "./icons/MissedCallIcon.vue.js";
|
|
25
|
+
import z from "./icons/StickerIcon.vue.js";
|
|
26
|
+
import Yt from "./icons/VideoIcon.vue.js";
|
|
27
|
+
import Ft from "./icons/VoiceIcon.vue.js";
|
|
28
|
+
const Ht = { class: "chat-item__avatar-container" }, Wt = ["src"], $t = {
|
|
24
29
|
key: 1,
|
|
25
30
|
class: "chat-item__avatar-placeholder"
|
|
26
|
-
},
|
|
31
|
+
}, zt = { class: "chat-item__info-container" }, Ot = { class: "chat-item__name" }, qt = {
|
|
27
32
|
key: 0,
|
|
28
33
|
class: "chat-item__last-message"
|
|
29
|
-
},
|
|
34
|
+
}, Pt = { class: "chat-item__last-message-text" }, Gt = { class: "chat-item__details-container" }, Jt = {
|
|
30
35
|
key: 0,
|
|
31
36
|
class: "chat-item__time"
|
|
32
|
-
},
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "pi pi-clock"
|
|
35
|
-
}, Gt = {
|
|
36
|
-
key: 1,
|
|
37
|
-
class: "pi pi-exclamation-circle"
|
|
38
|
-
}, Jt = {
|
|
39
|
-
key: 0,
|
|
40
|
-
class: "pi pi-check"
|
|
41
|
-
}, Kt = {
|
|
37
|
+
}, Kt = { class: "chat-item__status-unread-container" }, Qt = {
|
|
42
38
|
key: 1,
|
|
43
39
|
class: "chat-item__unread"
|
|
44
|
-
},
|
|
40
|
+
}, Zt = {
|
|
45
41
|
key: 2,
|
|
46
42
|
class: "chat-item__status-chat-container"
|
|
47
|
-
},
|
|
43
|
+
}, jt = {
|
|
48
44
|
key: 0,
|
|
49
45
|
class: "chat-item__fixed pi pi-thumbtack"
|
|
50
|
-
},
|
|
46
|
+
}, te = {
|
|
51
47
|
key: 0,
|
|
52
48
|
id: "noSelectButton",
|
|
53
49
|
class: "chat-item__menu-button"
|
|
54
|
-
},
|
|
50
|
+
}, ee = {
|
|
55
51
|
key: 1,
|
|
56
52
|
id: "noSelectButton",
|
|
57
53
|
class: "chat-item__menu-button"
|
|
58
|
-
},
|
|
54
|
+
}, ne = {
|
|
59
55
|
key: 0,
|
|
60
56
|
class: "dialog__container"
|
|
61
|
-
},
|
|
57
|
+
}, ie = ["onClick"], oe = ["src"], ce = {
|
|
62
58
|
key: 1,
|
|
63
59
|
class: "dialog__icon pi pi-user"
|
|
64
|
-
},
|
|
60
|
+
}, se = { class: "dialog__text-container" }, ae = { class: "dialog__name" }, re = { class: "dialog__time" }, Ne = /* @__PURE__ */ ht({
|
|
65
61
|
__name: "ChatItem",
|
|
66
62
|
props: {
|
|
67
63
|
chat: {},
|
|
@@ -69,27 +65,27 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
69
65
|
contextMenuTrigger: { default: "hover" }
|
|
70
66
|
},
|
|
71
67
|
emits: ["select", "action", "expand"],
|
|
72
|
-
setup(c, { emit:
|
|
73
|
-
const
|
|
68
|
+
setup(c, { emit: O }) {
|
|
69
|
+
const q = ft("chatAppId"), { getTheme: L } = Mt(q), e = c, T = O, g = gt(), y = I(!1), k = I(!1), E = I(!1), P = I(null), G = () => {
|
|
74
70
|
E.value = !0;
|
|
75
|
-
},
|
|
76
|
-
E.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" &&
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
e.contextMenuTrigger === "rightClick" &&
|
|
81
|
-
},
|
|
82
|
-
const t = document.getElementById("context-menu-rightclick-" +
|
|
83
|
-
t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"),
|
|
84
|
-
},
|
|
71
|
+
}, J = (t) => {
|
|
72
|
+
E.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && T("select", { chat: e.chat, dialog: null }), E.value = !1;
|
|
73
|
+
}, K = (t) => {
|
|
74
|
+
T("select", { chat: e.chat, dialog: t });
|
|
75
|
+
}, Q = () => e.chat.isSelected ? "chat-item__selected" : "", Z = (t) => t.isSelected ? "dialog__selected" : "", D = (t) => {
|
|
76
|
+
e.contextMenuTrigger === "rightClick" && S(), T("action", { chat: e.chat, ...t });
|
|
77
|
+
}, S = () => {
|
|
78
|
+
const t = document.getElementById("context-menu-rightclick-" + g);
|
|
79
|
+
t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), k.value = !1;
|
|
80
|
+
}, j = () => {
|
|
85
81
|
document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((n) => {
|
|
86
82
|
const i = n;
|
|
87
|
-
i.id !== "context-menu-rightclick-" +
|
|
83
|
+
i.id !== "context-menu-rightclick-" + g && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
|
|
88
84
|
});
|
|
89
|
-
},
|
|
90
|
-
let
|
|
91
|
-
const
|
|
92
|
-
var u, a,
|
|
85
|
+
}, tt = () => e.chat.dialogs ? [...e.chat.dialogs].sort((t, n) => Number(t["lastActivity.timestamp"]) > Number(n["lastActivity.timestamp"]) ? -1 : Number(t["lastActivity.timestamp"]) < Number(n["lastActivity.timestamp"]) ? 1 : (Number(t["lastActivity.timestamp"]) == Number(n["lastActivity.timestamp"]), 0)) : [], et = p(() => It(e.chat["lastMessage.status"])), nt = p(() => e.chat.showEmptyIndicator || e.chat.countUnread > 0), it = p(() => e.chat.countUnread > 0 ? e.chat.countUnread > 99 ? "99+" : e.chat.countUnread : e.chat.showEmptyIndicator ? "" : void 0);
|
|
86
|
+
let M;
|
|
87
|
+
const v = I(0), N = [U("component.ChatItem.typing") + ".", U("component.ChatItem.typing") + "..", U("component.ChatItem.typing") + "..."], R = (t) => {
|
|
88
|
+
var u, a, h;
|
|
93
89
|
if (typeof t == "string")
|
|
94
90
|
return t;
|
|
95
91
|
if ((t == null ? void 0 : t.type) === "message.sticker")
|
|
@@ -101,90 +97,90 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
101
97
|
const n = (a = t == null ? void 0 : t.data) == null ? void 0 : a.text;
|
|
102
98
|
if (n)
|
|
103
99
|
return n;
|
|
104
|
-
const i = (
|
|
100
|
+
const i = (h = t == null ? void 0 : t.data) == null ? void 0 : h.filename;
|
|
105
101
|
return i || "";
|
|
106
|
-
},
|
|
102
|
+
}, ot = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, X = p(() => {
|
|
107
103
|
var n, i, u;
|
|
108
104
|
if (e.chat.typing)
|
|
109
105
|
return null;
|
|
110
|
-
const t =
|
|
106
|
+
const t = ot(e.chat.lastMessage);
|
|
111
107
|
if (!t)
|
|
112
108
|
return null;
|
|
113
109
|
if (t === "message.sticker")
|
|
114
|
-
return
|
|
110
|
+
return z;
|
|
115
111
|
if (t === "message.image")
|
|
116
|
-
return
|
|
112
|
+
return Rt;
|
|
117
113
|
if (t === "message.video")
|
|
118
|
-
return
|
|
114
|
+
return Yt;
|
|
119
115
|
if (t === "message.audio") {
|
|
120
116
|
const a = e.chat.lastMessage;
|
|
121
|
-
return (a.isVoiceMessage || ((n = a == null ? void 0 : a.data) == null ? void 0 : n.isVoiceMessage)) === !0 ?
|
|
117
|
+
return (a.isVoiceMessage || ((n = a == null ? void 0 : a.data) == null ? void 0 : n.isVoiceMessage)) === !0 ? Ft : Dt;
|
|
122
118
|
}
|
|
123
119
|
if (t === "message.missedCall")
|
|
124
|
-
return
|
|
120
|
+
return Xt;
|
|
125
121
|
if (t === "message.file") {
|
|
126
|
-
const a = e.chat.lastMessage,
|
|
127
|
-
return
|
|
122
|
+
const a = e.chat.lastMessage, h = ((u = (i = a == null ? void 0 : a.data) == null ? void 0 : i.filename) == null ? void 0 : u.toLowerCase()) || "";
|
|
123
|
+
return h.endsWith(".tgs") || h.endsWith(".webp") ? z : Nt;
|
|
128
124
|
}
|
|
129
125
|
return null;
|
|
130
|
-
}),
|
|
131
|
-
|
|
126
|
+
}), ct = p(() => e.chat.typing ? N[v.value] : R(e.chat.lastMessage)), st = p(() => e.chat.typing ? N[v.value] : R(e.chat.lastMessage));
|
|
127
|
+
yt(
|
|
132
128
|
() => e.chat.typing,
|
|
133
129
|
() => {
|
|
134
|
-
e.chat.typing ?
|
|
135
|
-
|
|
136
|
-
}, 1e3) : (
|
|
130
|
+
e.chat.typing ? M = setInterval(() => {
|
|
131
|
+
v.value < 2 ? v.value += 1 : v.value = 0;
|
|
132
|
+
}, 1e3) : (v.value = 0, M && (clearInterval(M), M = void 0));
|
|
137
133
|
},
|
|
138
134
|
{ immediate: !0 }
|
|
139
135
|
);
|
|
140
|
-
const
|
|
141
|
-
e.contextMenuTrigger === "hover" && (
|
|
136
|
+
const at = () => {
|
|
137
|
+
e.contextMenuTrigger === "hover" && (y.value = !0);
|
|
138
|
+
}, rt = (t) => {
|
|
139
|
+
e.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? y.value = !0 : y.value = !1);
|
|
142
140
|
}, lt = (t) => {
|
|
143
|
-
e.contextMenuTrigger === "
|
|
141
|
+
e.contextMenuTrigger === "rightClick" && e.chat.actions && ut(t);
|
|
144
142
|
}, ut = (t) => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
tt(), p.value = !0, b(() => {
|
|
148
|
-
const n = document.getElementById("context-menu-rightclick-" + h);
|
|
143
|
+
j(), k.value = !0, B(() => {
|
|
144
|
+
const n = document.getElementById("context-menu-rightclick-" + g);
|
|
149
145
|
if (n) {
|
|
150
146
|
const i = t.clientX, u = t.clientY;
|
|
151
147
|
n.style.display = "inherit";
|
|
152
148
|
const a = n.getBoundingClientRect();
|
|
153
|
-
n.style.display = "none",
|
|
154
|
-
const
|
|
155
|
-
let
|
|
156
|
-
|
|
149
|
+
n.style.display = "none", B(() => {
|
|
150
|
+
const h = window.innerWidth, H = window.innerHeight, x = window.scrollX || window.pageXOffset, _ = window.scrollY || window.pageYOffset;
|
|
151
|
+
let C = i + x, w = u + _;
|
|
152
|
+
C + a.width > h + x && (C = i + x - a.width), w + a.height > H + _ && (w = u + _ - a.height), C < x && (C = x), w < _ && (w = _), n.style.top = w + "px", n.style.left = C + "px", n.style.opacity = "1", n.style.display = "inherit";
|
|
157
153
|
});
|
|
158
154
|
}
|
|
159
155
|
});
|
|
160
156
|
}, mt = () => {
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
if (e.contextMenuTrigger === "rightClick" &&
|
|
164
|
-
const n = t.target, i = document.getElementById("context-menu-rightclick-" +
|
|
165
|
-
(!i || !i.contains(n)) &&
|
|
157
|
+
}, dt = () => {
|
|
158
|
+
}, Y = (t) => {
|
|
159
|
+
if (e.contextMenuTrigger === "rightClick" && k.value) {
|
|
160
|
+
const n = t.target, i = document.getElementById("context-menu-rightclick-" + g);
|
|
161
|
+
(!i || !i.contains(n)) && S();
|
|
166
162
|
}
|
|
167
|
-
},
|
|
168
|
-
e.contextMenuTrigger === "rightClick" &&
|
|
163
|
+
}, F = () => {
|
|
164
|
+
e.contextMenuTrigger === "rightClick" && k.value && S();
|
|
169
165
|
};
|
|
170
166
|
return vt(() => {
|
|
171
|
-
e.contextMenuTrigger === "rightClick" && (document.addEventListener("click",
|
|
172
|
-
const t = document.getElementById("context-menu-rightclick-" +
|
|
167
|
+
e.contextMenuTrigger === "rightClick" && (document.addEventListener("click", Y), window.addEventListener("scroll", F, !0), B(() => {
|
|
168
|
+
const t = document.getElementById("context-menu-rightclick-" + g);
|
|
173
169
|
t && (t.style.display = "none", t.style.opacity = "0");
|
|
174
170
|
}));
|
|
175
|
-
}),
|
|
176
|
-
document.removeEventListener("click",
|
|
171
|
+
}), pt(() => {
|
|
172
|
+
document.removeEventListener("click", Y), window.removeEventListener("scroll", F, !0);
|
|
177
173
|
}), (t, n) => (o(), s("div", null, [
|
|
178
174
|
r("div", {
|
|
179
175
|
ref_key: "containerRef",
|
|
180
|
-
ref:
|
|
181
|
-
class:
|
|
182
|
-
onMouseenter:
|
|
183
|
-
onMouseleave:
|
|
184
|
-
onClick:
|
|
185
|
-
onContextmenu:
|
|
176
|
+
ref: P,
|
|
177
|
+
class: b(["chat-item__container", Q()]),
|
|
178
|
+
onMouseenter: at,
|
|
179
|
+
onMouseleave: rt,
|
|
180
|
+
onClick: J,
|
|
181
|
+
onContextmenu: kt(lt, ["prevent"])
|
|
186
182
|
}, [
|
|
187
|
-
r("div",
|
|
183
|
+
r("div", Ht, [
|
|
188
184
|
r("span", {
|
|
189
185
|
class: "chat-item__status-user",
|
|
190
186
|
style: W({ backgroundColor: e.chat.status })
|
|
@@ -194,91 +190,88 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
194
190
|
src: e.chat.avatar,
|
|
195
191
|
height: "48",
|
|
196
192
|
width: "48"
|
|
197
|
-
}, null, 8,
|
|
198
|
-
|
|
193
|
+
}, null, 8, Wt)) : (o(), s("div", $t, [
|
|
194
|
+
A(Bt)
|
|
199
195
|
]))
|
|
200
196
|
]),
|
|
201
|
-
r("div",
|
|
202
|
-
|
|
197
|
+
r("div", zt, [
|
|
198
|
+
A($, {
|
|
203
199
|
text: c.chat.name,
|
|
204
200
|
position: "bottom"
|
|
205
201
|
}, {
|
|
206
|
-
default:
|
|
207
|
-
r("div",
|
|
202
|
+
default: V(() => [
|
|
203
|
+
r("div", Ot, f(c.chat.name), 1)
|
|
208
204
|
]),
|
|
209
205
|
_: 1
|
|
210
206
|
}, 8, ["text"]),
|
|
211
|
-
|
|
212
|
-
text:
|
|
207
|
+
A($, {
|
|
208
|
+
text: ct.value,
|
|
213
209
|
position: "bottom"
|
|
214
210
|
}, {
|
|
215
|
-
default:
|
|
216
|
-
c.chat.lastMessage || c.chat.typing ? (o(), s("div",
|
|
217
|
-
|
|
211
|
+
default: V(() => [
|
|
212
|
+
c.chat.lastMessage || c.chat.typing ? (o(), s("div", qt, [
|
|
213
|
+
X.value ? (o(), m(xt(X.value), {
|
|
218
214
|
key: 0,
|
|
219
215
|
class: "chat-item__message-icon"
|
|
220
216
|
})) : l("", !0),
|
|
221
|
-
r("span",
|
|
217
|
+
r("span", Pt, f(st.value), 1)
|
|
222
218
|
])) : l("", !0)
|
|
223
219
|
]),
|
|
224
220
|
_: 1
|
|
225
221
|
}, 8, ["text"])
|
|
226
222
|
]),
|
|
227
|
-
r("div",
|
|
228
|
-
c.chat["lastActivity.time"] && (!c.chat.actions || !
|
|
229
|
-
|
|
223
|
+
r("div", Gt, [
|
|
224
|
+
c.chat["lastActivity.time"] && (!c.chat.actions || !y.value) ? (o(), s("div", Jt, f(c.chat["lastActivity.time"]), 1)) : l("", !0),
|
|
225
|
+
y.value && c.chat.actions && c.contextMenuTrigger === "hover" ? (o(), m(Et, {
|
|
230
226
|
key: 1,
|
|
231
227
|
mode: "click",
|
|
232
228
|
"menu-side": "bottom-right",
|
|
233
229
|
actions: c.chat.actions,
|
|
234
230
|
onClick: D,
|
|
235
|
-
onButtonClick:
|
|
236
|
-
onMenuMouseLeave: n[0] || (n[0] = (i) =>
|
|
231
|
+
onButtonClick: G,
|
|
232
|
+
onMenuMouseLeave: n[0] || (n[0] = (i) => y.value = !1)
|
|
237
233
|
}, {
|
|
238
|
-
default:
|
|
234
|
+
default: V(() => [...n[2] || (n[2] = [
|
|
239
235
|
r("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
|
|
240
236
|
])]),
|
|
241
237
|
_: 1
|
|
242
238
|
}, 8, ["actions"])) : l("", !0),
|
|
243
|
-
(o(),
|
|
244
|
-
c.contextMenuTrigger === "rightClick" && c.chat.actions &&
|
|
239
|
+
(o(), m(_t, { to: "body" }, [
|
|
240
|
+
c.contextMenuTrigger === "rightClick" && c.chat.actions && k.value ? (o(), m(St, {
|
|
245
241
|
key: 0,
|
|
246
|
-
id: "context-menu-rightclick-" +
|
|
242
|
+
id: "context-menu-rightclick-" + d(g),
|
|
247
243
|
actions: c.chat.actions,
|
|
248
|
-
"data-theme":
|
|
244
|
+
"data-theme": d(L)().theme ? d(L)().theme : "light",
|
|
249
245
|
onClick: D,
|
|
250
246
|
onMouseenter: mt,
|
|
251
|
-
onMouseleave:
|
|
247
|
+
onMouseleave: dt
|
|
252
248
|
}, null, 8, ["id", "actions", "data-theme"])) : l("", !0)
|
|
253
249
|
])),
|
|
254
|
-
r("div",
|
|
255
|
-
|
|
250
|
+
r("div", Kt, [
|
|
251
|
+
d(Tt).includes(c.chat["lastMessage.status"]) ? (o(), s("div", {
|
|
256
252
|
key: 0,
|
|
257
|
-
class:
|
|
253
|
+
class: b(["chat-item__status-message", et.value])
|
|
258
254
|
}, [
|
|
259
|
-
c.chat["lastMessage.status"] === "pending" ? (o(),
|
|
260
|
-
c.chat["lastMessage.status"] !== "sent" ? (o(), s("span", Jt)) : l("", !0),
|
|
261
|
-
n[3] || (n[3] = r("span", { class: "pi pi-check" }, null, -1))
|
|
262
|
-
], 64))
|
|
255
|
+
c.chat["lastMessage.status"] === "pending" ? (o(), m(d(At), { key: 0 })) : c.chat["lastMessage.status"] === "error" ? (o(), m(d(bt), { key: 1 })) : c.chat["lastMessage.status"] === "read" ? (o(), m(d(Vt), { key: 2 })) : c.chat["lastMessage.status"] === "received" ? (o(), m(d(Ut), { key: 3 })) : (o(), m(d(Lt), { key: 4 }))
|
|
263
256
|
], 2)) : l("", !0),
|
|
264
|
-
|
|
257
|
+
nt.value ? (o(), s("div", Qt, f(it.value), 1)) : l("", !0)
|
|
265
258
|
]),
|
|
266
|
-
c.chat.countUnread < 1 ? (o(), s("div",
|
|
267
|
-
c.chat.isFixedTop || c.chat.isFixedBottom ? (o(), s("span",
|
|
259
|
+
c.chat.countUnread < 1 ? (o(), s("div", Zt, [
|
|
260
|
+
c.chat.isFixedTop || c.chat.isFixedBottom ? (o(), s("span", jt)) : l("", !0)
|
|
268
261
|
])) : l("", !0)
|
|
269
262
|
]),
|
|
270
263
|
e.showDialogs && c.chat.dialogs ? (o(), s("div", {
|
|
271
264
|
key: 0,
|
|
272
265
|
class: "chat-item__dialog-buttons",
|
|
273
|
-
onClick: n[1] || (n[1] = (i) =>
|
|
266
|
+
onClick: n[1] || (n[1] = (i) => T("expand", e.chat))
|
|
274
267
|
}, [
|
|
275
|
-
e.showDialogs && !c.chat.dialogsExpanded ? (o(), s("button",
|
|
268
|
+
e.showDialogs && !c.chat.dialogsExpanded ? (o(), s("button", te, [...n[3] || (n[3] = [
|
|
276
269
|
r("span", {
|
|
277
270
|
id: "noSelectButton",
|
|
278
271
|
class: "pi pi-angle-down"
|
|
279
272
|
}, null, -1)
|
|
280
273
|
])])) : l("", !0),
|
|
281
|
-
e.showDialogs && c.chat.dialogsExpanded ? (o(), s("button",
|
|
274
|
+
e.showDialogs && c.chat.dialogsExpanded ? (o(), s("button", ee, [...n[4] || (n[4] = [
|
|
282
275
|
r("span", {
|
|
283
276
|
id: "noSelectButton",
|
|
284
277
|
class: "pi pi-angle-up"
|
|
@@ -286,11 +279,11 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
286
279
|
])])) : l("", !0)
|
|
287
280
|
])) : l("", !0)
|
|
288
281
|
], 34),
|
|
289
|
-
e.showDialogs && c.chat.dialogsExpanded ? (o(), s("div",
|
|
290
|
-
(o(!0), s(
|
|
282
|
+
e.showDialogs && c.chat.dialogsExpanded ? (o(), s("div", ne, [
|
|
283
|
+
(o(!0), s(Ct, null, wt(tt(), (i) => (o(), s("div", {
|
|
291
284
|
key: i.dialogId,
|
|
292
|
-
class:
|
|
293
|
-
onClick: (u) =>
|
|
285
|
+
class: b(["dialog__item", Z(i)]),
|
|
286
|
+
onClick: (u) => K(i)
|
|
294
287
|
}, [
|
|
295
288
|
i.icon ? (o(), s("img", {
|
|
296
289
|
key: 0,
|
|
@@ -298,21 +291,21 @@ const Nt = { class: "chat-item__avatar-container" }, Xt = ["src"], Yt = {
|
|
|
298
291
|
src: i.icon,
|
|
299
292
|
height: "16",
|
|
300
293
|
width: "16"
|
|
301
|
-
}, null, 8,
|
|
302
|
-
r("div",
|
|
303
|
-
r("div",
|
|
304
|
-
r("div",
|
|
294
|
+
}, null, 8, oe)) : (o(), s("span", ce)),
|
|
295
|
+
r("div", se, [
|
|
296
|
+
r("div", ae, f(i.name), 1),
|
|
297
|
+
r("div", re, f(i["lastActivity.time"]), 1)
|
|
305
298
|
]),
|
|
306
299
|
i.countUnread > 0 ? (o(), s("div", {
|
|
307
300
|
key: 2,
|
|
308
301
|
class: "chat-item__unread",
|
|
309
302
|
style: W(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
|
|
310
|
-
},
|
|
311
|
-
], 10,
|
|
303
|
+
}, f(i.countUnread > 99 ? "99+" : i.countUnread), 5)) : l("", !0)
|
|
304
|
+
], 10, ie))), 128))
|
|
312
305
|
])) : l("", !0)
|
|
313
306
|
]));
|
|
314
307
|
}
|
|
315
308
|
});
|
|
316
309
|
export {
|
|
317
|
-
|
|
310
|
+
Ne as default
|
|
318
311
|
};
|
package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./MessageStatusIndicator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-c70e671a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|