@mobilon-dev/chotto 0.3.105 → 0.3.107
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_feed_elements/AudioMessage/AudioMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +293 -266
- package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.js +7 -0
- package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue2.js +73 -0
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +185 -158
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +227 -200
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +62 -245
- package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.js +7 -0
- package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue2.js +231 -0
- package/dist/components/2_feed_elements/MessageReactions/composables/usePositioning.js +25 -25
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +213 -186
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +190 -164
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +209 -182
- package/dist/components/3_compounds/Feed/Feed.vue.js +2 -2
- package/dist/components/3_compounds/Feed/Feed.vue2.js +261 -213
- package/dist/components/3_compounds/Feed/composables/useFeedGrouping.js +23 -20
- package/dist/components/3_compounds/Feed/composables/useFeedProgressiveRender.js +82 -0
- package/dist/components/3_compounds/Feed/composables/useFeedReactionsOverlay.js +34 -0
- package/dist/hooks/messages/useMessageActions.js +81 -70
- package/dist/hooks/messages/useMessageReactionsInFeed.js +53 -0
- package/dist/hooks/messages/useMessageReactionsMount.js +21 -0
- package/dist/index.js +245 -238
- package/dist/types/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.d.ts +19 -0
- package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +4 -71
- package/dist/types/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/composables/usePositioning.d.ts +2 -1
- package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +6 -0
- package/dist/types/components/3_compounds/Feed/composables/index.d.ts +2 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedGrouping.d.ts +3 -22
- package/dist/types/components/3_compounds/Feed/composables/useFeedProgressiveRender.d.ts +22 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedReactionsOverlay.d.ts +52 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/hooks/messages/index.d.ts +2 -0
- package/dist/types/hooks/messages/useMessageReactionsInFeed.d.ts +25 -0
- package/dist/types/hooks/messages/useMessageReactionsMount.d.ts +10 -0
- package/package.json +1 -1
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
1
|
+
import { defineComponent as Te, ref as S, computed as l, provide as A, inject as G, unref as s, watch as B, nextTick as F, onMounted as De, createElementBlock as y, openBlock as i, createVNode as p, createBlock as f, createCommentVNode as c, normalizeStyle as H, renderSlot as J, withDirectives as we, createElementVNode as C, vShow as Ke, Transition as T, withCtx as D, Fragment as xe, renderList as Oe, isMemoSame as $e, resolveDynamicComponent as je, mergeProps as Ne, toDisplayString as Le, Teleport as Q } from "vue";
|
|
2
|
+
import Ue from "../../2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js";
|
|
3
|
+
import qe from "../../2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js";
|
|
4
|
+
import Ee from "../../2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js";
|
|
5
|
+
import Pe from "../../2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js";
|
|
6
|
+
import Ve from "../../2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js";
|
|
7
|
+
import We from "../../2_feed_elements/TypingMessage/TypingMessage.vue.js";
|
|
8
|
+
import ze from "../../1_atoms/LoadingIndicator/LoadingIndicator.vue.js";
|
|
9
|
+
import Ge from "../../2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.js";
|
|
10
|
+
import { useFeedButton as He } from "./composables/useFeedButton.js";
|
|
11
|
+
import { useFeedComponents as Je } from "./composables/useFeedComponents.js";
|
|
12
|
+
import { useFeedGrouping as Qe } from "./composables/useFeedGrouping.js";
|
|
13
|
+
import { useFeedKeyboard as Xe } from "./composables/useFeedKeyboard.js";
|
|
14
|
+
import { useFeedLoadMore as Ye } from "./composables/useFeedLoadMore.js";
|
|
15
|
+
import { useFeedMessageVisibility as Ze } from "./composables/useFeedMessageVisibility.js";
|
|
16
|
+
import { useFeedProgressiveRender as _e } from "./composables/useFeedProgressiveRender.js";
|
|
17
|
+
import { provideFeedReactionsOverlay as et } from "./composables/useFeedReactionsOverlay.js";
|
|
18
|
+
import { useFeedReply as tt } from "./composables/useFeedReply.js";
|
|
19
|
+
import { useFeedScroll as ot } from "./composables/useFeedScroll.js";
|
|
20
|
+
import { useFeedScrollTo as st } from "./composables/useFeedScrollTo.js";
|
|
21
|
+
import { useStickyDate as nt } from "./composables/useStickyDate.js";
|
|
22
|
+
import { throttle as at } from "./functions/throttle.js";
|
|
23
|
+
import { getDefaultMessageMenuActions as rt } from "./utils/getDefaultMessageMenuActions.js";
|
|
24
|
+
import { isSmsFeedMessage as it } from "../../../functions/isSmsChannel.js";
|
|
22
25
|
import "../../../functions/parseMarkdown.js";
|
|
23
|
-
import
|
|
24
|
-
const
|
|
26
|
+
import lt from "./assets/chat-background.svg.js";
|
|
27
|
+
const dt = { class: "message-feed-wrapper" }, ct = ["id"], ut = { class: "message-feed__loading" }, mt = { style: { margin: "auto" } }, ft = {
|
|
25
28
|
key: 0,
|
|
26
29
|
class: "message-feed__unread-amount"
|
|
27
|
-
},
|
|
30
|
+
}, qt = /* @__PURE__ */ Te({
|
|
28
31
|
__name: "Feed",
|
|
29
32
|
props: {
|
|
33
|
+
/**
|
|
34
|
+
* Объекты ленты. При смене чата сначала рисуется хвост, остальное дорисовывается пачками.
|
|
35
|
+
*/
|
|
30
36
|
objects: {
|
|
31
37
|
type: Array,
|
|
32
38
|
required: !0
|
|
@@ -60,7 +66,7 @@ const Ye = { class: "message-feed-wrapper" }, Ze = ["id"], _e = { class: "messag
|
|
|
60
66
|
keyboardAlign: {
|
|
61
67
|
type: String,
|
|
62
68
|
default: "right",
|
|
63
|
-
validator: (
|
|
69
|
+
validator: (n) => ["left", "center", "right"].includes(n)
|
|
64
70
|
},
|
|
65
71
|
feedKeyboards: {
|
|
66
72
|
type: Array,
|
|
@@ -70,7 +76,7 @@ const Ye = { class: "message-feed-wrapper" }, Ze = ["id"], _e = { class: "messag
|
|
|
70
76
|
feedKeyboardAlign: {
|
|
71
77
|
type: String,
|
|
72
78
|
default: "right",
|
|
73
|
-
validator: (
|
|
79
|
+
validator: (n) => ["left", "center", "right"].includes(n)
|
|
74
80
|
},
|
|
75
81
|
chatBackground: {
|
|
76
82
|
type: String,
|
|
@@ -87,7 +93,7 @@ const Ye = { class: "message-feed-wrapper" }, Ze = ["id"], _e = { class: "messag
|
|
|
87
93
|
reactionsMode: {
|
|
88
94
|
type: String,
|
|
89
95
|
default: "single",
|
|
90
|
-
validator: (
|
|
96
|
+
validator: (n) => ["single", "multi"].includes(n)
|
|
91
97
|
},
|
|
92
98
|
/** Id текущего пользователя — для расчёта «моих» реакций */
|
|
93
99
|
currentUserId: {
|
|
@@ -119,7 +125,7 @@ const Ye = { class: "message-feed-wrapper" }, Ze = ["id"], _e = { class: "messag
|
|
|
119
125
|
*/
|
|
120
126
|
messageMenuActions: {
|
|
121
127
|
type: Array,
|
|
122
|
-
default: () =>
|
|
128
|
+
default: () => rt()
|
|
123
129
|
}
|
|
124
130
|
},
|
|
125
131
|
emits: [
|
|
@@ -134,263 +140,305 @@ const Ye = { class: "message-feed-wrapper" }, Ze = ["id"], _e = { class: "messag
|
|
|
134
140
|
"smsInvite",
|
|
135
141
|
"delimiterRead"
|
|
136
142
|
],
|
|
137
|
-
setup(
|
|
138
|
-
const
|
|
139
|
-
isShowButton:
|
|
140
|
-
isKeyboardPlace:
|
|
141
|
-
checkButtonVisibility:
|
|
142
|
-
} =
|
|
143
|
-
feedRef:
|
|
144
|
-
keyboardRef:
|
|
145
|
-
}), { componentsMap:
|
|
146
|
-
|
|
143
|
+
setup(n, { emit: X }) {
|
|
144
|
+
const a = n, v = S(), u = S(), w = S(), {
|
|
145
|
+
isShowButton: Y,
|
|
146
|
+
isKeyboardPlace: Z,
|
|
147
|
+
checkButtonVisibility: _
|
|
148
|
+
} = He({
|
|
149
|
+
feedRef: u,
|
|
150
|
+
keyboardRef: w
|
|
151
|
+
}), { componentsMap: ee } = Je(), K = l(() => a.reactionsEnabled);
|
|
152
|
+
et();
|
|
153
|
+
const te = l(() => a.reactionsMode), x = l(() => a.currentUserId), O = l(() => a.reactionUserNames);
|
|
154
|
+
A("currentUserId", x), A("reactionUserNames", O), A(
|
|
147
155
|
"messageMenuActions",
|
|
148
|
-
|
|
156
|
+
l(() => a.messageMenuActions)
|
|
149
157
|
);
|
|
150
|
-
const {
|
|
151
|
-
objects:
|
|
152
|
-
}),
|
|
153
|
-
|
|
154
|
-
|
|
158
|
+
const { seriesFlags: $ } = Qe({
|
|
159
|
+
objects: l(() => a.objects)
|
|
160
|
+
}), {
|
|
161
|
+
visibleObjects: oe,
|
|
162
|
+
renderStart: h,
|
|
163
|
+
isBackfilling: se,
|
|
164
|
+
revealThroughIndex: ne,
|
|
165
|
+
accelerateBackfill: ae
|
|
166
|
+
} = _e({
|
|
167
|
+
objectsRef: l(() => a.objects),
|
|
168
|
+
feedRef: u
|
|
169
|
+
}), b = G("chatAppId"), j = G("selectedChat", void 0), N = l(() => {
|
|
170
|
+
if (j)
|
|
171
|
+
return s(j);
|
|
155
172
|
});
|
|
156
|
-
function
|
|
157
|
-
return
|
|
173
|
+
function re(t) {
|
|
174
|
+
return t.timestamp;
|
|
175
|
+
}
|
|
176
|
+
function M(t, o) {
|
|
177
|
+
return t.messageId || `mid-${h.value + o}`;
|
|
178
|
+
}
|
|
179
|
+
function ie(t) {
|
|
180
|
+
var e;
|
|
181
|
+
const o = (e = t.reactions) == null ? void 0 : e.items;
|
|
182
|
+
return o != null && o.length ? o.map((r) => `${r.key}:${r.userId}`).join(",") : "";
|
|
158
183
|
}
|
|
159
|
-
function
|
|
160
|
-
var
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
163
|
-
if (!
|
|
184
|
+
function L(t) {
|
|
185
|
+
var m, d, k;
|
|
186
|
+
const o = t, e = o.channelId || ((m = o.channel) == null ? void 0 : m.channelId) || ((d = o.meta) == null ? void 0 : d.channelId);
|
|
187
|
+
if (e) return String(e);
|
|
188
|
+
if (!o.dialogId || !((k = N.value) != null && k.dialogs))
|
|
164
189
|
return;
|
|
165
|
-
const
|
|
166
|
-
return
|
|
190
|
+
const r = N.value.dialogs.find((I) => I.dialogId === o.dialogId);
|
|
191
|
+
return r == null ? void 0 : r.channelId;
|
|
167
192
|
}
|
|
168
|
-
function
|
|
169
|
-
return
|
|
193
|
+
function le(t) {
|
|
194
|
+
return t.type === "message.call" && typeof a.callMessageOnCallback == "function" ? { onCall: a.callMessageOnCallback } : {};
|
|
170
195
|
}
|
|
171
|
-
const
|
|
172
|
-
checkScrollPosition:
|
|
173
|
-
startScrollWatch:
|
|
174
|
-
stopScrollWatch:
|
|
175
|
-
resetAllowFlags:
|
|
176
|
-
} =
|
|
177
|
-
feedRef:
|
|
178
|
-
emit:
|
|
179
|
-
isLoadingMoreRef:
|
|
196
|
+
const g = X, {
|
|
197
|
+
checkScrollPosition: de,
|
|
198
|
+
startScrollWatch: U,
|
|
199
|
+
stopScrollWatch: q,
|
|
200
|
+
resetAllowFlags: ce
|
|
201
|
+
} = Ye({
|
|
202
|
+
feedRef: u,
|
|
203
|
+
emit: g,
|
|
204
|
+
isLoadingMoreRef: l(() => a.isLoadingMore)
|
|
180
205
|
}), {
|
|
181
|
-
getMessage:
|
|
182
|
-
messageAction:
|
|
183
|
-
handleClickReplied:
|
|
184
|
-
feedObjectDoubleClick:
|
|
185
|
-
handleResetReply:
|
|
186
|
-
handleResetEdit:
|
|
187
|
-
} =
|
|
188
|
-
enableDoubleClickReply:
|
|
189
|
-
emit:
|
|
190
|
-
isReplyAllowed: (
|
|
206
|
+
getMessage: R,
|
|
207
|
+
messageAction: ue,
|
|
208
|
+
handleClickReplied: me,
|
|
209
|
+
feedObjectDoubleClick: fe,
|
|
210
|
+
handleResetReply: ge,
|
|
211
|
+
handleResetEdit: ye
|
|
212
|
+
} = tt({
|
|
213
|
+
enableDoubleClickReply: a.enableDoubleClickReply,
|
|
214
|
+
emit: g,
|
|
215
|
+
isReplyAllowed: (t) => !it(t, L(t))
|
|
191
216
|
});
|
|
192
|
-
function
|
|
193
|
-
|
|
217
|
+
function pe(t) {
|
|
218
|
+
g("smsInvite", t);
|
|
194
219
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
220
|
+
function be(t) {
|
|
221
|
+
g("delimiterRead", t);
|
|
197
222
|
}
|
|
198
223
|
const {
|
|
199
|
-
showKeyboard:
|
|
200
|
-
keyboardAction:
|
|
201
|
-
feedKeyboardAction:
|
|
202
|
-
} =
|
|
203
|
-
isKeyboardPlace:
|
|
204
|
-
objects:
|
|
205
|
-
emit:
|
|
224
|
+
showKeyboard: ke,
|
|
225
|
+
keyboardAction: ve,
|
|
226
|
+
feedKeyboardAction: he
|
|
227
|
+
} = Xe({
|
|
228
|
+
isKeyboardPlace: Z,
|
|
229
|
+
objects: l(() => a.objects),
|
|
230
|
+
emit: g
|
|
206
231
|
}), {
|
|
207
|
-
showStickyDate:
|
|
208
|
-
stickyDateText:
|
|
209
|
-
show:
|
|
210
|
-
} =
|
|
211
|
-
feedRef:
|
|
212
|
-
trackingObjects:
|
|
232
|
+
showStickyDate: Me,
|
|
233
|
+
stickyDateText: Re,
|
|
234
|
+
show: E
|
|
235
|
+
} = nt({
|
|
236
|
+
feedRef: u,
|
|
237
|
+
trackingObjects: v
|
|
213
238
|
}), {
|
|
214
|
-
isInitialized:
|
|
215
|
-
initializeScroll:
|
|
216
|
-
smoothScrollToBottom:
|
|
217
|
-
} =
|
|
218
|
-
feedRef:
|
|
219
|
-
objectsRef:
|
|
220
|
-
scrollToBottomRef:
|
|
221
|
-
}),
|
|
222
|
-
function
|
|
223
|
-
|
|
239
|
+
isInitialized: Ie,
|
|
240
|
+
initializeScroll: Se,
|
|
241
|
+
smoothScrollToBottom: Ae
|
|
242
|
+
} = ot({
|
|
243
|
+
feedRef: u,
|
|
244
|
+
objectsRef: l(() => a.objects),
|
|
245
|
+
scrollToBottomRef: l(() => a.scrollToBottom)
|
|
246
|
+
}), P = l(() => a.chatBackground ?? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(lt)}`);
|
|
247
|
+
function V(t = !0) {
|
|
248
|
+
if (_(), se.value) {
|
|
249
|
+
const o = u.value;
|
|
250
|
+
o && o.scrollTop < 300 && ae(), E();
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
de(t), E();
|
|
224
254
|
}
|
|
225
|
-
const
|
|
226
|
-
function
|
|
227
|
-
|
|
255
|
+
const Be = at(() => V(), 250);
|
|
256
|
+
function Fe() {
|
|
257
|
+
g("forceScrollToBottom"), Ae();
|
|
228
258
|
}
|
|
229
|
-
function
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
const
|
|
233
|
-
return
|
|
259
|
+
function Ce(t) {
|
|
260
|
+
const o = a.objects;
|
|
261
|
+
if (t.startsWith("mid-")) {
|
|
262
|
+
const e = parseInt(t.slice(4), 10);
|
|
263
|
+
return o[e];
|
|
234
264
|
}
|
|
235
|
-
return
|
|
265
|
+
return o.find((e) => e.messageId === t);
|
|
236
266
|
}
|
|
237
|
-
const { restartObserving:
|
|
238
|
-
trackingObjects:
|
|
239
|
-
chatAppId:
|
|
240
|
-
getMessageById:
|
|
241
|
-
onMessageVisible: (
|
|
267
|
+
const { restartObserving: W } = Ze({
|
|
268
|
+
trackingObjects: v,
|
|
269
|
+
chatAppId: b,
|
|
270
|
+
getMessageById: Ce,
|
|
271
|
+
onMessageVisible: (t) => g("messageVisible", t)
|
|
242
272
|
});
|
|
243
|
-
return
|
|
244
|
-
() =>
|
|
273
|
+
return B(
|
|
274
|
+
() => a.objects,
|
|
245
275
|
() => {
|
|
246
|
-
|
|
276
|
+
F(() => {
|
|
247
277
|
requestAnimationFrame(() => {
|
|
248
|
-
|
|
278
|
+
ce(), V(!1), v.value = document.querySelectorAll(".tracking-message"), W();
|
|
249
279
|
});
|
|
250
280
|
});
|
|
251
281
|
},
|
|
252
282
|
{ immediate: !0 }
|
|
253
|
-
),
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}), Se(() => {
|
|
257
|
-
U(() => {
|
|
258
|
-
n.objects.length > 0 && !me.value && fe();
|
|
283
|
+
), B(h, () => {
|
|
284
|
+
F(() => {
|
|
285
|
+
v.value = document.querySelectorAll(".tracking-message"), W();
|
|
259
286
|
});
|
|
260
|
-
}), (
|
|
261
|
-
|
|
287
|
+
}), B(
|
|
288
|
+
() => a.scrollTo,
|
|
289
|
+
(t) => {
|
|
290
|
+
if (!t) return;
|
|
291
|
+
const o = a.objects, e = t.trim(), r = e.startsWith("msg-") ? e.slice(4) : e;
|
|
292
|
+
let m = -1;
|
|
293
|
+
r.startsWith("mid-") ? m = Number.parseInt(r.slice(4), 10) : m = o.findIndex((d) => d.messageId === r || d.messageId === e), Number.isFinite(m) && ne(m);
|
|
294
|
+
}
|
|
295
|
+
), st({
|
|
296
|
+
targetIdRef: l(() => a.scrollTo),
|
|
297
|
+
feedContainerId: `feed-container-${b}`
|
|
298
|
+
}), De(() => {
|
|
299
|
+
F(() => {
|
|
300
|
+
a.objects.length > 0 && !Ie.value && Se();
|
|
301
|
+
});
|
|
302
|
+
}), (t, o) => (i(), y("div", dt, [
|
|
303
|
+
n.objects.length > 0 || n.typing ? (i(), y("div", {
|
|
262
304
|
key: 0,
|
|
263
|
-
id: "feed-container-" +
|
|
305
|
+
id: "feed-container-" + s(b),
|
|
264
306
|
ref_key: "refFeed",
|
|
265
|
-
ref:
|
|
307
|
+
ref: u,
|
|
266
308
|
class: "message-feed",
|
|
267
|
-
style:
|
|
268
|
-
onScroll:
|
|
269
|
-
onMousedown:
|
|
270
|
-
(...
|
|
271
|
-
onMouseup:
|
|
272
|
-
(...
|
|
309
|
+
style: H({ backgroundImage: `url(${P.value})` }),
|
|
310
|
+
onScroll: o[2] || (o[2] = (e) => s(Be)()),
|
|
311
|
+
onMousedown: o[3] || (o[3] = //@ts-ignore
|
|
312
|
+
(...e) => s(U) && s(U)(...e)),
|
|
313
|
+
onMouseup: o[4] || (o[4] = //@ts-ignore
|
|
314
|
+
(...e) => s(q) && s(q)(...e))
|
|
273
315
|
}, [
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
"is-loading":
|
|
316
|
+
J(t.$slots, "prepend", {}, void 0, !0),
|
|
317
|
+
we(C("div", ut, [
|
|
318
|
+
p(ze, {
|
|
319
|
+
"is-loading": n.isLoadingMore,
|
|
278
320
|
size: "small",
|
|
279
321
|
position: "top"
|
|
280
322
|
}, null, 8, ["is-loading"])
|
|
281
323
|
], 512), [
|
|
282
|
-
[
|
|
324
|
+
[Ke, n.isLoadingMore]
|
|
283
325
|
]),
|
|
284
|
-
|
|
285
|
-
default:
|
|
286
|
-
|
|
326
|
+
p(T, null, {
|
|
327
|
+
default: D(() => [
|
|
328
|
+
s(Me) && !n.isLoadingMore ? (i(), f(Ue, {
|
|
287
329
|
key: 0,
|
|
288
330
|
class: "message-feed__sticky-date",
|
|
289
|
-
text:
|
|
290
|
-
}, null, 8, ["text"])) :
|
|
331
|
+
text: s(Re)
|
|
332
|
+
}, null, 8, ["text"])) : c("", !0)
|
|
291
333
|
]),
|
|
292
334
|
_: 1
|
|
293
335
|
}),
|
|
294
|
-
(i(!0),
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
336
|
+
(i(!0), y(xe, null, Oe(s(oe), (e, r, m, d) => {
|
|
337
|
+
const k = [e.messageId, e.text, e.status, e.reply, s($)[s(h) + r], ie(e)];
|
|
338
|
+
if (d && d.key === M(e, r) && $e(d, k)) return d;
|
|
339
|
+
const I = (i(), y("div", {
|
|
340
|
+
id: "msg-" + M(e, r),
|
|
341
|
+
key: M(e, r),
|
|
342
|
+
"data-timestamp": re(e),
|
|
343
|
+
class: "tracking-message",
|
|
344
|
+
onDblclick: (z) => s(fe)(z, e)
|
|
345
|
+
}, [
|
|
346
|
+
(i(), f(je(s(ee)(e)), Ne({
|
|
347
|
+
key: M(e, r),
|
|
348
|
+
class: "message-feed__message",
|
|
349
|
+
message: e,
|
|
350
|
+
"apply-style": n.applyStyle,
|
|
351
|
+
"is-first-in-series": s($)[s(h) + r],
|
|
352
|
+
"reactions-enabled": K.value,
|
|
353
|
+
"reactions-mode": te.value,
|
|
354
|
+
"current-user-id": x.value,
|
|
355
|
+
"reaction-user-names": O.value,
|
|
356
|
+
"subtext-tooltip-data": n.subtextTooltipData,
|
|
357
|
+
channel: L(e)
|
|
358
|
+
}, { ref_for: !0 }, le(e), {
|
|
359
|
+
onAction: s(ue),
|
|
360
|
+
onReply: s(me),
|
|
361
|
+
onSmsInvite: (z) => pe(e),
|
|
362
|
+
onRead: be
|
|
363
|
+
}), null, 16, ["message", "apply-style", "is-first-in-series", "reactions-enabled", "reactions-mode", "current-user-id", "reaction-user-names", "subtext-tooltip-data", "channel", "onAction", "onReply", "onSmsInvite"]))
|
|
364
|
+
], 40, ["id", "data-timestamp", "onDblclick"]));
|
|
365
|
+
return I.memo = k, I;
|
|
366
|
+
}, o, 0), 128)),
|
|
367
|
+
n.typing ? (i(), f(We, {
|
|
321
368
|
key: 0,
|
|
322
369
|
message: {
|
|
323
|
-
subText:
|
|
324
|
-
avatar:
|
|
370
|
+
subText: n.typing.title,
|
|
371
|
+
avatar: n.typing.avatar
|
|
325
372
|
}
|
|
326
|
-
}, null, 8, ["message"])) :
|
|
327
|
-
|
|
328
|
-
default:
|
|
329
|
-
|
|
373
|
+
}, null, 8, ["message"])) : c("", !0),
|
|
374
|
+
p(T, null, {
|
|
375
|
+
default: D(() => [
|
|
376
|
+
s(ke) ? (i(), f(Pe, {
|
|
330
377
|
key: 0,
|
|
331
378
|
ref_key: "keyboardRef",
|
|
332
|
-
ref:
|
|
379
|
+
ref: w,
|
|
333
380
|
class: "message-feed__keyboard",
|
|
334
|
-
keyboard:
|
|
335
|
-
align:
|
|
336
|
-
onAction:
|
|
337
|
-
}, null, 8, ["keyboard", "align", "onAction"])) :
|
|
381
|
+
keyboard: n.objects[n.objects.length - 1].keyboard,
|
|
382
|
+
align: n.keyboardAlign,
|
|
383
|
+
onAction: s(ve)
|
|
384
|
+
}, null, 8, ["keyboard", "align", "onAction"])) : c("", !0)
|
|
338
385
|
]),
|
|
339
386
|
_: 1
|
|
340
387
|
}),
|
|
341
|
-
|
|
388
|
+
n.feedKeyboards && n.feedKeyboards.length > 0 ? (i(), f(Ve, {
|
|
342
389
|
key: 1,
|
|
343
|
-
buttons:
|
|
344
|
-
align:
|
|
345
|
-
onAction:
|
|
346
|
-
}, null, 8, ["buttons", "align", "onAction"])) :
|
|
347
|
-
], 44,
|
|
390
|
+
buttons: n.feedKeyboards,
|
|
391
|
+
align: n.feedKeyboardAlign,
|
|
392
|
+
onAction: s(he)
|
|
393
|
+
}, null, 8, ["buttons", "align", "onAction"])) : c("", !0)
|
|
394
|
+
], 44, ct)) : (i(), y("div", {
|
|
348
395
|
key: 1,
|
|
349
396
|
ref_key: "refFeed",
|
|
350
|
-
ref:
|
|
397
|
+
ref: u,
|
|
351
398
|
class: "message-feed",
|
|
352
|
-
style:
|
|
399
|
+
style: H({ backgroundImage: `url(${P.value})` })
|
|
353
400
|
}, [
|
|
354
|
-
|
|
355
|
-
|
|
401
|
+
C("div", mt, [
|
|
402
|
+
J(t.$slots, "empty-feed", {}, void 0, !0)
|
|
356
403
|
])
|
|
357
404
|
], 4)),
|
|
358
|
-
|
|
359
|
-
default:
|
|
360
|
-
|
|
405
|
+
p(T, null, {
|
|
406
|
+
default: D(() => [
|
|
407
|
+
s(Y) ? (i(), y("button", {
|
|
361
408
|
key: 0,
|
|
362
409
|
class: "message-feed__button-down",
|
|
363
|
-
onClick:
|
|
410
|
+
onClick: Fe
|
|
364
411
|
}, [
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
])) :
|
|
412
|
+
n.buttonParams ? (i(), y("div", ft, Le(n.buttonParams.unreadAmount), 1)) : c("", !0),
|
|
413
|
+
o[5] || (o[5] = C("span", { class: "pi pi-angle-down message-feed__icon-down" }, null, -1))
|
|
414
|
+
])) : c("", !0)
|
|
368
415
|
]),
|
|
369
416
|
_: 1
|
|
370
417
|
}),
|
|
371
|
-
|
|
418
|
+
s(R)().reply ? (i(), f(Q, {
|
|
372
419
|
key: 2,
|
|
373
|
-
to: "#chat-input-reply-line-" +
|
|
420
|
+
to: "#chat-input-reply-line-" + s(b)
|
|
374
421
|
}, [
|
|
375
|
-
|
|
422
|
+
p(qe, {
|
|
376
423
|
class: "chat-input-reply",
|
|
377
|
-
message:
|
|
378
|
-
onReset:
|
|
424
|
+
message: s(R)().reply,
|
|
425
|
+
onReset: s(ge)
|
|
379
426
|
}, null, 8, ["message", "onReset"])
|
|
380
|
-
], 8, ["to"])) :
|
|
381
|
-
|
|
427
|
+
], 8, ["to"])) : c("", !0),
|
|
428
|
+
s(R)().edit ? (i(), f(Q, {
|
|
382
429
|
key: 3,
|
|
383
|
-
to: "#chat-input-reply-line-" +
|
|
430
|
+
to: "#chat-input-reply-line-" + s(b)
|
|
384
431
|
}, [
|
|
385
|
-
|
|
432
|
+
p(Ee, {
|
|
386
433
|
class: "chat-input-reply",
|
|
387
|
-
message:
|
|
388
|
-
onReset:
|
|
434
|
+
message: s(R)().edit,
|
|
435
|
+
onReset: s(ye)
|
|
389
436
|
}, null, 8, ["message", "onReset"])
|
|
390
|
-
], 8, ["to"])) :
|
|
437
|
+
], 8, ["to"])) : c("", !0),
|
|
438
|
+
K.value ? (i(), f(Ge, { key: 4 })) : c("", !0)
|
|
391
439
|
]));
|
|
392
440
|
}
|
|
393
441
|
});
|
|
394
442
|
export {
|
|
395
|
-
|
|
443
|
+
qt as default
|
|
396
444
|
};
|