quickblox-react-ui-kit 0.1.2 → 0.1.4
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/source/remote/Mapper/DialogDTOMapper.d.ts +2 -0
- package/dist/Data/source/remote/RemoteDataSource.d.ts +2 -2
- package/dist/Domain/use_cases/base/Subscribable/SubscriptionPerformer.d.ts +1 -1
- package/dist/Presentation/Views/Base/BaseViewModel.d.ts +1 -0
- package/dist/Presentation/Views/Dialogs/DialogViewModel.d.ts +2 -1
- package/dist/Presentation/assets/DefaultThemes/CustomTheme.d.ts +21 -0
- package/dist/Presentation/components/UI/Dialogs/DialogInformation/DialogInformation.d.ts +2 -0
- package/dist/Presentation/components/UI/Dialogs/MessagesView/HighLightLink/HighLightLink.d.ts +9 -0
- package/dist/Presentation/components/UI/Dialogs/MessagesView/MessagesView.d.ts +2 -2
- package/dist/Presentation/components/UI/Dialogs/MessagesView/VoiceRecordingProgress/VoiceRecordingProgress.d.ts +1 -0
- package/dist/Presentation/components/layouts/Desktop/DesktopLayout.d.ts +3 -1
- package/dist/QBconfig.d.ts +2 -4
- package/dist/index-ui.d.ts +1 -1
- package/dist/index-ui.js +63 -30
- package/dist/qb-api-calls/index.d.ts +16 -5
- package/package.json +1 -1
- package/dist/Presentation/assets/ DefaultThemes/CustomTheme.d.ts +0 -6
- /package/dist/Presentation/assets/{ DefaultThemes → DefaultThemes}/DefaultTheme.d.ts +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IDTOMapper } from './IDTOMapper';
|
|
2
2
|
export declare class DialogDTOMapper implements IDTOMapper {
|
|
3
|
+
private readonly currentUserId;
|
|
4
|
+
constructor(currentUserId: number);
|
|
3
5
|
fromDTO<TArg, TResult>(dto: TArg): Promise<TResult>;
|
|
4
6
|
toTDO<TArg, TResult>(qbEntity: TArg): Promise<TResult>;
|
|
5
7
|
private static validateDTO;
|
|
@@ -6,6 +6,7 @@ import { RemoteUsersDTO } from '../../dto/user/RemoteUsersDTO';
|
|
|
6
6
|
import { RemoteMessagesDTO } from '../../dto/message/RemoteMessagesDTO';
|
|
7
7
|
import { RemoteFileDTO } from '../../dto/file/RemoteFileDTO';
|
|
8
8
|
import { Pagination } from '../../../Domain/repository/Pagination';
|
|
9
|
+
import { IDTOMapper } from './Mapper/IDTOMapper';
|
|
9
10
|
import { QBInitParams } from '../../../qb-api-calls';
|
|
10
11
|
import { NotificationTypes } from '../../../Domain/entity/NotificationTypes';
|
|
11
12
|
import { SubscriptionPerformer } from '../../../Domain/use_cases/base/Subscribable/SubscriptionPerformer';
|
|
@@ -28,7 +29,6 @@ export type AuthorizationData = {
|
|
|
28
29
|
};
|
|
29
30
|
export declare class RemoteDataSource implements IRemoteDataSource {
|
|
30
31
|
get needInit(): boolean;
|
|
31
|
-
private dialogDTOMapper;
|
|
32
32
|
private userDTOMapper;
|
|
33
33
|
private messageDTOMapper;
|
|
34
34
|
private fileDTOMapper;
|
|
@@ -39,6 +39,7 @@ export declare class RemoteDataSource implements IRemoteDataSource {
|
|
|
39
39
|
setInitSDKSuccessed(): void;
|
|
40
40
|
private _authInformation;
|
|
41
41
|
get authInformation(): AuthorizationData | undefined;
|
|
42
|
+
getCurrentDialogDTOMapper(): IDTOMapper;
|
|
42
43
|
constructor();
|
|
43
44
|
setUpMockStorage(): Promise<void>;
|
|
44
45
|
private createUserSession;
|
|
@@ -57,7 +58,6 @@ export declare class RemoteDataSource implements IRemoteDataSource {
|
|
|
57
58
|
initEventsHandlers(): void;
|
|
58
59
|
releaseEventsHandlers(): void;
|
|
59
60
|
loginWithUser(authParams: LoginData): Promise<void>;
|
|
60
|
-
private getDialogsFirstPage;
|
|
61
61
|
getDialogs(pagination?: Pagination): Promise<RemoteDialogsDTO>;
|
|
62
62
|
createDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO>;
|
|
63
63
|
updateDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO>;
|
|
@@ -19,6 +19,6 @@ export declare class SubscriptionPerformer<TArg> implements ISubscribable<TArg>
|
|
|
19
19
|
release(): void;
|
|
20
20
|
constructor();
|
|
21
21
|
subscribe(callBack: CallBackFunction<TArg>, typeEvent?: string, nameEvent?: string): void;
|
|
22
|
-
informSubscribers(arg
|
|
22
|
+
informSubscribers(arg?: TArg, eventType?: string, event?: string): void;
|
|
23
23
|
}
|
|
24
24
|
export {};
|
|
@@ -17,6 +17,7 @@ export type FunctionTypeFileToToVoid = (file: File) => void;
|
|
|
17
17
|
export type FunctionTypePaginationToVoid = (pagination: Pagination) => void;
|
|
18
18
|
export type FunctionTypeVoidToVoid = () => void;
|
|
19
19
|
export type FunctionTypeStringToVoid = (value: string) => void;
|
|
20
|
+
export type FunctionTypeBooleanToVoid = (value: boolean) => void;
|
|
20
21
|
export type FunctionTypeEditDialogParamsToVoid = (params: EditDialogParams) => void;
|
|
21
22
|
export type FunctionTypeDialogEntityToDialogEntity = (entity: GroupDialogEntity) => Promise<DialogEntity>;
|
|
22
23
|
export type FunctionTypeDialogEntityToBoolean = (entity: GroupDialogEntity) => Promise<boolean>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import BaseViewModel, { FunctionTypeDialogEntityToBoolean, FunctionTypeDialogEntityToDialogEntity, FunctionTypeFileToFileEntity, FunctionTypePaginationToVoid, FunctionTypeVoidToVoid } from '../Base/BaseViewModel';
|
|
1
|
+
import BaseViewModel, { FunctionTypeBooleanToVoid, FunctionTypeDialogEntityToBoolean, FunctionTypeDialogEntityToDialogEntity, FunctionTypeFileToFileEntity, FunctionTypePaginationToVoid, FunctionTypeVoidToVoid } from '../Base/BaseViewModel';
|
|
2
2
|
import { DialogEntity } from '../../../Domain/entity/DialogEntity';
|
|
3
3
|
import { Pagination } from '../../../Domain/repository/Pagination';
|
|
4
4
|
export interface DialogsViewModel extends BaseViewModel<DialogEntity> {
|
|
@@ -8,6 +8,7 @@ export interface DialogsViewModel extends BaseViewModel<DialogEntity> {
|
|
|
8
8
|
dialogs: DialogEntity[];
|
|
9
9
|
getDialogs: FunctionTypePaginationToVoid;
|
|
10
10
|
release: FunctionTypeVoidToVoid;
|
|
11
|
+
setWaitLoadingStatus: FunctionTypeBooleanToVoid;
|
|
11
12
|
createDialog: FunctionTypeDialogEntityToDialogEntity;
|
|
12
13
|
updateDialog: FunctionTypeDialogEntityToDialogEntity;
|
|
13
14
|
deleteDialog: FunctionTypeDialogEntityToBoolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import DefaultTheme from './DefaultTheme';
|
|
2
|
+
export default class CustomTheme extends DefaultTheme {
|
|
3
|
+
divider: () => string;
|
|
4
|
+
mainText: () => string;
|
|
5
|
+
fontFamily: () => string;
|
|
6
|
+
caption: () => string;
|
|
7
|
+
chatInput: () => string;
|
|
8
|
+
disabledElements: () => string;
|
|
9
|
+
dropdownBackground: () => string;
|
|
10
|
+
error: () => string;
|
|
11
|
+
fieldBorder: () => string;
|
|
12
|
+
hightlight: () => string;
|
|
13
|
+
incomingBackground: () => string;
|
|
14
|
+
inputElements: () => string;
|
|
15
|
+
mainBackground: () => string;
|
|
16
|
+
mainElements: () => string;
|
|
17
|
+
outgoingBackground: () => string;
|
|
18
|
+
secondaryBackground: () => string;
|
|
19
|
+
secondaryElements: () => string;
|
|
20
|
+
secondaryText: () => string;
|
|
21
|
+
}
|
|
@@ -3,10 +3,12 @@ import './DialogInformation.scss';
|
|
|
3
3
|
import { DialogEntity } from '../../../../../Domain/entity/DialogEntity';
|
|
4
4
|
import { FunctionTypeVoidToVoid } from '../../../../Views/Base/BaseViewModel';
|
|
5
5
|
import { DialogsViewModel } from '../../../../Views/Dialogs/DialogViewModel';
|
|
6
|
+
import UiKitTheme from '../../../../assets/UiKitTheme';
|
|
6
7
|
type HeaderDialogsProps = {
|
|
7
8
|
dialog: DialogEntity;
|
|
8
9
|
dialogViewModel: DialogsViewModel;
|
|
9
10
|
closeInformationHandler: FunctionTypeVoidToVoid;
|
|
11
|
+
theme?: UiKitTheme;
|
|
10
12
|
};
|
|
11
13
|
declare const DialogInformation: React.FC<HeaderDialogsProps>;
|
|
12
14
|
export default DialogInformation;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './HighLightLink.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const isURL: (str: string) => boolean;
|
|
4
|
+
export declare const messageHasUrls: (message: string) => boolean;
|
|
5
|
+
type HighLightLinkProps = {
|
|
6
|
+
messageText: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const HighLightLink: React.FC<HighLightLinkProps>;
|
|
9
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './MessagesView.scss';
|
|
3
|
-
import { DialogEntity } from '../../../../../Domain/entity/DialogEntity';
|
|
4
3
|
import { FunctionTypeVoidToVoid } from '../../../../Views/Base/BaseViewModel';
|
|
5
4
|
import UiKitTheme from '../../../../assets/UiKitTheme';
|
|
5
|
+
import { DialogsViewModel } from '../../../../Views/Dialogs/DialogViewModel';
|
|
6
6
|
type HeaderDialogsMessagesProps = {
|
|
7
|
-
|
|
7
|
+
dialogsViewModel: DialogsViewModel;
|
|
8
8
|
InformationHandler?: FunctionTypeVoidToVoid;
|
|
9
9
|
maxWidthToResize?: string;
|
|
10
10
|
theme?: UiKitTheme;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import './VoiceRecordingProgress.scss';
|
|
3
3
|
import { FunctionTypeVoidToVoid } from '../../../../../Views/Base/BaseViewModel';
|
|
4
4
|
type VoiceRecordingProgressProps = {
|
|
5
|
+
startStatus: boolean;
|
|
5
6
|
longRecInSec: number;
|
|
6
7
|
ClickActionHandler?: FunctionTypeVoidToVoid;
|
|
7
8
|
TouchActionHandler?: FunctionTypeVoidToVoid;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './DesktopLayout.scss';
|
|
3
|
+
import UiKitTheme from '../../../assets/UiKitTheme';
|
|
3
4
|
type LayoutItems = {
|
|
4
5
|
dialogsView: React.ReactNode;
|
|
5
6
|
dialogMessagesView: React.ReactNode;
|
|
6
7
|
dialogInfoView: React.ReactNode;
|
|
8
|
+
theme?: UiKitTheme;
|
|
7
9
|
};
|
|
8
|
-
declare function DesktopLayout({ dialogsView, dialogMessagesView, dialogInfoView, }: LayoutItems): JSX.Element;
|
|
10
|
+
declare function DesktopLayout({ dialogsView, dialogMessagesView, dialogInfoView, theme, }: LayoutItems): JSX.Element;
|
|
9
11
|
export default DesktopLayout;
|
package/dist/QBconfig.d.ts
CHANGED
|
@@ -8,13 +8,11 @@ export declare const QBConfig: {
|
|
|
8
8
|
};
|
|
9
9
|
appConfig: {
|
|
10
10
|
maxFileSize: number;
|
|
11
|
+
sessionTimeOut: number;
|
|
11
12
|
chatProtocol: {
|
|
12
13
|
active: number;
|
|
13
14
|
};
|
|
14
|
-
debug:
|
|
15
|
-
mode: number;
|
|
16
|
-
file: null;
|
|
17
|
-
};
|
|
15
|
+
debug: boolean;
|
|
18
16
|
endpoints: {
|
|
19
17
|
api: string;
|
|
20
18
|
chat: string;
|
package/dist/index-ui.d.ts
CHANGED
|
@@ -21,6 +21,6 @@ import { DialogEntity } from './Domain/entity/DialogEntity';
|
|
|
21
21
|
import BaseViewModel from './Presentation/Views/Base/BaseViewModel';
|
|
22
22
|
import { LoginData, RemoteDataSource } from './Data/source/remote/RemoteDataSource';
|
|
23
23
|
import QuickBloxUIKitDesktopLayout from './Presentation/components/layouts/Desktop/QuickBloxUIKitDesktopLayout';
|
|
24
|
-
import DefaultTheme from './Presentation/assets/
|
|
24
|
+
import DefaultTheme from './Presentation/assets/DefaultThemes/DefaultTheme';
|
|
25
25
|
import UiKitTheme from './Presentation/assets/UiKitTheme';
|
|
26
26
|
export { MainButton, TypeButton, type LoginData, QuickBloxUIKitProvider, qbDataContext, RemoteDataSource, LocalDataSource, useQBConnection, useQbDataContext, useEventMessagesRepository, type DialogsViewModel, useDialogsViewModel, SubscribeToDialogEventsUseCase, Pagination, type DialogEventInfo, EventMessageType, NotificationTypes, stringifyError, DesktopLayout, DialogsComponent, MessagesView, DialogInformation, type DialogEntity, BaseViewModel, QuickBloxUIKitDesktopLayout, DefaultTheme, type UiKitTheme, };
|