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