@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.
Files changed (43) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +2 -2
  3. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +293 -266
  4. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.js +7 -0
  5. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue2.js +73 -0
  6. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +1 -1
  7. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +185 -158
  8. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +3 -3
  9. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +227 -200
  10. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
  11. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +62 -245
  12. package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.js +7 -0
  13. package/dist/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue2.js +231 -0
  14. package/dist/components/2_feed_elements/MessageReactions/composables/usePositioning.js +25 -25
  15. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +2 -2
  16. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +213 -186
  17. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +2 -2
  18. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +190 -164
  19. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +1 -1
  20. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +209 -182
  21. package/dist/components/3_compounds/Feed/Feed.vue.js +2 -2
  22. package/dist/components/3_compounds/Feed/Feed.vue2.js +261 -213
  23. package/dist/components/3_compounds/Feed/composables/useFeedGrouping.js +23 -20
  24. package/dist/components/3_compounds/Feed/composables/useFeedProgressiveRender.js +82 -0
  25. package/dist/components/3_compounds/Feed/composables/useFeedReactionsOverlay.js +34 -0
  26. package/dist/hooks/messages/useMessageActions.js +81 -70
  27. package/dist/hooks/messages/useMessageReactionsInFeed.js +53 -0
  28. package/dist/hooks/messages/useMessageReactionsMount.js +21 -0
  29. package/dist/index.js +245 -238
  30. package/dist/types/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.d.ts +19 -0
  31. package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +4 -71
  32. package/dist/types/components/2_feed_elements/MessageReactions/MessageReactionsOverlay.vue.d.ts +2 -0
  33. package/dist/types/components/2_feed_elements/MessageReactions/composables/usePositioning.d.ts +2 -1
  34. package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +6 -0
  35. package/dist/types/components/3_compounds/Feed/composables/index.d.ts +2 -0
  36. package/dist/types/components/3_compounds/Feed/composables/useFeedGrouping.d.ts +3 -22
  37. package/dist/types/components/3_compounds/Feed/composables/useFeedProgressiveRender.d.ts +22 -0
  38. package/dist/types/components/3_compounds/Feed/composables/useFeedReactionsOverlay.d.ts +52 -0
  39. package/dist/types/components/index.d.ts +1 -0
  40. package/dist/types/hooks/messages/index.d.ts +2 -0
  41. package/dist/types/hooks/messages/useMessageReactionsInFeed.d.ts +25 -0
  42. package/dist/types/hooks/messages/useMessageReactionsMount.d.ts +10 -0
  43. package/package.json +1 -1
@@ -1,32 +1,38 @@
1
- import { defineComponent as ve, ref as h, computed as r, provide as v, inject as L, unref as t, watch as Me, nextTick as U, onMounted as Se, createElementBlock as u, openBlock as i, createVNode as g, createBlock as m, createCommentVNode as l, normalizeStyle as E, renderSlot as N, withDirectives as Ie, createElementVNode as M, vShow as Re, Transition as S, withCtx as I, Fragment as Ae, renderList as Be, resolveDynamicComponent as Ce, mergeProps as Fe, toDisplayString as Te, Teleport as V } from "vue";
2
- import De from "../../2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js";
3
- import we from "../../2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js";
4
- import Ke from "../../2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js";
5
- import je from "../../2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js";
6
- import xe from "../../2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js";
7
- import Oe from "../../2_feed_elements/TypingMessage/TypingMessage.vue.js";
8
- import Le from "../../1_atoms/LoadingIndicator/LoadingIndicator.vue.js";
9
- import { useFeedButton as Ue } from "./composables/useFeedButton.js";
10
- import { useFeedComponents as Ee } from "./composables/useFeedComponents.js";
11
- import { useFeedGrouping as Ne } from "./composables/useFeedGrouping.js";
12
- import { useFeedKeyboard as Ve } from "./composables/useFeedKeyboard.js";
13
- import { useFeedLoadMore as $e } from "./composables/useFeedLoadMore.js";
14
- import { useFeedMessageVisibility as qe } from "./composables/useFeedMessageVisibility.js";
15
- import { useFeedReply as Pe } from "./composables/useFeedReply.js";
16
- import { useFeedScroll as ze } from "./composables/useFeedScroll.js";
17
- import { useFeedScrollTo as We } from "./composables/useFeedScrollTo.js";
18
- import { useStickyDate as Ge } from "./composables/useStickyDate.js";
19
- import { throttle as He } from "./functions/throttle.js";
20
- import { getDefaultMessageMenuActions as Je } from "./utils/getDefaultMessageMenuActions.js";
21
- import { isSmsFeedMessage as Qe } from "../../../functions/isSmsChannel.js";
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 Xe from "./assets/chat-background.svg.js";
24
- const Ye = { class: "message-feed-wrapper" }, Ze = ["id"], _e = { class: "message-feed__loading" }, et = ["id", "data-timestamp", "onDblclick"], tt = { style: { margin: "auto" } }, ot = {
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
- }, Bt = /* @__PURE__ */ ve({
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: (e) => ["left", "center", "right"].includes(e)
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: (e) => ["left", "center", "right"].includes(e)
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: (e) => ["single", "multi"].includes(e)
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: () => Je()
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(e, { emit: $ }) {
138
- const n = e, k = h(), f = h(), R = h(), {
139
- isShowButton: q,
140
- isKeyboardPlace: P,
141
- checkButtonVisibility: z
142
- } = Ue({
143
- feedRef: f,
144
- keyboardRef: R
145
- }), { componentsMap: W } = Ee(), G = r(() => n.reactionsEnabled), H = r(() => n.reactionsMode), A = r(() => n.currentUserId), B = r(() => n.reactionUserNames);
146
- v("currentUserId", A), v("reactionUserNames", B), v(
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
- r(() => n.messageMenuActions)
156
+ l(() => a.messageMenuActions)
149
157
  );
150
- const { groupedObjects: J } = Ne({
151
- objects: r(() => n.objects)
152
- }), y = L("chatAppId"), C = L("selectedChat", void 0), F = r(() => {
153
- if (C)
154
- return t(C);
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 Q(o) {
157
- return o.timestamp;
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 T(o) {
160
- var p, x, O;
161
- const a = o, s = a.channelId || ((p = a.channel) == null ? void 0 : p.channelId) || ((x = a.meta) == null ? void 0 : x.channelId);
162
- if (s) return String(s);
163
- if (!a.dialogId || !((O = F.value) != null && O.dialogs))
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 c = F.value.dialogs.find((he) => he.dialogId === a.dialogId);
166
- return c == null ? void 0 : c.channelId;
190
+ const r = N.value.dialogs.find((I) => I.dialogId === o.dialogId);
191
+ return r == null ? void 0 : r.channelId;
167
192
  }
168
- function X(o) {
169
- return o.type === "message.call" && typeof n.callMessageOnCallback == "function" ? { onCall: n.callMessageOnCallback } : {};
193
+ function le(t) {
194
+ return t.type === "message.call" && typeof a.callMessageOnCallback == "function" ? { onCall: a.callMessageOnCallback } : {};
170
195
  }
171
- const d = $, {
172
- checkScrollPosition: Y,
173
- startScrollWatch: D,
174
- stopScrollWatch: w,
175
- resetAllowFlags: Z
176
- } = $e({
177
- feedRef: f,
178
- emit: d,
179
- isLoadingMoreRef: r(() => n.isLoadingMore)
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: b,
182
- messageAction: _,
183
- handleClickReplied: ee,
184
- feedObjectDoubleClick: te,
185
- handleResetReply: oe,
186
- handleResetEdit: se
187
- } = Pe({
188
- enableDoubleClickReply: n.enableDoubleClickReply,
189
- emit: d,
190
- isReplyAllowed: (o) => !Qe(o, T(o))
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 ne(o) {
193
- d("smsInvite", o);
217
+ function pe(t) {
218
+ g("smsInvite", t);
194
219
  }
195
- function ae(o) {
196
- d("delimiterRead", o);
220
+ function be(t) {
221
+ g("delimiterRead", t);
197
222
  }
198
223
  const {
199
- showKeyboard: ie,
200
- keyboardAction: re,
201
- feedKeyboardAction: le
202
- } = Ve({
203
- isKeyboardPlace: P,
204
- objects: r(() => n.objects),
205
- emit: d
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: de,
208
- stickyDateText: ce,
209
- show: ue
210
- } = Ge({
211
- feedRef: f,
212
- trackingObjects: k
232
+ showStickyDate: Me,
233
+ stickyDateText: Re,
234
+ show: E
235
+ } = nt({
236
+ feedRef: u,
237
+ trackingObjects: v
213
238
  }), {
214
- isInitialized: me,
215
- initializeScroll: fe,
216
- smoothScrollToBottom: ge
217
- } = ze({
218
- feedRef: f,
219
- objectsRef: r(() => n.objects),
220
- scrollToBottomRef: r(() => n.scrollToBottom)
221
- }), K = r(() => n.chatBackground ?? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(Xe)}`);
222
- function j(o = !0) {
223
- z(), Y(o), ue();
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 ye = He(() => j(), 250);
226
- function pe() {
227
- d("forceScrollToBottom"), ge();
255
+ const Be = at(() => V(), 250);
256
+ function Fe() {
257
+ g("forceScrollToBottom"), Ae();
228
258
  }
229
- function be(o) {
230
- const a = n.objects;
231
- if (o.startsWith("mid-")) {
232
- const s = parseInt(o.slice(4), 10);
233
- return a[s];
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 a.find((s) => s.messageId === o);
265
+ return o.find((e) => e.messageId === t);
236
266
  }
237
- const { restartObserving: ke } = qe({
238
- trackingObjects: k,
239
- chatAppId: y,
240
- getMessageById: be,
241
- onMessageVisible: (o) => d("messageVisible", o)
267
+ const { restartObserving: W } = Ze({
268
+ trackingObjects: v,
269
+ chatAppId: b,
270
+ getMessageById: Ce,
271
+ onMessageVisible: (t) => g("messageVisible", t)
242
272
  });
243
- return Me(
244
- () => n.objects,
273
+ return B(
274
+ () => a.objects,
245
275
  () => {
246
- U(() => {
276
+ F(() => {
247
277
  requestAnimationFrame(() => {
248
- Z(), j(!1), k.value = document.querySelectorAll(".tracking-message"), ke();
278
+ ce(), V(!1), v.value = document.querySelectorAll(".tracking-message"), W();
249
279
  });
250
280
  });
251
281
  },
252
282
  { immediate: !0 }
253
- ), We({
254
- targetIdRef: r(() => n.scrollTo),
255
- feedContainerId: `feed-container-${y}`
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
- }), (o, a) => (i(), u("div", Ye, [
261
- e.objects.length > 0 || e.typing ? (i(), u("div", {
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-" + t(y),
305
+ id: "feed-container-" + s(b),
264
306
  ref_key: "refFeed",
265
- ref: f,
307
+ ref: u,
266
308
  class: "message-feed",
267
- style: E({ backgroundImage: `url(${K.value})` }),
268
- onScroll: a[0] || (a[0] = (s) => t(ye)()),
269
- onMousedown: a[1] || (a[1] = //@ts-ignore
270
- (...s) => t(D) && t(D)(...s)),
271
- onMouseup: a[2] || (a[2] = //@ts-ignore
272
- (...s) => t(w) && t(w)(...s))
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
- N(o.$slots, "prepend", {}, void 0, !0),
275
- Ie(M("div", _e, [
276
- g(Le, {
277
- "is-loading": e.isLoadingMore,
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
- [Re, e.isLoadingMore]
324
+ [Ke, n.isLoadingMore]
283
325
  ]),
284
- g(S, null, {
285
- default: I(() => [
286
- t(de) && !e.isLoadingMore ? (i(), m(De, {
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: t(ce)
290
- }, null, 8, ["text"])) : l("", !0)
331
+ text: s(Re)
332
+ }, null, 8, ["text"])) : c("", !0)
291
333
  ]),
292
334
  _: 1
293
335
  }),
294
- (i(!0), u(Ae, null, Be(t(J), (s, c) => (i(), u("div", {
295
- id: "msg-" + (s.messageId ?? "mid-" + c),
296
- key: s.messageId ?? "mid-" + c,
297
- "data-timestamp": Q(s),
298
- class: "tracking-message",
299
- onDblclick: (p) => t(te)(p, s)
300
- }, [
301
- (i(), m(Ce(t(W)(s)), Fe({
302
- key: s.messageId ?? "mid-" + c,
303
- class: "message-feed__message",
304
- message: s,
305
- "apply-style": e.applyStyle,
306
- "is-first-in-series": s.isFirstInSeries,
307
- "reactions-enabled": G.value,
308
- "reactions-mode": H.value,
309
- "current-user-id": A.value,
310
- "reaction-user-names": B.value,
311
- "subtext-tooltip-data": e.subtextTooltipData,
312
- channel: T(s)
313
- }, { ref_for: !0 }, X(s), {
314
- onAction: t(_),
315
- onReply: t(ee),
316
- onSmsInvite: (p) => ne(s),
317
- onRead: ae
318
- }), 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"]))
319
- ], 40, et))), 128)),
320
- e.typing ? (i(), m(Oe, {
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: e.typing.title,
324
- avatar: e.typing.avatar
370
+ subText: n.typing.title,
371
+ avatar: n.typing.avatar
325
372
  }
326
- }, null, 8, ["message"])) : l("", !0),
327
- g(S, null, {
328
- default: I(() => [
329
- t(ie) ? (i(), m(je, {
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: R,
379
+ ref: w,
333
380
  class: "message-feed__keyboard",
334
- keyboard: e.objects[e.objects.length - 1].keyboard,
335
- align: e.keyboardAlign,
336
- onAction: t(re)
337
- }, null, 8, ["keyboard", "align", "onAction"])) : l("", !0)
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
- e.feedKeyboards && e.feedKeyboards.length > 0 ? (i(), m(xe, {
388
+ n.feedKeyboards && n.feedKeyboards.length > 0 ? (i(), f(Ve, {
342
389
  key: 1,
343
- buttons: e.feedKeyboards,
344
- align: e.feedKeyboardAlign,
345
- onAction: t(le)
346
- }, null, 8, ["buttons", "align", "onAction"])) : l("", !0)
347
- ], 44, Ze)) : (i(), u("div", {
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: f,
397
+ ref: u,
351
398
  class: "message-feed",
352
- style: E({ backgroundImage: `url(${K.value})` })
399
+ style: H({ backgroundImage: `url(${P.value})` })
353
400
  }, [
354
- M("div", tt, [
355
- N(o.$slots, "empty-feed", {}, void 0, !0)
401
+ C("div", mt, [
402
+ J(t.$slots, "empty-feed", {}, void 0, !0)
356
403
  ])
357
404
  ], 4)),
358
- g(S, null, {
359
- default: I(() => [
360
- t(q) ? (i(), u("button", {
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: pe
410
+ onClick: Fe
364
411
  }, [
365
- e.buttonParams ? (i(), u("div", ot, Te(e.buttonParams.unreadAmount), 1)) : l("", !0),
366
- a[3] || (a[3] = M("span", { class: "pi pi-angle-down message-feed__icon-down" }, null, -1))
367
- ])) : l("", !0)
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
- t(b)().reply ? (i(), m(V, {
418
+ s(R)().reply ? (i(), f(Q, {
372
419
  key: 2,
373
- to: "#chat-input-reply-line-" + t(y)
420
+ to: "#chat-input-reply-line-" + s(b)
374
421
  }, [
375
- g(we, {
422
+ p(qe, {
376
423
  class: "chat-input-reply",
377
- message: t(b)().reply,
378
- onReset: t(oe)
424
+ message: s(R)().reply,
425
+ onReset: s(ge)
379
426
  }, null, 8, ["message", "onReset"])
380
- ], 8, ["to"])) : l("", !0),
381
- t(b)().edit ? (i(), m(V, {
427
+ ], 8, ["to"])) : c("", !0),
428
+ s(R)().edit ? (i(), f(Q, {
382
429
  key: 3,
383
- to: "#chat-input-reply-line-" + t(y)
430
+ to: "#chat-input-reply-line-" + s(b)
384
431
  }, [
385
- g(Ke, {
432
+ p(Ee, {
386
433
  class: "chat-input-reply",
387
- message: t(b)().edit,
388
- onReset: t(se)
434
+ message: s(R)().edit,
435
+ onReset: s(ye)
389
436
  }, null, 8, ["message", "onReset"])
390
- ], 8, ["to"])) : l("", !0)
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
- Bt as default
443
+ qt as default
396
444
  };