Skip to content

Commit 60f99ff

Browse files
v0.2.8
1 parent d65e96a commit 60f99ff

File tree

84 files changed

+1360
-2181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1360
-2181
lines changed

global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ interface QBConfig {
6767
debug: boolean;
6868
enableForwarding: boolean;
6969
enableReplying: boolean;
70+
regexUserName?: string;
7071
endpoints: {
7172
api: string;
7273
chat: string;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quickblox-react-ui-kit",
3-
"version": "0.2.8-beta.5",
3+
"version": "0.2.8",
44
"main": "dist/index-ui.js",
55
"license": "MIT",
66
"keywords": [

src/App.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import useQBConnection from './Presentation/providers/QuickBloxUIKitProvider/use
55
import { LocalDataSource } from './Data/source/local/LocalDataSource';
66
import Login from './Presentation/layouts/TestStage/LoginView/Login';
77
import QuickBloxUIKitProvider from './Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider';
8-
import TestStageMarkup from './Presentation/layouts/TestStage/TestStageMarkup';
98
import { Stubs } from './Data/Stubs';
109
import {
1110
LoginData,
@@ -28,7 +27,7 @@ function App() {
2827
const { connectionRepository } = useQBConnection();
2928

3029
const initLoginData: LoginData = {
31-
login: 'artimed', // vit1
30+
login: 'anruaav2', // vit1 380990579507
3231
password: 'quickblox',
3332
};
3433

@@ -222,10 +221,10 @@ function App() {
222221
path="/desktop-test-mock"
223222
element={
224223
<div>
225-
<div style={{ height: '32px' }}>Q-communicate</div>
224+
<div style={{ height: '56px' }}>Q-communicate</div>
226225
<QuickBloxUIKitDesktopLayout
227226
theme={new DefaultTheme()}
228-
uikitHeightOffset="32px"
227+
uikitHeightOffset="56px"
229228
// AIAssist={{
230229
// enabled: true,
231230
// default: true,
@@ -235,8 +234,6 @@ function App() {
235234
</div>
236235
}
237236
/>
238-
239-
<Route path="/test-stage" element={<TestStageMarkup />} />
240237
</Routes>
241238
</div>
242239
</QuickBloxUIKitProvider>

src/CommonTypes/BaseViewModel.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { FileEntity } from '../Domain/entity/FileEntity';
55
import { IChatMessage } from '../Data/source/AISource';
66
import { Tone } from '../Presentation/Views/Dialog/AIWidgets/Tone';
77
import { MessageEntity } from '../Domain/entity/MessageEntity';
8+
import { UserEntity } from '../Domain/entity/UserEntity';
89

910
export default class BaseViewModel<TResult> {
1011
get entity(): TResult {
@@ -78,6 +79,9 @@ export type FunctionDialogEntityToVoid = (dialog: DialogEntity) => void;
7879
export type FunctionTypeFileToToBoolean = (file: File) => Promise<boolean>;
7980
export type FunctionTypePaginationToVoid = (pagination: Pagination) => void;
8081
export type FunctionTypeVoidToVoid = () => void;
82+
export type FunctionTypeUserIdToUserEntity = (
83+
id: number,
84+
) => Promise<UserEntity>;
8185
export type FunctionTypeStringToVoid = (value: string) => void;
8286
export type FunctionTypeBooleanToVoid = (value: boolean) => void;
8387
export type FunctionTypeEditDialogParamsToVoid = (
@@ -89,6 +93,7 @@ export type FunctionTypeDialogEntityToDialogEntity = (
8993
export type FunctionTypeDialogEntityToBoolean = (
9094
entity: GroupDialogEntity,
9195
) => Promise<boolean>;
96+
export type FunctionTypeDialogEntityToVoid = (entity: DialogEntity) => void;
9297
export type FunctionTypeFileToFileEntity = (file: File) => Promise<FileEntity>;
9398
export type FunctionTypeJSXElement = () => JSX.Element;
9499
// export type FunctionTypeChatMessagesToVoid = (

src/CommonTypes/FunctionResult.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface QBConfig {
5151
debug: boolean;
5252
enableForwarding: boolean;
5353
enableReplying: boolean;
54+
regexUserName?: string;
5455
endpoints: {
5556
api: string;
5657
chat: string;

src/Data/DefaultConfigurations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ export class DefaultConfigurations {
256256
debug: true,
257257
enableForwarding: true,
258258
enableReplying: true,
259+
regexUserName: '/^(?=[a-zA-Z])[-a-zA-Z_ ]{3,49}(?<! )$/',
259260
endpoints: {
260261
api: 'api.quickblox.com',
261262
chat: 'chat.quickblox.com',

src/Data/dto/user/LocalUsersDTO.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ export class LocalUsersDTO {
1010
return this._pagination;
1111
}
1212

13-
14-
1513
private _users: Array<LocalUserDTO>;
1614

1715
private _pagination: Pagination;

src/Data/repository/ConnectionRepository.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ export default class ConnectionRepository extends SubscriptionPerformer<boolean>
8181
if (this.timerId === undefined) {
8282
console.log('set timer keep alive');
8383
this.timerId = setInterval(() => {
84-
console.log(
85-
`!!!--have ping result after ${ConnectionRepository.PING_ALIVE_INTERVAL}--!!!`,
86-
);
84+
// todo artik changed 28.12.2023
85+
// console.log(
86+
// `!!!--have ping result after ${ConnectionRepository.PING_ALIVE_INTERVAL}--!!!`,
87+
// );
8788
// eslint-disable-next-line promise/always-return
8889
// todo: cause of recycle v1
8990
this.ChatServerPing()
@@ -107,7 +108,7 @@ export default class ConnectionRepository extends SubscriptionPerformer<boolean>
107108

108109
// eslint-disable-next-line class-methods-use-this
109110
protected async ChatServerPing(): Promise<boolean> {
110-
console.log('ping ChatServerPing');
111+
// console.log('ping ChatServerPing'); //todo artik changed 28.12.2023
111112
const pingChat = (): Promise<string> => {
112113
return new Promise<string>((resolve, reject) => {
113114
try {
@@ -116,7 +117,7 @@ export default class ConnectionRepository extends SubscriptionPerformer<boolean>
116117
console.log('ping failed: ', stringifyError(error));
117118
resolve('failed');
118119
} else {
119-
console.log('ping connected');
120+
// console.log('ping connected'); //todo artik changed 28.12.2023
120121
resolve('connected');
121122
}
122123
});
@@ -137,7 +138,7 @@ export default class ConnectionRepository extends SubscriptionPerformer<boolean>
137138
const raceResult = await Promise.race([pingChat(), waitingFor()]);
138139
const result = raceResult === 'connected';
139140

140-
console.log('ping ', raceResult, ' operation result is ', result);
141+
// console.log('ping ', raceResult, ' operation result is ', result); //todo artik changed 28.12.2023
141142

142143
return Promise.resolve(result);
143144
}
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
import { ILocalFileDataSource } from './ILocalFileDataSource';
22
import { FileEntity } from '../../../Domain/entity/FileEntity';
33

4-
54
export class LocalFileDataSource implements ILocalFileDataSource {
65
clearAll(): Promise<void> {
7-
throw new Error('Method not implemented.')
6+
throw new Error('Method not implemented.');
87
}
98

109
createFile(file: FileEntity): Promise<void> {
11-
throw new Error('Method not implemented.')
10+
throw new Error('Method not implemented.');
1211
}
1312

1413
deleteFile(id: string): Promise<void> {
15-
throw new Error('Method not implemented.')
14+
throw new Error('Method not implemented.');
1615
}
1716

1817
getFile(id: string): Promise<FileEntity> {
19-
throw new Error('Method not implemented.')
18+
throw new Error('Method not implemented.');
2019
}
21-
2220
}

0 commit comments

Comments
 (0)