@uzum-tech/ui 1.7.2 → 1.8.1

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 (97) hide show
  1. package/dist/index.js +1673 -996
  2. package/dist/index.prod.js +3 -3
  3. package/es/chat/index.d.ts +6 -1
  4. package/es/chat/index.js +3 -0
  5. package/es/chat/src/Chat.d.ts +19 -6
  6. package/es/chat/src/Chat.js +54 -14
  7. package/es/chat/src/ChatListItems.d.ts +7782 -0
  8. package/es/chat/src/ChatListItems.js +188 -0
  9. package/es/chat/src/ChatMessages.d.ts +7805 -0
  10. package/es/chat/src/ChatMessages.js +325 -0
  11. package/es/chat/src/ChatParts/ChatAttachment.js +4 -3
  12. package/es/chat/src/ChatParts/MainArea.d.ts +0 -2
  13. package/es/chat/src/ChatParts/MainArea.js +108 -229
  14. package/es/chat/src/ChatParts/Sidebar.js +16 -80
  15. package/es/chat/src/interface.d.ts +10 -1
  16. package/es/chat/src/styles/index.cssr.js +16 -16
  17. package/es/chat/styles/light.d.ts +1 -1
  18. package/es/chat/styles/light.js +15 -3
  19. package/es/locales/common/arDZ.js +2 -1
  20. package/es/locales/common/deDE.js +2 -1
  21. package/es/locales/common/enGB.js +2 -1
  22. package/es/locales/common/enUS.d.ts +1 -0
  23. package/es/locales/common/enUS.js +2 -1
  24. package/es/locales/common/eo.js +2 -1
  25. package/es/locales/common/esAR.js +2 -1
  26. package/es/locales/common/faIR.js +2 -1
  27. package/es/locales/common/frFR.js +2 -1
  28. package/es/locales/common/idID.js +2 -1
  29. package/es/locales/common/itIT.js +2 -1
  30. package/es/locales/common/jaJP.js +2 -1
  31. package/es/locales/common/koKR.js +2 -1
  32. package/es/locales/common/nbNO.js +2 -1
  33. package/es/locales/common/nlNL.js +2 -1
  34. package/es/locales/common/plPL.js +2 -1
  35. package/es/locales/common/ptBR.js +2 -1
  36. package/es/locales/common/ruRU.js +2 -1
  37. package/es/locales/common/skSK.js +2 -1
  38. package/es/locales/common/svSE.js +2 -1
  39. package/es/locales/common/thTH.js +2 -1
  40. package/es/locales/common/trTR.js +2 -1
  41. package/es/locales/common/ukUA.js +2 -1
  42. package/es/locales/common/viVN.js +2 -1
  43. package/es/locales/common/zhCN.js +2 -1
  44. package/es/locales/common/zhTW.js +2 -1
  45. package/es/version.d.ts +1 -1
  46. package/es/version.js +1 -1
  47. package/lib/chat/index.d.ts +6 -1
  48. package/lib/chat/index.js +9 -1
  49. package/lib/chat/src/Chat.d.ts +19 -6
  50. package/lib/chat/src/Chat.js +53 -13
  51. package/lib/chat/src/ChatListItems.d.ts +7782 -0
  52. package/lib/chat/src/ChatListItems.js +194 -0
  53. package/lib/chat/src/ChatMessages.d.ts +7805 -0
  54. package/lib/chat/src/ChatMessages.js +331 -0
  55. package/lib/chat/src/ChatParts/ChatAttachment.js +4 -3
  56. package/lib/chat/src/ChatParts/MainArea.d.ts +0 -2
  57. package/lib/chat/src/ChatParts/MainArea.js +107 -228
  58. package/lib/chat/src/ChatParts/Sidebar.js +17 -78
  59. package/lib/chat/src/interface.d.ts +10 -1
  60. package/lib/chat/src/styles/index.cssr.js +16 -16
  61. package/lib/chat/styles/light.d.ts +1 -1
  62. package/lib/chat/styles/light.js +15 -3
  63. package/lib/locales/common/arDZ.js +2 -1
  64. package/lib/locales/common/deDE.js +2 -1
  65. package/lib/locales/common/enGB.js +2 -1
  66. package/lib/locales/common/enUS.d.ts +1 -0
  67. package/lib/locales/common/enUS.js +2 -1
  68. package/lib/locales/common/eo.js +2 -1
  69. package/lib/locales/common/esAR.js +2 -1
  70. package/lib/locales/common/faIR.js +2 -1
  71. package/lib/locales/common/frFR.js +2 -1
  72. package/lib/locales/common/idID.js +2 -1
  73. package/lib/locales/common/itIT.js +2 -1
  74. package/lib/locales/common/jaJP.js +2 -1
  75. package/lib/locales/common/koKR.js +2 -1
  76. package/lib/locales/common/nbNO.js +2 -1
  77. package/lib/locales/common/nlNL.js +2 -1
  78. package/lib/locales/common/plPL.js +2 -1
  79. package/lib/locales/common/ptBR.js +2 -1
  80. package/lib/locales/common/ruRU.js +2 -1
  81. package/lib/locales/common/skSK.js +2 -1
  82. package/lib/locales/common/svSE.js +2 -1
  83. package/lib/locales/common/thTH.js +2 -1
  84. package/lib/locales/common/trTR.js +2 -1
  85. package/lib/locales/common/ukUA.js +2 -1
  86. package/lib/locales/common/viVN.js +2 -1
  87. package/lib/locales/common/zhCN.js +2 -1
  88. package/lib/locales/common/zhTW.js +2 -1
  89. package/lib/version.d.ts +1 -1
  90. package/lib/version.js +1 -1
  91. package/package.json +1 -1
  92. package/volar.d.ts +2 -0
  93. package/web-types.json +149 -1
  94. package/es/chat/src/ChatGlobalState.d.ts +0 -13
  95. package/es/chat/src/ChatGlobalState.js +0 -32
  96. package/lib/chat/src/ChatGlobalState.d.ts +0 -13
  97. package/lib/chat/src/ChatGlobalState.js +0 -36
@@ -0,0 +1,331 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.chatMessagesProps = void 0;
7
+ const vue_1 = require("vue");
8
+ const interface_1 = require("./interface");
9
+ const ChatAttachment_1 = __importDefault(require("./ChatParts/ChatAttachment"));
10
+ const icon_1 = require("../../icon");
11
+ const skeleton_1 = require("../../skeleton");
12
+ const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
13
+ const styles_1 = require("../styles");
14
+ const _mixins_1 = require("../../_mixins");
15
+ const icons_1 = require("../../_internal/icons");
16
+ const statusIconMapper = {
17
+ [interface_1.MessageStatus.READ]: icons_1.CheckmarkDoneSharp,
18
+ [interface_1.MessageStatus.PENDING]: icons_1.MdTime,
19
+ [interface_1.MessageStatus.RETRY]: icons_1.Refresh,
20
+ [interface_1.MessageStatus.UNREAD]: icons_1.CheckmarkDoneSharp
21
+ };
22
+ exports.chatMessagesProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { messages: {
23
+ type: Array,
24
+ default: () => []
25
+ }, loading: {
26
+ type: Boolean,
27
+ default: false
28
+ }, loadingCount: {
29
+ type: Number,
30
+ default: 5
31
+ }, typingChatIds: {
32
+ type: Array,
33
+ default: () => []
34
+ }, selectedChatId: {
35
+ type: [String, Number, Symbol],
36
+ default: undefined
37
+ }, typingText: {
38
+ type: String,
39
+ default: undefined
40
+ }, retryText: {
41
+ type: String,
42
+ default: undefined
43
+ }, uploadProps: {
44
+ type: Object,
45
+ default: undefined
46
+ }, showUnreadNotification: {
47
+ type: Boolean,
48
+ default: false
49
+ }, unreadNotificationText: {
50
+ type: String,
51
+ default: undefined
52
+ }, unreadNotificationCount: {
53
+ type: Number,
54
+ default: undefined
55
+ }, onMessageRetry: {
56
+ type: Function,
57
+ default: undefined
58
+ } });
59
+ exports.default = (0, vue_1.defineComponent)({
60
+ name: 'ChatMessages',
61
+ props: exports.chatMessagesProps,
62
+ setup(props, { slots }) {
63
+ var _a;
64
+ const UChat = (0, vue_1.inject)(interface_1.chatInjectionKey, null);
65
+ const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
66
+ const themeRef = (_a = UChat === null || UChat === void 0 ? void 0 : UChat.mergedThemeRef) !== null && _a !== void 0 ? _a : (0, _mixins_1.useTheme)('Chat', '-chat', index_cssr_1.default, styles_1.chatLight, props, mergedClsPrefixRef);
67
+ const { localeRef } = (0, _mixins_1.useLocale)('Chat');
68
+ const cssVarsRef = (0, vue_1.computed)(() => {
69
+ const { common: { cubicBezierEaseInOut, brandPrimary500, staticGreen, staticRed, textPrimary, textSecondary, textTertiary }, self: { backgroundColor, borderColor, mainBackgroundColor, headerBackgroundColor, headerBorderColor, headerTitleColor, messageBubbleBackgroundColorOwn, messageBubbleBackgroundColorOther, messageBubbleTextColorOwn, messageBubbleTextColorOther, messageTimeColor, messageStatusColor, attachmentBackgroundColorOwn, attachmentBackgroundColorOther, unreadNotificationBackgroundColor, unreadNotificationTextColor, typingIndicatorColor, dateSeparatorColor, dateSeparatorBackgroundColor, borderRadius, errorColor } } = themeRef.value;
70
+ return {
71
+ '--u-bezier': cubicBezierEaseInOut,
72
+ '--u-color-primary': brandPrimary500,
73
+ '--u-color-success': staticGreen,
74
+ '--u-color-error': errorColor || staticRed,
75
+ '--u-text-color-base': textPrimary,
76
+ '--u-text-color-secondary': textSecondary,
77
+ '--u-text-color-disabled': textTertiary,
78
+ '--u-background-color': backgroundColor,
79
+ '--u-border-color': borderColor,
80
+ '--u-main-background-color': mainBackgroundColor,
81
+ '--u-header-background-color': headerBackgroundColor,
82
+ '--u-header-border-color': headerBorderColor,
83
+ '--u-header-title-color': headerTitleColor,
84
+ '--u-message-bubble-background-color-own': messageBubbleBackgroundColorOwn,
85
+ '--u-message-bubble-background-color-other': messageBubbleBackgroundColorOther,
86
+ '--u-message-bubble-text-color-own': messageBubbleTextColorOwn,
87
+ '--u-message-bubble-text-color-other': messageBubbleTextColorOther,
88
+ '--u-message-time-color': messageTimeColor,
89
+ '--u-message-status-color': messageStatusColor,
90
+ '--u-attachment-background-color-own': attachmentBackgroundColorOwn,
91
+ '--u-attachment-background-color-other': attachmentBackgroundColorOther,
92
+ '--u-unread-notification-background-color': unreadNotificationBackgroundColor,
93
+ '--u-unread-notification-text-color': unreadNotificationTextColor,
94
+ '--u-typing-indicator-color': typingIndicatorColor,
95
+ '--u-date-separator-color': dateSeparatorColor,
96
+ '--u-date-separator-background-color': dateSeparatorBackgroundColor,
97
+ '--u-border-radius': borderRadius
98
+ };
99
+ });
100
+ const themeClassHandle = (0, _mixins_1.useThemeClass)('chat-messages', (0, vue_1.computed)(() => ''), cssVarsRef, props);
101
+ const mergedTypingTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.typingText) !== null && _a !== void 0 ? _a : localeRef.value.typingText; });
102
+ const mergedRetryTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.retryText) !== null && _a !== void 0 ? _a : localeRef.value.retryText; });
103
+ const mergedUnreadNotificationTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.unreadNotificationText) !== null && _a !== void 0 ? _a : localeRef.value.unreadNotificationText; });
104
+ const unreadMessagesCount = (0, vue_1.computed)(() => {
105
+ if (!props.messages)
106
+ return 0;
107
+ return props.messages.filter((msg) => !msg.isOwn && msg.status === interface_1.MessageStatus.UNREAD).length;
108
+ });
109
+ const handleMessageRetry = (message) => {
110
+ var _a;
111
+ (_a = props.onMessageRetry) === null || _a === void 0 ? void 0 : _a.call(props, message);
112
+ };
113
+ const renderDateSeparator = (date) => {
114
+ return ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__date-separator` },
115
+ (0, vue_1.h)("span", null, date)));
116
+ };
117
+ const renderUnreadNotification = () => {
118
+ var _a;
119
+ const count = (_a = props.unreadNotificationCount) !== null && _a !== void 0 ? _a : unreadMessagesCount.value;
120
+ return ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__unread-notification` },
121
+ (0, vue_1.h)("span", null,
122
+ count,
123
+ " ",
124
+ mergedUnreadNotificationTextRef.value)));
125
+ };
126
+ const renderMarkMessage = (message) => {
127
+ const markTypeClass = message.markType === interface_1.ChatMarkType.SYSTEM
128
+ ? 'system'
129
+ : message.markType === interface_1.ChatMarkType.EVENT
130
+ ? 'event'
131
+ : 'divider';
132
+ return ((0, vue_1.h)("div", { key: message.id, class: [
133
+ `${mergedClsPrefixRef.value}-chat-main__mark`,
134
+ `${mergedClsPrefixRef.value}-chat-main__mark--${markTypeClass}`
135
+ ] }, message.content && (0, vue_1.h)("span", null, message.content)));
136
+ };
137
+ const renderMessage = (message) => {
138
+ const isOwn = message.isOwn;
139
+ const attachments = message.attachment
140
+ ? Array.isArray(message.attachment)
141
+ ? message.attachment
142
+ : [message.attachment]
143
+ : [];
144
+ return ((0, vue_1.h)("div", { key: message.id, class: [
145
+ `${mergedClsPrefixRef.value}-chat-main__message`,
146
+ isOwn
147
+ ? `${mergedClsPrefixRef.value}-chat-main__message--own`
148
+ : `${mergedClsPrefixRef.value}-chat-main__message--other`
149
+ ] },
150
+ (0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__message-wrapper` },
151
+ message.content || attachments.length > 1 ? ((0, vue_1.h)("div", { class: [
152
+ `${mergedClsPrefixRef.value}-chat-main__message-bubble`,
153
+ isOwn
154
+ ? `${mergedClsPrefixRef.value}-chat-main__message-bubble--own`
155
+ : `${mergedClsPrefixRef.value}-chat-main__message-bubble--other`
156
+ ] },
157
+ attachments.length > 0 && ((0, vue_1.h)(ChatAttachment_1.default, { message: message, attachments: attachments, uploadProps: props.uploadProps, withPadding: true }, {
158
+ default: slots.messageAttachment,
159
+ 'upload-file-title': slots.messageAttachmentTitle,
160
+ 'upload-file-subtitle': slots.messageAttachmentSubtitle
161
+ })),
162
+ message.content && ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__message-text` }, message.content)))) : attachments.length === 1 ? ((0, vue_1.h)(ChatAttachment_1.default, { message: message, attachments: attachments, uploadProps: props.uploadProps }, {
163
+ default: slots.messageAttachment,
164
+ 'upload-file-title': slots.messageAttachmentTitle,
165
+ 'upload-file-subtitle': slots.messageAttachmentSubtitle
166
+ })) : null,
167
+ (0, vue_1.h)("div", { class: [
168
+ `${mergedClsPrefixRef.value}-chat-main__message-meta`,
169
+ isOwn
170
+ ? `${mergedClsPrefixRef.value}-chat-main__message-meta--own`
171
+ : `${mergedClsPrefixRef.value}-chat-main__message-meta--other`,
172
+ message.status === interface_1.MessageStatus.RETRY &&
173
+ `${mergedClsPrefixRef.value}-chat-main__message-meta--retry`
174
+ ] }, message.status === interface_1.MessageStatus.RETRY ? ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__message-retry`, onClick: () => {
175
+ handleMessageRetry(message);
176
+ }, style: { cursor: 'pointer' } },
177
+ (0, vue_1.h)(icon_1.UIcon, { size: 16, component: statusIconMapper[interface_1.MessageStatus.RETRY], class: `${mergedClsPrefixRef.value}-chat-main__message-retry-icon`, theme: themeRef.value.peers.Icon, themeOverrides: themeRef.value.peerOverrides.Icon }),
178
+ (0, vue_1.h)("span", { class: `${mergedClsPrefixRef.value}-chat-main__message-retry-text` }, mergedRetryTextRef.value))) : ((0, vue_1.h)(vue_1.Fragment, null,
179
+ (0, vue_1.h)("span", { class: `${mergedClsPrefixRef.value}-chat-main__message-time` }, message.timestamp),
180
+ isOwn && message.status && ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__message-status` }, slots.messageStatus
181
+ ? slots.messageStatus(message)
182
+ : statusIconMapper[message.status] && ((0, vue_1.h)(icon_1.UIcon, { size: 16, component: statusIconMapper[message.status], class: [
183
+ `${mergedClsPrefixRef.value}-chat-main__message-status-icon`,
184
+ `${mergedClsPrefixRef.value}-chat-main__message-status-icon--${String(message.status)}`
185
+ ], theme: themeRef.value.peers.Icon, themeOverrides: themeRef.value.peerOverrides.Icon }))))))))));
186
+ };
187
+ const renderTypingIndicator = () => {
188
+ return ((0, vue_1.h)("div", { class: [
189
+ `${mergedClsPrefixRef.value}-chat-main__message`,
190
+ `${mergedClsPrefixRef.value}-chat-main__message--other`
191
+ ] },
192
+ (0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__message-wrapper` },
193
+ (0, vue_1.h)("div", { class: [
194
+ `${mergedClsPrefixRef.value}-chat-main__message-bubble`,
195
+ `${mergedClsPrefixRef.value}-chat-main__message-bubble--other`,
196
+ `${mergedClsPrefixRef.value}-chat-main__message-bubble--typing`
197
+ ] }),
198
+ (0, vue_1.h)("div", { class: [
199
+ `${mergedClsPrefixRef.value}-chat-main__message-meta`,
200
+ `${mergedClsPrefixRef.value}-chat-main__message-meta--other`
201
+ ] },
202
+ (0, vue_1.h)("span", { class: `${mergedClsPrefixRef.value}-chat-main__message-time` }, mergedTypingTextRef.value)))));
203
+ };
204
+ const renderSkeletonMessage = (isOwn, index) => {
205
+ return ((0, vue_1.h)("div", { key: `skeleton-${index}`, class: [
206
+ `${mergedClsPrefixRef.value}-chat-main__message`,
207
+ isOwn
208
+ ? `${mergedClsPrefixRef.value}-chat-main__message--own`
209
+ : `${mergedClsPrefixRef.value}-chat-main__message--other`
210
+ ] },
211
+ (0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__message-wrapper` },
212
+ (0, vue_1.h)("div", { class: [
213
+ `${mergedClsPrefixRef.value}-chat-main__message-bubble`,
214
+ isOwn
215
+ ? `${mergedClsPrefixRef.value}-chat-main__message-bubble--own`
216
+ : `${mergedClsPrefixRef.value}-chat-main__message-bubble--other`
217
+ ] },
218
+ (0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__message-text` },
219
+ (0, vue_1.h)("div", { style: { width: '376px', height: '20px' } }))),
220
+ (0, vue_1.h)("div", { class: [
221
+ `${mergedClsPrefixRef.value}-chat-main__message-meta`,
222
+ isOwn
223
+ ? `${mergedClsPrefixRef.value}-chat-main__message-meta--own`
224
+ : `${mergedClsPrefixRef.value}-chat-main__message-meta--other`
225
+ ] },
226
+ (0, vue_1.h)(skeleton_1.USkeleton, { style: { width: '36px', height: '20px', borderRadius: '4px' } })))));
227
+ };
228
+ return {
229
+ mergedClsPrefixRef,
230
+ mergedTheme: themeRef,
231
+ renderMessage,
232
+ renderMarkMessage,
233
+ renderTypingIndicator,
234
+ renderSkeletonMessage,
235
+ renderDateSeparator,
236
+ renderUnreadNotification,
237
+ cssVars: cssVarsRef,
238
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
239
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
240
+ };
241
+ },
242
+ render() {
243
+ var _a, _b, _c;
244
+ (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);
245
+ const { mergedClsPrefixRef, renderMessage, renderMarkMessage, renderTypingIndicator, renderSkeletonMessage, renderDateSeparator, renderUnreadNotification } = this;
246
+ if (this.loading) {
247
+ return ((0, vue_1.h)("div", { class: [`${mergedClsPrefixRef}-chat`, this.themeClass], style: this.cssVars },
248
+ (0, vue_1.h)("div", { class: `${mergedClsPrefixRef}-chat-main`, style: {
249
+ border: 'none',
250
+ borderRadius: '0',
251
+ padding: '0',
252
+ background: 'transparent'
253
+ } },
254
+ (0, vue_1.h)("div", { class: `${mergedClsPrefixRef}-chat-main__messages` }, Array.from({ length: this.loadingCount || 5 }).map((_, index) => {
255
+ const isOwn = index % 2 === 0;
256
+ return renderSkeletonMessage(isOwn, index);
257
+ })))));
258
+ }
259
+ const messagesWithDates = [];
260
+ let currentDate = '';
261
+ let unreadNotificationInserted = false;
262
+ (_b = this.messages) === null || _b === void 0 ? void 0 : _b.forEach((message, index) => {
263
+ const messageDate = message.date || '';
264
+ if (messageDate !== currentDate) {
265
+ messagesWithDates.push({
266
+ type: 'date-separator',
267
+ date: messageDate,
268
+ id: `date-${String(index)}`
269
+ });
270
+ currentDate = messageDate;
271
+ }
272
+ if (!unreadNotificationInserted &&
273
+ !message.isOwn &&
274
+ message.status === interface_1.MessageStatus.UNREAD &&
275
+ this.showUnreadNotification) {
276
+ messagesWithDates.push({
277
+ type: 'unread-notification',
278
+ id: 'unread-notification'
279
+ });
280
+ unreadNotificationInserted = true;
281
+ }
282
+ messagesWithDates.push(Object.assign({ type: 'message' }, message));
283
+ });
284
+ if (!unreadNotificationInserted && this.showUnreadNotification) {
285
+ const unreadCount = this.unreadNotificationCount || 0;
286
+ let incomingMessagesFound = 0;
287
+ let insertIndex = messagesWithDates.length;
288
+ for (let i = messagesWithDates.length - 1; i >= 0; i--) {
289
+ const item = messagesWithDates[i];
290
+ if (item.type === 'message') {
291
+ const message = item;
292
+ if (!message.isOwn) {
293
+ incomingMessagesFound++;
294
+ if (incomingMessagesFound === unreadCount) {
295
+ insertIndex = i;
296
+ break;
297
+ }
298
+ }
299
+ }
300
+ }
301
+ messagesWithDates.splice(insertIndex, 0, {
302
+ type: 'unread-notification',
303
+ id: 'unread-notification'
304
+ });
305
+ }
306
+ const isTyping = this.selectedChatId && ((_c = this.typingChatIds) === null || _c === void 0 ? void 0 : _c.includes(this.selectedChatId));
307
+ return ((0, vue_1.h)("div", { class: [`${mergedClsPrefixRef}-chat`, this.themeClass], style: this.cssVars },
308
+ (0, vue_1.h)("div", { class: `${mergedClsPrefixRef}-chat-main`, style: {
309
+ border: 'none',
310
+ borderRadius: '0',
311
+ padding: '0',
312
+ background: 'transparent'
313
+ } },
314
+ (0, vue_1.h)("div", { class: `${mergedClsPrefixRef}-chat-main__messages-container` },
315
+ messagesWithDates.map((item) => {
316
+ var _a;
317
+ if (item.type === 'date-separator') {
318
+ return renderDateSeparator((_a = item.date) !== null && _a !== void 0 ? _a : '');
319
+ }
320
+ if (item.type === 'unread-notification') {
321
+ return renderUnreadNotification();
322
+ }
323
+ const message = item;
324
+ if (message.type === interface_1.ChatMessageType.MARK) {
325
+ return renderMarkMessage(message);
326
+ }
327
+ return renderMessage(message);
328
+ }),
329
+ isTyping && renderTypingIndicator()))));
330
+ }
331
+ });
@@ -49,8 +49,8 @@ exports.default = (0, vue_1.defineComponent)({
49
49
  gap: '2px',
50
50
  marginTop: '0'
51
51
  }
52
- : undefined, showRemoveButton: false, showDownloadButton: props.attachments.some((att) => att.status === 'finished'), showRetryButton: props.attachments.some((att) => att.status === 'error') }, props.uploadProps),
53
- (0, vue_1.h)(upload_1.UUploadFileList, null, {
52
+ : undefined, showRemoveButton: false, showDownloadButton: props.attachments.some((att) => att.status === 'finished'), showRetryButton: props.attachments.some((att) => att.status === 'error') }, props.uploadProps), {
53
+ default: () => ((0, vue_1.h)(upload_1.UUploadFileList, null, {
54
54
  'upload-file-title': slots['upload-file-title']
55
55
  ? ({ file }) => { var _a; return (_a = slots['upload-file-title']) === null || _a === void 0 ? void 0 : _a.call(slots, file); }
56
56
  : undefined,
@@ -61,7 +61,8 @@ exports.default = (0, vue_1.defineComponent)({
61
61
  const att = props.attachments.find((a) => a.name === file.name);
62
62
  return ((0, vue_1.h)("span", { style: { fontSize: '12px', color: '#999' } }, (att === null || att === void 0 ? void 0 : att.size) || ((_a = file.file) === null || _a === void 0 ? void 0 : _a.size)));
63
63
  }
64
- })));
64
+ }))
65
+ }));
65
66
  if (props.withPadding) {
66
67
  return (0, vue_1.h)("div", { style: { padding: '2px' } }, uploadComponent);
67
68
  }
@@ -2,8 +2,6 @@ declare const _default: import("vue").DefineComponent<{}, {
2
2
  renderHeader: () => JSX.Element;
3
3
  renderMessages: () => JSX.Element;
4
4
  renderFooter: () => JSX.Element;
5
- renderUnreadNotification: () => JSX.Element | null;
6
- showUnreadNotification: import("vue").ComputedRef<boolean>;
7
5
  messagesBodyRef: import("vue").Ref<HTMLElement | {
8
6
  $el: HTMLElement;
9
7
  } | undefined>;