quickblox-react-ui-kit 0.4.6-beta.4 → 0.4.7-beta.1
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/CommonTypes/CommonTypes.d.ts +13 -0
- package/dist/Data/dto/dialog/RemoteDialogDTO.d.ts +1 -0
- package/dist/Data/dto/file/LocalFileDTO.d.ts +1 -1
- package/dist/Data/dto/file/RemoteFileDTO.d.ts +1 -1
- package/dist/Data/source/remote/RemoteDataSource.d.ts +5 -0
- package/dist/Domain/entity/ChatMessageAttachmentEntity.d.ts +1 -1
- package/dist/Domain/entity/FileEntity.d.ts +1 -1
- package/dist/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.d.ts +1 -1
- package/dist/Presentation/Views/Flow/CreateDialog/CreateDialog.d.ts +1 -0
- package/dist/Presentation/ui-components/DialogItemPreview/DialogItemPreview.d.ts +3 -3
- package/dist/Presentation/ui-components/Header/Header.d.ts +1 -1
- package/dist/index-ui.d.ts +47 -3
- package/dist/index-ui.js +24961 -16978
- package/dist/index-ui.js.map +1 -1
- package/global.d.ts +3 -202
- package/package.json +2 -2
- package/src/App.scss +5 -0
- package/src/App.tsx +58 -33
- package/src/CommonTypes/CommonTypes.ts +14 -0
- package/src/Data/DefaultConfigurations.ts +4 -0
- package/src/Data/Stubs.ts +10 -0
- package/src/Data/dto/dialog/RemoteDialogDTO.ts +4 -0
- package/src/Data/dto/file/LocalFileDTO.ts +1 -1
- package/src/Data/dto/file/RemoteFileDTO.ts +1 -1
- package/src/Data/mapper/DialogRemoteDTOMapper.ts +6 -0
- package/src/Data/source/remote/Mapper/DialogDTOMapper.ts +13 -0
- package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +5 -5
- package/src/Data/source/remote/RemoteDataSource.ts +217 -153
- package/src/Domain/entity/ChatMessageAttachmentEntity.ts +1 -1
- package/src/Domain/entity/FileEntity.ts +1 -1
- package/src/Domain/use_cases/CreateDialogUseCase.ts +0 -1
- package/src/Domain/use_cases/ForwardMessagesUseCase.ts +0 -1
- package/src/Domain/use_cases/GetAllDialogsUseCase.ts +0 -1
- package/src/Domain/use_cases/GetAllDialogsUseCaseWithMock.ts +0 -2
- package/src/Domain/use_cases/GetAllMessagesForDialog.ts +0 -1
- package/src/Domain/use_cases/GetAllUsersUseCase.ts +0 -1
- package/src/Domain/use_cases/GetDialogByIdUseCase.ts +0 -2
- package/src/Domain/use_cases/GetUsersByIdsUseCase.ts +0 -1
- package/src/Domain/use_cases/LeaveDialogUseCase.ts +0 -1
- package/src/Domain/use_cases/RemoveUsersFromTheDialogUseCase.ts +0 -1
- package/src/Domain/use_cases/ReplyMessagesUseCase.ts +0 -2
- package/src/Domain/use_cases/SendTextMessageUseCase.ts +0 -3
- package/src/Domain/use_cases/SubscribeToDialogEventsUseCase.ts +0 -26
- package/src/Domain/use_cases/SubscribeToDialogsUpdatesUseCase.ts +0 -1
- package/src/Domain/use_cases/SyncDialogsUseCase.ts +1 -2
- package/src/Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase.ts +0 -2
- package/src/Domain/use_cases/UpdateDialogUseCase.ts +0 -2
- package/src/Domain/use_cases/UploadFileUseCase.ts +0 -2
- package/src/Domain/use_cases/UserTypingMessageUseCase.ts +0 -2
- package/src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts +0 -2
- package/src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts +0 -3
- package/src/Domain/use_cases/ai/AIAnswerAssistWithSDKUseCase.ts +0 -2
- package/src/Domain/use_cases/ai/AIRephraseUseCase.ts +0 -3
- package/src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts +0 -3
- package/src/Domain/use_cases/ai/AITranslateUseCase.ts +0 -2
- package/src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts +0 -3
- package/src/Domain/use_cases/ai/AITranslateWithSDKUseCase.ts +0 -3
- package/src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts +0 -1
- package/src/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.tsx +1 -1
- package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.scss +12 -6
- package/src/Presentation/Views/Dialog/AIWidgets/AIWidgetActions/AIWidgetActions.tsx +4 -2
- package/src/Presentation/Views/Dialog/Dialog.scss +7 -1
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.scss +17 -29
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.tsx +8 -13
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.scss +9 -9
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.scss +11 -0
- package/src/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.tsx +3 -2
- package/src/Presentation/Views/Dialog/useDialogViewModel.ts +76 -24
- package/src/Presentation/Views/DialogInfo/DialogInfo.scss +23 -27
- package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +2 -2
- package/src/Presentation/Views/DialogInfo/DialogMemberButton/DialogMembersButton.scss +0 -17
- package/src/Presentation/Views/DialogInfo/MembersList/MembersList.scss +9 -1
- package/src/Presentation/Views/DialogInfo/UsersList/SingleUser/SingleUser.scss +0 -1
- package/src/Presentation/Views/DialogInfo/UsersList/useUsersListViewModel.ts +2 -4
- package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +38 -13
- package/src/Presentation/Views/EditDialog/EditDialog.scss +1 -38
- package/src/Presentation/Views/Flow/CreateDialog/CreateDialog.scss +17 -42
- package/src/Presentation/Views/Flow/CreateDialog/CreateDialog.tsx +45 -39
- package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +6 -2
- package/src/Presentation/Views/InviteMembers/InviteMembers.scss +4 -33
- package/src/Presentation/Views/InviteMembers/InviteMembers.tsx +23 -4
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.scss +8 -0
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +8 -5
- package/src/Presentation/components/UI/Buttons/MainButton/MainButton.css +5 -10
- package/src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.scss +0 -5
- package/src/Presentation/components/containers/ColumnContainer/ColumnContainer.scss +1 -10
- package/src/Presentation/layouts/TestStage/LoginView/Login.scss +6 -3
- package/src/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx +1 -33
- package/src/Presentation/themes/styles/_theme_colors_scheme.scss +1 -1
- package/src/Presentation/themes/styles/_theme_dark.scss +5 -4
- package/src/Presentation/themes/styles/_theme_light.scss +3 -2
- package/src/Presentation/ui-components/Avatar/Avatar.scss +8 -5
- package/src/Presentation/ui-components/Avatar/Avatar.tsx +2 -1
- package/src/Presentation/ui-components/Badge/Badge.tsx +1 -0
- package/src/Presentation/ui-components/Button/Button.scss +5 -6
- package/src/Presentation/ui-components/Button/Button.tsx +7 -2
- package/src/Presentation/ui-components/CheckBox/CheckBox.scss +23 -0
- package/src/Presentation/ui-components/CheckBox/CheckBox.tsx +19 -7
- package/src/Presentation/ui-components/DialogBanner/DialogBanner.tsx +1 -0
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.scss +3 -3
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx +3 -3
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.scss +7 -4
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.tsx +1 -1
- package/src/Presentation/ui-components/Dropdown/Dropdown.tsx +1 -1
- package/src/Presentation/ui-components/Dropdown/DropdownOption.tsx +2 -1
- package/src/Presentation/ui-components/Header/Header.scss +9 -2
- package/src/Presentation/ui-components/Header/Header.tsx +1 -1
- package/src/Presentation/ui-components/Loader/Loader.tsx +1 -0
- package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.scss +1 -0
- package/src/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.tsx +1 -0
- package/src/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.tsx +1 -0
- package/src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.scss +13 -3
- package/src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.tsx +1 -0
- package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.tsx +1 -0
- package/src/Presentation/ui-components/Message/FileUrl/FileUrl.scss +0 -3
- package/src/Presentation/ui-components/Message/FileUrl/FileUrl.tsx +1 -0
- package/src/Presentation/ui-components/Message/Message.scss +5 -1
- package/src/Presentation/ui-components/MessageInput/MessageInput.scss +5 -1
- package/src/Presentation/ui-components/MessageInput/MessageInput.tsx +1 -1
- package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.tsx +1 -1
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.scss +13 -13
- package/src/Presentation/ui-components/Placeholder/Placeholder.scss +5 -0
- package/src/Presentation/ui-components/Placeholder/Placeholder.tsx +1 -1
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.scss +4 -1
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx +1 -0
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.scss +5 -1
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.tsx +1 -1
- package/src/Presentation/ui-components/TextField/TextField.scss +5 -3
- package/src/Presentation/ui-components/Toast/Toast.scss +3 -3
- package/src/Presentation/ui-components/Toast/ToastProvider.tsx +2 -2
- package/src/Presentation/ui-components/UserListItem/UserListItem.scss +11 -3
- package/src/Presentation/ui-components/UserListItem/UserListItem.tsx +1 -0
- package/src/QBconfig.ts +2 -0
- package/src/hooks/useQuickBloxUIKit.ts +101 -18
- package/src/index-ui.ts +111 -18
- package/src/qb-api-calls/index.ts +52 -3
- package/storybook-static/{217.3c66ff1e.iframe.bundle.js → 217.07d5c7a3.iframe.bundle.js} +3 -3
- package/storybook-static/{217.3c66ff1e.iframe.bundle.js.map → 217.07d5c7a3.iframe.bundle.js.map} +1 -1
- package/storybook-static/363.a2d33b79.iframe.bundle.js +2 -0
- package/storybook-static/{363.2cb21716.iframe.bundle.js.LICENSE.txt → 363.a2d33b79.iframe.bundle.js.LICENSE.txt} +0 -13
- package/storybook-static/735.6ee62079.iframe.bundle.js +2 -0
- package/storybook-static/{844.6041e1a5.iframe.bundle.js → 844.e8bfd664.iframe.bundle.js} +3 -3
- package/storybook-static/{844.6041e1a5.iframe.bundle.js.map → 844.e8bfd664.iframe.bundle.js.map} +1 -1
- package/storybook-static/{961.c94da456.iframe.bundle.js → 961.d47fc2bc.iframe.bundle.js} +2 -2
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.a5ba7608.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.c8824861.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Button-Button-stories.fa2aa72c.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.b6998344.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.a724643f.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.a03feb06.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Header-Header-stories.978f0af5.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.4e80520d.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Message-Message-stories.213a90f6.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.9b4b2514.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.e7f5a274.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.969cfe2e.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Toast-Toast-stories.4f00432b.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.1713eab7.iframe.bundle.js +2 -0
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/project.json +1 -1
- package/storybook-static/{runtime~main.5a7ba727.iframe.bundle.js → runtime~main.940703c6.iframe.bundle.js} +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +3 -3
- package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
- package/storybook-static/sb-manager/globals-runtime.js +1 -1
- package/.env +0 -1
- package/src/package_artan_react_ui.json +0 -91
- package/src/package_original.json +0 -115
- package/storybook-static/363.2cb21716.iframe.bundle.js +0 -2
- package/storybook-static/735.82f96f8a.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.b363e9a1.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.85dd97b0.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Button-Button-stories.1e4ae2b4.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.4e25a94d.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.e22e8be5.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.8321872b.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Header-Header-stories.1cff200a.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.7391dde4.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Message-Message-stories.49f0dbbf.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.4aa88de3.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.d74853ab.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.19812f7d.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Toast-Toast-stories.5e19f10e.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.d2f60e13.iframe.bundle.js +0 -2
- /package/storybook-static/{217.3c66ff1e.iframe.bundle.js.LICENSE.txt → 217.07d5c7a3.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{735.82f96f8a.iframe.bundle.js.LICENSE.txt → 735.6ee62079.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{844.6041e1a5.iframe.bundle.js.LICENSE.txt → 844.e8bfd664.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{961.c94da456.iframe.bundle.js.LICENSE.txt → 961.d47fc2bc.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Avatar-avatar-stories.b363e9a1.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Avatar-avatar-stories.a5ba7608.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Badge-Badge-stories.85dd97b0.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Badge-Badge-stories.c8824861.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Button-Button-stories.1e4ae2b4.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Button-Button-stories.fa2aa72c.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.4e25a94d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.b6998344.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-DialogWindow-DialogWindow-stories.e22e8be5.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-DialogWindow-DialogWindow-stories.a724643f.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Dropdown-Dropdown-stories.8321872b.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Dropdown-Dropdown-stories.a03feb06.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Header-Header-stories.1cff200a.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Header-Header-stories.978f0af5.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Loader-Loader-stories.7391dde4.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Loader-Loader-stories.4e80520d.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Message-Message-stories.49f0dbbf.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Message-Message-stories.213a90f6.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-SettingsItem-SettingsItem-stories.d74853ab.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-SettingsItem-SettingsItem-stories.e7f5a274.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-TextField-TextField-stories.19812f7d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-TextField-TextField-stories.969cfe2e.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-UserListItem-UserListItem-stories.d2f60e13.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-UserListItem-UserListItem-stories.1713eab7.iframe.bundle.js.LICENSE.txt} +0 -0
package/global.d.ts
CHANGED
|
@@ -1,204 +1,5 @@
|
|
|
1
|
-
// interface Tone {
|
|
2
|
-
// name: string;
|
|
3
|
-
// description: string;
|
|
4
|
-
// iconEmoji: string;
|
|
5
|
-
// }
|
|
6
|
-
//
|
|
7
|
-
// type Primitive = string | number | boolean | undefined | null | Date | File;
|
|
8
|
-
|
|
9
|
-
// type SetTails<T, R extends Primitive> = T extends Array<unknown>
|
|
10
|
-
// ? Array<T[number] extends Primitive ? R : SetTails<T[number], R>>
|
|
11
|
-
// : {
|
|
12
|
-
// [K in keyof T]: T[K] extends Primitive ? R : SetTails<T[K], R>;
|
|
13
|
-
// };
|
|
14
|
-
|
|
15
|
-
// type ProxyConfig = {
|
|
16
|
-
// api: string;
|
|
17
|
-
// servername: string;
|
|
18
|
-
// port: string;
|
|
19
|
-
// };
|
|
20
|
-
// interface WidgetConfig {
|
|
21
|
-
// apiKey: string;
|
|
22
|
-
// useDefault: boolean;
|
|
23
|
-
// maxTokens: number;
|
|
24
|
-
// proxyConfig: ProxyConfig;
|
|
25
|
-
// }
|
|
26
|
-
//
|
|
27
|
-
// interface AITranslateWidgetConfig extends WidgetConfig {
|
|
28
|
-
// defaultLanguage: string;
|
|
29
|
-
// languages: string[];
|
|
30
|
-
// }
|
|
31
|
-
//
|
|
32
|
-
// interface AIRephraseWidgetConfig extends WidgetConfig {
|
|
33
|
-
// defaultTone: string;
|
|
34
|
-
// Tones: Tone[];
|
|
35
|
-
// }
|
|
36
|
-
|
|
37
|
-
// interface QBConfig {
|
|
38
|
-
// credentials: {
|
|
39
|
-
// appId: number;
|
|
40
|
-
// accountKey: string;
|
|
41
|
-
// authKey: string;
|
|
42
|
-
// authSecret: string;
|
|
43
|
-
// sessionToken: string; // ??? ui-kit
|
|
44
|
-
// };
|
|
45
|
-
// configAIApi: {
|
|
46
|
-
// // ui-kit
|
|
47
|
-
// AIAnswerAssistWidgetConfig: WidgetConfig;
|
|
48
|
-
// AITranslateWidgetConfig: AITranslateWidgetConfig;
|
|
49
|
-
// AIRephraseWidgetConfig: AIRephraseWidgetConfig;
|
|
50
|
-
// };
|
|
51
|
-
// appConfig: {
|
|
52
|
-
// maxFileSize: number; // ui-kit
|
|
53
|
-
// sessionTimeOut: number; // ?? webRTc -> ui-kit
|
|
54
|
-
// chatProtocol: {
|
|
55
|
-
// active: number;
|
|
56
|
-
// };
|
|
57
|
-
// debug: boolean;
|
|
58
|
-
// enableForwarding: boolean; // ui-kit
|
|
59
|
-
// enableReplying: boolean; // ui-kit
|
|
60
|
-
// regexUserName?: string; // ui-kit
|
|
61
|
-
// endpoints: {
|
|
62
|
-
// api: string;
|
|
63
|
-
// chat: string;
|
|
64
|
-
// };
|
|
65
|
-
// // on: {
|
|
66
|
-
// // sessionExpired: (handleResponse: any, retry: any) => Promise<void>;
|
|
67
|
-
// // };
|
|
68
|
-
// streamManagement: {
|
|
69
|
-
// enable: boolean;
|
|
70
|
-
// };
|
|
71
|
-
// };
|
|
72
|
-
// }
|
|
73
|
-
|
|
74
|
-
/*
|
|
75
|
-
* QuickBlox Types - start
|
|
76
|
-
|
|
77
|
-
*/
|
|
78
|
-
|
|
79
1
|
type Dictionary<T> = Record<string, T>;
|
|
80
|
-
//
|
|
81
|
-
// type RequiredProps<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
82
|
-
|
|
83
|
-
// declare enum QBChatProtocol {
|
|
84
|
-
// BOSH = 1,
|
|
85
|
-
// WebSockets = 2,
|
|
86
|
-
// }
|
|
87
|
-
//
|
|
88
|
-
// interface ICEServer {
|
|
89
|
-
// urls: string;
|
|
90
|
-
// username: string;
|
|
91
|
-
// credential: string;
|
|
92
|
-
// }
|
|
93
|
-
|
|
94
|
-
// declare enum QBChatDialogType {
|
|
95
|
-
// PUBLIC_GROUP = 1,
|
|
96
|
-
// GROUP = 2,
|
|
97
|
-
// PRIVATE = 3,
|
|
98
|
-
// }
|
|
99
|
-
|
|
100
|
-
// declare interface QBChatDialog {
|
|
101
|
-
// /** ID of the dialog. Generated automatically by the server after dialog creation. */
|
|
102
|
-
// _id: string;
|
|
103
|
-
// /** ID of dialog's owner. */
|
|
104
|
-
// user_id: QBUser['id'];
|
|
105
|
-
// /** Date & time when a record was created, filled automatically. */
|
|
106
|
-
// created_at: string;
|
|
107
|
-
// /** Date & time when a record was created, filled automatically. */
|
|
108
|
-
// updated_at: string;
|
|
109
|
-
// /**
|
|
110
|
-
// * Type of dialog. Possible values are:
|
|
111
|
-
// * - type=1 (`PUBLIC_GROUP`)
|
|
112
|
-
// * - type=2 (`GROUP`)
|
|
113
|
-
// * - type=3 (`PRIVATE`)
|
|
114
|
-
// */
|
|
115
|
-
// type: QBChatDialogType;
|
|
116
|
-
// /**
|
|
117
|
-
// * Name of a group chat. Makes sense if type=1 (`PUBLIC_GROUP`) or type=2 (`GROUP`).
|
|
118
|
-
// * The maximum length for the dialog name is 200 symbols.
|
|
119
|
-
// */
|
|
120
|
-
// name: string;
|
|
121
|
-
// /**
|
|
122
|
-
// * Photo of a group chat. Makes sense if type=1 (`PUBLIC_GROUP`) or type=2 (`GROUP`).
|
|
123
|
-
// * Can contain a link to a file in Content module, Custom Objects module or just a web link.
|
|
124
|
-
// */
|
|
125
|
-
// photo: null | string;
|
|
126
|
-
// /**
|
|
127
|
-
// * JID of XMPP room for group chat to connect. Nil if type=3 (PRIVATE).
|
|
128
|
-
// * Generated automatically by the server after dialog creation.
|
|
129
|
-
// */
|
|
130
|
-
// xmpp_room_jid: string | null;
|
|
131
|
-
// /** Array of users' IDs - dialog occupants. Does not make sense if type=1 (PUBLIC_GROUP). */
|
|
132
|
-
// occupants_ids: number[];
|
|
133
|
-
// /** Last sent message in this dialog. */
|
|
134
|
-
// last_message: string | null;
|
|
135
|
-
// /** Timestamp of last sent message in this dialog. */
|
|
136
|
-
// last_message_date_sent: number | null | string; // todo: switch type to number
|
|
137
|
-
// /** ID of the user who sent last message in this dialog. */
|
|
138
|
-
// last_message_user_id: QBUser['id'] | null;
|
|
139
|
-
// /** ID of last message in this dialog. */
|
|
140
|
-
// last_message_id: string | null;
|
|
141
|
-
// /** Number of unread messages in this dialog for a current user. */
|
|
142
|
-
// unread_messages_count: number | null;
|
|
143
|
-
// /**
|
|
144
|
-
// * - Information about class and fields in Custom Objects.
|
|
145
|
-
// * - Any dialog can be extended using Custom Objects to store additional parameters.
|
|
146
|
-
// */
|
|
147
|
-
// data?: {
|
|
148
|
-
// /** Class name in Custom Objects. */
|
|
149
|
-
// class_name: string;
|
|
150
|
-
// /** Field name of class in Custom Objects. Can be many: 1..N. */
|
|
151
|
-
// [field_name_N: string]: QBCustomField;
|
|
152
|
-
// };
|
|
153
|
-
// new_occupants_ids?: number[]; // TODO: EXTENDS TYPE AND SWITCH TO THIS NEW TYPE
|
|
154
|
-
// joined?: boolean; // TODO: EXTENDS TYPE AND SWITCH TO THIS NEW TYPE
|
|
155
|
-
// }
|
|
156
|
-
|
|
157
|
-
// declare interface QBChatNewMessage {
|
|
158
|
-
// type: 'chat' | 'groupchat';
|
|
159
|
-
// body: string;
|
|
160
|
-
// notification_type?: string; // TODO: NED ADD TO TYPE
|
|
161
|
-
// dialog_id: QBChatDialog['_id']; // TODO: NED ADD TO TYPE
|
|
162
|
-
// extension: {
|
|
163
|
-
// attachments?: ChatMessageAttachment[];
|
|
164
|
-
// save_to_history: 0 | 1;
|
|
165
|
-
// dialog_id: QBChatDialog['_id'];
|
|
166
|
-
// notification_type?: string; // TODO: NED ADD TO TYPE
|
|
167
|
-
// sender_id?: QBUser['id']; // TODO: NED ADD TO TYPE
|
|
168
|
-
// qb_message_action?: 'forward' | 'reply'; // TODO: NED ADD TO TYPE
|
|
169
|
-
// origin_sender_name?: string; // TODO: NED ADD TO TYPE
|
|
170
|
-
// qb_original_messages?: string; // TODO: NED ADD TO TYPE
|
|
171
|
-
// };
|
|
172
|
-
// markable: 0 | 1;
|
|
173
|
-
// }
|
|
174
2
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
// /** Connect to the chat by user id */
|
|
179
|
-
// userId: QBUser['id'];
|
|
180
|
-
// /** The user's password or session token */
|
|
181
|
-
// password: string;
|
|
182
|
-
// }
|
|
183
|
-
// | {
|
|
184
|
-
// /** Connect to the chat by user jid */
|
|
185
|
-
// jid: string;
|
|
186
|
-
// /** The user's password or session token */
|
|
187
|
-
// password: string;
|
|
188
|
-
// }
|
|
189
|
-
// | {
|
|
190
|
-
// /** Connect to the chat by user's email */
|
|
191
|
-
// email: string;
|
|
192
|
-
// /** The user's password or session token */
|
|
193
|
-
// password: string;
|
|
194
|
-
// };
|
|
195
|
-
//
|
|
196
|
-
// type QBCustomField =
|
|
197
|
-
// | string
|
|
198
|
-
// | string[]
|
|
199
|
-
// | number
|
|
200
|
-
// | number[]
|
|
201
|
-
// | boolean
|
|
202
|
-
// | boolean[]
|
|
203
|
-
// | null
|
|
204
|
-
// | undefined;
|
|
3
|
+
interface Window {
|
|
4
|
+
webkitAudioContext: typeof AudioContext;
|
|
5
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickblox-react-ui-kit",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7-beta.1",
|
|
4
4
|
"main": "dist/index-ui.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"qb-ai-core": "^0.1.3",
|
|
13
13
|
"qb-ai-rephrase": "^0.1.2",
|
|
14
14
|
"qb-ai-translate": "^0.1.2",
|
|
15
|
-
"quickblox": "^2.
|
|
15
|
+
"quickblox": "^2.20.0",
|
|
16
16
|
"media-recorder-js": "^2.1.0",
|
|
17
17
|
"react": "^18.2.0",
|
|
18
18
|
"react-dom": "^18.2.0",
|
package/src/App.scss
CHANGED
package/src/App.tsx
CHANGED
|
@@ -15,6 +15,9 @@ import QuickBloxUIKitDesktopLayout from './Presentation/layouts/Desktop/QuickBlo
|
|
|
15
15
|
import DefaultTheme from './Presentation/themes/DefaultThemes/DefaultTheme';
|
|
16
16
|
import useQbUIKitDataContext from './Presentation/providers/QuickBloxUIKitProvider/useQbUIKitDataContext';
|
|
17
17
|
import { QBConfig } from './QBconfig';
|
|
18
|
+
import MainButton, {
|
|
19
|
+
TypeButton,
|
|
20
|
+
} from './Presentation/components/UI/Buttons/MainButton/MainButton';
|
|
18
21
|
|
|
19
22
|
function App() {
|
|
20
23
|
if ((window as any).QB === undefined) {
|
|
@@ -178,6 +181,11 @@ function App() {
|
|
|
178
181
|
data,
|
|
179
182
|
);
|
|
180
183
|
await prepareContent().catch();
|
|
184
|
+
currentContext.setSubscribeOnSessionExpiredListener(() => {
|
|
185
|
+
console.timeLog('call OnSessionExpiredListener ... start');
|
|
186
|
+
// logoutHandler();
|
|
187
|
+
console.log('OnSessionExpiredListener ... end');
|
|
188
|
+
});
|
|
181
189
|
navigate('/desktop-test-mock');
|
|
182
190
|
}
|
|
183
191
|
}
|
|
@@ -201,40 +209,57 @@ function App() {
|
|
|
201
209
|
// });
|
|
202
210
|
|
|
203
211
|
return (
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
{
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
element={
|
|
221
|
-
<div>
|
|
222
|
-
<div style={{ height: '56px' }}>Q-communicate</div>
|
|
223
|
-
<QuickBloxUIKitDesktopLayout
|
|
224
|
-
theme={new DefaultTheme()}
|
|
225
|
-
uikitHeightOffset="56px"
|
|
226
|
-
// AIAssist={{
|
|
227
|
-
// enabled: true,
|
|
228
|
-
// default: true,
|
|
229
|
-
// AIWidget: defaultAIAnswer,
|
|
230
|
-
// }}
|
|
231
|
-
/>
|
|
232
|
-
</div>
|
|
233
|
-
}
|
|
234
|
-
/>
|
|
235
|
-
</Routes>
|
|
212
|
+
<>
|
|
213
|
+
<div className="btn-group">
|
|
214
|
+
<MainButton
|
|
215
|
+
typeButton={TypeButton.outlined}
|
|
216
|
+
title="Light Theme"
|
|
217
|
+
clickHandler={() => {
|
|
218
|
+
document.documentElement.setAttribute('data-theme', 'light');
|
|
219
|
+
}}
|
|
220
|
+
/>
|
|
221
|
+
<MainButton
|
|
222
|
+
typeButton={TypeButton.defaultDisabled}
|
|
223
|
+
title="Dark Theme"
|
|
224
|
+
clickHandler={() => {
|
|
225
|
+
document.documentElement.setAttribute('data-theme', 'dark');
|
|
226
|
+
}}
|
|
227
|
+
/>
|
|
236
228
|
</div>
|
|
237
|
-
|
|
229
|
+
<QuickBloxUIKitProvider
|
|
230
|
+
maxFileSize={QBConfig.appConfig.maxFileSize}
|
|
231
|
+
// SDK={QB} //init SDK
|
|
232
|
+
accountData={{ ...QBConfig.credentials, sessionToken: '' }}
|
|
233
|
+
qbConfig={{ ...QBConfig }}
|
|
234
|
+
loginData={{
|
|
235
|
+
login: currentUser.login,
|
|
236
|
+
password: currentUser.password,
|
|
237
|
+
}}
|
|
238
|
+
>
|
|
239
|
+
<div className="App">
|
|
240
|
+
<Routes>
|
|
241
|
+
{/* eslint-disable-next-line @typescript-eslint/no-misused-promises */}
|
|
242
|
+
<Route path="/" element={<Login loginHandler={loginHandler} />} />
|
|
243
|
+
<Route
|
|
244
|
+
path="/desktop-test-mock"
|
|
245
|
+
element={
|
|
246
|
+
<div>
|
|
247
|
+
<QuickBloxUIKitDesktopLayout
|
|
248
|
+
theme={new DefaultTheme()}
|
|
249
|
+
uikitHeightOffset="56px"
|
|
250
|
+
// AIAssist={{
|
|
251
|
+
// enabled: true,
|
|
252
|
+
// default: true,
|
|
253
|
+
// AIWidget: defaultAIAnswer,
|
|
254
|
+
// }}
|
|
255
|
+
/>
|
|
256
|
+
</div>
|
|
257
|
+
}
|
|
258
|
+
/>
|
|
259
|
+
</Routes>
|
|
260
|
+
</div>
|
|
261
|
+
</QuickBloxUIKitProvider>
|
|
262
|
+
</>
|
|
238
263
|
);
|
|
239
264
|
}
|
|
240
265
|
|
|
@@ -85,10 +85,23 @@ export interface QBUIKitConfig extends QBConfig {
|
|
|
85
85
|
chatProtocol: {
|
|
86
86
|
active: number;
|
|
87
87
|
};
|
|
88
|
+
pingLocalhostTimeInterval: number;
|
|
89
|
+
chatReconnectionTimeInterval: number;
|
|
88
90
|
debug: boolean;
|
|
89
91
|
enableForwarding: boolean;
|
|
90
92
|
enableReplying: boolean;
|
|
91
93
|
regexUserName?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Whether public dialogs should be shown in the dialogs list.
|
|
96
|
+
* Defaults to false if not provided.
|
|
97
|
+
*/
|
|
98
|
+
showPublicDialogsInList?: boolean;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Whether creating public dialogs is allowed.
|
|
102
|
+
* Defaults to false if not provided.
|
|
103
|
+
*/
|
|
104
|
+
allowPublicDialogCreation?: boolean;
|
|
92
105
|
endpoints: {
|
|
93
106
|
api: string;
|
|
94
107
|
chat: string;
|
|
@@ -176,6 +189,7 @@ export interface QBUIKitChatDialog extends QBChatDialog {
|
|
|
176
189
|
};
|
|
177
190
|
new_occupants_ids?: number[]; // TODO: EXTENDS TYPE AND SWITCH TO THIS NEW TYPE
|
|
178
191
|
joined?: boolean; // TODO: EXTENDS TYPE AND SWITCH TO THIS NEW TYPE
|
|
192
|
+
is_join_required: number | undefined | null;
|
|
179
193
|
}
|
|
180
194
|
|
|
181
195
|
export interface QBUIKitChatNewMessage extends QBChatNewMessage {
|
|
@@ -260,10 +260,14 @@ export class DefaultConfigurations {
|
|
|
260
260
|
chatProtocol: {
|
|
261
261
|
active: 2,
|
|
262
262
|
},
|
|
263
|
+
pingLocalhostTimeInterval: 0,
|
|
264
|
+
chatReconnectionTimeInterval: 3,
|
|
263
265
|
debug: true,
|
|
264
266
|
enableForwarding: true,
|
|
265
267
|
enableReplying: true,
|
|
266
268
|
regexUserName: '', // '/^(?=[a-zA-Z])[-a-zA-Z_ ]{3,49}(?<! )$/',
|
|
269
|
+
showPublicDialogsInList: false,
|
|
270
|
+
allowPublicDialogCreation: false,
|
|
267
271
|
endpoints: {
|
|
268
272
|
api: 'api.quickblox.com',
|
|
269
273
|
chat: 'chat.quickblox.com',
|
package/src/Data/Stubs.ts
CHANGED
|
@@ -607,6 +607,7 @@ export class Stubs {
|
|
|
607
607
|
lastMessageId: '',
|
|
608
608
|
unreadMessageCount: 0,
|
|
609
609
|
updatedAt: '',
|
|
610
|
+
is_join_required: undefined,
|
|
610
611
|
},
|
|
611
612
|
{
|
|
612
613
|
id: '2',
|
|
@@ -622,6 +623,7 @@ export class Stubs {
|
|
|
622
623
|
lastMessageId: '',
|
|
623
624
|
unreadMessageCount: 0,
|
|
624
625
|
updatedAt: '',
|
|
626
|
+
is_join_required: undefined,
|
|
625
627
|
},
|
|
626
628
|
{
|
|
627
629
|
id: '3',
|
|
@@ -637,6 +639,7 @@ export class Stubs {
|
|
|
637
639
|
lastMessageId: '',
|
|
638
640
|
unreadMessageCount: 0,
|
|
639
641
|
updatedAt: '',
|
|
642
|
+
is_join_required: undefined,
|
|
640
643
|
},
|
|
641
644
|
{
|
|
642
645
|
id: '4',
|
|
@@ -652,6 +655,7 @@ export class Stubs {
|
|
|
652
655
|
lastMessageId: '',
|
|
653
656
|
unreadMessageCount: 0,
|
|
654
657
|
updatedAt: '',
|
|
658
|
+
is_join_required: undefined,
|
|
655
659
|
},
|
|
656
660
|
{
|
|
657
661
|
id: '5',
|
|
@@ -667,6 +671,7 @@ export class Stubs {
|
|
|
667
671
|
lastMessageId: '',
|
|
668
672
|
unreadMessageCount: 0,
|
|
669
673
|
updatedAt: '',
|
|
674
|
+
is_join_required: undefined,
|
|
670
675
|
},
|
|
671
676
|
{
|
|
672
677
|
id: '6',
|
|
@@ -682,6 +687,7 @@ export class Stubs {
|
|
|
682
687
|
lastMessageId: '',
|
|
683
688
|
unreadMessageCount: 0,
|
|
684
689
|
updatedAt: '',
|
|
690
|
+
is_join_required: undefined,
|
|
685
691
|
},
|
|
686
692
|
{
|
|
687
693
|
id: '7',
|
|
@@ -697,6 +703,7 @@ export class Stubs {
|
|
|
697
703
|
lastMessageId: '',
|
|
698
704
|
unreadMessageCount: 0,
|
|
699
705
|
updatedAt: '',
|
|
706
|
+
is_join_required: undefined,
|
|
700
707
|
},
|
|
701
708
|
];
|
|
702
709
|
|
|
@@ -720,6 +727,7 @@ export class Stubs {
|
|
|
720
727
|
updated_at: '02.03.2023',
|
|
721
728
|
user_id: 0,
|
|
722
729
|
xmpp_room_jid: null,
|
|
730
|
+
is_join_required: undefined,
|
|
723
731
|
};
|
|
724
732
|
|
|
725
733
|
return qbDialog;
|
|
@@ -742,6 +750,7 @@ export class Stubs {
|
|
|
742
750
|
updated_at: '02.03.2023',
|
|
743
751
|
user_id: 0,
|
|
744
752
|
xmpp_room_jid: null,
|
|
753
|
+
is_join_required: undefined,
|
|
745
754
|
};
|
|
746
755
|
|
|
747
756
|
return qbDialog;
|
|
@@ -764,6 +773,7 @@ export class Stubs {
|
|
|
764
773
|
updated_at: '02.03.2023',
|
|
765
774
|
user_id: 0,
|
|
766
775
|
xmpp_room_jid: null,
|
|
776
|
+
is_join_required: undefined,
|
|
767
777
|
};
|
|
768
778
|
|
|
769
779
|
return qbDialog;
|
|
@@ -29,6 +29,8 @@ export class RemoteDialogDTO {
|
|
|
29
29
|
|
|
30
30
|
public photo: string;
|
|
31
31
|
|
|
32
|
+
public is_join_required: number | undefined | null;
|
|
33
|
+
|
|
32
34
|
constructor() {
|
|
33
35
|
this.id = '';
|
|
34
36
|
this.type = 0;
|
|
@@ -54,5 +56,7 @@ export class RemoteDialogDTO {
|
|
|
54
56
|
this.name = '';
|
|
55
57
|
|
|
56
58
|
this.photo = '';
|
|
59
|
+
|
|
60
|
+
this.is_join_required = undefined;
|
|
57
61
|
}
|
|
58
62
|
}
|
|
@@ -667,6 +667,12 @@ export class DialogRemoteDTOMapper implements IMapper {
|
|
|
667
667
|
|
|
668
668
|
return updatedAt !== undefined;
|
|
669
669
|
},
|
|
670
|
+
is_join_required(v: unknown): v is RemoteDialogDTO['is_join_required'] {
|
|
671
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
672
|
+
const { is_join_required } = v as RemoteDialogDTO;
|
|
673
|
+
|
|
674
|
+
return true;
|
|
675
|
+
},
|
|
670
676
|
};
|
|
671
677
|
|
|
672
678
|
if (!dtoValidator.id(data))
|
|
@@ -51,6 +51,7 @@ export class DialogDTOMapper implements IDTOMapper {
|
|
|
51
51
|
updated_at: dialogDTO.updatedAt,
|
|
52
52
|
user_id: parseInt(dialogDTO.ownerId, 10),
|
|
53
53
|
xmpp_room_jid: null,
|
|
54
|
+
is_join_required: dialogDTO.is_join_required,
|
|
54
55
|
};
|
|
55
56
|
|
|
56
57
|
return Promise.resolve(dialog as TResult);
|
|
@@ -272,6 +273,12 @@ export class DialogDTOMapper implements IDTOMapper {
|
|
|
272
273
|
|
|
273
274
|
return updatedAt !== undefined && updatedAt !== null;
|
|
274
275
|
},
|
|
276
|
+
is_join_required(v: unknown): v is RemoteDialogDTO['is_join_required'] {
|
|
277
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
278
|
+
const { is_join_required } = v as RemoteDialogDTO;
|
|
279
|
+
|
|
280
|
+
return true;
|
|
281
|
+
},
|
|
275
282
|
};
|
|
276
283
|
|
|
277
284
|
if (!dialogDTOValidator.id(dto))
|
|
@@ -429,6 +436,12 @@ export class DialogDTOMapper implements IDTOMapper {
|
|
|
429
436
|
|
|
430
437
|
return xmpp_room_jid !== undefined && xmpp_room_jid !== null;
|
|
431
438
|
},
|
|
439
|
+
is_join_required(v: unknown): v is RemoteDialogDTO['is_join_required'] {
|
|
440
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
441
|
+
const { is_join_required } = v as RemoteDialogDTO;
|
|
442
|
+
|
|
443
|
+
return true;
|
|
444
|
+
},
|
|
432
445
|
};
|
|
433
446
|
|
|
434
447
|
if (!qbDialogValidator._id(qbDialog))
|
|
@@ -192,12 +192,12 @@ export class MessageDTOMapper implements IDTOMapper {
|
|
|
192
192
|
): ChatMessageAttachment {
|
|
193
193
|
return {
|
|
194
194
|
id: attachment.id.toString(),
|
|
195
|
-
uid: attachment.uid || '',
|
|
195
|
+
uid: attachment.uid?.toString() || '',
|
|
196
196
|
type: attachment.type.toString(),
|
|
197
|
-
url: attachment.url || '',
|
|
198
|
-
name: attachment.name || '',
|
|
199
|
-
size: attachment.size ||
|
|
200
|
-
};
|
|
197
|
+
url: attachment.url?.toString() || '',
|
|
198
|
+
name: attachment.name?.toString() || '',
|
|
199
|
+
size: attachment.size?.toString() || '',
|
|
200
|
+
} as ChatMessageAttachment;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
public static convertToQBChatNewMessage(
|