quickblox-react-ui-kit 0.5.0 → 0.5.1-beta.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.
- package/dist/Data/dto/file/LocalFileDTO.d.ts +1 -1
- package/dist/Data/dto/file/LocalFileDTO.d.ts.map +1 -1
- package/dist/Data/dto/file/RemoteFileDTO.d.ts +1 -1
- package/dist/Data/dto/file/RemoteFileDTO.d.ts.map +1 -1
- package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts.map +1 -1
- package/dist/Data/source/remote/RemoteDataSource.d.ts.map +1 -1
- package/dist/Domain/entity/ChatMessageAttachmentEntity.d.ts +1 -1
- package/dist/Domain/entity/ChatMessageAttachmentEntity.d.ts.map +1 -1
- package/dist/Domain/entity/FileEntity.d.ts +1 -1
- package/dist/Domain/entity/FileEntity.d.ts.map +1 -1
- package/dist/Presentation/Views/Dialog/MessageItem/MessageItem.d.ts.map +1 -1
- package/dist/Presentation/Views/Dialog/useDialogViewModel.d.ts.map +1 -1
- package/dist/index-ui.js +7804 -8165
- package/package.json +2 -2
- package/src/Data/DefaultConfigurations.ts +1 -1
- package/src/Data/dto/file/LocalFileDTO.ts +1 -1
- package/src/Data/dto/file/RemoteFileDTO.ts +1 -1
- package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +26 -13
- package/src/Data/source/remote/RemoteDataSource.ts +14 -7
- package/src/Domain/entity/ChatMessageAttachmentEntity.ts +1 -1
- package/src/Domain/entity/FileEntity.ts +1 -1
- package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +6 -1
- package/src/Presentation/Views/Dialog/SystemMessageBanner/SystemMessageBanner.scss +0 -1
- package/src/Presentation/Views/Dialog/useDialogViewModel.ts +21 -0
- package/src/Presentation/Views/DialogInfo/DialogInfo.scss +4 -2
- package/src/QBconfig.ts +2 -2
- package/storybook-static/363.a2d33b79.iframe.bundle.js +2 -0
- package/storybook-static/{363.2cb21716.iframe.bundle.js.LICENSE.txt → 363.a2d33b79.iframe.bundle.js.LICENSE.txt} +0 -13
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.9b4b2514.iframe.bundle.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/{runtime~main.7d4dacf8.iframe.bundle.js → runtime~main.940703c6.iframe.bundle.js} +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +3 -3
- package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
- package/storybook-static/363.2cb21716.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.729e41fc.iframe.bundle.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickblox-react-ui-kit",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1-beta.1",
|
|
4
4
|
"main": "dist/index-ui.js",
|
|
5
5
|
"types": "dist/index-ui.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"qb-ai-core": "^0.1.3",
|
|
13
13
|
"qb-ai-rephrase": "^0.1.2",
|
|
14
14
|
"qb-ai-translate": "^0.1.2",
|
|
15
|
-
"quickblox": "^2.19.
|
|
15
|
+
"quickblox": "^2.19.3-beta.4",
|
|
16
16
|
"media-recorder-js": "^2.1.0",
|
|
17
17
|
"react": "^19.0.0",
|
|
18
18
|
"react-dom": "^19.0.0",
|
|
@@ -188,20 +188,33 @@ export class MessageDTOMapper implements IDTOMapper {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
//
|
|
191
|
-
public static convertAttachment(
|
|
192
|
-
|
|
193
|
-
): ChatMessageAttachment {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
191
|
+
// public static convertAttachment(
|
|
192
|
+
// attachment: ChatMessageAttachmentEntity,
|
|
193
|
+
// ): ChatMessageAttachment {
|
|
194
|
+
// return {
|
|
195
|
+
// id: attachment.id.toString(),
|
|
196
|
+
// uid: attachment.uid || '',
|
|
197
|
+
// type: attachment.type.toString(),
|
|
198
|
+
// url: attachment.url || '',
|
|
199
|
+
// name: attachment.name || '',
|
|
200
|
+
// size: attachment.size || 0,
|
|
201
|
+
// };
|
|
202
|
+
// }
|
|
203
|
+
public static convertAttachment(
|
|
204
|
+
attachment: ChatMessageAttachmentEntity,
|
|
205
|
+
): ChatMessageAttachment {
|
|
206
|
+
return {
|
|
207
|
+
id: attachment.id.toString(),
|
|
208
|
+
uid: attachment.uid?.toString() || '',
|
|
209
|
+
type: attachment.type.toString(),
|
|
210
|
+
url: attachment.url?.toString() || '',
|
|
211
|
+
name: attachment.name?.toString() || '',
|
|
212
|
+
size: attachment.size?.toString() || '',
|
|
213
|
+
} as ChatMessageAttachment;
|
|
214
|
+
}
|
|
215
|
+
|
|
203
216
|
|
|
204
|
-
|
|
217
|
+
public static convertToQBChatNewMessage(
|
|
205
218
|
messages: RemoteMessageDTO[],
|
|
206
219
|
): QBChatMessage[] {
|
|
207
220
|
return messages.map((message) => {
|
|
@@ -1729,13 +1729,20 @@ export class RemoteDataSource implements IRemoteDataSource {
|
|
|
1729
1729
|
if (dto.attachments?.length > 0) {
|
|
1730
1730
|
qbEntity.extension.attachments = [];
|
|
1731
1731
|
dto.attachments.forEach((att) => {
|
|
1732
|
-
const chatMessageAttachment: ChatMessageAttachment = {
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
};
|
|
1732
|
+
// const chatMessageAttachment: ChatMessageAttachment = {
|
|
1733
|
+
// id: att.id,
|
|
1734
|
+
// name: att.name,
|
|
1735
|
+
// size: att.size,
|
|
1736
|
+
// type: att.type.toString(),
|
|
1737
|
+
// uid: att.uid,
|
|
1738
|
+
// };
|
|
1739
|
+
const chatMessageAttachment: ChatMessageAttachment = {
|
|
1740
|
+
id: att.id?.toString(),
|
|
1741
|
+
name: att.name?.toString(),
|
|
1742
|
+
size: att.size?.toString(),
|
|
1743
|
+
type: att.type?.toString(),
|
|
1744
|
+
uid: att.uid?.toString(),
|
|
1745
|
+
};
|
|
1739
1746
|
|
|
1740
1747
|
qbEntity.extension.attachments?.push(chatMessageAttachment);
|
|
1741
1748
|
});
|
|
@@ -196,10 +196,15 @@ export default function MessageItem({
|
|
|
196
196
|
return (
|
|
197
197
|
<>
|
|
198
198
|
{message.qb_original_messages.map((nestedMessage) => {
|
|
199
|
+
const senderNameNestedMessage =
|
|
200
|
+
nestedMessage.sender?.full_name ||
|
|
201
|
+
nestedMessage.sender?.login ||
|
|
202
|
+
nestedMessage.sender?.email ||
|
|
203
|
+
'';
|
|
199
204
|
return (
|
|
200
205
|
<Message
|
|
201
206
|
key={nestedMessage.id}
|
|
202
|
-
userName={
|
|
207
|
+
userName={senderNameNestedMessage}
|
|
203
208
|
status={getStatusMessage(nestedMessage)}
|
|
204
209
|
time={getTimeShort24hFormat(message.date_sent)}
|
|
205
210
|
type={currentMessageType}
|
|
@@ -236,6 +236,27 @@ export default function useDialogViewModel(
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
if (message.qb_original_messages) {
|
|
240
|
+
const nestedObj = message.qb_original_messages
|
|
241
|
+
if (nestedObj && nestedObj.length > 0) {
|
|
242
|
+
if (userDictionary) {
|
|
243
|
+
nestedObj[0].sender = userDictionary[nestedObj[0].sender_id];
|
|
244
|
+
if (
|
|
245
|
+
nestedObj[0].sender &&
|
|
246
|
+
nestedObj[0].sender.full_name &&
|
|
247
|
+
regex &&
|
|
248
|
+
!regex.test(nestedObj[0].sender.full_name)
|
|
249
|
+
) {
|
|
250
|
+
nestedObj[0].sender.full_name = 'Unknown';
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
obj.qb_original_messages = nestedObj
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
|
|
239
260
|
return obj;
|
|
240
261
|
});
|
|
241
262
|
|
|
@@ -80,15 +80,17 @@ $dialog-information-container-dialog-information-height: 64px;
|
|
|
80
80
|
overflow: visible;
|
|
81
81
|
}
|
|
82
82
|
.dialog-information-profile-dialog-name {
|
|
83
|
-
margin-top: 8px;
|
|
84
83
|
color: var(--main-text, #0b1b0f);
|
|
85
84
|
text-align: center;
|
|
86
85
|
font: var(--title-title-medium);
|
|
87
86
|
left: 134.5px;
|
|
88
87
|
top: 112px;
|
|
89
|
-
display: flex;
|
|
90
88
|
align-items: center;
|
|
91
89
|
justify-content: center;
|
|
90
|
+
margin: 8px 12px 0 12px;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
92
94
|
}
|
|
93
95
|
.dialog-information-profile-edit {
|
|
94
96
|
right: -10px;
|
package/src/QBconfig.ts
CHANGED
|
@@ -123,11 +123,11 @@ export const QBConfig: QBUIKitConfig = {
|
|
|
123
123
|
},
|
|
124
124
|
appConfig: {
|
|
125
125
|
maxFileSize: 10485760,
|
|
126
|
-
sessionTimeOut:
|
|
126
|
+
sessionTimeOut: 119,
|
|
127
127
|
chatProtocol: {
|
|
128
128
|
active: 2,
|
|
129
129
|
},
|
|
130
|
-
pingLocalhostTimeInterval:
|
|
130
|
+
pingLocalhostTimeInterval: 5,
|
|
131
131
|
chatReconnectionTimeInterval: 3,
|
|
132
132
|
debug: true,
|
|
133
133
|
enableForwarding: true,
|