quickblox-react-ui-kit 0.5.0-beta.5 → 0.5.0-beta.7

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 (49) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/Data/source/remote/Mapper/DialogDTOMapper.d.ts.map +1 -1
  3. package/dist/Data/source/remote/RemoteDataSource.d.ts +5 -0
  4. package/dist/Data/source/remote/RemoteDataSource.d.ts.map +1 -1
  5. package/dist/Presentation/ui-components/DialogItemPreview/DialogItemPreview.d.ts +2 -2
  6. package/dist/Presentation/ui-components/DialogItemPreview/DialogItemPreview.d.ts.map +1 -1
  7. package/dist/Presentation/ui-components/Message/Message.d.ts.map +1 -1
  8. package/dist/Presentation/ui-components/MessageInput/MessageInput.d.ts.map +1 -1
  9. package/dist/hooks/useQuickBloxUIKit.d.ts.map +1 -1
  10. package/dist/index-ui.js +223 -84
  11. package/global.d.ts +4 -0
  12. package/package.json +1 -1
  13. package/src/Data/source/remote/Mapper/DialogDTOMapper.ts +26 -7
  14. package/src/Data/source/remote/RemoteDataSource.ts +157 -76
  15. package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.scss +6 -0
  16. package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.tsx +2 -2
  17. package/src/Presentation/Views/Dialog/Dialog.scss +7 -1
  18. package/src/Presentation/Views/DialogInfo/DialogInfo.scss +1 -1
  19. package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +1 -1
  20. package/src/Presentation/themes/styles/_theme_dark.scss +1 -1
  21. package/src/Presentation/themes/styles/_theme_light.scss +1 -1
  22. package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.tsx +3 -1
  23. package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx +2 -2
  24. package/src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.scss +7 -0
  25. package/src/Presentation/ui-components/Message/Message.scss +4 -0
  26. package/src/Presentation/ui-components/Message/Message.tsx +12 -2
  27. package/src/Presentation/ui-components/MessageInput/MessageInput.scss +4 -0
  28. package/src/Presentation/ui-components/MessageInput/MessageInput.tsx +64 -63
  29. package/src/Presentation/ui-components/TextField/TextField.scss +3 -0
  30. package/src/Presentation/ui-components/UserListItem/UserListItem.scss +5 -0
  31. package/src/hooks/useQuickBloxUIKit.ts +50 -6
  32. package/storybook-static/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.0d762d0d.iframe.bundle.js → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.4e25a94d.iframe.bundle.js} +2 -2
  33. package/storybook-static/Presentation-ui-components-Message-Message-stories.b63e0d9f.iframe.bundle.js +2 -0
  34. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.4015ee79.iframe.bundle.js +1 -0
  35. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.19812f7d.iframe.bundle.js +2 -0
  36. package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.d2f60e13.iframe.bundle.js +2 -0
  37. package/storybook-static/iframe.html +2 -2
  38. package/storybook-static/main.c2fb2ab0.iframe.bundle.js +1 -0
  39. package/storybook-static/project.json +1 -1
  40. package/storybook-static/{runtime~main.764e618f.iframe.bundle.js → runtime~main.edd70ea8.iframe.bundle.js} +1 -1
  41. package/storybook-static/Presentation-ui-components-Message-Message-stories.83658a4d.iframe.bundle.js +0 -2
  42. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.777e8a38.iframe.bundle.js +0 -1
  43. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.db85d4ac.iframe.bundle.js +0 -2
  44. package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.019c5688.iframe.bundle.js +0 -2
  45. package/storybook-static/main.4f17bc46.iframe.bundle.js +0 -1
  46. /package/storybook-static/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.0d762d0d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.4e25a94d.iframe.bundle.js.LICENSE.txt} +0 -0
  47. /package/storybook-static/{Presentation-ui-components-Message-Message-stories.83658a4d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Message-Message-stories.b63e0d9f.iframe.bundle.js.LICENSE.txt} +0 -0
  48. /package/storybook-static/{Presentation-ui-components-TextField-TextField-stories.db85d4ac.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-TextField-TextField-stories.19812f7d.iframe.bundle.js.LICENSE.txt} +0 -0
  49. /package/storybook-static/{Presentation-ui-components-UserListItem-UserListItem-stories.019c5688.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-UserListItem-UserListItem-stories.d2f60e13.iframe.bundle.js.LICENSE.txt} +0 -0
@@ -167,13 +167,32 @@ export class DialogDTOMapper implements IDTOMapper {
167
167
  dto.participantsIds = qbDialog.occupants_ids;
168
168
  break;
169
169
  default:
170
- return Promise.reject(
171
- new MapperDTOException(
172
- UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE,
173
- UNEXPECTED_MAPPER_DTO_EXCEPTION_EXCEPTION_CODE,
174
- 'undefinded type dialog in QBChatDialog',
175
- ),
176
- );
170
+ dto.id = qbDialog._id;
171
+ dto.lastMessageText = qbDialog.last_message as string;
172
+ dto.lastMessageDateSent = qbDialog.last_message_date_sent || 0;
173
+ dto.lastMessageUserId =
174
+ qbDialog.last_message_user_id === null
175
+ ? 0
176
+ : // eslint-disable-next-line @typescript-eslint/no-unsafe-call
177
+ qbDialog.last_message_user_id;
178
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
179
+ dto.ownerId = qbDialog.user_id.toString();
180
+ dto.type = qbDialog.type;
181
+ dto.unreadMessageCount =
182
+ qbDialog.unread_messages_count === null
183
+ ? 0
184
+ : qbDialog.unread_messages_count;
185
+ dto.updatedAt = qbDialog.updated_at;
186
+ dto.name = qbDialog.name;
187
+ dto.photo = qbDialog.photo === null ? '' : qbDialog.photo;
188
+ dto.participantsIds = qbDialog.occupants_ids;
189
+ // return Promise.reject(
190
+ // new MapperDTOException(
191
+ // UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE,
192
+ // UNEXPECTED_MAPPER_DTO_EXCEPTION_EXCEPTION_CODE,
193
+ // 'undefined type dialog in QBChatDialog',
194
+ // ),
195
+ // );
177
196
  }
178
197
  } catch (e) {
179
198
  console.log('MAPPER DTO ERROR for dto: ', JSON.stringify(dto));
@@ -107,6 +107,8 @@ export type AuthorizationData = {
107
107
  };
108
108
 
109
109
  export class RemoteDataSource implements IRemoteDataSource {
110
+ private processedDialogs = new Set<string>();
111
+
110
112
  private userDTOMapper: IDTOMapper;
111
113
 
112
114
  private messageDTOMapper: IDTOMapper;
@@ -217,42 +219,6 @@ export class RemoteDataSource implements IRemoteDataSource {
217
219
  return QBTranslate(smartChatAssistantId, text, languageCode);
218
220
  }
219
221
 
220
- // async updateCurrentDialog(dto: RemoteDialogDTO, qbConfig: QBUIKitConfig): Promise<void> {
221
- // this.currentDialog = dto;
222
- // //
223
- // //
224
- // const dialogsDTOtoEntityMapper: IMapper = new DialogRemoteDTOMapper();
225
- //
226
- // const dialogEntity: DialogEntity = await dialogsDTOtoEntityMapper.toEntity(
227
- // this.currentDialog,
228
- // );
229
- // const userId = this._authInformation?.userId || -1;
230
- // const dialogId = this.currentDialog.id;
231
- // const messageId = this.currentDialog.lastMessageId;
232
- // //
233
- // //
234
- // const resultMessage: DialogEventInfo = {
235
- // eventMessageType: EventMessageType.LocalMessage,
236
- // dialogInfo: dialogEntity,
237
- // messageInfo: undefined,
238
- // messageStatus: {
239
- // isTyping: false,
240
- // userId,
241
- // dialogId,
242
- // messageId,
243
- // deliveryStatus: 'delivered',
244
- // },
245
- // notificationTypes: undefined,
246
- // };
247
- //
248
- // this.subscriptionOnMessageStatus.informSubscribers(
249
- // resultMessage,
250
- // EventMessageType.LocalMessage,
251
- // );
252
- // //
253
- //
254
- // //
255
- // }
256
222
  async updateCurrentDialog(
257
223
  dto: RemoteDialogDTO,
258
224
  qbConfig: QBUIKitConfig,
@@ -421,6 +387,10 @@ export class RemoteDataSource implements IRemoteDataSource {
421
387
  }
422
388
  }
423
389
 
390
+ public resetProcessedDialogs(): void {
391
+ this.processedDialogs.clear();
392
+ }
393
+
424
394
  public async disconnectAndLogoutUser() {
425
395
  if (this.authProcessed) {
426
396
  QBChatDisconnect();
@@ -428,6 +398,7 @@ export class RemoteDataSource implements IRemoteDataSource {
428
398
  this.authProcessed = false;
429
399
  this.releaseSubscriptions();
430
400
  this.releaseEventsHandlers();
401
+ this.resetProcessedDialogs();
431
402
  }
432
403
  }
433
404
 
@@ -899,43 +870,70 @@ export class RemoteDataSource implements IRemoteDataSource {
899
870
  //
900
871
  }
901
872
 
873
+ private async processDialogs(dialogIds: string[]): Promise<void> {
874
+ await Promise.all(dialogIds.map((id) => this.joinGroupDialog(id)));
875
+ }
876
+
877
+ private async processDialogsInBackground(dialogIds: string[]): Promise<void> {
878
+ const BATCH_SIZE = 12;
879
+
880
+ console.log(`Starting background processing for ${dialogIds.length} dialogs`);
881
+
882
+ for (let i = 0; i < dialogIds.length; i += BATCH_SIZE) {
883
+ const batch = dialogIds.slice(i, i + BATCH_SIZE);
884
+
885
+ console.log(`Processing batch ${i / BATCH_SIZE + 1}:`, batch);
886
+
887
+ await Promise.all(batch.map((id) => this.joinGroupDialog(id)));
888
+ console.log(`Batch ${i / BATCH_SIZE + 1} completed.`);
889
+
890
+ await new Promise((resolve) => setTimeout(resolve, 1500));
891
+ }
892
+
893
+ console.log('Background processing complete.');
894
+ }
895
+
896
+
897
+ private async joinGroupDialog(dialogId: string): Promise<void> {
898
+ try {
899
+ await QBJoinGroupDialog(dialogId);
900
+ } catch (reason) {
901
+ console.log(`QBJoinGroupDialog error for dialog ${dialogId}:`, reason);
902
+ }
903
+ }
904
+
902
905
  async getDialogs(pagination?: Pagination): Promise<RemoteDialogsDTO> {
903
906
  let currentPagination: Pagination = pagination || new Pagination();
904
907
 
905
908
  console.log(
906
909
  'call getDialogs in RemoteDataSourceMock param pagination: ',
907
- JSON.stringify(pagination),
910
+ JSON.stringify(pagination)
908
911
  );
909
912
  console.log(
910
913
  'call getDialogs in RemoteDataSourceMock with result pagination: ',
911
- JSON.stringify(currentPagination),
914
+ JSON.stringify(currentPagination)
912
915
  );
913
- const pageNumber = currentPagination.getCurrentPage() || 1;
914
916
 
917
+ const pageNumber = currentPagination.getCurrentPage() || 1;
915
918
  console.log('pageNumber: ', pageNumber);
916
919
  const perPage = currentPagination.perPage || 100;
917
-
918
920
  console.log('perPage: ', perPage);
921
+
919
922
  const params = {
920
- created_at: {
921
- lt: Date.now() / 1000,
922
- },
923
- // sort_desc: 'created_at',// artan 19.0.2024
923
+ created_at: { lt: Date.now() / 1000 },
924
924
  sort_desc: 'updated_at',
925
925
  page: pageNumber,
926
- // per_page: perPage,
927
926
  limit: perPage,
928
- type: {
929
- in: [2, 3],
930
- },
927
+ type: { in: [2, 3] },
931
928
  };
932
- // filter['type[in]'] = [3, 2].join(',');
933
929
 
934
930
  console.log(
935
931
  'call getDialogs in RemoteDataSourceMock with params: ',
936
- JSON.stringify(params),
932
+ JSON.stringify(params)
937
933
  );
934
+
938
935
  const dialogsDTO: Array<RemoteDialogDTO> = [];
936
+ const joinDialogIds: string[] = [];
939
937
  const qbDialogs: QBGetDialogResult | undefined = await QBGetDialogs(params);
940
938
 
941
939
  if (qbDialogs) {
@@ -944,50 +942,133 @@ export class RemoteDataSource implements IRemoteDataSource {
944
942
  qbDialogs.total_entries
945
943
  }, limit: ${qbDialogs.limit}, skip: ${
946
944
  qbDialogs.skip
947
- } items: ${JSON.stringify(qbDialogs.items)}`,
945
+ } items: ${JSON.stringify(qbDialogs.items)}`
948
946
  );
947
+
949
948
  currentPagination = new Pagination(0, perPage);
950
949
  currentPagination.totalPages = qbDialogs.total_entries / perPage;
951
950
  currentPagination.setCurrentPage(pageNumber);
952
951
 
953
- // eslint-disable-next-line no-restricted-syntax
954
952
  for (const item of qbDialogs.items) {
955
953
  const qbEntity: QBChatDialog = item;
954
+ if (!qbEntity) continue;
956
955
 
957
- const newDTO: RemoteDialogDTO =
958
- // eslint-disable-next-line no-await-in-loop
959
- await this.getCurrentDialogDTOMapper().toTDO(qbEntity);
960
-
961
- // artan 27/06/23
962
- if (newDTO.type === DialogType.group) {
963
- // eslint-disable-next-line no-await-in-loop
964
- await QBJoinGroupDialog(newDTO.id).catch((reason) => {
965
- console.log('getDialogs. QBJoinGroupDialog error', reason);
966
- throw new RemoteDataSourceException(
967
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
968
- INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
969
- );
970
- });
956
+ const newDTO: RemoteDialogDTO = await this.getCurrentDialogDTOMapper().toTDO(qbEntity);
957
+
958
+ if (newDTO.type === DialogType.group && !this.processedDialogs.has(newDTO.id)) {
959
+ this.processedDialogs.add(newDTO.id);
960
+ joinDialogIds.push(newDTO.id);
971
961
  }
972
962
 
973
- //
974
- const currentUserId = this._authInformation?.userId || 0;
975
- const statusMessageParams: QBMessageStatusParams = {
976
- userId: newDTO.lastMessageUserId || currentUserId,
977
- dialogId: newDTO.id,
978
- messageId: newDTO.lastMessageId,
979
- };
963
+ dialogsDTO.push(newDTO);
964
+ }
980
965
 
981
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
982
- QBChatMarkMessageDelivered(statusMessageParams);
966
+ const firstBatch = joinDialogIds.slice(0, 12);
967
+ await this.processDialogs(firstBatch);
983
968
 
984
- dialogsDTO.push(newDTO);
969
+ // Оставшиеся элементы обрабатываются асинхронно в фоне
970
+ const remainingDialogs = joinDialogIds.slice(12);
971
+ if (remainingDialogs.length) {
972
+ this.processDialogsInBackground(remainingDialogs).then();
985
973
  }
986
974
  }
987
975
 
976
+ // Возвращаем результат после первой партии
988
977
  return Promise.resolve(new RemoteDialogsDTO(dialogsDTO, currentPagination));
989
978
  }
990
979
 
980
+
981
+ // async getDialogs(pagination?: Pagination): Promise<RemoteDialogsDTO> {
982
+ // let currentPagination: Pagination = pagination || new Pagination();
983
+ //
984
+ // console.log(
985
+ // 'call getDialogs in RemoteDataSourceMock param pagination: ',
986
+ // JSON.stringify(pagination),
987
+ // );
988
+ // console.log(
989
+ // 'call getDialogs in RemoteDataSourceMock with result pagination: ',
990
+ // JSON.stringify(currentPagination),
991
+ // );
992
+ // const pageNumber = currentPagination.getCurrentPage() || 1;
993
+ //
994
+ // console.log('pageNumber: ', pageNumber);
995
+ // const perPage = currentPagination.perPage || 100;
996
+ //
997
+ // console.log('perPage: ', perPage);
998
+ // const params = {
999
+ // created_at: {
1000
+ // lt: Date.now() / 1000,
1001
+ // },
1002
+ // // sort_desc: 'created_at',// artan 19.0.2024
1003
+ // sort_desc: 'updated_at',
1004
+ // page: pageNumber,
1005
+ // // per_page: perPage,
1006
+ // limit: perPage,
1007
+ // type: {
1008
+ // in: [2, 3],
1009
+ // },
1010
+ // };
1011
+ // // filter['type[in]'] = [3, 2].join(',');
1012
+ //
1013
+ // console.log(
1014
+ // 'call getDialogs in RemoteDataSourceMock with params: ',
1015
+ // JSON.stringify(params),
1016
+ // );
1017
+ // const dialogsDTO: Array<RemoteDialogDTO> = [];
1018
+ // const qbDialogs: QBGetDialogResult | undefined = await QBGetDialogs(params);
1019
+ //
1020
+ // if (qbDialogs) {
1021
+ // console.log(
1022
+ // `request completed. have: total_entries ${
1023
+ // qbDialogs.total_entries
1024
+ // }, limit: ${qbDialogs.limit}, skip: ${
1025
+ // qbDialogs.skip
1026
+ // } items: ${JSON.stringify(qbDialogs.items)}`,
1027
+ // );
1028
+ // currentPagination = new Pagination(0, perPage);
1029
+ // currentPagination.totalPages = qbDialogs.total_entries / perPage;
1030
+ // currentPagination.setCurrentPage(pageNumber);
1031
+ //
1032
+ // // eslint-disable-next-line no-restricted-syntax
1033
+ // for (const item of qbDialogs.items) {
1034
+ // const qbEntity: QBChatDialog = item;
1035
+ // if (!qbEntity) {
1036
+ // continue;
1037
+ // }
1038
+ // const newDTO: RemoteDialogDTO =
1039
+ // // eslint-disable-next-line no-await-in-loop
1040
+ // await this.getCurrentDialogDTOMapper().toTDO(qbEntity);
1041
+ //
1042
+ // // artan 27/06/23
1043
+ // if (newDTO.type === DialogType.group) {
1044
+ // // eslint-disable-next-line no-await-in-loop
1045
+ // await QBJoinGroupDialog(newDTO.id).catch((reason) => {
1046
+ // console.log('getDialogs. QBJoinGroupDialog error', reason);
1047
+ // throw new RemoteDataSourceException(
1048
+ // INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
1049
+ // INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
1050
+ // );
1051
+ // });
1052
+ // }
1053
+ //
1054
+ // //
1055
+ // // const currentUserId = this._authInformation?.userId || 0;
1056
+ // // const statusMessageParams: QBMessageStatusParams = {
1057
+ // // userId: newDTO.lastMessageUserId || currentUserId,
1058
+ // // dialogId: newDTO.id,
1059
+ // // messageId: newDTO.lastMessageId,
1060
+ // // };
1061
+ // //
1062
+ // // // eslint-disable-next-line @typescript-eslint/no-unsafe-call
1063
+ // // QBChatMarkMessageDelivered(statusMessageParams);
1064
+ //
1065
+ // dialogsDTO.push(newDTO);
1066
+ // }
1067
+ // }
1068
+ //
1069
+ // return Promise.resolve(new RemoteDialogsDTO(dialogsDTO, currentPagination));
1070
+ // }
1071
+
991
1072
  // eslint-disable-next-line class-methods-use-this
992
1073
  async createDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO> {
993
1074
  console.log(
@@ -53,3 +53,9 @@
53
53
  height: 24px;
54
54
  position: relative;
55
55
  }
56
+
57
+ .ai-widget-actions-render {
58
+ display: flex;
59
+ align-items: center;
60
+ padding-right: 8px;
61
+ }
@@ -17,7 +17,7 @@ type ContextMenuProps = {
17
17
 
18
18
  const ContextMenuStyles: { [key: string]: CSSProperties } = {
19
19
  contextMenuIcon: {
20
- display: 'inline-block',
20
+ // display: 'inline-block',
21
21
  position: 'relative',
22
22
  maxWidth: '42px',
23
23
  maxHeight: '42px',
@@ -84,7 +84,7 @@ function AIWidgetActions({
84
84
 
85
85
  return (
86
86
  <div style={ContextMenuStyles.contextMenuIcon}>
87
- <div onClick={handleClick}>{widgetToRender || <EditDots />}</div>
87
+ <div className="ai-widget-actions-render" onClick={handleClick}>{widgetToRender || <EditDots />}</div>
88
88
  {menuVisible && (
89
89
  // <div ref={contextMenuRef} style={ContextMenuStyles.contextMenuContent}>
90
90
  <div
@@ -26,7 +26,13 @@ $message-view-container-ai-translate-text-color: var(--tertiary-elements);
26
26
  &--header{
27
27
  min-height: $message-view-container-header-min-height;
28
28
  max-height: $message-view-container-header-min-height;
29
- width: 100%
29
+ width: 100%;
30
+
31
+ .dialog-header{
32
+ &__title {
33
+ font: var(--title-title-medium);
34
+ }
35
+ }
30
36
  }
31
37
  &--information{
32
38
  background-color: $message-view-container-information-background-color;
@@ -22,7 +22,7 @@ $dialog-information-container-dialog-information-height: 64px;
22
22
  svg {
23
23
  width: 24px;
24
24
  height: 24px;
25
- fill: var(--main-text);
25
+ fill: var(--secondary-elements);
26
26
  }
27
27
  }
28
28
  }
@@ -611,7 +611,7 @@ const QuickBloxUIKitDesktopLayout = ({
611
611
  }}
612
612
  rephrase={
613
613
  <AIRephraseWidget
614
- disableActions={!isOnline}
614
+ disableActions={!isOnline || messageText.length === 0}
615
615
  waitAIWidget={waitAIWidget}
616
616
  messageText={messageText}
617
617
  theme={theme}
@@ -29,7 +29,7 @@ html[data-theme='dark'] {
29
29
  --incoming-background: #{$secondary-400};
30
30
  --outgoing-background: #{$primary-500};
31
31
  --dropdown-background: #{$secondary-400};
32
- --chat-input: #{$secondary-800};
32
+ --chat-input: #{$secondary-400};
33
33
  --divider: #{$secondary-400};
34
34
  --error: #{$error-300};
35
35
  --error-secondary: #{$error-100};
@@ -30,7 +30,7 @@
30
30
  --incoming-background: #{$secondary-50};
31
31
  --outgoing-background: #{$primary-50};
32
32
  --dropdown-background: #{$primary-a-100};
33
- --chat-input: #{$primary-a-200};
33
+ --chat-input: #{$secondary-50};
34
34
  --divider: #{$primary-50};
35
35
  --error: #{$error-500};
36
36
  --error-secondary: #{$error-200};
@@ -189,7 +189,9 @@ export const DialogItemPreviewMobileScreenIPad: Story = {
189
189
  },
190
190
  render: (args) => {
191
191
  // eslint-disable-next-line no-param-reassign
192
- args.date = args.date ? new Date(args.date!).toLocaleDateString() : new Date().toLocaleDateString();
192
+ args.date = args.date
193
+ ? new Date(args.date!).toLocaleDateString()
194
+ : new Date().toLocaleDateString();
193
195
 
194
196
  return <DialogItemPreview {...args} />;
195
197
  },
@@ -4,8 +4,8 @@ import { FunctionTypeVoidToVoid } from '../../../CommonTypes/BaseViewModel';
4
4
  import './DialogItemPreview.scss';
5
5
 
6
6
  export type DialogItemPreviewProps = {
7
- avatar: ReactElement;
8
- title: string;
7
+ avatar?: ReactElement;
8
+ title?: string;
9
9
  active?: boolean;
10
10
  date?: string;
11
11
  lastMessage?: ReactElement | string;
@@ -8,6 +8,12 @@
8
8
  font: var(--body-body-medium, 400 14px/20px "Roboto-Regular", sans-serif);
9
9
  }
10
10
 
11
+ .reply-forward-message {
12
+ .bubble-content-text {
13
+ color: var(--secondary-text);
14
+ }
15
+ }
16
+
11
17
  .text-bubble-background {
12
18
 
13
19
  &__incoming {
@@ -37,6 +43,7 @@
37
43
  justify-content: flex-start;
38
44
  flex-shrink: 0;
39
45
  position: relative;
46
+ width: 100%;
40
47
  }
41
48
 
42
49
  }
@@ -79,6 +79,10 @@
79
79
  flex-shrink: 0;
80
80
  position: relative;
81
81
  }
82
+ .reply-forward-message {
83
+ color: var(--secondary-text);
84
+ width: 100%;
85
+ }
82
86
  }
83
87
  }
84
88
 
@@ -1,4 +1,5 @@
1
1
  import React, { ReactElement } from 'react';
2
+ import cn from 'classnames';
2
3
  import Avatar from '../Avatar/Avatar';
3
4
  import CheckBox from '../CheckBox/CheckBox';
4
5
  import MessageCaption from './MessageCaption/MessageCaption';
@@ -54,7 +55,11 @@ export default function Message({
54
55
  subtype={subtype}
55
56
  userName={userName}
56
57
  />
57
- {children}
58
+ <div className={cn(null, {
59
+ 'reply-forward-message': subtype === 'reply' || subtype === 'forward'}
60
+ )}>
61
+ {children}
62
+ </div>
58
63
  </div>
59
64
  </div>
60
65
  </div>
@@ -70,7 +75,12 @@ export default function Message({
70
75
  />
71
76
  <div className="message-item__incoming__chat">
72
77
  <div className="message-item__incoming__chat__bubble">
73
- {children}
78
+ <div className={cn(null, {
79
+ 'reply-forward-message': subtype === 'reply' || subtype === 'forward'
80
+ }
81
+ )}>
82
+ {children}
83
+ </div>
74
84
  {bottomPart}
75
85
  </div>
76
86
  {additionalPart}
@@ -2,6 +2,10 @@ $message-view-container-header-min-height: 64px;
2
2
  $message-view-container-chat-input-min-height: 54px;
3
3
  .chat-container{
4
4
  width: 100%;
5
+ &__send-icon {
6
+ display: flex;
7
+ align-items: center;
8
+ }
5
9
  &__icon{
6
10
  width: 24px;
7
11
  height: 24px;