quickblox-react-ui-kit 0.2.4 → 0.2.6-patch

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 (666) hide show
  1. package/README.md +3 -2
  2. package/dist/{Presentation/Views/Base → CommonTypes}/BaseViewModel.d.ts +22 -6
  3. package/dist/CommonTypes/FunctionResult.d.ts +3 -1
  4. package/dist/Data/dto/message/RemoteMessageDTO.d.ts +3 -0
  5. package/dist/Data/mapper/MessageRemoteDTOMapper.d.ts +2 -0
  6. package/dist/Data/repository/DialogsRepository.d.ts +2 -1
  7. package/dist/Data/repository/EventMessagesRepository.d.ts +1 -0
  8. package/dist/Data/repository/MessagesRepository.d.ts +2 -2
  9. package/dist/Data/source/local/ILocalDataSource.d.ts +1 -1
  10. package/dist/Data/source/remote/Mapper/DialogDTOMapper.d.ts +1 -0
  11. package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts +6 -0
  12. package/dist/Domain/entity/MessageEntity.d.ts +3 -0
  13. package/dist/Domain/entity/NotificationTypes.d.ts +1 -0
  14. package/dist/Domain/repository/IDialogsRepository.d.ts +2 -1
  15. package/dist/Domain/repository/IMessagesRepository.d.ts +2 -2
  16. package/dist/Domain/use_cases/CreateDialogUseCase.d.ts +2 -1
  17. package/dist/Domain/use_cases/ForwardMessagesUseCase.d.ts +13 -0
  18. package/dist/Domain/use_cases/LeaveDialogUseCase.d.ts +2 -1
  19. package/dist/Domain/use_cases/RemoveUsersFromTheDialogUseCase.d.ts +2 -1
  20. package/dist/Domain/use_cases/ReplyMessagesUseCase.d.ts +10 -0
  21. package/dist/Domain/use_cases/SubscribeToDialogEventsUseCase.d.ts +1 -0
  22. package/dist/Domain/use_cases/UpdateDialogUseCase.d.ts +2 -1
  23. package/dist/Domain/use_cases/ai/AIRephraseUseCase.d.ts +1 -1
  24. package/dist/Domain/use_cases/ai/AIRephraseWithProxyUseCase.d.ts +1 -1
  25. package/dist/Presentation/{components/UI/Dialogs → Views}/CreateDialog/CreateDialog.d.ts +1 -1
  26. package/dist/Presentation/Views/CreateDialogFlow/CreateNewDialogFlow.d.ts +2 -2
  27. package/dist/Presentation/Views/Dialog/AIComponents/AIAssistComponent/AIAssistComponent.d.ts +8 -0
  28. package/dist/Presentation/Views/Dialog/AIComponents/AITranslateComponent/AITranslateComponent.d.ts +11 -0
  29. package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/AIMessageWidget.d.ts +1 -1
  30. package/dist/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.d.ts +22 -0
  31. package/dist/Presentation/Views/Dialog/AttachmentMessage/AttachmentMessage.d.ts +7 -0
  32. package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AudioAttachmentComponent/AudioAttachmentComponent.d.ts +1 -1
  33. package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog/ContextMenu}/ContextMenu.d.ts +1 -0
  34. package/dist/Presentation/Views/Dialog/ContextMenu/MessageContextMenu/MessageContextMenu.d.ts +14 -0
  35. package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/DefaultAttachmentComponent/DefaultAttachmentComponent.d.ts +1 -0
  36. package/dist/Presentation/Views/Dialog/Dialog.d.ts +22 -0
  37. package/dist/Presentation/Views/Dialog/DialogHeader/DialogHeader.d.ts +12 -0
  38. package/dist/Presentation/Views/Dialog/DialogViewModel.d.ts +16 -0
  39. package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/DropDownMenu/DropDownMenu.d.ts +2 -3
  40. package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/DropDownMenu/ItemDropDownMenu/ItemDropDownMenu.d.ts +1 -1
  41. package/dist/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.d.ts +12 -0
  42. package/dist/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/ItemForListComponent/ItemDialogList.d.ts +14 -0
  43. package/dist/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/SearchComponent/SearchComponent.d.ts +8 -0
  44. package/dist/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.d.ts +13 -0
  45. package/dist/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessagePreview/ForwardMessagePreview.d.ts +9 -0
  46. package/dist/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.d.ts +10 -0
  47. package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/ImageAttachmentComponent/ImageAttachmentComponent.d.ts +1 -1
  48. package/dist/Presentation/Views/Dialog/IncomingForwardedRepliedMessage/IncomingForwardedRepliedMessage.d.ts +25 -0
  49. package/dist/Presentation/Views/Dialog/IncomingMessage/AttachmentContentComponent/AttachmentContentComponent.d.ts +8 -0
  50. package/dist/Presentation/{components/UI/Dialogs/MessagesView/InComingMessage → Views/Dialog/IncomingMessage}/AvatarContentIncomingUser/AvatarContentIncomingUser.d.ts +3 -0
  51. package/dist/Presentation/Views/Dialog/IncomingMessage/IncomingMessage.d.ts +29 -0
  52. package/dist/Presentation/Views/Dialog/IncomingMessage/MessageContentComponent/MessageContentComponent.d.ts +10 -0
  53. package/dist/Presentation/Views/Dialog/Message/Message.d.ts +22 -0
  54. package/dist/Presentation/Views/Dialog/MessageInput/MessageInput.d.ts +21 -0
  55. package/dist/Presentation/Views/Dialog/OutgoingForwardedRepliedMessage/OutgoingForwardedRepliedMessage.d.ts +17 -0
  56. package/dist/Presentation/Views/Dialog/OutgoingMessage/OutgoingMessage.d.ts +14 -0
  57. package/dist/Presentation/Views/Dialog/RenderDialogHeaderNavigator/RenderDialogHeaderNavigator.d.ts +9 -0
  58. package/dist/Presentation/Views/Dialog/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.d.ts +8 -0
  59. package/dist/Presentation/Views/Dialog/ReplyMessagePreview/ReplyMessagePreview.d.ts +11 -0
  60. package/dist/Presentation/Views/Dialog/SystemDateBanner/SystemDateBanner.d.ts +7 -0
  61. package/dist/Presentation/Views/Dialog/SystemMessageBanner/SystemMessageBanner.d.ts +7 -0
  62. package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/VideoAttachmentComponent/VideoAttachmentComponent.d.ts +1 -1
  63. package/dist/Presentation/Views/Dialog/VoiceMessage/VoiceMessage.d.ts +8 -0
  64. package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/VoiceRecordingProgress/VoiceRecordingProgress.d.ts +3 -3
  65. package/dist/Presentation/Views/Dialog/useDialogViewModel.d.ts +4 -0
  66. package/dist/Presentation/Views/DialogInfo/DialogInfo.d.ts +16 -0
  67. package/dist/Presentation/{components/UI/Dialogs/DialogInformation → Views/DialogInfo}/DialogMemberButton/DialogMembersButton.d.ts +1 -1
  68. package/dist/Presentation/{components/UI/Dialogs/DialogInformation → Views/DialogInfo}/UsersList/SingleUser/SingleUser.d.ts +1 -1
  69. package/dist/Presentation/{components/UI/Dialogs/DialogInformation → Views/DialogInfo}/UsersList/UsersList.d.ts +1 -1
  70. package/dist/Presentation/{components/UI/Dialogs/DialogInformation → Views/DialogInfo}/UsersList/UsersListViewModel.d.ts +3 -3
  71. package/dist/Presentation/{components/UI/Dialogs/DialogInformation → Views/DialogInfo}/UsersList/useUsersListViewModel.d.ts +1 -1
  72. package/dist/Presentation/Views/{Dialogs/Dialogs.d.ts → DialogList/DialogList.d.ts} +8 -8
  73. package/dist/Presentation/Views/{Dialogs/DialogViewModel.d.ts → DialogList/DialogListViewModel.d.ts} +2 -2
  74. package/dist/Presentation/Views/DialogList/useDialogListViewModel.d.ts +4 -0
  75. package/dist/Presentation/{components/UI/Dialogs/HeaderDialogs/HeaderDialogs.d.ts → Views/DialogListHeader/DialogListHeader.d.ts} +6 -6
  76. package/dist/Presentation/{components/UI/Dialogs → Views}/EditDialog/EditDialog.d.ts +2 -2
  77. package/dist/Presentation/{components/UI/Dialogs → Views}/EditDialog/UserAvatar/UserAvatar.d.ts +2 -2
  78. package/dist/Presentation/{components/UI/Dialogs → Views}/InviteMembers/InviteMembers.d.ts +2 -2
  79. package/dist/Presentation/{components/UI/Dialogs → Views}/InviteMembers/InviteMembersViewModel.d.ts +3 -3
  80. package/dist/Presentation/{components/UI/Dialogs → Views}/InviteMembers/InviteUsersList/SingleUserWithCheckBox/SingleUserWithCheckBox.d.ts +1 -1
  81. package/dist/Presentation/{components/UI/Dialogs → Views}/InviteMembers/InviteUsersResultViewModel.d.ts +1 -1
  82. package/dist/Presentation/{components/UI/Dialogs → Views}/MembersList/MembersList.d.ts +2 -2
  83. package/dist/Presentation/{components/UI/Dialogs → Views}/PreviewDialog/PreviewDialog.d.ts +2 -2
  84. package/dist/Presentation/{components/UI/Dialogs → Views}/PreviewDialog/PreviewDialogViewModel.d.ts +2 -2
  85. package/dist/Presentation/{components/UI/Dialogs → Views}/YesNoQuestion/YesNoQuestion.d.ts +1 -1
  86. package/dist/Presentation/components/UI/Buttons/ActiveButton/ActiveButton.d.ts +1 -1
  87. package/dist/Presentation/components/UI/Buttons/MainBoundedButton/MainBoundedButton.d.ts +1 -1
  88. package/dist/Presentation/components/UI/Buttons/MainButton/MainButton.d.ts +1 -1
  89. package/dist/Presentation/components/UI/Elements/SwitchButton/SwitchButton.d.ts +1 -1
  90. package/dist/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.d.ts +1 -1
  91. package/dist/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.d.ts +1 -1
  92. package/dist/Presentation/components/containers/ColumnContainer/ColumnContainer.d.ts +1 -1
  93. package/dist/Presentation/{components/layouts → layouts}/Desktop/DesktopLayout.d.ts +1 -1
  94. package/dist/Presentation/{components/layouts → layouts}/Desktop/QuickBloxUIKitDesktopLayout.d.ts +3 -2
  95. package/dist/Presentation/{components/layouts → layouts}/TestStage/LoginView/Login.d.ts +1 -1
  96. package/dist/Presentation/{components/providers → providers}/QuickBloxUIKitProvider/QuickBloxUIKitProvider.d.ts +6 -6
  97. package/dist/Presentation/{components/providers → providers}/QuickBloxUIKitProvider/useEventMessagesRepository.d.ts +1 -1
  98. package/dist/Presentation/{components/providers → providers}/QuickBloxUIKitProvider/useQBConnection.d.ts +1 -1
  99. package/dist/QBconfig.d.ts +2 -0
  100. package/dist/index-ui.d.ts +22 -18
  101. package/dist/index-ui.js +1331 -649
  102. package/dist/utils/utils.d.ts +1 -1
  103. package/global.d.ts +23 -14
  104. package/package.json +26 -2
  105. package/.prettierignore +0 -4
  106. package/.prettierrc +0 -10
  107. package/dist/Presentation/Views/Dialogs/useDialogsViewModel.d.ts +0 -4
  108. package/dist/Presentation/components/UI/Dialogs/DialogInformation/DialogInformation.d.ts +0 -16
  109. package/dist/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.d.ts +0 -14
  110. package/dist/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.d.ts +0 -17
  111. package/dist/Presentation/components/UI/Dialogs/MessagesView/MessagesView.d.ts +0 -19
  112. package/dist/Presentation/components/UI/Dialogs/MessagesView/MessagesViewModel.d.ts +0 -14
  113. package/dist/Presentation/components/UI/Dialogs/MessagesView/OutGoingMessage/OutGoingMessage.d.ts +0 -9
  114. package/dist/Presentation/components/UI/Dialogs/MessagesView/useMessagesViewModel.d.ts +0 -4
  115. package/public/favicon.ico +0 -0
  116. package/public/index.html +0 -47
  117. package/public/logo192.png +0 -0
  118. package/public/logo512.png +0 -0
  119. package/public/manifest.json +0 -25
  120. package/public/quickblox.js +0 -54609
  121. package/public/robots.txt +0 -3
  122. package/src/App.scss +0 -0
  123. package/src/App.tsx +0 -246
  124. package/src/CommonTypes/FunctionResult.ts +0 -63
  125. package/src/Data/DefaultConfigurations.ts +0 -333
  126. package/src/Data/Stubs.ts +0 -1131
  127. package/src/Data/dto/dialog/LocalDialogDTO.ts +0 -42
  128. package/src/Data/dto/dialog/LocalDialogsDTO.ts +0 -21
  129. package/src/Data/dto/dialog/RemoteDialogDTO.ts +0 -58
  130. package/src/Data/dto/dialog/RemoteDialogsDTO.ts +0 -21
  131. package/src/Data/dto/file/LocalFileDTO.ts +0 -26
  132. package/src/Data/dto/file/RemoteFileDTO.ts +0 -26
  133. package/src/Data/dto/message/LocalMessageDTO.ts +0 -51
  134. package/src/Data/dto/message/LocalMessagesDTO.ts +0 -21
  135. package/src/Data/dto/message/RemoteMessageDTO.ts +0 -51
  136. package/src/Data/dto/message/RemoteMessagesDTO.ts +0 -21
  137. package/src/Data/dto/user/LocalUserDTO.ts +0 -37
  138. package/src/Data/dto/user/LocalUsersDTO.ts +0 -23
  139. package/src/Data/dto/user/RemoteUserDTO.ts +0 -37
  140. package/src/Data/dto/user/RemoteUsersDTO.ts +0 -21
  141. package/src/Data/mapper/DialogLocalDTOMapper.ts +0 -742
  142. package/src/Data/mapper/DialogRemoteDTOMapper.ts +0 -777
  143. package/src/Data/mapper/FileLocalDTOMapper.ts +0 -253
  144. package/src/Data/mapper/FileRemoteDTOMapper.ts +0 -265
  145. package/src/Data/mapper/IMapper.ts +0 -14
  146. package/src/Data/mapper/MessageLocalDTOMapper.ts +0 -426
  147. package/src/Data/mapper/MessageRemoteDTOMapper.ts +0 -432
  148. package/src/Data/mapper/UserLocalDTOMapper.ts +0 -381
  149. package/src/Data/mapper/UserRemoteDTOMapper.ts +0 -393
  150. package/src/Data/repository/ConnectionRepository.ts +0 -144
  151. package/src/Data/repository/DialogsRepository.ts +0 -422
  152. package/src/Data/repository/EventMessagesRepository.ts +0 -291
  153. package/src/Data/repository/FileRepository.ts +0 -110
  154. package/src/Data/repository/MessagesRepository.ts +0 -288
  155. package/src/Data/repository/UsersRepository.ts +0 -324
  156. package/src/Data/source/AISource.ts +0 -133
  157. package/src/Data/source/exception/LocalDataSourceException.ts +0 -17
  158. package/src/Data/source/exception/MapperDTOException.ts +0 -19
  159. package/src/Data/source/exception/RemoteDataSourceException.ts +0 -28
  160. package/src/Data/source/exception/RepositoryException.ts +0 -27
  161. package/src/Data/source/local/ChatLocalStorageDataSource.ts +0 -262
  162. package/src/Data/source/local/ILocalDataSource.ts +0 -45
  163. package/src/Data/source/local/ILocalFileDataSource.ts +0 -11
  164. package/src/Data/source/local/LocalDataSource.ts +0 -377
  165. package/src/Data/source/local/LocalFileDataSource.ts +0 -22
  166. package/src/Data/source/remote/IRemoteDataSource.ts +0 -112
  167. package/src/Data/source/remote/Mapper/DialogDTOMapper.ts +0 -418
  168. package/src/Data/source/remote/Mapper/FileDTOMapper.ts +0 -276
  169. package/src/Data/source/remote/Mapper/IDTOMapper.ts +0 -4
  170. package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +0 -452
  171. package/src/Data/source/remote/Mapper/UserDTOMapper.ts +0 -344
  172. package/src/Data/source/remote/RemoteDataSource.ts +0 -1392
  173. package/src/Domain/entity/Chat.ts +0 -4
  174. package/src/Domain/entity/ChatMessageAttachmentEntity.ts +0 -15
  175. package/src/Domain/entity/CustomDataEntity.ts +0 -3
  176. package/src/Domain/entity/DialogEntity.ts +0 -15
  177. package/src/Domain/entity/DialogEventInfo.ts +0 -15
  178. package/src/Domain/entity/DialogTypes.ts +0 -7
  179. package/src/Domain/entity/EventMessageType.ts +0 -7
  180. package/src/Domain/entity/FileEntity.ts +0 -11
  181. package/src/Domain/entity/FileTypes.ts +0 -9
  182. package/src/Domain/entity/GroupDialogEntity.ts +0 -54
  183. package/src/Domain/entity/LastMessageEntity.ts +0 -5
  184. package/src/Domain/entity/MessageEntity.ts +0 -25
  185. package/src/Domain/entity/NotificationTypes.ts +0 -7
  186. package/src/Domain/entity/PrivateDialogEntity.ts +0 -46
  187. package/src/Domain/entity/PublicDialogEntity.ts +0 -80
  188. package/src/Domain/entity/UserEntity.ts +0 -22
  189. package/src/Domain/exception/domain/DomainExecption.ts +0 -5
  190. package/src/Domain/repository/IDialogsRepository.ts +0 -40
  191. package/src/Domain/repository/IFileRepository.ts +0 -9
  192. package/src/Domain/repository/IMessagesRepository.ts +0 -28
  193. package/src/Domain/repository/IUsersRepository.ts +0 -13
  194. package/src/Domain/repository/Pagination.ts +0 -48
  195. package/src/Domain/use_cases/CreateDialogUseCase.ts +0 -73
  196. package/src/Domain/use_cases/GetAllDialogsUseCase.ts +0 -20
  197. package/src/Domain/use_cases/GetAllDialogsUseCaseWithMock.ts +0 -45
  198. package/src/Domain/use_cases/GetAllMessagesForDialog.ts +0 -61
  199. package/src/Domain/use_cases/GetAllUsersUseCase.ts +0 -34
  200. package/src/Domain/use_cases/GetDialogByIdUseCase.ts +0 -28
  201. package/src/Domain/use_cases/GetUsersByIdsUseCase.ts +0 -22
  202. package/src/Domain/use_cases/LeaveDialogUseCase.ts +0 -109
  203. package/src/Domain/use_cases/RemoveUsersFromTheDialogUseCase.ts +0 -103
  204. package/src/Domain/use_cases/SendTextMessageUseCase.ts +0 -26
  205. package/src/Domain/use_cases/SubscribeToDialogEventsUseCase.ts +0 -141
  206. package/src/Domain/use_cases/SubscribeToDialogsUpdatesUseCase.ts +0 -69
  207. package/src/Domain/use_cases/SubscribeToDialogsUpdatesUseCaseWithMock.ts +0 -61
  208. package/src/Domain/use_cases/SyncDialogsUseCase.ts +0 -246
  209. package/src/Domain/use_cases/UpdateDialogUseCase.ts +0 -65
  210. package/src/Domain/use_cases/UploadFileUseCase.ts +0 -24
  211. package/src/Domain/use_cases/UserTypingMessageUseCase.ts +0 -51
  212. package/src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts +0 -69
  213. package/src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts +0 -71
  214. package/src/Domain/use_cases/ai/AIRephraseUseCase.ts +0 -89
  215. package/src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts +0 -75
  216. package/src/Domain/use_cases/ai/AITranslateUseCase.ts +0 -76
  217. package/src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts +0 -79
  218. package/src/Domain/use_cases/base/BaseUseCase.ts +0 -77
  219. package/src/Domain/use_cases/base/IUseCase.ts +0 -5
  220. package/src/Domain/use_cases/base/Subscribable/ISubscribable.ts +0 -6
  221. package/src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts +0 -151
  222. package/src/Presentation/.gitkeep +0 -0
  223. package/src/Presentation/Views/Base/BaseViewModel.ts +0 -90
  224. package/src/Presentation/Views/CreateDialogFlow/CreateNewDialogFlow.tsx +0 -188
  225. package/src/Presentation/Views/Dialogs/DialogViewModel.ts +0 -25
  226. package/src/Presentation/Views/Dialogs/Dialogs.scss +0 -76
  227. package/src/Presentation/Views/Dialogs/Dialogs.tsx +0 -400
  228. package/src/Presentation/Views/Dialogs/useDialogsViewModel.ts +0 -382
  229. package/src/Presentation/Views/Navigation/More.svg +0 -7
  230. package/src/Presentation/assets/DarkTheme.ts +0 -58
  231. package/src/Presentation/assets/DefaultThemes/CustomTheme.ts +0 -58
  232. package/src/Presentation/assets/DefaultThemes/DefaultTheme.ts +0 -58
  233. package/src/Presentation/assets/LightTheme.ts +0 -58
  234. package/src/Presentation/assets/ThemeScheme.ts +0 -83
  235. package/src/Presentation/assets/UiKitTheme.ts +0 -143
  236. package/src/Presentation/assets/fonts/.gitkeep +0 -0
  237. package/src/Presentation/assets/fonts/Roboto-Bold.eot +0 -0
  238. package/src/Presentation/assets/fonts/Roboto-Bold.ttf +0 -0
  239. package/src/Presentation/assets/fonts/Roboto-Bold.woff +0 -0
  240. package/src/Presentation/assets/fonts/Roboto-Bold.woff2 +0 -0
  241. package/src/Presentation/assets/fonts/Roboto-Medium.eot +0 -0
  242. package/src/Presentation/assets/fonts/Roboto-Medium.ttf +0 -0
  243. package/src/Presentation/assets/fonts/Roboto-Medium.woff +0 -0
  244. package/src/Presentation/assets/fonts/Roboto-Medium.woff2 +0 -0
  245. package/src/Presentation/assets/fonts/Roboto-Regular.eot +0 -0
  246. package/src/Presentation/assets/fonts/Roboto-Regular.ttf +0 -0
  247. package/src/Presentation/assets/fonts/Roboto-Regular.woff +0 -0
  248. package/src/Presentation/assets/fonts/Roboto-Regular.woff2 +0 -0
  249. package/src/Presentation/assets/img/Artem_Koltunov_Selfi.png +0 -0
  250. package/src/Presentation/assets/img/bee-img.png +0 -0
  251. package/src/Presentation/assets/img/web-doc.png +0 -0
  252. package/src/Presentation/assets/styles/_fonts.scss +0 -32
  253. package/src/Presentation/assets/styles/_reset-styles.scss +0 -435
  254. package/src/Presentation/assets/styles/_theme_colors_scheme.scss +0 -56
  255. package/src/Presentation/assets/styles/_theme_colors_scheme_green.scss +0 -57
  256. package/src/Presentation/assets/styles/_theme_colors_scheme_pink.scss +0 -72
  257. package/src/Presentation/assets/styles/_theme_dark.scss +0 -33
  258. package/src/Presentation/assets/styles/_theme_light.scss +0 -33
  259. package/src/Presentation/assets/styles/_variables.scss +0 -2
  260. package/src/Presentation/components/Button.js +0 -5
  261. package/src/Presentation/components/Navbar.tsx +0 -45
  262. package/src/Presentation/components/TextInput.js +0 -10
  263. package/src/Presentation/components/UI/Buttons/ActiveButton/ActiveButton.tsx +0 -40
  264. package/src/Presentation/components/UI/Buttons/MainBoundedButton/MainBoundedButton.scss +0 -0
  265. package/src/Presentation/components/UI/Buttons/MainBoundedButton/MainBoundedButton.tsx +0 -30
  266. package/src/Presentation/components/UI/Buttons/MainButton/MainButton.scss +0 -127
  267. package/src/Presentation/components/UI/Buttons/MainButton/MainButton.tsx +0 -62
  268. package/src/Presentation/components/UI/Dialogs/CreateDialog/CreateDialog.scss +0 -45
  269. package/src/Presentation/components/UI/Dialogs/CreateDialog/CreateDialog.tsx +0 -77
  270. package/src/Presentation/components/UI/Dialogs/DialogInformation/DialogInformation.scss +0 -429
  271. package/src/Presentation/components/UI/Dialogs/DialogInformation/DialogInformation.tsx +0 -574
  272. package/src/Presentation/components/UI/Dialogs/DialogInformation/DialogMemberButton/DialogMembersButton.scss +0 -42
  273. package/src/Presentation/components/UI/Dialogs/DialogInformation/DialogMemberButton/DialogMembersButton.tsx +0 -26
  274. package/src/Presentation/components/UI/Dialogs/DialogInformation/UsersList/SingleUser/SingleUser.scss +0 -95
  275. package/src/Presentation/components/UI/Dialogs/DialogInformation/UsersList/SingleUser/SingleUser.tsx +0 -42
  276. package/src/Presentation/components/UI/Dialogs/DialogInformation/UsersList/UsersList.scss +0 -60
  277. package/src/Presentation/components/UI/Dialogs/DialogInformation/UsersList/UsersList.tsx +0 -65
  278. package/src/Presentation/components/UI/Dialogs/DialogInformation/UsersList/UsersListViewModel.ts +0 -13
  279. package/src/Presentation/components/UI/Dialogs/DialogInformation/UsersList/useUsersListViewModel.ts +0 -81
  280. package/src/Presentation/components/UI/Dialogs/EditDialog/EditDialog.scss +0 -196
  281. package/src/Presentation/components/UI/Dialogs/EditDialog/EditDialog.tsx +0 -277
  282. package/src/Presentation/components/UI/Dialogs/EditDialog/UserAvatar/UserAvatar.scss +0 -32
  283. package/src/Presentation/components/UI/Dialogs/EditDialog/UserAvatar/UserAvatar.tsx +0 -59
  284. package/src/Presentation/components/UI/Dialogs/HeaderDialogs/HeaderDialogs.scss +0 -67
  285. package/src/Presentation/components/UI/Dialogs/HeaderDialogs/HeaderDialogs.tsx +0 -112
  286. package/src/Presentation/components/UI/Dialogs/InviteMembers/InviteMembers.scss +0 -146
  287. package/src/Presentation/components/UI/Dialogs/InviteMembers/InviteMembers.tsx +0 -328
  288. package/src/Presentation/components/UI/Dialogs/InviteMembers/InviteMembersViewModel.ts +0 -18
  289. package/src/Presentation/components/UI/Dialogs/InviteMembers/InviteUsersList/SingleUserWithCheckBox/SingleUserWithCheckBox.scss +0 -113
  290. package/src/Presentation/components/UI/Dialogs/InviteMembers/InviteUsersList/SingleUserWithCheckBox/SingleUserWithCheckBox.tsx +0 -79
  291. package/src/Presentation/components/UI/Dialogs/InviteMembers/InviteUsersResultViewModel.ts +0 -12
  292. package/src/Presentation/components/UI/Dialogs/InviteMembers/NotFoundContent/NotFoundContent.scss +0 -37
  293. package/src/Presentation/components/UI/Dialogs/InviteMembers/NotFoundContent/NotFoundContent.tsx +0 -22
  294. package/src/Presentation/components/UI/Dialogs/InviteMembers/useInviteMembersViewModel.ts +0 -116
  295. package/src/Presentation/components/UI/Dialogs/MembersList/MembersList.scss +0 -128
  296. package/src/Presentation/components/UI/Dialogs/MembersList/MembersList.tsx +0 -93
  297. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIMessageWidget.ts +0 -40
  298. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.scss +0 -55
  299. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.tsx +0 -122
  300. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx +0 -98
  301. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/SliderMenu.tsx +0 -172
  302. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/Tone.ts +0 -35
  303. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidget.tsx +0 -83
  304. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.tsx +0 -83
  305. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx +0 -104
  306. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx +0 -102
  307. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidget.tsx +0 -89
  308. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidgetWithProxy.tsx +0 -89
  309. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/useDefaultVoiceInputWidget.tsx +0 -87
  310. package/src/Presentation/components/UI/Dialogs/MessagesView/AudioAttachmentComponent/AudioAttachmentComponent.scss +0 -7
  311. package/src/Presentation/components/UI/Dialogs/MessagesView/AudioAttachmentComponent/AudioAttachmentComponent.tsx +0 -27
  312. package/src/Presentation/components/UI/Dialogs/MessagesView/ContextMenu.tsx +0 -95
  313. package/src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss +0 -76
  314. package/src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.tsx +0 -34
  315. package/src/Presentation/components/UI/Dialogs/MessagesView/DropDownMenu/DropDownMenu.scss +0 -84
  316. package/src/Presentation/components/UI/Dialogs/MessagesView/DropDownMenu/DropDownMenu.tsx +0 -105
  317. package/src/Presentation/components/UI/Dialogs/MessagesView/DropDownMenu/ItemDropDownMenu/ItemDropDownMenu.scss +0 -50
  318. package/src/Presentation/components/UI/Dialogs/MessagesView/DropDownMenu/ItemDropDownMenu/ItemDropDownMenu.tsx +0 -43
  319. package/src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss +0 -26
  320. package/src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.tsx +0 -25
  321. package/src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.scss +0 -133
  322. package/src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.tsx +0 -144
  323. package/src/Presentation/components/UI/Dialogs/MessagesView/HighLightLink/HighLightLink.scss +0 -92
  324. package/src/Presentation/components/UI/Dialogs/MessagesView/HighLightLink/HighLightLink.tsx +0 -128
  325. package/src/Presentation/components/UI/Dialogs/MessagesView/ImageAttachmentComponent/ImageAttachmentComponent.scss +0 -11
  326. package/src/Presentation/components/UI/Dialogs/MessagesView/ImageAttachmentComponent/ImageAttachmentComponent.tsx +0 -25
  327. package/src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.scss +0 -39
  328. package/src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.tsx +0 -26
  329. package/src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.scss +0 -392
  330. package/src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.tsx +0 -435
  331. package/src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.scss +0 -410
  332. package/src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.tsx +0 -1636
  333. package/src/Presentation/components/UI/Dialogs/MessagesView/MessagesViewModel.ts +0 -20
  334. package/src/Presentation/components/UI/Dialogs/MessagesView/OutGoingMessage/OutGoingMessage.scss +0 -7
  335. package/src/Presentation/components/UI/Dialogs/MessagesView/OutGoingMessage/OutGoingMessage.tsx +0 -99
  336. package/src/Presentation/components/UI/Dialogs/MessagesView/VideoAttachmentComponent/VideoAttachmentComponent.scss +0 -11
  337. package/src/Presentation/components/UI/Dialogs/MessagesView/VideoAttachmentComponent/VideoAttachmentComponent.tsx +0 -33
  338. package/src/Presentation/components/UI/Dialogs/MessagesView/VoiceRecordingProgress/VoiceRecordingProgress.scss +0 -35
  339. package/src/Presentation/components/UI/Dialogs/MessagesView/VoiceRecordingProgress/VoiceRecordingProgress.tsx +0 -89
  340. package/src/Presentation/components/UI/Dialogs/MessagesView/useMessagesViewModel.ts +0 -475
  341. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss +0 -62
  342. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.tsx +0 -25
  343. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss +0 -61
  344. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.tsx +0 -32
  345. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss +0 -100
  346. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx +0 -489
  347. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialogViewModel.ts +0 -42
  348. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss +0 -40
  349. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.tsx +0 -26
  350. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss +0 -62
  351. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.tsx +0 -25
  352. package/src/Presentation/components/UI/Dialogs/YesNoQuestion/YesNoQuestion.scss +0 -35
  353. package/src/Presentation/components/UI/Dialogs/YesNoQuestion/YesNoQuestion.tsx +0 -89
  354. package/src/Presentation/components/UI/Elements/SwitchButton/SwitchButton.scss +0 -61
  355. package/src/Presentation/components/UI/Elements/SwitchButton/SwitchButton.tsx +0 -48
  356. package/src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.scss +0 -74
  357. package/src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.tsx +0 -72
  358. package/src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.scss +0 -21
  359. package/src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx +0 -41
  360. package/src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.scss +0 -3
  361. package/src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.tsx +0 -41
  362. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/Send.svg +0 -3
  363. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx +0 -39
  364. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BookIcon/BookIcon.tsx +0 -7
  365. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.svg +0 -5
  366. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx +0 -50
  367. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/HammerIcon/index.tsx +0 -7
  368. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/HandshakeIcon/index.tsx +0 -7
  369. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/MuscleIcon/index.tsx +0 -7
  370. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/NecktieIcon/index.tsx +0 -7
  371. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/NeutralFaceIcon/index.tsx +0 -7
  372. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PalmsUpTogetherIcon/index.tsx +0 -7
  373. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PerformingArtsIcon/index.tsx +0 -7
  374. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PointUpIcon/index.tsx +0 -7
  375. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/SmileyIcon/index.tsx +0 -20
  376. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/SmirkIcon/index.tsx +0 -7
  377. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/WhiteCheckMarkIcon/index.tsx +0 -7
  378. package/src/Presentation/components/UI/svgs/Icons/Actions/Add/Add.svg +0 -3
  379. package/src/Presentation/components/UI/svgs/Icons/Actions/Add/index.tsx +0 -22
  380. package/src/Presentation/components/UI/svgs/Icons/Actions/AddContact/Add contact.svg +0 -3
  381. package/src/Presentation/components/UI/svgs/Icons/Actions/AddContact/index.tsx +0 -22
  382. package/src/Presentation/components/UI/svgs/Icons/Actions/Archive/Archive.svg +0 -3
  383. package/src/Presentation/components/UI/svgs/Icons/Actions/Archive/index.tsx +0 -22
  384. package/src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/AssistAnswer.svg +0 -3
  385. package/src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/index.tsx +0 -93
  386. package/src/Presentation/components/UI/svgs/Icons/Actions/Copy/Copy.svg +0 -3
  387. package/src/Presentation/components/UI/svgs/Icons/Actions/Copy/index.tsx +0 -22
  388. package/src/Presentation/components/UI/svgs/Icons/Actions/Delete/Delete.svg +0 -3
  389. package/src/Presentation/components/UI/svgs/Icons/Actions/Delete/index.tsx +0 -22
  390. package/src/Presentation/components/UI/svgs/Icons/Actions/Download/Download.svg +0 -3
  391. package/src/Presentation/components/UI/svgs/Icons/Actions/Download/index.tsx +0 -22
  392. package/src/Presentation/components/UI/svgs/Icons/Actions/Edit/Edit.svg +0 -3
  393. package/src/Presentation/components/UI/svgs/Icons/Actions/Edit/index.tsx +0 -22
  394. package/src/Presentation/components/UI/svgs/Icons/Actions/EditDots/EditDots.svg +0 -3
  395. package/src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx +0 -22
  396. package/src/Presentation/components/UI/svgs/Icons/Actions/Emoji/Emoji.svg +0 -3
  397. package/src/Presentation/components/UI/svgs/Icons/Actions/Emoji/index.tsx +0 -22
  398. package/src/Presentation/components/UI/svgs/Icons/Actions/ForwardFilled/Forward filled.svg +0 -3
  399. package/src/Presentation/components/UI/svgs/Icons/Actions/ForwardFilled/index.tsx +0 -22
  400. package/src/Presentation/components/UI/svgs/Icons/Actions/Hungup/Hungup.svg +0 -3
  401. package/src/Presentation/components/UI/svgs/Icons/Actions/Hungup/index.tsx +0 -22
  402. package/src/Presentation/components/UI/svgs/Icons/Actions/IncomeCall/Income call.svg +0 -3
  403. package/src/Presentation/components/UI/svgs/Icons/Actions/IncomeCall/index.tsx +0 -22
  404. package/src/Presentation/components/UI/svgs/Icons/Actions/Like/Like.svg +0 -3
  405. package/src/Presentation/components/UI/svgs/Icons/Actions/Like/index.tsx +0 -22
  406. package/src/Presentation/components/UI/svgs/Icons/Actions/NewChat/New chat.svg +0 -3
  407. package/src/Presentation/components/UI/svgs/Icons/Actions/NewChat/index.tsx +0 -22
  408. package/src/Presentation/components/UI/svgs/Icons/Actions/OutcomeCall/Outcome call.svg +0 -3
  409. package/src/Presentation/components/UI/svgs/Icons/Actions/OutcomeCall/index.tsx +0 -22
  410. package/src/Presentation/components/UI/svgs/Icons/Actions/Phone/Phone.svg +0 -3
  411. package/src/Presentation/components/UI/svgs/Icons/Actions/Phone/index.tsx +0 -35
  412. package/src/Presentation/components/UI/svgs/Icons/Actions/PhoneFilled/Phone filled.svg +0 -3
  413. package/src/Presentation/components/UI/svgs/Icons/Actions/PhoneFilled/index.tsx +0 -22
  414. package/src/Presentation/components/UI/svgs/Icons/Actions/Remove/Remove.svg +0 -3
  415. package/src/Presentation/components/UI/svgs/Icons/Actions/Remove/index.tsx +0 -22
  416. package/src/Presentation/components/UI/svgs/Icons/Actions/Remove2/Remove2.svg +0 -3
  417. package/src/Presentation/components/UI/svgs/Icons/Actions/Remove2/index.tsx +0 -22
  418. package/src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/Reply filled.svg +0 -3
  419. package/src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/index.tsx +0 -22
  420. package/src/Presentation/components/UI/svgs/Icons/Actions/Send/Send.svg +0 -3
  421. package/src/Presentation/components/UI/svgs/Icons/Actions/Send/index.tsx +0 -38
  422. package/src/Presentation/components/UI/svgs/Icons/Actions/Share/Share.svg +0 -3
  423. package/src/Presentation/components/UI/svgs/Icons/Actions/Share/index.tsx +0 -22
  424. package/src/Presentation/components/UI/svgs/Icons/Actions/Summarize/Summarize.svg +0 -6
  425. package/src/Presentation/components/UI/svgs/Icons/Actions/Summarize/index.tsx +0 -58
  426. package/src/Presentation/components/UI/svgs/Icons/Actions/SwapCamera/Swap camera.svg +0 -3
  427. package/src/Presentation/components/UI/svgs/Icons/Actions/SwapCamera/index.tsx +0 -22
  428. package/src/Presentation/components/UI/svgs/Icons/Actions/Tone/Tone.svg +0 -3
  429. package/src/Presentation/components/UI/svgs/Icons/Actions/Tone/index.tsx +0 -34
  430. package/src/Presentation/components/UI/svgs/Icons/Actions/Unarchive/Unarchive.svg +0 -3
  431. package/src/Presentation/components/UI/svgs/Icons/Actions/Unarchive/index.tsx +0 -22
  432. package/src/Presentation/components/UI/svgs/Icons/Actions/VideoIcon/Video.svg +0 -3
  433. package/src/Presentation/components/UI/svgs/Icons/Actions/VideoIcon/index.tsx +0 -22
  434. package/src/Presentation/components/UI/svgs/Icons/Actions/Voice/Voice.svg +0 -3
  435. package/src/Presentation/components/UI/svgs/Icons/Actions/Voice/index.tsx +0 -35
  436. package/src/Presentation/components/UI/svgs/Icons/Contents/Brodcast/Broadcast.svg +0 -7
  437. package/src/Presentation/components/UI/svgs/Icons/Contents/Brodcast/index.tsx +0 -38
  438. package/src/Presentation/components/UI/svgs/Icons/Contents/Chat/Chat.svg +0 -3
  439. package/src/Presentation/components/UI/svgs/Icons/Contents/Chat/index.tsx +0 -35
  440. package/src/Presentation/components/UI/svgs/Icons/Contents/ChatFilled/Chat filled.svg +0 -3
  441. package/src/Presentation/components/UI/svgs/Icons/Contents/ChatFilled/index.tsx +0 -22
  442. package/src/Presentation/components/UI/svgs/Icons/Contents/Conference/Conference.svg +0 -3
  443. package/src/Presentation/components/UI/svgs/Icons/Contents/Conference/index.tsx +0 -22
  444. package/src/Presentation/components/UI/svgs/Icons/Contents/Contact/Contact.svg +0 -3
  445. package/src/Presentation/components/UI/svgs/Icons/Contents/Contact/index.tsx +0 -22
  446. package/src/Presentation/components/UI/svgs/Icons/Contents/ContactFilled/Contact filled.svg +0 -3
  447. package/src/Presentation/components/UI/svgs/Icons/Contents/ContactFilled/index.tsx +0 -22
  448. package/src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/Group chat.svg +0 -3
  449. package/src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/index.tsx +0 -35
  450. package/src/Presentation/components/UI/svgs/Icons/Contents/Notifications/Notifications.svg +0 -3
  451. package/src/Presentation/components/UI/svgs/Icons/Contents/Notifications/index.tsx +0 -22
  452. package/src/Presentation/components/UI/svgs/Icons/Contents/PrivateChat/Private chat.svg +0 -3
  453. package/src/Presentation/components/UI/svgs/Icons/Contents/PrivateChat/index.tsx +0 -22
  454. package/src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/Public channel.svg +0 -7
  455. package/src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/index.tsx +0 -67
  456. package/src/Presentation/components/UI/svgs/Icons/Contents/Stream/Stream.svg +0 -3
  457. package/src/Presentation/components/UI/svgs/Icons/Contents/Stream/index.tsx +0 -22
  458. package/src/Presentation/components/UI/svgs/Icons/Contents/StreamFilled/Stream filled.svg +0 -3
  459. package/src/Presentation/components/UI/svgs/Icons/Contents/StreamFilled/index.tsx +0 -22
  460. package/src/Presentation/components/UI/svgs/Icons/Contents/User/User.svg +0 -3
  461. package/src/Presentation/components/UI/svgs/Icons/Contents/User/index.tsx +0 -35
  462. package/src/Presentation/components/UI/svgs/Icons/IconsCommonTypes.ts +0 -6
  463. package/src/Presentation/components/UI/svgs/Icons/Media/Attachment/Attachment.svg +0 -3
  464. package/src/Presentation/components/UI/svgs/Icons/Media/Attachment/index.tsx +0 -22
  465. package/src/Presentation/components/UI/svgs/Icons/Media/AudioFile/Audio file.svg +0 -3
  466. package/src/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.tsx +0 -22
  467. package/src/Presentation/components/UI/svgs/Icons/Media/BrokenFile/Broken file.svg +0 -3
  468. package/src/Presentation/components/UI/svgs/Icons/Media/BrokenFile/index.tsx +0 -22
  469. package/src/Presentation/components/UI/svgs/Icons/Media/Camera/Camera.svg +0 -3
  470. package/src/Presentation/components/UI/svgs/Icons/Media/Camera/index.tsx +0 -22
  471. package/src/Presentation/components/UI/svgs/Icons/Media/GifFile/GIF file.svg +0 -3
  472. package/src/Presentation/components/UI/svgs/Icons/Media/GifFile/index.tsx +0 -22
  473. package/src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/Image.svg +0 -3
  474. package/src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/index.tsx +0 -22
  475. package/src/Presentation/components/UI/svgs/Icons/Media/ImageFile/File.svg +0 -3
  476. package/src/Presentation/components/UI/svgs/Icons/Media/ImageFile/index.tsx +0 -35
  477. package/src/Presentation/components/UI/svgs/Icons/Media/ImageFilled/Image filled.svg +0 -3
  478. package/src/Presentation/components/UI/svgs/Icons/Media/ImageFilled/index.tsx +0 -22
  479. package/src/Presentation/components/UI/svgs/Icons/Media/LinkWeb/Link.svg +0 -3
  480. package/src/Presentation/components/UI/svgs/Icons/Media/LinkWeb/index.tsx +0 -22
  481. package/src/Presentation/components/UI/svgs/Icons/Media/Location/Location.svg +0 -4
  482. package/src/Presentation/components/UI/svgs/Icons/Media/Location/index.tsx +0 -26
  483. package/src/Presentation/components/UI/svgs/Icons/Media/TextDocument/Text document.svg +0 -3
  484. package/src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx +0 -22
  485. package/src/Presentation/components/UI/svgs/Icons/Media/Translate/Translate.svg +0 -3
  486. package/src/Presentation/components/UI/svgs/Icons/Media/Translate/index.tsx +0 -35
  487. package/src/Presentation/components/UI/svgs/Icons/Media/VideoFile/Video file.svg +0 -3
  488. package/src/Presentation/components/UI/svgs/Icons/Media/VideoFile/index.tsx +0 -22
  489. package/src/Presentation/components/UI/svgs/Icons/Moderation/Admin/Admin.svg +0 -3
  490. package/src/Presentation/components/UI/svgs/Icons/Moderation/Admin/index.tsx +0 -22
  491. package/src/Presentation/components/UI/svgs/Icons/Moderation/Banned/Banned.svg +0 -3
  492. package/src/Presentation/components/UI/svgs/Icons/Moderation/Banned/index.tsx +0 -22
  493. package/src/Presentation/components/UI/svgs/Icons/Moderation/Freeze/Freeze.svg +0 -3
  494. package/src/Presentation/components/UI/svgs/Icons/Moderation/Freeze/index.tsx +0 -22
  495. package/src/Presentation/components/UI/svgs/Icons/Moderation/Moderations/Moderations.svg +0 -3
  496. package/src/Presentation/components/UI/svgs/Icons/Moderation/Moderations/index.tsx +0 -22
  497. package/src/Presentation/components/UI/svgs/Icons/Moderation/Muted/Muted.svg +0 -3
  498. package/src/Presentation/components/UI/svgs/Icons/Moderation/Muted/index.tsx +0 -22
  499. package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowLeft/Arrow left.svg +0 -3
  500. package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowLeft/index.tsx +0 -22
  501. package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowRight/Arrow right.svg +0 -3
  502. package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowRight/index.tsx +0 -22
  503. package/src/Presentation/components/UI/svgs/Icons/Navigation/Back/Back.svg +0 -3
  504. package/src/Presentation/components/UI/svgs/Icons/Navigation/Back/index.tsx +0 -22
  505. package/src/Presentation/components/UI/svgs/Icons/Navigation/Close/Close.svg +0 -3
  506. package/src/Presentation/components/UI/svgs/Icons/Navigation/Close/index.tsx +0 -35
  507. package/src/Presentation/components/UI/svgs/Icons/Navigation/Down/Down.svg +0 -3
  508. package/src/Presentation/components/UI/svgs/Icons/Navigation/Down/index.tsx +0 -35
  509. package/src/Presentation/components/UI/svgs/Icons/Navigation/Leave/Leave.svg +0 -3
  510. package/src/Presentation/components/UI/svgs/Icons/Navigation/Leave/index.tsx +0 -35
  511. package/src/Presentation/components/UI/svgs/Icons/Navigation/More/More.svg +0 -7
  512. package/src/Presentation/components/UI/svgs/Icons/Navigation/More/index.tsx +0 -22
  513. package/src/Presentation/components/UI/svgs/Icons/Navigation/Next/Next.svg +0 -3
  514. package/src/Presentation/components/UI/svgs/Icons/Navigation/Next/index.tsx +0 -35
  515. package/src/Presentation/components/UI/svgs/Icons/Navigation/Plus/Plus.svg +0 -3
  516. package/src/Presentation/components/UI/svgs/Icons/Navigation/Plus/index.tsx +0 -22
  517. package/src/Presentation/components/UI/svgs/Icons/Navigation/Refresh/Refresh.svg +0 -3
  518. package/src/Presentation/components/UI/svgs/Icons/Navigation/Refresh/index.tsx +0 -36
  519. package/src/Presentation/components/UI/svgs/Icons/Navigation/Search/Search.svg +0 -3
  520. package/src/Presentation/components/UI/svgs/Icons/Navigation/Search/index.tsx +0 -35
  521. package/src/Presentation/components/UI/svgs/Icons/Navigation/Settings/Settings.svg +0 -3
  522. package/src/Presentation/components/UI/svgs/Icons/Navigation/Settings/index.tsx +0 -22
  523. package/src/Presentation/components/UI/svgs/Icons/Navigation/SettingsField/Settings filled.svg +0 -3
  524. package/src/Presentation/components/UI/svgs/Icons/Navigation/SettingsField/index.tsx +0 -22
  525. package/src/Presentation/components/UI/svgs/Icons/Status/Error/Error.svg +0 -3
  526. package/src/Presentation/components/UI/svgs/Icons/Status/Error/index.tsx +0 -36
  527. package/src/Presentation/components/UI/svgs/Icons/Status/Help/Help.svg +0 -3
  528. package/src/Presentation/components/UI/svgs/Icons/Status/Help/index.tsx +0 -22
  529. package/src/Presentation/components/UI/svgs/Icons/Status/Information/Information.svg +0 -3
  530. package/src/Presentation/components/UI/svgs/Icons/Status/Information/index.tsx +0 -22
  531. package/src/Presentation/components/UI/svgs/Icons/Status/InformationFill/index.tsx +0 -35
  532. package/src/Presentation/components/UI/svgs/Icons/Status/Loader/Loader.svg +0 -3
  533. package/src/Presentation/components/UI/svgs/Icons/Status/Loader/index.tsx +0 -22
  534. package/src/Presentation/components/UI/svgs/Icons/Status/Mention/Mention.svg +0 -3
  535. package/src/Presentation/components/UI/svgs/Icons/Status/Mention/index.tsx +0 -22
  536. package/src/Presentation/components/UI/svgs/Icons/Status/Sent/Sent.svg +0 -3
  537. package/src/Presentation/components/UI/svgs/Icons/Status/Sent/index.tsx +0 -22
  538. package/src/Presentation/components/UI/svgs/Icons/Status/ViewedDelivered/Viewed_Delivered.svg +0 -3
  539. package/src/Presentation/components/UI/svgs/Icons/Status/ViewedDelivered/index.tsx +0 -38
  540. package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOff/Camera off.svg +0 -3
  541. package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOff/index.tsx +0 -22
  542. package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOn/Camera on.svg +0 -3
  543. package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOn/index.tsx +0 -22
  544. package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOff/Check off.svg +0 -3
  545. package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOff/index.tsx +0 -22
  546. package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOn/Check on.svg +0 -3
  547. package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOn/index.tsx +0 -24
  548. package/src/Presentation/components/UI/svgs/Icons/Toggle/Favourite/Favourite.svg +0 -3
  549. package/src/Presentation/components/UI/svgs/Icons/Toggle/Favourite/index.tsx +0 -22
  550. package/src/Presentation/components/UI/svgs/Icons/Toggle/FavouriteFilled/Favourite filled.svg +0 -3
  551. package/src/Presentation/components/UI/svgs/Icons/Toggle/FavouriteFilled/index.tsx +0 -22
  552. package/src/Presentation/components/UI/svgs/Icons/Toggle/FullScreen/Full screen.svg +0 -3
  553. package/src/Presentation/components/UI/svgs/Icons/Toggle/FullScreen/inex.tsx +0 -22
  554. package/src/Presentation/components/UI/svgs/Icons/Toggle/Hide/Hide.svg +0 -3
  555. package/src/Presentation/components/UI/svgs/Icons/Toggle/Hide/index.tsx +0 -22
  556. package/src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/Play.svg +0 -3
  557. package/src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.tsx +0 -22
  558. package/src/Presentation/components/UI/svgs/Icons/Toggle/Louder/Louder.svg +0 -3
  559. package/src/Presentation/components/UI/svgs/Icons/Toggle/Louder/index.tsx +0 -22
  560. package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOff/Mic off.svg +0 -3
  561. package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOff/index.tsx +0 -22
  562. package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOn/Mic on.svg +0 -4
  563. package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOn/index.tsx +0 -26
  564. package/src/Presentation/components/UI/svgs/Icons/Toggle/Minimize/Minimize.svg +0 -3
  565. package/src/Presentation/components/UI/svgs/Icons/Toggle/Minimize/index.tsx +0 -22
  566. package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/Notify off.svg +0 -3
  567. package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/index.tsx +0 -35
  568. package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOn/Notify on.svg +0 -3
  569. package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOn/index.tsx +0 -35
  570. package/src/Presentation/components/UI/svgs/Icons/Toggle/Pause/Pause.svg +0 -3
  571. package/src/Presentation/components/UI/svgs/Icons/Toggle/Pause/index.tsx +0 -22
  572. package/src/Presentation/components/UI/svgs/Icons/Toggle/Quite/Quite.svg +0 -3
  573. package/src/Presentation/components/UI/svgs/Icons/Toggle/Quite/index.tsx +0 -22
  574. package/src/Presentation/components/UI/svgs/Icons/Toggle/Record/Record.svg +0 -3
  575. package/src/Presentation/components/UI/svgs/Icons/Toggle/Record/index.tsx +0 -22
  576. package/src/Presentation/components/UI/svgs/Icons/Toggle/Screenshare/Screenshare.svg +0 -3
  577. package/src/Presentation/components/UI/svgs/Icons/Toggle/Screenshare/index.tsx +0 -22
  578. package/src/Presentation/components/UI/svgs/Icons/Toggle/Show/Show.svg +0 -3
  579. package/src/Presentation/components/UI/svgs/Icons/Toggle/Show/index.tsx +0 -22
  580. package/src/Presentation/components/UI/svgs/Icons/Toggle/Speaker/Speaker.svg +0 -3
  581. package/src/Presentation/components/UI/svgs/Icons/Toggle/Speaker/index.tsx +0 -22
  582. package/src/Presentation/components/UI/svgs/Icons/Toggle/SpeakerOff/Speaker off.svg +0 -3
  583. package/src/Presentation/components/UI/svgs/Icons/Toggle/SpeakerOff/index.tsx +0 -22
  584. package/src/Presentation/components/UI/svgs/Icons/Toggle/StopRecord/Stop record.svg +0 -3
  585. package/src/Presentation/components/UI/svgs/Icons/Toggle/StopRecord/index.tsx +0 -22
  586. package/src/Presentation/components/UI/svgs/Icons/Toggle/StopShare/Stop share.svg +0 -3
  587. package/src/Presentation/components/UI/svgs/Icons/Toggle/StopShare/index.tsx +0 -22
  588. package/src/Presentation/components/containers/ColumnContainer/ColumnContainer.scss +0 -6
  589. package/src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx +0 -24
  590. package/src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.scss +0 -45
  591. package/src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.tsx +0 -95
  592. package/src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.scss +0 -45
  593. package/src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.tsx +0 -97
  594. package/src/Presentation/components/containers/RowRightContainer/RowRightContainer.scss +0 -46
  595. package/src/Presentation/components/containers/RowRightContainer/RowRightContainer.tsx +0 -97
  596. package/src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.scss +0 -45
  597. package/src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.tsx +0 -85
  598. package/src/Presentation/components/layouts/Desktop/DesktopLayout.scss +0 -31
  599. package/src/Presentation/components/layouts/Desktop/DesktopLayout.tsx +0 -52
  600. package/src/Presentation/components/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +0 -382
  601. package/src/Presentation/components/layouts/LayoutCommonTypes.ts +0 -7
  602. package/src/Presentation/components/layouts/TestStage/CompanyLogo/CompanyLogo.tsx +0 -27
  603. package/src/Presentation/components/layouts/TestStage/LoginView/Login.scss +0 -71
  604. package/src/Presentation/components/layouts/TestStage/LoginView/Login.tsx +0 -95
  605. package/src/Presentation/components/layouts/TestStage/TestStageMarkup.scss +0 -24
  606. package/src/Presentation/components/layouts/TestStage/TestStageMarkup.tsx +0 -1109
  607. package/src/Presentation/components/providers/ModalContextProvider/Modal.scss +0 -71
  608. package/src/Presentation/components/providers/ModalContextProvider/Modal.tsx +0 -131
  609. package/src/Presentation/components/providers/ModalContextProvider/ModalContextProvider.tsx +0 -38
  610. package/src/Presentation/components/providers/ModalContextProvider/useModal.ts +0 -39
  611. package/src/Presentation/components/providers/ProviderProps.ts +0 -5
  612. package/src/Presentation/components/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx +0 -344
  613. package/src/Presentation/components/providers/QuickBloxUIKitProvider/useEventMessagesRepository.ts +0 -10
  614. package/src/Presentation/components/providers/QuickBloxUIKitProvider/useQBConnection.ts +0 -38
  615. package/src/Presentation/components/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts +0 -83
  616. package/src/Presentation/components/providers/QuickBloxUIKitProvider/useQbUIKitDataContext.ts +0 -11
  617. package/src/QBconfig.ts +0 -221
  618. package/src/index-ui.ts +0 -77
  619. package/src/index.scss +0 -18
  620. package/src/index.tsx +0 -25
  621. package/src/logo.svg +0 -1
  622. package/src/package_artan_react_ui.json +0 -91
  623. package/src/package_original.json +0 -115
  624. package/src/qb-api-calls/index.ts +0 -581
  625. package/src/react-app-env.d.ts +0 -1
  626. package/src/setupTests.ts +0 -5
  627. package/src/utils/DateTimeFormatter.ts +0 -35
  628. package/src/utils/parse.ts +0 -74
  629. package/src/utils/utils.ts +0 -102
  630. package/tsconfig.json +0 -33
  631. package/typedoc.json +0 -4
  632. package/webpack.config.js +0 -56
  633. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/AIWidgetActions/AIWidgetActions.d.ts +0 -0
  634. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/ErrorMessageIcon.d.ts +0 -0
  635. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/SliderMenu.d.ts +0 -0
  636. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/Tone.d.ts +0 -0
  637. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/UseDefaultAIAssistAnswerWidget.d.ts +0 -0
  638. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.d.ts +0 -0
  639. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/UseDefaultAIRephraseMessageWidget.d.ts +0 -0
  640. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.d.ts +0 -0
  641. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/UseDefaultAITranslateWidget.d.ts +0 -0
  642. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/UseDefaultAITranslateWidgetWithProxy.d.ts +0 -0
  643. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/AIWidgets/useDefaultVoiceInputWidget.d.ts +0 -0
  644. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/ErrorToast/ErrorToast.d.ts +0 -0
  645. /package/dist/Presentation/{components/UI/Dialogs/MessagesView → Views/Dialog}/HighLightLink/HighLightLink.d.ts +0 -0
  646. /package/dist/Presentation/{components/UI/Dialogs → Views}/InviteMembers/NotFoundContent/NotFoundContent.d.ts +0 -0
  647. /package/dist/Presentation/{components/UI/Dialogs → Views}/InviteMembers/useInviteMembersViewModel.d.ts +0 -0
  648. /package/dist/Presentation/{components/UI/Dialogs → Views}/PreviewDialog/PreviewAudioFile/PreviewAudioFile.d.ts +0 -0
  649. /package/dist/Presentation/{components/UI/Dialogs → Views}/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.d.ts +0 -0
  650. /package/dist/Presentation/{components/UI/Dialogs → Views}/PreviewDialog/PreviewImageFile/PreviewImageFile.d.ts +0 -0
  651. /package/dist/Presentation/{components/UI/Dialogs → Views}/PreviewDialog/PreviewVideoFile/PreviewVideoFile.d.ts +0 -0
  652. /package/dist/Presentation/{components/layouts → layouts}/LayoutCommonTypes.d.ts +0 -0
  653. /package/dist/Presentation/{components/layouts → layouts}/TestStage/CompanyLogo/CompanyLogo.d.ts +0 -0
  654. /package/dist/Presentation/{components/layouts → layouts}/TestStage/TestStageMarkup.d.ts +0 -0
  655. /package/dist/Presentation/{components/providers → providers}/ModalContextProvider/Modal.d.ts +0 -0
  656. /package/dist/Presentation/{components/providers → providers}/ModalContextProvider/ModalContextProvider.d.ts +0 -0
  657. /package/dist/Presentation/{components/providers → providers}/ModalContextProvider/useModal.d.ts +0 -0
  658. /package/dist/Presentation/{components/providers → providers}/ProviderProps.d.ts +0 -0
  659. /package/dist/Presentation/{components/providers → providers}/QuickBloxUIKitProvider/useQbInitializedDataContext.d.ts +0 -0
  660. /package/dist/Presentation/{components/providers → providers}/QuickBloxUIKitProvider/useQbUIKitDataContext.d.ts +0 -0
  661. /package/dist/Presentation/{assets → themes}/DarkTheme.d.ts +0 -0
  662. /package/dist/Presentation/{assets → themes}/DefaultThemes/CustomTheme.d.ts +0 -0
  663. /package/dist/Presentation/{assets → themes}/DefaultThemes/DefaultTheme.d.ts +0 -0
  664. /package/dist/Presentation/{assets → themes}/LightTheme.d.ts +0 -0
  665. /package/dist/Presentation/{assets → themes}/ThemeScheme.d.ts +0 -0
  666. /package/dist/Presentation/{assets → themes}/UiKitTheme.d.ts +0 -0
@@ -1,1636 +0,0 @@
1
- import React, { useEffect, useRef, useState } from 'react';
2
- import './MessagesView.scss';
3
- import { QBAIRephrase } from 'qb-ai-rephrase';
4
- import { Tone } from 'qb-ai-rephrase/src/Tone';
5
- import { DialogEntity } from '../../../../../Domain/entity/DialogEntity';
6
- import useQBConnection from '../../../providers/QuickBloxUIKitProvider/useQBConnection';
7
- import ScrollableContainer from '../../../containers/ScrollableContainer/ScrollableContainer';
8
- import { MessageEntity } from '../../../../../Domain/entity/MessageEntity';
9
- import ChatMessageAttachmentEntity from '../../../../../Domain/entity/ChatMessageAttachmentEntity';
10
- import { FileType } from '../../../../../Domain/entity/FileTypes';
11
- import ImageEmpty from '../../svgs/Icons/Media/ImageEmpty';
12
- import ImagePlay from '../../svgs/Icons/Toggle/ImagePlay';
13
- import ColumnContainer from '../../../containers/ColumnContainer/ColumnContainer';
14
- import ImageFile from '../../svgs/Icons/Media/ImageFile';
15
- import { MessagesViewModel } from './MessagesViewModel';
16
- import useMessagesViewModel from './useMessagesViewModel';
17
- import LoaderComponent from '../../Placeholders/LoaderComponent/LoaderComponent';
18
- import ErrorComponent from '../../Placeholders/ErrorComponent/ErrorComponent';
19
- import HeaderMessages from './HeaderMessages/HeaderMessages';
20
- import VideoAttachmentComponent from './VideoAttachmentComponent/VideoAttachmentComponent';
21
- import ImageAttachmentComponent from './ImageAttachmentComponent/ImageAttachmentComponent';
22
- import { DialogType } from '../../../../../Domain/entity/DialogTypes';
23
- import { GroupDialogEntity } from '../../../../../Domain/entity/GroupDialogEntity';
24
- import { PrivateDialogEntity } from '../../../../../Domain/entity/PrivateDialogEntity';
25
- import { UserEntity } from '../../../../../Domain/entity/UserEntity';
26
- import useQbInitializedDataContext from '../../../providers/QuickBloxUIKitProvider/useQbInitializedDataContext';
27
- import { Pagination } from '../../../../../Domain/repository/Pagination';
28
- import {
29
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
30
- getDateShortFormatEU,
31
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
32
- // formatShortTime3,
33
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
34
- // formatShortTime4,
35
- // getTimeShort24hFormat,
36
- } from '../../../../../utils/DateTimeFormatter';
37
- import ActiveSvg from '../../svgs/ActiveSvg/ActiveSvg';
38
- import AttachmentIcon from '../../svgs/Icons/Media/Attachment';
39
- import SendIcon from '../../svgs/Icons/Actions/Send';
40
- import AudioAttachmentComponent from './AudioAttachmentComponent/AudioAttachmentComponent';
41
- import AudioFile from '../../svgs/Icons/Media/AudioFile';
42
- import VoiceIcon from '../../svgs/Icons/Actions/Voice';
43
- import { stringifyError } from '../../../../../utils/parse';
44
- import VoiceRecordingProgress from './VoiceRecordingProgress/VoiceRecordingProgress';
45
- import UiKitTheme from '../../../../assets/UiKitTheme';
46
- import { AIMessageWidget } from './AIWidgets/AIMessageWidget';
47
- import { DialogsViewModel } from '../../../../Views/Dialogs/DialogViewModel';
48
- import { HighLightLink, messageHasUrls } from './HighLightLink/HighLightLink';
49
- import { OutGoingMessage } from './OutGoingMessage/OutGoingMessage';
50
- import { InComingMessage } from './InComingMessage/InComingMessage';
51
- import NecktieIcon from '../../svgs/Icons/AIWidgets/NecktieIcon';
52
- import HandshakeIcon from '../../svgs/Icons/AIWidgets/HandshakeIcon';
53
- import WhiteCheckMarkIcon from '../../svgs/Icons/AIWidgets/WhiteCheckMarkIcon';
54
- import MuscleIcon from '../../svgs/Icons/AIWidgets/MuscleIcon';
55
- import PalmsUpTogetherIcon from '../../svgs/Icons/AIWidgets/PalmsUpTogetherIcon';
56
- import NeutralFaceIcon from '../../svgs/Icons/AIWidgets/NeutralFaceIcon';
57
- import HammerIcon from '../../svgs/Icons/AIWidgets/HammerIcon';
58
- import BookIcon from '../../svgs/Icons/AIWidgets/BookIcon/BookIcon';
59
- import PointUpIcon from '../../svgs/Icons/AIWidgets/PointUpIcon';
60
- import SmirkIcon from '../../svgs/Icons/AIWidgets/SmirkIcon';
61
- import PerformingArtsIcon from '../../svgs/Icons/AIWidgets/PerformingArtsIcon';
62
- import { FunctionTypeVoidToVoid } from '../../../../Views/Base/BaseViewModel';
63
- import AIWidgetActions, {
64
- MenuItem,
65
- } from './AIWidgets/AIWidgetActions/AIWidgetActions';
66
- import ToneIcon from '../../svgs/Icons/Actions/Tone';
67
- import DefaultAttachmentComponent from './DefaultAttachmentComponent/DefaultAttachmentComponent';
68
- import { AIUtils } from '../../../../../utils/utils';
69
- import { ErrorToast } from './ErrorToast/ErrorToast';
70
-
71
- type HeaderDialogsMessagesProps = {
72
- AIRephrase?: AIMessageWidget;
73
- AITranslate?: AIMessageWidget;
74
- AIAssist?: AIMessageWidget;
75
- dialogsViewModel: DialogsViewModel;
76
- onDialogInformationHandler?: FunctionTypeVoidToVoid;
77
- maxWidthToResize?: string;
78
- theme?: UiKitTheme;
79
- subHeaderContent?: React.ReactNode;
80
- upHeaderContent?: React.ReactNode;
81
- };
82
-
83
- // eslint-disable-next-line react/function-component-definition
84
- const MessagesView: React.FC<HeaderDialogsMessagesProps> = ({
85
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
86
- AIRephrase,
87
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
88
- AITranslate,
89
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
90
- AIAssist,
91
- dialogsViewModel,
92
- onDialogInformationHandler,
93
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
94
- maxWidthToResize = undefined,
95
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
96
- theme = undefined,
97
- subHeaderContent = undefined,
98
- upHeaderContent = undefined,
99
- }: HeaderDialogsMessagesProps) => {
100
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
101
- const maxWidthToResizing =
102
- maxWidthToResize || '$message-view-container-wrapper-min-width';
103
- // const maxWidthToResizing = '720px'; // $message-view-container-wrapper-min-width:
104
-
105
- const currentContext = useQbInitializedDataContext();
106
- const currentUserId =
107
- currentContext.storage.REMOTE_DATA_SOURCE.authInformation?.userId;
108
- const currentUserName =
109
- currentContext.storage.REMOTE_DATA_SOURCE.authInformation?.userName;
110
- // const translations: Record<number, string> = {};
111
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
112
- const { connectionRepository, browserOnline } = useQBConnection();
113
- const [dialogMessagesCount, setDialogMessageCount] = useState(100);
114
- const [hasMore, setHasMore] = React.useState(true);
115
- const [scrollUpToDown, setScrollUpToDown] = React.useState(false);
116
- const [messagesToView, setMessagesToView] = React.useState<MessageEntity[]>(
117
- [],
118
- );
119
- const [showErrorToast, setShowErrorToast] = useState<boolean>(true);
120
- const [messageErrorToast, setMessageErrorToast] = useState<string>('');
121
-
122
- const [waitAIWidget, setWaitAIWidget] = useState<boolean>(false);
123
- const [prevTextMessage, setPrevTextMessage] = useState<string>('');
124
-
125
- const maxTokensForAIRephrase =
126
- currentContext.InitParams.qbConfig.configAIApi.AIRephraseWidgetConfig
127
- .maxTokens;
128
-
129
- const rephraseTones: Tone[] =
130
- currentContext.InitParams.qbConfig.configAIApi.AIRephraseWidgetConfig.Tones;
131
-
132
- const messagesViewModel: MessagesViewModel = useMessagesViewModel(
133
- dialogsViewModel.entity?.type,
134
- dialogsViewModel.entity,
135
- );
136
-
137
- const { maxFileSize } = currentContext.InitParams;
138
-
139
- useEffect(() => {
140
- if (showErrorToast) {
141
- setTimeout(() => {
142
- setShowErrorToast(false);
143
- setMessageErrorToast('');
144
- }, 1800);
145
- }
146
- }, [showErrorToast]);
147
-
148
- useEffect(() => {
149
- console.log('HAVE NEW DIALOG');
150
- // messagesViewModel.getMessages(new Pagination());
151
- messagesViewModel.entity = dialogsViewModel.entity;
152
- setMessagesToView([]);
153
- }, [dialogsViewModel.entity]);
154
-
155
- useEffect(() => {
156
- console.log('HAVE NEW ENTITY');
157
- messagesViewModel.getMessages(new Pagination());
158
- }, [messagesViewModel.entity]);
159
- //
160
- useEffect(() => {
161
- console.log('HAVE NEW ENTITY');
162
- dialogsViewModel.setWaitLoadingStatus(messagesViewModel?.loading);
163
- }, [messagesViewModel?.loading]);
164
- //
165
- function prepareFirstPage(initData: MessageEntity[]) {
166
- const firstPageSize =
167
- messagesViewModel.messages.length < 47
168
- ? messagesViewModel.messages.length
169
- : 47;
170
-
171
- // for (let i = 0; i < firstPageSize; i += 1) {
172
- for (let i = firstPageSize - 1; i >= 0; i -= 1) {
173
- initData.push(messagesViewModel.messages[i]);
174
- }
175
- }
176
-
177
- const fetchMoreData = () => {
178
- if (messagesToView.length >= dialogMessagesCount) {
179
- setHasMore(false);
180
-
181
- return;
182
- }
183
- if (
184
- hasMore &&
185
- messagesToView.length > 0 &&
186
- messagesToView.length < dialogMessagesCount
187
- ) {
188
- setMessagesToView((prevState) => {
189
- const newState = [...prevState];
190
-
191
- const newMessageEntity: MessageEntity =
192
- messagesViewModel.messages[prevState.length];
193
-
194
- newState.push(newMessageEntity);
195
-
196
- return newState;
197
- });
198
- }
199
- };
200
-
201
- //
202
- useEffect(() => {
203
- console.log('Messages have changed');
204
- setDialogMessageCount(messagesViewModel?.messages?.length || 0);
205
- if (messagesToView?.length === 0 && messagesViewModel.messages.length > 0) {
206
- // setDialogMessageCount(messagesViewModel.messages.length);
207
- const initData: MessageEntity[] = [];
208
-
209
- console.log(JSON.stringify(messagesViewModel.messages));
210
- prepareFirstPage(initData);
211
- setMessagesToView(initData);
212
- } else if (messagesViewModel.messages.length - messagesToView.length >= 1) {
213
- setHasMore(true);
214
- setScrollUpToDown(true);
215
- }
216
- }, [messagesViewModel.messages]);
217
- //
218
- useEffect(() => {
219
- console.log('dialogMessagesCount have changed');
220
- if (messagesViewModel.messages.length - messagesToView.length >= 1) {
221
- fetchMoreData();
222
- }
223
- }, [dialogMessagesCount]);
224
- //
225
-
226
- const getSenderName = (sender?: UserEntity): string | undefined => {
227
- if (!sender) return undefined;
228
-
229
- return (
230
- sender.full_name || sender.login || sender.email || sender.id.toString()
231
- );
232
- };
233
-
234
- // function sendMessageToTranslate(message: MessageEntity) {
235
- // if (!waitAIWidget) {
236
- // setWaitAIWidget(true);
237
- // AITranslation?.textToWidget(
238
- // message.message,
239
- // messageEntitiesToIChatMessageCollection(messagesToView),
240
- // );
241
- // }
242
- // }
243
- //
244
- // function sendMessageToAIAssistAnswer(message: MessageEntity) {
245
- // if (!waitAIWidget) {
246
- // setWaitAIWidget(true);
247
- // AIAnswerToMessage?.textToWidget(
248
- // message.message,
249
- // messageEntitiesToIChatMessageCollection(messagesToView),
250
- // );
251
- // }
252
- // }
253
-
254
- const renderMessage = (message: MessageEntity, index: number) => {
255
- const SystemMessage = 'SystemMessage';
256
- const IncomingMessage = 'IncomingMessage';
257
- const OutgoingMessage = 'OutgoingMessage';
258
-
259
- console.log('render message: ', JSON.stringify(message), ' index: ', index);
260
- let messageView: JSX.Element;
261
- const checkMessageType = (m: MessageEntity): string => {
262
- if (m.notification_type && m.notification_type.length > 0) {
263
- return SystemMessage;
264
- }
265
- if (
266
- (m.sender && m.sender.id.toString() !== currentUserId?.toString()) ||
267
- m.sender_id.toString() !== currentUserId?.toString()
268
- ) {
269
- return IncomingMessage;
270
- }
271
-
272
- return OutgoingMessage;
273
- };
274
-
275
- const messageTypes: string = checkMessageType(message);
276
-
277
- const messageContentRender = (mc: MessageEntity) => {
278
- const messageText = <div>{mc.message}</div>;
279
- let messageContent: JSX.Element = messageText;
280
-
281
- const attachmentContentRender = (att: ChatMessageAttachmentEntity) => {
282
- // let contentPlaceHolder: JSX.Element = <div>{att.type.toString()}</div>;
283
-
284
- let contentPlaceHolder: JSX.Element = (
285
- <DefaultAttachmentComponent fileName={att.file?.name || ''} />
286
- );
287
-
288
- if (att.type.toString().includes(FileType.video)) {
289
- contentPlaceHolder = att.file ? (
290
- <VideoAttachmentComponent videoFile={att.file} />
291
- ) : (
292
- <ImagePlay />
293
- );
294
- }
295
- if (att.type.toString().includes(FileType.audio)) {
296
- contentPlaceHolder = att.file ? (
297
- <AudioAttachmentComponent audioFile={att.file} />
298
- ) : (
299
- <AudioFile />
300
- );
301
- }
302
- if (att.type.toString().includes(FileType.image)) {
303
- contentPlaceHolder = att.file ? (
304
- <ImageAttachmentComponent imageFile={att.file} />
305
- ) : (
306
- <ImageEmpty />
307
- );
308
- }
309
- if (att.type.toString().includes(FileType.text)) {
310
- contentPlaceHolder = att.file ? (
311
- // <div>TEXT</div>
312
- <DefaultAttachmentComponent fileName={att.file.name || ''} />
313
- ) : (
314
- <ImageFile width="24" height="24" applyZoom />
315
- );
316
- }
317
- let contentResult: JSX.Element = (
318
- <div className="message-view-container--message-content-wrapper">
319
- {contentPlaceHolder}
320
- </div>
321
- );
322
-
323
- if (att.type === FileType.text) {
324
- contentResult = (
325
- <div className="message-view-container--file-message-content-wrapper">
326
- <div
327
- style={theme ? { backgroundColor: theme.caption() } : {}}
328
- className="message-view-container__file-message-icon"
329
- >
330
- {contentPlaceHolder}
331
- </div>
332
- <div>{att.name || 'file'}</div>
333
- </div>
334
- );
335
- }
336
-
337
- return contentResult;
338
- };
339
-
340
- if (mc.attachments && mc.attachments.length > 0) {
341
- messageContent = (
342
- <ColumnContainer maxWidth="100%">
343
- {mc.attachments.map((attachment) =>
344
- attachmentContentRender(attachment),
345
- )}
346
- {messageText}
347
- </ColumnContainer>
348
- );
349
- }
350
-
351
- if (
352
- messageHasUrls(mc.message) &&
353
- !(mc.attachments && mc.attachments.length > 0)
354
- ) {
355
- return <HighLightLink messageText={mc.message} />;
356
- }
357
-
358
- return messageContent;
359
- };
360
-
361
- if (messageTypes === SystemMessage) {
362
- messageView = (
363
- <div
364
- className="message-view-container--system-message-wrapper"
365
- key={message.id}
366
- >
367
- <div
368
- style={theme ? { backgroundColor: theme.disabledElements() } : {}}
369
- className="message-view-container--system-message-wrapper__date_container"
370
- >
371
- <div>{getDateShortFormatEU(message.date_sent)},</div>
372
- </div>
373
- {/* <div>{getTimeShort24hFormat(message.date_sent)}</div> */}
374
- <div>{message.message}</div>
375
- </div>
376
- );
377
- } else if (messageTypes === IncomingMessage) {
378
- messageView = (
379
- <InComingMessage
380
- key={message.id}
381
- theme={theme}
382
- senderName={getSenderName(message.sender)}
383
- message={message}
384
- // element={messageContentRender(message)}
385
- onStartLoader={() => {
386
- setWaitAIWidget(true);
387
- }}
388
- onStopLoader={() => {
389
- setWaitAIWidget(false);
390
- }}
391
- onErrorToast={(messageError) => {
392
- setShowErrorToast(true);
393
- setMessageErrorToast(messageError);
394
- }}
395
- // renderWidget={
396
- // <ContextMenu
397
- // widgetToRender={
398
- // <AIWidgetIcon applyZoom color="var(--main-elements)" />
399
- // }
400
- // items={[
401
- // {
402
- // title: 'AI Assist Answer',
403
- // action: () => {
404
- // sendMessageToAIAssistAnswer(message);
405
- // },
406
- // },
407
- // {
408
- // title: 'AI Translate',
409
- // action: () => {
410
- // sendMessageToTranslate(message);
411
- // },
412
- // },
413
- // ]}
414
- // />
415
- // }
416
- currentUserId={currentUserId}
417
- messagesToView={messagesToView}
418
- AITranslation={AITranslate}
419
- AIAnswerToMessage={AIAssist}
420
- // translationDATA={translations}
421
- // index={index}
422
- // updateData={(ind: number, v: string) => {
423
- // translations[ind] = v;
424
- // }}
425
- />
426
- );
427
- } else {
428
- messageView = (
429
- <OutGoingMessage
430
- key={message.id}
431
- message={message}
432
- theme={theme}
433
- element={messageContentRender(message)}
434
- />
435
- );
436
- }
437
-
438
- return messageView;
439
- };
440
-
441
- const getCountDialogMembers = (dialogEntity: DialogEntity): number => {
442
- let participants = [];
443
-
444
- if (dialogEntity.type === DialogType.group) {
445
- participants = (dialogEntity as GroupDialogEntity).participantIds;
446
- } else if (dialogEntity.type === DialogType.private) {
447
- participants = [(dialogEntity as PrivateDialogEntity).participantId];
448
- } else if (dialogEntity.type === DialogType.public) {
449
- participants = [];
450
- }
451
-
452
- return participants.length;
453
- };
454
-
455
- const [fileToSend, setFileToSend] = useState<File | null>(null);
456
- const [messageText, setMessageText] = useState<string>('');
457
- const [warningErrorText, setWarningErrorText] = useState<string>('');
458
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
459
- const [widgetTextContent, setWidgetTextContent] = useState<string>('');
460
-
461
- useEffect(() => {
462
- setWarningErrorText(messagesViewModel.typingText);
463
- }, [messagesViewModel.typingText]);
464
-
465
- const ChangeFileHandler = (event: React.ChangeEvent<HTMLInputElement>) => {
466
- const reader = new FileReader();
467
- const file = event.currentTarget.files
468
- ? event.currentTarget.files[0]
469
- : null;
470
-
471
- reader.onloadend = () => {
472
- setFileToSend(file);
473
- };
474
-
475
- if (file !== null) reader.readAsDataURL(file);
476
- };
477
-
478
- const showErrorMessage = (errorMessage: string) => {
479
- setWarningErrorText(errorMessage);
480
- setTimeout(() => {
481
- setWarningErrorText('');
482
- }, 3000);
483
- };
484
-
485
- useEffect(() => {
486
- console.log('have Attachments');
487
- const MAXSIZE = maxFileSize || 90 * 1000000;
488
- const MAXSIZE_FOR_MESSAGE = MAXSIZE / (1024 * 1024);
489
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
490
- const flag = fileToSend?.size && fileToSend?.size < MAXSIZE;
491
-
492
- if (fileToSend?.size && fileToSend?.size < MAXSIZE) {
493
- messagesViewModel.sendAttachmentMessage(fileToSend);
494
- } else if (fileToSend) {
495
- showErrorMessage(
496
- `file size ${fileToSend?.size} must be less then ${MAXSIZE_FOR_MESSAGE} mb.`,
497
- );
498
- }
499
- }, [fileToSend]);
500
-
501
- const [isVoiceMessage, setVoiceMessage] = useState(true);
502
- const [isRecording, setIsRecording] = useState(false);
503
- //
504
- const [permission, setPermission] = useState(false);
505
-
506
- // const [recordingStatus, setRecordingStatus] = useState('inactive');
507
-
508
- const [stream, setStream] = useState<MediaStream>();
509
- // const [mediaRecorder, setMediaRecorder] = useState<MediaRecorder>();
510
- const mediaRecorder = useRef<MediaRecorder>();
511
- const [resultAudioBlob, setResultAudioBlob] = useState<Blob>();
512
-
513
- const [audioChunks, setAudioChunks] = useState<Array<Blob>>([]);
514
-
515
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
516
- const mimeType = 'audio/webm;codecs=opus'; // audio/ogg audio/mpeg audio/webm audio/x-wav audio/mp4
517
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
518
- const getMicrophonePermission = async () => {
519
- // if ('MediaRecorder' in window)
520
- if (window) {
521
- try {
522
- const mediaStream = await navigator.mediaDevices.getUserMedia({
523
- audio: true,
524
- video: false,
525
- });
526
-
527
- setPermission(true);
528
- setStream(mediaStream);
529
- } catch (err) {
530
- // setWarningErrorText(
531
- // 'The MediaRecorder API is not supported in your browser.',
532
- // );
533
- showErrorMessage(
534
- `The MediaRecorder API throws exception ${stringifyError(err)} .`,
535
- );
536
- }
537
- } else {
538
- // setWarningErrorText(
539
- // 'The MediaRecorder API is not supported in your browser.',
540
- // );
541
- showErrorMessage(
542
- 'The MediaRecorder API is not supported in your browser.',
543
- );
544
- }
545
- };
546
-
547
- // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await
548
- const startRecording = async () => {
549
- if (!stream) return;
550
- const mimeTypes = [
551
- 'audio/aac',
552
- 'audio/mp4',
553
- 'audio/mpeg',
554
- 'audio/ogg',
555
- 'audio/wav',
556
- 'audio/webm',
557
- 'audio/3gpp',
558
- 'audio/flac',
559
- 'audio/x-aiff',
560
- 'audio/x-m4a',
561
- ];
562
-
563
- console.log('MIME TYPES: ');
564
- mimeTypes.forEach((mType) => {
565
- if (MediaRecorder.isTypeSupported(mimeType)) {
566
- console.log(`${mType} is supported`);
567
- } else {
568
- console.log(`${mType} is not supported`);
569
- }
570
- });
571
- // audio/mp4;codecs=mp4a audio/webm;codecs=opus audio/webm;codecs=vp9,opus
572
- const mimeContent = window.MediaRecorder.isTypeSupported('audio/mp4')
573
- ? 'audio/mp4;codecs=mp4a'
574
- : 'audio/webm;codecs=opus';
575
-
576
- const media = new MediaRecorder(stream, { mimeType: mimeContent });
577
-
578
- mediaRecorder.current = media;
579
- mediaRecorder.current.start();
580
-
581
- const localAudioChunks: any[] = [];
582
-
583
- mediaRecorder.current.ondataavailable = (event) => {
584
- // const localAudioChunks: any[] = [];
585
-
586
- if (typeof event.data === 'undefined') return;
587
- if (event.data.size === 0) return;
588
- localAudioChunks.push(event.data);
589
- console.log('voice data');
590
- // setAudioChunks(localAudioChunks);
591
- };
592
-
593
- setAudioChunks(localAudioChunks);
594
- };
595
-
596
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
597
- const stopRecording = () => {
598
- if (!mediaRecorder.current) return;
599
- // setRecordingStatus('inactive');
600
- mediaRecorder.current.stop();
601
-
602
- mediaRecorder.current.onstop = () => {
603
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
604
- const mimeContent = window.MediaRecorder.isTypeSupported(
605
- 'audio/mp4;codecs=mp4a',
606
- )
607
- ? 'audio/mp4;codecs=mp4a'
608
- : 'audio/webm;codecs=opus';
609
- // const audioBlob = new Blob(audioChunks, { type: mimeContent }); // mimeType
610
- // const mp4Blob = new Blob(recordedChunks, { type: 'video/mp4' });
611
-
612
- // const audioBlob = new Blob(audioChunks, { type: 'video/mp4' }); // mimeType
613
- // const audioBlob = new Blob(audioChunks, { type: 'audio/mp4' }); // mimeType
614
- const audioBlob = new Blob(audioChunks, { type: 'audio/mp4' });
615
-
616
- setResultAudioBlob(audioBlob);
617
-
618
- setAudioChunks([]);
619
- //
620
- stream?.getAudioTracks().forEach((track) => {
621
- track.stop();
622
- });
623
- setPermission(false);
624
- //
625
- };
626
- };
627
-
628
- //
629
- const blobToFile = (theBlob: Blob, fileName: string): File => {
630
- const b: any = theBlob;
631
-
632
- // A Blob() is almost a File() - it's just missing the two properties below which we will add
633
- b.lastModifiedDate = new Date();
634
- b.name = fileName;
635
-
636
- // Cast to a File() type
637
- const resultFile = theBlob as unknown as File;
638
-
639
- return resultFile;
640
- };
641
-
642
- const [useAudioWidget, setUseAudioWidget] = useState<boolean>(false);
643
-
644
- useEffect(() => {
645
- const fileExt = 'mp4';
646
-
647
- if (resultAudioBlob) {
648
- const voiceMessage = blobToFile(
649
- resultAudioBlob,
650
- `${currentUserName || ''}_voice_message.${fileExt}`,
651
- );
652
-
653
- setFileToSend(voiceMessage);
654
- if (useAudioWidget) {
655
- setUseAudioWidget(false);
656
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
657
- // AITranslation?.fileToWidget(
658
- // voiceMessage,
659
- // messageEntitiesToIChatMessageCollection(messagesToView),
660
- // );
661
- }
662
- //
663
- }
664
- }, [resultAudioBlob]);
665
- // test component version
666
- // useEffect(() => {
667
- // if (isRecording) {
668
- // setWarningErrorText(`Your voice is recording during for 1 minute`);
669
- // } else {
670
- // setWarningErrorText('');
671
- // }
672
- // }, [isRecording]);
673
- // work version below:
674
- useEffect(() => {
675
- // setFileToSend(null);
676
- if (isRecording) {
677
- if (!permission) {
678
- // eslint-disable-next-line promise/catch-or-return,promise/always-return
679
- getMicrophonePermission().catch(() => {
680
- // setWarningErrorText(`Have no audio.`);
681
- showErrorMessage(`Have no audio.`);
682
- });
683
- } else {
684
- // eslint-disable-next-line promise/catch-or-return,promise/always-return
685
- startRecording().then(() => {
686
- setWarningErrorText(`Your voice is recording during for 1 minutes`);
687
- });
688
- }
689
- } else {
690
- if (permission && mediaRecorder.current) {
691
- stopRecording();
692
- }
693
- setWarningErrorText('');
694
- }
695
- }, [isRecording]);
696
-
697
- useEffect(() => {
698
- if (isRecording && permission) {
699
- // eslint-disable-next-line promise/always-return,promise/catch-or-return
700
- startRecording().then(() => {
701
- setWarningErrorText(`Your voice is recording during for 1 minutes`);
702
- });
703
- }
704
- }, [permission]);
705
-
706
- function sendTextMessageActions() {
707
- if (messagesViewModel?.loading) return;
708
- setVoiceMessage(true);
709
- if (messageText.length > 0 && messageText.length <= 1000) {
710
- const messageTextToSend = messageText;
711
-
712
- setMessageText('');
713
- messagesViewModel.sendTextMessage(messageTextToSend);
714
- setMessageText('');
715
- } else {
716
- setWarningErrorText(
717
- 'length of text message must be less then 1000 chars.',
718
- );
719
- setTimeout(() => {
720
- setWarningErrorText('');
721
- }, 3000);
722
- }
723
- }
724
-
725
- useEffect(() => {
726
- setWaitAIWidget(false);
727
- if (AIRephrase?.textToContent && AIRephrase?.textToContent.length > 0) {
728
- setMessageText(AIRephrase?.textToContent);
729
- setWidgetTextContent(AIRephrase?.textToContent);
730
- setTimeout(() => {
731
- setWidgetTextContent('');
732
- }, 45 * 1000);
733
- }
734
- }, [AIRephrase?.textToContent]);
735
-
736
- useEffect(() => {
737
- setWaitAIWidget(false);
738
- // if (
739
- // AITranslation?.textToContent &&
740
- // AITranslation?.textToContent.length > 0
741
- // ) {
742
- // setMessageText(AITranslation?.textToContent);
743
- // setWidgetTextContent(AITranslation?.textToContent);
744
- // setTimeout(() => {
745
- // setWidgetTextContent('');
746
- // }, 45 * 1000);
747
- // }
748
- }, [AITranslate?.textToContent]);
749
-
750
- useEffect(() => {
751
- setWaitAIWidget(false);
752
- if (AIAssist?.textToContent && AIAssist?.textToContent.length > 0) {
753
- setMessageText(AIAssist?.textToContent);
754
- setWidgetTextContent(AIAssist?.textToContent);
755
- setTimeout(() => {
756
- setWidgetTextContent('');
757
- }, 45 * 1000);
758
- }
759
- }, [AIAssist?.textToContent]);
760
- const useSubContent = subHeaderContent || false;
761
- const useUpContent = upHeaderContent || false;
762
-
763
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
764
- // function getAIEditingMessagesItems() {
765
- // return [
766
- // {
767
- // title: 'Professional Tone',
768
- // icon: <NecktieIcon />,
769
- // action: () => {
770
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
771
- // setWaitAIWidget(true);
772
- // AIRephrase?.textToWidget(
773
- // messageText,
774
- // AIUtils.messageEntitiesToIChatMessageCollection(
775
- // messagesToView,
776
- // currentUserId,
777
- // maxTokensForAIRephrase,
778
- // ),
779
- // {
780
- // tone: QBAIRephrase.defaultTones()[0],
781
- // // tone: {
782
- // // name: 'Professional Tone',
783
- // // description: '',
784
- // // iconEmoji: '',
785
- // // },
786
- // },
787
- // )
788
- // .then((answerText) => {
789
- // // eslint-disable-next-line promise/always-return
790
- // if (answerText === 'Rephrase failed.') {
791
- // setMessageErrorToast('Rephrase failed.');
792
- // setShowErrorToast(true);
793
- // }
794
- // setWaitAIWidget(false);
795
- // })
796
- // .catch(() => {
797
- // setMessageErrorToast('Rephrase failed.');
798
- // setShowErrorToast(true);
799
- // setWaitAIWidget(false);
800
- // });
801
- // }
802
- // },
803
- // },
804
- // {
805
- // title: 'Friendly Tone',
806
- // icon: <HandshakeIcon />,
807
- // action: () => {
808
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
809
- // setWaitAIWidget(true);
810
- // AIRephrase?.textToWidget(
811
- // messageText,
812
- // AIUtils.messageEntitiesToIChatMessageCollection(
813
- // messagesToView,
814
- // currentUserId,
815
- // maxTokensForAIRephrase,
816
- // ),
817
- // {
818
- // // tone: { name: 'Friendly Tone', description: '', iconEmoji: '' },
819
- // tone: QBAIRephrase.defaultTones()[1],
820
- // },
821
- // )
822
- // .then((answerText) => {
823
- // // eslint-disable-next-line promise/always-return
824
- // if (answerText === 'Rephrase failed.') {
825
- // setMessageErrorToast('Rephrase failed.');
826
- // setShowErrorToast(true);
827
- // }
828
- // setWaitAIWidget(false);
829
- // })
830
- // .catch(() => {
831
- // setMessageErrorToast('Rephrase failed.');
832
- // setShowErrorToast(true);
833
- // setWaitAIWidget(false);
834
- // });
835
- // }
836
- // },
837
- // },
838
- // {
839
- // title: 'Encouraging Tone',
840
- // icon: <MuscleIcon />,
841
- // action: () => {
842
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
843
- // setWaitAIWidget(true);
844
- // AIRephrase?.textToWidget(
845
- // messageText,
846
- // AIUtils.messageEntitiesToIChatMessageCollection(
847
- // messagesToView,
848
- // currentUserId,
849
- // maxTokensForAIRephrase,
850
- // ),
851
- // {
852
- // tone: QBAIRephrase.defaultTones()[2],
853
- // // tone: {
854
- // // name: 'Encouraging Tone',
855
- // // description: '',
856
- // // iconEmoji: '',
857
- // // },
858
- // },
859
- // )
860
- // .then((answerText) => {
861
- // // eslint-disable-next-line promise/always-return
862
- // if (answerText === 'Rephrase failed.') {
863
- // setMessageErrorToast('Rephrase failed.');
864
- // setShowErrorToast(true);
865
- // }
866
- // setWaitAIWidget(false);
867
- // })
868
- // .catch(() => {
869
- // setMessageErrorToast('Rephrase failed.');
870
- // setShowErrorToast(true);
871
- // setWaitAIWidget(false);
872
- // });
873
- // }
874
- // },
875
- // },
876
- // {
877
- // title: 'Empathetic Tone',
878
- // icon: <PalmsUpTogetherIcon />,
879
- // action: () => {
880
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
881
- // setWaitAIWidget(true);
882
- // AIRephrase?.textToWidget(
883
- // messageText,
884
- // AIUtils.messageEntitiesToIChatMessageCollection(
885
- // messagesToView,
886
- // currentUserId,
887
- // maxTokensForAIRephrase,
888
- // ),
889
- // {
890
- // tone: QBAIRephrase.defaultTones()[3],
891
- // // tone: {
892
- // // name: 'Empathetic Tone',
893
- // // description: '',
894
- // // iconEmoji: '',
895
- // // },
896
- // },
897
- // )
898
- // .then((answerText) => {
899
- // // eslint-disable-next-line promise/always-return
900
- // if (answerText === 'Rephrase failed.') {
901
- // setMessageErrorToast('Rephrase failed.');
902
- // setShowErrorToast(true);
903
- // }
904
- // setWaitAIWidget(false);
905
- // })
906
- // .catch(() => {
907
- // setMessageErrorToast('Rephrase failed.');
908
- // setShowErrorToast(true);
909
- // setWaitAIWidget(false);
910
- // });
911
- // }
912
- // },
913
- // },
914
- // {
915
- // title: 'Neutral Tone',
916
- // icon: <NeutralFaceIcon />,
917
- // action: () => {
918
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
919
- // setWaitAIWidget(true);
920
- // AIRephrase?.textToWidget(
921
- // messageText,
922
- // AIUtils.messageEntitiesToIChatMessageCollection(
923
- // messagesToView,
924
- // currentUserId,
925
- // maxTokensForAIRephrase,
926
- // ),
927
- // {
928
- // // tone: { name: 'Neutral Tone', description: '', iconEmoji: '' },
929
- // tone: QBAIRephrase.defaultTones()[4],
930
- // },
931
- // )
932
- // .then((answerText) => {
933
- // // eslint-disable-next-line promise/always-return
934
- // if (answerText === 'Rephrase failed.') {
935
- // setMessageErrorToast('Rephrase failed.');
936
- // setShowErrorToast(true);
937
- // }
938
- // setWaitAIWidget(false);
939
- // })
940
- // .catch(() => {
941
- // setMessageErrorToast('Rephrase failed.');
942
- // setShowErrorToast(true);
943
- // setWaitAIWidget(false);
944
- // });
945
- // }
946
- // },
947
- // },
948
- // {
949
- // title: 'Assertive Tone',
950
- // icon: <HammerIcon />,
951
- // action: () => {
952
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
953
- // setWaitAIWidget(true);
954
- // AIRephrase?.textToWidget(
955
- // messageText,
956
- // AIUtils.messageEntitiesToIChatMessageCollection(
957
- // messagesToView,
958
- // currentUserId,
959
- // maxTokensForAIRephrase,
960
- // ),
961
- // {
962
- // tone: QBAIRephrase.defaultTones()[5],
963
- // // tone: {
964
- // // name: 'Assertive Tone',
965
- // // description: '',
966
- // // iconEmoji: '',
967
- // // },
968
- // },
969
- // )
970
- // .then((answerText) => {
971
- // // eslint-disable-next-line promise/always-return
972
- // if (answerText === 'Rephrase failed.') {
973
- // setMessageErrorToast('Rephrase failed.');
974
- // setShowErrorToast(true);
975
- // }
976
- // setWaitAIWidget(false);
977
- // })
978
- // .catch(() => {
979
- // setMessageErrorToast('Rephrase failed.');
980
- // setShowErrorToast(true);
981
- // setWaitAIWidget(false);
982
- // });
983
- // }
984
- // },
985
- // },
986
- // {
987
- // title: 'Instructive Tone',
988
- // icon: <BookIcon />,
989
- // action: () => {
990
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
991
- // setWaitAIWidget(true);
992
- // AIRephrase?.textToWidget(
993
- // messageText,
994
- // AIUtils.messageEntitiesToIChatMessageCollection(
995
- // messagesToView,
996
- // currentUserId,
997
- // maxTokensForAIRephrase,
998
- // ),
999
- // {
1000
- // tone: QBAIRephrase.defaultTones()[6],
1001
- // // tone: {
1002
- // // name: 'Instructive Tone',
1003
- // // description: '',
1004
- // // iconEmoji: '',
1005
- // // },
1006
- // },
1007
- // )
1008
- // .then((answerText) => {
1009
- // // eslint-disable-next-line promise/always-return
1010
- // if (answerText === 'Rephrase failed.') {
1011
- // setMessageErrorToast('Rephrase failed.');
1012
- // setShowErrorToast(true);
1013
- // }
1014
- // setWaitAIWidget(false);
1015
- // })
1016
- // .catch(() => {
1017
- // setMessageErrorToast('Rephrase failed.');
1018
- // setShowErrorToast(true);
1019
- // setWaitAIWidget(false);
1020
- // });
1021
- // }
1022
- // },
1023
- // },
1024
- // {
1025
- // title: 'Persuasive Tone',
1026
- // icon: <PointUpIcon />,
1027
- // action: () => {
1028
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
1029
- // setWaitAIWidget(true);
1030
- // AIRephrase?.textToWidget(
1031
- // messageText,
1032
- // AIUtils.messageEntitiesToIChatMessageCollection(
1033
- // messagesToView,
1034
- // currentUserId,
1035
- // maxTokensForAIRephrase,
1036
- // ),
1037
- // {
1038
- // tone: QBAIRephrase.defaultTones()[7],
1039
- // // tone: {
1040
- // // name: 'Persuasive Tone',
1041
- // // description: '',
1042
- // // iconEmoji: '',
1043
- // // },
1044
- // },
1045
- // )
1046
- // .then((answerText) => {
1047
- // // eslint-disable-next-line promise/always-return
1048
- // if (answerText === 'Rephrase failed.') {
1049
- // setMessageErrorToast('Rephrase failed.');
1050
- // setShowErrorToast(true);
1051
- // }
1052
- // setWaitAIWidget(false);
1053
- // })
1054
- // .catch(() => {
1055
- // setMessageErrorToast('Rephrase failed.');
1056
- // setShowErrorToast(true);
1057
- // setWaitAIWidget(false);
1058
- // });
1059
- // }
1060
- // },
1061
- // },
1062
- // {
1063
- // title: 'Sarcastic/Ironic Tone',
1064
- // icon: <SmirkIcon />,
1065
- // action: () => {
1066
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
1067
- // setWaitAIWidget(true);
1068
- // AIRephrase?.textToWidget(
1069
- // messageText,
1070
- // AIUtils.messageEntitiesToIChatMessageCollection(
1071
- // messagesToView,
1072
- // currentUserId,
1073
- // maxTokensForAIRephrase,
1074
- // ),
1075
- // {
1076
- // tone: QBAIRephrase.defaultTones()[8],
1077
- // // tone: {
1078
- // // name: 'Sarcastic/Ironic Tone',
1079
- // // description: '',
1080
- // // iconEmoji: '',
1081
- // // },
1082
- // },
1083
- // )
1084
- // .then((answerText) => {
1085
- // // eslint-disable-next-line promise/always-return
1086
- // if (answerText === 'Rephrase failed.') {
1087
- // setMessageErrorToast('Rephrase failed.');
1088
- // setShowErrorToast(true);
1089
- // }
1090
- // setWaitAIWidget(false);
1091
- // })
1092
- // .catch(() => {
1093
- // setMessageErrorToast('Rephrase failed.');
1094
- // setShowErrorToast(true);
1095
- // setWaitAIWidget(false);
1096
- // });
1097
- // }
1098
- // },
1099
- // },
1100
- // {
1101
- // title: 'Poetic Tone',
1102
- // icon: <PerformingArtsIcon />,
1103
- // action: () => {
1104
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
1105
- // setWaitAIWidget(true);
1106
- // AIRephrase?.textToWidget(
1107
- // messageText,
1108
- // AIUtils.messageEntitiesToIChatMessageCollection(
1109
- // messagesToView,
1110
- // currentUserId,
1111
- // maxTokensForAIRephrase,
1112
- // ),
1113
- // {
1114
- // tone: QBAIRephrase.defaultTones()[9],
1115
- // // tone: { name: 'Poetic Tone', description: '', iconEmoji: '' }
1116
- // },
1117
- // )
1118
- // .then((answerText) => {
1119
- // // eslint-disable-next-line promise/always-return
1120
- // if (answerText === 'Rephrase failed.') {
1121
- // setMessageErrorToast('Rephrase failed.');
1122
- // setShowErrorToast(true);
1123
- // }
1124
- // setWaitAIWidget(false);
1125
- // })
1126
- // .catch(() => {
1127
- // setMessageErrorToast('Rephrase failed.');
1128
- // setShowErrorToast(true);
1129
- // setWaitAIWidget(false);
1130
- // });
1131
- // }
1132
- // },
1133
- // },
1134
- // {
1135
- // title: 'Back to original text',
1136
- // icon: <WhiteCheckMarkIcon />,
1137
- // action: () => {
1138
- // if (messageText && messageText.length > 0 && !waitAIWidget) {
1139
- // setWaitAIWidget(true);
1140
- // AIRephrase?.textToWidget(
1141
- // messageText,
1142
- // AIUtils.messageEntitiesToIChatMessageCollection(
1143
- // messagesToView,
1144
- // currentUserId,
1145
- // maxTokensForAIRephrase,
1146
- // ),
1147
- // {
1148
- // tone: {
1149
- // name: 'Unchanged',
1150
- // description: 'Unchanged',
1151
- // iconEmoji: '',
1152
- // },
1153
- // },
1154
- // )
1155
- // .then((answerText) => {
1156
- // // eslint-disable-next-line promise/always-return
1157
- // if (answerText === 'Rephrase failed.') {
1158
- // setMessageErrorToast('Rephrase failed.');
1159
- // setShowErrorToast(true);
1160
- // }
1161
- // setWaitAIWidget(false);
1162
- // })
1163
- // .catch(() => {
1164
- // setMessageErrorToast('Rephrase failed.');
1165
- // setShowErrorToast(true);
1166
- // setWaitAIWidget(false);
1167
- // });
1168
- // }
1169
- // },
1170
- // },
1171
- // ];
1172
- // }
1173
-
1174
- function getDefaultIcon(index: number) {
1175
- const defaultIcons = [
1176
- <NecktieIcon />,
1177
- <HandshakeIcon />,
1178
- <MuscleIcon />,
1179
- <PalmsUpTogetherIcon />,
1180
- <NeutralFaceIcon />,
1181
- <HammerIcon />,
1182
- <BookIcon />,
1183
- <PointUpIcon />,
1184
- <SmirkIcon />,
1185
- <PerformingArtsIcon />,
1186
- ];
1187
-
1188
- return defaultIcons[index] || <NeutralFaceIcon />;
1189
- }
1190
-
1191
- function getAIEditingMessagesItems() {
1192
- const items: MenuItem[] = [];
1193
-
1194
- const tones = rephraseTones || QBAIRephrase.defaultTones();
1195
-
1196
- for (let i = 0; i < tones.length; i += 1) {
1197
- const tone = tones[i];
1198
- const title = tone.name;
1199
- const icon = getDefaultIcon(i) || <NeutralFaceIcon />;
1200
-
1201
- const action = () => {
1202
- if (messageText && messageText.length > 0 && !waitAIWidget) {
1203
- setWaitAIWidget(true);
1204
- setPrevTextMessage(messageText);
1205
- AIRephrase?.textToWidget(
1206
- messageText,
1207
- AIUtils.messageEntitiesToIChatMessageCollection(
1208
- messagesToView,
1209
- currentUserId,
1210
- maxTokensForAIRephrase,
1211
- ),
1212
- {
1213
- tone,
1214
- },
1215
- )
1216
- .then((answerText) => {
1217
- // eslint-disable-next-line promise/always-return
1218
- if (answerText === 'Rephrase failed.') {
1219
- setMessageErrorToast('Rephrase failed.');
1220
- setShowErrorToast(true);
1221
- }
1222
- setWaitAIWidget(false);
1223
- })
1224
- .catch(() => {
1225
- setMessageErrorToast('Rephrase failed.');
1226
- setShowErrorToast(true);
1227
- setWaitAIWidget(false);
1228
- });
1229
- }
1230
- };
1231
-
1232
- items.push({
1233
- title,
1234
- icon,
1235
- action,
1236
- });
1237
- }
1238
- //
1239
- items.push({
1240
- title: 'Back to prev.',
1241
- icon: <WhiteCheckMarkIcon />,
1242
- action: () => {
1243
- if (messageText && messageText.length > 0 && !waitAIWidget) {
1244
- setMessageText(prevTextMessage);
1245
- }
1246
- },
1247
- });
1248
-
1249
- //
1250
- return items;
1251
- }
1252
-
1253
- return (
1254
- <div
1255
- style={
1256
- maxWidthToResize
1257
- ? {
1258
- maxWidth: `${maxWidthToResizing}`,
1259
- minWidth: `$message-view-container-wrapper-min-width`,
1260
- // width: `${maxWidthToResizing}`,
1261
- width: '100%',
1262
- }
1263
- : {}
1264
- }
1265
- className="message-view-container"
1266
- >
1267
- <div
1268
- style={{
1269
- flexGrow: `1`,
1270
- flexShrink: `1`,
1271
- flexBasis: `${maxWidthToResizing}`,
1272
- }}
1273
- className="message-view-container--header"
1274
- >
1275
- {useUpContent && upHeaderContent}
1276
- <HeaderMessages
1277
- dialog={messagesViewModel.entity}
1278
- InformationHandler={onDialogInformationHandler}
1279
- countMembers={getCountDialogMembers(dialogsViewModel.entity)}
1280
- />
1281
- {useSubContent && subHeaderContent}
1282
- </div>
1283
- {showErrorToast && !messagesViewModel?.loading ? (
1284
- <ErrorToast messageText={messageErrorToast} />
1285
- ) : null}
1286
-
1287
- {/* <div */}
1288
- {/* style={{ */}
1289
- {/* flexGrow: `1`, */}
1290
- {/* flexShrink: `1`, */}
1291
- {/* flexBasis: `${maxWidthToResizing}`, */}
1292
- {/* }} */}
1293
- {/* className="message-view-container--information" */}
1294
- {/* > */}
1295
- {/* <div> */}
1296
- {/* connection status: */}
1297
- {/* {browserOnline ? 'online ' : 'offline '} */}
1298
- {/* /!* eslint-disable-next-line no-nested-ternary *!/ */}
1299
- {/* {connectionRepository.isChatConnected() === undefined */}
1300
- {/* ? 'unexpected undefined' */}
1301
- {/* : connectionRepository.isChatConnected() */}
1302
- {/* ? 'connected' */}
1303
- {/* : 'disconnected'} */}
1304
- {/* </div> */}
1305
- {/* {hasMore && ( */}
1306
- {/* <div style={{ color: 'red' }}> */}
1307
- {/* unread: {dialogMessagesCount - messagesToView.length} */}
1308
- {/* </div> */}
1309
- {/* )} */}
1310
- {/* <div>{` current user id: ${currentUserId || 'no user'}`}</div> */}
1311
- {/* </div> */}
1312
- {/* version 2 start */}
1313
- {/* <div */}
1314
- {/* style={ */}
1315
- {/* theme */}
1316
- {/* ? { */}
1317
- {/* flexGrow: `1`, */}
1318
- {/* flexShrink: `1`, */}
1319
- {/* flexBasis: `${maxWidthToResizing}`, */}
1320
- {/* backgroundColor: theme.mainElements(), */}
1321
- {/* } */}
1322
- {/* : { */}
1323
- {/* flexGrow: `1`, */}
1324
- {/* flexShrink: `1`, */}
1325
- {/* flexBasis: `${maxWidthToResizing}`, */}
1326
- {/* } */}
1327
- {/* } */}
1328
- {/* className="message-view-container--information" */}
1329
- {/* > */}
1330
- {/* <div> */}
1331
- {/* connection status: */}
1332
- {/* {browserOnline ? 'online ' : 'offline '} */}
1333
- {/* /!* eslint-disable-next-line no-nested-ternary *!/ */}
1334
- {/* {connectionRepository.isChatConnected() === undefined */}
1335
- {/* ? 'unexpected undefined' */}
1336
- {/* : connectionRepository.isChatConnected() */}
1337
- {/* ? 'connected' */}
1338
- {/* : 'disconnected'} */}
1339
- {/* </div> */}
1340
- {/* {hasMore && ( */}
1341
- {/* <div style={{ color: 'red' }}> */}
1342
- {/* unread: {dialogMessagesCount - messagesToView.length} */}
1343
- {/* </div> */}
1344
- {/* )} */}
1345
- {/* <div>{` current user id: ${currentUserId || 'no user'}`}</div> */}
1346
- {/* </div> */}
1347
- {/* version 2 end */}
1348
- <div
1349
- style={
1350
- theme
1351
- ? {
1352
- flexGrow: `1`,
1353
- flexShrink: `1`,
1354
- flexBasis: `${maxWidthToResizing}`,
1355
- backgroundColor: theme.secondaryBackground(), // var(--secondary-background);
1356
- }
1357
- : {
1358
- flexGrow: `1`,
1359
- flexShrink: `1`,
1360
- flexBasis: `${maxWidthToResizing}`,
1361
- }
1362
- }
1363
- className="message-view-container--messages"
1364
- >
1365
- {messagesViewModel?.error && !messagesViewModel.loading && (
1366
- <ErrorComponent
1367
- title={messagesViewModel?.error}
1368
- ClickActionHandler={() => {
1369
- alert('call click retry');
1370
- }}
1371
- />
1372
- )}
1373
- {messagesViewModel &&
1374
- messagesViewModel.messages &&
1375
- messagesViewModel.messages.length > 0 &&
1376
- messagesToView &&
1377
- messagesToView.length > 0 && (
1378
- <ScrollableContainer
1379
- data={messagesToView}
1380
- renderItem={renderMessage}
1381
- onEndReached={fetchMoreData}
1382
- onEndReachedThreshold={0.8}
1383
- refreshing={messagesViewModel?.loading}
1384
- autoScrollToBottom={scrollUpToDown}
1385
- />
1386
- )}
1387
- {/* {(messagesViewModel?.loading || waitAIWidget) && ( */}
1388
- <div
1389
- style={{
1390
- display: 'flex',
1391
- flexDirection: 'row',
1392
- alignItems: 'center',
1393
- justifyContent: 'center',
1394
- }}
1395
- >
1396
- {messagesViewModel?.loading && (
1397
- <div
1398
- style={{
1399
- height: '44px',
1400
- width: '44px',
1401
- }}
1402
- >
1403
- <LoaderComponent
1404
- width="44"
1405
- height="44"
1406
- color="var(--color-background-info)"
1407
- />
1408
- </div>
1409
- )}
1410
- </div>
1411
-
1412
- <div
1413
- style={theme ? { color: theme.mainElements() } : {}}
1414
- className="message-view-container--warning-error"
1415
- >
1416
- {warningErrorText}
1417
- </div>
1418
- {/* <div> */}
1419
- {/* <SliderMenu */}
1420
- {/* width={680} */}
1421
- {/* arrowColor="var(--chat-input)" */}
1422
- {/* activeArrowColor="var(--divider)" */}
1423
- {/* activeItemBorderColor="var(--main-elements)" */}
1424
- {/* borderColor="var(--divider)" */}
1425
- {/* backgroundColor="white" */}
1426
- {/* itemBackgroundColor="var(--divider)" */}
1427
- {/* itemWidth={130} */}
1428
- {/* itemHeight={20} */}
1429
- {/* fontSize={11} // Задаем размер шрифта */}
1430
- {/* itemBorder="1px solid var(--divider)" */}
1431
- {/* items={getAIEditingMessagesItems()} */}
1432
- {/* /> */}
1433
- {/* </div> */}
1434
- </div>
1435
- <div
1436
- style={{
1437
- flex: `flex: 1 1 ${maxWidthToResizing}`,
1438
- }}
1439
- onBlur={() => {
1440
- if (!(messageText && messageText.length > 0)) {
1441
- setVoiceMessage(true);
1442
- }
1443
- }}
1444
- className="message-view-container--chat-input"
1445
- >
1446
- <label
1447
- htmlFor="btnUploadAttachment"
1448
- style={{
1449
- cursor: 'pointer',
1450
- }}
1451
- >
1452
- <div>
1453
- <ActiveSvg
1454
- content={
1455
- <AttachmentIcon
1456
- width="32"
1457
- height="32"
1458
- applyZoom
1459
- color={
1460
- theme ? theme.inputElements() : 'var(--input-elements)'
1461
- }
1462
- />
1463
- }
1464
- clickAction={() => {
1465
- console.log('click send message');
1466
- }}
1467
- touchAction={() => {
1468
- console.log('touch send message');
1469
- }}
1470
- />
1471
- </div>
1472
- <input
1473
- id="btnUploadAttachment"
1474
- type="file"
1475
- accept="image/*, audio/*, video/*, .pdf, .txt,"
1476
- style={{ display: 'none' }}
1477
- onChange={(event) => {
1478
- ChangeFileHandler(event);
1479
- }}
1480
- />
1481
- </label>
1482
- {/* start InputWidgetToRightPlaceHolder */}
1483
- {/* {InputWidgetToRightPlaceHolder && ( */}
1484
- {/* <div> */}
1485
- {/* <ActiveSvg */}
1486
- {/* content={InputWidgetToRightPlaceHolder.renderWidget()} */}
1487
- {/* clickAction={() => { */}
1488
- {/* console.log('click left place golder widget'); */}
1489
- {/* if (messagesViewModel?.loading) return; */}
1490
- {/* setIsRecording(!isRecording); */}
1491
- {/* setUseAudioWidget(true); */}
1492
- {/* }} */}
1493
- {/* touchAction={() => { */}
1494
- {/* console.log('touch left place golder widget'); */}
1495
- {/* }} */}
1496
- {/* /> */}
1497
- {/* </div> */}
1498
- {/* )} */}
1499
- {/* end InputWidgetToRightPlaceHolder */}
1500
- {!isRecording && (
1501
- <div className="input-text-message">
1502
- <div className="type-message">
1503
- <textarea
1504
- style={theme ? { backgroundColor: theme.chatInput() } : {}}
1505
- disabled={messagesViewModel?.loading}
1506
- value={messageText}
1507
- onFocus={() => {
1508
- setVoiceMessage(false);
1509
- }}
1510
- onChange={(event) => {
1511
- setMessageText(event.target.value);
1512
- }}
1513
- onInput={() => {
1514
- messagesViewModel.sendTypingTextMessage();
1515
- }}
1516
- onKeyDown={(e) => {
1517
- console.log(
1518
- `onKeyDown: ${e.key} shift ${
1519
- e.shiftKey ? 'true' : 'false'
1520
- } ctrl ${e.ctrlKey ? 'true' : 'false'}`,
1521
- );
1522
- if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey) {
1523
- sendTextMessageActions();
1524
- }
1525
- }}
1526
- placeholder="enter text to send"
1527
- />
1528
- </div>
1529
- <div className="right">
1530
- {AIRephrase && (
1531
- <div
1532
- className="icon"
1533
- style={{
1534
- cursor: !waitAIWidget ? 'pointer' : '',
1535
- }}
1536
- >
1537
- <AIWidgetActions
1538
- widgetToRender={
1539
- <ToneIcon
1540
- width="24"
1541
- height="24"
1542
- applyZoom
1543
- color={theme ? theme.mainText() : 'var(--main-text)'}
1544
- />
1545
- }
1546
- items={getAIEditingMessagesItems()}
1547
- />
1548
- </div>
1549
- )}
1550
- </div>
1551
- </div>
1552
- )}
1553
-
1554
- {isRecording && (
1555
- <VoiceRecordingProgress
1556
- startStatus={isRecording}
1557
- longRecInSec={60}
1558
- ClickActionHandler={() => {
1559
- console.log('click send voice message');
1560
- if (messagesViewModel?.loading) return;
1561
- setIsRecording(!isRecording);
1562
- }}
1563
- TouchActionHandler={() => {
1564
- console.log('touch send voice message');
1565
- if (messagesViewModel?.loading) return;
1566
- setIsRecording(!isRecording);
1567
- }}
1568
- />
1569
- )}
1570
- {!isVoiceMessage && !waitAIWidget && (
1571
- <div>
1572
- <ActiveSvg
1573
- content={
1574
- <SendIcon
1575
- width="21"
1576
- height="18"
1577
- applyZoom
1578
- color={theme ? theme.mainElements() : 'var(--main-elements)'}
1579
- />
1580
- }
1581
- clickAction={() => {
1582
- console.log('click send message');
1583
- sendTextMessageActions();
1584
- }}
1585
- touchAction={() => {
1586
- console.log('touch send message');
1587
- }}
1588
- />
1589
- </div>
1590
- )}
1591
- {waitAIWidget ? (
1592
- <div
1593
- style={{
1594
- height: '44px',
1595
- width: '24px',
1596
- }}
1597
- >
1598
- <LoaderComponent width="24" height="24" color="var(--caption)" />
1599
- </div>
1600
- ) : (
1601
- isVoiceMessage && (
1602
- <div>
1603
- <ActiveSvg
1604
- content={
1605
- <VoiceIcon
1606
- width="21"
1607
- height="18"
1608
- applyZoom
1609
- color={
1610
- isRecording ? 'var(--error)' : 'var(--input-elements)'
1611
- }
1612
- />
1613
- }
1614
- clickAction={() => {
1615
- console.log('click send voice message');
1616
- if (messagesViewModel?.loading) return;
1617
- setIsRecording(!isRecording);
1618
- }}
1619
- touchAction={() => {
1620
- console.log('touch send message');
1621
- if (messagesViewModel?.loading) return;
1622
- setIsRecording(!isRecording);
1623
- }}
1624
- />
1625
- </div>
1626
- )
1627
- )}
1628
- </div>
1629
- {/* <div className="message-view-container--warning-error"> */}
1630
- {/* {widgetTextContent} */}
1631
- {/* </div> */}
1632
- </div>
1633
- );
1634
- };
1635
-
1636
- export default MessagesView;