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.
Files changed (182) hide show
  1. package/.claude/settings.local.json +14 -0
  2. package/dist/CommonTypes/BaseViewModel.d.ts +0 -2
  3. package/dist/CommonTypes/BaseViewModel.d.ts.map +1 -1
  4. package/dist/Data/mapper/DialogLocalDTOMapper.d.ts.map +1 -1
  5. package/dist/Data/mapper/DialogRemoteDTOMapper.d.ts.map +1 -1
  6. package/dist/Data/repository/ConnectionRepository.d.ts.map +1 -1
  7. package/dist/Data/repository/DialogsRepository.d.ts +0 -4
  8. package/dist/Data/repository/DialogsRepository.d.ts.map +1 -1
  9. package/dist/Data/source/remote/IRemoteDataSource.d.ts +0 -4
  10. package/dist/Data/source/remote/IRemoteDataSource.d.ts.map +1 -1
  11. package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts +1 -0
  12. package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts.map +1 -1
  13. package/dist/Data/source/remote/RemoteDataSource.d.ts +0 -4
  14. package/dist/Data/source/remote/RemoteDataSource.d.ts.map +1 -1
  15. package/dist/Domain/entity/ChatMessageAttachmentEntity.d.ts +2 -2
  16. package/dist/Domain/entity/ChatMessageAttachmentEntity.d.ts.map +1 -1
  17. package/dist/Domain/entity/FileEntity.d.ts +2 -2
  18. package/dist/Domain/entity/FileEntity.d.ts.map +1 -1
  19. package/dist/Domain/entity/GroupDialogEntity.d.ts +1 -1
  20. package/dist/Domain/entity/GroupDialogEntity.d.ts.map +1 -1
  21. package/dist/Domain/repository/IDialogsRepository.d.ts +0 -4
  22. package/dist/Domain/repository/IDialogsRepository.d.ts.map +1 -1
  23. package/dist/Domain/use_cases/SyncDialogsUseCase.d.ts.map +1 -1
  24. package/dist/Domain/use_cases/UserTypingMessageUseCase.d.ts.map +1 -1
  25. package/dist/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.d.ts.map +1 -1
  26. package/dist/Presentation/Views/DialogInfo/DialogInfo.d.ts.map +1 -1
  27. package/dist/Presentation/Views/DialogList/DialogListViewModel.d.ts +1 -5
  28. package/dist/Presentation/Views/DialogList/DialogListViewModel.d.ts.map +1 -1
  29. package/dist/Presentation/Views/DialogList/useDialogListViewModel.d.ts.map +1 -1
  30. package/dist/Presentation/Views/EditDialog/EditDialog.d.ts +0 -5
  31. package/dist/Presentation/Views/EditDialog/EditDialog.d.ts.map +1 -1
  32. package/dist/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.d.ts.map +1 -1
  33. package/dist/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.d.ts.map +1 -1
  34. package/dist/index-ui.js +43513 -59614
  35. package/dist/qb-api-calls/index.d.ts +0 -1
  36. package/dist/qb-api-calls/index.d.ts.map +1 -1
  37. package/package.json +14 -8
  38. package/src/CommonTypes/BaseViewModel.ts +0 -4
  39. package/src/Data/DefaultConfigurations.ts +4 -4
  40. package/src/Data/mapper/DialogLocalDTOMapper.ts +9 -10
  41. package/src/Data/mapper/DialogRemoteDTOMapper.ts +9 -10
  42. package/src/Data/repository/ConnectionRepository.ts +3 -2
  43. package/src/Data/repository/DialogsRepository.ts +0 -85
  44. package/src/Data/source/remote/IRemoteDataSource.ts +0 -12
  45. package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +39 -22
  46. package/src/Data/source/remote/RemoteDataSource.ts +65 -246
  47. package/src/Domain/entity/ChatMessageAttachmentEntity.ts +2 -2
  48. package/src/Domain/entity/FileEntity.ts +2 -2
  49. package/src/Domain/entity/GroupDialogEntity.ts +1 -1
  50. package/src/Domain/repository/IDialogsRepository.ts +0 -12
  51. package/src/Domain/use_cases/SyncDialogsUseCase.ts +3 -3
  52. package/src/Domain/use_cases/UserTypingMessageUseCase.ts +4 -2
  53. package/src/Presentation/Views/Dialog/Message/MessageAttachment/AudioAttachment/AudioAttachment.tsx +4 -9
  54. package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +4 -39
  55. package/src/Presentation/Views/DialogList/DialogListViewModel.ts +1 -5
  56. package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +0 -147
  57. package/src/Presentation/Views/EditDialog/EditDialog.scss +2 -21
  58. package/src/Presentation/Views/EditDialog/EditDialog.tsx +1 -47
  59. package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +13 -49
  60. package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +2 -2
  61. package/src/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.tsx +2 -2
  62. package/src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.tsx +2 -2
  63. package/src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.tsx +24 -8
  64. package/src/QBconfig.ts +4 -4
  65. package/src/qb-api-calls/index.ts +2 -59
  66. package/storybook-static/161.77e7dbc5.iframe.bundle.js +2 -0
  67. package/storybook-static/217.cb8da73c.iframe.bundle.js +408 -0
  68. package/storybook-static/217.cb8da73c.iframe.bundle.js.map +1 -0
  69. package/storybook-static/263.f039edee.iframe.bundle.js +2 -0
  70. package/storybook-static/294.7ed84cb5.iframe.bundle.js +1 -0
  71. package/storybook-static/338.ed5286bb.iframe.bundle.js +2 -0
  72. package/storybook-static/363.fe646024.iframe.bundle.js +2 -0
  73. package/storybook-static/{363.64281ecc.iframe.bundle.js.LICENSE.txt → 363.fe646024.iframe.bundle.js.LICENSE.txt} +0 -7
  74. package/storybook-static/364.fb3fc9b4.iframe.bundle.js +1 -0
  75. package/storybook-static/488.a47f0de8.iframe.bundle.js +1 -0
  76. package/storybook-static/559.fdf11e08.iframe.bundle.js +2 -0
  77. package/storybook-static/618.ab5566c8.iframe.bundle.js +1 -0
  78. package/storybook-static/844.5804474b.iframe.bundle.js +95 -0
  79. package/storybook-static/844.5804474b.iframe.bundle.js.map +1 -0
  80. package/storybook-static/936.ba75ae44.iframe.bundle.js +1 -0
  81. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.6977856e.iframe.bundle.js +2 -0
  82. package/storybook-static/Presentation-ui-components-Badge-Badge-stories.d77c6500.iframe.bundle.js +2 -0
  83. package/storybook-static/Presentation-ui-components-Button-Button-stories.05f2f5b7.iframe.bundle.js +2 -0
  84. package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.118df514.iframe.bundle.js +1 -0
  85. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e9d3dc6b.iframe.bundle.js +2 -0
  86. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.7d74bffa.iframe.bundle.js +2 -0
  87. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.d92e6904.iframe.bundle.js +2 -0
  88. package/storybook-static/Presentation-ui-components-Header-Header-stories.b9a00187.iframe.bundle.js +2 -0
  89. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.f484b131.iframe.bundle.js +2 -0
  90. package/storybook-static/Presentation-ui-components-Message-Message-stories.66867b7e.iframe.bundle.js +2 -0
  91. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.d72f098b.iframe.bundle.js +1 -0
  92. package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.7d9e0991.iframe.bundle.js +1 -0
  93. package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.1e6bd1cd.iframe.bundle.js +2 -0
  94. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.44c68c03.iframe.bundle.js +2 -0
  95. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.3e87329b.iframe.bundle.js +2 -0
  96. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.ec3e7d5f.iframe.bundle.js +2 -0
  97. package/storybook-static/Presentation-ui-components-Toast-Toast-stories.2721621c.iframe.bundle.js +1 -0
  98. package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.33b23eab.iframe.bundle.js +2 -0
  99. package/storybook-static/docs-Introduction-mdx.416f8bf9.iframe.bundle.js +1 -0
  100. package/storybook-static/docs-Styling-mdx.c119b271.iframe.bundle.js +1 -0
  101. package/storybook-static/iframe.html +5 -3
  102. package/storybook-static/main.bfaba8e3.iframe.bundle.js +1 -0
  103. package/storybook-static/project.json +1 -1
  104. package/storybook-static/runtime~main.b1ec3380.iframe.bundle.js +1 -0
  105. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +27 -27
  106. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
  107. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +1 -1
  108. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +74 -71
  109. package/storybook-static/sb-addons/essentials-docs-4/manager-bundle.js +73 -70
  110. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
  111. package/storybook-static/sb-addons/interactions-11/manager-bundle.js +6 -6
  112. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +18 -18
  113. package/storybook-static/sb-manager/globals-runtime.js +10691 -11043
  114. package/storybook-static/sb-preview/runtime.js +238 -238
  115. package/dist/Domain/use_cases/CreateDialogSetUpAutoJoinUseCase.d.ts +0 -14
  116. package/dist/Domain/use_cases/CreateDialogSetUpAutoJoinUseCase.d.ts.map +0 -1
  117. package/dist/Domain/use_cases/CreateDialogWithAutoJoinUseCase.d.ts +0 -14
  118. package/dist/Domain/use_cases/CreateDialogWithAutoJoinUseCase.d.ts.map +0 -1
  119. package/dist/Domain/use_cases/JoinFromTheDialogUseCase.d.ts +0 -12
  120. package/dist/Domain/use_cases/JoinFromTheDialogUseCase.d.ts.map +0 -1
  121. package/dist/Domain/use_cases/UnJoinFromTheDialogUseCase.d.ts +0 -12
  122. package/dist/Domain/use_cases/UnJoinFromTheDialogUseCase.d.ts.map +0 -1
  123. package/src/Domain/use_cases/CreateDialogSetUpAutoJoinUseCase.ts +0 -77
  124. package/src/Domain/use_cases/CreateDialogWithAutoJoinUseCase.ts +0 -77
  125. package/src/Domain/use_cases/JoinFromTheDialogUseCase.ts +0 -61
  126. package/src/Domain/use_cases/UnJoinFromTheDialogUseCase.ts +0 -61
  127. package/storybook-static/161.53da4e03.iframe.bundle.js +0 -2
  128. package/storybook-static/167.88fc69a9.iframe.bundle.js +0 -1
  129. package/storybook-static/217.bd248edb.iframe.bundle.js +0 -405
  130. package/storybook-static/217.bd248edb.iframe.bundle.js.map +0 -1
  131. package/storybook-static/294.b81cdbca.iframe.bundle.js +0 -1
  132. package/storybook-static/363.64281ecc.iframe.bundle.js +0 -2
  133. package/storybook-static/364.988cd801.iframe.bundle.js +0 -1
  134. package/storybook-static/488.3cd3942e.iframe.bundle.js +0 -1
  135. package/storybook-static/559.9e64a6f5.iframe.bundle.js +0 -2
  136. package/storybook-static/735.3121b1b2.iframe.bundle.js +0 -2
  137. package/storybook-static/844.815b57b5.iframe.bundle.js +0 -95
  138. package/storybook-static/844.815b57b5.iframe.bundle.js.map +0 -1
  139. package/storybook-static/936.8546c1d8.iframe.bundle.js +0 -1
  140. package/storybook-static/961.d47fc2bc.iframe.bundle.js +0 -2
  141. package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.a1656796.iframe.bundle.js +0 -2
  142. package/storybook-static/Presentation-ui-components-Badge-Badge-stories.58880259.iframe.bundle.js +0 -2
  143. package/storybook-static/Presentation-ui-components-Button-Button-stories.f456d20f.iframe.bundle.js +0 -2
  144. package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.cd797979.iframe.bundle.js +0 -1
  145. package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2dae7689.iframe.bundle.js +0 -2
  146. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.cd0c68a8.iframe.bundle.js +0 -2
  147. package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.c88a1bf9.iframe.bundle.js +0 -2
  148. package/storybook-static/Presentation-ui-components-Header-Header-stories.dd4b2b7b.iframe.bundle.js +0 -2
  149. package/storybook-static/Presentation-ui-components-Loader-Loader-stories.500e777d.iframe.bundle.js +0 -2
  150. package/storybook-static/Presentation-ui-components-Message-Message-stories.93af3d2d.iframe.bundle.js +0 -2
  151. package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.d1c68a8a.iframe.bundle.js +0 -1
  152. package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.2b4362f7.iframe.bundle.js +0 -1
  153. package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.34dfadb1.iframe.bundle.js +0 -2
  154. package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.9b4eff15.iframe.bundle.js +0 -2
  155. package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.8574dbe1.iframe.bundle.js +0 -2
  156. package/storybook-static/Presentation-ui-components-TextField-TextField-stories.058998bf.iframe.bundle.js +0 -2
  157. package/storybook-static/Presentation-ui-components-Toast-Toast-stories.c4dfb1a6.iframe.bundle.js +0 -1
  158. package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.371bcb5d.iframe.bundle.js +0 -2
  159. package/storybook-static/docs-Introduction-mdx.5addfa61.iframe.bundle.js +0 -1
  160. package/storybook-static/docs-Styling-mdx.9f4235f1.iframe.bundle.js +0 -1
  161. package/storybook-static/main.d176ed27.iframe.bundle.js +0 -1
  162. package/storybook-static/runtime~main.bc0704e8.iframe.bundle.js +0 -1
  163. /package/storybook-static/{161.53da4e03.iframe.bundle.js.LICENSE.txt → 161.77e7dbc5.iframe.bundle.js.LICENSE.txt} +0 -0
  164. /package/storybook-static/{217.bd248edb.iframe.bundle.js.LICENSE.txt → 217.cb8da73c.iframe.bundle.js.LICENSE.txt} +0 -0
  165. /package/storybook-static/{961.d47fc2bc.iframe.bundle.js.LICENSE.txt → 263.f039edee.iframe.bundle.js.LICENSE.txt} +0 -0
  166. /package/storybook-static/{735.3121b1b2.iframe.bundle.js.LICENSE.txt → 338.ed5286bb.iframe.bundle.js.LICENSE.txt} +0 -0
  167. /package/storybook-static/{559.9e64a6f5.iframe.bundle.js.LICENSE.txt → 559.fdf11e08.iframe.bundle.js.LICENSE.txt} +0 -0
  168. /package/storybook-static/{844.815b57b5.iframe.bundle.js.LICENSE.txt → 844.5804474b.iframe.bundle.js.LICENSE.txt} +0 -0
  169. /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
  170. /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
  171. /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
  172. /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
  173. /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
  174. /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
  175. /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
  176. /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
  177. /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
  178. /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
  179. /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
  180. /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
  181. /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
  182. /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: 290px;
2
+ $container-height: 236px;
3
3
  $create-dialog-container-width: 332px;
4
- $create-dialog-container-height: 245px;
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, CheckBox, TextField } from '../../ui-components';
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, { AutoJoinState, TypeOpenDialog } from '../../EditDialog/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| number | undefined>(
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 | number | undefined = '';
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
- if (disableAutoJoin=== AutoJoinState.Enabled) // isAutoJoin = 1
121
- {
122
- await dialogsViewModel.createDialogSetUpAutoJoin(dialog, null)
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
- await dialogsViewModel
135
- .createDialog(dialog)
136
- // eslint-disable-next-line promise/always-return
137
- .then((newEntity) => {
138
- onFinished(newEntity);
139
- })
140
- .catch((e) => {
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={String(groupDialogEntity.photo) || ''}
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={String(imagePhoto)} />
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={String(attachment.url)}
48
+ href={attachment.url}
49
49
  type={typeMessage}
50
50
  audioFileType={attachment.file?.type?.toString()}
51
- fileUid={String(attachment.file?.uid)}
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={String(imageFile.url)} download="file" target="_blank" rel="noreferrer">
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={String(imageFile.url)}
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
- let timerId: NodeJS.Timeout | null = null;
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 (timerId) {
37
- clearInterval(timerId as NodeJS.Timeout);
38
- timerId = null;
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 (!timerId) {
53
- timerId = setInterval(() => {
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: 75949,
6
- accountKey: 'uK_8uinNyz8-npTNB6tx',
7
- authKey: 'DdS7zxMEm5Q7DaS',
8
- authSecret: 'g88RhdOjnDOqFkv',
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 QBCreateGroupDialogWithAutojoinFalse with ids: ${JSON.stringify(userIds)} name: ${
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
- const errorMessage = stringifyError(error);
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")}}]);