quickblox-react-ui-kit 0.3.0-beta.2 → 0.3.0-beta.3
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/Data/repository/DialogsRepository.d.ts +1 -0
- package/dist/Data/source/remote/IRemoteDataSource.d.ts +1 -0
- package/dist/Data/source/remote/RemoteDataSource.d.ts +2 -0
- package/dist/Domain/entity/DialogEventInfo.d.ts +4 -0
- package/dist/Domain/use_cases/GetAllMessagesForDialog.d.ts +3 -3
- package/dist/Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase.d.ts +10 -0
- package/dist/Presentation/Views/Dialog/DialogViewModel.d.ts +2 -0
- package/dist/Presentation/Views/Dialog/MessageItem/MessageItem.d.ts +2 -2
- package/dist/Presentation/ui-components/MessageInput/MessageInput.stories.d.ts +4 -4
- package/dist/index-ui.js +549 -422
- package/dist/index-ui.js.map +1 -1
- package/dist/qb-api-calls/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/App.tsx +2 -2
- package/src/Data/repository/DialogsRepository.ts +16 -0
- package/src/Data/source/remote/IRemoteDataSource.ts +2 -0
- package/src/Data/source/remote/RemoteDataSource.ts +89 -10
- package/src/Domain/entity/DialogEventInfo.ts +4 -0
- package/src/Domain/use_cases/GetAllMessagesForDialog.ts +3 -3
- package/src/Domain/use_cases/GetDialogByIdUseCase.ts +5 -1
- package/src/Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase.ts +31 -0
- package/src/Presentation/Views/Dialog/DialogViewModel.ts +2 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.scss +10 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.tsx +12 -13
- package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +17 -9
- package/src/Presentation/Views/Dialog/useDialogViewModel.ts +64 -32
- package/src/Presentation/Views/DialogInfo/DialogInfo.scss +3 -11
- package/src/Presentation/Views/DialogInfo/MembersList/MembersList.scss +8 -99
- package/src/Presentation/Views/DialogInfo/MembersList/MembersList.tsx +9 -29
- package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +83 -3
- package/src/Presentation/Views/EditDialog/EditDialog.scss +1 -40
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +9 -14
- package/src/Presentation/Views/InviteMembers/InviteMembers.tsx +14 -15
- package/src/Presentation/icons/media/video-file.svg +2 -2
- package/src/Presentation/layouts/Desktop/DesktopLayout.scss +8 -8
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +119 -100
- package/src/Presentation/ui-components/Avatar/avatar.stories.tsx +1 -1
- package/src/Presentation/ui-components/Badge/Badge.stories.ts +1 -1
- package/src/Presentation/ui-components/Button/Button.stories.ts +1 -1
- package/src/Presentation/ui-components/DialogBanner/DialogBanner.stories.ts +2 -1
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.tsx +29 -1
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx +4 -1
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.stories.tsx +2 -1
- package/src/Presentation/ui-components/Dropdown/Dropdown.stories.tsx +2 -1
- package/src/Presentation/ui-components/Dropdown/Dropdown.tsx +4 -1
- package/src/Presentation/ui-components/Header/Header.stories.tsx +2 -1
- package/src/Presentation/ui-components/Loader/Loader.stories.ts +1 -1
- package/src/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.tsx +6 -1
- package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.scss +13 -0
- package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.tsx +16 -2
- package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.scss +9 -0
- package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.tsx +15 -17
- package/src/Presentation/ui-components/Message/Message.stories.tsx +80 -1
- package/src/Presentation/ui-components/MessageInput/MessageInput.stories.tsx +16 -8
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.stories.ts +3 -1
- package/src/Presentation/ui-components/Placeholder/Placeholder.stories.tsx +2 -6
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.stories.ts +12 -1
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx +5 -1
- package/src/Presentation/ui-components/TextField/TextField.stories.ts +7 -2
- package/src/Presentation/ui-components/Toast/Toast.stories.tsx +1 -1
- package/src/Presentation/ui-components/UserListItem/UserListItem.stories.tsx +3 -1
- package/src/index.scss +0 -2
- package/src/qb-api-calls/index.ts +1 -0
- package/storybook-static/433.dffc897e.iframe.bundle.js +1 -0
- package/storybook-static/603.4cf0423b.iframe.bundle.js +1 -0
- package/storybook-static/{758.d99b0166.iframe.bundle.js → 758.e75a5a47.iframe.bundle.js} +3 -3
- package/storybook-static/{758.d99b0166.iframe.bundle.js.map → 758.e75a5a47.iframe.bundle.js.map} +1 -1
- package/storybook-static/{472.3c9e81e6.iframe.bundle.js → 768.e44c05aa.iframe.bundle.js} +3 -3
- package/storybook-static/{472.3c9e81e6.iframe.bundle.js.map → 768.e44c05aa.iframe.bundle.js.map} +1 -1
- package/storybook-static/{926.f14bb932.iframe.bundle.js → 926.f5308089.iframe.bundle.js} +2 -2
- package/storybook-static/{926.f14bb932.iframe.bundle.js.map → 926.f5308089.iframe.bundle.js.map} +1 -1
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.cf806856.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.9449e470.iframe.bundle.js +14 -0
- package/storybook-static/{Presentation-ui-components-Badge-Badge-stories.fea53429.iframe.bundle.js.map → Presentation-ui-components-Badge-Badge-stories.9449e470.iframe.bundle.js.map} +1 -1
- package/storybook-static/Presentation-ui-components-Button-Button-stories.4fac7996.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.fa91d2c7.iframe.bundle.js +10 -0
- package/storybook-static/{Presentation-ui-components-DialogBanner-DialogBanner-stories.6b2a3f72.iframe.bundle.js.map → Presentation-ui-components-DialogBanner-DialogBanner-stories.fa91d2c7.iframe.bundle.js.map} +1 -1
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.90aa44c5.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.3523a670.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.aacf2ec2.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Header-Header-stories.073c4507.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.9bf3fb63.iframe.bundle.js +1 -0
- package/storybook-static/{Presentation-ui-components-Message-Message-stories.63bec01b.iframe.bundle.js → Presentation-ui-components-Message-Message-stories.343dfae0.iframe.bundle.js} +1 -1
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.262a0cf2.iframe.bundle.js +1 -0
- package/storybook-static/{Presentation-ui-components-MessageSeparator-MessageSeparator-stories.82483823.iframe.bundle.js → Presentation-ui-components-MessageSeparator-MessageSeparator-stories.a7d43c0b.iframe.bundle.js} +3 -3
- package/storybook-static/{Presentation-ui-components-MessageSeparator-MessageSeparator-stories.82483823.iframe.bundle.js.map → Presentation-ui-components-MessageSeparator-MessageSeparator-stories.a7d43c0b.iframe.bundle.js.map} +1 -1
- package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.871f508c.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.1661d95b.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.8f6fca84.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.4a2eef3e.iframe.bundle.js +1 -0
- package/storybook-static/{Presentation-ui-components-Toast-Toast-stories.e26b2e07.iframe.bundle.js → Presentation-ui-components-Toast-Toast-stories.55e63162.iframe.bundle.js} +1 -1
- package/storybook-static/{Presentation-ui-components-UserListItem-UserListItem-stories.e88f4206.iframe.bundle.js → Presentation-ui-components-UserListItem-UserListItem-stories.04d3eefe.iframe.bundle.js} +1 -1
- package/storybook-static/docs-Introduction-mdx.ac401482.iframe.bundle.js +10 -0
- package/storybook-static/docs-Introduction-mdx.ac401482.iframe.bundle.js.map +1 -0
- package/storybook-static/docs-Styling-mdx.1d6c1212.iframe.bundle.js +10 -0
- package/storybook-static/docs-Styling-mdx.1d6c1212.iframe.bundle.js.map +1 -0
- package/storybook-static/iframe.html +4 -4
- package/storybook-static/index.json +1 -1
- package/storybook-static/main.597d432b.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/runtime~main.e945879b.iframe.bundle.js +1 -0
- package/storybook-static/static/css/{Presentation-ui-components-Message-Message-stories.a518b61a.chunk.css → Presentation-ui-components-Message-Message-stories.0e129b10.chunk.css} +3 -3
- package/storybook-static/static/css/{Presentation-ui-components-Message-Message-stories.a518b61a.chunk.css.map → Presentation-ui-components-Message-Message-stories.0e129b10.chunk.css.map} +1 -1
- package/storybook-static/static/css/{Presentation-ui-components-Placeholder-Placeholder-stories.1ebf88ab.chunk.css → Presentation-ui-components-Placeholder-Placeholder-stories.cb7fb80a.chunk.css} +1 -2
- package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.cb7fb80a.chunk.css.map +1 -0
- package/storybook-static/static/css/{main.4e852eef.css → main.6fa55a2c.css} +2 -2
- package/storybook-static/static/css/{main.4e852eef.css.map → main.6fa55a2c.css.map} +1 -1
- package/storybook-static/static/media/video-file.dc2971be489b2af7b1c04dcc55bfe881.svg +3 -0
- package/storybook-static/stories.json +1 -1
- package/storybook-static/312.0aa0e670.iframe.bundle.js +0 -1
- package/storybook-static/341.bea6d0bd.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.2fb23ae6.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.fea53429.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-Button-Button-stories.f6c6437b.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.6b2a3f72.iframe.bundle.js +0 -10
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.f1cb9d40.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.0ad17c54.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.3b620239.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Header-Header-stories.45503161.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.8b53bb33.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.728a66ad.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.0898ead6.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.973cdb64.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.0af0b8a8.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.5987d2bb.iframe.bundle.js +0 -1
- package/storybook-static/main.0332574c.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.16726a14.iframe.bundle.js +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.1ebf88ab.chunk.css.map +0 -1
- package/storybook-static/static/media/video-file.dbd1f8c63a3769f9e9a027f0922d56b2.svg +0 -3
|
@@ -18,6 +18,7 @@ export default class DialogsRepository implements IDialogsRepository {
|
|
|
18
18
|
saveDialogToLocal(entity: DialogEntity): Promise<boolean>;
|
|
19
19
|
createDialogInRemote(entity: DialogEntity): Promise<DialogEntity>;
|
|
20
20
|
updateDialogInLocal(entity: DialogEntity): Promise<DialogEntity>;
|
|
21
|
+
updateCurrentDialogInLocalDataSource(entity: DialogEntity): Promise<DialogEntity>;
|
|
21
22
|
updateDialogInRemote(entity: DialogEntity): Promise<DialogEntity>;
|
|
22
23
|
getDialogFromLocal(dialogId: string): Promise<DialogEntity>;
|
|
23
24
|
getDialogFromRemote(dialogId: string): Promise<DialogEntity>;
|
|
@@ -33,4 +33,5 @@ export interface IRemoteDataSource extends IRemoteMessaging<RemoteMessageDTO> {
|
|
|
33
33
|
getFile(dto: RemoteFileDTO): Promise<RemoteFileDTO>;
|
|
34
34
|
deleteFile(dto: RemoteFileDTO): Promise<void>;
|
|
35
35
|
subscribeToChatConnectionEvents(fileId: string): Promise<void>;
|
|
36
|
+
updateCurrentDialog(dto: RemoteDialogDTO): void;
|
|
36
37
|
}
|
|
@@ -41,8 +41,10 @@ export declare class RemoteDataSource implements IRemoteDataSource {
|
|
|
41
41
|
private _authInformation;
|
|
42
42
|
get authInformation(): AuthorizationData | undefined;
|
|
43
43
|
set authInformation(value: AuthorizationData | undefined);
|
|
44
|
+
private currentDialog;
|
|
44
45
|
getCurrentDialogDTOMapper(): IDTOMapper;
|
|
45
46
|
constructor();
|
|
47
|
+
updateCurrentDialog(dto: RemoteDialogDTO): void;
|
|
46
48
|
setUpMockStorage(): Promise<void>;
|
|
47
49
|
private createUserSession;
|
|
48
50
|
static initSDK(sdkParams: QBInitParams): boolean;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import EventMessageType from './EventMessageType';
|
|
2
2
|
import { NotificationTypes } from './NotificationTypes';
|
|
3
3
|
import { MessageEntity } from './MessageEntity';
|
|
4
|
+
import { DialogEntity } from './DialogEntity';
|
|
4
5
|
export type MessageStatus = {
|
|
6
|
+
deliveryStatus: 'delivered' | 'read' | 'sent' | 'sending';
|
|
5
7
|
isTyping: boolean;
|
|
6
8
|
userId: number;
|
|
7
9
|
dialogId: string;
|
|
10
|
+
messageId: string;
|
|
8
11
|
};
|
|
9
12
|
export type DialogEventInfo = {
|
|
10
13
|
eventMessageType: EventMessageType;
|
|
11
14
|
notificationTypes: NotificationTypes | undefined;
|
|
15
|
+
dialogInfo?: DialogEntity | undefined;
|
|
12
16
|
messageInfo: MessageEntity | undefined;
|
|
13
17
|
messageStatus: MessageStatus | undefined;
|
|
14
18
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IUseCase } from './base/IUseCase';
|
|
2
2
|
import { MessageEntity } from '../entity/MessageEntity';
|
|
3
3
|
import { IMessagesRepository } from '../repository/IMessagesRepository';
|
|
4
|
-
import { Pagination } from '../repository/Pagination';
|
|
5
|
-
export declare class GetAllMessagesForDialogMock implements IUseCase<void,
|
|
4
|
+
import { PaginatedResult, Pagination } from '../repository/Pagination';
|
|
5
|
+
export declare class GetAllMessagesForDialogMock implements IUseCase<void, PaginatedResult<MessageEntity>> {
|
|
6
6
|
private messagesRepository;
|
|
7
7
|
private readonly dialogId;
|
|
8
8
|
private currentPagination;
|
|
9
9
|
constructor(messagesRepository: IMessagesRepository, dialogId: string, currentPagination: Pagination);
|
|
10
|
-
execute(): Promise<
|
|
10
|
+
execute(): Promise<PaginatedResult<MessageEntity>>;
|
|
11
11
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DialogEntity } from '../entity/DialogEntity';
|
|
2
|
+
import DialogsRepository from '../../Data/repository/DialogsRepository';
|
|
3
|
+
import { IUseCase } from './base/IUseCase';
|
|
4
|
+
import { GroupDialogEntity } from '../entity/GroupDialogEntity';
|
|
5
|
+
export declare class UpdateCurrentDialogInDataSourceUseCase implements IUseCase<void, DialogEntity> {
|
|
6
|
+
private dialogRepository;
|
|
7
|
+
private updateDialog;
|
|
8
|
+
constructor(dialogRepository: DialogsRepository, updateDialog: GroupDialogEntity);
|
|
9
|
+
execute(): Promise<DialogEntity>;
|
|
10
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import BaseViewModel, { FunctionTypeFileToToBoolean, FunctionTypeForwardMessagesParamsToBoolean, FunctionTypePaginationToVoid, FunctionTypeReplyMessagesParamsToBoolean, FunctionTypeStringToVoid, FunctionTypeVoidToVoid } from '../../../CommonTypes/BaseViewModel';
|
|
2
2
|
import { MessageEntity } from '../../../Domain/entity/MessageEntity';
|
|
3
3
|
import { DialogEntity } from '../../../Domain/entity/DialogEntity';
|
|
4
|
+
import { Pagination } from '../../../Domain/repository/Pagination';
|
|
4
5
|
export interface DialogViewModel extends BaseViewModel<DialogEntity> {
|
|
5
6
|
loading: boolean;
|
|
6
7
|
error: string;
|
|
8
|
+
pagination: Pagination;
|
|
7
9
|
messages: MessageEntity[];
|
|
8
10
|
getMessages: FunctionTypePaginationToVoid;
|
|
9
11
|
sendTextMessage: FunctionTypeStringToVoid;
|
|
@@ -5,7 +5,7 @@ import { AIMessageWidget } from '../AIWidgets/AIMessageWidget';
|
|
|
5
5
|
import './MessageItem.scss';
|
|
6
6
|
export type MessageItemProps = {
|
|
7
7
|
message: MessageEntity;
|
|
8
|
-
|
|
8
|
+
currentUserId?: number;
|
|
9
9
|
AITranslateWidget?: AIMessageWidget;
|
|
10
10
|
AIAssistWidget?: AIMessageWidget;
|
|
11
11
|
maxTokens: number;
|
|
@@ -19,4 +19,4 @@ export type MessageItemProps = {
|
|
|
19
19
|
messagesToView: MessageEntity[];
|
|
20
20
|
onError: (messageError: string) => void;
|
|
21
21
|
};
|
|
22
|
-
export default function MessageItem({ message,
|
|
22
|
+
export default function MessageItem({ message, currentUserId, enableForwarding, enableReplying, onReply, onForward, listRef, messagesToView, AITranslateWidget, AIAssistWidget, maxTokens, defaultTranslationLanguage, languagesForAITranslate, onError, }: MessageItemProps): JSX.Element | null;
|
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
2
2
|
import MessageInput from './MessageInput';
|
|
3
3
|
declare const meta: Meta<typeof MessageInput>;
|
|
4
4
|
export default meta;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
5
|
+
export declare const MessageInputDefault: StoryObj<typeof MessageInput>;
|
|
6
|
+
export declare const MessageInputWithVoiceMessage: StoryObj<typeof MessageInput>;
|
|
7
|
+
export declare const MessageInputWithPreview: StoryObj<typeof MessageInput>;
|
|
8
|
+
export declare const MessageInputLoadingState: StoryObj<typeof MessageInput>;
|