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