quickblox-react-ui-kit 0.5.1-join-dialog-off.5 → 0.5.2-alpha.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/.claude/settings.local.json +14 -0
- package/dist/CommonTypes/BaseViewModel.d.ts +0 -2
- package/dist/CommonTypes/BaseViewModel.d.ts.map +1 -1
- package/dist/Data/mapper/DialogLocalDTOMapper.d.ts.map +1 -1
- package/dist/Data/mapper/DialogRemoteDTOMapper.d.ts.map +1 -1
- package/dist/Data/repository/ConnectionRepository.d.ts.map +1 -1
- package/dist/Data/repository/DialogsRepository.d.ts +0 -4
- package/dist/Data/repository/DialogsRepository.d.ts.map +1 -1
- package/dist/Data/source/remote/IRemoteDataSource.d.ts +0 -4
- package/dist/Data/source/remote/IRemoteDataSource.d.ts.map +1 -1
- package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts +1 -0
- package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts.map +1 -1
- package/dist/Data/source/remote/RemoteDataSource.d.ts +0 -4
- package/dist/Data/source/remote/RemoteDataSource.d.ts.map +1 -1
- package/dist/Domain/entity/ChatMessageAttachmentEntity.d.ts +2 -2
- package/dist/Domain/entity/ChatMessageAttachmentEntity.d.ts.map +1 -1
- package/dist/Domain/entity/FileEntity.d.ts +2 -2
- package/dist/Domain/entity/FileEntity.d.ts.map +1 -1
- package/dist/Domain/entity/GroupDialogEntity.d.ts +1 -1
- package/dist/Domain/entity/GroupDialogEntity.d.ts.map +1 -1
- package/dist/Domain/repository/IDialogsRepository.d.ts +0 -4
- package/dist/Domain/repository/IDialogsRepository.d.ts.map +1 -1
- package/dist/Domain/use_cases/SyncDialogsUseCase.d.ts.map +1 -1
- package/dist/Domain/use_cases/UserTypingMessageUseCase.d.ts.map +1 -1
- package/dist/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.d.ts.map +1 -1
- package/dist/Presentation/Views/DialogInfo/DialogInfo.d.ts.map +1 -1
- package/dist/Presentation/Views/DialogList/DialogListViewModel.d.ts +1 -5
- package/dist/Presentation/Views/DialogList/DialogListViewModel.d.ts.map +1 -1
- package/dist/Presentation/Views/DialogList/useDialogListViewModel.d.ts.map +1 -1
- package/dist/Presentation/Views/EditDialog/EditDialog.d.ts +0 -5
- package/dist/Presentation/Views/EditDialog/EditDialog.d.ts.map +1 -1
- package/dist/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.d.ts.map +1 -1
- package/dist/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.d.ts.map +1 -1
- package/dist/index-ui.js +43513 -59614
- package/dist/qb-api-calls/index.d.ts +0 -1
- package/dist/qb-api-calls/index.d.ts.map +1 -1
- package/package.json +14 -8
- package/src/CommonTypes/BaseViewModel.ts +0 -4
- package/src/Data/DefaultConfigurations.ts +4 -4
- package/src/Data/mapper/DialogLocalDTOMapper.ts +9 -10
- package/src/Data/mapper/DialogRemoteDTOMapper.ts +9 -10
- package/src/Data/repository/ConnectionRepository.ts +3 -2
- package/src/Data/repository/DialogsRepository.ts +0 -85
- package/src/Data/source/remote/IRemoteDataSource.ts +0 -12
- package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +39 -22
- package/src/Data/source/remote/RemoteDataSource.ts +65 -246
- package/src/Domain/entity/ChatMessageAttachmentEntity.ts +2 -2
- package/src/Domain/entity/FileEntity.ts +2 -2
- package/src/Domain/entity/GroupDialogEntity.ts +1 -1
- package/src/Domain/repository/IDialogsRepository.ts +0 -12
- package/src/Domain/use_cases/SyncDialogsUseCase.ts +3 -3
- package/src/Domain/use_cases/UserTypingMessageUseCase.ts +4 -2
- package/src/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.tsx +4 -9
- package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +4 -39
- package/src/Presentation/Views/DialogList/DialogListViewModel.ts +1 -5
- package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +0 -147
- package/src/Presentation/Views/EditDialog/EditDialog.scss +2 -21
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +1 -47
- package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +13 -49
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +2 -2
- package/src/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.tsx +2 -2
- package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.tsx +2 -2
- package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.tsx +24 -8
- package/src/QBconfig.ts +4 -4
- package/src/qb-api-calls/index.ts +2 -59
- package/storybook-static/161.77e7dbc5.iframe.bundle.js +2 -0
- package/storybook-static/217.cb8da73c.iframe.bundle.js +408 -0
- package/storybook-static/217.cb8da73c.iframe.bundle.js.map +1 -0
- package/storybook-static/263.f039edee.iframe.bundle.js +2 -0
- package/storybook-static/294.7ed84cb5.iframe.bundle.js +1 -0
- package/storybook-static/338.ed5286bb.iframe.bundle.js +2 -0
- package/storybook-static/363.fe646024.iframe.bundle.js +2 -0
- package/storybook-static/{363.64281ecc.iframe.bundle.js.LICENSE.txt → 363.fe646024.iframe.bundle.js.LICENSE.txt} +0 -7
- package/storybook-static/364.fb3fc9b4.iframe.bundle.js +1 -0
- package/storybook-static/488.a47f0de8.iframe.bundle.js +1 -0
- package/storybook-static/559.fdf11e08.iframe.bundle.js +2 -0
- package/storybook-static/618.ab5566c8.iframe.bundle.js +1 -0
- package/storybook-static/844.5804474b.iframe.bundle.js +95 -0
- package/storybook-static/844.5804474b.iframe.bundle.js.map +1 -0
- package/storybook-static/936.ba75ae44.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.6977856e.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.d77c6500.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Button-Button-stories.05f2f5b7.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.118df514.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e9d3dc6b.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.7d74bffa.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.d92e6904.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Header-Header-stories.b9a00187.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.f484b131.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Message-Message-stories.66867b7e.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.d72f098b.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.7d9e0991.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.1e6bd1cd.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.44c68c03.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.3e87329b.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.ec3e7d5f.iframe.bundle.js +2 -0
- package/storybook-static/Presentation-ui-components-Toast-Toast-stories.2721621c.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.33b23eab.iframe.bundle.js +2 -0
- package/storybook-static/docs-Introduction-mdx.416f8bf9.iframe.bundle.js +1 -0
- package/storybook-static/docs-Styling-mdx.c119b271.iframe.bundle.js +1 -0
- package/storybook-static/iframe.html +5 -3
- package/storybook-static/main.bfaba8e3.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/runtime~main.b1ec3380.iframe.bundle.js +1 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +27 -27
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +74 -71
- package/storybook-static/sb-addons/essentials-docs-4/manager-bundle.js +73 -70
- package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/interactions-11/manager-bundle.js +6 -6
- package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +18 -18
- package/storybook-static/sb-manager/globals-runtime.js +10691 -11043
- package/storybook-static/sb-preview/runtime.js +238 -238
- package/dist/Domain/use_cases/CreateDialogSetUpAutoJoinUseCase.d.ts +0 -14
- package/dist/Domain/use_cases/CreateDialogSetUpAutoJoinUseCase.d.ts.map +0 -1
- package/dist/Domain/use_cases/CreateDialogWithAutoJoinUseCase.d.ts +0 -14
- package/dist/Domain/use_cases/CreateDialogWithAutoJoinUseCase.d.ts.map +0 -1
- package/dist/Domain/use_cases/JoinFromTheDialogUseCase.d.ts +0 -12
- package/dist/Domain/use_cases/JoinFromTheDialogUseCase.d.ts.map +0 -1
- package/dist/Domain/use_cases/UnJoinFromTheDialogUseCase.d.ts +0 -12
- package/dist/Domain/use_cases/UnJoinFromTheDialogUseCase.d.ts.map +0 -1
- package/src/Domain/use_cases/CreateDialogSetUpAutoJoinUseCase.ts +0 -77
- package/src/Domain/use_cases/CreateDialogWithAutoJoinUseCase.ts +0 -77
- package/src/Domain/use_cases/JoinFromTheDialogUseCase.ts +0 -61
- package/src/Domain/use_cases/UnJoinFromTheDialogUseCase.ts +0 -61
- package/storybook-static/161.53da4e03.iframe.bundle.js +0 -2
- package/storybook-static/167.88fc69a9.iframe.bundle.js +0 -1
- package/storybook-static/217.bd248edb.iframe.bundle.js +0 -405
- package/storybook-static/217.bd248edb.iframe.bundle.js.map +0 -1
- package/storybook-static/294.b81cdbca.iframe.bundle.js +0 -1
- package/storybook-static/363.64281ecc.iframe.bundle.js +0 -2
- package/storybook-static/364.988cd801.iframe.bundle.js +0 -1
- package/storybook-static/488.3cd3942e.iframe.bundle.js +0 -1
- package/storybook-static/559.9e64a6f5.iframe.bundle.js +0 -2
- package/storybook-static/735.3121b1b2.iframe.bundle.js +0 -2
- package/storybook-static/844.815b57b5.iframe.bundle.js +0 -95
- package/storybook-static/844.815b57b5.iframe.bundle.js.map +0 -1
- package/storybook-static/936.8546c1d8.iframe.bundle.js +0 -1
- package/storybook-static/961.d47fc2bc.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.a1656796.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.58880259.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Button-Button-stories.f456d20f.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.cd797979.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2dae7689.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.cd0c68a8.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.c88a1bf9.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Header-Header-stories.dd4b2b7b.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.500e777d.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Message-Message-stories.93af3d2d.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.d1c68a8a.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.2b4362f7.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.34dfadb1.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.9b4eff15.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.8574dbe1.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.058998bf.iframe.bundle.js +0 -2
- package/storybook-static/Presentation-ui-components-Toast-Toast-stories.c4dfb1a6.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.371bcb5d.iframe.bundle.js +0 -2
- package/storybook-static/docs-Introduction-mdx.5addfa61.iframe.bundle.js +0 -1
- package/storybook-static/docs-Styling-mdx.9f4235f1.iframe.bundle.js +0 -1
- package/storybook-static/main.d176ed27.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.bc0704e8.iframe.bundle.js +0 -1
- /package/storybook-static/{161.53da4e03.iframe.bundle.js.LICENSE.txt → 161.77e7dbc5.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{217.bd248edb.iframe.bundle.js.LICENSE.txt → 217.cb8da73c.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{961.d47fc2bc.iframe.bundle.js.LICENSE.txt → 263.f039edee.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{735.3121b1b2.iframe.bundle.js.LICENSE.txt → 338.ed5286bb.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{559.9e64a6f5.iframe.bundle.js.LICENSE.txt → 559.fdf11e08.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{844.815b57b5.iframe.bundle.js.LICENSE.txt → 844.5804474b.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Avatar-avatar-stories.a1656796.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Avatar-avatar-stories.6977856e.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Badge-Badge-stories.58880259.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Badge-Badge-stories.d77c6500.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Button-Button-stories.f456d20f.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Button-Button-stories.05f2f5b7.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2dae7689.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e9d3dc6b.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-DialogWindow-DialogWindow-stories.cd0c68a8.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-DialogWindow-DialogWindow-stories.7d74bffa.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Dropdown-Dropdown-stories.c88a1bf9.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Dropdown-Dropdown-stories.d92e6904.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Header-Header-stories.dd4b2b7b.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Header-Header-stories.b9a00187.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Loader-Loader-stories.500e777d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Loader-Loader-stories.f484b131.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Message-Message-stories.93af3d2d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Message-Message-stories.66867b7e.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-Placeholder-Placeholder-stories.34dfadb1.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Placeholder-Placeholder-stories.1e6bd1cd.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.9b4eff15.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.44c68c03.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-SettingsItem-SettingsItem-stories.8574dbe1.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-SettingsItem-SettingsItem-stories.3e87329b.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-TextField-TextField-stories.058998bf.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-TextField-TextField-stories.ec3e7d5f.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{Presentation-ui-components-UserListItem-UserListItem-stories.371bcb5d.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-UserListItem-UserListItem-stories.33b23eab.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -33,10 +33,6 @@ import UsersRepository from '../../../Data/repository/UsersRepository';
|
|
|
33
33
|
import { UserEntity } from '../../../Domain/entity/UserEntity';
|
|
34
34
|
import { DefaultConfigurations } from '../../../Data/DefaultConfigurations';
|
|
35
35
|
import { UpdateCurrentDialogInDataSourceUseCase } from '../../../Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase';
|
|
36
|
-
import { CreateDialogWithAutoJoinUseCase } from '../../../Domain/use_cases/CreateDialogWithAutoJoinUseCase';
|
|
37
|
-
import { UnJoinFromTheDialogUseCase } from '../../../Domain/use_cases/UnJoinFromTheDialogUseCase';
|
|
38
|
-
import { JoinFromTheDialogUseCase } from '../../../Domain/use_cases/JoinFromTheDialogUseCase';
|
|
39
|
-
import { CreateDialogSetUpAutoJoinUseCase } from '../../../Domain/use_cases/CreateDialogSetUpAutoJoinUseCase';
|
|
40
36
|
|
|
41
37
|
export default function useDialogListViewModel(
|
|
42
38
|
currentContext: QBDataContextType,
|
|
@@ -396,69 +392,6 @@ export default function useDialogListViewModel(
|
|
|
396
392
|
return Promise.reject(resultDialog);
|
|
397
393
|
};
|
|
398
394
|
|
|
399
|
-
const createDialogForAutoJoin = async (
|
|
400
|
-
dialogInfo: GroupDialogEntity, disableAutoJoin: boolean | null
|
|
401
|
-
): Promise<DialogEntity> => {
|
|
402
|
-
const textInformationMessage = `${currentUserName} create the chat`;
|
|
403
|
-
const createDialogWitAutoJoinUseCase: CreateDialogWithAutoJoinUseCase = new CreateDialogWithAutoJoinUseCase(
|
|
404
|
-
eventMessageRepository,
|
|
405
|
-
new DialogsRepository(
|
|
406
|
-
currentContext.storage.LOCAL_DATA_SOURCE,
|
|
407
|
-
remoteDataSourceMock,
|
|
408
|
-
),
|
|
409
|
-
dialogInfo,
|
|
410
|
-
textInformationMessage,
|
|
411
|
-
);
|
|
412
|
-
const resultDialog: DialogEntity = await createDialogWitAutoJoinUseCase
|
|
413
|
-
.execute()
|
|
414
|
-
.catch((e) => {
|
|
415
|
-
console.log('EXCEPTION IN CREATE NEW DIALOG WITH AUTO JOIN 0: ', stringifyError(e));
|
|
416
|
-
setNewDialog(undefined);
|
|
417
|
-
|
|
418
|
-
throw new Error(stringifyError(e));
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
if (resultDialog) {
|
|
422
|
-
setNewDialog(resultDialog);
|
|
423
|
-
|
|
424
|
-
return Promise.resolve(resultDialog);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
return Promise.reject(resultDialog);
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
const createDialogSetUpAutoJoin = async (
|
|
431
|
-
dialogInfo: GroupDialogEntity, disableAutoJoin: boolean | null
|
|
432
|
-
): Promise<DialogEntity> => {
|
|
433
|
-
const textInformationMessage = `${currentUserName} create the chat`;
|
|
434
|
-
const createDialogSetUpAutoJoinUseCase: CreateDialogSetUpAutoJoinUseCase = new CreateDialogSetUpAutoJoinUseCase(
|
|
435
|
-
eventMessageRepository,
|
|
436
|
-
new DialogsRepository(
|
|
437
|
-
currentContext.storage.LOCAL_DATA_SOURCE,
|
|
438
|
-
remoteDataSourceMock,
|
|
439
|
-
),
|
|
440
|
-
dialogInfo,
|
|
441
|
-
textInformationMessage,
|
|
442
|
-
);
|
|
443
|
-
const resultDialog: DialogEntity = await createDialogSetUpAutoJoinUseCase
|
|
444
|
-
.execute()
|
|
445
|
-
.catch((e) => {
|
|
446
|
-
console.log('EXCEPTION IN CREATE NEW DIALOG WITH SET UP AUTO JOIN TO 1: ', stringifyError(e));
|
|
447
|
-
setNewDialog(undefined);
|
|
448
|
-
|
|
449
|
-
throw new Error(stringifyError(e));
|
|
450
|
-
});
|
|
451
|
-
|
|
452
|
-
if (resultDialog) {
|
|
453
|
-
setNewDialog(resultDialog);
|
|
454
|
-
|
|
455
|
-
return Promise.resolve(resultDialog);
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
return Promise.reject(resultDialog);
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
|
|
462
395
|
const updateDialog = async (
|
|
463
396
|
// eslint-disable-next-line @typescript-eslint/no-shadow,@typescript-eslint/no-unused-vars
|
|
464
397
|
dialog: GroupDialogEntity,
|
|
@@ -561,82 +494,6 @@ export default function useDialogListViewModel(
|
|
|
561
494
|
return Promise.reject(leaveResult);
|
|
562
495
|
};
|
|
563
496
|
|
|
564
|
-
const unJoinDialog = async (
|
|
565
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow,@typescript-eslint/no-unused-vars
|
|
566
|
-
dialogToDelete: GroupDialogEntity,
|
|
567
|
-
): Promise<boolean> => {
|
|
568
|
-
let unJoinResult = false;
|
|
569
|
-
|
|
570
|
-
if (dialogToDelete.type === DialogType.group) {
|
|
571
|
-
|
|
572
|
-
const usersForDeleteFromDialog: Array<number> = new Array<number>();
|
|
573
|
-
|
|
574
|
-
const userToDeleteId: number =
|
|
575
|
-
remoteDataSourceMock?.authInformation?.userId || 0;
|
|
576
|
-
|
|
577
|
-
usersForDeleteFromDialog.push(userToDeleteId);
|
|
578
|
-
const unjoinFromDialog: UnJoinFromTheDialogUseCase =
|
|
579
|
-
new UnJoinFromTheDialogUseCase(
|
|
580
|
-
eventMessageRepository,
|
|
581
|
-
new DialogsRepository(
|
|
582
|
-
currentContext.storage.LOCAL_DATA_SOURCE,
|
|
583
|
-
remoteDataSourceMock,
|
|
584
|
-
),
|
|
585
|
-
dialogToDelete,
|
|
586
|
-
);
|
|
587
|
-
|
|
588
|
-
unJoinResult = await unjoinFromDialog.execute().catch((e) => {
|
|
589
|
-
console.log(
|
|
590
|
-
'Error delete users from UnJoinFromTheDialogUseCase: ',
|
|
591
|
-
stringifyError(e),
|
|
592
|
-
);
|
|
593
|
-
throw new Error(stringifyError(e));
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
if (unJoinResult) {
|
|
598
|
-
return Promise.resolve(unJoinResult);
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
return Promise.reject(unJoinResult);
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
const joinToDialog = async (
|
|
605
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow,@typescript-eslint/no-unused-vars
|
|
606
|
-
dialogToDelete: GroupDialogEntity,
|
|
607
|
-
): Promise<boolean> => {
|
|
608
|
-
let joinResult = false;
|
|
609
|
-
|
|
610
|
-
if (dialogToDelete.type === DialogType.group) {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
const joinFromDialog: JoinFromTheDialogUseCase =
|
|
614
|
-
new JoinFromTheDialogUseCase(
|
|
615
|
-
eventMessageRepository,
|
|
616
|
-
new DialogsRepository(
|
|
617
|
-
currentContext.storage.LOCAL_DATA_SOURCE,
|
|
618
|
-
remoteDataSourceMock,
|
|
619
|
-
),
|
|
620
|
-
dialogToDelete,
|
|
621
|
-
);
|
|
622
|
-
|
|
623
|
-
joinResult = await joinFromDialog.execute().catch((e) => {
|
|
624
|
-
console.log(
|
|
625
|
-
'Error delete users from JoinFromTheDialogUseCase: ',
|
|
626
|
-
stringifyError(e),
|
|
627
|
-
);
|
|
628
|
-
throw new Error(stringifyError(e));
|
|
629
|
-
});
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
if (joinResult) {
|
|
633
|
-
return Promise.resolve(joinResult);
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
return Promise.reject(joinResult);
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
|
|
640
497
|
const removeMembers = async (dialog: GroupDialogEntity): Promise<boolean> => {
|
|
641
498
|
let leaveResult = false;
|
|
642
499
|
|
|
@@ -734,12 +591,8 @@ export default function useDialogListViewModel(
|
|
|
734
591
|
getDialogs,
|
|
735
592
|
release,
|
|
736
593
|
createDialog,
|
|
737
|
-
createDialogForAutoJoin,
|
|
738
|
-
createDialogSetUpAutoJoin,
|
|
739
594
|
updateDialog,
|
|
740
595
|
deleteDialog,
|
|
741
|
-
unJoinDialog,
|
|
742
|
-
joinToDialog,
|
|
743
596
|
uploadFile,
|
|
744
597
|
removeMembers,
|
|
745
598
|
setWaitLoadingStatus,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
$container-width: 332px;
|
|
2
|
-
$container-height:
|
|
2
|
+
$container-height: 236px;
|
|
3
3
|
$create-dialog-container-width: 332px;
|
|
4
|
-
$create-dialog-container-height:
|
|
4
|
+
$create-dialog-container-height: 180px;
|
|
5
5
|
|
|
6
6
|
.edit-container {
|
|
7
7
|
min-height: $container-height;
|
|
@@ -131,25 +131,6 @@ $create-dialog-container-height: 245px;
|
|
|
131
131
|
color: var(--main-text);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
&__auto-join {
|
|
135
|
-
min-height: 12px;
|
|
136
|
-
font-style: normal;
|
|
137
|
-
font-weight: 400;
|
|
138
|
-
font-size: 12px;
|
|
139
|
-
line-height: 12px;
|
|
140
|
-
letter-spacing: 0.25px;
|
|
141
|
-
margin-top: 5px;
|
|
142
|
-
color: var(--error);
|
|
143
|
-
display: flex;
|
|
144
|
-
flex-flow: row;
|
|
145
|
-
align-items: center;
|
|
146
|
-
|
|
147
|
-
svg {
|
|
148
|
-
margin: 2px 2px 0 0;
|
|
149
|
-
fill: var(--error);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
134
|
&__text-field {
|
|
154
135
|
width: 100%;
|
|
155
136
|
}
|
|
@@ -13,10 +13,9 @@ import { DialogType } from '../../../Domain/entity/DialogTypes';
|
|
|
13
13
|
import GroupChat from '../../components/UI/svgs/Icons/Contents/GroupChat';
|
|
14
14
|
import PublicChannel from '../../components/UI/svgs/Icons/Contents/PublicChannel';
|
|
15
15
|
import useQbInitializedDataContext from '../../providers/QuickBloxUIKitProvider/useQbInitializedDataContext';
|
|
16
|
-
import { Button,
|
|
16
|
+
import { Button, TextField } from '../../ui-components';
|
|
17
17
|
import { formatFileSize } from '../../../utils/formatFileSize';
|
|
18
18
|
import './EditDialog.scss';
|
|
19
|
-
import { SettingsFilledSvg } from '../../icons';
|
|
20
19
|
|
|
21
20
|
export const TypeOpenDialog = {
|
|
22
21
|
edit: 'edit',
|
|
@@ -25,12 +24,6 @@ export const TypeOpenDialog = {
|
|
|
25
24
|
|
|
26
25
|
export type OpenDialogArcheType = keyof typeof TypeOpenDialog;
|
|
27
26
|
|
|
28
|
-
export enum AutoJoinState {
|
|
29
|
-
Enabled = 'enabled',
|
|
30
|
-
Disabled = 'disabled',
|
|
31
|
-
Pending = 'pending', // "null"
|
|
32
|
-
}
|
|
33
|
-
|
|
34
27
|
type EditDialogProps = {
|
|
35
28
|
nameDialog: string;
|
|
36
29
|
typeDialog: DialogType;
|
|
@@ -67,7 +60,6 @@ const EditDialog = ({
|
|
|
67
60
|
nameDialog.length > maxLengthNameDialog,
|
|
68
61
|
);
|
|
69
62
|
const [errorMessageUpload, setErrorMessageUpload] = useState('');
|
|
70
|
-
const [disableAutoJoin, setDisableAutoJoin] = useState<AutoJoinState>(AutoJoinState.Pending)
|
|
71
63
|
|
|
72
64
|
const handleUploadAvatar = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
73
65
|
const allowedExtensions = ['jpg', 'jpeg', 'gif', 'png'];
|
|
@@ -165,22 +157,11 @@ const EditDialog = ({
|
|
|
165
157
|
}, [dialogName]);
|
|
166
158
|
|
|
167
159
|
const handleUpdate = () => {
|
|
168
|
-
let disableAutoJoinValue: boolean | null = null
|
|
169
|
-
|
|
170
|
-
if (disableAutoJoin === AutoJoinState.Enabled) {
|
|
171
|
-
disableAutoJoinValue = true
|
|
172
|
-
} else if (disableAutoJoin === AutoJoinState.Disabled) {
|
|
173
|
-
disableAutoJoinValue = false
|
|
174
|
-
} else {
|
|
175
|
-
disableAutoJoinValue = null
|
|
176
|
-
}
|
|
177
|
-
|
|
178
160
|
if (clickUpdatedHandler) {
|
|
179
161
|
const params: EditDialogParams = {
|
|
180
162
|
dialogTitle: dialogName,
|
|
181
163
|
// dialogAvatar: urlAvatar.length ? fileUploadAvatar : '',
|
|
182
164
|
dialogAvatar: urlAvatar === 'null' ? 'null' : fileUploadAvatar,
|
|
183
|
-
disableAutoJoin: disableAutoJoinValue,
|
|
184
165
|
};
|
|
185
166
|
|
|
186
167
|
clickUpdatedHandler(params);
|
|
@@ -252,33 +233,6 @@ const EditDialog = ({
|
|
|
252
233
|
placeholder="Enter name"
|
|
253
234
|
className="edit-dialog-container--wrapper__text-field"
|
|
254
235
|
/>
|
|
255
|
-
<div className="edit-dialog-container--wrapper__auto-join">
|
|
256
|
-
<CheckBox
|
|
257
|
-
disabled={false}
|
|
258
|
-
checked={disableAutoJoin === AutoJoinState.Enabled}
|
|
259
|
-
onChange={() => setDisableAutoJoin(AutoJoinState.Enabled)}
|
|
260
|
-
/>
|
|
261
|
-
<SettingsFilledSvg />
|
|
262
|
-
is_join_required: 1
|
|
263
|
-
</div>
|
|
264
|
-
<div className="edit-dialog-container--wrapper__auto-join">
|
|
265
|
-
<CheckBox
|
|
266
|
-
disabled={false}
|
|
267
|
-
checked={disableAutoJoin === AutoJoinState.Disabled}
|
|
268
|
-
onChange={() => setDisableAutoJoin(AutoJoinState.Disabled)}
|
|
269
|
-
/>
|
|
270
|
-
<SettingsFilledSvg />
|
|
271
|
-
is_join_required: 0
|
|
272
|
-
</div>
|
|
273
|
-
<div className="edit-dialog-container--wrapper__auto-join">
|
|
274
|
-
<CheckBox
|
|
275
|
-
disabled={false}
|
|
276
|
-
checked={disableAutoJoin === AutoJoinState.Pending}
|
|
277
|
-
onChange={() => setDisableAutoJoin(AutoJoinState.Pending)}
|
|
278
|
-
/>
|
|
279
|
-
<SettingsFilledSvg />
|
|
280
|
-
do not sending is_join_required
|
|
281
|
-
</div>
|
|
282
236
|
</div>
|
|
283
237
|
</div>
|
|
284
238
|
<div className="edit-btn-container">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import CreateDialog from '../CreateDialog/CreateDialog';
|
|
3
3
|
import { DialogType } from '../../../../Domain/entity/DialogTypes';
|
|
4
|
-
import EditDialog, {
|
|
4
|
+
import EditDialog, { TypeOpenDialog } from '../../EditDialog/EditDialog';
|
|
5
5
|
import InviteMembers from '../../InviteMembers/InviteMembers';
|
|
6
6
|
import { DialogListViewModel } from '../../DialogList/DialogListViewModel';
|
|
7
7
|
import { GroupDialogEntity } from '../../../../Domain/entity/GroupDialogEntity';
|
|
@@ -36,11 +36,9 @@ const CreateNewDialogFlow = ({
|
|
|
36
36
|
const [stepToCreate, setNumStepToCreate] = React.useState(setUpDialogType);
|
|
37
37
|
const [selectedDialogType, setSelectedDialogType] = useState<DialogType>();
|
|
38
38
|
const [dialogName, setDialogName] = React.useState<string>('NOT DEFINE');
|
|
39
|
-
const [uidAvatar, setUidAvatar] = React.useState<string
|
|
39
|
+
const [uidAvatar, setUidAvatar] = React.useState<string | undefined>(
|
|
40
40
|
undefined,
|
|
41
41
|
);
|
|
42
|
-
const [disableAutoJoin, setDisableAutoJoin] = useState<AutoJoinState>(AutoJoinState.Pending)
|
|
43
|
-
|
|
44
42
|
const { allowPublicDialogCreation } =
|
|
45
43
|
currentContext.InitParams.qbConfig.appConfig;
|
|
46
44
|
|
|
@@ -56,20 +54,10 @@ const CreateNewDialogFlow = ({
|
|
|
56
54
|
}, [selectedDialogType]);
|
|
57
55
|
|
|
58
56
|
const getDialogNameHandler = (params: EditDialogParams) => {
|
|
59
|
-
|
|
60
|
-
let disableAutoJoinValue = AutoJoinState.Pending
|
|
61
|
-
if (params.disableAutoJoin === true) {
|
|
62
|
-
disableAutoJoinValue = AutoJoinState.Enabled
|
|
63
|
-
} else if (params.disableAutoJoin === false) {
|
|
64
|
-
disableAutoJoinValue = AutoJoinState.Disabled
|
|
65
|
-
} else {
|
|
66
|
-
disableAutoJoinValue = AutoJoinState.Pending
|
|
67
|
-
}
|
|
68
57
|
console.log(params.dialogTitle);
|
|
69
58
|
setDialogName(params.dialogTitle);
|
|
70
|
-
setDisableAutoJoin(disableAutoJoinValue)
|
|
71
59
|
|
|
72
|
-
let newUidAvatar: string |
|
|
60
|
+
let newUidAvatar: string | undefined = '';
|
|
73
61
|
|
|
74
62
|
console.log('before urlPhoto: ', newUidAvatar);
|
|
75
63
|
if (params.dialogAvatar) {
|
|
@@ -117,41 +105,17 @@ const CreateNewDialogFlow = ({
|
|
|
117
105
|
dialog.photo = uidAvatar || '';
|
|
118
106
|
dialog.participantIds = participants;
|
|
119
107
|
dialog.type = selectedDialogType;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// eslint-disable-next-line promise/always-return
|
|
124
|
-
.then((newEntity) => {
|
|
125
|
-
onFinished(newEntity);
|
|
126
|
-
})
|
|
127
|
-
.catch((e) => {
|
|
128
|
-
console.log('Have exception: ', stringifyError(e));
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
else
|
|
132
|
-
if (disableAutoJoin === AutoJoinState.Pending) { // without isAutoJoin, does not use isAutoJoin flag
|
|
108
|
+
// eslint-disable-next-line promise/always-return
|
|
109
|
+
await dialogsViewModel
|
|
110
|
+
.createDialog(dialog)
|
|
133
111
|
// eslint-disable-next-line promise/always-return
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
console.log('Have exception: ', stringifyError(e));
|
|
142
|
-
});
|
|
143
|
-
// }
|
|
144
|
-
} else { // isAutoJoin = 0
|
|
145
|
-
await dialogsViewModel.createDialogForAutoJoin(dialog, true)
|
|
146
|
-
// eslint-disable-next-line promise/always-return
|
|
147
|
-
.then((newEntity) => {
|
|
148
|
-
onFinished(newEntity);
|
|
149
|
-
})
|
|
150
|
-
.catch((e) => {
|
|
151
|
-
console.log('Have exception: ', stringifyError(e));
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
|
|
112
|
+
.then((newEntity) => {
|
|
113
|
+
onFinished(newEntity);
|
|
114
|
+
})
|
|
115
|
+
.catch((e) => {
|
|
116
|
+
console.log('Have exception: ', stringifyError(e));
|
|
117
|
+
});
|
|
118
|
+
// }
|
|
155
119
|
}
|
|
156
120
|
};
|
|
157
121
|
|
|
@@ -137,7 +137,7 @@ const QuickBloxUIKitDesktopLayout = ({
|
|
|
137
137
|
|
|
138
138
|
return (
|
|
139
139
|
<Avatar
|
|
140
|
-
src={
|
|
140
|
+
src={groupDialogEntity.photo || ''}
|
|
141
141
|
icon={<GroupChatSvg />}
|
|
142
142
|
size="md"
|
|
143
143
|
/>
|
|
@@ -384,7 +384,7 @@ const QuickBloxUIKitDesktopLayout = ({
|
|
|
384
384
|
const imagePhoto = (currentDialog.entity as GroupDialogEntity).photo;
|
|
385
385
|
|
|
386
386
|
AvatarComponent = imagePhoto ? (
|
|
387
|
-
<Avatar size="lg" src={
|
|
387
|
+
<Avatar size="lg" src={imagePhoto} />
|
|
388
388
|
) : undefined;
|
|
389
389
|
}
|
|
390
390
|
|
|
@@ -45,10 +45,10 @@ export default function AttachmentBubble({
|
|
|
45
45
|
return (
|
|
46
46
|
<AudioBubble
|
|
47
47
|
title={attachment.file?.name || ''}
|
|
48
|
-
href={
|
|
48
|
+
href={attachment.url}
|
|
49
49
|
type={typeMessage}
|
|
50
50
|
audioFileType={attachment.file?.type?.toString()}
|
|
51
|
-
fileUid={
|
|
51
|
+
fileUid={attachment.file?.uid}
|
|
52
52
|
/>
|
|
53
53
|
);
|
|
54
54
|
}
|
|
@@ -9,11 +9,11 @@ type ReplyImagePreviewAttachmentProps = {
|
|
|
9
9
|
const ReplyImagePreviewAttachment = ({ imageFile }: ReplyImagePreviewAttachmentProps) => {
|
|
10
10
|
return (
|
|
11
11
|
<div>
|
|
12
|
-
<a href={
|
|
12
|
+
<a href={imageFile.url} download="file" target="_blank" rel="noreferrer">
|
|
13
13
|
<img
|
|
14
14
|
className="reply-preview-image-body"
|
|
15
15
|
key={imageFile.id}
|
|
16
|
-
src={
|
|
16
|
+
src={imageFile.url}
|
|
17
17
|
alt={imageFile.name || 'attached image'}
|
|
18
18
|
/>
|
|
19
19
|
</a>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import './VoiceRecordingProgress.scss';
|
|
3
3
|
import { FunctionTypeVoidToVoid } from '../../../../CommonTypes/BaseViewModel';
|
|
4
4
|
|
|
@@ -15,7 +15,8 @@ const VoiceRecordingProgress = ({
|
|
|
15
15
|
onClick,
|
|
16
16
|
onTouch,
|
|
17
17
|
}: VoiceRecordingProgressProps) => {
|
|
18
|
-
|
|
18
|
+
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
19
|
+
const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
|
19
20
|
const [currentTime, setCurrentTime] = useState(Date.now());
|
|
20
21
|
const [timeString, setTimeString] = useState('00:00:00');
|
|
21
22
|
const [startTime] = useState(Date.now());
|
|
@@ -33,9 +34,13 @@ const VoiceRecordingProgress = ({
|
|
|
33
34
|
}, [currentTime]);
|
|
34
35
|
|
|
35
36
|
const stopTimer = () => {
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
if (timeoutRef.current) {
|
|
38
|
+
clearTimeout(timeoutRef.current);
|
|
39
|
+
timeoutRef.current = null;
|
|
40
|
+
}
|
|
41
|
+
if (intervalRef.current) {
|
|
42
|
+
clearInterval(intervalRef.current);
|
|
43
|
+
intervalRef.current = null;
|
|
39
44
|
}
|
|
40
45
|
if (onClick) onClick();
|
|
41
46
|
if (onTouch) onTouch();
|
|
@@ -45,12 +50,12 @@ const VoiceRecordingProgress = ({
|
|
|
45
50
|
const startTimer = () => {
|
|
46
51
|
const longRec = longRecInSec <= 60 && longRecInSec > 0 ? longRecInSec : 10;
|
|
47
52
|
|
|
48
|
-
setTimeout(() => {
|
|
53
|
+
timeoutRef.current = setTimeout(() => {
|
|
49
54
|
stopTimer();
|
|
50
55
|
}, longRec * 1000);
|
|
51
56
|
|
|
52
|
-
if (!
|
|
53
|
-
|
|
57
|
+
if (!intervalRef.current) {
|
|
58
|
+
intervalRef.current = setInterval(() => {
|
|
54
59
|
setCurrentTime(Date.now());
|
|
55
60
|
}, 1000);
|
|
56
61
|
}
|
|
@@ -58,6 +63,17 @@ const VoiceRecordingProgress = ({
|
|
|
58
63
|
|
|
59
64
|
useEffect(() => {
|
|
60
65
|
if (startStatus) startTimer();
|
|
66
|
+
|
|
67
|
+
return () => {
|
|
68
|
+
if (timeoutRef.current) {
|
|
69
|
+
clearTimeout(timeoutRef.current);
|
|
70
|
+
timeoutRef.current = null;
|
|
71
|
+
}
|
|
72
|
+
if (intervalRef.current) {
|
|
73
|
+
clearInterval(intervalRef.current);
|
|
74
|
+
intervalRef.current = null;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
61
77
|
}, [startStatus]);
|
|
62
78
|
|
|
63
79
|
return (
|
package/src/QBconfig.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { QBUIKitConfig } from './CommonTypes/CommonTypes';
|
|
|
2
2
|
|
|
3
3
|
export const QBConfig: QBUIKitConfig = {
|
|
4
4
|
credentials: {
|
|
5
|
-
appId:
|
|
6
|
-
accountKey: '
|
|
7
|
-
authKey: '
|
|
8
|
-
authSecret: '
|
|
5
|
+
appId: -1,
|
|
6
|
+
accountKey: '',
|
|
7
|
+
authKey: '',
|
|
8
|
+
authSecret: '',
|
|
9
9
|
sessionToken: '',
|
|
10
10
|
},
|
|
11
11
|
configAIApi: {
|
|
@@ -503,7 +503,7 @@ export function QBCreateGroupDialogWithAutojoinFalse(
|
|
|
503
503
|
data?: Dictionary<unknown>,
|
|
504
504
|
) {
|
|
505
505
|
console.log(
|
|
506
|
-
`call
|
|
506
|
+
`call QBCreateGroupDialog with ids: ${JSON.stringify(userIds)} name: ${
|
|
507
507
|
dialogName || ''
|
|
508
508
|
}`,
|
|
509
509
|
);
|
|
@@ -550,60 +550,6 @@ export function QBCreateGroupDialogWithAutojoinFalse(
|
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
-
export function QBCreateGroupDialogWithAutojoinTrue(
|
|
554
|
-
userIds: Array<QBUser['id']>,
|
|
555
|
-
dialogName?: string,
|
|
556
|
-
data?: Dictionary<unknown>,
|
|
557
|
-
) {
|
|
558
|
-
console.log(
|
|
559
|
-
`call QBCreateGroupDialogWithAutojoinTrue with ids: ${JSON.stringify(userIds)} name: ${
|
|
560
|
-
dialogName || ''
|
|
561
|
-
}`,
|
|
562
|
-
);
|
|
563
|
-
|
|
564
|
-
let params = {};
|
|
565
|
-
|
|
566
|
-
if (data && data?.photo) {
|
|
567
|
-
params = {
|
|
568
|
-
name: dialogName || '-',
|
|
569
|
-
occupants_ids: [userIds],
|
|
570
|
-
type: 2,
|
|
571
|
-
photo: data?.photo,
|
|
572
|
-
is_join_required: 1,
|
|
573
|
-
};
|
|
574
|
-
} else {
|
|
575
|
-
params = {
|
|
576
|
-
name: dialogName || '-',
|
|
577
|
-
occupants_ids: [userIds],
|
|
578
|
-
type: 2,
|
|
579
|
-
is_join_required: 1
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
return new Promise<QBUIKitChatDialog>((resolve, reject) => {
|
|
584
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
585
|
-
const QB = getQB();
|
|
586
|
-
|
|
587
|
-
QB.chat.dialog.create(
|
|
588
|
-
// {
|
|
589
|
-
// name: dialogName || '-',
|
|
590
|
-
// occupants_ids: [userIds],
|
|
591
|
-
// type: 2,
|
|
592
|
-
// photo: data?.photo,
|
|
593
|
-
// },
|
|
594
|
-
params,
|
|
595
|
-
(error, chat) => {
|
|
596
|
-
if (error) {
|
|
597
|
-
reject(stringifyError(error));
|
|
598
|
-
} else {
|
|
599
|
-
resolve(chat!);
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
);
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
|
|
607
553
|
// END
|
|
608
554
|
|
|
609
555
|
export function QBUpdateDialog(
|
|
@@ -689,11 +635,8 @@ export function QBLeaveDialog(dialogId: QBUIKitChatDialog['_id']) {
|
|
|
689
635
|
// unjoin
|
|
690
636
|
QB.chat.muc.leave(dialogJid, (error, res) => {
|
|
691
637
|
if (error) {
|
|
692
|
-
|
|
693
|
-
console.log('QBLeaveDialog error: ', errorMessage);
|
|
694
|
-
reject(errorMessage);
|
|
638
|
+
reject(stringifyError(error));
|
|
695
639
|
} else {
|
|
696
|
-
console.log('QBLeaveDialog success: ',res);
|
|
697
640
|
resolve(res);
|
|
698
641
|
}
|
|
699
642
|
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 161.77e7dbc5.iframe.bundle.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[161],{"./node_modules/react-dom/cjs/react-dom-test-utils.production.js"(__unused_webpack_module,exports,__webpack_require__){var React=__webpack_require__("./node_modules/react/index.js"),didWarnAboutUsingAct=!1;exports.act=function(callback){return!1===didWarnAboutUsingAct&&(didWarnAboutUsingAct=!0,console.error("`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. Import `act` from `react` instead of `react-dom/test-utils`. See https://react.dev/warnings/react-dom-test-utils for more info.")),React.act(callback)}},"./node_modules/react-dom/test-utils.js"(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__("./node_modules/react-dom/cjs/react-dom-test-utils.production.js")}}]);
|