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.
- package/.prettierignore +4 -0
- package/.prettierrc +10 -0
- package/.storybook/main.ts +26 -0
- package/.storybook/preview.ts +16 -0
- package/README.md +5 -1
- package/dist/Data/Stubs.d.ts +1 -0
- package/dist/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.d.ts +16 -0
- package/dist/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.d.ts +20 -0
- package/dist/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.d.ts +0 -1
- package/dist/Presentation/Views/Dialog/Dialog.d.ts +0 -4
- package/dist/Presentation/Views/Dialog/DialogHeader/DialogBackIcon/DialogBackIcon.d.ts +8 -0
- package/dist/Presentation/Views/Dialog/DialogHeader/{RenderRightActions/RenderRightActions.d.ts → DialogInfoIcon/DialogInfoIcon.d.ts} +3 -3
- package/dist/Presentation/Views/Dialog/{MessageInput/MessageInput.d.ts → InputMessage/InputMessage.d.ts} +2 -2
- package/dist/Presentation/Views/Dialog/Message/OutgoinForwardedMessage/OutgoinForwardedMessage.d.ts +1 -1
- package/dist/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.d.ts +12 -0
- package/dist/Presentation/Views/Dialog/MessageItem/MessageItem.d.ts +22 -0
- package/dist/Presentation/Views/DialogInfo/DialogInfo.d.ts +0 -1
- package/dist/Presentation/Views/DialogList/DialogList.d.ts +8 -4
- package/dist/Presentation/Views/Flow/CreateDialog/CreateDialog.d.ts +6 -6
- package/dist/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.d.ts +3 -0
- package/dist/Presentation/Views/YesNoQuestion/YesNoQuestion.d.ts +3 -4
- package/dist/Presentation/components/UI/Buttons/MainButton/MainButton.d.ts +1 -1
- package/dist/Presentation/components/containers/SectionList/useComponent.d.ts +3 -3
- package/dist/Presentation/icons/actions/index.d.ts +26 -0
- package/dist/Presentation/icons/contents/index.d.ts +13 -0
- package/dist/Presentation/icons/index.d.ts +7 -0
- package/dist/Presentation/icons/media/index.d.ts +12 -0
- package/dist/Presentation/icons/moderation/index.d.ts +5 -0
- package/dist/Presentation/icons/navigation/index.d.ts +12 -0
- package/dist/Presentation/icons/status/index.d.ts +7 -0
- package/dist/Presentation/icons/toggle/index.d.ts +23 -0
- package/dist/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.d.ts +1 -0
- package/dist/Presentation/ui-components/Avatar/Avatar.d.ts +9 -0
- package/dist/Presentation/ui-components/Avatar/avatar.stories.d.ts +8 -0
- package/dist/Presentation/ui-components/Badge/Badge.d.ts +10 -0
- package/dist/Presentation/ui-components/Badge/Badge.stories.d.ts +8 -0
- package/dist/Presentation/ui-components/Button/Button.d.ts +12 -0
- package/dist/Presentation/ui-components/Button/Button.stories.d.ts +83 -0
- package/dist/Presentation/ui-components/CheckBox/CheckBox.d.ts +9 -0
- package/dist/Presentation/ui-components/DialogBanner/DialogBanner.d.ts +8 -0
- package/dist/Presentation/ui-components/DialogBanner/DialogBanner.stories.d.ts +34 -0
- package/dist/Presentation/ui-components/DialogItemPreview/DialogItemPreview.d.ts +16 -0
- package/dist/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.d.ts +9 -0
- package/dist/Presentation/ui-components/DialogWindow/DialogWindow.d.ts +11 -0
- package/dist/Presentation/ui-components/DialogWindow/DialogWindow.stories.d.ts +6 -0
- package/dist/Presentation/ui-components/Dropdown/Dropdown.d.ts +12 -0
- package/dist/Presentation/ui-components/Dropdown/Dropdown.stories.d.ts +29 -0
- package/dist/Presentation/ui-components/Dropdown/DropdownOption.d.ts +12 -0
- package/dist/Presentation/ui-components/Header/Header.d.ts +13 -0
- package/dist/Presentation/ui-components/Header/Header.stories.d.ts +9 -0
- package/dist/Presentation/ui-components/Loader/Loader.d.ts +8 -0
- package/dist/Presentation/ui-components/Loader/Loader.stories.d.ts +44 -0
- package/dist/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.d.ts +8 -0
- package/dist/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.d.ts +11 -0
- package/dist/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.d.ts +9 -0
- package/dist/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.d.ts +8 -0
- package/dist/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.d.ts +8 -0
- package/dist/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.d.ts +9 -0
- package/dist/Presentation/ui-components/Message/FileUrl/FileUrl.d.ts +8 -0
- package/dist/Presentation/ui-components/Message/Message.d.ts +18 -0
- package/dist/Presentation/ui-components/Message/Message.stories.d.ts +8 -0
- package/dist/Presentation/ui-components/Message/MessageCaption/MessageCaption.d.ts +9 -0
- package/dist/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.d.ts +8 -0
- package/dist/Presentation/ui-components/MessageInput/MessageInput.d.ts +20 -0
- package/dist/Presentation/ui-components/MessageInput/MessageInput.stories.d.ts +8 -0
- package/dist/Presentation/ui-components/MessageSeparator/MessageSeparator.d.ts +8 -0
- package/dist/Presentation/ui-components/MessageSeparator/MessageSeparator.stories.d.ts +44 -0
- package/dist/Presentation/ui-components/Placeholder/Placeholder.d.ts +10 -0
- package/dist/Presentation/ui-components/Placeholder/Placeholder.stories.d.ts +7 -0
- package/dist/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.d.ts +9 -0
- package/dist/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.stories.d.ts +9 -0
- package/dist/Presentation/ui-components/SettingsItem/SettingsItem.d.ts +12 -0
- package/dist/Presentation/ui-components/SettingsItem/SettingsItem.stories.d.ts +8 -0
- package/dist/Presentation/ui-components/TextField/TextField.d.ts +13 -0
- package/dist/Presentation/ui-components/TextField/TextField.stories.d.ts +8 -0
- package/dist/Presentation/ui-components/Toast/Toast.stories.d.ts +6 -0
- package/dist/Presentation/ui-components/Toast/ToastProvider.d.ts +8 -0
- package/dist/Presentation/ui-components/UserListItem/UserListItem.d.ts +11 -0
- package/dist/Presentation/ui-components/UserListItem/UserListItem.stories.d.ts +86 -0
- package/dist/Presentation/ui-components/index.d.ts +19 -0
- package/dist/hooks/useModal.d.ts +5 -0
- package/dist/index-ui.js +16525 -14748
- package/dist/index-ui.js.map +1 -1
- package/package.json +32 -34
- package/public/favicon.ico +0 -0
- package/public/index.html +47 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/quickblox.js +54609 -0
- package/public/robots.txt +3 -0
- package/src/App.scss +0 -0
- package/src/App.tsx +231 -0
- package/src/CommonTypes/BaseViewModel.ts +95 -0
- package/src/CommonTypes/FunctionResult.ts +66 -0
- package/src/Data/Creator.ts +105 -0
- package/src/Data/DefaultConfigurations.ts +270 -0
- package/src/Data/Stubs.ts +1242 -0
- package/src/Data/dto/dialog/LocalDialogDTO.ts +42 -0
- package/src/Data/dto/dialog/LocalDialogsDTO.ts +21 -0
- package/src/Data/dto/dialog/RemoteDialogDTO.ts +58 -0
- package/src/Data/dto/dialog/RemoteDialogsDTO.ts +21 -0
- package/src/Data/dto/file/LocalFileDTO.ts +26 -0
- package/src/Data/dto/file/RemoteFileDTO.ts +26 -0
- package/src/Data/dto/message/LocalMessageDTO.ts +49 -0
- package/src/Data/dto/message/LocalMessagesDTO.ts +21 -0
- package/src/Data/dto/message/RemoteMessageDTO.ts +57 -0
- package/src/Data/dto/message/RemoteMessagesDTO.ts +21 -0
- package/src/Data/dto/user/LocalUserDTO.ts +37 -0
- package/src/Data/dto/user/LocalUsersDTO.ts +21 -0
- package/src/Data/dto/user/RemoteUserDTO.ts +37 -0
- package/src/Data/dto/user/RemoteUsersDTO.ts +21 -0
- package/src/Data/mapper/DialogLocalDTOMapper.ts +742 -0
- package/src/Data/mapper/DialogRemoteDTOMapper.ts +741 -0
- package/src/Data/mapper/FileLocalDTOMapper.ts +216 -0
- package/src/Data/mapper/FileRemoteDTOMapper.ts +228 -0
- package/src/Data/mapper/IMapper.ts +4 -0
- package/src/Data/mapper/MessageLocalDTOMapper.ts +426 -0
- package/src/Data/mapper/MessageRemoteDTOMapper.ts +465 -0
- package/src/Data/mapper/UserLocalDTOMapper.ts +387 -0
- package/src/Data/mapper/UserRemoteDTOMapper.ts +398 -0
- package/src/Data/repository/ConnectionRepository.ts +133 -0
- package/src/Data/repository/DialogsRepository.ts +358 -0
- package/src/Data/repository/EventMessagesRepository.ts +325 -0
- package/src/Data/repository/FileRepository.ts +107 -0
- package/src/Data/repository/MessagesRepository.ts +291 -0
- package/src/Data/repository/UsersRepository.ts +297 -0
- package/src/Data/source/AISource.ts +133 -0
- package/src/Data/source/exception/LocalDataSourceException.ts +17 -0
- package/src/Data/source/exception/MapperDTOException.ts +22 -0
- package/src/Data/source/exception/RemoteDataSourceException.ts +28 -0
- package/src/Data/source/exception/RepositoryException.ts +27 -0
- package/src/Data/source/local/ChatLocalStorageDataSource.ts +260 -0
- package/src/Data/source/local/ILocalDataSource.ts +41 -0
- package/src/Data/source/local/ILocalFileDataSource.ts +11 -0
- package/src/Data/source/local/LocalDataSource.ts +353 -0
- package/src/Data/source/local/LocalFileDataSource.ts +20 -0
- package/src/Data/source/remote/IRemoteDataSource.ts +112 -0
- package/src/Data/source/remote/Mapper/DialogDTOMapper.ts +425 -0
- package/src/Data/source/remote/Mapper/FileDTOMapper.ts +270 -0
- package/src/Data/source/remote/Mapper/IDTOMapper.ts +4 -0
- package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +607 -0
- package/src/Data/source/remote/Mapper/UserDTOMapper.ts +345 -0
- package/src/Data/source/remote/RemoteDataSource.ts +1291 -0
- package/src/Domain/entity/Chat.ts +4 -0
- package/src/Domain/entity/ChatMessageAttachmentEntity.ts +15 -0
- package/src/Domain/entity/CustomDataEntity.ts +3 -0
- package/src/Domain/entity/DialogEntity.ts +15 -0
- package/src/Domain/entity/DialogEventInfo.ts +15 -0
- package/src/Domain/entity/DialogTypes.ts +7 -0
- package/src/Domain/entity/EventMessageType.ts +7 -0
- package/src/Domain/entity/FileEntity.ts +11 -0
- package/src/Domain/entity/FileTypes.ts +9 -0
- package/src/Domain/entity/GroupDialogEntity.ts +54 -0
- package/src/Domain/entity/LastMessageEntity.ts +5 -0
- package/src/Domain/entity/MessageEntity.ts +25 -0
- package/src/Domain/entity/NotificationTypes.ts +9 -0
- package/src/Domain/entity/PrivateDialogEntity.ts +46 -0
- package/src/Domain/entity/PublicDialogEntity.ts +80 -0
- package/src/Domain/entity/UserEntity.ts +23 -0
- package/src/Domain/exception/domain/DomainExecption.ts +5 -0
- package/src/Domain/repository/IDialogsRepository.ts +42 -0
- package/src/Domain/repository/IFileRepository.ts +9 -0
- package/src/Domain/repository/IMessagesRepository.ts +28 -0
- package/src/Domain/repository/IUsersRepository.ts +13 -0
- package/src/Domain/repository/Pagination.ts +48 -0
- package/src/Domain/use_cases/CreateDialogUseCase.ts +79 -0
- package/src/Domain/use_cases/ForwardMessagesUseCase.ts +73 -0
- package/src/Domain/use_cases/GetAllDialogsUseCase.ts +20 -0
- package/src/Domain/use_cases/GetAllDialogsUseCaseWithMock.ts +40 -0
- package/src/Domain/use_cases/GetAllMessagesForDialog.ts +61 -0
- package/src/Domain/use_cases/GetAllUsersUseCase.ts +34 -0
- package/src/Domain/use_cases/GetDialogByIdUseCase.ts +28 -0
- package/src/Domain/use_cases/GetUsersByIdsUseCase.ts +22 -0
- package/src/Domain/use_cases/LeaveDialogUseCase.ts +116 -0
- package/src/Domain/use_cases/RemoveUsersFromTheDialogUseCase.ts +118 -0
- package/src/Domain/use_cases/ReplyMessagesUseCase.ts +35 -0
- package/src/Domain/use_cases/SendTextMessageUseCase.ts +27 -0
- package/src/Domain/use_cases/SubscribeToDialogEventsUseCase.ts +160 -0
- package/src/Domain/use_cases/SubscribeToDialogsUpdatesUseCase.ts +68 -0
- package/src/Domain/use_cases/SubscribeToDialogsUpdatesUseCaseWithMock.ts +45 -0
- package/src/Domain/use_cases/SyncDialogsUseCase.ts +177 -0
- package/src/Domain/use_cases/UpdateDialogUseCase.ts +72 -0
- package/src/Domain/use_cases/UploadFileUseCase.ts +24 -0
- package/src/Domain/use_cases/UserTypingMessageUseCase.ts +50 -0
- package/src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts +69 -0
- package/src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts +57 -0
- package/src/Domain/use_cases/ai/AIRephraseUseCase.ts +89 -0
- package/src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts +62 -0
- package/src/Domain/use_cases/ai/AITranslateUseCase.ts +76 -0
- package/src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts +63 -0
- package/src/Domain/use_cases/base/BaseUseCase.ts +77 -0
- package/src/Domain/use_cases/base/IUseCase.ts +5 -0
- package/src/Domain/use_cases/base/Subscribable/ISubscribable.ts +6 -0
- package/src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts +144 -0
- package/src/Presentation/.gitkeep +0 -0
- package/src/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.scss +34 -0
- package/src/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.tsx +64 -0
- package/src/Presentation/Views/Dialog/AIComponents/AIAssistComponent/AIAssistComponent.scss +32 -0
- package/src/Presentation/Views/Dialog/AIComponents/AIAssistComponent/AIAssistComponent.tsx +28 -0
- package/src/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.scss +67 -0
- package/src/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.tsx +117 -0
- package/src/Presentation/Views/Dialog/AIComponents/AITranslateComponent/AITranslateComponent.scss +47 -0
- package/src/Presentation/Views/Dialog/AIComponents/AITranslateComponent/AITranslateComponent.tsx +78 -0
- package/src/Presentation/Views/Dialog/AIWidgets/AIMessageWidget.ts +40 -0
- package/src/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.scss +20 -0
- package/src/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.tsx +177 -0
- package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.scss +55 -0
- package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.tsx +122 -0
- package/src/Presentation/Views/Dialog/AIWidgets/ErrorMessageIcon.tsx +98 -0
- package/src/Presentation/Views/Dialog/AIWidgets/SliderMenu.tsx +172 -0
- package/src/Presentation/Views/Dialog/AIWidgets/Tone.ts +21 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidget.tsx +72 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.tsx +72 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx +96 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx +94 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidget.tsx +78 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidgetWithProxy.tsx +78 -0
- package/src/Presentation/Views/Dialog/AIWidgets/useDefaultVoiceInputWidget.tsx +88 -0
- package/src/Presentation/Views/Dialog/ContextMenu/ContextMenu.scss +58 -0
- package/src/Presentation/Views/Dialog/ContextMenu/ContextMenu.tsx +93 -0
- package/src/Presentation/Views/Dialog/Dialog.scss +368 -0
- package/src/Presentation/Views/Dialog/Dialog.tsx +100 -0
- package/src/Presentation/Views/Dialog/DialogHeader/DialogBackIcon/DialogBackIcon.scss +29 -0
- package/src/Presentation/Views/Dialog/DialogHeader/DialogBackIcon/DialogBackIcon.tsx +34 -0
- package/src/Presentation/Views/Dialog/DialogHeader/DialogHeader.scss +114 -0
- package/src/Presentation/Views/Dialog/DialogHeader/DialogHeader.tsx +51 -0
- package/src/Presentation/Views/Dialog/DialogHeader/DialogInfoIcon/DialogInfoIcon.scss +53 -0
- package/src/Presentation/Views/Dialog/DialogHeader/DialogInfoIcon/DialogInfoIcon.tsx +58 -0
- package/src/Presentation/Views/Dialog/DialogViewModel.ts +24 -0
- package/src/Presentation/Views/Dialog/DropDownMenu/DropDownMenu.scss +84 -0
- package/src/Presentation/Views/Dialog/DropDownMenu/DropDownMenu.tsx +105 -0
- package/src/Presentation/Views/Dialog/DropDownMenu/ItemDropDownMenu/ItemDropDownMenu.scss +50 -0
- package/src/Presentation/Views/Dialog/DropDownMenu/ItemDropDownMenu/ItemDropDownMenu.tsx +43 -0
- package/src/Presentation/Views/Dialog/ErrorToast/ErrorToast.scss +26 -0
- package/src/Presentation/Views/Dialog/ErrorToast/ErrorToast.tsx +23 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.scss +74 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.tsx +96 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.scss +40 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.tsx +98 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/SearchComponent/SearchComponent.scss +98 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/SearchComponent/SearchComponent.tsx +65 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.scss +159 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.tsx +118 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessagePreview/ForwardMessagePreview.scss +100 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessagePreview/ForwardMessagePreview.tsx +90 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.scss +65 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.tsx +47 -0
- package/src/Presentation/Views/Dialog/InputMessage/InputMessage.scss +92 -0
- package/src/Presentation/Views/Dialog/InputMessage/InputMessage.tsx +145 -0
- package/src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.scss +97 -0
- package/src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.tsx +114 -0
- package/src/Presentation/Views/Dialog/Message/IncomingForwardedMessage/IncomingForwardedMessage.scss +250 -0
- package/src/Presentation/Views/Dialog/Message/IncomingForwardedMessage/IncomingForwardedMessage.tsx +290 -0
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.scss +22 -0
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.tsx +32 -0
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/IncomingMessage.scss +241 -0
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/IncomingMessage.tsx +316 -0
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/MessageContentComponent/MessageContentComponent.scss +4 -0
- package/src/Presentation/Views/Dialog/Message/IncomingMessage/MessageContentComponent/MessageContentComponent.tsx +67 -0
- package/src/Presentation/Views/Dialog/Message/IncomingRepliedMessage/IncomingRepliedMessage.scss +250 -0
- package/src/Presentation/Views/Dialog/Message/IncomingRepliedMessage/IncomingRepliedMessage.tsx +298 -0
- package/src/Presentation/Views/Dialog/Message/Message.tsx +378 -0
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.scss +31 -0
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.tsx +155 -0
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/DefaultAttachment/DefaultAttachment.scss +76 -0
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/DefaultAttachment/DefaultAttachment.tsx +50 -0
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/ImageAttachment/ImageAttachment.scss +14 -0
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/ImageAttachment/ImageAttachment.tsx +50 -0
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/MessageAttachment.tsx +92 -0
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/VideoAttachment/VideoAttachment.scss +18 -0
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/VideoAttachment/VideoAttachment.tsx +58 -0
- package/src/Presentation/Views/Dialog/Message/MessageContextMenu/MessageContextMenu.scss +10 -0
- package/src/Presentation/Views/Dialog/Message/MessageContextMenu/MessageContextMenu.tsx +61 -0
- package/src/Presentation/Views/Dialog/Message/OutgoinForwardedMessage/OutgoinForwardedMessage.scss +160 -0
- package/src/Presentation/Views/Dialog/Message/OutgoinForwardedMessage/OutgoinForwardedMessage.tsx +133 -0
- package/src/Presentation/Views/Dialog/Message/OutgoingMessage/OutgoingMessage.scss +122 -0
- package/src/Presentation/Views/Dialog/Message/OutgoingMessage/OutgoingMessage.tsx +104 -0
- package/src/Presentation/Views/Dialog/Message/OutgoingRepliedMessage/OutgoingRepliedMessage.scss +155 -0
- package/src/Presentation/Views/Dialog/Message/OutgoingRepliedMessage/OutgoingRepliedMessage.tsx +103 -0
- package/src/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.scss +19 -0
- package/src/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.tsx +67 -0
- package/src/Presentation/Views/Dialog/MessageItem/MessageItem.scss +21 -0
- package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +364 -0
- package/src/Presentation/Views/Dialog/SystemDateBanner/SystemDateBanner.scss +23 -0
- package/src/Presentation/Views/Dialog/SystemDateBanner/SystemDateBanner.tsx +17 -0
- package/src/Presentation/Views/Dialog/SystemMessageBanner/SystemMessageBanner.scss +21 -0
- package/src/Presentation/Views/Dialog/SystemMessageBanner/SystemMessageBanner.tsx +17 -0
- package/src/Presentation/Views/Dialog/VoiceMessage/VoiceMessage.tsx +21 -0
- package/src/Presentation/Views/Dialog/useDialogViewModel.ts +838 -0
- package/src/Presentation/Views/DialogInfo/DialogInfo.scss +235 -0
- package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +450 -0
- package/src/Presentation/Views/DialogInfo/DialogMemberButton/DialogMembersButton.scss +42 -0
- package/src/Presentation/Views/DialogInfo/DialogMemberButton/DialogMembersButton.tsx +26 -0
- package/src/Presentation/Views/DialogInfo/MembersList/MembersList.scss +176 -0
- package/src/Presentation/Views/DialogInfo/MembersList/MembersList.tsx +94 -0
- package/src/Presentation/Views/DialogInfo/UsersList/SingleUser/SingleUser.scss +66 -0
- package/src/Presentation/Views/DialogInfo/UsersList/SingleUser/SingleUser.tsx +71 -0
- package/src/Presentation/Views/DialogInfo/UsersList/UsersList.scss +0 -0
- package/src/Presentation/Views/DialogInfo/UsersList/UsersList.tsx +71 -0
- package/src/Presentation/Views/DialogInfo/UsersList/UsersListViewModel.ts +15 -0
- package/src/Presentation/Views/DialogInfo/UsersList/useUsersListViewModel.ts +124 -0
- package/src/Presentation/Views/DialogList/DialogList.scss +145 -0
- package/src/Presentation/Views/DialogList/DialogList.tsx +371 -0
- package/src/Presentation/Views/DialogList/DialogListViewModel.ts +25 -0
- package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +479 -0
- package/src/Presentation/Views/DialogListHeader/DialogListHeader.scss +68 -0
- package/src/Presentation/Views/DialogListHeader/DialogListHeader.tsx +90 -0
- package/src/Presentation/Views/EditDialog/EditDialog.scss +203 -0
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +267 -0
- package/src/Presentation/Views/EditDialog/UserAvatar/UserAvatar.scss +32 -0
- package/src/Presentation/Views/EditDialog/UserAvatar/UserAvatar.tsx +59 -0
- package/src/Presentation/Views/Flow/CreateDialog/CreateDialog.scss +93 -0
- package/src/Presentation/Views/Flow/CreateDialog/CreateDialog.tsx +69 -0
- package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +177 -0
- package/src/Presentation/Views/Flow/LeaveDialogFlow/LeaveDialogFlow.tsx +37 -0
- package/src/Presentation/Views/InviteMembers/InviteMembers.scss +202 -0
- package/src/Presentation/Views/InviteMembers/InviteMembers.tsx +309 -0
- package/src/Presentation/Views/InviteMembers/InviteMembersViewModel.ts +18 -0
- package/src/Presentation/Views/InviteMembers/InviteUsersList/SingleUserWithCheckBox/SingleUserWithCheckBox.scss +90 -0
- package/src/Presentation/Views/InviteMembers/InviteUsersList/SingleUserWithCheckBox/SingleUserWithCheckBox.tsx +122 -0
- package/src/Presentation/Views/InviteMembers/InviteUsersResultViewModel.ts +12 -0
- package/src/Presentation/Views/InviteMembers/NotFoundContent/NotFoundContent.scss +38 -0
- package/src/Presentation/Views/InviteMembers/NotFoundContent/NotFoundContent.tsx +22 -0
- package/src/Presentation/Views/InviteMembers/useInviteMembersViewModel.ts +143 -0
- package/src/Presentation/Views/Navigation/More.svg +7 -0
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.scss +211 -0
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +317 -0
- package/src/Presentation/Views/PreviewDialog/PreviewDialogContextMenu/PreviewDialogContextMenu.scss +9 -0
- package/src/Presentation/Views/PreviewDialog/PreviewDialogContextMenu/PreviewDialogContextMenu.tsx +59 -0
- package/src/Presentation/Views/PreviewDialog/PreviewDialogViewModel.ts +42 -0
- package/src/Presentation/Views/YesNoQuestion/YesNoQuestion.scss +11 -0
- package/src/Presentation/Views/YesNoQuestion/YesNoQuestion.tsx +48 -0
- package/src/Presentation/assets/fonts/.gitkeep +0 -0
- package/src/Presentation/assets/fonts/Roboto-Bold.eot +0 -0
- package/src/Presentation/assets/fonts/Roboto-Bold.ttf +0 -0
- package/src/Presentation/assets/fonts/Roboto-Bold.woff +0 -0
- package/src/Presentation/assets/fonts/Roboto-Bold.woff2 +0 -0
- package/src/Presentation/assets/fonts/Roboto-Medium.eot +0 -0
- package/src/Presentation/assets/fonts/Roboto-Medium.ttf +0 -0
- package/src/Presentation/assets/fonts/Roboto-Medium.woff +0 -0
- package/src/Presentation/assets/fonts/Roboto-Medium.woff2 +0 -0
- package/src/Presentation/assets/fonts/Roboto-Regular.eot +0 -0
- package/src/Presentation/assets/fonts/Roboto-Regular.ttf +0 -0
- package/src/Presentation/assets/fonts/Roboto-Regular.woff +0 -0
- package/src/Presentation/assets/fonts/Roboto-Regular.woff2 +0 -0
- package/src/Presentation/assets/img/Artem_Koltunov_Selfi.png +0 -0
- package/src/Presentation/assets/img/bee-img.png +0 -0
- package/src/Presentation/assets/img/web-doc.png +0 -0
- package/src/Presentation/components/Button.js +5 -0
- package/src/Presentation/components/Navbar.tsx +45 -0
- package/src/Presentation/components/TextInput.js +10 -0
- package/src/Presentation/components/UI/Buttons/ActiveButton/ActiveButton.tsx +40 -0
- package/src/Presentation/components/UI/Buttons/MainBoundedButton/MainBoundedButton.scss +0 -0
- package/src/Presentation/components/UI/Buttons/MainBoundedButton/MainBoundedButton.tsx +30 -0
- package/src/Presentation/components/UI/Buttons/MainButton/MainButton.css +103 -0
- package/src/Presentation/components/UI/Buttons/MainButton/MainButton.tsx +62 -0
- package/src/Presentation/components/UI/Elements/SwitchButton/SwitchButton.scss +61 -0
- package/src/Presentation/components/UI/Elements/SwitchButton/SwitchButton.tsx +48 -0
- package/src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.scss +74 -0
- package/src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.tsx +52 -0
- package/src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.scss +21 -0
- package/src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx +44 -0
- package/src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.scss +3 -0
- package/src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.tsx +45 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/Send.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx +39 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BookIcon/BookIcon.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.svg +5 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx +50 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/HammerIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/HandshakeIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/MuscleIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/NecktieIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/NeutralFaceIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PalmsUpTogetherIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PerformingArtsIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/PointUpIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/SmileyIcon/index.tsx +20 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/SmirkIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/WhiteCheckMarkIcon/index.tsx +7 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Add/Add.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Add/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/AddContact/Add contact.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/AddContact/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Archive/Archive.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Archive/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/AssistAnswer.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/index.tsx +93 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Copy/Copy.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Copy/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Delete/Delete.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Delete/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Download/Download.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Download/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Edit/Edit.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Edit/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/EditDots/EditDots.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Emoji/Emoji.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Emoji/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/ForwardFilled/Forward filled.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/ForwardFilled/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Hungup/Hungup.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Hungup/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/IncomeCall/Income call.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/IncomeCall/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Like/Like.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Like/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/NewChat/New chat.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/NewChat/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/OutcomeCall/Outcome call.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/OutcomeCall/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Phone/Phone.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Phone/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/PhoneFilled/Phone filled.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/PhoneFilled/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Remove/Remove.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Remove/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Remove2/Remove2.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Remove2/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/Reply filled.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Send/Send.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Send/index.tsx +38 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Share/Share.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Share/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Summarize/Summarize.svg +6 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Summarize/index.tsx +58 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/SwapCamera/Swap camera.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/SwapCamera/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Tone/Tone.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Tone/index.tsx +34 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Unarchive/Unarchive.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Unarchive/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/VideoIcon/Video.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/VideoIcon/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Voice/Voice.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Actions/Voice/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Brodcast/Broadcast.svg +7 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Brodcast/index.tsx +38 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Chat/Chat.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Chat/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/ChatFilled/Chat filled.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/ChatFilled/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Conference/Conference.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Conference/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Contact/Contact.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Contact/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/ContactFilled/Contact filled.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/ContactFilled/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/Group chat.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Notifications/Notifications.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Notifications/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/PrivateChat/Private chat.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/PrivateChat/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/Public channel.svg +7 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/index.tsx +67 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Stream/Stream.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/Stream/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/StreamFilled/Stream filled.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/StreamFilled/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/User/User.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Contents/User/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/IconsCommonTypes.ts +6 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/Attachment/Attachment.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/Attachment/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/AudioFile/Audio file.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/BrokenFile/Broken file.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/BrokenFile/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/Camera/Camera.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/Camera/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/GifFile/GIF file.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/GifFile/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/Image.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageFile/File.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageFile/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageFilled/Image filled.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/ImageFilled/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/LinkWeb/Link.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/LinkWeb/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/Location/Location.svg +4 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/Location/index.tsx +26 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/TextDocument/Text document.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/Translate/Translate.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/Translate/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/VideoFile/Video file.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Media/VideoFile/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Admin/Admin.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Admin/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Banned/Banned.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Banned/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Freeze/Freeze.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Freeze/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Moderations/Moderations.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Moderations/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Muted/Muted.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Moderation/Muted/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowLeft/Arrow left.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowLeft/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowRight/Arrow right.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/ArrowRight/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Back/Back.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Back/index.tsx +34 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Close/Close.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Close/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Down/Down.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Down/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Leave/Leave.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Leave/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/More/More.svg +7 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/More/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Next/Next.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Next/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Plus/Plus.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Plus/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Refresh/Refresh.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Refresh/index.tsx +36 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Search/Search.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Search/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Settings/Settings.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/Settings/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/SettingsField/Settings filled.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Navigation/SettingsField/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Error/Error.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Error/index.tsx +36 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Help/Help.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Help/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Information/Information.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Information/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/InformationFill/index.tsx +40 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Loader/Loader.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Loader/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Mention/Mention.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Mention/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Sent/Sent.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/Sent/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/ViewedDelivered/Viewed_Delivered.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Status/ViewedDelivered/index.tsx +38 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOff/Camera off.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOff/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOn/Camera on.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CameraOn/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOff/Check off.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOff/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOn/Check on.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/CheckOn/index.tsx +24 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Favourite/Favourite.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Favourite/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/FavouriteFilled/Favourite filled.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/FavouriteFilled/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/FullScreen/Full screen.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/FullScreen/inex.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Hide/Hide.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Hide/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/Play.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Louder/Louder.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Louder/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOff/Mic off.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOff/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOn/Mic on.svg +4 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/MicOn/index.tsx +26 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Minimize/Minimize.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Minimize/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/Notify off.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOn/Notify on.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOn/index.tsx +35 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Pause/Pause.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Pause/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Quite/Quite.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Quite/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Record/Record.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Record/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Screenshare/Screenshare.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Screenshare/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Show/Show.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Show/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Speaker/Speaker.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/Speaker/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/SpeakerOff/Speaker off.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/SpeakerOff/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/StopRecord/Stop record.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/StopRecord/index.tsx +22 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/StopShare/Stop share.svg +3 -0
- package/src/Presentation/components/UI/svgs/Icons/Toggle/StopShare/index.tsx +22 -0
- package/src/Presentation/components/containers/ColumnContainer/ColumnContainer.scss +16 -0
- package/src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx +27 -0
- package/src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.scss +45 -0
- package/src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.tsx +88 -0
- package/src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.scss +45 -0
- package/src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.tsx +90 -0
- package/src/Presentation/components/containers/RowRightContainer/RowRightContainer.scss +46 -0
- package/src/Presentation/components/containers/RowRightContainer/RowRightContainer.tsx +90 -0
- package/src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.scss +45 -0
- package/src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.tsx +102 -0
- package/src/Presentation/components/containers/SectionList/hooks/createUseComponent.ts +20 -0
- package/src/Presentation/components/containers/SectionList/hooks/index.ts +4 -0
- package/src/Presentation/components/containers/SectionList/hooks/useMobileLayout.ts +27 -0
- package/src/Presentation/components/containers/SectionList/hooks/usePrevious.ts +11 -0
- package/src/Presentation/components/containers/SectionList/hooks/useVisibility.ts +17 -0
- package/src/Presentation/components/containers/SectionList/index.tsx +52 -0
- package/src/Presentation/components/containers/SectionList/styles.css +50 -0
- package/src/Presentation/components/containers/SectionList/useComponent.ts +136 -0
- package/src/Presentation/icons/actions/add-contact.svg +3 -0
- package/src/Presentation/icons/actions/add.svg +3 -0
- package/src/Presentation/icons/actions/archive.svg +3 -0
- package/src/Presentation/icons/actions/copy.svg +3 -0
- package/src/Presentation/icons/actions/delete.svg +3 -0
- package/src/Presentation/icons/actions/download.svg +3 -0
- package/src/Presentation/icons/actions/edit.svg +3 -0
- package/src/Presentation/icons/actions/emoji.svg +3 -0
- package/src/Presentation/icons/actions/forward-filled.svg +3 -0
- package/src/Presentation/icons/actions/hungup.svg +3 -0
- package/src/Presentation/icons/actions/income-call.svg +3 -0
- package/src/Presentation/icons/actions/index.ts +26 -0
- package/src/Presentation/icons/actions/like.svg +3 -0
- package/src/Presentation/icons/actions/new-chat.svg +3 -0
- package/src/Presentation/icons/actions/outcome-call.svg +3 -0
- package/src/Presentation/icons/actions/phone-filled.svg +3 -0
- package/src/Presentation/icons/actions/phone.svg +3 -0
- package/src/Presentation/icons/actions/remove-2.svg +3 -0
- package/src/Presentation/icons/actions/remove.svg +3 -0
- package/src/Presentation/icons/actions/rephrase.svg +6 -0
- package/src/Presentation/icons/actions/reply-filled.svg +3 -0
- package/src/Presentation/icons/actions/robot.svg +5 -0
- package/src/Presentation/icons/actions/send.svg +3 -0
- package/src/Presentation/icons/actions/share.svg +3 -0
- package/src/Presentation/icons/actions/swap-camera.svg +3 -0
- package/src/Presentation/icons/actions/translate.svg +3 -0
- package/src/Presentation/icons/actions/unarchive.svg +3 -0
- package/src/Presentation/icons/actions/video.svg +3 -0
- package/src/Presentation/icons/actions/voice.svg +3 -0
- package/src/Presentation/icons/contents/broadcast.svg +7 -0
- package/src/Presentation/icons/contents/chat-filled.svg +3 -0
- package/src/Presentation/icons/contents/chat.svg +3 -0
- package/src/Presentation/icons/contents/conference.svg +3 -0
- package/src/Presentation/icons/contents/contact-filled.svg +3 -0
- package/src/Presentation/icons/contents/contact.svg +3 -0
- package/src/Presentation/icons/contents/group-chat.svg +3 -0
- package/src/Presentation/icons/contents/index.ts +13 -0
- package/src/Presentation/icons/contents/notifications.svg +3 -0
- package/src/Presentation/icons/contents/private-chat.svg +3 -0
- package/src/Presentation/icons/contents/public-channel.svg +7 -0
- package/src/Presentation/icons/contents/stream-filled.svg +3 -0
- package/src/Presentation/icons/contents/stream.svg +3 -0
- package/src/Presentation/icons/contents/user.svg +3 -0
- package/src/Presentation/icons/index.ts +7 -0
- package/src/Presentation/icons/media/attachment.svg +3 -0
- package/src/Presentation/icons/media/audio-file.svg +3 -0
- package/src/Presentation/icons/media/broken-file.svg +3 -0
- package/src/Presentation/icons/media/camera.svg +3 -0
- package/src/Presentation/icons/media/file.svg +3 -0
- package/src/Presentation/icons/media/gif-file.svg +3 -0
- package/src/Presentation/icons/media/image-filled.svg +3 -0
- package/src/Presentation/icons/media/image.svg +3 -0
- package/src/Presentation/icons/media/index.ts +12 -0
- package/src/Presentation/icons/media/link.svg +3 -0
- package/src/Presentation/icons/media/location.svg +4 -0
- package/src/Presentation/icons/media/text-document.svg +3 -0
- package/src/Presentation/icons/media/video-file.svg +3 -0
- package/src/Presentation/icons/moderation/admin.svg +3 -0
- package/src/Presentation/icons/moderation/banned.svg +3 -0
- package/src/Presentation/icons/moderation/freeze.svg +3 -0
- package/src/Presentation/icons/moderation/index.ts +5 -0
- package/src/Presentation/icons/moderation/moderations.svg +3 -0
- package/src/Presentation/icons/moderation/muted.svg +3 -0
- package/src/Presentation/icons/navigation/arrow-left.svg +3 -0
- package/src/Presentation/icons/navigation/arrow-right.svg +3 -0
- package/src/Presentation/icons/navigation/back.svg +3 -0
- package/src/Presentation/icons/navigation/close.svg +3 -0
- package/src/Presentation/icons/navigation/down.svg +3 -0
- package/src/Presentation/icons/navigation/index.ts +12 -0
- package/src/Presentation/icons/navigation/leave.svg +3 -0
- package/src/Presentation/icons/navigation/more.svg +3 -0
- package/src/Presentation/icons/navigation/next.svg +3 -0
- package/src/Presentation/icons/navigation/plus.svg +3 -0
- package/src/Presentation/icons/navigation/refresh.svg +3 -0
- package/src/Presentation/icons/navigation/search.svg +3 -0
- package/src/Presentation/icons/navigation/settings-filled.svg +3 -0
- package/src/Presentation/icons/navigation/settings.svg +3 -0
- package/src/Presentation/icons/status/error.svg +3 -0
- package/src/Presentation/icons/status/help.svg +3 -0
- package/src/Presentation/icons/status/index.ts +7 -0
- package/src/Presentation/icons/status/information.svg +3 -0
- package/src/Presentation/icons/status/loader.svg +3 -0
- package/src/Presentation/icons/status/mention.svg +3 -0
- package/src/Presentation/icons/status/sent.svg +3 -0
- package/src/Presentation/icons/status/viewed-delivered.svg +3 -0
- package/src/Presentation/icons/toggle/camera-off.svg +3 -0
- package/src/Presentation/icons/toggle/camera-on.svg +3 -0
- package/src/Presentation/icons/toggle/check-off.svg +3 -0
- package/src/Presentation/icons/toggle/check-on.svg +3 -0
- package/src/Presentation/icons/toggle/favorite.svg +3 -0
- package/src/Presentation/icons/toggle/favourite.svg +3 -0
- package/src/Presentation/icons/toggle/full-screen.svg +3 -0
- package/src/Presentation/icons/toggle/hide.svg +3 -0
- package/src/Presentation/icons/toggle/index.ts +23 -0
- package/src/Presentation/icons/toggle/louder.svg +3 -0
- package/src/Presentation/icons/toggle/mic-off.svg +3 -0
- package/src/Presentation/icons/toggle/mic-on.svg +4 -0
- package/src/Presentation/icons/toggle/minimize.svg +3 -0
- package/src/Presentation/icons/toggle/notify-off.svg +3 -0
- package/src/Presentation/icons/toggle/notify-on.svg +3 -0
- package/src/Presentation/icons/toggle/pause.svg +3 -0
- package/src/Presentation/icons/toggle/play.svg +3 -0
- package/src/Presentation/icons/toggle/quite.svg +3 -0
- package/src/Presentation/icons/toggle/record.svg +3 -0
- package/src/Presentation/icons/toggle/screenshare.svg +3 -0
- package/src/Presentation/icons/toggle/show.svg +3 -0
- package/src/Presentation/icons/toggle/speaker off.svg +3 -0
- package/src/Presentation/icons/toggle/speaker-off.svg +3 -0
- package/src/Presentation/icons/toggle/speaker.svg +3 -0
- package/src/Presentation/icons/toggle/stop-record.svg +3 -0
- package/src/Presentation/icons/toggle/stop-share.svg +3 -0
- package/src/Presentation/layouts/Desktop/DesktopLayout.scss +62 -0
- package/src/Presentation/layouts/Desktop/DesktopLayout.tsx +89 -0
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +1374 -0
- package/src/Presentation/layouts/LayoutCommonTypes.ts +7 -0
- package/src/Presentation/layouts/TestStage/CompanyLogo/CompanyLogo.tsx +27 -0
- package/src/Presentation/layouts/TestStage/LoginView/Login.scss +72 -0
- package/src/Presentation/layouts/TestStage/LoginView/Login.tsx +95 -0
- package/src/Presentation/providers/ProviderProps.ts +5 -0
- package/src/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx +339 -0
- package/src/Presentation/providers/QuickBloxUIKitProvider/useEventMessagesRepository.ts +10 -0
- package/src/Presentation/providers/QuickBloxUIKitProvider/useQBConnection.ts +38 -0
- package/src/Presentation/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts +83 -0
- package/src/Presentation/providers/QuickBloxUIKitProvider/useQbUIKitDataContext.ts +11 -0
- package/src/Presentation/themes/DarkTheme.ts +58 -0
- package/src/Presentation/themes/DefaultThemes/CustomTheme.ts +58 -0
- package/src/Presentation/themes/DefaultThemes/DefaultTheme.ts +58 -0
- package/src/Presentation/themes/LightTheme.ts +58 -0
- package/src/Presentation/themes/ThemeScheme.ts +83 -0
- package/src/Presentation/themes/UiKitTheme.ts +37 -0
- package/src/Presentation/themes/styles/_fonts.scss +32 -0
- package/src/Presentation/themes/styles/_mixins.scss +6 -0
- package/src/Presentation/themes/styles/_theme_colors_scheme.scss +56 -0
- package/src/Presentation/themes/styles/_theme_colors_scheme_green.scss +57 -0
- package/src/Presentation/themes/styles/_theme_colors_scheme_pink.scss +72 -0
- package/src/Presentation/themes/styles/_theme_dark.scss +37 -0
- package/src/Presentation/themes/styles/_theme_light.scss +38 -0
- package/src/Presentation/themes/styles/_variables.scss +54 -0
- package/src/Presentation/ui-components/Avatar/Avatar.scss +55 -0
- package/src/Presentation/ui-components/Avatar/Avatar.tsx +30 -0
- package/src/Presentation/ui-components/Avatar/avatar.stories.tsx +78 -0
- package/src/Presentation/ui-components/Badge/Badge.scss +23 -0
- package/src/Presentation/ui-components/Badge/Badge.stories.ts +64 -0
- package/src/Presentation/ui-components/Badge/Badge.tsx +23 -0
- package/src/Presentation/ui-components/Button/Button.scss +133 -0
- package/src/Presentation/ui-components/Button/Button.stories.ts +93 -0
- package/src/Presentation/ui-components/Button/Button.tsx +49 -0
- package/src/Presentation/ui-components/CheckBox/CheckBox.scss +10 -0
- package/src/Presentation/ui-components/CheckBox/CheckBox.tsx +23 -0
- package/src/Presentation/ui-components/DialogBanner/DialogBanner.scss +29 -0
- package/src/Presentation/ui-components/DialogBanner/DialogBanner.stories.ts +38 -0
- package/src/Presentation/ui-components/DialogBanner/DialogBanner.tsx +16 -0
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.scss +71 -0
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.tsx +166 -0
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx +70 -0
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.scss +45 -0
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.stories.tsx +106 -0
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.tsx +41 -0
- package/src/Presentation/ui-components/Dropdown/Dropdown.scss +78 -0
- package/src/Presentation/ui-components/Dropdown/Dropdown.stories.tsx +149 -0
- package/src/Presentation/ui-components/Dropdown/Dropdown.tsx +89 -0
- package/src/Presentation/ui-components/Dropdown/DropdownOption.tsx +30 -0
- package/src/Presentation/ui-components/Header/Header.scss +72 -0
- package/src/Presentation/ui-components/Header/Header.stories.tsx +116 -0
- package/src/Presentation/ui-components/Header/Header.tsx +51 -0
- package/src/Presentation/ui-components/Loader/Loader.scss +27 -0
- package/src/Presentation/ui-components/Loader/Loader.stories.ts +42 -0
- package/src/Presentation/ui-components/Loader/Loader.tsx +15 -0
- package/src/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.tsx +66 -0
- package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.scss +71 -0
- package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.tsx +148 -0
- package/src/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.scss +29 -0
- package/src/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.tsx +16 -0
- package/src/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.scss +16 -0
- package/src/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.tsx +25 -0
- package/src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.scss +40 -0
- package/src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.tsx +22 -0
- package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.scss +18 -0
- package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.tsx +36 -0
- package/src/Presentation/ui-components/Message/FileUrl/FileUrl.scss +58 -0
- package/src/Presentation/ui-components/Message/FileUrl/FileUrl.tsx +43 -0
- package/src/Presentation/ui-components/Message/Message.scss +136 -0
- package/src/Presentation/ui-components/Message/Message.stories.tsx +249 -0
- package/src/Presentation/ui-components/Message/Message.tsx +85 -0
- package/src/Presentation/ui-components/Message/MessageCaption/MessageCaption.scss +90 -0
- package/src/Presentation/ui-components/Message/MessageCaption/MessageCaption.tsx +46 -0
- package/src/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.scss +51 -0
- package/src/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.tsx +32 -0
- package/src/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.tsx +33 -0
- package/src/Presentation/ui-components/MessageInput/MessageInput.scss +123 -0
- package/src/Presentation/ui-components/MessageInput/MessageInput.stories.tsx +137 -0
- package/src/Presentation/ui-components/MessageInput/MessageInput.tsx +155 -0
- package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.scss +16 -0
- package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.tsx +27 -0
- package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyMessagePreview.scss +140 -0
- package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyMessagePreview.tsx +101 -0
- package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.scss +35 -0
- package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.tsx +79 -0
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.scss +30 -0
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.stories.ts +158 -0
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.tsx +34 -0
- package/src/Presentation/ui-components/Placeholder/Placeholder.scss +51 -0
- package/src/Presentation/ui-components/Placeholder/Placeholder.stories.tsx +95 -0
- package/src/Presentation/ui-components/Placeholder/Placeholder.tsx +38 -0
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.scss +30 -0
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.stories.ts +66 -0
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx +38 -0
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.scss +69 -0
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx +177 -0
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.tsx +56 -0
- package/src/Presentation/ui-components/TextField/TextField.scss +91 -0
- package/src/Presentation/ui-components/TextField/TextField.stories.ts +103 -0
- package/src/Presentation/ui-components/TextField/TextField.tsx +78 -0
- package/src/Presentation/ui-components/Toast/Toast.scss +17 -0
- package/src/Presentation/ui-components/Toast/Toast.stories.tsx +50 -0
- package/src/Presentation/ui-components/Toast/ToastProvider.tsx +28 -0
- package/src/Presentation/ui-components/UserListItem/UserListItem.scss +33 -0
- package/src/Presentation/ui-components/UserListItem/UserListItem.stories.tsx +128 -0
- package/src/Presentation/ui-components/UserListItem/UserListItem.tsx +43 -0
- package/src/Presentation/ui-components/index.ts +19 -0
- package/src/QBconfig.ts +151 -0
- package/src/hooks/useModal.ts +13 -0
- package/src/index-ui.ts +87 -0
- package/src/index.scss +27 -0
- package/src/index.tsx +25 -0
- package/src/logo.svg +1 -0
- package/src/package_artan_react_ui.json +91 -0
- package/src/package_original.json +115 -0
- package/src/qb-api-calls/index.ts +581 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/setupTests.ts +5 -0
- package/src/utils/DateTimeFormatter.ts +90 -0
- package/src/utils/parse.ts +74 -0
- package/src/utils/utils.ts +102 -0
- package/storybook-static/312.0aa0e670.iframe.bundle.js +1 -0
- package/storybook-static/341.bea6d0bd.iframe.bundle.js +1 -0
- package/storybook-static/426.be971fb5.iframe.bundle.js +157 -0
- package/storybook-static/426.be971fb5.iframe.bundle.js.map +1 -0
- package/storybook-static/472.3c9e81e6.iframe.bundle.js +351 -0
- package/storybook-static/472.3c9e81e6.iframe.bundle.js.map +1 -0
- package/storybook-static/607.b04b9f0b.iframe.bundle.js +1 -0
- package/storybook-static/729.734b4ae4.iframe.bundle.js +1 -0
- package/storybook-static/758.d99b0166.iframe.bundle.js +14 -0
- package/storybook-static/758.d99b0166.iframe.bundle.js.map +1 -0
- package/storybook-static/797.b3873e04.iframe.bundle.js +1 -0
- package/storybook-static/926.f14bb932.iframe.bundle.js +508 -0
- package/storybook-static/926.f14bb932.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.2fb23ae6.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.fea53429.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.fea53429.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Button-Button-stories.f6c6437b.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.6b2a3f72.iframe.bundle.js +10 -0
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.6b2a3f72.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.f1cb9d40.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.0ad17c54.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.3b620239.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Header-Header-stories.45503161.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.8b53bb33.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Message-Message-stories.63bec01b.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.728a66ad.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.82483823.iframe.bundle.js +10 -0
- package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.82483823.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.0898ead6.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.973cdb64.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.0af0b8a8.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.5987d2bb.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Toast-Toast-stories.e26b2e07.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.e88f4206.iframe.bundle.js +1 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/favicon.svg +7 -0
- package/storybook-static/iframe.html +355 -0
- package/storybook-static/index.html +131 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/logo192.png +0 -0
- package/storybook-static/logo512.png +0 -0
- package/storybook-static/main.0332574c.iframe.bundle.js +1 -0
- package/storybook-static/manifest.json +25 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/quickblox.js +54609 -0
- package/storybook-static/robots.txt +3 -0
- package/storybook-static/runtime~main.16726a14.iframe.bundle.js +1 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +63 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +18 -0
- package/storybook-static/sb-addons/essentials-measure-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-measure-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-outline-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-toolbars-4/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/interactions-8/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/onboarding-7/manager-bundle.js +503 -0
- package/storybook-static/sb-addons/onboarding-7/manager-bundle.js.LEGAL.txt +48 -0
- package/storybook-static/sb-addons/viewport-9/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/viewport-9/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-common-assets/fonts.css +31 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-LVYLGZW2.js +1 -0
- package/storybook-static/sb-manager/chunk-2IXBUOFS.js +7 -0
- package/storybook-static/sb-manager/chunk-INSKDKQB.js +348 -0
- package/storybook-static/sb-manager/chunk-NGTUFCUO.js +9 -0
- package/storybook-static/sb-manager/chunk-NMB3SATH.js +406 -0
- package/storybook-static/sb-manager/chunk-ZEU7PDD3.js +1 -0
- package/storybook-static/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +156 -0
- package/storybook-static/sb-manager/globals-module-info.js +1 -0
- package/storybook-static/sb-manager/globals.js +1 -0
- package/storybook-static/sb-manager/index.js +1 -0
- package/storybook-static/sb-manager/runtime.js +1 -0
- package/storybook-static/sb-manager/syntaxhighlighter-V7JZZA35-DXZCI2WR.js +1 -0
- package/storybook-static/sb-preview/globals.js +1 -0
- package/storybook-static/sb-preview/runtime.js +112 -0
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.807573c8.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.807573c8.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Badge-Badge-stories.7b8317f8.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-Badge-Badge-stories.7b8317f8.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Button-Button-stories.1b6e1c55.chunk.css +4 -0
- package/storybook-static/static/css/Presentation-ui-components-Button-Button-stories.1b6e1c55.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogBanner-DialogBanner-stories.bd07fad3.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogBanner-DialogBanner-stories.bd07fad3.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e720ff21.chunk.css +7 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e720ff21.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.6fb3af8d.chunk.css +6 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.6fb3af8d.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.66965d64.chunk.css +5 -0
- package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.66965d64.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Header-Header-stories.cdc47631.chunk.css +4 -0
- package/storybook-static/static/css/Presentation-ui-components-Header-Header-stories.cdc47631.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Loader-Loader-stories.dab34da1.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-Loader-Loader-stories.dab34da1.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.a518b61a.chunk.css +14 -0
- package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.a518b61a.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.0e99d80b.chunk.css +7 -0
- package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.0e99d80b.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.34aa36b2.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.34aa36b2.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.1ebf88ab.chunk.css +4 -0
- package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.1ebf88ab.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-SettingsItem-SettingsItem-stories.7b98a5d4.chunk.css +5 -0
- package/storybook-static/static/css/Presentation-ui-components-SettingsItem-SettingsItem-stories.7b98a5d4.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-TextField-TextField-stories.412027f8.chunk.css +4 -0
- package/storybook-static/static/css/Presentation-ui-components-TextField-TextField-stories.412027f8.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Toast-Toast-stories.11d83296.chunk.css +754 -0
- package/storybook-static/static/css/Presentation-ui-components-Toast-Toast-stories.11d83296.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.4d072348.chunk.css +7 -0
- package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.4d072348.chunk.css.map +1 -0
- package/storybook-static/static/css/main.4e852eef.css +5 -0
- package/storybook-static/static/css/main.4e852eef.css.map +1 -0
- package/storybook-static/static/media/add-contact.e7e7b8b15edebe99cae9c46963126e7c.svg +3 -0
- package/storybook-static/static/media/add.5cbe1f2c489b81396863f7128e3d26e7.svg +3 -0
- package/storybook-static/static/media/admin.476c2854d7ad23f2afdedac2d9bd6815.svg +3 -0
- package/storybook-static/static/media/archive.d0a72898f3c47a4194d18f560a54e109.svg +3 -0
- package/storybook-static/static/media/arrow-left.5005351d4fa6a7c074dd9780fb49dcc8.svg +3 -0
- package/storybook-static/static/media/arrow-right.1be3b599e21158807fdf72f4976179a2.svg +3 -0
- package/storybook-static/static/media/attachment.a58b8549f46ae5bbe93be779cd9f2037.svg +3 -0
- package/storybook-static/static/media/audio-file.40179c472f715fc74d4da607da96aa5e.svg +3 -0
- package/storybook-static/static/media/back.b541e72fe05542e145575c8851558998.svg +3 -0
- package/storybook-static/static/media/banned.c7c74bfa1c833263f3ab42d0529132d1.svg +3 -0
- package/storybook-static/static/media/broadcast.55273926379e5f486ccfdfab1a310b2d.svg +7 -0
- package/storybook-static/static/media/broken-file.bc084278a0d284b7901b47f24001caa6.svg +3 -0
- package/storybook-static/static/media/camera-off.8e01960815ce7620a1039d0fc5f758b2.svg +3 -0
- package/storybook-static/static/media/camera-on.ddd56e36fa505d618ab772e23c8381e6.svg +3 -0
- package/storybook-static/static/media/camera.a5a215695fba60146e649094188f37e2.svg +3 -0
- package/storybook-static/static/media/chat-filled.aaf0b778d198e7b8f632a68299a8fd13.svg +3 -0
- package/storybook-static/static/media/chat.59cd437f21fe7043682dd04cbe6377be.svg +3 -0
- package/storybook-static/static/media/check-off.0c0256f00eeb75770ffc2fbd2b59eab0.svg +3 -0
- package/storybook-static/static/media/check-on.80442753ef6922df1913453f50099315.svg +3 -0
- package/storybook-static/static/media/close.c145af996de81b25f3930bf36d88b161.svg +3 -0
- package/storybook-static/static/media/conference.ffbdf37c0510c796138f18e6c1205204.svg +3 -0
- package/storybook-static/static/media/contact-filled.f04f56ba3f98ade5d7ced7814d8a5fa8.svg +3 -0
- package/storybook-static/static/media/contact.40a8b8104c3a448b81108ffede850963.svg +3 -0
- package/storybook-static/static/media/copy.100bd0fff933cbde8ad4bc2ac281c845.svg +3 -0
- package/storybook-static/static/media/delete.287c9b4b3b0e58cb081c6e388e68b409.svg +3 -0
- package/storybook-static/static/media/down.7a43a3d78885f40616ce111c86c108a4.svg +3 -0
- package/storybook-static/static/media/download.43c26d404dd023e42aaacc52151f7a59.svg +3 -0
- package/storybook-static/static/media/edit.8d813af82ecab84303ee3c97bd7bc562.svg +3 -0
- package/storybook-static/static/media/emoji.9a202cbb16735f3c83ba8772f0218aa4.svg +3 -0
- package/storybook-static/static/media/error.ec60e2052661b82f27b7ce270ae133a7.svg +3 -0
- package/storybook-static/static/media/favorite.194d78057be6cd7968c85e7b5822f82a.svg +3 -0
- package/storybook-static/static/media/file.e537292693b3c89c023fd383c70bd221.svg +3 -0
- package/storybook-static/static/media/forward-filled.43120a68057427c89c88b28d9b20dd90.svg +3 -0
- package/storybook-static/static/media/freeze.35619771e645b649c38e0427d9b39a25.svg +3 -0
- package/storybook-static/static/media/full-screen.6b01c93e069421c69bda2bbde5d01336.svg +3 -0
- package/storybook-static/static/media/gif-file.2c46a5df6c8397f5b9088e66aee3fd44.svg +3 -0
- package/storybook-static/static/media/group-chat.19d5305cab6017d494ac35ecb285a9fe.svg +3 -0
- package/storybook-static/static/media/help.786f48518c96c8e7098296d68245c339.svg +3 -0
- package/storybook-static/static/media/hide.2785264246d70868717984a5ad44d4c9.svg +3 -0
- package/storybook-static/static/media/hungup.e5d2289a9e8cd755bd1ee36b738305a2.svg +3 -0
- package/storybook-static/static/media/image-filled.8afb62b142d786e90102f1cac73a9c13.svg +3 -0
- package/storybook-static/static/media/image.64092dadd5215c8d3ba99ccac753d743.svg +3 -0
- package/storybook-static/static/media/income-call.60ca2d367a00d582f4b6f4a5f2047e27.svg +3 -0
- package/storybook-static/static/media/information.8217e163c334852f143e7199c97fab1d.svg +3 -0
- package/storybook-static/static/media/leave.ae5422a12edec1b61484ff2932819c77.svg +3 -0
- package/storybook-static/static/media/like.45662989373aa524cd580fb42432e0bc.svg +3 -0
- package/storybook-static/static/media/link.74f567c3ee4366d79fb81d73eb8c0919.svg +3 -0
- package/storybook-static/static/media/loader.2eb72391c5267453edb4106528c075ad.svg +3 -0
- package/storybook-static/static/media/location.cab52453404524c345ec7efdd86fa66b.svg +4 -0
- package/storybook-static/static/media/louder.133519141541a9cd2f0e898534b39732.svg +3 -0
- package/storybook-static/static/media/mention.6c4885bb0ea5ca85c8962f6f51ac1cb4.svg +3 -0
- package/storybook-static/static/media/mic-off.43e60427600bcf7fd78fb840ff50d804.svg +3 -0
- package/storybook-static/static/media/mic-on.5a52100de3770550b3a57a76827843c2.svg +4 -0
- package/storybook-static/static/media/minimize.a849dd3a36ece08b992a773d135a0c3f.svg +3 -0
- package/storybook-static/static/media/moderations.07c8d1fe96b0b8bb5911f6cc37f764c6.svg +3 -0
- package/storybook-static/static/media/more.4ed9ad54ae110d9760b6e9698d821960.svg +3 -0
- package/storybook-static/static/media/muted.cb37ac3c577c87c800466aa7aee65af2.svg +3 -0
- package/storybook-static/static/media/new-chat.124e0351bd0e19ff4c5fdbabbe5c6027.svg +3 -0
- package/storybook-static/static/media/next.97a0eeea1f8daa2d31c8452f29908bf1.svg +3 -0
- package/storybook-static/static/media/notifications.ab8e847ae04e2bec9209dbdd1054b0f2.svg +3 -0
- package/storybook-static/static/media/notify-off.4a669a3a8cbd38b3309dbc4c909f6089.svg +3 -0
- package/storybook-static/static/media/notify-on.ea9ffc856ad6cdbe87184af558c78eec.svg +3 -0
- package/storybook-static/static/media/outcome-call.9f5fec07823796ad78963a06cdcf629e.svg +3 -0
- package/storybook-static/static/media/pause.27eb8c32999f10d05d6a200165d798a9.svg +3 -0
- package/storybook-static/static/media/phone-filled.e969511d74935af26ef366f575929f68.svg +3 -0
- package/storybook-static/static/media/phone.6355580a064a488b6317372d71f84c00.svg +3 -0
- package/storybook-static/static/media/play.00bfe0e9c94dc6dfb230262e45b2f860.svg +3 -0
- package/storybook-static/static/media/plus.d3953cb1cf830bcfc41c8cc6133b13b1.svg +3 -0
- package/storybook-static/static/media/private-chat.c68f36baf025b9d20ad1f801a2396e7a.svg +3 -0
- package/storybook-static/static/media/public-channel.7a6ada7f30c44fb4a99021df0eb0e996.svg +7 -0
- package/storybook-static/static/media/quite.9f45e2152fe6c499a776cb387ee4859f.svg +3 -0
- package/storybook-static/static/media/record.e49ee7da793b2ce446a4e7128970c0cc.svg +3 -0
- package/storybook-static/static/media/refresh.6e955728d9ec086f34e9adaaaafacf3e.svg +3 -0
- package/storybook-static/static/media/remove-2.8a7700757f02c941f03c37c7e495bf63.svg +3 -0
- package/storybook-static/static/media/remove.831e69b70db1b3eb72a49444b8aa1e16.svg +3 -0
- package/storybook-static/static/media/rephrase.551171aa8903b31746a58a95528b1f68.svg +6 -0
- package/storybook-static/static/media/reply-filled.17ed65506e902f17bb22e87ffac93314.svg +3 -0
- package/storybook-static/static/media/screenshare.c2f94264a7640ea1bbb2a22f7d570038.svg +3 -0
- package/storybook-static/static/media/search.25663e60d71e01c64fdfc83df7460ab0.svg +3 -0
- package/storybook-static/static/media/send.d298db52aafdb846a46c9d180ad45946.svg +3 -0
- package/storybook-static/static/media/sent.f427753e5502fd7783a08e5f0e0d2f35.svg +3 -0
- package/storybook-static/static/media/settings-filled.bd9b60ff4e9eae911e4e2bc69e8e79ca.svg +3 -0
- package/storybook-static/static/media/share.7ce8283aa267fb065c568d65b482e211.svg +3 -0
- package/storybook-static/static/media/show.de1782527c4a7fa14101dffbfba8aea6.svg +3 -0
- package/storybook-static/static/media/speaker-off.fe84597c4b68f4f761e12f789dc58718.svg +3 -0
- package/storybook-static/static/media/speaker.e7ff48a73ca43188703b36dfecd932b5.svg +3 -0
- package/storybook-static/static/media/stop-record.a2e9d50a0930c24af43d7f357093be81.svg +3 -0
- package/storybook-static/static/media/stop-share.d1be236e01dd924ba711e1e17f41054c.svg +3 -0
- package/storybook-static/static/media/stream-filled.c40bae61fea25455602a61db5e77fa71.svg +3 -0
- package/storybook-static/static/media/stream.700f4f8ce0cee0ae1ef56132867427fe.svg +3 -0
- package/storybook-static/static/media/swap-camera.bc3a4652106f5c57d14b4dcbffff08a5.svg +3 -0
- package/storybook-static/static/media/text-document.cad7e87368501b96de2a939d08852dcd.svg +3 -0
- package/storybook-static/static/media/unarchive.1b1a7438cd8eb6fee80e6ac89baa195b.svg +3 -0
- package/storybook-static/static/media/user.911c7ae778615185b285ce0ae4068486.svg +3 -0
- package/storybook-static/static/media/video-file.dbd1f8c63a3769f9e9a027f0922d56b2.svg +3 -0
- package/storybook-static/static/media/video.bbcc2109285c18eea02ede86920de0dd.svg +3 -0
- package/storybook-static/static/media/viewed-delivered.f43360dc87235a6cf574ff53f73dd777.svg +3 -0
- package/storybook-static/static/media/voice.b937c8a1f744050bec2cd389ad2a1f3a.svg +3 -0
- package/storybook-static/stories.json +1 -0
- package/tsconfig.json +33 -0
- package/typedoc.json +4 -0
- package/webpack.config.js +68 -0
- package/dist/Presentation/Views/Dialog/DialogHeader/RenderLeftActions/RenderLeftActions.d.ts +0 -10
- package/dist/Presentation/Views/PreviewDialog/PreviewAudioFile/PreviewAudioFile.d.ts +0 -7
- package/dist/Presentation/Views/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.d.ts +0 -7
- package/dist/Presentation/Views/PreviewDialog/PreviewImageFile/PreviewImageFile.d.ts +0 -8
- package/dist/Presentation/Views/PreviewDialog/PreviewVideoFile/PreviewVideoFile.d.ts +0 -7
- package/dist/Presentation/providers/ModalContextProvider/Modal.d.ts +0 -14
- package/dist/Presentation/providers/ModalContextProvider/ModalContextProvider.d.ts +0 -4
- package/dist/Presentation/providers/ModalContextProvider/useModal.d.ts +0 -11
- package/dist/Presentation/{Views/Dialog → ui-components/MessageInput}/AttachmentUploader/AttachmentUploader.d.ts +0 -0
- package/dist/Presentation/{Views/Dialog → ui-components/MessageInput}/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.d.ts +0 -0
- package/dist/Presentation/{Views/Dialog → ui-components/MessageInput}/ReplyMessagePreview/ReplyMessagePreview.d.ts +1 -1
- /package/dist/Presentation/{Views/Dialog → ui-components/MessageInput}/VoiceRecordingProgress/VoiceRecordingProgress.d.ts +0 -0
|
@@ -0,0 +1,1291 @@
|
|
|
1
|
+
import { RemoteDialogDTO } from '../../dto/dialog/RemoteDialogDTO';
|
|
2
|
+
import {
|
|
3
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
4
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
5
|
+
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE,
|
|
6
|
+
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE,
|
|
7
|
+
RemoteDataSourceException,
|
|
8
|
+
} from '../exception/RemoteDataSourceException';
|
|
9
|
+
import { RemoteDialogsDTO } from '../../dto/dialog/RemoteDialogsDTO';
|
|
10
|
+
import { RemoteMessageDTO } from '../../dto/message/RemoteMessageDTO';
|
|
11
|
+
import { RemoteUserDTO } from '../../dto/user/RemoteUserDTO';
|
|
12
|
+
import { RemoteUsersDTO } from '../../dto/user/RemoteUsersDTO';
|
|
13
|
+
import { RemoteMessagesDTO } from '../../dto/message/RemoteMessagesDTO';
|
|
14
|
+
import { RemoteFileDTO } from '../../dto/file/RemoteFileDTO';
|
|
15
|
+
import { Pagination } from '../../../Domain/repository/Pagination';
|
|
16
|
+
import { DialogDTOMapper } from './Mapper/DialogDTOMapper';
|
|
17
|
+
import { IDTOMapper } from './Mapper/IDTOMapper';
|
|
18
|
+
import { Stubs } from '../../Stubs';
|
|
19
|
+
import {
|
|
20
|
+
QBChatConnect,
|
|
21
|
+
QBChatDisconnect,
|
|
22
|
+
qbChatGetMessagesExtended,
|
|
23
|
+
QBChatMarkMessageRead,
|
|
24
|
+
QBChatSendMessage,
|
|
25
|
+
QBChatSendSystemMessage,
|
|
26
|
+
QBCreateAndUploadContent,
|
|
27
|
+
QBCreateGroupDialog,
|
|
28
|
+
QBCreatePrivateDialog,
|
|
29
|
+
QBCreateSession,
|
|
30
|
+
QBDeleteDialog,
|
|
31
|
+
QBGetDialogById,
|
|
32
|
+
QBGetDialogs,
|
|
33
|
+
QBInit,
|
|
34
|
+
QBInitParams,
|
|
35
|
+
QBJoinGroupDialog,
|
|
36
|
+
QBLogout,
|
|
37
|
+
QBSendIsStopTypingStatus,
|
|
38
|
+
QBSendIsTypingStatus,
|
|
39
|
+
QBUpdateDialog,
|
|
40
|
+
QBUsersGet,
|
|
41
|
+
QBUsersGetById,
|
|
42
|
+
} from '../../../qb-api-calls';
|
|
43
|
+
import { UserDTOMapper } from './Mapper/UserDTOMapper';
|
|
44
|
+
import { MessageDTOMapper } from './Mapper/MessageDTOMapper';
|
|
45
|
+
import { IMapper } from '../../mapper/IMapper';
|
|
46
|
+
import { DialogRemoteDTOMapper } from '../../mapper/DialogRemoteDTOMapper';
|
|
47
|
+
import { DialogEntity } from '../../../Domain/entity/DialogEntity';
|
|
48
|
+
import RepositoryException from '../exception/RepositoryException';
|
|
49
|
+
import { MapperDTOException } from '../exception/MapperDTOException';
|
|
50
|
+
import { stringifyError } from '../../../utils/parse';
|
|
51
|
+
import { DialogType } from '../../../Domain/entity/DialogTypes';
|
|
52
|
+
import { NotificationTypes } from '../../../Domain/entity/NotificationTypes';
|
|
53
|
+
import EventMessageType from '../../../Domain/entity/EventMessageType';
|
|
54
|
+
import { SubscriptionPerformer } from '../../../Domain/use_cases/base/Subscribable/SubscriptionPerformer';
|
|
55
|
+
import { CallBackFunction } from '../../../Domain/use_cases/base/IUseCase';
|
|
56
|
+
import { FileDTOMapper } from './Mapper/FileDTOMapper';
|
|
57
|
+
import { DialogEventInfo } from '../../../Domain/entity/DialogEventInfo';
|
|
58
|
+
import { IRemoteDataSource } from './IRemoteDataSource';
|
|
59
|
+
import { QBConfig } from '../../../QBconfig';
|
|
60
|
+
|
|
61
|
+
export type PaginatedDTOResult = {
|
|
62
|
+
PaginationResult: Pagination;
|
|
63
|
+
ResultData: RemoteUserDTO[];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type LoginData = {
|
|
67
|
+
login: string;
|
|
68
|
+
password: string;
|
|
69
|
+
};
|
|
70
|
+
export type AuthorizationData = {
|
|
71
|
+
sessionToken: string;
|
|
72
|
+
userId: number;
|
|
73
|
+
password: string;
|
|
74
|
+
userName: string;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export class RemoteDataSource implements IRemoteDataSource {
|
|
78
|
+
private userDTOMapper: IDTOMapper;
|
|
79
|
+
|
|
80
|
+
private messageDTOMapper: IDTOMapper;
|
|
81
|
+
|
|
82
|
+
private fileDTOMapper: IDTOMapper;
|
|
83
|
+
|
|
84
|
+
private _needInit: boolean;
|
|
85
|
+
|
|
86
|
+
private _authProcessed: boolean;
|
|
87
|
+
|
|
88
|
+
get authProcessed(): boolean {
|
|
89
|
+
const auth = this._authProcessed;
|
|
90
|
+
const chatConnection = QB && QB.chat && QB.chat.isConnected;
|
|
91
|
+
|
|
92
|
+
if (chatConnection) return true;
|
|
93
|
+
|
|
94
|
+
return auth || chatConnection;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
set authProcessed(value: boolean) {
|
|
98
|
+
this._authProcessed = value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
get needInit(): boolean {
|
|
102
|
+
const needed = this._needInit;
|
|
103
|
+
const chatConnection = QB && QB.chat && QB.chat.isConnected;
|
|
104
|
+
|
|
105
|
+
if (chatConnection) return false;
|
|
106
|
+
|
|
107
|
+
return needed;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
public setAuthProcessedSuccessed() {
|
|
111
|
+
this.authProcessed = true;
|
|
112
|
+
this.setInitSDKSuccessed();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
public setInitSDKSuccessed() {
|
|
116
|
+
this._needInit = false;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
private _authInformation: AuthorizationData | undefined;
|
|
120
|
+
|
|
121
|
+
get authInformation(): AuthorizationData | undefined {
|
|
122
|
+
return this._authInformation;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
set authInformation(value: AuthorizationData | undefined) {
|
|
126
|
+
this._authInformation = value;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
//
|
|
130
|
+
getCurrentDialogDTOMapper(): IDTOMapper {
|
|
131
|
+
const currentUserId: number = this._authInformation?.userId || -1;
|
|
132
|
+
const dialogDTOMapper: IDTOMapper = new DialogDTOMapper(currentUserId);
|
|
133
|
+
|
|
134
|
+
return dialogDTOMapper;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
//
|
|
138
|
+
constructor() {
|
|
139
|
+
console.log('CONSTRUCTOR RemoteDataSourceMock');
|
|
140
|
+
this.userDTOMapper = new UserDTOMapper();
|
|
141
|
+
this.messageDTOMapper = new MessageDTOMapper();
|
|
142
|
+
this.fileDTOMapper = new FileDTOMapper();
|
|
143
|
+
this._needInit = true;
|
|
144
|
+
this._authProcessed = false;
|
|
145
|
+
this.subscriptionOnSystemMessages[NotificationTypes.REMOVE_USER] =
|
|
146
|
+
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
147
|
+
this.subscriptionOnSystemMessages[NotificationTypes.UPDATE_DIALOG] =
|
|
148
|
+
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
149
|
+
this.subscriptionOnSystemMessages[NotificationTypes.DELETE_LEAVE_DIALOG] =
|
|
150
|
+
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
151
|
+
this.subscriptionOnSystemMessages[NotificationTypes.NEW_DIALOG] =
|
|
152
|
+
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
public async setUpMockStorage(): Promise<void> {
|
|
156
|
+
const dialogsDTOtoEntityMapper: IMapper = new DialogRemoteDTOMapper();
|
|
157
|
+
const dialogsEntities = Stubs.createDialogsForTest();
|
|
158
|
+
|
|
159
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
160
|
+
for (const item of dialogsEntities) {
|
|
161
|
+
const dialogDTO: RemoteDialogDTO =
|
|
162
|
+
// eslint-disable-next-line no-await-in-loop
|
|
163
|
+
await dialogsDTOtoEntityMapper.fromEntity<
|
|
164
|
+
DialogEntity,
|
|
165
|
+
RemoteDialogDTO
|
|
166
|
+
>(item);
|
|
167
|
+
|
|
168
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars,promise/catch-or-return,promise/always-return
|
|
169
|
+
this.createDialog(dialogDTO)
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars,promise/always-return
|
|
171
|
+
.then((_) => {
|
|
172
|
+
console.log(`added mock item ${JSON.stringify(dialogDTO)}`);
|
|
173
|
+
})
|
|
174
|
+
.catch((e) => {
|
|
175
|
+
console.log('EXCEPTION:', (e as RepositoryException).message);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// eslint-disable-next-line class-methods-use-this
|
|
181
|
+
private async createUserSession(loginData: QBLoginParams) {
|
|
182
|
+
const session: QBSession = await QBCreateSession(loginData);
|
|
183
|
+
|
|
184
|
+
return session;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// eslint-disable-next-line class-methods-use-this
|
|
188
|
+
public static initSDK(sdkParams: QBInitParams): boolean {
|
|
189
|
+
console.log('2. call initSDK in RemoteDataSourceMock');
|
|
190
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
191
|
+
// @ts-ignore
|
|
192
|
+
if (!window.QB) {
|
|
193
|
+
throw new Error('HAVE NO SDK');
|
|
194
|
+
} else {
|
|
195
|
+
console.log('2. start init actions');
|
|
196
|
+
QBInit({
|
|
197
|
+
appIdOrToken: sdkParams.appIdOrToken,
|
|
198
|
+
authKeyOrAppId: sdkParams.authKeyOrAppId,
|
|
199
|
+
authSecret: sdkParams.authSecret,
|
|
200
|
+
accountKey: sdkParams.accountKey,
|
|
201
|
+
config: sdkParams.config,
|
|
202
|
+
});
|
|
203
|
+
const QuickBloxVersion = `CALL initData: Init SDK was success: version ${QB.version} build ${QB.buildNumber}`;
|
|
204
|
+
|
|
205
|
+
console.log(QuickBloxVersion);
|
|
206
|
+
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
public async initSDKWithUser(
|
|
212
|
+
sdkParams: QBInitParams,
|
|
213
|
+
authData: LoginData,
|
|
214
|
+
): Promise<void> {
|
|
215
|
+
console.log('2. call initSDK in RemoteDataSourceMock');
|
|
216
|
+
if (this.needInit) {
|
|
217
|
+
console.log('2. start init actions');
|
|
218
|
+
QBInit({
|
|
219
|
+
appIdOrToken: sdkParams.appIdOrToken,
|
|
220
|
+
authKeyOrAppId: sdkParams.authKeyOrAppId,
|
|
221
|
+
authSecret: sdkParams.authSecret,
|
|
222
|
+
accountKey: sdkParams.accountKey,
|
|
223
|
+
config: sdkParams.config,
|
|
224
|
+
});
|
|
225
|
+
const QuickBloxVersion = `CALL initData: Init SDK was success: version ${QB.version} build ${QB.buildNumber}`;
|
|
226
|
+
|
|
227
|
+
console.log(QuickBloxVersion);
|
|
228
|
+
//
|
|
229
|
+
this._needInit = false;
|
|
230
|
+
await this.loginWithUser(authData);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
public async disconnectAndLogoutUser() {
|
|
235
|
+
if (this.authProcessed) {
|
|
236
|
+
QBChatDisconnect();
|
|
237
|
+
await QBLogout();
|
|
238
|
+
this.authProcessed = false;
|
|
239
|
+
this.releaseSubscriptions();
|
|
240
|
+
this.releaseEventsHandlers();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
releaseSubscriptions(): void {
|
|
245
|
+
Object.entries(this.subscriptionOnSystemMessages).map((x) => {
|
|
246
|
+
const eventName = x[0];
|
|
247
|
+
|
|
248
|
+
return this.subscriptionOnSystemMessages[eventName].release();
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
subscribeOnSystemMessaging(
|
|
253
|
+
notificationType: NotificationTypes,
|
|
254
|
+
callback: CallBackFunction<RemoteMessageDTO>,
|
|
255
|
+
): void {
|
|
256
|
+
let SystemMessageType: string = NotificationTypes.NEW_DIALOG;
|
|
257
|
+
|
|
258
|
+
switch (notificationType) {
|
|
259
|
+
case NotificationTypes.REMOVE_USER:
|
|
260
|
+
SystemMessageType = NotificationTypes.REMOVE_USER;
|
|
261
|
+
break;
|
|
262
|
+
case NotificationTypes.DELETE_LEAVE_DIALOG:
|
|
263
|
+
SystemMessageType = NotificationTypes.DELETE_LEAVE_DIALOG;
|
|
264
|
+
break;
|
|
265
|
+
case NotificationTypes.UPDATE_DIALOG:
|
|
266
|
+
SystemMessageType = NotificationTypes.UPDATE_DIALOG;
|
|
267
|
+
break;
|
|
268
|
+
default:
|
|
269
|
+
SystemMessageType = NotificationTypes.NEW_DIALOG;
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
this.subscriptionOnSystemMessages[SystemMessageType].subscribe(
|
|
274
|
+
callback,
|
|
275
|
+
EventMessageType.SystemMessage,
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
protected subscriptionOnSystemMessages: Dictionary<
|
|
280
|
+
SubscriptionPerformer<RemoteMessageDTO>
|
|
281
|
+
> = {};
|
|
282
|
+
|
|
283
|
+
subscribeOnMessaging(callback: CallBackFunction<RemoteMessageDTO>): void {
|
|
284
|
+
this.subscriptionOnChatMessages.subscribe(
|
|
285
|
+
callback,
|
|
286
|
+
EventMessageType.RegularMessage,
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
protected subscriptionOnChatMessages: SubscriptionPerformer<RemoteMessageDTO> =
|
|
291
|
+
new SubscriptionPerformer<RemoteMessageDTO>();
|
|
292
|
+
|
|
293
|
+
protected subscriptionOnMessageStatus: SubscriptionPerformer<DialogEventInfo> =
|
|
294
|
+
new SubscriptionPerformer<DialogEventInfo>();
|
|
295
|
+
|
|
296
|
+
protected subscriptionOnSessionExpiredListener: SubscriptionPerformer<boolean> =
|
|
297
|
+
new SubscriptionPerformer<boolean>();
|
|
298
|
+
|
|
299
|
+
subscribeOnSessionExpiredListener(callback: CallBackFunction<boolean>): void {
|
|
300
|
+
console.log('subscribe On Session Expired Event');
|
|
301
|
+
this.subscriptionOnSessionExpiredListener.subscribe(
|
|
302
|
+
callback,
|
|
303
|
+
EventMessageType.LocalMessage,
|
|
304
|
+
);
|
|
305
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
306
|
+
const sessionTimeOut = QBConfig.appConfig.sessionTimeOut || 122;
|
|
307
|
+
|
|
308
|
+
setTimeout(() => {
|
|
309
|
+
console.log('NEED LOGOUT');
|
|
310
|
+
if (this.authProcessed) {
|
|
311
|
+
this.subscriptionOnSessionExpiredListener.informSubscribers(
|
|
312
|
+
true,
|
|
313
|
+
EventMessageType.LocalMessage,
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
}, sessionTimeOut * 60 * 1000);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
subscribeOnUpdateMessageStatus(
|
|
320
|
+
callback: CallBackFunction<DialogEventInfo>,
|
|
321
|
+
): void {
|
|
322
|
+
this.subscriptionOnMessageStatus.subscribe(
|
|
323
|
+
callback,
|
|
324
|
+
EventMessageType.LocalMessage,
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
public initEventsHandlers() {
|
|
329
|
+
console.log('CALL--initEventsHandlers--CALL');
|
|
330
|
+
QB.chat.onSystemMessageListener = (message) => {
|
|
331
|
+
console.log(`EVENT: receive system message: ${JSON.stringify(message)}`);
|
|
332
|
+
const resultMessage = new RemoteMessageDTO();
|
|
333
|
+
|
|
334
|
+
resultMessage.sender_id = message.userId;
|
|
335
|
+
resultMessage.message = message.body || 'system message';
|
|
336
|
+
resultMessage.notification_type =
|
|
337
|
+
message.extension.notification_type || NotificationTypes.UPDATE_DIALOG;
|
|
338
|
+
resultMessage.dialogId = message?.extension?.dialog_id || '';
|
|
339
|
+
|
|
340
|
+
this.subscriptionOnSystemMessages[
|
|
341
|
+
resultMessage.notification_type
|
|
342
|
+
].informSubscribers(resultMessage, EventMessageType.SystemMessage);
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
QB.chat.onMessageListener = (
|
|
346
|
+
userId: number,
|
|
347
|
+
message: QBChatXMPPMessage,
|
|
348
|
+
) => {
|
|
349
|
+
console.log(
|
|
350
|
+
`EVENT: receive message for userid: ${userId}, message: ${stringifyError(
|
|
351
|
+
message,
|
|
352
|
+
)}`,
|
|
353
|
+
);
|
|
354
|
+
// нужно получить реализовать так как при обработке onDeliveredStatusListener
|
|
355
|
+
const dialogId = message.dialog_id || message.extension.dialog_id || '-1';
|
|
356
|
+
|
|
357
|
+
//
|
|
358
|
+
qbChatGetMessagesExtended(dialogId, {
|
|
359
|
+
_id: message.id,
|
|
360
|
+
})
|
|
361
|
+
// eslint-disable-next-line promise/always-return
|
|
362
|
+
.then((qbMessages: GetMessagesResult) => {
|
|
363
|
+
///
|
|
364
|
+
qbMessages.items.map(async (currentItem) => {
|
|
365
|
+
const dtoMessage: RemoteMessageDTO =
|
|
366
|
+
await this.messageDTOMapper.toTDO<
|
|
367
|
+
QBChatMessage,
|
|
368
|
+
RemoteMessageDTO
|
|
369
|
+
>(currentItem);
|
|
370
|
+
|
|
371
|
+
dtoMessage.dialogId = dialogId;
|
|
372
|
+
|
|
373
|
+
this.subscriptionOnChatMessages.informSubscribers(
|
|
374
|
+
dtoMessage,
|
|
375
|
+
EventMessageType.RegularMessage,
|
|
376
|
+
);
|
|
377
|
+
|
|
378
|
+
return dtoMessage;
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
///
|
|
382
|
+
})
|
|
383
|
+
.catch();
|
|
384
|
+
};
|
|
385
|
+
QB.chat.onDeliveredStatusListener = (messageId, dialogId, userId) => {
|
|
386
|
+
console.log(
|
|
387
|
+
`EVENT: receive delivered message id: ${messageId}, dialogid: ${dialogId} userid: ${userId}`,
|
|
388
|
+
);
|
|
389
|
+
|
|
390
|
+
QBGetDialogById(dialogId)
|
|
391
|
+
.then((result) => {
|
|
392
|
+
//
|
|
393
|
+
const dialogs: QBChatDialog[] | undefined = result?.items.filter(
|
|
394
|
+
(v) => v._id === dialogId,
|
|
395
|
+
);
|
|
396
|
+
const current =
|
|
397
|
+
dialogs && dialogs.length > 0 ? dialogs[0] : undefined;
|
|
398
|
+
|
|
399
|
+
// eslint-disable-next-line promise/always-return
|
|
400
|
+
if (current && current.type === DialogType.private) {
|
|
401
|
+
//
|
|
402
|
+
qbChatGetMessagesExtended(dialogId, {
|
|
403
|
+
_id: messageId,
|
|
404
|
+
})
|
|
405
|
+
// eslint-disable-next-line promise/always-return
|
|
406
|
+
.then((qbMessages: GetMessagesResult) => {
|
|
407
|
+
///
|
|
408
|
+
qbMessages.items.map(async (currentItem) => {
|
|
409
|
+
const dtoMessage: RemoteMessageDTO =
|
|
410
|
+
await this.messageDTOMapper.toTDO<
|
|
411
|
+
QBChatMessage,
|
|
412
|
+
RemoteMessageDTO
|
|
413
|
+
>(currentItem);
|
|
414
|
+
|
|
415
|
+
dtoMessage.dialogId = dialogId;
|
|
416
|
+
|
|
417
|
+
this.subscriptionOnChatMessages.informSubscribers(
|
|
418
|
+
dtoMessage,
|
|
419
|
+
EventMessageType.RegularMessage,
|
|
420
|
+
);
|
|
421
|
+
|
|
422
|
+
return dtoMessage;
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
///
|
|
426
|
+
})
|
|
427
|
+
.catch();
|
|
428
|
+
//
|
|
429
|
+
}
|
|
430
|
+
})
|
|
431
|
+
.catch();
|
|
432
|
+
};
|
|
433
|
+
QB.chat.onMessageTypingListener = (isTyping, userId, dialogId) => {
|
|
434
|
+
console.log(
|
|
435
|
+
`EVENT: receive typing: ${
|
|
436
|
+
isTyping ? 'true' : 'false'
|
|
437
|
+
}, dialog id: ${dialogId} userid: ${userId}`,
|
|
438
|
+
);
|
|
439
|
+
if (this.authProcessed && this.authInformation?.userId === userId) return;
|
|
440
|
+
|
|
441
|
+
const resultMessage: DialogEventInfo = {
|
|
442
|
+
eventMessageType: EventMessageType.LocalMessage,
|
|
443
|
+
messageInfo: undefined,
|
|
444
|
+
messageStatus: { isTyping, userId, dialogId },
|
|
445
|
+
notificationTypes: undefined,
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
this.subscriptionOnMessageStatus.informSubscribers(
|
|
449
|
+
resultMessage,
|
|
450
|
+
EventMessageType.LocalMessage,
|
|
451
|
+
);
|
|
452
|
+
};
|
|
453
|
+
QB.chat.onSessionExpiredListener = (error) => {
|
|
454
|
+
console.log('call onSessionExpiredListener');
|
|
455
|
+
console.timeLog('onSessionExpiredListener');
|
|
456
|
+
let result = true;
|
|
457
|
+
|
|
458
|
+
if (error) {
|
|
459
|
+
console.log(
|
|
460
|
+
'EVENT:onSessionExpiredListener - error: ',
|
|
461
|
+
stringifyError(error),
|
|
462
|
+
);
|
|
463
|
+
result = false;
|
|
464
|
+
} else {
|
|
465
|
+
console.log(
|
|
466
|
+
'EVENT: Hello from SessionExpiredListener. session is expired.',
|
|
467
|
+
);
|
|
468
|
+
result = true;
|
|
469
|
+
}
|
|
470
|
+
this.subscriptionOnSessionExpiredListener.informSubscribers(
|
|
471
|
+
result,
|
|
472
|
+
EventMessageType.LocalMessage,
|
|
473
|
+
);
|
|
474
|
+
};
|
|
475
|
+
QB.chat.onDisconnectedListener = () => {
|
|
476
|
+
console.log('EVENT: disconnect');
|
|
477
|
+
};
|
|
478
|
+
QB.chat.onReconnectListener = () => {
|
|
479
|
+
console.log('EVENT: reconnect');
|
|
480
|
+
};
|
|
481
|
+
QB.chat.onMessageErrorListener = (messageId: string, error: unknown) => {
|
|
482
|
+
console.log(
|
|
483
|
+
`EVENT: receive error messageid: ${messageId}, error: ${stringifyError(
|
|
484
|
+
error,
|
|
485
|
+
)}`,
|
|
486
|
+
);
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
QB.chat.onReadStatusListener = (messageId, dialogId, userId) => {
|
|
490
|
+
console.log(
|
|
491
|
+
`EVENT: receive read message id: ${messageId}, dialogid: ${dialogId} userid: ${userId}`,
|
|
492
|
+
);
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
//
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// eslint-disable-next-line class-methods-use-this
|
|
499
|
+
public releaseEventsHandlers() {
|
|
500
|
+
QB.chat.onSessionExpiredListener = undefined;
|
|
501
|
+
QB.chat.onReconnectListener = undefined;
|
|
502
|
+
QB.chat.onDisconnectedListener = undefined;
|
|
503
|
+
QB.chat.onSystemMessageListener = undefined;
|
|
504
|
+
QB.chat.onMessageListener = undefined;
|
|
505
|
+
QB.chat.onMessageErrorListener = undefined;
|
|
506
|
+
QB.chat.onDeliveredStatusListener = undefined;
|
|
507
|
+
QB.chat.onReadStatusListener = undefined;
|
|
508
|
+
QB.chat.onMessageTypingListener = undefined;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
public async loginWithUser(authParams: LoginData) {
|
|
512
|
+
if (this.needInit) return;
|
|
513
|
+
if (this.authProcessed) return;
|
|
514
|
+
//
|
|
515
|
+
console.log('CALL createUserSession....');
|
|
516
|
+
const userRequiredParams = {
|
|
517
|
+
login: authParams.login,
|
|
518
|
+
password: authParams.password,
|
|
519
|
+
};
|
|
520
|
+
const sessionResult = await this.createUserSession(
|
|
521
|
+
userRequiredParams,
|
|
522
|
+
).catch((e) => {
|
|
523
|
+
this._needInit = true;
|
|
524
|
+
this.authProcessed = false;
|
|
525
|
+
console.log(
|
|
526
|
+
`EXCEPTION IN CREATE USER SESSION (${
|
|
527
|
+
userRequiredParams.login
|
|
528
|
+
}) : ${stringifyError(e)}`,
|
|
529
|
+
);
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
if (!sessionResult) return;
|
|
533
|
+
//
|
|
534
|
+
//
|
|
535
|
+
this.initEventsHandlers();
|
|
536
|
+
//
|
|
537
|
+
//
|
|
538
|
+
console.log('USER DATA : ', userRequiredParams);
|
|
539
|
+
console.log('USER SESSION DATA : ', sessionResult);
|
|
540
|
+
console.log('Session token : ', sessionResult.token);
|
|
541
|
+
|
|
542
|
+
const session = sessionResult;
|
|
543
|
+
const sessionDataTmp = JSON.stringify(session);
|
|
544
|
+
|
|
545
|
+
const sessionData = JSON.parse(sessionDataTmp);
|
|
546
|
+
|
|
547
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
548
|
+
console.log(`user_id = ${sessionData.user_id}`);
|
|
549
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
550
|
+
console.log(`session token to chat init = ${sessionData.token}`);
|
|
551
|
+
const authInformation = {
|
|
552
|
+
userName: authParams.login,
|
|
553
|
+
userId: sessionData.user_id,
|
|
554
|
+
sessionToken: sessionData.token,
|
|
555
|
+
password: sessionData.token,
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
const paramsConnect = {
|
|
559
|
+
userId: authInformation.userId,
|
|
560
|
+
password: authInformation.password,
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
console.log(paramsConnect);
|
|
564
|
+
//
|
|
565
|
+
const connectResult = await QBChatConnect(paramsConnect);
|
|
566
|
+
|
|
567
|
+
if (connectResult) {
|
|
568
|
+
//
|
|
569
|
+
this._authInformation = authInformation;
|
|
570
|
+
this.setAuthProcessedSuccessed();
|
|
571
|
+
console.log('CHAT CONNECTED. CAN WORK!');
|
|
572
|
+
console.log('CONNECTION DATA: ', JSON.stringify(authInformation));
|
|
573
|
+
// //
|
|
574
|
+
// this.initEventsHandlers();
|
|
575
|
+
// //
|
|
576
|
+
} else {
|
|
577
|
+
console.log('could not connect to chat');
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
//
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
async getDialogs(pagination?: Pagination): Promise<RemoteDialogsDTO> {
|
|
584
|
+
let currentPagination: Pagination = pagination || new Pagination();
|
|
585
|
+
|
|
586
|
+
console.log(
|
|
587
|
+
'call getDialogs in RemoteDataSourceMock param pagination: ',
|
|
588
|
+
JSON.stringify(pagination),
|
|
589
|
+
);
|
|
590
|
+
console.log(
|
|
591
|
+
'call getDialogs in RemoteDataSourceMock with result pagination: ',
|
|
592
|
+
JSON.stringify(currentPagination),
|
|
593
|
+
);
|
|
594
|
+
const pageNumber = currentPagination.getCurrentPage() || 1;
|
|
595
|
+
|
|
596
|
+
console.log('pageNumber: ', pageNumber);
|
|
597
|
+
const perPage = currentPagination.perPage || 100;
|
|
598
|
+
|
|
599
|
+
console.log('perPage: ', perPage);
|
|
600
|
+
const params = {
|
|
601
|
+
created_at: {
|
|
602
|
+
lt: Date.now() / 1000,
|
|
603
|
+
},
|
|
604
|
+
// sort_desc: 'created_at',// artan 19.0.2024
|
|
605
|
+
sort_desc: 'updated_at',
|
|
606
|
+
page: pageNumber,
|
|
607
|
+
// per_page: perPage,
|
|
608
|
+
limit: perPage,
|
|
609
|
+
type: {
|
|
610
|
+
in: [2, 3],
|
|
611
|
+
},
|
|
612
|
+
};
|
|
613
|
+
// filter['type[in]'] = [3, 2].join(',');
|
|
614
|
+
|
|
615
|
+
console.log(
|
|
616
|
+
'call getDialogs in RemoteDataSourceMock with params: ',
|
|
617
|
+
JSON.stringify(params),
|
|
618
|
+
);
|
|
619
|
+
const dialogsDTO: Array<RemoteDialogDTO> = [];
|
|
620
|
+
const qbDialogs: QBGetDialogResult | undefined = await QBGetDialogs(params);
|
|
621
|
+
|
|
622
|
+
if (qbDialogs) {
|
|
623
|
+
console.log(
|
|
624
|
+
`request completed. have: total_entries ${
|
|
625
|
+
qbDialogs.total_entries
|
|
626
|
+
}, limit: ${qbDialogs.limit}, skip: ${
|
|
627
|
+
qbDialogs.skip
|
|
628
|
+
} items: ${JSON.stringify(qbDialogs.items)}`,
|
|
629
|
+
);
|
|
630
|
+
currentPagination = new Pagination(0, perPage);
|
|
631
|
+
currentPagination.totalPages = qbDialogs.total_entries / perPage;
|
|
632
|
+
currentPagination.setCurrentPage(pageNumber);
|
|
633
|
+
|
|
634
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
635
|
+
for (const item of qbDialogs.items) {
|
|
636
|
+
const qbEntity: QBChatDialog = item;
|
|
637
|
+
|
|
638
|
+
const newDTO: RemoteDialogDTO =
|
|
639
|
+
// eslint-disable-next-line no-await-in-loop
|
|
640
|
+
await this.getCurrentDialogDTOMapper().toTDO(qbEntity);
|
|
641
|
+
|
|
642
|
+
// artan 27/06/23
|
|
643
|
+
if (newDTO.type === DialogType.group) {
|
|
644
|
+
// eslint-disable-next-line no-await-in-loop
|
|
645
|
+
await QBJoinGroupDialog(newDTO.id).catch(() => {
|
|
646
|
+
throw new RemoteDataSourceException(
|
|
647
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
648
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
649
|
+
);
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
//
|
|
654
|
+
|
|
655
|
+
dialogsDTO.push(newDTO);
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
return Promise.resolve(new RemoteDialogsDTO(dialogsDTO, currentPagination));
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
// eslint-disable-next-line class-methods-use-this
|
|
663
|
+
async createDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO> {
|
|
664
|
+
console.log(
|
|
665
|
+
'call createDialog in remote with params: ',
|
|
666
|
+
JSON.stringify(dto),
|
|
667
|
+
);
|
|
668
|
+
const qbEntity: QBChatDialog =
|
|
669
|
+
await this.getCurrentDialogDTOMapper().fromDTO(dto);
|
|
670
|
+
|
|
671
|
+
let qbDialog: QBChatDialog | undefined | null;
|
|
672
|
+
|
|
673
|
+
if (qbEntity.type === DialogType.private) {
|
|
674
|
+
const participantId = qbEntity.occupants_ids[0];
|
|
675
|
+
|
|
676
|
+
qbDialog = await QBCreatePrivateDialog(participantId, qbEntity.name);
|
|
677
|
+
} else if (qbEntity.type === DialogType.group) {
|
|
678
|
+
const participants = qbEntity.occupants_ids;
|
|
679
|
+
|
|
680
|
+
const data = { photo: qbEntity.photo };
|
|
681
|
+
|
|
682
|
+
qbDialog = await QBCreateGroupDialog(participants, qbEntity.name, data);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
if (qbDialog === null || qbDialog === undefined) {
|
|
686
|
+
return Promise.reject(
|
|
687
|
+
new RemoteDataSourceException(
|
|
688
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
689
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
690
|
+
),
|
|
691
|
+
);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
const newDTO: RemoteDialogDTO =
|
|
695
|
+
await this.getCurrentDialogDTOMapper().toTDO(qbDialog);
|
|
696
|
+
|
|
697
|
+
console.log(
|
|
698
|
+
'have result in createDialog in remote ds: ',
|
|
699
|
+
JSON.stringify(newDTO),
|
|
700
|
+
);
|
|
701
|
+
|
|
702
|
+
return Promise.resolve(newDTO);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
async updateDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO> {
|
|
706
|
+
const qbEntity: QBChatDialog =
|
|
707
|
+
await this.getCurrentDialogDTOMapper().fromDTO(dto);
|
|
708
|
+
|
|
709
|
+
let data = {};
|
|
710
|
+
|
|
711
|
+
if (qbEntity.name && qbEntity.name.length > 0) {
|
|
712
|
+
data = {
|
|
713
|
+
name: qbEntity.name,
|
|
714
|
+
// photo: qbEntity.photo,
|
|
715
|
+
// photo: 'null',
|
|
716
|
+
...data,
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
if (qbEntity.photo) {
|
|
720
|
+
data = {
|
|
721
|
+
...data,
|
|
722
|
+
photo: qbEntity.photo,
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
if (qbEntity.new_occupants_ids?.length > 0) {
|
|
726
|
+
data = {
|
|
727
|
+
...data,
|
|
728
|
+
push_all: { occupants_ids: qbEntity.new_occupants_ids },
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
const qbDialogs: QBChatDialog = await QBUpdateDialog(qbEntity._id, data);
|
|
733
|
+
|
|
734
|
+
if (qbDialogs === null || qbDialogs === undefined) {
|
|
735
|
+
return Promise.reject(
|
|
736
|
+
new RemoteDataSourceException(
|
|
737
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
738
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
739
|
+
),
|
|
740
|
+
);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
const newDTO: RemoteDialogDTO =
|
|
744
|
+
await this.getCurrentDialogDTOMapper().toTDO(qbDialogs);
|
|
745
|
+
|
|
746
|
+
return Promise.resolve(newDTO);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
// eslint-disable-next-line class-methods-use-this
|
|
750
|
+
async getDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO> {
|
|
751
|
+
const qbEntity: QBChatDialog =
|
|
752
|
+
await this.getCurrentDialogDTOMapper().fromDTO(dto);
|
|
753
|
+
|
|
754
|
+
const qbDialog: QBGetDialogResult | undefined = await QBGetDialogById(
|
|
755
|
+
qbEntity._id,
|
|
756
|
+
);
|
|
757
|
+
|
|
758
|
+
if (qbDialog === null || qbDialog === undefined) {
|
|
759
|
+
return Promise.reject(
|
|
760
|
+
new RemoteDataSourceException(
|
|
761
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
762
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
763
|
+
),
|
|
764
|
+
);
|
|
765
|
+
}
|
|
766
|
+
const qbEntityFromDB: QBChatDialog = qbDialog.items[0];
|
|
767
|
+
|
|
768
|
+
const resultDTO: RemoteDialogDTO =
|
|
769
|
+
await this.getCurrentDialogDTOMapper().toTDO(qbEntityFromDB);
|
|
770
|
+
|
|
771
|
+
return Promise.resolve(resultDTO);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// eslint-disable-next-line class-methods-use-this
|
|
775
|
+
async deleteDialog(dto: RemoteDialogDTO): Promise<void> {
|
|
776
|
+
const qbEntity: QBChatDialog =
|
|
777
|
+
await this.getCurrentDialogDTOMapper().fromDTO(dto);
|
|
778
|
+
|
|
779
|
+
await QBDeleteDialog([qbEntity._id]).catch(() => {
|
|
780
|
+
throw new RemoteDataSourceException(
|
|
781
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
782
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
783
|
+
);
|
|
784
|
+
});
|
|
785
|
+
|
|
786
|
+
return Promise.resolve();
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
async deleteUsersFromDialog(
|
|
790
|
+
dialogDTO: RemoteDialogDTO,
|
|
791
|
+
usersDTO: Array<RemoteUserDTO>,
|
|
792
|
+
): Promise<void> {
|
|
793
|
+
const qbEntity: QBChatDialog =
|
|
794
|
+
await this.getCurrentDialogDTOMapper().fromDTO(dialogDTO);
|
|
795
|
+
const usersIds: string[] = [];
|
|
796
|
+
|
|
797
|
+
usersDTO.forEach((item) => {
|
|
798
|
+
usersIds.push(item.id);
|
|
799
|
+
});
|
|
800
|
+
|
|
801
|
+
let data = {};
|
|
802
|
+
|
|
803
|
+
if (usersIds.length > 0) {
|
|
804
|
+
data = {
|
|
805
|
+
pull_all: { occupants_ids: usersIds },
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
const qbDialogs: QBChatDialog = await QBUpdateDialog(qbEntity._id, data);
|
|
809
|
+
|
|
810
|
+
if (qbDialogs === null || qbDialogs === undefined) {
|
|
811
|
+
return Promise.reject(
|
|
812
|
+
new RemoteDataSourceException(
|
|
813
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
814
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
815
|
+
),
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
return Promise.resolve();
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
823
|
+
async getUser(dto: RemoteUserDTO): Promise<RemoteUserDTO> {
|
|
824
|
+
const currentItem: QBUser | undefined = await QBUsersGetById(
|
|
825
|
+
parseInt(dto.id, 10),
|
|
826
|
+
);
|
|
827
|
+
|
|
828
|
+
if (currentItem === null || currentItem === undefined) {
|
|
829
|
+
return Promise.reject(
|
|
830
|
+
new RemoteDataSourceException(
|
|
831
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
832
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
833
|
+
),
|
|
834
|
+
);
|
|
835
|
+
}
|
|
836
|
+
let dtoUser: RemoteUserDTO | undefined;
|
|
837
|
+
|
|
838
|
+
try {
|
|
839
|
+
dtoUser = await this.userDTOMapper.toTDO<QBUser, RemoteUserDTO>(
|
|
840
|
+
currentItem,
|
|
841
|
+
);
|
|
842
|
+
} catch (e) {
|
|
843
|
+
console.log('problem with:');
|
|
844
|
+
console.log(JSON.stringify(currentItem));
|
|
845
|
+
console.log((e as MapperDTOException).message);
|
|
846
|
+
console.log((e as MapperDTOException)._description);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
if (dtoUser !== null || dtoUser !== undefined) {
|
|
850
|
+
return Promise.resolve(dtoUser as RemoteUserDTO);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
return Promise.reject(
|
|
854
|
+
new RemoteDataSourceException(
|
|
855
|
+
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE,
|
|
856
|
+
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE,
|
|
857
|
+
`not found user with id: ${dto.id} (${dto.full_name})`,
|
|
858
|
+
),
|
|
859
|
+
);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
863
|
+
async getUsers(remoteUsersDTO: RemoteUsersDTO): Promise<RemoteUsersDTO> {
|
|
864
|
+
const usersDTO: Array<RemoteUserDTO> = new Array<RemoteUserDTO>();
|
|
865
|
+
|
|
866
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
867
|
+
for (const item of remoteUsersDTO.users) {
|
|
868
|
+
// eslint-disable-next-line no-await-in-loop
|
|
869
|
+
const userDTO = await this.getUser(item);
|
|
870
|
+
|
|
871
|
+
usersDTO.push(userDTO);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
return Promise.resolve(new RemoteUsersDTO(usersDTO, new Pagination()));
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
//
|
|
878
|
+
// eslint-disable-next-line class-methods-use-this
|
|
879
|
+
public async getAllUsers(
|
|
880
|
+
pagination: Pagination,
|
|
881
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
882
|
+
filter?: string,
|
|
883
|
+
): Promise<PaginatedDTOResult> {
|
|
884
|
+
console.log('call getAllUsers');
|
|
885
|
+
|
|
886
|
+
console.log('pagination: ', JSON.stringify(pagination));
|
|
887
|
+
|
|
888
|
+
const users: RemoteUserDTO[] = [];
|
|
889
|
+
const pageTemplate = {
|
|
890
|
+
pageSize: pagination.perPage,
|
|
891
|
+
startPageNumber: pagination.getCurrentPage(),
|
|
892
|
+
};
|
|
893
|
+
const pageNumber = pageTemplate.startPageNumber;
|
|
894
|
+
const resultPagination = new Pagination(
|
|
895
|
+
pageNumber,
|
|
896
|
+
pageTemplate.startPageNumber,
|
|
897
|
+
);
|
|
898
|
+
|
|
899
|
+
let params: GetUserParams = {
|
|
900
|
+
per_page: pageTemplate.pageSize,
|
|
901
|
+
page: pageNumber,
|
|
902
|
+
};
|
|
903
|
+
|
|
904
|
+
if (filter && filter.length > 2) {
|
|
905
|
+
params = {
|
|
906
|
+
full_name: filter,
|
|
907
|
+
per_page: pageTemplate.pageSize,
|
|
908
|
+
page: pageNumber > 0 ? pageNumber : 1,
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
console.log('params: ', JSON.stringify(params));
|
|
913
|
+
|
|
914
|
+
// eslint-disable-next-line no-await-in-loop
|
|
915
|
+
const response: ListUserResponse | void = await QBUsersGet(params).catch(
|
|
916
|
+
(err) => {
|
|
917
|
+
console.log('catch call QBUsersGet : ', stringifyError(err));
|
|
918
|
+
},
|
|
919
|
+
);
|
|
920
|
+
|
|
921
|
+
if (response === undefined || response === null) {
|
|
922
|
+
throw new RemoteDataSourceException(
|
|
923
|
+
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_MESSAGE,
|
|
924
|
+
NOT_FOUND_REMOTE_DATASOURCE_EXCEPTION_CODE,
|
|
925
|
+
`params: ${JSON.stringify(params)}`,
|
|
926
|
+
);
|
|
927
|
+
}
|
|
928
|
+
let currentItem: QBUser;
|
|
929
|
+
|
|
930
|
+
console.log('response: total_entries: ', response.total_entries);
|
|
931
|
+
console.log('response: per_page: ', response.per_page);
|
|
932
|
+
console.log('response: current_page: ', response.current_page);
|
|
933
|
+
|
|
934
|
+
resultPagination.totalPages =
|
|
935
|
+
response.total_entries / pageTemplate.pageSize;
|
|
936
|
+
resultPagination.setCurrentPage(response.current_page);
|
|
937
|
+
console.log(
|
|
938
|
+
`response result: count of items ${
|
|
939
|
+
response.items.length
|
|
940
|
+
} items: ${JSON.stringify(response.items)}`,
|
|
941
|
+
);
|
|
942
|
+
try {
|
|
943
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
944
|
+
for (const item of response.items) {
|
|
945
|
+
currentItem = item.user;
|
|
946
|
+
// eslint-disable-next-line no-await-in-loop
|
|
947
|
+
const dtoUser: RemoteUserDTO = await this.userDTOMapper.toTDO<
|
|
948
|
+
QBUser,
|
|
949
|
+
RemoteUserDTO
|
|
950
|
+
>(currentItem);
|
|
951
|
+
|
|
952
|
+
users.push(dtoUser);
|
|
953
|
+
}
|
|
954
|
+
} catch (e) {
|
|
955
|
+
console.log('problem with:');
|
|
956
|
+
console.log(JSON.stringify(currentItem!));
|
|
957
|
+
console.log((e as MapperDTOException).message);
|
|
958
|
+
console.log((e as MapperDTOException)._description);
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
return { ResultData: users, PaginationResult: resultPagination };
|
|
962
|
+
}
|
|
963
|
+
//
|
|
964
|
+
//
|
|
965
|
+
|
|
966
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment
|
|
967
|
+
// @ts-ignore
|
|
968
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this
|
|
969
|
+
async getMessages(
|
|
970
|
+
dialogId: string,
|
|
971
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
972
|
+
pagination: Pagination,
|
|
973
|
+
): Promise<RemoteMessagesDTO> {
|
|
974
|
+
const messagesDTO: Array<RemoteMessageDTO> = new Array<RemoteMessageDTO>();
|
|
975
|
+
|
|
976
|
+
const qbMessages: GetMessagesResult = await qbChatGetMessagesExtended(
|
|
977
|
+
dialogId,
|
|
978
|
+
);
|
|
979
|
+
|
|
980
|
+
if (qbMessages === null || qbMessages === undefined) {
|
|
981
|
+
return Promise.reject(
|
|
982
|
+
new RemoteDataSourceException(
|
|
983
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
984
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
985
|
+
),
|
|
986
|
+
);
|
|
987
|
+
}
|
|
988
|
+
console.log(
|
|
989
|
+
`GET MESSAGES ${qbMessages.items.length} FROM SERVER: ${JSON.stringify(
|
|
990
|
+
qbMessages,
|
|
991
|
+
)} `,
|
|
992
|
+
);
|
|
993
|
+
const currentUserId = this._authInformation?.userId;
|
|
994
|
+
|
|
995
|
+
await Promise.all(
|
|
996
|
+
qbMessages.items.map(async (currentItem) => {
|
|
997
|
+
const dtoMessage: RemoteMessageDTO = await this.messageDTOMapper.toTDO<
|
|
998
|
+
QBChatMessage,
|
|
999
|
+
RemoteMessageDTO
|
|
1000
|
+
>(currentItem);
|
|
1001
|
+
|
|
1002
|
+
if (
|
|
1003
|
+
this.authProcessed &&
|
|
1004
|
+
currentUserId &&
|
|
1005
|
+
dtoMessage.read_ids &&
|
|
1006
|
+
dtoMessage.read_ids.length > 0 &&
|
|
1007
|
+
dtoMessage.read_ids.includes(currentUserId) === false
|
|
1008
|
+
) {
|
|
1009
|
+
QBChatMarkMessageRead({
|
|
1010
|
+
messageId: dtoMessage.id,
|
|
1011
|
+
dialogId: dtoMessage.dialogId,
|
|
1012
|
+
userId: currentUserId,
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
messagesDTO.push(dtoMessage);
|
|
1017
|
+
|
|
1018
|
+
return dtoMessage;
|
|
1019
|
+
}),
|
|
1020
|
+
);
|
|
1021
|
+
|
|
1022
|
+
return Promise.resolve(
|
|
1023
|
+
new RemoteMessagesDTO(messagesDTO, new Pagination()),
|
|
1024
|
+
);
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
// eslint-disable-next-line class-methods-use-this
|
|
1028
|
+
async typingMessageStart(
|
|
1029
|
+
dialogDTO: RemoteDialogDTO,
|
|
1030
|
+
senderId: number,
|
|
1031
|
+
): Promise<void> {
|
|
1032
|
+
const qbEntity: QBChatDialog =
|
|
1033
|
+
await this.getCurrentDialogDTOMapper().fromDTO(dialogDTO);
|
|
1034
|
+
|
|
1035
|
+
if (dialogDTO.type === DialogType.group) {
|
|
1036
|
+
await QBJoinGroupDialog(dialogDTO.id).catch(() => {
|
|
1037
|
+
throw new RemoteDataSourceException(
|
|
1038
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1039
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1040
|
+
);
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
QBSendIsTypingStatus(qbEntity, senderId);
|
|
1045
|
+
|
|
1046
|
+
return Promise.resolve();
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
// eslint-disable-next-line class-methods-use-this
|
|
1050
|
+
async typingMessageStop(
|
|
1051
|
+
dialogDTO: RemoteDialogDTO,
|
|
1052
|
+
senderId: number,
|
|
1053
|
+
): Promise<void> {
|
|
1054
|
+
const qbEntity: QBChatDialog =
|
|
1055
|
+
await this.getCurrentDialogDTOMapper().fromDTO(dialogDTO);
|
|
1056
|
+
|
|
1057
|
+
QBSendIsStopTypingStatus(qbEntity, senderId);
|
|
1058
|
+
|
|
1059
|
+
return Promise.resolve();
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1063
|
+
async sendMessage(dto: RemoteMessageDTO): Promise<RemoteMessageDTO> {
|
|
1064
|
+
console.log('call sendMessage');
|
|
1065
|
+
//
|
|
1066
|
+
|
|
1067
|
+
//
|
|
1068
|
+
const messageText = dto.message;
|
|
1069
|
+
|
|
1070
|
+
const qbEntity: QBChatNewMessage = {
|
|
1071
|
+
type: dto.dialog_type === DialogType.private ? 'chat' : 'groupchat',
|
|
1072
|
+
body: messageText,
|
|
1073
|
+
notification_type: dto.notification_type,
|
|
1074
|
+
dialog_id: dto.dialogId,
|
|
1075
|
+
extension: {
|
|
1076
|
+
save_to_history: 1,
|
|
1077
|
+
dialog_id: dto.dialogId,
|
|
1078
|
+
notification_type: dto.notification_type,
|
|
1079
|
+
sender_id: dto.sender_id || dto.recipient_id,
|
|
1080
|
+
qb_message_action: dto.qb_message_action, // 'forward' 'reply'
|
|
1081
|
+
origin_sender_name: dto.origin_sender_name,
|
|
1082
|
+
qb_original_messages: MessageDTOMapper.translateOriginalDataToJSON(
|
|
1083
|
+
MessageDTOMapper.convertToQBChatNewMessage(
|
|
1084
|
+
dto.qb_original_messages || [],
|
|
1085
|
+
) || [],
|
|
1086
|
+
),
|
|
1087
|
+
},
|
|
1088
|
+
markable: 1,
|
|
1089
|
+
};
|
|
1090
|
+
|
|
1091
|
+
if (dto.attachments?.length > 0) {
|
|
1092
|
+
qbEntity.extension.attachments = [];
|
|
1093
|
+
dto.attachments.forEach((att) => {
|
|
1094
|
+
const chatMessageAttachment: ChatMessageAttachment = {
|
|
1095
|
+
id: att.id,
|
|
1096
|
+
name: att.name,
|
|
1097
|
+
size: att.size,
|
|
1098
|
+
type: att.type.toString(),
|
|
1099
|
+
uid: att.uid,
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
qbEntity.extension.attachments?.push(chatMessageAttachment);
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
let qbMessageId: QBChatMessage['_id'];
|
|
1106
|
+
|
|
1107
|
+
if (dto.dialog_type === DialogType.private) {
|
|
1108
|
+
qbMessageId = await QBChatSendMessage(dto.recipient_id, qbEntity);
|
|
1109
|
+
} else {
|
|
1110
|
+
await QBJoinGroupDialog(dto.dialogId).catch(() => {
|
|
1111
|
+
throw new RemoteDataSourceException(
|
|
1112
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1113
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1114
|
+
);
|
|
1115
|
+
});
|
|
1116
|
+
const dialogJid = QB.chat.helpers.getRoomJidFromDialogId(dto.dialogId);
|
|
1117
|
+
|
|
1118
|
+
qbMessageId = await QBChatSendMessage(dialogJid, qbEntity);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
if (qbMessageId === null || qbMessageId === undefined) {
|
|
1122
|
+
return Promise.reject(
|
|
1123
|
+
new RemoteDataSourceException(
|
|
1124
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1125
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1126
|
+
),
|
|
1127
|
+
);
|
|
1128
|
+
}
|
|
1129
|
+
console.log('regular message was sent');
|
|
1130
|
+
// eslint-disable-next-line no-param-reassign
|
|
1131
|
+
dto.id = qbMessageId;
|
|
1132
|
+
|
|
1133
|
+
return Promise.resolve(dto);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
// eslint-disable-next-line class-methods-use-this
|
|
1137
|
+
|
|
1138
|
+
// eslint-disable-next-line class-methods-use-this
|
|
1139
|
+
async sendSystemMessage(dto: RemoteMessageDTO): Promise<boolean> {
|
|
1140
|
+
let qbMessages: QBSystemMessage | QBChatMessage['_id'] | undefined;
|
|
1141
|
+
|
|
1142
|
+
if (dto.notification_type && dto.notification_type.length > 0) {
|
|
1143
|
+
const systemMessage: QBSystemMessage = {
|
|
1144
|
+
body: null,
|
|
1145
|
+
id: '',
|
|
1146
|
+
userId: this.authInformation?.userId || 0,
|
|
1147
|
+
extension: {
|
|
1148
|
+
notification_type: dto.notification_type,
|
|
1149
|
+
dialog_id: dto.dialogId,
|
|
1150
|
+
},
|
|
1151
|
+
};
|
|
1152
|
+
|
|
1153
|
+
qbMessages = await QBChatSendSystemMessage(
|
|
1154
|
+
dto.recipient_id,
|
|
1155
|
+
systemMessage,
|
|
1156
|
+
);
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
if (qbMessages === null || qbMessages === undefined) {
|
|
1160
|
+
return Promise.reject(
|
|
1161
|
+
new RemoteDataSourceException(
|
|
1162
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1163
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1164
|
+
),
|
|
1165
|
+
);
|
|
1166
|
+
}
|
|
1167
|
+
console.log('system message was sent');
|
|
1168
|
+
|
|
1169
|
+
return Promise.resolve(true);
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1173
|
+
async updateMessage(
|
|
1174
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1175
|
+
dto: RemoteMessageDTO,
|
|
1176
|
+
): Promise<RemoteMessageDTO> {
|
|
1177
|
+
const qbEntity: QBChatMessage = await this.messageDTOMapper.fromDTO(dto);
|
|
1178
|
+
|
|
1179
|
+
const storageValue = localStorage.getItem('qbMessages');
|
|
1180
|
+
const result: string = storageValue ?? '';
|
|
1181
|
+
|
|
1182
|
+
const qbMessages: Record<string, QBChatMessage> =
|
|
1183
|
+
result === '' ? {} : JSON.parse(result);
|
|
1184
|
+
|
|
1185
|
+
if (qbMessages === null || qbMessages === undefined) {
|
|
1186
|
+
return Promise.reject(
|
|
1187
|
+
new RemoteDataSourceException(
|
|
1188
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1189
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1190
|
+
),
|
|
1191
|
+
);
|
|
1192
|
+
}
|
|
1193
|
+
qbMessages[qbEntity._id] = qbEntity;
|
|
1194
|
+
|
|
1195
|
+
// TODO: How get updated QBChatDialog and return to DTO
|
|
1196
|
+
localStorage.setItem('qbMessages', JSON.stringify(qbMessages));
|
|
1197
|
+
|
|
1198
|
+
const newDTO: RemoteMessageDTO = await this.messageDTOMapper.toTDO(
|
|
1199
|
+
qbEntity,
|
|
1200
|
+
);
|
|
1201
|
+
|
|
1202
|
+
return Promise.resolve(newDTO);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1206
|
+
async deleteMessage(dto: RemoteMessageDTO): Promise<void> {
|
|
1207
|
+
const qbEntity: QBChatMessage = await this.messageDTOMapper.fromDTO(dto);
|
|
1208
|
+
|
|
1209
|
+
const storageValue = localStorage.getItem('qbMessages');
|
|
1210
|
+
const result: string = storageValue ?? '';
|
|
1211
|
+
|
|
1212
|
+
const qbMessages: Record<string, QBChatMessage> =
|
|
1213
|
+
result === '' ? {} : JSON.parse(result);
|
|
1214
|
+
|
|
1215
|
+
if (qbMessages === null || qbMessages === undefined) {
|
|
1216
|
+
return Promise.reject(
|
|
1217
|
+
new RemoteDataSourceException(
|
|
1218
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1219
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1220
|
+
),
|
|
1221
|
+
);
|
|
1222
|
+
}
|
|
1223
|
+
// TODO: try catch for delete
|
|
1224
|
+
const filteredqbMessages: Record<string, QBChatMessage> = {};
|
|
1225
|
+
|
|
1226
|
+
Object.keys(qbMessages).forEach((key) => {
|
|
1227
|
+
if (key !== qbEntity._id) {
|
|
1228
|
+
filteredqbMessages[key] = qbMessages[key];
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1231
|
+
|
|
1232
|
+
localStorage.setItem('qbMessages', JSON.stringify(filteredqbMessages));
|
|
1233
|
+
|
|
1234
|
+
return Promise.resolve();
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1238
|
+
async createFile(dto: RemoteFileDTO): Promise<RemoteFileDTO> {
|
|
1239
|
+
console.log('call createFile in remote with params: ', JSON.stringify(dto));
|
|
1240
|
+
const qbParam: QBContentParam = await this.fileDTOMapper.fromDTO(dto);
|
|
1241
|
+
|
|
1242
|
+
const result = await QBCreateAndUploadContent(qbParam).catch((err) => {
|
|
1243
|
+
console.log('Error: ', stringifyError(err));
|
|
1244
|
+
throw new RemoteDataSourceException(
|
|
1245
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1246
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1247
|
+
`exception: ${stringifyError(err)}`,
|
|
1248
|
+
);
|
|
1249
|
+
});
|
|
1250
|
+
|
|
1251
|
+
if (result === null || result === undefined) {
|
|
1252
|
+
return Promise.reject(
|
|
1253
|
+
new RemoteDataSourceException(
|
|
1254
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_MESSAGE,
|
|
1255
|
+
INCORRECT_REMOTE_DATASOURCE_DATA_EXCEPTION_CODE,
|
|
1256
|
+
),
|
|
1257
|
+
);
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
const qbContentObject: QBContentObject = result as QBContentObject;
|
|
1261
|
+
const newDto: RemoteFileDTO = await this.fileDTOMapper.toTDO<
|
|
1262
|
+
QBContentObject,
|
|
1263
|
+
RemoteFileDTO
|
|
1264
|
+
>(qbContentObject);
|
|
1265
|
+
|
|
1266
|
+
console.log(
|
|
1267
|
+
'have result in createFile in remote ds: ',
|
|
1268
|
+
JSON.stringify(newDto),
|
|
1269
|
+
);
|
|
1270
|
+
|
|
1271
|
+
return Promise.resolve(newDto);
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1275
|
+
async getFile(dto: RemoteFileDTO): Promise<RemoteFileDTO> {
|
|
1276
|
+
throw new Error('Method not implemented.');
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1280
|
+
async deleteFile(dto: RemoteFileDTO): Promise<void> {
|
|
1281
|
+
throw new Error('Method not implemented.');
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
// eslint-disable-next-line @typescript-eslint/require-await,class-methods-use-this,@typescript-eslint/no-unused-vars
|
|
1285
|
+
async subscribeToChatConnectionEvents(
|
|
1286
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1287
|
+
fileId: string,
|
|
1288
|
+
): Promise<void> {
|
|
1289
|
+
throw new Error('Method not implemented.');
|
|
1290
|
+
}
|
|
1291
|
+
}
|