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