quickblox-react-ui-kit 0.2.8 → 0.3.0-beta.2

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 (1081) hide show
  1. package/.prettierignore +4 -0
  2. package/.prettierrc +10 -0
  3. package/.storybook/main.ts +26 -0
  4. package/.storybook/preview.ts +16 -0
  5. package/README.md +5 -1
  6. package/dist/Data/Stubs.d.ts +1 -0
  7. package/dist/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.d.ts +16 -0
  8. package/dist/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.d.ts +20 -0
  9. package/dist/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.d.ts +0 -1
  10. package/dist/Presentation/Views/Dialog/Dialog.d.ts +0 -4
  11. package/dist/Presentation/Views/Dialog/DialogHeader/DialogBackIcon/DialogBackIcon.d.ts +8 -0
  12. package/dist/Presentation/Views/Dialog/DialogHeader/{RenderRightActions/RenderRightActions.d.ts → DialogInfoIcon/DialogInfoIcon.d.ts} +3 -3
  13. package/dist/Presentation/Views/Dialog/{MessageInput/MessageInput.d.ts → InputMessage/InputMessage.d.ts} +2 -2
  14. package/dist/Presentation/Views/Dialog/Message/OutgoinForwardedMessage/OutgoinForwardedMessage.d.ts +1 -1
  15. package/dist/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.d.ts +12 -0
  16. package/dist/Presentation/Views/Dialog/MessageItem/MessageItem.d.ts +22 -0
  17. package/dist/Presentation/Views/DialogInfo/DialogInfo.d.ts +0 -1
  18. package/dist/Presentation/Views/DialogList/DialogList.d.ts +8 -4
  19. package/dist/Presentation/Views/Flow/CreateDialog/CreateDialog.d.ts +6 -6
  20. package/dist/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.d.ts +3 -0
  21. package/dist/Presentation/Views/YesNoQuestion/YesNoQuestion.d.ts +3 -4
  22. package/dist/Presentation/components/UI/Buttons/MainButton/MainButton.d.ts +1 -1
  23. package/dist/Presentation/components/containers/SectionList/useComponent.d.ts +3 -3
  24. package/dist/Presentation/icons/actions/index.d.ts +26 -0
  25. package/dist/Presentation/icons/contents/index.d.ts +13 -0
  26. package/dist/Presentation/icons/index.d.ts +7 -0
  27. package/dist/Presentation/icons/media/index.d.ts +12 -0
  28. package/dist/Presentation/icons/moderation/index.d.ts +5 -0
  29. package/dist/Presentation/icons/navigation/index.d.ts +12 -0
  30. package/dist/Presentation/icons/status/index.d.ts +7 -0
  31. package/dist/Presentation/icons/toggle/index.d.ts +23 -0
  32. package/dist/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.d.ts +1 -0
  33. package/dist/Presentation/ui-components/Avatar/Avatar.d.ts +9 -0
  34. package/dist/Presentation/ui-components/Avatar/avatar.stories.d.ts +8 -0
  35. package/dist/Presentation/ui-components/Badge/Badge.d.ts +10 -0
  36. package/dist/Presentation/ui-components/Badge/Badge.stories.d.ts +8 -0
  37. package/dist/Presentation/ui-components/Button/Button.d.ts +12 -0
  38. package/dist/Presentation/ui-components/Button/Button.stories.d.ts +83 -0
  39. package/dist/Presentation/ui-components/CheckBox/CheckBox.d.ts +9 -0
  40. package/dist/Presentation/ui-components/DialogBanner/DialogBanner.d.ts +8 -0
  41. package/dist/Presentation/ui-components/DialogBanner/DialogBanner.stories.d.ts +34 -0
  42. package/dist/Presentation/ui-components/DialogItemPreview/DialogItemPreview.d.ts +16 -0
  43. package/dist/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.d.ts +9 -0
  44. package/dist/Presentation/ui-components/DialogWindow/DialogWindow.d.ts +11 -0
  45. package/dist/Presentation/ui-components/DialogWindow/DialogWindow.stories.d.ts +6 -0
  46. package/dist/Presentation/ui-components/Dropdown/Dropdown.d.ts +12 -0
  47. package/dist/Presentation/ui-components/Dropdown/Dropdown.stories.d.ts +29 -0
  48. package/dist/Presentation/ui-components/Dropdown/DropdownOption.d.ts +12 -0
  49. package/dist/Presentation/ui-components/Header/Header.d.ts +13 -0
  50. package/dist/Presentation/ui-components/Header/Header.stories.d.ts +9 -0
  51. package/dist/Presentation/ui-components/Loader/Loader.d.ts +8 -0
  52. package/dist/Presentation/ui-components/Loader/Loader.stories.d.ts +44 -0
  53. package/dist/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.d.ts +8 -0
  54. package/dist/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.d.ts +11 -0
  55. package/dist/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.d.ts +9 -0
  56. package/dist/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.d.ts +8 -0
  57. package/dist/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.d.ts +8 -0
  58. package/dist/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.d.ts +9 -0
  59. package/dist/Presentation/ui-components/Message/FileUrl/FileUrl.d.ts +8 -0
  60. package/dist/Presentation/ui-components/Message/Message.d.ts +18 -0
  61. package/dist/Presentation/ui-components/Message/Message.stories.d.ts +8 -0
  62. package/dist/Presentation/ui-components/Message/MessageCaption/MessageCaption.d.ts +9 -0
  63. package/dist/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.d.ts +8 -0
  64. package/dist/Presentation/ui-components/MessageInput/MessageInput.d.ts +20 -0
  65. package/dist/Presentation/ui-components/MessageInput/MessageInput.stories.d.ts +8 -0
  66. package/dist/Presentation/ui-components/MessageSeparator/MessageSeparator.d.ts +8 -0
  67. package/dist/Presentation/ui-components/MessageSeparator/MessageSeparator.stories.d.ts +44 -0
  68. package/dist/Presentation/ui-components/Placeholder/Placeholder.d.ts +10 -0
  69. package/dist/Presentation/ui-components/Placeholder/Placeholder.stories.d.ts +7 -0
  70. package/dist/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.d.ts +9 -0
  71. package/dist/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.stories.d.ts +9 -0
  72. package/dist/Presentation/ui-components/SettingsItem/SettingsItem.d.ts +12 -0
  73. package/dist/Presentation/ui-components/SettingsItem/SettingsItem.stories.d.ts +8 -0
  74. package/dist/Presentation/ui-components/TextField/TextField.d.ts +13 -0
  75. package/dist/Presentation/ui-components/TextField/TextField.stories.d.ts +8 -0
  76. package/dist/Presentation/ui-components/Toast/Toast.stories.d.ts +6 -0
  77. package/dist/Presentation/ui-components/Toast/ToastProvider.d.ts +8 -0
  78. package/dist/Presentation/ui-components/UserListItem/UserListItem.d.ts +11 -0
  79. package/dist/Presentation/ui-components/UserListItem/UserListItem.stories.d.ts +86 -0
  80. package/dist/Presentation/ui-components/index.d.ts +19 -0
  81. package/dist/hooks/useModal.d.ts +5 -0
  82. package/dist/index-ui.js +16525 -14748
  83. package/dist/index-ui.js.map +1 -1
  84. package/package.json +32 -34
  85. package/public/favicon.ico +0 -0
  86. package/public/index.html +47 -0
  87. package/public/logo192.png +0 -0
  88. package/public/logo512.png +0 -0
  89. package/public/manifest.json +25 -0
  90. package/public/quickblox.js +54609 -0
  91. package/public/robots.txt +3 -0
  92. package/src/App.scss +0 -0
  93. package/src/App.tsx +231 -0
  94. package/src/CommonTypes/BaseViewModel.ts +95 -0
  95. package/src/CommonTypes/FunctionResult.ts +66 -0
  96. package/src/Data/Creator.ts +105 -0
  97. package/src/Data/DefaultConfigurations.ts +270 -0
  98. package/src/Data/Stubs.ts +1242 -0
  99. package/src/Data/dto/dialog/LocalDialogDTO.ts +42 -0
  100. package/src/Data/dto/dialog/LocalDialogsDTO.ts +21 -0
  101. package/src/Data/dto/dialog/RemoteDialogDTO.ts +58 -0
  102. package/src/Data/dto/dialog/RemoteDialogsDTO.ts +21 -0
  103. package/src/Data/dto/file/LocalFileDTO.ts +26 -0
  104. package/src/Data/dto/file/RemoteFileDTO.ts +26 -0
  105. package/src/Data/dto/message/LocalMessageDTO.ts +49 -0
  106. package/src/Data/dto/message/LocalMessagesDTO.ts +21 -0
  107. package/src/Data/dto/message/RemoteMessageDTO.ts +57 -0
  108. package/src/Data/dto/message/RemoteMessagesDTO.ts +21 -0
  109. package/src/Data/dto/user/LocalUserDTO.ts +37 -0
  110. package/src/Data/dto/user/LocalUsersDTO.ts +21 -0
  111. package/src/Data/dto/user/RemoteUserDTO.ts +37 -0
  112. package/src/Data/dto/user/RemoteUsersDTO.ts +21 -0
  113. package/src/Data/mapper/DialogLocalDTOMapper.ts +742 -0
  114. package/src/Data/mapper/DialogRemoteDTOMapper.ts +741 -0
  115. package/src/Data/mapper/FileLocalDTOMapper.ts +216 -0
  116. package/src/Data/mapper/FileRemoteDTOMapper.ts +228 -0
  117. package/src/Data/mapper/IMapper.ts +4 -0
  118. package/src/Data/mapper/MessageLocalDTOMapper.ts +426 -0
  119. package/src/Data/mapper/MessageRemoteDTOMapper.ts +465 -0
  120. package/src/Data/mapper/UserLocalDTOMapper.ts +387 -0
  121. package/src/Data/mapper/UserRemoteDTOMapper.ts +398 -0
  122. package/src/Data/repository/ConnectionRepository.ts +133 -0
  123. package/src/Data/repository/DialogsRepository.ts +358 -0
  124. package/src/Data/repository/EventMessagesRepository.ts +325 -0
  125. package/src/Data/repository/FileRepository.ts +107 -0
  126. package/src/Data/repository/MessagesRepository.ts +291 -0
  127. package/src/Data/repository/UsersRepository.ts +297 -0
  128. package/src/Data/source/AISource.ts +133 -0
  129. package/src/Data/source/exception/LocalDataSourceException.ts +17 -0
  130. package/src/Data/source/exception/MapperDTOException.ts +22 -0
  131. package/src/Data/source/exception/RemoteDataSourceException.ts +28 -0
  132. package/src/Data/source/exception/RepositoryException.ts +27 -0
  133. package/src/Data/source/local/ChatLocalStorageDataSource.ts +260 -0
  134. package/src/Data/source/local/ILocalDataSource.ts +41 -0
  135. package/src/Data/source/local/ILocalFileDataSource.ts +11 -0
  136. package/src/Data/source/local/LocalDataSource.ts +353 -0
  137. package/src/Data/source/local/LocalFileDataSource.ts +20 -0
  138. package/src/Data/source/remote/IRemoteDataSource.ts +112 -0
  139. package/src/Data/source/remote/Mapper/DialogDTOMapper.ts +425 -0
  140. package/src/Data/source/remote/Mapper/FileDTOMapper.ts +270 -0
  141. package/src/Data/source/remote/Mapper/IDTOMapper.ts +4 -0
  142. package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +607 -0
  143. package/src/Data/source/remote/Mapper/UserDTOMapper.ts +345 -0
  144. package/src/Data/source/remote/RemoteDataSource.ts +1291 -0
  145. package/src/Domain/entity/Chat.ts +4 -0
  146. package/src/Domain/entity/ChatMessageAttachmentEntity.ts +15 -0
  147. package/src/Domain/entity/CustomDataEntity.ts +3 -0
  148. package/src/Domain/entity/DialogEntity.ts +15 -0
  149. package/src/Domain/entity/DialogEventInfo.ts +15 -0
  150. package/src/Domain/entity/DialogTypes.ts +7 -0
  151. package/src/Domain/entity/EventMessageType.ts +7 -0
  152. package/src/Domain/entity/FileEntity.ts +11 -0
  153. package/src/Domain/entity/FileTypes.ts +9 -0
  154. package/src/Domain/entity/GroupDialogEntity.ts +54 -0
  155. package/src/Domain/entity/LastMessageEntity.ts +5 -0
  156. package/src/Domain/entity/MessageEntity.ts +25 -0
  157. package/src/Domain/entity/NotificationTypes.ts +9 -0
  158. package/src/Domain/entity/PrivateDialogEntity.ts +46 -0
  159. package/src/Domain/entity/PublicDialogEntity.ts +80 -0
  160. package/src/Domain/entity/UserEntity.ts +23 -0
  161. package/src/Domain/exception/domain/DomainExecption.ts +5 -0
  162. package/src/Domain/repository/IDialogsRepository.ts +42 -0
  163. package/src/Domain/repository/IFileRepository.ts +9 -0
  164. package/src/Domain/repository/IMessagesRepository.ts +28 -0
  165. package/src/Domain/repository/IUsersRepository.ts +13 -0
  166. package/src/Domain/repository/Pagination.ts +48 -0
  167. package/src/Domain/use_cases/CreateDialogUseCase.ts +79 -0
  168. package/src/Domain/use_cases/ForwardMessagesUseCase.ts +73 -0
  169. package/src/Domain/use_cases/GetAllDialogsUseCase.ts +20 -0
  170. package/src/Domain/use_cases/GetAllDialogsUseCaseWithMock.ts +40 -0
  171. package/src/Domain/use_cases/GetAllMessagesForDialog.ts +61 -0
  172. package/src/Domain/use_cases/GetAllUsersUseCase.ts +34 -0
  173. package/src/Domain/use_cases/GetDialogByIdUseCase.ts +28 -0
  174. package/src/Domain/use_cases/GetUsersByIdsUseCase.ts +22 -0
  175. package/src/Domain/use_cases/LeaveDialogUseCase.ts +116 -0
  176. package/src/Domain/use_cases/RemoveUsersFromTheDialogUseCase.ts +118 -0
  177. package/src/Domain/use_cases/ReplyMessagesUseCase.ts +35 -0
  178. package/src/Domain/use_cases/SendTextMessageUseCase.ts +27 -0
  179. package/src/Domain/use_cases/SubscribeToDialogEventsUseCase.ts +160 -0
  180. package/src/Domain/use_cases/SubscribeToDialogsUpdatesUseCase.ts +68 -0
  181. package/src/Domain/use_cases/SubscribeToDialogsUpdatesUseCaseWithMock.ts +45 -0
  182. package/src/Domain/use_cases/SyncDialogsUseCase.ts +177 -0
  183. package/src/Domain/use_cases/UpdateDialogUseCase.ts +72 -0
  184. package/src/Domain/use_cases/UploadFileUseCase.ts +24 -0
  185. package/src/Domain/use_cases/UserTypingMessageUseCase.ts +50 -0
  186. package/src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts +69 -0
  187. package/src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts +57 -0
  188. package/src/Domain/use_cases/ai/AIRephraseUseCase.ts +89 -0
  189. package/src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts +62 -0
  190. package/src/Domain/use_cases/ai/AITranslateUseCase.ts +76 -0
  191. package/src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts +63 -0
  192. package/src/Domain/use_cases/base/BaseUseCase.ts +77 -0
  193. package/src/Domain/use_cases/base/IUseCase.ts +5 -0
  194. package/src/Domain/use_cases/base/Subscribable/ISubscribable.ts +6 -0
  195. package/src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts +144 -0
  196. package/src/Presentation/.gitkeep +0 -0
  197. package/src/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.scss +34 -0
  198. package/src/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.tsx +64 -0
  199. package/src/Presentation/Views/Dialog/AIComponents/AIAssistComponent/AIAssistComponent.scss +32 -0
  200. package/src/Presentation/Views/Dialog/AIComponents/AIAssistComponent/AIAssistComponent.tsx +28 -0
  201. package/src/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.scss +67 -0
  202. package/src/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.tsx +117 -0
  203. package/src/Presentation/Views/Dialog/AIComponents/AITranslateComponent/AITranslateComponent.scss +47 -0
  204. package/src/Presentation/Views/Dialog/AIComponents/AITranslateComponent/AITranslateComponent.tsx +78 -0
  205. package/src/Presentation/Views/Dialog/AIWidgets/AIMessageWidget.ts +40 -0
  206. package/src/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.scss +20 -0
  207. package/src/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.tsx +177 -0
  208. package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.scss +55 -0
  209. package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.tsx +122 -0
  210. package/src/Presentation/Views/Dialog/AIWidgets/ErrorMessageIcon.tsx +98 -0
  211. package/src/Presentation/Views/Dialog/AIWidgets/SliderMenu.tsx +172 -0
  212. package/src/Presentation/Views/Dialog/AIWidgets/Tone.ts +21 -0
  213. package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidget.tsx +72 -0
  214. package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.tsx +72 -0
  215. package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx +96 -0
  216. package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx +94 -0
  217. package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidget.tsx +78 -0
  218. package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidgetWithProxy.tsx +78 -0
  219. package/src/Presentation/Views/Dialog/AIWidgets/useDefaultVoiceInputWidget.tsx +88 -0
  220. package/src/Presentation/Views/Dialog/ContextMenu/ContextMenu.scss +58 -0
  221. package/src/Presentation/Views/Dialog/ContextMenu/ContextMenu.tsx +93 -0
  222. package/src/Presentation/Views/Dialog/Dialog.scss +368 -0
  223. package/src/Presentation/Views/Dialog/Dialog.tsx +100 -0
  224. package/src/Presentation/Views/Dialog/DialogHeader/DialogBackIcon/DialogBackIcon.scss +29 -0
  225. package/src/Presentation/Views/Dialog/DialogHeader/DialogBackIcon/DialogBackIcon.tsx +34 -0
  226. package/src/Presentation/Views/Dialog/DialogHeader/DialogHeader.scss +114 -0
  227. package/src/Presentation/Views/Dialog/DialogHeader/DialogHeader.tsx +51 -0
  228. package/src/Presentation/Views/Dialog/DialogHeader/DialogInfoIcon/DialogInfoIcon.scss +53 -0
  229. package/src/Presentation/Views/Dialog/DialogHeader/DialogInfoIcon/DialogInfoIcon.tsx +58 -0
  230. package/src/Presentation/Views/Dialog/DialogViewModel.ts +24 -0
  231. package/src/Presentation/Views/Dialog/DropDownMenu/DropDownMenu.scss +84 -0
  232. package/src/Presentation/Views/Dialog/DropDownMenu/DropDownMenu.tsx +105 -0
  233. package/src/Presentation/Views/Dialog/DropDownMenu/ItemDropDownMenu/ItemDropDownMenu.scss +50 -0
  234. package/src/Presentation/Views/Dialog/DropDownMenu/ItemDropDownMenu/ItemDropDownMenu.tsx +43 -0
  235. package/src/Presentation/Views/Dialog/ErrorToast/ErrorToast.scss +26 -0
  236. package/src/Presentation/Views/Dialog/ErrorToast/ErrorToast.tsx +23 -0
  237. package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.scss +74 -0
  238. package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.tsx +96 -0
  239. package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.scss +40 -0
  240. package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.tsx +98 -0
  241. package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/SearchComponent/SearchComponent.scss +98 -0
  242. package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/SearchComponent/SearchComponent.tsx +65 -0
  243. package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.scss +159 -0
  244. package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.tsx +118 -0
  245. package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessagePreview/ForwardMessagePreview.scss +100 -0
  246. package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessagePreview/ForwardMessagePreview.tsx +90 -0
  247. package/src/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.scss +65 -0
  248. package/src/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.tsx +47 -0
  249. package/src/Presentation/Views/Dialog/InputMessage/InputMessage.scss +92 -0
  250. package/src/Presentation/Views/Dialog/InputMessage/InputMessage.tsx +145 -0
  251. package/src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.scss +97 -0
  252. package/src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.tsx +114 -0
  253. package/src/Presentation/Views/Dialog/Message/IncomingForwardedMessage/IncomingForwardedMessage.scss +250 -0
  254. package/src/Presentation/Views/Dialog/Message/IncomingForwardedMessage/IncomingForwardedMessage.tsx +290 -0
  255. package/src/Presentation/Views/Dialog/Message/IncomingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.scss +22 -0
  256. package/src/Presentation/Views/Dialog/Message/IncomingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.tsx +32 -0
  257. package/src/Presentation/Views/Dialog/Message/IncomingMessage/IncomingMessage.scss +241 -0
  258. package/src/Presentation/Views/Dialog/Message/IncomingMessage/IncomingMessage.tsx +316 -0
  259. package/src/Presentation/Views/Dialog/Message/IncomingMessage/MessageContentComponent/MessageContentComponent.scss +4 -0
  260. package/src/Presentation/Views/Dialog/Message/IncomingMessage/MessageContentComponent/MessageContentComponent.tsx +67 -0
  261. package/src/Presentation/Views/Dialog/Message/IncomingRepliedMessage/IncomingRepliedMessage.scss +250 -0
  262. package/src/Presentation/Views/Dialog/Message/IncomingRepliedMessage/IncomingRepliedMessage.tsx +298 -0
  263. package/src/Presentation/Views/Dialog/Message/Message.tsx +378 -0
  264. package/src/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.scss +31 -0
  265. package/src/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.tsx +155 -0
  266. package/src/Presentation/Views/Dialog/Message/MessageAttachment/DefaultAttachment/DefaultAttachment.scss +76 -0
  267. package/src/Presentation/Views/Dialog/Message/MessageAttachment/DefaultAttachment/DefaultAttachment.tsx +50 -0
  268. package/src/Presentation/Views/Dialog/Message/MessageAttachment/ImageAttachment/ImageAttachment.scss +14 -0
  269. package/src/Presentation/Views/Dialog/Message/MessageAttachment/ImageAttachment/ImageAttachment.tsx +50 -0
  270. package/src/Presentation/Views/Dialog/Message/MessageAttachment/MessageAttachment.tsx +92 -0
  271. package/src/Presentation/Views/Dialog/Message/MessageAttachment/VideoAttachment/VideoAttachment.scss +18 -0
  272. package/src/Presentation/Views/Dialog/Message/MessageAttachment/VideoAttachment/VideoAttachment.tsx +58 -0
  273. package/src/Presentation/Views/Dialog/Message/MessageContextMenu/MessageContextMenu.scss +10 -0
  274. package/src/Presentation/Views/Dialog/Message/MessageContextMenu/MessageContextMenu.tsx +61 -0
  275. package/src/Presentation/Views/Dialog/Message/OutgoinForwardedMessage/OutgoinForwardedMessage.scss +160 -0
  276. package/src/Presentation/Views/Dialog/Message/OutgoinForwardedMessage/OutgoinForwardedMessage.tsx +133 -0
  277. package/src/Presentation/Views/Dialog/Message/OutgoingMessage/OutgoingMessage.scss +122 -0
  278. package/src/Presentation/Views/Dialog/Message/OutgoingMessage/OutgoingMessage.tsx +104 -0
  279. package/src/Presentation/Views/Dialog/Message/OutgoingRepliedMessage/OutgoingRepliedMessage.scss +155 -0
  280. package/src/Presentation/Views/Dialog/Message/OutgoingRepliedMessage/OutgoingRepliedMessage.tsx +103 -0
  281. package/src/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.scss +19 -0
  282. package/src/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.tsx +67 -0
  283. package/src/Presentation/Views/Dialog/MessageItem/MessageItem.scss +21 -0
  284. package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +364 -0
  285. package/src/Presentation/Views/Dialog/SystemDateBanner/SystemDateBanner.scss +23 -0
  286. package/src/Presentation/Views/Dialog/SystemDateBanner/SystemDateBanner.tsx +17 -0
  287. package/src/Presentation/Views/Dialog/SystemMessageBanner/SystemMessageBanner.scss +21 -0
  288. package/src/Presentation/Views/Dialog/SystemMessageBanner/SystemMessageBanner.tsx +17 -0
  289. package/src/Presentation/Views/Dialog/VoiceMessage/VoiceMessage.tsx +21 -0
  290. package/src/Presentation/Views/Dialog/useDialogViewModel.ts +838 -0
  291. package/src/Presentation/Views/DialogInfo/DialogInfo.scss +235 -0
  292. package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +450 -0
  293. package/src/Presentation/Views/DialogInfo/DialogMemberButton/DialogMembersButton.scss +42 -0
  294. package/src/Presentation/Views/DialogInfo/DialogMemberButton/DialogMembersButton.tsx +26 -0
  295. package/src/Presentation/Views/DialogInfo/MembersList/MembersList.scss +176 -0
  296. package/src/Presentation/Views/DialogInfo/MembersList/MembersList.tsx +94 -0
  297. package/src/Presentation/Views/DialogInfo/UsersList/SingleUser/SingleUser.scss +66 -0
  298. package/src/Presentation/Views/DialogInfo/UsersList/SingleUser/SingleUser.tsx +71 -0
  299. package/src/Presentation/Views/DialogInfo/UsersList/UsersList.scss +0 -0
  300. package/src/Presentation/Views/DialogInfo/UsersList/UsersList.tsx +71 -0
  301. package/src/Presentation/Views/DialogInfo/UsersList/UsersListViewModel.ts +15 -0
  302. package/src/Presentation/Views/DialogInfo/UsersList/useUsersListViewModel.ts +124 -0
  303. package/src/Presentation/Views/DialogList/DialogList.scss +145 -0
  304. package/src/Presentation/Views/DialogList/DialogList.tsx +371 -0
  305. package/src/Presentation/Views/DialogList/DialogListViewModel.ts +25 -0
  306. package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +479 -0
  307. package/src/Presentation/Views/DialogListHeader/DialogListHeader.scss +68 -0
  308. package/src/Presentation/Views/DialogListHeader/DialogListHeader.tsx +90 -0
  309. package/src/Presentation/Views/EditDialog/EditDialog.scss +203 -0
  310. package/src/Presentation/Views/EditDialog/EditDialog.tsx +267 -0
  311. package/src/Presentation/Views/EditDialog/UserAvatar/UserAvatar.scss +32 -0
  312. package/src/Presentation/Views/EditDialog/UserAvatar/UserAvatar.tsx +59 -0
  313. package/src/Presentation/Views/Flow/CreateDialog/CreateDialog.scss +93 -0
  314. package/src/Presentation/Views/Flow/CreateDialog/CreateDialog.tsx +69 -0
  315. package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +177 -0
  316. package/src/Presentation/Views/Flow/LeaveDialogFlow/LeaveDialogFlow.tsx +37 -0
  317. package/src/Presentation/Views/InviteMembers/InviteMembers.scss +202 -0
  318. package/src/Presentation/Views/InviteMembers/InviteMembers.tsx +309 -0
  319. package/src/Presentation/Views/InviteMembers/InviteMembersViewModel.ts +18 -0
  320. package/src/Presentation/Views/InviteMembers/InviteUsersList/SingleUserWithCheckBox/SingleUserWithCheckBox.scss +90 -0
  321. package/src/Presentation/Views/InviteMembers/InviteUsersList/SingleUserWithCheckBox/SingleUserWithCheckBox.tsx +122 -0
  322. package/src/Presentation/Views/InviteMembers/InviteUsersResultViewModel.ts +12 -0
  323. package/src/Presentation/Views/InviteMembers/NotFoundContent/NotFoundContent.scss +38 -0
  324. package/src/Presentation/Views/InviteMembers/NotFoundContent/NotFoundContent.tsx +22 -0
  325. package/src/Presentation/Views/InviteMembers/useInviteMembersViewModel.ts +143 -0
  326. package/src/Presentation/Views/Navigation/More.svg +7 -0
  327. package/src/Presentation/Views/PreviewDialog/PreviewDialog.scss +211 -0
  328. package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +317 -0
  329. package/src/Presentation/Views/PreviewDialog/PreviewDialogContextMenu/PreviewDialogContextMenu.scss +9 -0
  330. package/src/Presentation/Views/PreviewDialog/PreviewDialogContextMenu/PreviewDialogContextMenu.tsx +59 -0
  331. package/src/Presentation/Views/PreviewDialog/PreviewDialogViewModel.ts +42 -0
  332. package/src/Presentation/Views/YesNoQuestion/YesNoQuestion.scss +11 -0
  333. package/src/Presentation/Views/YesNoQuestion/YesNoQuestion.tsx +48 -0
  334. package/src/Presentation/assets/fonts/.gitkeep +0 -0
  335. package/src/Presentation/assets/fonts/Roboto-Bold.eot +0 -0
  336. package/src/Presentation/assets/fonts/Roboto-Bold.ttf +0 -0
  337. package/src/Presentation/assets/fonts/Roboto-Bold.woff +0 -0
  338. package/src/Presentation/assets/fonts/Roboto-Bold.woff2 +0 -0
  339. package/src/Presentation/assets/fonts/Roboto-Medium.eot +0 -0
  340. package/src/Presentation/assets/fonts/Roboto-Medium.ttf +0 -0
  341. package/src/Presentation/assets/fonts/Roboto-Medium.woff +0 -0
  342. package/src/Presentation/assets/fonts/Roboto-Medium.woff2 +0 -0
  343. package/src/Presentation/assets/fonts/Roboto-Regular.eot +0 -0
  344. package/src/Presentation/assets/fonts/Roboto-Regular.ttf +0 -0
  345. package/src/Presentation/assets/fonts/Roboto-Regular.woff +0 -0
  346. package/src/Presentation/assets/fonts/Roboto-Regular.woff2 +0 -0
  347. package/src/Presentation/assets/img/Artem_Koltunov_Selfi.png +0 -0
  348. package/src/Presentation/assets/img/bee-img.png +0 -0
  349. package/src/Presentation/assets/img/web-doc.png +0 -0
  350. package/src/Presentation/components/Button.js +5 -0
  351. package/src/Presentation/components/Navbar.tsx +45 -0
  352. package/src/Presentation/components/TextInput.js +10 -0
  353. package/src/Presentation/components/UI/Buttons/ActiveButton/ActiveButton.tsx +40 -0
  354. package/src/Presentation/components/UI/Buttons/MainBoundedButton/MainBoundedButton.scss +0 -0
  355. package/src/Presentation/components/UI/Buttons/MainBoundedButton/MainBoundedButton.tsx +30 -0
  356. package/src/Presentation/components/UI/Buttons/MainButton/MainButton.css +103 -0
  357. package/src/Presentation/components/UI/Buttons/MainButton/MainButton.tsx +62 -0
  358. package/src/Presentation/components/UI/Elements/SwitchButton/SwitchButton.scss +61 -0
  359. package/src/Presentation/components/UI/Elements/SwitchButton/SwitchButton.tsx +48 -0
  360. package/src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.scss +74 -0
  361. package/src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.tsx +52 -0
  362. package/src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.scss +21 -0
  363. package/src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx +44 -0
  364. package/src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.scss +3 -0
  365. package/src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.tsx +45 -0
  366. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/Send.svg +3 -0
  367. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx +39 -0
  368. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BookIcon/BookIcon.tsx +7 -0
  369. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.svg +5 -0
  370. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx +50 -0
  371. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/HammerIcon/index.tsx +7 -0
  372. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/HandshakeIcon/index.tsx +7 -0
  373. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/MuscleIcon/index.tsx +7 -0
  374. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/NecktieIcon/index.tsx +7 -0
  375. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/NeutralFaceIcon/index.tsx +7 -0
  376. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PalmsUpTogetherIcon/index.tsx +7 -0
  377. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PerformingArtsIcon/index.tsx +7 -0
  378. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PointUpIcon/index.tsx +7 -0
  379. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/SmileyIcon/index.tsx +20 -0
  380. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/SmirkIcon/index.tsx +7 -0
  381. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/WhiteCheckMarkIcon/index.tsx +7 -0
  382. package/src/Presentation/components/UI/svgs/Icons/Actions/Add/Add.svg +3 -0
  383. package/src/Presentation/components/UI/svgs/Icons/Actions/Add/index.tsx +22 -0
  384. package/src/Presentation/components/UI/svgs/Icons/Actions/AddContact/Add contact.svg +3 -0
  385. package/src/Presentation/components/UI/svgs/Icons/Actions/AddContact/index.tsx +22 -0
  386. package/src/Presentation/components/UI/svgs/Icons/Actions/Archive/Archive.svg +3 -0
  387. package/src/Presentation/components/UI/svgs/Icons/Actions/Archive/index.tsx +22 -0
  388. package/src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/AssistAnswer.svg +3 -0
  389. package/src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/index.tsx +93 -0
  390. package/src/Presentation/components/UI/svgs/Icons/Actions/Copy/Copy.svg +3 -0
  391. package/src/Presentation/components/UI/svgs/Icons/Actions/Copy/index.tsx +22 -0
  392. package/src/Presentation/components/UI/svgs/Icons/Actions/Delete/Delete.svg +3 -0
  393. package/src/Presentation/components/UI/svgs/Icons/Actions/Delete/index.tsx +22 -0
  394. package/src/Presentation/components/UI/svgs/Icons/Actions/Download/Download.svg +3 -0
  395. package/src/Presentation/components/UI/svgs/Icons/Actions/Download/index.tsx +22 -0
  396. package/src/Presentation/components/UI/svgs/Icons/Actions/Edit/Edit.svg +3 -0
  397. package/src/Presentation/components/UI/svgs/Icons/Actions/Edit/index.tsx +22 -0
  398. package/src/Presentation/components/UI/svgs/Icons/Actions/EditDots/EditDots.svg +3 -0
  399. package/src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx +35 -0
  400. package/src/Presentation/components/UI/svgs/Icons/Actions/Emoji/Emoji.svg +3 -0
  401. package/src/Presentation/components/UI/svgs/Icons/Actions/Emoji/index.tsx +22 -0
  402. package/src/Presentation/components/UI/svgs/Icons/Actions/ForwardFilled/Forward filled.svg +3 -0
  403. package/src/Presentation/components/UI/svgs/Icons/Actions/ForwardFilled/index.tsx +22 -0
  404. package/src/Presentation/components/UI/svgs/Icons/Actions/Hungup/Hungup.svg +3 -0
  405. package/src/Presentation/components/UI/svgs/Icons/Actions/Hungup/index.tsx +22 -0
  406. package/src/Presentation/components/UI/svgs/Icons/Actions/IncomeCall/Income call.svg +3 -0
  407. package/src/Presentation/components/UI/svgs/Icons/Actions/IncomeCall/index.tsx +22 -0
  408. package/src/Presentation/components/UI/svgs/Icons/Actions/Like/Like.svg +3 -0
  409. package/src/Presentation/components/UI/svgs/Icons/Actions/Like/index.tsx +22 -0
  410. package/src/Presentation/components/UI/svgs/Icons/Actions/NewChat/New chat.svg +3 -0
  411. package/src/Presentation/components/UI/svgs/Icons/Actions/NewChat/index.tsx +22 -0
  412. package/src/Presentation/components/UI/svgs/Icons/Actions/OutcomeCall/Outcome call.svg +3 -0
  413. package/src/Presentation/components/UI/svgs/Icons/Actions/OutcomeCall/index.tsx +22 -0
  414. package/src/Presentation/components/UI/svgs/Icons/Actions/Phone/Phone.svg +3 -0
  415. package/src/Presentation/components/UI/svgs/Icons/Actions/Phone/index.tsx +35 -0
  416. package/src/Presentation/components/UI/svgs/Icons/Actions/PhoneFilled/Phone filled.svg +3 -0
  417. package/src/Presentation/components/UI/svgs/Icons/Actions/PhoneFilled/index.tsx +22 -0
  418. package/src/Presentation/components/UI/svgs/Icons/Actions/Remove/Remove.svg +3 -0
  419. package/src/Presentation/components/UI/svgs/Icons/Actions/Remove/index.tsx +22 -0
  420. package/src/Presentation/components/UI/svgs/Icons/Actions/Remove2/Remove2.svg +3 -0
  421. package/src/Presentation/components/UI/svgs/Icons/Actions/Remove2/index.tsx +22 -0
  422. package/src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/Reply filled.svg +3 -0
  423. package/src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/index.tsx +22 -0
  424. package/src/Presentation/components/UI/svgs/Icons/Actions/Send/Send.svg +3 -0
  425. package/src/Presentation/components/UI/svgs/Icons/Actions/Send/index.tsx +38 -0
  426. package/src/Presentation/components/UI/svgs/Icons/Actions/Share/Share.svg +3 -0
  427. package/src/Presentation/components/UI/svgs/Icons/Actions/Share/index.tsx +22 -0
  428. package/src/Presentation/components/UI/svgs/Icons/Actions/Summarize/Summarize.svg +6 -0
  429. package/src/Presentation/components/UI/svgs/Icons/Actions/Summarize/index.tsx +58 -0
  430. package/src/Presentation/components/UI/svgs/Icons/Actions/SwapCamera/Swap camera.svg +3 -0
  431. package/src/Presentation/components/UI/svgs/Icons/Actions/SwapCamera/index.tsx +22 -0
  432. package/src/Presentation/components/UI/svgs/Icons/Actions/Tone/Tone.svg +3 -0
  433. package/src/Presentation/components/UI/svgs/Icons/Actions/Tone/index.tsx +34 -0
  434. package/src/Presentation/components/UI/svgs/Icons/Actions/Unarchive/Unarchive.svg +3 -0
  435. package/src/Presentation/components/UI/svgs/Icons/Actions/Unarchive/index.tsx +22 -0
  436. package/src/Presentation/components/UI/svgs/Icons/Actions/VideoIcon/Video.svg +3 -0
  437. package/src/Presentation/components/UI/svgs/Icons/Actions/VideoIcon/index.tsx +22 -0
  438. package/src/Presentation/components/UI/svgs/Icons/Actions/Voice/Voice.svg +3 -0
  439. package/src/Presentation/components/UI/svgs/Icons/Actions/Voice/index.tsx +35 -0
  440. package/src/Presentation/components/UI/svgs/Icons/Contents/Brodcast/Broadcast.svg +7 -0
  441. package/src/Presentation/components/UI/svgs/Icons/Contents/Brodcast/index.tsx +38 -0
  442. package/src/Presentation/components/UI/svgs/Icons/Contents/Chat/Chat.svg +3 -0
  443. package/src/Presentation/components/UI/svgs/Icons/Contents/Chat/index.tsx +35 -0
  444. package/src/Presentation/components/UI/svgs/Icons/Contents/ChatFilled/Chat filled.svg +3 -0
  445. package/src/Presentation/components/UI/svgs/Icons/Contents/ChatFilled/index.tsx +22 -0
  446. package/src/Presentation/components/UI/svgs/Icons/Contents/Conference/Conference.svg +3 -0
  447. package/src/Presentation/components/UI/svgs/Icons/Contents/Conference/index.tsx +22 -0
  448. package/src/Presentation/components/UI/svgs/Icons/Contents/Contact/Contact.svg +3 -0
  449. package/src/Presentation/components/UI/svgs/Icons/Contents/Contact/index.tsx +22 -0
  450. package/src/Presentation/components/UI/svgs/Icons/Contents/ContactFilled/Contact filled.svg +3 -0
  451. package/src/Presentation/components/UI/svgs/Icons/Contents/ContactFilled/index.tsx +22 -0
  452. package/src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/Group chat.svg +3 -0
  453. package/src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/index.tsx +35 -0
  454. package/src/Presentation/components/UI/svgs/Icons/Contents/Notifications/Notifications.svg +3 -0
  455. package/src/Presentation/components/UI/svgs/Icons/Contents/Notifications/index.tsx +22 -0
  456. package/src/Presentation/components/UI/svgs/Icons/Contents/PrivateChat/Private chat.svg +3 -0
  457. package/src/Presentation/components/UI/svgs/Icons/Contents/PrivateChat/index.tsx +22 -0
  458. package/src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/Public channel.svg +7 -0
  459. package/src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/index.tsx +67 -0
  460. package/src/Presentation/components/UI/svgs/Icons/Contents/Stream/Stream.svg +3 -0
  461. package/src/Presentation/components/UI/svgs/Icons/Contents/Stream/index.tsx +22 -0
  462. package/src/Presentation/components/UI/svgs/Icons/Contents/StreamFilled/Stream filled.svg +3 -0
  463. package/src/Presentation/components/UI/svgs/Icons/Contents/StreamFilled/index.tsx +22 -0
  464. package/src/Presentation/components/UI/svgs/Icons/Contents/User/User.svg +3 -0
  465. package/src/Presentation/components/UI/svgs/Icons/Contents/User/index.tsx +35 -0
  466. package/src/Presentation/components/UI/svgs/Icons/IconsCommonTypes.ts +6 -0
  467. package/src/Presentation/components/UI/svgs/Icons/Media/Attachment/Attachment.svg +3 -0
  468. package/src/Presentation/components/UI/svgs/Icons/Media/Attachment/index.tsx +22 -0
  469. package/src/Presentation/components/UI/svgs/Icons/Media/AudioFile/Audio file.svg +3 -0
  470. package/src/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.tsx +22 -0
  471. package/src/Presentation/components/UI/svgs/Icons/Media/BrokenFile/Broken file.svg +3 -0
  472. package/src/Presentation/components/UI/svgs/Icons/Media/BrokenFile/index.tsx +22 -0
  473. package/src/Presentation/components/UI/svgs/Icons/Media/Camera/Camera.svg +3 -0
  474. package/src/Presentation/components/UI/svgs/Icons/Media/Camera/index.tsx +22 -0
  475. package/src/Presentation/components/UI/svgs/Icons/Media/GifFile/GIF file.svg +3 -0
  476. package/src/Presentation/components/UI/svgs/Icons/Media/GifFile/index.tsx +22 -0
  477. package/src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/Image.svg +3 -0
  478. package/src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/index.tsx +22 -0
  479. package/src/Presentation/components/UI/svgs/Icons/Media/ImageFile/File.svg +3 -0
  480. package/src/Presentation/components/UI/svgs/Icons/Media/ImageFile/index.tsx +35 -0
  481. package/src/Presentation/components/UI/svgs/Icons/Media/ImageFilled/Image filled.svg +3 -0
  482. package/src/Presentation/components/UI/svgs/Icons/Media/ImageFilled/index.tsx +22 -0
  483. package/src/Presentation/components/UI/svgs/Icons/Media/LinkWeb/Link.svg +3 -0
  484. package/src/Presentation/components/UI/svgs/Icons/Media/LinkWeb/index.tsx +22 -0
  485. package/src/Presentation/components/UI/svgs/Icons/Media/Location/Location.svg +4 -0
  486. package/src/Presentation/components/UI/svgs/Icons/Media/Location/index.tsx +26 -0
  487. package/src/Presentation/components/UI/svgs/Icons/Media/TextDocument/Text document.svg +3 -0
  488. package/src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx +22 -0
  489. package/src/Presentation/components/UI/svgs/Icons/Media/Translate/Translate.svg +3 -0
  490. package/src/Presentation/components/UI/svgs/Icons/Media/Translate/index.tsx +35 -0
  491. package/src/Presentation/components/UI/svgs/Icons/Media/VideoFile/Video file.svg +3 -0
  492. package/src/Presentation/components/UI/svgs/Icons/Media/VideoFile/index.tsx +22 -0
  493. package/src/Presentation/components/UI/svgs/Icons/Moderation/Admin/Admin.svg +3 -0
  494. package/src/Presentation/components/UI/svgs/Icons/Moderation/Admin/index.tsx +22 -0
  495. package/src/Presentation/components/UI/svgs/Icons/Moderation/Banned/Banned.svg +3 -0
  496. package/src/Presentation/components/UI/svgs/Icons/Moderation/Banned/index.tsx +22 -0
  497. package/src/Presentation/components/UI/svgs/Icons/Moderation/Freeze/Freeze.svg +3 -0
  498. package/src/Presentation/components/UI/svgs/Icons/Moderation/Freeze/index.tsx +22 -0
  499. package/src/Presentation/components/UI/svgs/Icons/Moderation/Moderations/Moderations.svg +3 -0
  500. package/src/Presentation/components/UI/svgs/Icons/Moderation/Moderations/index.tsx +22 -0
  501. package/src/Presentation/components/UI/svgs/Icons/Moderation/Muted/Muted.svg +3 -0
  502. package/src/Presentation/components/UI/svgs/Icons/Moderation/Muted/index.tsx +22 -0
  503. package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowLeft/Arrow left.svg +3 -0
  504. package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowLeft/index.tsx +22 -0
  505. package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowRight/Arrow right.svg +3 -0
  506. package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowRight/index.tsx +22 -0
  507. package/src/Presentation/components/UI/svgs/Icons/Navigation/Back/Back.svg +3 -0
  508. package/src/Presentation/components/UI/svgs/Icons/Navigation/Back/index.tsx +34 -0
  509. package/src/Presentation/components/UI/svgs/Icons/Navigation/Close/Close.svg +3 -0
  510. package/src/Presentation/components/UI/svgs/Icons/Navigation/Close/index.tsx +35 -0
  511. package/src/Presentation/components/UI/svgs/Icons/Navigation/Down/Down.svg +3 -0
  512. package/src/Presentation/components/UI/svgs/Icons/Navigation/Down/index.tsx +35 -0
  513. package/src/Presentation/components/UI/svgs/Icons/Navigation/Leave/Leave.svg +3 -0
  514. package/src/Presentation/components/UI/svgs/Icons/Navigation/Leave/index.tsx +35 -0
  515. package/src/Presentation/components/UI/svgs/Icons/Navigation/More/More.svg +7 -0
  516. package/src/Presentation/components/UI/svgs/Icons/Navigation/More/index.tsx +22 -0
  517. package/src/Presentation/components/UI/svgs/Icons/Navigation/Next/Next.svg +3 -0
  518. package/src/Presentation/components/UI/svgs/Icons/Navigation/Next/index.tsx +35 -0
  519. package/src/Presentation/components/UI/svgs/Icons/Navigation/Plus/Plus.svg +3 -0
  520. package/src/Presentation/components/UI/svgs/Icons/Navigation/Plus/index.tsx +22 -0
  521. package/src/Presentation/components/UI/svgs/Icons/Navigation/Refresh/Refresh.svg +3 -0
  522. package/src/Presentation/components/UI/svgs/Icons/Navigation/Refresh/index.tsx +36 -0
  523. package/src/Presentation/components/UI/svgs/Icons/Navigation/Search/Search.svg +3 -0
  524. package/src/Presentation/components/UI/svgs/Icons/Navigation/Search/index.tsx +35 -0
  525. package/src/Presentation/components/UI/svgs/Icons/Navigation/Settings/Settings.svg +3 -0
  526. package/src/Presentation/components/UI/svgs/Icons/Navigation/Settings/index.tsx +22 -0
  527. package/src/Presentation/components/UI/svgs/Icons/Navigation/SettingsField/Settings filled.svg +3 -0
  528. package/src/Presentation/components/UI/svgs/Icons/Navigation/SettingsField/index.tsx +22 -0
  529. package/src/Presentation/components/UI/svgs/Icons/Status/Error/Error.svg +3 -0
  530. package/src/Presentation/components/UI/svgs/Icons/Status/Error/index.tsx +36 -0
  531. package/src/Presentation/components/UI/svgs/Icons/Status/Help/Help.svg +3 -0
  532. package/src/Presentation/components/UI/svgs/Icons/Status/Help/index.tsx +22 -0
  533. package/src/Presentation/components/UI/svgs/Icons/Status/Information/Information.svg +3 -0
  534. package/src/Presentation/components/UI/svgs/Icons/Status/Information/index.tsx +22 -0
  535. package/src/Presentation/components/UI/svgs/Icons/Status/InformationFill/index.tsx +40 -0
  536. package/src/Presentation/components/UI/svgs/Icons/Status/Loader/Loader.svg +3 -0
  537. package/src/Presentation/components/UI/svgs/Icons/Status/Loader/index.tsx +22 -0
  538. package/src/Presentation/components/UI/svgs/Icons/Status/Mention/Mention.svg +3 -0
  539. package/src/Presentation/components/UI/svgs/Icons/Status/Mention/index.tsx +22 -0
  540. package/src/Presentation/components/UI/svgs/Icons/Status/Sent/Sent.svg +3 -0
  541. package/src/Presentation/components/UI/svgs/Icons/Status/Sent/index.tsx +22 -0
  542. package/src/Presentation/components/UI/svgs/Icons/Status/ViewedDelivered/Viewed_Delivered.svg +3 -0
  543. package/src/Presentation/components/UI/svgs/Icons/Status/ViewedDelivered/index.tsx +38 -0
  544. package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOff/Camera off.svg +3 -0
  545. package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOff/index.tsx +22 -0
  546. package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOn/Camera on.svg +3 -0
  547. package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOn/index.tsx +22 -0
  548. package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOff/Check off.svg +3 -0
  549. package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOff/index.tsx +22 -0
  550. package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOn/Check on.svg +3 -0
  551. package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOn/index.tsx +24 -0
  552. package/src/Presentation/components/UI/svgs/Icons/Toggle/Favourite/Favourite.svg +3 -0
  553. package/src/Presentation/components/UI/svgs/Icons/Toggle/Favourite/index.tsx +22 -0
  554. package/src/Presentation/components/UI/svgs/Icons/Toggle/FavouriteFilled/Favourite filled.svg +3 -0
  555. package/src/Presentation/components/UI/svgs/Icons/Toggle/FavouriteFilled/index.tsx +22 -0
  556. package/src/Presentation/components/UI/svgs/Icons/Toggle/FullScreen/Full screen.svg +3 -0
  557. package/src/Presentation/components/UI/svgs/Icons/Toggle/FullScreen/inex.tsx +22 -0
  558. package/src/Presentation/components/UI/svgs/Icons/Toggle/Hide/Hide.svg +3 -0
  559. package/src/Presentation/components/UI/svgs/Icons/Toggle/Hide/index.tsx +22 -0
  560. package/src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/Play.svg +3 -0
  561. package/src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.tsx +22 -0
  562. package/src/Presentation/components/UI/svgs/Icons/Toggle/Louder/Louder.svg +3 -0
  563. package/src/Presentation/components/UI/svgs/Icons/Toggle/Louder/index.tsx +22 -0
  564. package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOff/Mic off.svg +3 -0
  565. package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOff/index.tsx +22 -0
  566. package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOn/Mic on.svg +4 -0
  567. package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOn/index.tsx +26 -0
  568. package/src/Presentation/components/UI/svgs/Icons/Toggle/Minimize/Minimize.svg +3 -0
  569. package/src/Presentation/components/UI/svgs/Icons/Toggle/Minimize/index.tsx +22 -0
  570. package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/Notify off.svg +3 -0
  571. package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/index.tsx +35 -0
  572. package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOn/Notify on.svg +3 -0
  573. package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOn/index.tsx +35 -0
  574. package/src/Presentation/components/UI/svgs/Icons/Toggle/Pause/Pause.svg +3 -0
  575. package/src/Presentation/components/UI/svgs/Icons/Toggle/Pause/index.tsx +22 -0
  576. package/src/Presentation/components/UI/svgs/Icons/Toggle/Quite/Quite.svg +3 -0
  577. package/src/Presentation/components/UI/svgs/Icons/Toggle/Quite/index.tsx +22 -0
  578. package/src/Presentation/components/UI/svgs/Icons/Toggle/Record/Record.svg +3 -0
  579. package/src/Presentation/components/UI/svgs/Icons/Toggle/Record/index.tsx +22 -0
  580. package/src/Presentation/components/UI/svgs/Icons/Toggle/Screenshare/Screenshare.svg +3 -0
  581. package/src/Presentation/components/UI/svgs/Icons/Toggle/Screenshare/index.tsx +22 -0
  582. package/src/Presentation/components/UI/svgs/Icons/Toggle/Show/Show.svg +3 -0
  583. package/src/Presentation/components/UI/svgs/Icons/Toggle/Show/index.tsx +22 -0
  584. package/src/Presentation/components/UI/svgs/Icons/Toggle/Speaker/Speaker.svg +3 -0
  585. package/src/Presentation/components/UI/svgs/Icons/Toggle/Speaker/index.tsx +22 -0
  586. package/src/Presentation/components/UI/svgs/Icons/Toggle/SpeakerOff/Speaker off.svg +3 -0
  587. package/src/Presentation/components/UI/svgs/Icons/Toggle/SpeakerOff/index.tsx +22 -0
  588. package/src/Presentation/components/UI/svgs/Icons/Toggle/StopRecord/Stop record.svg +3 -0
  589. package/src/Presentation/components/UI/svgs/Icons/Toggle/StopRecord/index.tsx +22 -0
  590. package/src/Presentation/components/UI/svgs/Icons/Toggle/StopShare/Stop share.svg +3 -0
  591. package/src/Presentation/components/UI/svgs/Icons/Toggle/StopShare/index.tsx +22 -0
  592. package/src/Presentation/components/containers/ColumnContainer/ColumnContainer.scss +16 -0
  593. package/src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx +27 -0
  594. package/src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.scss +45 -0
  595. package/src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.tsx +88 -0
  596. package/src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.scss +45 -0
  597. package/src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.tsx +90 -0
  598. package/src/Presentation/components/containers/RowRightContainer/RowRightContainer.scss +46 -0
  599. package/src/Presentation/components/containers/RowRightContainer/RowRightContainer.tsx +90 -0
  600. package/src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.scss +45 -0
  601. package/src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.tsx +102 -0
  602. package/src/Presentation/components/containers/SectionList/hooks/createUseComponent.ts +20 -0
  603. package/src/Presentation/components/containers/SectionList/hooks/index.ts +4 -0
  604. package/src/Presentation/components/containers/SectionList/hooks/useMobileLayout.ts +27 -0
  605. package/src/Presentation/components/containers/SectionList/hooks/usePrevious.ts +11 -0
  606. package/src/Presentation/components/containers/SectionList/hooks/useVisibility.ts +17 -0
  607. package/src/Presentation/components/containers/SectionList/index.tsx +52 -0
  608. package/src/Presentation/components/containers/SectionList/styles.css +50 -0
  609. package/src/Presentation/components/containers/SectionList/useComponent.ts +136 -0
  610. package/src/Presentation/icons/actions/add-contact.svg +3 -0
  611. package/src/Presentation/icons/actions/add.svg +3 -0
  612. package/src/Presentation/icons/actions/archive.svg +3 -0
  613. package/src/Presentation/icons/actions/copy.svg +3 -0
  614. package/src/Presentation/icons/actions/delete.svg +3 -0
  615. package/src/Presentation/icons/actions/download.svg +3 -0
  616. package/src/Presentation/icons/actions/edit.svg +3 -0
  617. package/src/Presentation/icons/actions/emoji.svg +3 -0
  618. package/src/Presentation/icons/actions/forward-filled.svg +3 -0
  619. package/src/Presentation/icons/actions/hungup.svg +3 -0
  620. package/src/Presentation/icons/actions/income-call.svg +3 -0
  621. package/src/Presentation/icons/actions/index.ts +26 -0
  622. package/src/Presentation/icons/actions/like.svg +3 -0
  623. package/src/Presentation/icons/actions/new-chat.svg +3 -0
  624. package/src/Presentation/icons/actions/outcome-call.svg +3 -0
  625. package/src/Presentation/icons/actions/phone-filled.svg +3 -0
  626. package/src/Presentation/icons/actions/phone.svg +3 -0
  627. package/src/Presentation/icons/actions/remove-2.svg +3 -0
  628. package/src/Presentation/icons/actions/remove.svg +3 -0
  629. package/src/Presentation/icons/actions/rephrase.svg +6 -0
  630. package/src/Presentation/icons/actions/reply-filled.svg +3 -0
  631. package/src/Presentation/icons/actions/robot.svg +5 -0
  632. package/src/Presentation/icons/actions/send.svg +3 -0
  633. package/src/Presentation/icons/actions/share.svg +3 -0
  634. package/src/Presentation/icons/actions/swap-camera.svg +3 -0
  635. package/src/Presentation/icons/actions/translate.svg +3 -0
  636. package/src/Presentation/icons/actions/unarchive.svg +3 -0
  637. package/src/Presentation/icons/actions/video.svg +3 -0
  638. package/src/Presentation/icons/actions/voice.svg +3 -0
  639. package/src/Presentation/icons/contents/broadcast.svg +7 -0
  640. package/src/Presentation/icons/contents/chat-filled.svg +3 -0
  641. package/src/Presentation/icons/contents/chat.svg +3 -0
  642. package/src/Presentation/icons/contents/conference.svg +3 -0
  643. package/src/Presentation/icons/contents/contact-filled.svg +3 -0
  644. package/src/Presentation/icons/contents/contact.svg +3 -0
  645. package/src/Presentation/icons/contents/group-chat.svg +3 -0
  646. package/src/Presentation/icons/contents/index.ts +13 -0
  647. package/src/Presentation/icons/contents/notifications.svg +3 -0
  648. package/src/Presentation/icons/contents/private-chat.svg +3 -0
  649. package/src/Presentation/icons/contents/public-channel.svg +7 -0
  650. package/src/Presentation/icons/contents/stream-filled.svg +3 -0
  651. package/src/Presentation/icons/contents/stream.svg +3 -0
  652. package/src/Presentation/icons/contents/user.svg +3 -0
  653. package/src/Presentation/icons/index.ts +7 -0
  654. package/src/Presentation/icons/media/attachment.svg +3 -0
  655. package/src/Presentation/icons/media/audio-file.svg +3 -0
  656. package/src/Presentation/icons/media/broken-file.svg +3 -0
  657. package/src/Presentation/icons/media/camera.svg +3 -0
  658. package/src/Presentation/icons/media/file.svg +3 -0
  659. package/src/Presentation/icons/media/gif-file.svg +3 -0
  660. package/src/Presentation/icons/media/image-filled.svg +3 -0
  661. package/src/Presentation/icons/media/image.svg +3 -0
  662. package/src/Presentation/icons/media/index.ts +12 -0
  663. package/src/Presentation/icons/media/link.svg +3 -0
  664. package/src/Presentation/icons/media/location.svg +4 -0
  665. package/src/Presentation/icons/media/text-document.svg +3 -0
  666. package/src/Presentation/icons/media/video-file.svg +3 -0
  667. package/src/Presentation/icons/moderation/admin.svg +3 -0
  668. package/src/Presentation/icons/moderation/banned.svg +3 -0
  669. package/src/Presentation/icons/moderation/freeze.svg +3 -0
  670. package/src/Presentation/icons/moderation/index.ts +5 -0
  671. package/src/Presentation/icons/moderation/moderations.svg +3 -0
  672. package/src/Presentation/icons/moderation/muted.svg +3 -0
  673. package/src/Presentation/icons/navigation/arrow-left.svg +3 -0
  674. package/src/Presentation/icons/navigation/arrow-right.svg +3 -0
  675. package/src/Presentation/icons/navigation/back.svg +3 -0
  676. package/src/Presentation/icons/navigation/close.svg +3 -0
  677. package/src/Presentation/icons/navigation/down.svg +3 -0
  678. package/src/Presentation/icons/navigation/index.ts +12 -0
  679. package/src/Presentation/icons/navigation/leave.svg +3 -0
  680. package/src/Presentation/icons/navigation/more.svg +3 -0
  681. package/src/Presentation/icons/navigation/next.svg +3 -0
  682. package/src/Presentation/icons/navigation/plus.svg +3 -0
  683. package/src/Presentation/icons/navigation/refresh.svg +3 -0
  684. package/src/Presentation/icons/navigation/search.svg +3 -0
  685. package/src/Presentation/icons/navigation/settings-filled.svg +3 -0
  686. package/src/Presentation/icons/navigation/settings.svg +3 -0
  687. package/src/Presentation/icons/status/error.svg +3 -0
  688. package/src/Presentation/icons/status/help.svg +3 -0
  689. package/src/Presentation/icons/status/index.ts +7 -0
  690. package/src/Presentation/icons/status/information.svg +3 -0
  691. package/src/Presentation/icons/status/loader.svg +3 -0
  692. package/src/Presentation/icons/status/mention.svg +3 -0
  693. package/src/Presentation/icons/status/sent.svg +3 -0
  694. package/src/Presentation/icons/status/viewed-delivered.svg +3 -0
  695. package/src/Presentation/icons/toggle/camera-off.svg +3 -0
  696. package/src/Presentation/icons/toggle/camera-on.svg +3 -0
  697. package/src/Presentation/icons/toggle/check-off.svg +3 -0
  698. package/src/Presentation/icons/toggle/check-on.svg +3 -0
  699. package/src/Presentation/icons/toggle/favorite.svg +3 -0
  700. package/src/Presentation/icons/toggle/favourite.svg +3 -0
  701. package/src/Presentation/icons/toggle/full-screen.svg +3 -0
  702. package/src/Presentation/icons/toggle/hide.svg +3 -0
  703. package/src/Presentation/icons/toggle/index.ts +23 -0
  704. package/src/Presentation/icons/toggle/louder.svg +3 -0
  705. package/src/Presentation/icons/toggle/mic-off.svg +3 -0
  706. package/src/Presentation/icons/toggle/mic-on.svg +4 -0
  707. package/src/Presentation/icons/toggle/minimize.svg +3 -0
  708. package/src/Presentation/icons/toggle/notify-off.svg +3 -0
  709. package/src/Presentation/icons/toggle/notify-on.svg +3 -0
  710. package/src/Presentation/icons/toggle/pause.svg +3 -0
  711. package/src/Presentation/icons/toggle/play.svg +3 -0
  712. package/src/Presentation/icons/toggle/quite.svg +3 -0
  713. package/src/Presentation/icons/toggle/record.svg +3 -0
  714. package/src/Presentation/icons/toggle/screenshare.svg +3 -0
  715. package/src/Presentation/icons/toggle/show.svg +3 -0
  716. package/src/Presentation/icons/toggle/speaker off.svg +3 -0
  717. package/src/Presentation/icons/toggle/speaker-off.svg +3 -0
  718. package/src/Presentation/icons/toggle/speaker.svg +3 -0
  719. package/src/Presentation/icons/toggle/stop-record.svg +3 -0
  720. package/src/Presentation/icons/toggle/stop-share.svg +3 -0
  721. package/src/Presentation/layouts/Desktop/DesktopLayout.scss +62 -0
  722. package/src/Presentation/layouts/Desktop/DesktopLayout.tsx +89 -0
  723. package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +1374 -0
  724. package/src/Presentation/layouts/LayoutCommonTypes.ts +7 -0
  725. package/src/Presentation/layouts/TestStage/CompanyLogo/CompanyLogo.tsx +27 -0
  726. package/src/Presentation/layouts/TestStage/LoginView/Login.scss +72 -0
  727. package/src/Presentation/layouts/TestStage/LoginView/Login.tsx +95 -0
  728. package/src/Presentation/providers/ProviderProps.ts +5 -0
  729. package/src/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx +339 -0
  730. package/src/Presentation/providers/QuickBloxUIKitProvider/useEventMessagesRepository.ts +10 -0
  731. package/src/Presentation/providers/QuickBloxUIKitProvider/useQBConnection.ts +38 -0
  732. package/src/Presentation/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts +83 -0
  733. package/src/Presentation/providers/QuickBloxUIKitProvider/useQbUIKitDataContext.ts +11 -0
  734. package/src/Presentation/themes/DarkTheme.ts +58 -0
  735. package/src/Presentation/themes/DefaultThemes/CustomTheme.ts +58 -0
  736. package/src/Presentation/themes/DefaultThemes/DefaultTheme.ts +58 -0
  737. package/src/Presentation/themes/LightTheme.ts +58 -0
  738. package/src/Presentation/themes/ThemeScheme.ts +83 -0
  739. package/src/Presentation/themes/UiKitTheme.ts +37 -0
  740. package/src/Presentation/themes/styles/_fonts.scss +32 -0
  741. package/src/Presentation/themes/styles/_mixins.scss +6 -0
  742. package/src/Presentation/themes/styles/_theme_colors_scheme.scss +56 -0
  743. package/src/Presentation/themes/styles/_theme_colors_scheme_green.scss +57 -0
  744. package/src/Presentation/themes/styles/_theme_colors_scheme_pink.scss +72 -0
  745. package/src/Presentation/themes/styles/_theme_dark.scss +37 -0
  746. package/src/Presentation/themes/styles/_theme_light.scss +38 -0
  747. package/src/Presentation/themes/styles/_variables.scss +54 -0
  748. package/src/Presentation/ui-components/Avatar/Avatar.scss +55 -0
  749. package/src/Presentation/ui-components/Avatar/Avatar.tsx +30 -0
  750. package/src/Presentation/ui-components/Avatar/avatar.stories.tsx +78 -0
  751. package/src/Presentation/ui-components/Badge/Badge.scss +23 -0
  752. package/src/Presentation/ui-components/Badge/Badge.stories.ts +64 -0
  753. package/src/Presentation/ui-components/Badge/Badge.tsx +23 -0
  754. package/src/Presentation/ui-components/Button/Button.scss +133 -0
  755. package/src/Presentation/ui-components/Button/Button.stories.ts +93 -0
  756. package/src/Presentation/ui-components/Button/Button.tsx +49 -0
  757. package/src/Presentation/ui-components/CheckBox/CheckBox.scss +10 -0
  758. package/src/Presentation/ui-components/CheckBox/CheckBox.tsx +23 -0
  759. package/src/Presentation/ui-components/DialogBanner/DialogBanner.scss +29 -0
  760. package/src/Presentation/ui-components/DialogBanner/DialogBanner.stories.ts +38 -0
  761. package/src/Presentation/ui-components/DialogBanner/DialogBanner.tsx +16 -0
  762. package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.scss +71 -0
  763. package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.tsx +166 -0
  764. package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx +70 -0
  765. package/src/Presentation/ui-components/DialogWindow/DialogWindow.scss +45 -0
  766. package/src/Presentation/ui-components/DialogWindow/DialogWindow.stories.tsx +106 -0
  767. package/src/Presentation/ui-components/DialogWindow/DialogWindow.tsx +41 -0
  768. package/src/Presentation/ui-components/Dropdown/Dropdown.scss +78 -0
  769. package/src/Presentation/ui-components/Dropdown/Dropdown.stories.tsx +149 -0
  770. package/src/Presentation/ui-components/Dropdown/Dropdown.tsx +89 -0
  771. package/src/Presentation/ui-components/Dropdown/DropdownOption.tsx +30 -0
  772. package/src/Presentation/ui-components/Header/Header.scss +72 -0
  773. package/src/Presentation/ui-components/Header/Header.stories.tsx +116 -0
  774. package/src/Presentation/ui-components/Header/Header.tsx +51 -0
  775. package/src/Presentation/ui-components/Loader/Loader.scss +27 -0
  776. package/src/Presentation/ui-components/Loader/Loader.stories.ts +42 -0
  777. package/src/Presentation/ui-components/Loader/Loader.tsx +15 -0
  778. package/src/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.tsx +66 -0
  779. package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.scss +71 -0
  780. package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.tsx +148 -0
  781. package/src/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.scss +29 -0
  782. package/src/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.tsx +16 -0
  783. package/src/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.scss +16 -0
  784. package/src/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.tsx +25 -0
  785. package/src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.scss +40 -0
  786. package/src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.tsx +22 -0
  787. package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.scss +18 -0
  788. package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.tsx +36 -0
  789. package/src/Presentation/ui-components/Message/FileUrl/FileUrl.scss +58 -0
  790. package/src/Presentation/ui-components/Message/FileUrl/FileUrl.tsx +43 -0
  791. package/src/Presentation/ui-components/Message/Message.scss +136 -0
  792. package/src/Presentation/ui-components/Message/Message.stories.tsx +249 -0
  793. package/src/Presentation/ui-components/Message/Message.tsx +85 -0
  794. package/src/Presentation/ui-components/Message/MessageCaption/MessageCaption.scss +90 -0
  795. package/src/Presentation/ui-components/Message/MessageCaption/MessageCaption.tsx +46 -0
  796. package/src/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.scss +51 -0
  797. package/src/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.tsx +32 -0
  798. package/src/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.tsx +33 -0
  799. package/src/Presentation/ui-components/MessageInput/MessageInput.scss +123 -0
  800. package/src/Presentation/ui-components/MessageInput/MessageInput.stories.tsx +137 -0
  801. package/src/Presentation/ui-components/MessageInput/MessageInput.tsx +155 -0
  802. package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.scss +16 -0
  803. package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.tsx +27 -0
  804. package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyMessagePreview.scss +140 -0
  805. package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyMessagePreview.tsx +101 -0
  806. package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.scss +35 -0
  807. package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.tsx +79 -0
  808. package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.scss +30 -0
  809. package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.stories.ts +158 -0
  810. package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.tsx +34 -0
  811. package/src/Presentation/ui-components/Placeholder/Placeholder.scss +51 -0
  812. package/src/Presentation/ui-components/Placeholder/Placeholder.stories.tsx +95 -0
  813. package/src/Presentation/ui-components/Placeholder/Placeholder.tsx +38 -0
  814. package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.scss +30 -0
  815. package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.stories.ts +66 -0
  816. package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx +38 -0
  817. package/src/Presentation/ui-components/SettingsItem/SettingsItem.scss +69 -0
  818. package/src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx +177 -0
  819. package/src/Presentation/ui-components/SettingsItem/SettingsItem.tsx +56 -0
  820. package/src/Presentation/ui-components/TextField/TextField.scss +91 -0
  821. package/src/Presentation/ui-components/TextField/TextField.stories.ts +103 -0
  822. package/src/Presentation/ui-components/TextField/TextField.tsx +78 -0
  823. package/src/Presentation/ui-components/Toast/Toast.scss +17 -0
  824. package/src/Presentation/ui-components/Toast/Toast.stories.tsx +50 -0
  825. package/src/Presentation/ui-components/Toast/ToastProvider.tsx +28 -0
  826. package/src/Presentation/ui-components/UserListItem/UserListItem.scss +33 -0
  827. package/src/Presentation/ui-components/UserListItem/UserListItem.stories.tsx +128 -0
  828. package/src/Presentation/ui-components/UserListItem/UserListItem.tsx +43 -0
  829. package/src/Presentation/ui-components/index.ts +19 -0
  830. package/src/QBconfig.ts +151 -0
  831. package/src/hooks/useModal.ts +13 -0
  832. package/src/index-ui.ts +87 -0
  833. package/src/index.scss +27 -0
  834. package/src/index.tsx +25 -0
  835. package/src/logo.svg +1 -0
  836. package/src/package_artan_react_ui.json +91 -0
  837. package/src/package_original.json +115 -0
  838. package/src/qb-api-calls/index.ts +581 -0
  839. package/src/react-app-env.d.ts +1 -0
  840. package/src/setupTests.ts +5 -0
  841. package/src/utils/DateTimeFormatter.ts +90 -0
  842. package/src/utils/parse.ts +74 -0
  843. package/src/utils/utils.ts +102 -0
  844. package/storybook-static/312.0aa0e670.iframe.bundle.js +1 -0
  845. package/storybook-static/341.bea6d0bd.iframe.bundle.js +1 -0
  846. package/storybook-static/426.be971fb5.iframe.bundle.js +157 -0
  847. package/storybook-static/426.be971fb5.iframe.bundle.js.map +1 -0
  848. package/storybook-static/472.3c9e81e6.iframe.bundle.js +351 -0
  849. package/storybook-static/472.3c9e81e6.iframe.bundle.js.map +1 -0
  850. package/storybook-static/607.b04b9f0b.iframe.bundle.js +1 -0
  851. package/storybook-static/729.734b4ae4.iframe.bundle.js +1 -0
  852. package/storybook-static/758.d99b0166.iframe.bundle.js +14 -0
  853. package/storybook-static/758.d99b0166.iframe.bundle.js.map +1 -0
  854. package/storybook-static/797.b3873e04.iframe.bundle.js +1 -0
  855. package/storybook-static/926.f14bb932.iframe.bundle.js +508 -0
  856. package/storybook-static/926.f14bb932.iframe.bundle.js.map +1 -0
  857. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.2fb23ae6.iframe.bundle.js +1 -0
  858. package/storybook-static/Presentation-ui-components-Badge-Badge-stories.fea53429.iframe.bundle.js +14 -0
  859. package/storybook-static/Presentation-ui-components-Badge-Badge-stories.fea53429.iframe.bundle.js.map +1 -0
  860. package/storybook-static/Presentation-ui-components-Button-Button-stories.f6c6437b.iframe.bundle.js +1 -0
  861. package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.6b2a3f72.iframe.bundle.js +10 -0
  862. package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.6b2a3f72.iframe.bundle.js.map +1 -0
  863. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.f1cb9d40.iframe.bundle.js +1 -0
  864. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.0ad17c54.iframe.bundle.js +1 -0
  865. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.3b620239.iframe.bundle.js +1 -0
  866. package/storybook-static/Presentation-ui-components-Header-Header-stories.45503161.iframe.bundle.js +1 -0
  867. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.8b53bb33.iframe.bundle.js +1 -0
  868. package/storybook-static/Presentation-ui-components-Message-Message-stories.63bec01b.iframe.bundle.js +1 -0
  869. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.728a66ad.iframe.bundle.js +1 -0
  870. package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.82483823.iframe.bundle.js +10 -0
  871. package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.82483823.iframe.bundle.js.map +1 -0
  872. package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.0898ead6.iframe.bundle.js +1 -0
  873. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.973cdb64.iframe.bundle.js +1 -0
  874. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.0af0b8a8.iframe.bundle.js +1 -0
  875. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.5987d2bb.iframe.bundle.js +1 -0
  876. package/storybook-static/Presentation-ui-components-Toast-Toast-stories.e26b2e07.iframe.bundle.js +1 -0
  877. package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.e88f4206.iframe.bundle.js +1 -0
  878. package/storybook-static/favicon.ico +0 -0
  879. package/storybook-static/favicon.svg +7 -0
  880. package/storybook-static/iframe.html +355 -0
  881. package/storybook-static/index.html +131 -0
  882. package/storybook-static/index.json +1 -0
  883. package/storybook-static/logo192.png +0 -0
  884. package/storybook-static/logo512.png +0 -0
  885. package/storybook-static/main.0332574c.iframe.bundle.js +1 -0
  886. package/storybook-static/manifest.json +25 -0
  887. package/storybook-static/project.json +1 -0
  888. package/storybook-static/quickblox.js +54609 -0
  889. package/storybook-static/robots.txt +3 -0
  890. package/storybook-static/runtime~main.16726a14.iframe.bundle.js +1 -0
  891. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
  892. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
  893. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +12 -0
  894. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
  895. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +63 -0
  896. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +18 -0
  897. package/storybook-static/sb-addons/essentials-measure-5/manager-bundle.js +3 -0
  898. package/storybook-static/sb-addons/essentials-measure-5/manager-bundle.js.LEGAL.txt +0 -0
  899. package/storybook-static/sb-addons/essentials-outline-6/manager-bundle.js +3 -0
  900. package/storybook-static/sb-addons/essentials-outline-6/manager-bundle.js.LEGAL.txt +0 -0
  901. package/storybook-static/sb-addons/essentials-toolbars-4/manager-bundle.js +3 -0
  902. package/storybook-static/sb-addons/essentials-toolbars-4/manager-bundle.js.LEGAL.txt +0 -0
  903. package/storybook-static/sb-addons/interactions-8/manager-bundle.js +12 -0
  904. package/storybook-static/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -0
  905. package/storybook-static/sb-addons/links-0/manager-bundle.js +3 -0
  906. package/storybook-static/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
  907. package/storybook-static/sb-addons/onboarding-7/manager-bundle.js +503 -0
  908. package/storybook-static/sb-addons/onboarding-7/manager-bundle.js.LEGAL.txt +48 -0
  909. package/storybook-static/sb-addons/viewport-9/manager-bundle.js +3 -0
  910. package/storybook-static/sb-addons/viewport-9/manager-bundle.js.LEGAL.txt +0 -0
  911. package/storybook-static/sb-common-assets/fonts.css +31 -0
  912. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  913. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  914. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  915. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  916. package/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-LVYLGZW2.js +1 -0
  917. package/storybook-static/sb-manager/chunk-2IXBUOFS.js +7 -0
  918. package/storybook-static/sb-manager/chunk-INSKDKQB.js +348 -0
  919. package/storybook-static/sb-manager/chunk-NGTUFCUO.js +9 -0
  920. package/storybook-static/sb-manager/chunk-NMB3SATH.js +406 -0
  921. package/storybook-static/sb-manager/chunk-ZEU7PDD3.js +1 -0
  922. package/storybook-static/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +156 -0
  923. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  924. package/storybook-static/sb-manager/globals.js +1 -0
  925. package/storybook-static/sb-manager/index.js +1 -0
  926. package/storybook-static/sb-manager/runtime.js +1 -0
  927. package/storybook-static/sb-manager/syntaxhighlighter-V7JZZA35-DXZCI2WR.js +1 -0
  928. package/storybook-static/sb-preview/globals.js +1 -0
  929. package/storybook-static/sb-preview/runtime.js +112 -0
  930. package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.807573c8.chunk.css +3 -0
  931. package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.807573c8.chunk.css.map +1 -0
  932. package/storybook-static/static/css/Presentation-ui-components-Badge-Badge-stories.7b8317f8.chunk.css +3 -0
  933. package/storybook-static/static/css/Presentation-ui-components-Badge-Badge-stories.7b8317f8.chunk.css.map +1 -0
  934. package/storybook-static/static/css/Presentation-ui-components-Button-Button-stories.1b6e1c55.chunk.css +4 -0
  935. package/storybook-static/static/css/Presentation-ui-components-Button-Button-stories.1b6e1c55.chunk.css.map +1 -0
  936. package/storybook-static/static/css/Presentation-ui-components-DialogBanner-DialogBanner-stories.bd07fad3.chunk.css +3 -0
  937. package/storybook-static/static/css/Presentation-ui-components-DialogBanner-DialogBanner-stories.bd07fad3.chunk.css.map +1 -0
  938. package/storybook-static/static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e720ff21.chunk.css +7 -0
  939. package/storybook-static/static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e720ff21.chunk.css.map +1 -0
  940. package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.6fb3af8d.chunk.css +6 -0
  941. package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.6fb3af8d.chunk.css.map +1 -0
  942. package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.66965d64.chunk.css +5 -0
  943. package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.66965d64.chunk.css.map +1 -0
  944. package/storybook-static/static/css/Presentation-ui-components-Header-Header-stories.cdc47631.chunk.css +4 -0
  945. package/storybook-static/static/css/Presentation-ui-components-Header-Header-stories.cdc47631.chunk.css.map +1 -0
  946. package/storybook-static/static/css/Presentation-ui-components-Loader-Loader-stories.dab34da1.chunk.css +3 -0
  947. package/storybook-static/static/css/Presentation-ui-components-Loader-Loader-stories.dab34da1.chunk.css.map +1 -0
  948. package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.a518b61a.chunk.css +14 -0
  949. package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.a518b61a.chunk.css.map +1 -0
  950. package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.0e99d80b.chunk.css +7 -0
  951. package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.0e99d80b.chunk.css.map +1 -0
  952. package/storybook-static/static/css/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.34aa36b2.chunk.css +3 -0
  953. package/storybook-static/static/css/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.34aa36b2.chunk.css.map +1 -0
  954. package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.1ebf88ab.chunk.css +4 -0
  955. package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.1ebf88ab.chunk.css.map +1 -0
  956. package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css +3 -0
  957. package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css.map +1 -0
  958. package/storybook-static/static/css/Presentation-ui-components-SettingsItem-SettingsItem-stories.7b98a5d4.chunk.css +5 -0
  959. package/storybook-static/static/css/Presentation-ui-components-SettingsItem-SettingsItem-stories.7b98a5d4.chunk.css.map +1 -0
  960. package/storybook-static/static/css/Presentation-ui-components-TextField-TextField-stories.412027f8.chunk.css +4 -0
  961. package/storybook-static/static/css/Presentation-ui-components-TextField-TextField-stories.412027f8.chunk.css.map +1 -0
  962. package/storybook-static/static/css/Presentation-ui-components-Toast-Toast-stories.11d83296.chunk.css +754 -0
  963. package/storybook-static/static/css/Presentation-ui-components-Toast-Toast-stories.11d83296.chunk.css.map +1 -0
  964. package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.4d072348.chunk.css +7 -0
  965. package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.4d072348.chunk.css.map +1 -0
  966. package/storybook-static/static/css/main.4e852eef.css +5 -0
  967. package/storybook-static/static/css/main.4e852eef.css.map +1 -0
  968. package/storybook-static/static/media/add-contact.e7e7b8b15edebe99cae9c46963126e7c.svg +3 -0
  969. package/storybook-static/static/media/add.5cbe1f2c489b81396863f7128e3d26e7.svg +3 -0
  970. package/storybook-static/static/media/admin.476c2854d7ad23f2afdedac2d9bd6815.svg +3 -0
  971. package/storybook-static/static/media/archive.d0a72898f3c47a4194d18f560a54e109.svg +3 -0
  972. package/storybook-static/static/media/arrow-left.5005351d4fa6a7c074dd9780fb49dcc8.svg +3 -0
  973. package/storybook-static/static/media/arrow-right.1be3b599e21158807fdf72f4976179a2.svg +3 -0
  974. package/storybook-static/static/media/attachment.a58b8549f46ae5bbe93be779cd9f2037.svg +3 -0
  975. package/storybook-static/static/media/audio-file.40179c472f715fc74d4da607da96aa5e.svg +3 -0
  976. package/storybook-static/static/media/back.b541e72fe05542e145575c8851558998.svg +3 -0
  977. package/storybook-static/static/media/banned.c7c74bfa1c833263f3ab42d0529132d1.svg +3 -0
  978. package/storybook-static/static/media/broadcast.55273926379e5f486ccfdfab1a310b2d.svg +7 -0
  979. package/storybook-static/static/media/broken-file.bc084278a0d284b7901b47f24001caa6.svg +3 -0
  980. package/storybook-static/static/media/camera-off.8e01960815ce7620a1039d0fc5f758b2.svg +3 -0
  981. package/storybook-static/static/media/camera-on.ddd56e36fa505d618ab772e23c8381e6.svg +3 -0
  982. package/storybook-static/static/media/camera.a5a215695fba60146e649094188f37e2.svg +3 -0
  983. package/storybook-static/static/media/chat-filled.aaf0b778d198e7b8f632a68299a8fd13.svg +3 -0
  984. package/storybook-static/static/media/chat.59cd437f21fe7043682dd04cbe6377be.svg +3 -0
  985. package/storybook-static/static/media/check-off.0c0256f00eeb75770ffc2fbd2b59eab0.svg +3 -0
  986. package/storybook-static/static/media/check-on.80442753ef6922df1913453f50099315.svg +3 -0
  987. package/storybook-static/static/media/close.c145af996de81b25f3930bf36d88b161.svg +3 -0
  988. package/storybook-static/static/media/conference.ffbdf37c0510c796138f18e6c1205204.svg +3 -0
  989. package/storybook-static/static/media/contact-filled.f04f56ba3f98ade5d7ced7814d8a5fa8.svg +3 -0
  990. package/storybook-static/static/media/contact.40a8b8104c3a448b81108ffede850963.svg +3 -0
  991. package/storybook-static/static/media/copy.100bd0fff933cbde8ad4bc2ac281c845.svg +3 -0
  992. package/storybook-static/static/media/delete.287c9b4b3b0e58cb081c6e388e68b409.svg +3 -0
  993. package/storybook-static/static/media/down.7a43a3d78885f40616ce111c86c108a4.svg +3 -0
  994. package/storybook-static/static/media/download.43c26d404dd023e42aaacc52151f7a59.svg +3 -0
  995. package/storybook-static/static/media/edit.8d813af82ecab84303ee3c97bd7bc562.svg +3 -0
  996. package/storybook-static/static/media/emoji.9a202cbb16735f3c83ba8772f0218aa4.svg +3 -0
  997. package/storybook-static/static/media/error.ec60e2052661b82f27b7ce270ae133a7.svg +3 -0
  998. package/storybook-static/static/media/favorite.194d78057be6cd7968c85e7b5822f82a.svg +3 -0
  999. package/storybook-static/static/media/file.e537292693b3c89c023fd383c70bd221.svg +3 -0
  1000. package/storybook-static/static/media/forward-filled.43120a68057427c89c88b28d9b20dd90.svg +3 -0
  1001. package/storybook-static/static/media/freeze.35619771e645b649c38e0427d9b39a25.svg +3 -0
  1002. package/storybook-static/static/media/full-screen.6b01c93e069421c69bda2bbde5d01336.svg +3 -0
  1003. package/storybook-static/static/media/gif-file.2c46a5df6c8397f5b9088e66aee3fd44.svg +3 -0
  1004. package/storybook-static/static/media/group-chat.19d5305cab6017d494ac35ecb285a9fe.svg +3 -0
  1005. package/storybook-static/static/media/help.786f48518c96c8e7098296d68245c339.svg +3 -0
  1006. package/storybook-static/static/media/hide.2785264246d70868717984a5ad44d4c9.svg +3 -0
  1007. package/storybook-static/static/media/hungup.e5d2289a9e8cd755bd1ee36b738305a2.svg +3 -0
  1008. package/storybook-static/static/media/image-filled.8afb62b142d786e90102f1cac73a9c13.svg +3 -0
  1009. package/storybook-static/static/media/image.64092dadd5215c8d3ba99ccac753d743.svg +3 -0
  1010. package/storybook-static/static/media/income-call.60ca2d367a00d582f4b6f4a5f2047e27.svg +3 -0
  1011. package/storybook-static/static/media/information.8217e163c334852f143e7199c97fab1d.svg +3 -0
  1012. package/storybook-static/static/media/leave.ae5422a12edec1b61484ff2932819c77.svg +3 -0
  1013. package/storybook-static/static/media/like.45662989373aa524cd580fb42432e0bc.svg +3 -0
  1014. package/storybook-static/static/media/link.74f567c3ee4366d79fb81d73eb8c0919.svg +3 -0
  1015. package/storybook-static/static/media/loader.2eb72391c5267453edb4106528c075ad.svg +3 -0
  1016. package/storybook-static/static/media/location.cab52453404524c345ec7efdd86fa66b.svg +4 -0
  1017. package/storybook-static/static/media/louder.133519141541a9cd2f0e898534b39732.svg +3 -0
  1018. package/storybook-static/static/media/mention.6c4885bb0ea5ca85c8962f6f51ac1cb4.svg +3 -0
  1019. package/storybook-static/static/media/mic-off.43e60427600bcf7fd78fb840ff50d804.svg +3 -0
  1020. package/storybook-static/static/media/mic-on.5a52100de3770550b3a57a76827843c2.svg +4 -0
  1021. package/storybook-static/static/media/minimize.a849dd3a36ece08b992a773d135a0c3f.svg +3 -0
  1022. package/storybook-static/static/media/moderations.07c8d1fe96b0b8bb5911f6cc37f764c6.svg +3 -0
  1023. package/storybook-static/static/media/more.4ed9ad54ae110d9760b6e9698d821960.svg +3 -0
  1024. package/storybook-static/static/media/muted.cb37ac3c577c87c800466aa7aee65af2.svg +3 -0
  1025. package/storybook-static/static/media/new-chat.124e0351bd0e19ff4c5fdbabbe5c6027.svg +3 -0
  1026. package/storybook-static/static/media/next.97a0eeea1f8daa2d31c8452f29908bf1.svg +3 -0
  1027. package/storybook-static/static/media/notifications.ab8e847ae04e2bec9209dbdd1054b0f2.svg +3 -0
  1028. package/storybook-static/static/media/notify-off.4a669a3a8cbd38b3309dbc4c909f6089.svg +3 -0
  1029. package/storybook-static/static/media/notify-on.ea9ffc856ad6cdbe87184af558c78eec.svg +3 -0
  1030. package/storybook-static/static/media/outcome-call.9f5fec07823796ad78963a06cdcf629e.svg +3 -0
  1031. package/storybook-static/static/media/pause.27eb8c32999f10d05d6a200165d798a9.svg +3 -0
  1032. package/storybook-static/static/media/phone-filled.e969511d74935af26ef366f575929f68.svg +3 -0
  1033. package/storybook-static/static/media/phone.6355580a064a488b6317372d71f84c00.svg +3 -0
  1034. package/storybook-static/static/media/play.00bfe0e9c94dc6dfb230262e45b2f860.svg +3 -0
  1035. package/storybook-static/static/media/plus.d3953cb1cf830bcfc41c8cc6133b13b1.svg +3 -0
  1036. package/storybook-static/static/media/private-chat.c68f36baf025b9d20ad1f801a2396e7a.svg +3 -0
  1037. package/storybook-static/static/media/public-channel.7a6ada7f30c44fb4a99021df0eb0e996.svg +7 -0
  1038. package/storybook-static/static/media/quite.9f45e2152fe6c499a776cb387ee4859f.svg +3 -0
  1039. package/storybook-static/static/media/record.e49ee7da793b2ce446a4e7128970c0cc.svg +3 -0
  1040. package/storybook-static/static/media/refresh.6e955728d9ec086f34e9adaaaafacf3e.svg +3 -0
  1041. package/storybook-static/static/media/remove-2.8a7700757f02c941f03c37c7e495bf63.svg +3 -0
  1042. package/storybook-static/static/media/remove.831e69b70db1b3eb72a49444b8aa1e16.svg +3 -0
  1043. package/storybook-static/static/media/rephrase.551171aa8903b31746a58a95528b1f68.svg +6 -0
  1044. package/storybook-static/static/media/reply-filled.17ed65506e902f17bb22e87ffac93314.svg +3 -0
  1045. package/storybook-static/static/media/screenshare.c2f94264a7640ea1bbb2a22f7d570038.svg +3 -0
  1046. package/storybook-static/static/media/search.25663e60d71e01c64fdfc83df7460ab0.svg +3 -0
  1047. package/storybook-static/static/media/send.d298db52aafdb846a46c9d180ad45946.svg +3 -0
  1048. package/storybook-static/static/media/sent.f427753e5502fd7783a08e5f0e0d2f35.svg +3 -0
  1049. package/storybook-static/static/media/settings-filled.bd9b60ff4e9eae911e4e2bc69e8e79ca.svg +3 -0
  1050. package/storybook-static/static/media/share.7ce8283aa267fb065c568d65b482e211.svg +3 -0
  1051. package/storybook-static/static/media/show.de1782527c4a7fa14101dffbfba8aea6.svg +3 -0
  1052. package/storybook-static/static/media/speaker-off.fe84597c4b68f4f761e12f789dc58718.svg +3 -0
  1053. package/storybook-static/static/media/speaker.e7ff48a73ca43188703b36dfecd932b5.svg +3 -0
  1054. package/storybook-static/static/media/stop-record.a2e9d50a0930c24af43d7f357093be81.svg +3 -0
  1055. package/storybook-static/static/media/stop-share.d1be236e01dd924ba711e1e17f41054c.svg +3 -0
  1056. package/storybook-static/static/media/stream-filled.c40bae61fea25455602a61db5e77fa71.svg +3 -0
  1057. package/storybook-static/static/media/stream.700f4f8ce0cee0ae1ef56132867427fe.svg +3 -0
  1058. package/storybook-static/static/media/swap-camera.bc3a4652106f5c57d14b4dcbffff08a5.svg +3 -0
  1059. package/storybook-static/static/media/text-document.cad7e87368501b96de2a939d08852dcd.svg +3 -0
  1060. package/storybook-static/static/media/unarchive.1b1a7438cd8eb6fee80e6ac89baa195b.svg +3 -0
  1061. package/storybook-static/static/media/user.911c7ae778615185b285ce0ae4068486.svg +3 -0
  1062. package/storybook-static/static/media/video-file.dbd1f8c63a3769f9e9a027f0922d56b2.svg +3 -0
  1063. package/storybook-static/static/media/video.bbcc2109285c18eea02ede86920de0dd.svg +3 -0
  1064. package/storybook-static/static/media/viewed-delivered.f43360dc87235a6cf574ff53f73dd777.svg +3 -0
  1065. package/storybook-static/static/media/voice.b937c8a1f744050bec2cd389ad2a1f3a.svg +3 -0
  1066. package/storybook-static/stories.json +1 -0
  1067. package/tsconfig.json +33 -0
  1068. package/typedoc.json +4 -0
  1069. package/webpack.config.js +68 -0
  1070. package/dist/Presentation/Views/Dialog/DialogHeader/RenderLeftActions/RenderLeftActions.d.ts +0 -10
  1071. package/dist/Presentation/Views/PreviewDialog/PreviewAudioFile/PreviewAudioFile.d.ts +0 -7
  1072. package/dist/Presentation/Views/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.d.ts +0 -7
  1073. package/dist/Presentation/Views/PreviewDialog/PreviewImageFile/PreviewImageFile.d.ts +0 -8
  1074. package/dist/Presentation/Views/PreviewDialog/PreviewVideoFile/PreviewVideoFile.d.ts +0 -7
  1075. package/dist/Presentation/providers/ModalContextProvider/Modal.d.ts +0 -14
  1076. package/dist/Presentation/providers/ModalContextProvider/ModalContextProvider.d.ts +0 -4
  1077. package/dist/Presentation/providers/ModalContextProvider/useModal.d.ts +0 -11
  1078. package/dist/Presentation/{Views/Dialog → ui-components/MessageInput}/AttachmentUploader/AttachmentUploader.d.ts +0 -0
  1079. package/dist/Presentation/{Views/Dialog → ui-components/MessageInput}/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.d.ts +0 -0
  1080. package/dist/Presentation/{Views/Dialog → ui-components/MessageInput}/ReplyMessagePreview/ReplyMessagePreview.d.ts +1 -1
  1081. /package/dist/Presentation/{Views/Dialog → ui-components/MessageInput}/VoiceRecordingProgress/VoiceRecordingProgress.d.ts +0 -0
@@ -0,0 +1,1374 @@
1
+ import React, { useEffect, useRef, useState } from 'react';
2
+ import '../../Views/Dialog/Dialog.scss';
3
+ import '../../Views/Dialog/DialogHeader/DialogInfoIcon/DialogInfoIcon.scss';
4
+ import { Tone } from 'qb-ai-rephrase/src/Tone';
5
+ import { toast } from 'react-toastify';
6
+ import useQbInitializedDataContext from '../../providers/QuickBloxUIKitProvider/useQbInitializedDataContext';
7
+ import { DialogEntity } from '../../../Domain/entity/DialogEntity';
8
+ import { DialogListViewModel } from '../../Views/DialogList/DialogListViewModel';
9
+ import DialogList from '../../Views/DialogList/DialogList';
10
+ import DialogInfo from '../../Views/DialogInfo/DialogInfo';
11
+ import DesktopLayout from './DesktopLayout';
12
+ import Dialog from '../../Views/Dialog/Dialog';
13
+ import useDialogListViewModel from '../../Views/DialogList/useDialogListViewModel';
14
+ import { Pagination } from '../../../Domain/repository/Pagination';
15
+ import UiKitTheme from '../../themes/UiKitTheme';
16
+ import BaseViewModel, {
17
+ ForwardMessagesParams,
18
+ ReplyMessagesParams,
19
+ } from '../../../CommonTypes/BaseViewModel';
20
+ import { AIMessageWidget } from '../../Views/Dialog/AIWidgets/AIMessageWidget';
21
+ import UseDefaultAIAssistAnswerWidget from '../../Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidget';
22
+ import UseDefaultAITranslateWidget from '../../Views/Dialog/AIWidgets/UseDefaultAITranslateWidget';
23
+ import UseDefaultAIRephraseMessageWidget from '../../Views/Dialog/AIWidgets/UseDefaultAIRephraseMessageWidget';
24
+ import { DefaultConfigurations } from '../../../Data/DefaultConfigurations';
25
+ import UseDefaultAIAssistAnswerWidgetWithProxy from '../../Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy';
26
+ import UseDefaultAITranslateWidgetWithProxy from '../../Views/Dialog/AIWidgets/UseDefaultAITranslateWidgetWithProxy';
27
+ import UseDefaultAIRephraseMessageWidgetWithProxy from '../../Views/Dialog/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy';
28
+ import { DialogType } from '../../../Domain/entity/DialogTypes';
29
+ import { GroupDialogEntity } from '../../../Domain/entity/GroupDialogEntity';
30
+ import { PrivateDialogEntity } from '../../../Domain/entity/PrivateDialogEntity';
31
+ import { PublicDialogEntity } from '../../../Domain/entity/PublicDialogEntity';
32
+ import { DialogViewModel } from '../../Views/Dialog/DialogViewModel';
33
+ import useDialogViewModel from '../../Views/Dialog/useDialogViewModel';
34
+ import { MessageEntity } from '../../../Domain/entity/MessageEntity';
35
+ import { stringifyError } from '../../../utils/parse';
36
+ import ReplyMessagePreview from '../../ui-components/MessageInput/ReplyMessagePreview/ReplyMessagePreview';
37
+ import ForwardMessageFlow from '../../Views/Dialog/ForwardMessageFlow/ForwardMessageFlow';
38
+ import SectionList from '../../components/containers/SectionList';
39
+ import { SectionItem } from '../../components/containers/SectionList/useComponent';
40
+ import { useMobileLayout } from '../../components/containers/SectionList/hooks';
41
+ import { MessageDTOMapper } from '../../../Data/source/remote/Mapper/MessageDTOMapper';
42
+ import MembersList from '../../Views/DialogInfo/MembersList/MembersList';
43
+ import useUsersListViewModel from '../../Views/DialogInfo/UsersList/useUsersListViewModel';
44
+ import { GetUserNameFct } from '../../Views/Dialog/Message/IncomingMessage/IncomingMessage';
45
+ import { UserEntity } from '../../../Domain/entity/UserEntity';
46
+ import Header from '../../ui-components/Header/Header';
47
+ import Avatar from '../../ui-components/Avatar/Avatar';
48
+ import {
49
+ GroupChatSvg,
50
+ InformationSvg,
51
+ PublicChannelSvg,
52
+ UserSvg,
53
+ } from '../../icons';
54
+ import Button from '../../ui-components/Button/Button';
55
+ import DialogWindow from '../../ui-components/DialogWindow/DialogWindow';
56
+ import MessageInput from '../../ui-components/MessageInput/MessageInput';
57
+ import AIRephraseWidget from '../../Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget';
58
+ import MessageItem from '../../Views/Dialog/MessageItem/MessageItem';
59
+ import { MessageSeparator, Placeholder } from '../../ui-components';
60
+ import ToastProvider from '../../ui-components/Toast/ToastProvider';
61
+ import CreateNewDialogFlow from '../../Views/Flow/CreateDialogFlow/CreateNewDialogFlow';
62
+ import useModal from '../../../hooks/useModal';
63
+
64
+ type AIWidgetPlaceHolder = {
65
+ enabled: boolean;
66
+ default: boolean;
67
+ AIWidget?: AIMessageWidget;
68
+ };
69
+
70
+ type QuickBloxUIKitDesktopLayoutProps = {
71
+ theme?: UiKitTheme;
72
+ AIRephrase?: AIWidgetPlaceHolder;
73
+ AITranslate?: AIWidgetPlaceHolder;
74
+ AIAssist?: AIWidgetPlaceHolder;
75
+ uikitHeightOffset?: string;
76
+ };
77
+
78
+ const QuickBloxUIKitDesktopLayout: React.FC<
79
+ QuickBloxUIKitDesktopLayoutProps
80
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars,react/function-component-definition
81
+ > = ({
82
+ theme = undefined,
83
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
84
+ AITranslate = undefined,
85
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
86
+ AIRephrase = undefined,
87
+ AIAssist = undefined,
88
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
89
+ uikitHeightOffset = '0px',
90
+ }: QuickBloxUIKitDesktopLayoutProps) => {
91
+ console.log('create QuickBloxUIKitDesktopLayout');
92
+ const [forwardMessage, setForwardMessage] = useState<null | MessageEntity>();
93
+ const forwardMessageModal = useModal();
94
+ const [selectedDialog, setSelectedDialog] = React.useState<DialogEntity>();
95
+
96
+ const currentContext = useQbInitializedDataContext();
97
+ const QBConfig =
98
+ currentContext.InitParams.qbConfig ||
99
+ DefaultConfigurations.getDefaultQBConfig();
100
+ // const eventMessaging = useEventMessagesRepository();
101
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
102
+ // @ts-ignore
103
+ const userName =
104
+ currentContext.storage.REMOTE_DATA_SOURCE.authInformation?.userName;
105
+ const userId =
106
+ currentContext.storage.REMOTE_DATA_SOURCE.authInformation?.userId;
107
+ // const currentUserName =
108
+ // currentContext.storage.REMOTE_DATA_SOURCE.authInformation?.userName;
109
+ const sessionToken =
110
+ currentContext.storage.REMOTE_DATA_SOURCE.authInformation?.sessionToken;
111
+
112
+ const dialogsViewModel: DialogListViewModel =
113
+ useDialogListViewModel(currentContext);
114
+
115
+ let defaultAIRephraseWidget = AIRephrase?.AIWidget; // useDefaultTextInputWidget();
116
+ let defaultAITranslateWidget = AITranslate?.AIWidget;
117
+ let defaultAIAssistWidget = AIAssist?.AIWidget;
118
+
119
+ const getAIAssistAnswer = (): void => {
120
+ if (AIAssist?.enabled && !AIAssist?.default) {
121
+ defaultAIAssistWidget = AIAssist.AIWidget;
122
+ } else if (
123
+ AIAssist?.enabled ||
124
+ QBConfig.configAIApi.AIAnswerAssistWidgetConfig.useDefault
125
+ ) {
126
+ if (
127
+ !QBConfig.configAIApi.AIAnswerAssistWidgetConfig.useDefault ||
128
+ (AIAssist && !AIAssist?.default)
129
+ ) {
130
+ defaultAIAssistWidget = undefined;
131
+ } else {
132
+ const { apiKey } = QBConfig.configAIApi.AIAnswerAssistWidgetConfig;
133
+ let token = '';
134
+ const proxyConfig: ProxyConfig =
135
+ QBConfig.configAIApi.AIAnswerAssistWidgetConfig.proxyConfig ||
136
+ DefaultConfigurations.getDefaultProxyConfig();
137
+
138
+ if (apiKey) {
139
+ token = apiKey;
140
+ defaultAIAssistWidget = UseDefaultAIAssistAnswerWidget({
141
+ ...proxyConfig,
142
+ apiKeyOrSessionToken: token,
143
+ });
144
+ } else {
145
+ token = sessionToken || '';
146
+ defaultAIAssistWidget = UseDefaultAIAssistAnswerWidgetWithProxy({
147
+ ...proxyConfig,
148
+ apiKeyOrSessionToken: token,
149
+ });
150
+ }
151
+ }
152
+ }
153
+ };
154
+ const getAITranslate = (): void => {
155
+ if (AITranslate?.enabled && !AITranslate?.default) {
156
+ defaultAITranslateWidget = AITranslate.AIWidget;
157
+ } else if (
158
+ AITranslate?.enabled ||
159
+ QBConfig.configAIApi.AITranslateWidgetConfig.useDefault
160
+ ) {
161
+ if (
162
+ !QBConfig.configAIApi.AITranslateWidgetConfig.useDefault ||
163
+ (AITranslate && !AITranslate?.default)
164
+ ) {
165
+ defaultAITranslateWidget = undefined;
166
+ } else {
167
+ const { apiKey } = QBConfig.configAIApi.AITranslateWidgetConfig;
168
+ let token = '';
169
+ const proxyConfig: ProxyConfig =
170
+ QBConfig.configAIApi.AITranslateWidgetConfig.proxyConfig ||
171
+ DefaultConfigurations.getDefaultProxyConfig();
172
+
173
+ if (apiKey) {
174
+ token = apiKey;
175
+ defaultAITranslateWidget = UseDefaultAITranslateWidget({
176
+ ...proxyConfig,
177
+ apiKeyOrSessionToken: token,
178
+ });
179
+ } else {
180
+ token = sessionToken || '';
181
+ defaultAITranslateWidget = UseDefaultAITranslateWidgetWithProxy({
182
+ ...proxyConfig,
183
+ apiKeyOrSessionToken: token,
184
+ });
185
+ }
186
+ }
187
+ }
188
+ };
189
+ const getAIRephrase = (): void => {
190
+ if (AIRephrase?.enabled && !AIRephrase?.default) {
191
+ defaultAIRephraseWidget = AIRephrase.AIWidget;
192
+ } else if (
193
+ AIRephrase?.enabled ||
194
+ QBConfig.configAIApi.AIRephraseWidgetConfig.useDefault
195
+ ) {
196
+ if (
197
+ !QBConfig.configAIApi.AIRephraseWidgetConfig.useDefault ||
198
+ (AIRephrase && !AIRephrase?.default)
199
+ ) {
200
+ defaultAIRephraseWidget = undefined;
201
+ } else {
202
+ const { apiKey } = QBConfig.configAIApi.AIRephraseWidgetConfig;
203
+ let token = '';
204
+ const proxyConfig: ProxyConfig =
205
+ QBConfig.configAIApi.AIRephraseWidgetConfig.proxyConfig ||
206
+ DefaultConfigurations.getDefaultProxyConfig();
207
+
208
+ if (apiKey) {
209
+ token = apiKey;
210
+ defaultAIRephraseWidget = UseDefaultAIRephraseMessageWidget({
211
+ ...proxyConfig,
212
+ apiKeyOrSessionToken: token,
213
+ });
214
+ } else {
215
+ token = sessionToken || '';
216
+ defaultAIRephraseWidget = UseDefaultAIRephraseMessageWidgetWithProxy({
217
+ ...proxyConfig,
218
+ apiKeyOrSessionToken: token,
219
+ });
220
+ }
221
+ }
222
+ }
223
+ };
224
+
225
+ getAITranslate();
226
+ getAIRephrase();
227
+ getAIAssistAnswer();
228
+
229
+ const { enableForwarding } = QBConfig.appConfig;
230
+ const { enableReplying } = QBConfig.appConfig;
231
+
232
+ const selectDialogActions = (item: BaseViewModel<DialogEntity>): void => {
233
+ if (!dialogsViewModel.loading) {
234
+ setSelectedDialog(item.entity);
235
+ }
236
+ };
237
+
238
+ const [showReplyMessage, setShowReplyMessage] = useState(false);
239
+ const [messagesToReply, setMessagesToReply] = useState<MessageEntity[]>([]);
240
+ const [isMobile, width, height, breakpoint] = useMobileLayout();
241
+ const [clientHeight, setClientHeight] = useState<number>(0);
242
+
243
+ // const subscribeToDialogEventsUseCase: SubscribeToDialogEventsUseCase =
244
+ // new SubscribeToDialogEventsUseCase(eventMessaging, 'TestStage');
245
+
246
+ // инициализация СДК и загрузка тестовых данных, запуск пинга - может не быть
247
+ // todo: добавить метод в контекст
248
+ const isAuthProcessed = (): boolean => {
249
+ console.log('call isAuthProcessed');
250
+ const result =
251
+ currentContext.storage.REMOTE_DATA_SOURCE.needInit === false &&
252
+ currentContext.storage.REMOTE_DATA_SOURCE.authProcessed &&
253
+ currentContext.storage.CONNECTION_REPOSITORY.needInit === false;
254
+
255
+ console.log(
256
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
257
+ `initialValue.REMOTE_DATA_SOURCE_MOCK.needInit: ${currentContext.storage.REMOTE_DATA_SOURCE.needInit}`,
258
+ );
259
+ console.log(
260
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
261
+ `initialValue.REMOTE_DATA_SOURCE_MOCK.authProcessed: ${currentContext.storage.REMOTE_DATA_SOURCE.authProcessed}`,
262
+ );
263
+
264
+ console.log(
265
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
266
+ `initialValue.CONNECTION_REPOSITORY.needInit: ${currentContext.storage.CONNECTION_REPOSITORY.needInit}`,
267
+ );
268
+
269
+ return result;
270
+ };
271
+
272
+ useEffect(() => {
273
+ const codeVersion = '0.3.0';
274
+
275
+ console.log(`React UIKit CODE VERSION IS ${codeVersion}`);
276
+ console.log('TestStage: GET DATA ');
277
+ console.log(
278
+ `auth data: ${JSON.stringify(
279
+ currentContext.InitParams.loginData,
280
+ )} at ${new Date().toLocaleTimeString()}`,
281
+ );
282
+ if (isAuthProcessed()) {
283
+ console.log('auth is completed, CAN GET DATA');
284
+ const pagination: Pagination = new Pagination();
285
+
286
+ dialogsViewModel?.getDialogs(pagination);
287
+ }
288
+
289
+ return () => {
290
+ console.log('TestStage: USE EFFECT release');
291
+ dialogsViewModel.release();
292
+ };
293
+ }, []);
294
+
295
+ useEffect(() => {
296
+ console.log('TestStage: GET DATA AFTER User data has CHANGED');
297
+ console.log(
298
+ `auth is ${JSON.stringify(
299
+ currentContext.InitParams.loginData,
300
+ )} at ${new Date().toLocaleTimeString()}`,
301
+ );
302
+
303
+ if (isAuthProcessed()) {
304
+ console.log('auth is completed, FETCH DATA');
305
+ const pagination: Pagination = new Pagination();
306
+
307
+ dialogsViewModel?.getDialogs(pagination);
308
+ }
309
+ }, [currentContext.InitParams]);
310
+
311
+ // const getCountDialogMembers = (dialogEntity: DialogEntity): number => {
312
+ // let participants = [];
313
+ //
314
+ // if (dialogEntity.type === DialogType.group) {
315
+ // participants = (dialogEntity as GroupDialogEntity).participantIds;
316
+ // } else if (dialogEntity.type === DialogType.private) {
317
+ // participants = [(dialogEntity as PrivateDialogEntity).participantId];
318
+ // } else if (dialogEntity.type === DialogType.public) {
319
+ // participants = [];
320
+ // }
321
+ //
322
+ // return participants.length;
323
+ // };
324
+ const userViewModel = useUsersListViewModel(selectedDialog);
325
+ const [dialogAvatarUrl, setDialogAvatarUrl] = React.useState('');
326
+ const getUserAvatarByUid = async () => {
327
+ let result = '';
328
+ const participants: Array<number> =
329
+ dialogsViewModel?.entity &&
330
+ dialogsViewModel?.entity.type === DialogType.private
331
+ ? [
332
+ (dialogsViewModel?.entity as unknown as PrivateDialogEntity)
333
+ .participantId,
334
+ ]
335
+ : [];
336
+ const senderUser = await userViewModel.getUserById(participants[0]);
337
+
338
+ result = senderUser?.photo || '';
339
+
340
+ return result;
341
+ };
342
+
343
+ async function getDialogPhotoFileForPreview() {
344
+ const tmpFileUrl: string = await getUserAvatarByUid();
345
+
346
+ if (tmpFileUrl && tmpFileUrl.length > 0) {
347
+ setDialogAvatarUrl(tmpFileUrl);
348
+ }
349
+ }
350
+
351
+ useEffect(() => {
352
+ getDialogPhotoFileForPreview();
353
+
354
+ return () => {
355
+ if (dialogAvatarUrl) {
356
+ URL.revokeObjectURL(dialogAvatarUrl);
357
+ }
358
+ };
359
+ }, [dialogsViewModel.entity]);
360
+ // eslint-disable-next-line consistent-return
361
+ const renderIconForTypeDialog = (dialogEntity: DialogEntity) => {
362
+ if (dialogEntity.type === DialogType.group) {
363
+ const groupDialogEntity = dialogEntity as GroupDialogEntity;
364
+
365
+ return (
366
+ <Avatar
367
+ src={groupDialogEntity.photo || ''}
368
+ icon={<GroupChatSvg />}
369
+ size="md"
370
+ />
371
+ );
372
+ }
373
+ if (dialogEntity.type === DialogType.private) {
374
+ return <Avatar src={dialogAvatarUrl} icon={<UserSvg />} size="md" />;
375
+ }
376
+ if (dialogEntity.type === DialogType.public) {
377
+ const publicDialogEntity = dialogEntity as PublicDialogEntity;
378
+
379
+ return (
380
+ <Avatar
381
+ src={publicDialogEntity.photo}
382
+ icon={<PublicChannelSvg />}
383
+ size="md"
384
+ />
385
+ );
386
+ }
387
+ };
388
+
389
+ useEffect(() => {
390
+ console.log(
391
+ `Clear selected dialog: ${
392
+ selectedDialog?.name || 'Dialog Name is empty'
393
+ }`,
394
+ );
395
+ if (!dialogsViewModel.entity) {
396
+ setSelectedDialog(undefined);
397
+ }
398
+ }, [dialogsViewModel.entity]);
399
+
400
+ const [needDialogInformation, setNeedDialogInformation] = useState(false);
401
+ const informationCloseHandler = (): void => {
402
+ setNeedDialogInformation(false);
403
+ };
404
+ const informationOpenHandler = (): void => {
405
+ setNeedDialogInformation(true);
406
+ };
407
+ //
408
+ const maxTokensForAIRephrase =
409
+ currentContext.InitParams.qbConfig.configAIApi.AIRephraseWidgetConfig
410
+ .maxTokens;
411
+
412
+ const rephraseTones: Tone[] =
413
+ currentContext.InitParams.qbConfig.configAIApi.AIRephraseWidgetConfig.Tones;
414
+
415
+ const { maxFileSize } = currentContext.InitParams;
416
+ //
417
+ const [waitAIWidget, setWaitAIWidget] = useState<boolean>(false);
418
+ const [messageText, setMessageText] = useState<string>('');
419
+
420
+ // must re-create as result dialog changing
421
+ const messagesViewModel: DialogViewModel = useDialogViewModel(
422
+ dialogsViewModel.entity?.type,
423
+ dialogsViewModel.entity,
424
+ );
425
+
426
+ const [warningErrorText, setWarningErrorText] = useState<string>('');
427
+ // const [showErrorToast, setShowErrorToast] = useState<boolean>(false);
428
+ // const [messageErrorToast, setMessageErrorToast] = useState<string>('');
429
+
430
+ const [dialogMessagesCount, setDialogMessageCount] = useState(100);
431
+ const [hasMore, setHasMore] = React.useState(true);
432
+ const [scrollUpToDown, setScrollUpToDown] = React.useState(false);
433
+ const [messagesToView, setMessagesToView] = React.useState<MessageEntity[]>(
434
+ [],
435
+ );
436
+
437
+ const [useAudioWidget, setUseAudioWidget] = useState<boolean>(false);
438
+
439
+ const [fileToSend, setFileToSend] = useState<File | null>(null);
440
+
441
+ const [isRecording, setIsRecording] = useState(false);
442
+ //
443
+ const [permission, setPermission] = useState(false);
444
+
445
+ // const [recordingStatus, setRecordingStatus] = useState('inactive');
446
+
447
+ const [stream, setStream] = useState<MediaStream>();
448
+ // const [mediaRecorder, setMediaRecorder] = useState<MediaRecorder>();
449
+ const mediaRecorder = useRef<MediaRecorder>();
450
+ const [resultAudioBlob, setResultAudioBlob] = useState<Blob>();
451
+
452
+ const [audioChunks, setAudioChunks] = useState<Array<Blob>>([]);
453
+
454
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
455
+ const mimeType = 'audio/webm;codecs=opus'; // audio/ogg audio/mpeg audio/webm audio/x-wav audio/mp4
456
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
457
+
458
+ const showErrorMessage = (errorMessage: string) => {
459
+ setWarningErrorText(errorMessage);
460
+ setTimeout(() => {
461
+ setWarningErrorText('');
462
+ }, 3000);
463
+ };
464
+
465
+ const closeReplyMessageFlowHandler = () => {
466
+ setMessagesToReply([]);
467
+ setShowReplyMessage(false);
468
+ };
469
+
470
+ const repliedActions = (replyData: ReplyMessagesParams): void => {
471
+ // eslint-disable-next-line promise/catch-or-return
472
+ messagesViewModel
473
+ .sendReplyMessages(replyData)
474
+ .then((opResult: boolean) => {
475
+ // eslint-disable-next-line promise/always-return
476
+ if (opResult) {
477
+ toast('Message have been replied');
478
+ } else {
479
+ toast('Message have not been replied');
480
+ }
481
+ })
482
+ .catch((reason) => {
483
+ const errorMessage = stringifyError(reason);
484
+
485
+ toast(errorMessage);
486
+ })
487
+ .finally(() => {
488
+ setMessageText('');
489
+ closeReplyMessageFlowHandler();
490
+ });
491
+ };
492
+
493
+ useEffect(() => {
494
+ const MAXSIZE = maxFileSize || 90 * 1000000;
495
+ const MAXSIZE_FOR_MESSAGE = MAXSIZE / (1024 * 1024);
496
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
497
+ const flag = fileToSend?.size && fileToSend?.size < MAXSIZE;
498
+
499
+ if (fileToSend?.size && fileToSend?.size < MAXSIZE) {
500
+ if (showReplyMessage && messagesToReply?.length > 0) {
501
+ const replyData: ReplyMessagesParams = {
502
+ messagesToReply,
503
+ relatedFileMessage: fileToSend,
504
+ relatedTextMessage:
505
+ messageText || MessageDTOMapper.REPLY_MESSAGE_PREFIX,
506
+ };
507
+
508
+ repliedActions(replyData);
509
+ } else {
510
+ // eslint-disable-next-line promise/catch-or-return
511
+ messagesViewModel
512
+ .sendAttachmentMessage(fileToSend)
513
+ .then((resultOperation) => {
514
+ // eslint-disable-next-line promise/always-return
515
+ if (!resultOperation) {
516
+ toast(`Incorrect data`);
517
+ }
518
+ });
519
+ }
520
+ } else if (fileToSend) {
521
+ toast(
522
+ `file size ${fileToSend?.size} must be less then ${MAXSIZE_FOR_MESSAGE} mb.`,
523
+ );
524
+ }
525
+ }, [fileToSend]);
526
+
527
+ // const [isVoiceMessage, setVoiceMessage] = useState(true);
528
+ const getMicrophonePermission = async () => {
529
+ if (window) {
530
+ try {
531
+ const mediaStream = await navigator.mediaDevices.getUserMedia({
532
+ audio: true,
533
+ video: false,
534
+ });
535
+
536
+ setPermission(true);
537
+ setStream(mediaStream);
538
+ } catch (err) {
539
+ showErrorMessage(
540
+ `The MediaRecorder API throws exception ${stringifyError(err)} .`,
541
+ );
542
+ }
543
+ } else {
544
+ showErrorMessage(
545
+ 'The MediaRecorder API is not supported in your browser.',
546
+ );
547
+ }
548
+ };
549
+
550
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await
551
+ const startRecording = async () => {
552
+ if (!stream) return;
553
+ const mimeTypes = [
554
+ 'audio/aac',
555
+ 'audio/mp4',
556
+ 'audio/mpeg',
557
+ 'audio/ogg',
558
+ 'audio/wav',
559
+ 'audio/webm',
560
+ 'audio/3gpp',
561
+ 'audio/flac',
562
+ 'audio/x-aiff',
563
+ 'audio/x-m4a',
564
+ ];
565
+
566
+ console.log('MIME TYPES: ');
567
+ mimeTypes.forEach((mType) => {
568
+ if (MediaRecorder.isTypeSupported(mimeType)) {
569
+ console.log(`${mType} is supported`);
570
+ } else {
571
+ console.log(`${mType} is not supported`);
572
+ }
573
+ });
574
+ // audio/mp4;codecs=mp4a audio/webm;codecs=opus audio/webm;codecs=vp9,opus
575
+ const mimeContent = window.MediaRecorder.isTypeSupported('audio/mp4')
576
+ ? 'audio/mp4;codecs=mp4a'
577
+ : 'audio/webm;codecs=opus';
578
+
579
+ const media = new MediaRecorder(stream, { mimeType: mimeContent });
580
+
581
+ mediaRecorder.current = media;
582
+ mediaRecorder.current.start();
583
+
584
+ const localAudioChunks: any[] = [];
585
+
586
+ mediaRecorder.current.ondataavailable = (event) => {
587
+ if (typeof event.data === 'undefined') return;
588
+ if (event.data.size === 0) return;
589
+ localAudioChunks.push(event.data);
590
+ };
591
+
592
+ setAudioChunks(localAudioChunks);
593
+ };
594
+
595
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
596
+ const stopRecording = () => {
597
+ if (!mediaRecorder.current) return;
598
+ mediaRecorder.current.stop();
599
+
600
+ mediaRecorder.current.onstop = () => {
601
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
602
+ const mimeContent = window.MediaRecorder.isTypeSupported(
603
+ 'audio/mp4;codecs=mp4a',
604
+ )
605
+ ? 'audio/mp4;codecs=mp4a'
606
+ : 'audio/webm;codecs=opus';
607
+ // const audioBlob = new Blob(audioChunks, { type: mimeContent }); // mimeType
608
+ // const mp4Blob = new Blob(recordedChunks, { type: 'video/mp4' });
609
+
610
+ // const audioBlob = new Blob(audioChunks, { type: 'video/mp4' }); // mimeType
611
+ // const audioBlob = new Blob(audioChunks, { type: 'audio/mp4' }); // mimeType
612
+ const audioBlob = new Blob(audioChunks, { type: 'audio/mp4' });
613
+
614
+ setResultAudioBlob(audioBlob);
615
+
616
+ setAudioChunks([]);
617
+ //
618
+ stream?.getAudioTracks().forEach((track) => {
619
+ track.stop();
620
+ });
621
+ setPermission(false);
622
+ //
623
+ };
624
+ };
625
+
626
+ const blobToFile = (theBlob: Blob, fileName: string): File => {
627
+ const b: any = theBlob;
628
+
629
+ // A Blob() is almost a File() - it's just missing the two properties below which we will add
630
+ b.lastModifiedDate = new Date();
631
+ b.name = fileName;
632
+
633
+ // Cast to a File() type
634
+ const resultFile = theBlob as unknown as File;
635
+
636
+ return resultFile;
637
+ };
638
+
639
+ useEffect(() => {
640
+ const fileExt = 'mp4';
641
+
642
+ if (resultAudioBlob) {
643
+ const voiceMessage = blobToFile(
644
+ resultAudioBlob,
645
+ `${userName || ''}_voice_message.${fileExt}`,
646
+ );
647
+
648
+ setFileToSend(voiceMessage);
649
+ if (useAudioWidget) {
650
+ setUseAudioWidget(false);
651
+ }
652
+ //
653
+ }
654
+ }, [resultAudioBlob]);
655
+
656
+ useEffect(() => {
657
+ // setFileToSend(null);
658
+ if (isRecording) {
659
+ if (!permission) {
660
+ // eslint-disable-next-line promise/catch-or-return,promise/always-return
661
+ getMicrophonePermission().catch(() => {
662
+ showErrorMessage(`Have no audio.`);
663
+ });
664
+ } else {
665
+ // eslint-disable-next-line promise/catch-or-return,promise/always-return
666
+ startRecording().then(() => {
667
+ setWarningErrorText(`Your voice is recording during for 1 minutes`);
668
+ });
669
+ }
670
+ } else {
671
+ if (permission && mediaRecorder.current) {
672
+ stopRecording();
673
+ }
674
+ setWarningErrorText('');
675
+ }
676
+ }, [isRecording]);
677
+
678
+ useEffect(() => {
679
+ if (isRecording && permission) {
680
+ // eslint-disable-next-line promise/always-return,promise/catch-or-return
681
+ startRecording().then(() => {
682
+ setWarningErrorText(`Your voice is recording during for 1 minutes`);
683
+ });
684
+ }
685
+ }, [permission]);
686
+
687
+ useEffect(() => {
688
+ setWaitAIWidget(false);
689
+ if (
690
+ defaultAIRephraseWidget?.textToContent &&
691
+ defaultAIRephraseWidget?.textToContent.length > 0
692
+ ) {
693
+ setMessageText(defaultAIRephraseWidget?.textToContent);
694
+ }
695
+ }, [defaultAIRephraseWidget?.textToContent]);
696
+
697
+ useEffect(() => {
698
+ setWaitAIWidget(false);
699
+ }, [defaultAITranslateWidget?.textToContent]);
700
+
701
+ useEffect(() => {
702
+ setWaitAIWidget(false);
703
+ if (
704
+ defaultAIAssistWidget?.textToContent &&
705
+ defaultAIAssistWidget?.textToContent.length > 0
706
+ ) {
707
+ setMessageText(defaultAIAssistWidget?.textToContent);
708
+ }
709
+ }, [defaultAIAssistWidget?.textToContent]);
710
+
711
+ //
712
+
713
+ function sendTextMessageActions(textToSend: string) {
714
+ // closeReplyMessageFlowHandler
715
+ if (messagesViewModel?.loading) return;
716
+ // setVoiceMessage(true);
717
+ if (textToSend.length > 0 && textToSend.length <= 1000) {
718
+ setMessageText('');
719
+ if (showReplyMessage && messagesToReply?.length > 0) {
720
+ const replyData: ReplyMessagesParams = {
721
+ messagesToReply,
722
+ relatedTextMessage: textToSend,
723
+ };
724
+
725
+ repliedActions(replyData);
726
+ } else {
727
+ messagesViewModel.sendTextMessage(textToSend);
728
+ setMessageText('');
729
+ }
730
+ setMessageText('');
731
+ } else {
732
+ setWarningErrorText(
733
+ 'length of text message must be less then 1000 chars.',
734
+ );
735
+ setTimeout(() => {
736
+ setWarningErrorText('');
737
+ }, 3000);
738
+ }
739
+ }
740
+ //
741
+ useEffect(() => {
742
+ messagesViewModel.entity = dialogsViewModel.entity;
743
+ setMessagesToView([]);
744
+ setMessageText('');
745
+ }, [dialogsViewModel.entity]);
746
+
747
+ useEffect(() => {
748
+ if (messagesViewModel.entity) {
749
+ messagesViewModel.getMessages(new Pagination());
750
+ }
751
+ }, [messagesViewModel.entity]);
752
+ //
753
+ useEffect(() => {
754
+ if (!isMobile && messagesViewModel.entity) {
755
+ dialogsViewModel.setWaitLoadingStatus(messagesViewModel?.loading);
756
+ const timeoutId = setTimeout(() => {
757
+ dialogsViewModel.setWaitLoadingStatus(false); // wait only for 3 sec
758
+ }, 3000);
759
+
760
+ return () => clearTimeout(timeoutId);
761
+ }
762
+
763
+ return () => {
764
+ // Placeholder: Cleanup handler is not required
765
+ };
766
+ }, [messagesViewModel?.loading]);
767
+ //
768
+ function prepareFirstPage(initData: MessageEntity[]) {
769
+ const firstPageSize = messagesViewModel.messages.length;
770
+
771
+ for (let i = firstPageSize - 1; i >= 0; i -= 1) {
772
+ initData.push(messagesViewModel.messages[i]);
773
+ }
774
+ }
775
+
776
+ const ChangeFileHandler = (event: React.ChangeEvent<HTMLInputElement>) => {
777
+ const reader = new FileReader();
778
+ const file = event.currentTarget.files
779
+ ? event.currentTarget.files[0]
780
+ : null;
781
+
782
+ reader.onloadend = () => {
783
+ setFileToSend(file);
784
+ };
785
+
786
+ if (file !== null) reader.readAsDataURL(file);
787
+ };
788
+
789
+ const fetchMoreData = () => {
790
+ if (messagesToView.length >= dialogMessagesCount) {
791
+ setHasMore(false);
792
+
793
+ return;
794
+ }
795
+ if (
796
+ hasMore &&
797
+ messagesToView.length > 0 &&
798
+ messagesToView.length < dialogMessagesCount
799
+ ) {
800
+ setMessagesToView((prevState) => {
801
+ const newState = [...prevState];
802
+
803
+ const newMessageEntity: MessageEntity =
804
+ messagesViewModel.messages[prevState.length];
805
+
806
+ newState.push(newMessageEntity);
807
+ // newState.unshift(newMessageEntity);
808
+
809
+ return newState;
810
+ });
811
+ }
812
+ };
813
+
814
+ //
815
+ useEffect(() => {
816
+ setDialogMessageCount(messagesViewModel?.messages?.length || 0);
817
+ if (messagesToView?.length === 0 && messagesViewModel.messages.length > 0) {
818
+ const initData: MessageEntity[] = [];
819
+
820
+ console.log(JSON.stringify(messagesViewModel.messages));
821
+ prepareFirstPage(initData);
822
+ setMessagesToView(initData);
823
+ } else if (messagesViewModel.messages.length - messagesToView.length >= 1) {
824
+ setHasMore(true);
825
+ setScrollUpToDown(true);
826
+ }
827
+ }, [messagesViewModel.messages]);
828
+ //
829
+ useEffect(() => {
830
+ if (messagesViewModel.messages.length - messagesToView.length >= 1) {
831
+ fetchMoreData();
832
+ }
833
+ }, [dialogMessagesCount]);
834
+ //
835
+ //
836
+ const maxWidthToResizing =
837
+ selectedDialog && needDialogInformation
838
+ ? '$message-view-container-wrapper-min-width'
839
+ : '1040px';
840
+
841
+ const handleOnReply = (message: MessageEntity): void => {
842
+ setMessagesToReply([message]);
843
+ setShowReplyMessage(true);
844
+ };
845
+
846
+ const handleSendData = (
847
+ dialogsForForward: DialogEntity[],
848
+ messagesForForward: MessageEntity[],
849
+ relatedText: string,
850
+ ) => {
851
+ const forwardingData: ForwardMessagesParams = {
852
+ messagesToForward: messagesForForward,
853
+ targetDialogs: dialogsForForward,
854
+ relatedTextMessage:
855
+ relatedText || MessageDTOMapper.FORWARD_MESSAGE_PREFIX,
856
+ };
857
+
858
+ messagesViewModel
859
+ .sendForwardedMessages(forwardingData)
860
+ .then((opResult: boolean) => {
861
+ if (opResult) {
862
+ toast('Message have been forwarded');
863
+ } else {
864
+ toast('Message have not been forwarded');
865
+ }
866
+ forwardMessageModal.toggleModal();
867
+
868
+ return null;
869
+ })
870
+ .catch((reason) => {
871
+ const errorMessage = stringifyError(reason);
872
+
873
+ forwardMessageModal.toggleModal();
874
+ showErrorMessage(errorMessage);
875
+ });
876
+ };
877
+
878
+ function getSectionData(messages2View: MessageEntity[]) {
879
+ const groupMessages: { [date: string]: MessageEntity[] } = {};
880
+
881
+ messages2View.forEach((message) => {
882
+ const date = new Date(message.created_at);
883
+
884
+ date.setUTCHours(0, 0, 0, 0);
885
+
886
+ const dateString = date.toISOString();
887
+
888
+ groupMessages[dateString] = [
889
+ ...(groupMessages[dateString] || []),
890
+ message,
891
+ ];
892
+ });
893
+ Object.keys(groupMessages).forEach((date) => {
894
+ groupMessages[date].sort((a, b) => a.date_sent - b.date_sent);
895
+ });
896
+ const sections: SectionItem<MessageEntity>[] = Object.keys(
897
+ groupMessages,
898
+ ).map((date) => ({
899
+ title: date,
900
+ data: { [date]: groupMessages[date] },
901
+ }));
902
+
903
+ return sections;
904
+ }
905
+
906
+ const [showDialogList, setShowDialogList] = useState<boolean>(true);
907
+ const [showDialogMessages, setShowDialogMessages] = useState<boolean>(true);
908
+ const [showDialogInformation, setShowDialogInformation] =
909
+ useState<boolean>(false);
910
+ //
911
+ const [isAllMembersShow, setIsAllMembersShow] = React.useState(false);
912
+
913
+ useEffect(() => {
914
+ if (isMobile) {
915
+ if (!selectedDialog) {
916
+ setShowDialogList(true);
917
+ } else {
918
+ setShowDialogList(false);
919
+ }
920
+ const canShowMessages =
921
+ selectedDialog && !(showDialogInformation && needDialogInformation);
922
+
923
+ if (canShowMessages) {
924
+ setShowDialogMessages(true);
925
+ } else {
926
+ setShowDialogMessages(false);
927
+ }
928
+ if (selectedDialog && showDialogInformation)
929
+ setShowDialogInformation(true);
930
+ else setShowDialogInformation(false);
931
+ } else {
932
+ setShowDialogList(true);
933
+ setShowDialogMessages(true);
934
+ setShowDialogInformation(true);
935
+ }
936
+ //
937
+ const sizeChangingLogString = `SIZE INFO: height: ${height.toString()} clientHeight: ${clientHeight} width: ${width.toString()} breakpont: ${breakpoint.toString()} isMobile:
938
+ ${isMobile?.toString()} selectedDialog:
939
+ ${selectedDialog ? 'true' : 'false'} showDialogMessages:
940
+ ${showDialogMessages?.toString()} showDialogList:
941
+ ${showDialogList?.toString()} showDialogInformation:
942
+ ${showDialogInformation?.toString()}`;
943
+
944
+ console.log(sizeChangingLogString);
945
+ }, [isMobile]);
946
+
947
+ useEffect(() => {
948
+ if (selectedDialog && selectedDialog) {
949
+ dialogsViewModel.entity = selectedDialog;
950
+ userViewModel.entity = selectedDialog;
951
+
952
+ if (isMobile) {
953
+ setShowDialogList(false);
954
+ setShowDialogMessages(true);
955
+ }
956
+ } else {
957
+ setShowDialogList(true);
958
+ }
959
+ }, [selectedDialog]);
960
+
961
+ useEffect(() => {
962
+ if (userViewModel.entity) {
963
+ userViewModel.getUsers();
964
+ }
965
+ }, [userViewModel.entity]);
966
+
967
+ useEffect(() => {
968
+ if (isMobile) {
969
+ if (needDialogInformation) {
970
+ setShowDialogMessages(false);
971
+ setShowDialogInformation(true);
972
+ } else {
973
+ setShowDialogMessages(true);
974
+ setShowDialogInformation(false);
975
+ }
976
+ }
977
+ }, [needDialogInformation]);
978
+
979
+ const handleHeightChange = (newHeight: number) => {
980
+ console.log('The new height is:', newHeight);
981
+ setClientHeight(newHeight);
982
+ };
983
+ const workHeight = isMobile
984
+ ? `calc(${height.toString()}px - ${uikitHeightOffset} - 28px)`
985
+ : `calc(100vh - ${uikitHeightOffset} - 28px)`;
986
+
987
+ const [dialogToLeave, setDialogToLeave] = useState<DialogEntity>();
988
+ const leaveDialogHandler = (dialog: DialogEntity) => {
989
+ setDialogToLeave(dialog);
990
+ };
991
+
992
+ const [isOpen, setIsOpen] = useState(false);
993
+
994
+ const handleDialogOnClick = () => {
995
+ if (isOpen) {
996
+ setDialogToLeave(undefined);
997
+ }
998
+ setIsOpen((state) => !state);
999
+ };
1000
+
1001
+ useEffect(() => {
1002
+ if (dialogToLeave) {
1003
+ handleDialogOnClick();
1004
+ }
1005
+ }, [dialogToLeave]);
1006
+
1007
+ const handleLeaveDialog = () => {
1008
+ if (dialogToLeave) {
1009
+ dialogsViewModel
1010
+ .deleteDialog(dialogToLeave as GroupDialogEntity)
1011
+ .then((result) => {
1012
+ // eslint-disable-next-line promise/always-return
1013
+ if (!result) {
1014
+ toast('Dialog have not been left');
1015
+ }
1016
+ handleDialogOnClick();
1017
+ })
1018
+ .catch((e) => {
1019
+ console.log(e);
1020
+ toast("Can't leave dialog");
1021
+ });
1022
+ }
1023
+ };
1024
+ // eslint-disable-next-line react/prop-types,@typescript-eslint/no-unused-vars
1025
+ const defaultGetSenderName: GetUserNameFct = async (props: {
1026
+ userId?: number;
1027
+ sender?: UserEntity;
1028
+ }): Promise<string | undefined> => {
1029
+ let result = 'undefined user';
1030
+
1031
+ // eslint-disable-next-line react/prop-types
1032
+ if (!props.sender) {
1033
+ // eslint-disable-next-line react/prop-types
1034
+ if (props.userId && props.userId > 0) {
1035
+ // eslint-disable-next-line react/prop-types,@typescript-eslint/no-unsafe-call
1036
+ const senderUser = await userViewModel.getUserById(props.userId);
1037
+
1038
+ if (!senderUser) {
1039
+ return result;
1040
+ }
1041
+ result =
1042
+ senderUser.full_name ||
1043
+ senderUser.login ||
1044
+ senderUser.email ||
1045
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
1046
+ senderUser.id.toString();
1047
+ } else return result;
1048
+ } else {
1049
+ result =
1050
+ // eslint-disable-next-line react/prop-types
1051
+ props.sender.full_name ||
1052
+ // eslint-disable-next-line react/prop-types
1053
+ props.sender.login ||
1054
+ // eslint-disable-next-line react/prop-types
1055
+ props.sender.email ||
1056
+ // eslint-disable-next-line react/prop-types
1057
+ props.sender.id.toString();
1058
+ }
1059
+
1060
+ return result;
1061
+ };
1062
+ const messagesContainerMobileHeight = showReplyMessage
1063
+ ? `calc(${clientHeight}px - 128px - 64px - 16px)`
1064
+ : `calc(${clientHeight}px - 128px - 16px)`;
1065
+ const messagesContainerHeight = showReplyMessage
1066
+ ? `calc(${clientHeight}px - 128px - 64px)`
1067
+ : `calc(${clientHeight}px - 128px - 1px)`;
1068
+ const clientContainerHeight = `${clientHeight - 5}px`;
1069
+ const headerHeight = 64;
1070
+ const dialogListScrollableHeight = clientHeight - headerHeight - 6;
1071
+
1072
+ const newModal = useModal();
1073
+
1074
+ return (
1075
+ <ToastProvider>
1076
+ <div>
1077
+ {/* <div style={{ height: '18px', border: '1px solid red' }}> */}
1078
+ {/* h:{height},w:{width},ch:{clientHeight},wh:{workHeight} */}
1079
+ {/* </div> */}
1080
+ <DesktopLayout
1081
+ mainContainerStyles={{
1082
+ minHeight: workHeight,
1083
+ maxHeight: workHeight,
1084
+ }}
1085
+ onHeightChange={handleHeightChange}
1086
+ theme={theme}
1087
+ dialogsView={
1088
+ showDialogList ? (
1089
+ <DialogList
1090
+ scrollableHeight={dialogListScrollableHeight}
1091
+ // subHeaderContent={<CompanyLogo />}
1092
+ // upHeaderContent={<CompanyLogo />}
1093
+ dialogListViewModel={dialogsViewModel} // 1 Get 2 Update UseCase
1094
+ selectedDialog={dialogsViewModel.entity}
1095
+ onDialogSelected={selectDialogActions}
1096
+ onCreateDialog={() => newModal.toggleModal()}
1097
+ onLeaveDialog={leaveDialogHandler}
1098
+ additionalSettings={{
1099
+ withoutHeader: false,
1100
+ themeHeader: theme,
1101
+ themePreview: theme,
1102
+ useSubHeader: false,
1103
+ useUpHeader: false,
1104
+ }}
1105
+ />
1106
+ ) : null
1107
+ }
1108
+ dialogMessagesView={
1109
+ showDialogMessages &&
1110
+ selectedDialog &&
1111
+ selectedDialog &&
1112
+ dialogsViewModel.entity ? (
1113
+ <Dialog
1114
+ rootStyles={{
1115
+ minHeight: clientContainerHeight,
1116
+ maxHeight: clientContainerHeight,
1117
+ }}
1118
+ messagesContainerStyles={
1119
+ isMobile
1120
+ ? {
1121
+ minHeight: messagesContainerMobileHeight,
1122
+ maxHeight: messagesContainerMobileHeight,
1123
+ }
1124
+ : {
1125
+ minHeight: messagesContainerHeight,
1126
+ maxHeight: messagesContainerHeight,
1127
+ }
1128
+ }
1129
+ messagesViewModel={messagesViewModel}
1130
+ warningErrorText={warningErrorText}
1131
+ // subHeaderContent={<CompanyLogo />}
1132
+ // upHeaderContent={<CompanyLogo />}
1133
+ renderHeader={
1134
+ <Header
1135
+ title={dialogsViewModel.entity.name}
1136
+ avatar={renderIconForTypeDialog(dialogsViewModel.entity)}
1137
+ onGoBack={() => setSelectedDialog(undefined)}
1138
+ className="dialog-header__line"
1139
+ >
1140
+ <div className="dialog-header-right">
1141
+ <InformationSvg
1142
+ className="dialog-header-right__icon"
1143
+ onClick={informationOpenHandler}
1144
+ />
1145
+ </div>
1146
+ </Header>
1147
+ }
1148
+ renderMessageList={
1149
+ messagesViewModel &&
1150
+ messagesViewModel.messages &&
1151
+ messagesViewModel.messages.length > 0 &&
1152
+ messagesToView &&
1153
+ messagesToView.length > 0 && (
1154
+ <SectionList
1155
+ resetScroll={scrollUpToDown}
1156
+ className="messages-container"
1157
+ onEndReached={fetchMoreData}
1158
+ onEndReachedThreshold={0.95}
1159
+ refreshing={messagesViewModel?.loading}
1160
+ renderSectionHeader={(section) => (
1161
+ <div className="message-view-container--system-message-wrapper">
1162
+ <div
1163
+ style={
1164
+ theme
1165
+ ? { backgroundColor: theme.disabledElements() }
1166
+ : {}
1167
+ }
1168
+ className="message-view-container--system-message-wrapper__date_container"
1169
+ >
1170
+ <MessageSeparator
1171
+ text={section.title}
1172
+ type="date"
1173
+ />
1174
+ </div>
1175
+ </div>
1176
+ )}
1177
+ renderItem={([, groupMessages], listRef) =>
1178
+ groupMessages.map((message) => (
1179
+ <MessageItem
1180
+ // defaultGetSenderName={defaultGetSenderName}
1181
+ message={message}
1182
+ userId={userId || -1}
1183
+ enableForwarding={enableForwarding}
1184
+ enableReplying={enableReplying}
1185
+ onReply={(m: MessageEntity) => {
1186
+ handleOnReply(m);
1187
+ }}
1188
+ onForward={(m: MessageEntity) => {
1189
+ setForwardMessage(m);
1190
+ forwardMessageModal.toggleModal();
1191
+ }}
1192
+ listRef={listRef}
1193
+ AIAssistWidget={defaultAIAssistWidget}
1194
+ AITranslateWidget={defaultAITranslateWidget}
1195
+ languagesForAITranslate={DefaultConfigurations.getAdditionalLanguagesForAITranslate(
1196
+ currentContext.InitParams.qbConfig.configAIApi
1197
+ .AITranslateWidgetConfig,
1198
+ )}
1199
+ defaultTranslationLanguage={DefaultConfigurations.getDefaultLanguageForAITranslate(
1200
+ currentContext.InitParams.qbConfig.configAIApi
1201
+ .AITranslateWidgetConfig,
1202
+ )}
1203
+ onError={(messageError: string) => {
1204
+ toast(messageError);
1205
+ }}
1206
+ messagesToView={messagesToView}
1207
+ maxTokens={maxTokensForAIRephrase}
1208
+ />
1209
+ ))
1210
+ }
1211
+ sections={getSectionData(messagesToView)}
1212
+ />
1213
+ )
1214
+ }
1215
+ renderMessageInput={
1216
+ <MessageInput
1217
+ previewMessage={
1218
+ showReplyMessage ? (
1219
+ <ReplyMessagePreview
1220
+ messages={[...messagesToReply]}
1221
+ userNameSentMessage={
1222
+ messagesToReply[0]?.sender?.full_name ||
1223
+ messagesToReply[0]?.sender?.login ||
1224
+ messagesToReply[0]?.sender?.email ||
1225
+ messagesToReply[0]?.sender?.id.toString() ||
1226
+ ''
1227
+ }
1228
+ onClose={closeReplyMessageFlowHandler}
1229
+ />
1230
+ ) : undefined
1231
+ }
1232
+ value={messageText}
1233
+ placeholder="Type message"
1234
+ loading={waitAIWidget || messagesViewModel?.loading}
1235
+ onChange={(text: string) => {
1236
+ setMessageText(text);
1237
+ }}
1238
+ onChanging={() => {
1239
+ messagesViewModel.sendTypingTextMessage();
1240
+ }}
1241
+ onSend={(textToSend: string) => {
1242
+ sendTextMessageActions(textToSend);
1243
+ }}
1244
+ onAttachment={ChangeFileHandler}
1245
+ enableVoice={isRecording}
1246
+ onVoice={() => {
1247
+ if (messagesViewModel?.loading) return;
1248
+ setIsRecording(!isRecording);
1249
+ }}
1250
+ rephrase={
1251
+ <AIRephraseWidget
1252
+ waitAIWidget={waitAIWidget}
1253
+ messageText={messageText}
1254
+ theme={theme}
1255
+ AIRephrase={defaultAIRephraseWidget}
1256
+ setWaitAIWidget={setWaitAIWidget}
1257
+ setPrevValueText={(prevValue) => {
1258
+ setMessageText(prevValue);
1259
+ }}
1260
+ setMessageErrorToast={(e: string) => {
1261
+ toast(e);
1262
+ }}
1263
+ messagesToView={messagesToView}
1264
+ currentUserId={userId || -1}
1265
+ maxTokensForAIRephrase={maxTokensForAIRephrase}
1266
+ rephraseTones={rephraseTones}
1267
+ />
1268
+ }
1269
+ />
1270
+ }
1271
+ maxWidthToResize={maxWidthToResizing}
1272
+ theme={theme}
1273
+ />
1274
+ ) : (
1275
+ !isMobile && (
1276
+ <div
1277
+ className="empty-chat-placeholder"
1278
+ style={{
1279
+ minHeight: clientContainerHeight,
1280
+ maxHeight: clientContainerHeight,
1281
+ }}
1282
+ >
1283
+ <Placeholder
1284
+ text={['Select a chat to start messaging.']}
1285
+ className="empty-chat-history-placeholder"
1286
+ />
1287
+ </div>
1288
+ )
1289
+ )
1290
+ }
1291
+ dialogInfoView={
1292
+ showDialogInformation &&
1293
+ selectedDialog &&
1294
+ needDialogInformation &&
1295
+ (isAllMembersShow ? (
1296
+ <MembersList
1297
+ closeInformationHandler={() => {
1298
+ setIsAllMembersShow(false);
1299
+ }}
1300
+ members={userViewModel.users}
1301
+ maxHeight={dialogListScrollableHeight}
1302
+ />
1303
+ ) : (
1304
+ <DialogInfo
1305
+ onShowAllMemberClick={(value: boolean) => {
1306
+ setIsAllMembersShow(value);
1307
+ }}
1308
+ users={userViewModel.users}
1309
+ rootStyles={{
1310
+ minHeight: clientContainerHeight,
1311
+ maxHeight: clientContainerHeight,
1312
+ }}
1313
+ // subHeaderContent={<CompanyLogo />}
1314
+ // upHeaderContent={<CompanyLogo />}
1315
+ dialog={selectedDialog}
1316
+ dialogViewModel={dialogsViewModel}
1317
+ onCloseDialogInformationHandler={informationCloseHandler}
1318
+ />
1319
+ ))
1320
+ }
1321
+ />
1322
+ <DialogWindow
1323
+ open={isOpen}
1324
+ title="Leave dialog?"
1325
+ onClose={handleDialogOnClick}
1326
+ >
1327
+ <div className="dialog-leave-container">
1328
+ <Button variant="outlined" onClick={handleDialogOnClick}>
1329
+ Cancel
1330
+ </Button>
1331
+ <Button variant="danger" onClick={handleLeaveDialog}>
1332
+ Leave
1333
+ </Button>
1334
+ </div>
1335
+ </DialogWindow>
1336
+ <DialogWindow
1337
+ title="New dialog"
1338
+ onClose={newModal.toggleModal}
1339
+ open={newModal.isOpen}
1340
+ className={
1341
+ isMobile
1342
+ ? 'dialog-list-new-dialog-mobile-container'
1343
+ : 'dialog-list-new-dialog-desktop-container'
1344
+ }
1345
+ >
1346
+ <CreateNewDialogFlow
1347
+ dialogsViewModel={dialogsViewModel}
1348
+ onCancel={newModal.toggleModal}
1349
+ onFinished={() => {
1350
+ newModal.toggleModal();
1351
+ }}
1352
+ />
1353
+ </DialogWindow>
1354
+ {selectedDialog && (
1355
+ <DialogWindow
1356
+ title="Forward"
1357
+ open={forwardMessageModal.isOpen}
1358
+ onClose={forwardMessageModal.toggleModal}
1359
+ >
1360
+ <ForwardMessageFlow
1361
+ messages={[forwardMessage!]}
1362
+ currentDialog={selectedDialog}
1363
+ currentUserName={userName || ''}
1364
+ dialogs={dialogsViewModel.dialogs}
1365
+ onSendData={handleSendData}
1366
+ />
1367
+ </DialogWindow>
1368
+ )}
1369
+ </div>
1370
+ </ToastProvider>
1371
+ );
1372
+ };
1373
+
1374
+ export default QuickBloxUIKitDesktopLayout;