quickblox-react-ui-kit 0.1.0 → 0.1.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 (160) hide show
  1. package/README.md +258 -255
  2. package/dist/App.d.ts +1 -2
  3. package/dist/Presentation/Views/Dialogs/Dialogs.d.ts +3 -0
  4. package/dist/Presentation/Views/Dialogs/useDialogsViewModel.d.ts +3 -1
  5. package/dist/Presentation/{components/UI → assets}/ DefaultThemes/DefaultTheme.d.ts +2 -2
  6. package/dist/Presentation/assets/DarkTheme.d.ts +2 -2
  7. package/dist/Presentation/assets/LightTheme.d.ts +2 -2
  8. package/dist/Presentation/assets/{Theme.d.ts → UiKitTheme.d.ts} +1 -1
  9. package/dist/Presentation/components/Button.d.ts +1 -1
  10. package/dist/Presentation/components/Navbar.d.ts +1 -2
  11. package/dist/Presentation/components/TextInput.d.ts +1 -1
  12. package/dist/Presentation/components/UI/Dialogs/HeaderDialogs/HeaderDialogs.d.ts +2 -2
  13. package/dist/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.d.ts +2 -0
  14. package/dist/Presentation/components/UI/Dialogs/MessagesView/MessagesView.d.ts +2 -0
  15. package/dist/Presentation/components/UI/Dialogs/MessagesView/{useMessagesViewModelWithMockUseCase.d.ts → useMessagesViewModel.d.ts} +1 -1
  16. package/dist/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.d.ts +2 -2
  17. package/dist/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.d.ts +1 -2
  18. package/dist/Presentation/components/UI/svgs/Icons/Actions/Add/index.d.ts +1 -2
  19. package/dist/Presentation/components/UI/svgs/Icons/Actions/AddContact/index.d.ts +1 -2
  20. package/dist/Presentation/components/UI/svgs/Icons/Actions/Archive/index.d.ts +1 -2
  21. package/dist/Presentation/components/UI/svgs/Icons/Actions/Copy/index.d.ts +1 -2
  22. package/dist/Presentation/components/UI/svgs/Icons/Actions/Delete/index.d.ts +1 -2
  23. package/dist/Presentation/components/UI/svgs/Icons/Actions/Download/index.d.ts +1 -2
  24. package/dist/Presentation/components/UI/svgs/Icons/Actions/Edit/index.d.ts +1 -2
  25. package/dist/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.d.ts +1 -2
  26. package/dist/Presentation/components/UI/svgs/Icons/Actions/Emoji/index.d.ts +1 -2
  27. package/dist/Presentation/components/UI/svgs/Icons/Actions/ForwardFilled/index.d.ts +1 -2
  28. package/dist/Presentation/components/UI/svgs/Icons/Actions/Hungup/index.d.ts +1 -2
  29. package/dist/Presentation/components/UI/svgs/Icons/Actions/IncomeCall/index.d.ts +1 -2
  30. package/dist/Presentation/components/UI/svgs/Icons/Actions/Like/index.d.ts +1 -2
  31. package/dist/Presentation/components/UI/svgs/Icons/Actions/NewChat/index.d.ts +1 -2
  32. package/dist/Presentation/components/UI/svgs/Icons/Actions/OutcomeCall/index.d.ts +1 -2
  33. package/dist/Presentation/components/UI/svgs/Icons/Actions/Phone/index.d.ts +1 -2
  34. package/dist/Presentation/components/UI/svgs/Icons/Actions/PhoneFilled/index.d.ts +1 -2
  35. package/dist/Presentation/components/UI/svgs/Icons/Actions/Remove/index.d.ts +1 -2
  36. package/dist/Presentation/components/UI/svgs/Icons/Actions/Remove2/index.d.ts +1 -2
  37. package/dist/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/index.d.ts +1 -2
  38. package/dist/Presentation/components/UI/svgs/Icons/Actions/Send/index.d.ts +1 -2
  39. package/dist/Presentation/components/UI/svgs/Icons/Actions/Share/index.d.ts +1 -2
  40. package/dist/Presentation/components/UI/svgs/Icons/Actions/SwapCamera/index.d.ts +1 -2
  41. package/dist/Presentation/components/UI/svgs/Icons/Actions/Unarchive/index.d.ts +1 -2
  42. package/dist/Presentation/components/UI/svgs/Icons/Actions/VideoIcon/index.d.ts +1 -2
  43. package/dist/Presentation/components/UI/svgs/Icons/Actions/Voice/index.d.ts +1 -2
  44. package/dist/Presentation/components/UI/svgs/Icons/Contents/Brodcast/index.d.ts +1 -2
  45. package/dist/Presentation/components/UI/svgs/Icons/Contents/Chat/index.d.ts +1 -2
  46. package/dist/Presentation/components/UI/svgs/Icons/Contents/ChatFilled/index.d.ts +1 -2
  47. package/dist/Presentation/components/UI/svgs/Icons/Contents/Conference/index.d.ts +1 -2
  48. package/dist/Presentation/components/UI/svgs/Icons/Contents/Contact/index.d.ts +1 -2
  49. package/dist/Presentation/components/UI/svgs/Icons/Contents/ContactFilled/index.d.ts +1 -2
  50. package/dist/Presentation/components/UI/svgs/Icons/Contents/GroupChat/index.d.ts +1 -2
  51. package/dist/Presentation/components/UI/svgs/Icons/Contents/Notifications/index.d.ts +1 -2
  52. package/dist/Presentation/components/UI/svgs/Icons/Contents/PrivateChat/index.d.ts +1 -2
  53. package/dist/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/index.d.ts +1 -2
  54. package/dist/Presentation/components/UI/svgs/Icons/Contents/Stream/index.d.ts +1 -2
  55. package/dist/Presentation/components/UI/svgs/Icons/Contents/StreamFilled/index.d.ts +1 -2
  56. package/dist/Presentation/components/UI/svgs/Icons/Contents/User/index.d.ts +1 -2
  57. package/dist/Presentation/components/UI/svgs/Icons/Media/Attachment/index.d.ts +1 -2
  58. package/dist/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.d.ts +1 -2
  59. package/dist/Presentation/components/UI/svgs/Icons/Media/BrokenFile/index.d.ts +1 -2
  60. package/dist/Presentation/components/UI/svgs/Icons/Media/Camera/index.d.ts +1 -2
  61. package/dist/Presentation/components/UI/svgs/Icons/Media/GifFile/index.d.ts +1 -2
  62. package/dist/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/index.d.ts +1 -2
  63. package/dist/Presentation/components/UI/svgs/Icons/Media/ImageFile/index.d.ts +1 -2
  64. package/dist/Presentation/components/UI/svgs/Icons/Media/ImageFilled/index.d.ts +1 -2
  65. package/dist/Presentation/components/UI/svgs/Icons/Media/LinkWeb/index.d.ts +1 -2
  66. package/dist/Presentation/components/UI/svgs/Icons/Media/Location/index.d.ts +1 -2
  67. package/dist/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.d.ts +1 -2
  68. package/dist/Presentation/components/UI/svgs/Icons/Media/VideoFile/index.d.ts +1 -2
  69. package/dist/Presentation/components/UI/svgs/Icons/Moderation/Admin/index.d.ts +1 -2
  70. package/dist/Presentation/components/UI/svgs/Icons/Moderation/Banned/index.d.ts +1 -2
  71. package/dist/Presentation/components/UI/svgs/Icons/Moderation/Freeze/index.d.ts +1 -2
  72. package/dist/Presentation/components/UI/svgs/Icons/Moderation/Moderations/index.d.ts +1 -2
  73. package/dist/Presentation/components/UI/svgs/Icons/Moderation/Muted/index.d.ts +1 -2
  74. package/dist/Presentation/components/UI/svgs/Icons/Navigation/ArrowLeft/index.d.ts +1 -2
  75. package/dist/Presentation/components/UI/svgs/Icons/Navigation/ArrowRight/index.d.ts +1 -2
  76. package/dist/Presentation/components/UI/svgs/Icons/Navigation/Back/index.d.ts +1 -2
  77. package/dist/Presentation/components/UI/svgs/Icons/Navigation/Close/index.d.ts +1 -2
  78. package/dist/Presentation/components/UI/svgs/Icons/Navigation/Down/index.d.ts +1 -2
  79. package/dist/Presentation/components/UI/svgs/Icons/Navigation/Leave/index.d.ts +1 -2
  80. package/dist/Presentation/components/UI/svgs/Icons/Navigation/More/index.d.ts +1 -2
  81. package/dist/Presentation/components/UI/svgs/Icons/Navigation/Next/index.d.ts +1 -2
  82. package/dist/Presentation/components/UI/svgs/Icons/Navigation/Plus/index.d.ts +1 -2
  83. package/dist/Presentation/components/UI/svgs/Icons/Navigation/Refresh/index.d.ts +1 -2
  84. package/dist/Presentation/components/UI/svgs/Icons/Navigation/Search/index.d.ts +1 -2
  85. package/dist/Presentation/components/UI/svgs/Icons/Navigation/Settings/index.d.ts +1 -2
  86. package/dist/Presentation/components/UI/svgs/Icons/Navigation/SettingsField/index.d.ts +1 -2
  87. package/dist/Presentation/components/UI/svgs/Icons/Status/Error/index.d.ts +1 -2
  88. package/dist/Presentation/components/UI/svgs/Icons/Status/Help/index.d.ts +1 -2
  89. package/dist/Presentation/components/UI/svgs/Icons/Status/Information/index.d.ts +1 -2
  90. package/dist/Presentation/components/UI/svgs/Icons/Status/InformationFill/index.d.ts +1 -2
  91. package/dist/Presentation/components/UI/svgs/Icons/Status/Loader/index.d.ts +1 -2
  92. package/dist/Presentation/components/UI/svgs/Icons/Status/Mention/index.d.ts +1 -2
  93. package/dist/Presentation/components/UI/svgs/Icons/Status/Sent/index.d.ts +1 -2
  94. package/dist/Presentation/components/UI/svgs/Icons/Status/ViewedDelivered/index.d.ts +1 -2
  95. package/dist/Presentation/components/UI/svgs/Icons/Toggle/CameraOff/index.d.ts +1 -2
  96. package/dist/Presentation/components/UI/svgs/Icons/Toggle/CameraOn/index.d.ts +1 -2
  97. package/dist/Presentation/components/UI/svgs/Icons/Toggle/CheckOff/index.d.ts +1 -2
  98. package/dist/Presentation/components/UI/svgs/Icons/Toggle/CheckOn/index.d.ts +1 -2
  99. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Favourite/index.d.ts +1 -2
  100. package/dist/Presentation/components/UI/svgs/Icons/Toggle/FavouriteFilled/index.d.ts +1 -2
  101. package/dist/Presentation/components/UI/svgs/Icons/Toggle/FullScreen/inex.d.ts +1 -2
  102. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Hide/index.d.ts +1 -2
  103. package/dist/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.d.ts +1 -2
  104. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Louder/index.d.ts +1 -2
  105. package/dist/Presentation/components/UI/svgs/Icons/Toggle/MicOff/index.d.ts +1 -2
  106. package/dist/Presentation/components/UI/svgs/Icons/Toggle/MicOn/index.d.ts +1 -2
  107. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Minimize/index.d.ts +1 -2
  108. package/dist/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/index.d.ts +1 -2
  109. package/dist/Presentation/components/UI/svgs/Icons/Toggle/NotifyOn/index.d.ts +1 -2
  110. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Pause/index.d.ts +1 -2
  111. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Quite/index.d.ts +1 -2
  112. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Record/index.d.ts +1 -2
  113. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Screenshare/index.d.ts +1 -2
  114. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Show/index.d.ts +1 -2
  115. package/dist/Presentation/components/UI/svgs/Icons/Toggle/Speaker/index.d.ts +1 -2
  116. package/dist/Presentation/components/UI/svgs/Icons/Toggle/SpeakerOff/index.d.ts +1 -2
  117. package/dist/Presentation/components/UI/svgs/Icons/Toggle/StopRecord/index.d.ts +1 -2
  118. package/dist/Presentation/components/UI/svgs/Icons/Toggle/StopShare/index.d.ts +1 -2
  119. package/dist/Presentation/components/containers/ScrollableContainer/ScrollableContainer.d.ts +1 -1
  120. package/dist/Presentation/components/layouts/Desktop/{DesktopLayoutForMockModels.d.ts → DesktopLayout.d.ts} +2 -2
  121. package/dist/Presentation/components/layouts/Desktop/QuickBloxUIKitDesktopLayout.d.ts +7 -0
  122. package/dist/Presentation/components/layouts/TestStage/TestStageMarkup.d.ts +1 -2
  123. package/dist/Presentation/components/providers/ModalContextProvider/Modal.d.ts +1 -1
  124. package/dist/Presentation/components/providers/ModalContextProvider/ModalContextProvider.d.ts +1 -2
  125. package/dist/Presentation/components/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.d.ts +1 -1
  126. package/dist/index-ui.d.ts +4 -5
  127. package/dist/index-ui.js +343 -398
  128. package/package.json +1 -1
  129. package/src/App.tsx +14 -7
  130. package/src/Presentation/Views/Dialogs/Dialogs.tsx +3 -0
  131. package/src/Presentation/Views/Dialogs/useDialogsViewModel.ts +254 -50
  132. package/src/Presentation/{components/UI → assets}/ DefaultThemes/DefaultTheme.ts +2 -2
  133. package/src/Presentation/assets/DarkTheme.ts +2 -2
  134. package/src/Presentation/assets/LightTheme.ts +2 -2
  135. package/src/Presentation/assets/{Theme.ts → UiKitTheme.ts} +2 -2
  136. package/src/Presentation/components/UI/Buttons/MainButton/MainButton.scss +8 -8
  137. package/src/Presentation/components/UI/Dialogs/DialogInformation/DialogInformation.tsx +1 -1
  138. package/src/Presentation/components/UI/Dialogs/HeaderDialogs/HeaderDialogs.tsx +2 -2
  139. package/src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.tsx +4 -0
  140. package/src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.tsx +9 -3
  141. package/src/Presentation/components/UI/Dialogs/MessagesView/{useMessagesViewModelWithMockUseCase.ts → useMessagesViewModel.ts} +4 -6
  142. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx +2 -2
  143. package/src/Presentation/components/layouts/Desktop/{DesktopLayoutForMockModels.tsx → DesktopLayout.tsx} +2 -2
  144. package/src/Presentation/components/layouts/{TestStage/TestStageWithMockData/TestStageWithMockData.tsx → Desktop/QuickBloxUIKitDesktopLayout.tsx} +37 -29
  145. package/src/Presentation/components/layouts/TestStage/TestStageMarkup.tsx +1 -1
  146. package/src/QBconfig.ts +0 -8
  147. package/src/index-ui.ts +6 -8
  148. package/dist/MyButton/MyButton.d.ts +0 -9
  149. package/dist/MyInput/MyInput.d.ts +0 -10
  150. package/dist/Presentation/Views/Dialogs/useDialogsViewModelWithMockUseCase.d.ts +0 -4
  151. package/dist/Presentation/components/layouts/Desktop/Desktop.d.ts +0 -4
  152. package/dist/Presentation/components/layouts/TestStage/TestStageWithMockData/TestStageWithMockData.d.ts +0 -3
  153. package/src/MyButton/MyButton.scss +0 -11
  154. package/src/MyButton/MyButton.tsx +0 -25
  155. package/src/MyInput/MyInput.scss +0 -9
  156. package/src/MyInput/MyInput.tsx +0 -36
  157. package/src/Presentation/Views/Dialogs/useDialogsViewModelWithMockUseCase.ts +0 -345
  158. package/src/Presentation/components/layouts/Desktop/Desktop.tsx +0 -103
  159. /package/dist/Presentation/{components/UI → assets}/ DefaultThemes/CustomTheme.d.ts +0 -0
  160. /package/src/Presentation/{components/UI → assets}/ DefaultThemes/CustomTheme.ts +0 -0
@@ -28,11 +28,11 @@ import ChatMessageAttachmentEntity from '../../../../../Domain/entity/ChatMessag
28
28
  import { UserTypingMessageUseCase } from '../../../../../Domain/use_cases/UserTypingMessageUseCase';
29
29
  import { DialogEventInfo } from '../../../../../Domain/entity/DialogEventInfo';
30
30
 
31
- export default function useMessagesViewModelWithMockUseCase(
31
+ export default function useMessagesViewModel(
32
32
  dialogType: DialogType,
33
33
  dialogEntity: DialogEntity,
34
34
  ): MessagesViewModel {
35
- console.log('useMessagesViewModelWithMockUseCase');
35
+ console.log('useMessagesViewModel');
36
36
  const [loading, setLoading] = useState(false);
37
37
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
38
38
  const [error, setError] = useState('error: wrong message list');
@@ -50,9 +50,7 @@ export default function useMessagesViewModelWithMockUseCase(
50
50
 
51
51
  const [typingText, setTypingText] = useState<string>('');
52
52
  const dialogUpdateHandler = (dialogInfo: DialogEventInfo) => {
53
- console.log(
54
- 'call dialogUpdateHandler in useMessagesViewModelWithMockUseCase',
55
- );
53
+ console.log('call dialogUpdateHandler in useMessagesViewModel');
56
54
  const getSender = async (sender_id: number) => {
57
55
  const getUser: GetUsersByIdsUseCase = new GetUsersByIdsUseCase(
58
56
  new UsersRepository(
@@ -338,7 +336,7 @@ export default function useMessagesViewModelWithMockUseCase(
338
336
  const errorMessage = stringifyError(reason);
339
337
 
340
338
  console.log(
341
- 'exception in sendMessage in useMessagesViewModelWithMockUseCase',
339
+ 'exception in sendMessage in useMessagesViewModel',
342
340
  errorMessage,
343
341
  );
344
342
  setLoading(false);
@@ -13,7 +13,7 @@ import RowLeftContainer from '../../../containers/RowLeftContainer/RowLeftContai
13
13
  import PreviewDialogViewModel from './PreviewDialogViewModel';
14
14
  import NotifyOff from '../../svgs/Icons/Toggle/NotifyOff';
15
15
  import EditDots from '../../svgs/Icons/Actions/EditDots';
16
- import Theme from '../../../../assets/Theme';
16
+ import UiKitTheme from '../../../../assets/UiKitTheme';
17
17
 
18
18
  export type ThemeNames = 'light' | 'dark' | 'custom';
19
19
  type PreviewDialogsColorTheme = {
@@ -26,7 +26,7 @@ type PreviewDialogsColorTheme = {
26
26
  };
27
27
  type PreviewDialogsTheme = {
28
28
  themeName?: ThemeNames;
29
- colorTheme?: Theme;
29
+ colorTheme?: UiKitTheme;
30
30
  selected: boolean;
31
31
  muted: boolean;
32
32
  };
@@ -6,7 +6,7 @@ type LayoutItems = {
6
6
  dialogMessagesView: React.ReactNode;
7
7
  dialogInfoView: React.ReactNode;
8
8
  };
9
- function DesktopLayoutForMockModels({
9
+ function DesktopLayout({
10
10
  dialogsView,
11
11
  dialogMessagesView,
12
12
  dialogInfoView,
@@ -28,4 +28,4 @@ function DesktopLayoutForMockModels({
28
28
  );
29
29
  }
30
30
 
31
- export default DesktopLayoutForMockModels;
31
+ export default DesktopLayout;
@@ -1,23 +1,31 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import useQbDataContext from '../../../providers/QuickBloxUIKitProvider/useQbDataContext';
3
- import BaseViewModel from '../../../../Views/Base/BaseViewModel';
4
- import { DialogEntity } from '../../../../../Domain/entity/DialogEntity';
5
- import { DialogsViewModel } from '../../../../Views/Dialogs/DialogViewModel';
6
- import DialogsComponent from '../../../../Views/Dialogs/Dialogs';
7
- import DialogInformation from '../../../UI/Dialogs/DialogInformation/DialogInformation';
8
- import DesktopLayoutForMockModels from '../../Desktop/DesktopLayoutForMockModels';
9
- import MessagesView from '../../../UI/Dialogs/MessagesView/MessagesView';
10
- import useDialogsViewModelWithMockUseCase from '../../../../Views/Dialogs/useDialogsViewModelWithMockUseCase';
11
- import { Pagination } from '../../../../../Domain/repository/Pagination';
12
- import { SubscribeToDialogEventsUseCase } from '../../../../../Domain/use_cases/SubscribeToDialogEventsUseCase';
13
- import useEventMessagesRepository from '../../../providers/QuickBloxUIKitProvider/useEventMessagesRepository';
14
- import EventMessageType from '../../../../../Domain/entity/EventMessageType';
15
- import { NotificationTypes } from '../../../../../Domain/entity/NotificationTypes';
16
- import { stringifyError } from '../../../../../utils/parse';
17
- import { DialogEventInfo } from '../../../../../Domain/entity/DialogEventInfo';
18
-
19
- function TestStageWithMockData() {
20
- console.log('create TestStageWithMockData');
2
+ import useQbDataContext from '../../providers/QuickBloxUIKitProvider/useQbDataContext';
3
+ import { DialogEntity } from '../../../../Domain/entity/DialogEntity';
4
+ import { DialogsViewModel } from '../../../Views/Dialogs/DialogViewModel';
5
+ import DialogsComponent from '../../../Views/Dialogs/Dialogs';
6
+ import DialogInformation from '../../UI/Dialogs/DialogInformation/DialogInformation';
7
+ import DesktopLayout from './DesktopLayout';
8
+ import MessagesView from '../../UI/Dialogs/MessagesView/MessagesView';
9
+ import useDialogsViewModel from '../../../Views/Dialogs/useDialogsViewModel';
10
+ import { Pagination } from '../../../../Domain/repository/Pagination';
11
+ import { SubscribeToDialogEventsUseCase } from '../../../../Domain/use_cases/SubscribeToDialogEventsUseCase';
12
+ import useEventMessagesRepository from '../../providers/QuickBloxUIKitProvider/useEventMessagesRepository';
13
+ import EventMessageType from '../../../../Domain/entity/EventMessageType';
14
+ import { NotificationTypes } from '../../../../Domain/entity/NotificationTypes';
15
+ import { stringifyError } from '../../../../utils/parse';
16
+ import { DialogEventInfo } from '../../../../Domain/entity/DialogEventInfo';
17
+ import UiKitTheme from '../../../assets/UiKitTheme';
18
+ import BaseViewModel from '../../../Views/Base/BaseViewModel';
19
+
20
+ type QuickBloxUIKitDesktopLayoutProps = {
21
+ theme?: UiKitTheme;
22
+ };
23
+
24
+ const QuickBloxUIKitDesktopLayout: React.FC<
25
+ QuickBloxUIKitDesktopLayoutProps
26
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars,react/function-component-definition
27
+ > = ({ theme = undefined }: QuickBloxUIKitDesktopLayoutProps) => {
28
+ console.log('create QuickBloxUIKitDesktopLayout');
21
29
  const [selectedDialog, setSelectedDialog] =
22
30
  React.useState<BaseViewModel<DialogEntity>>();
23
31
 
@@ -25,20 +33,20 @@ function TestStageWithMockData() {
25
33
  const eventMessaging = useEventMessagesRepository();
26
34
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
27
35
  // @ts-ignore
28
- const { userName } =
29
- currentContext.storage.REMOTE_DATA_SOURCE.authInformation;
36
+ const userName =
37
+ currentContext.storage.REMOTE_DATA_SOURCE.authInformation?.userName;
30
38
  const userId =
31
39
  currentContext.storage.REMOTE_DATA_SOURCE.authInformation?.userId;
32
40
 
33
41
  const dialogsViewModel: DialogsViewModel =
34
- useDialogsViewModelWithMockUseCase(currentContext);
42
+ useDialogsViewModel(currentContext);
35
43
 
36
44
  const subscribeToDialogEventsUseCase: SubscribeToDialogEventsUseCase =
37
45
  new SubscribeToDialogEventsUseCase(eventMessaging, 'TestStage');
38
46
 
39
47
  /* DATA needed to init MockData
40
- const remoteDataSourceMock: RemoteDataSource = currentContext.storage
41
- .REMOTE_DATA_SOURCE as RemoteDataSource;
48
+ const remoteDataSourceMock: RemoteDataSourceMock = currentContext.storage
49
+ .REMOTE_DATA_SOURCE_MOCK as RemoteDataSourceMock;
42
50
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
43
51
  const localDataSource: LocalDataSource =
44
52
  currentContext.storage.LOCAL_DATA_SOURCE;
@@ -55,11 +63,11 @@ function TestStageWithMockData() {
55
63
 
56
64
  console.log(
57
65
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
58
- `initialValue.REMOTE_DATA_SOURCE.needInit: ${currentContext.storage.REMOTE_DATA_SOURCE.needInit}`,
66
+ `initialValue.REMOTE_DATA_SOURCE_MOCK.needInit: ${currentContext.storage.REMOTE_DATA_SOURCE.needInit}`,
59
67
  );
60
68
  console.log(
61
69
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
62
- `initialValue.REMOTE_DATA_SOURCE.authProcessed: ${currentContext.storage.REMOTE_DATA_SOURCE.authProcessed}`,
70
+ `initialValue.REMOTE_DATA_SOURCE_MOCK.authProcessed: ${currentContext.storage.REMOTE_DATA_SOURCE.authProcessed}`,
63
71
  );
64
72
 
65
73
  console.log(
@@ -159,7 +167,7 @@ function TestStageWithMockData() {
159
167
  };
160
168
 
161
169
  return (
162
- <DesktopLayoutForMockModels
170
+ <DesktopLayout
163
171
  dialogsView={
164
172
  <DialogsComponent
165
173
  dialogsViewModel={dialogsViewModel} // 1 Get 2 Update UseCase
@@ -204,6 +212,6 @@ function TestStageWithMockData() {
204
212
  }
205
213
  />
206
214
  );
207
- }
215
+ };
208
216
 
209
- export default TestStageWithMockData;
217
+ export default QuickBloxUIKitDesktopLayout;
@@ -200,7 +200,7 @@ function TestStageMarkup() {
200
200
  );
201
201
 
202
202
  function changeThemeActions() {
203
- console.log('Theme has changed.');
203
+ console.log('UiKitTheme has changed.');
204
204
  setThemeName(document.documentElement.getAttribute('data-theme'));
205
205
  setDialogsList(dialogs);
206
206
  }
package/src/QBconfig.ts CHANGED
@@ -1,11 +1,3 @@
1
- /*
2
- const configApp = {
3
- APPLICATION_ID: 75949,+
4
- AUTH_KEY: "DdS7zxMEm5Q7DaS",
5
- AUTH_SECRET: "g88RhdOjnDOqFkv",+
6
- ACCOUNT_KEY: "uK_8uinNyz8-npTNB6tx",+
7
- };
8
- */
9
1
  export const QBConfig = {
10
2
  credentials: {
11
3
  appId: 0,
package/src/index-ui.ts CHANGED
@@ -2,8 +2,6 @@ import './index.scss';
2
2
  import MainButton, {
3
3
  TypeButton,
4
4
  } from './Presentation/components/UI/Buttons/MainButton/MainButton';
5
- import MyButton from './MyButton/MyButton';
6
- import MyInput from './MyInput/MyInput';
7
5
  import QuickBloxUIKitProvider, {
8
6
  qbDataContext,
9
7
  } from './Presentation/components/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider';
@@ -12,14 +10,14 @@ import useQBConnection from './Presentation/components/providers/QuickBloxUIKitP
12
10
  import useQbDataContext from './Presentation/components/providers/QuickBloxUIKitProvider/useQbDataContext';
13
11
  import useEventMessagesRepository from './Presentation/components/providers/QuickBloxUIKitProvider/useEventMessagesRepository';
14
12
  import { DialogsViewModel } from './Presentation/Views/Dialogs/DialogViewModel';
15
- import useDialogsViewModelWithMockUseCase from './Presentation/Views/Dialogs/useDialogsViewModelWithMockUseCase';
13
+ import useDialogsViewModel from './Presentation/Views/Dialogs/useDialogsViewModel';
16
14
  import { SubscribeToDialogEventsUseCase } from './Domain/use_cases/SubscribeToDialogEventsUseCase';
17
15
  import { Pagination } from './Domain/repository/Pagination';
18
16
  import { DialogEventInfo } from './Domain/entity/DialogEventInfo';
19
17
  import EventMessageType from './Domain/entity/EventMessageType';
20
18
  import { NotificationTypes } from './Domain/entity/NotificationTypes';
21
19
  import { stringifyError } from './utils/parse';
22
- import DesktopLayoutForMockModels from './Presentation/components/layouts/Desktop/DesktopLayoutForMockModels';
20
+ import DesktopLayout from './Presentation/components/layouts/Desktop/DesktopLayout';
23
21
  import DialogsComponent from './Presentation/Views/Dialogs/Dialogs';
24
22
  import MessagesView from './Presentation/components/UI/Dialogs/MessagesView/MessagesView';
25
23
  import DialogInformation from './Presentation/components/UI/Dialogs/DialogInformation/DialogInformation';
@@ -29,11 +27,10 @@ import {
29
27
  LoginData,
30
28
  RemoteDataSource,
31
29
  } from './Data/source/remote/RemoteDataSource';
30
+ import QuickBloxUIKitDesktopLayout from './Presentation/components/layouts/Desktop/QuickBloxUIKitDesktopLayout';
32
31
 
33
32
  export {
34
33
  MainButton,
35
- MyButton,
36
- MyInput,
37
34
  TypeButton,
38
35
  type LoginData,
39
36
  QuickBloxUIKitProvider,
@@ -44,17 +41,18 @@ export {
44
41
  useQbDataContext,
45
42
  useEventMessagesRepository,
46
43
  type DialogsViewModel,
47
- useDialogsViewModelWithMockUseCase,
44
+ useDialogsViewModel,
48
45
  SubscribeToDialogEventsUseCase,
49
46
  Pagination,
50
47
  type DialogEventInfo,
51
48
  EventMessageType,
52
49
  NotificationTypes,
53
50
  stringifyError,
54
- DesktopLayoutForMockModels,
51
+ DesktopLayout,
55
52
  DialogsComponent,
56
53
  MessagesView,
57
54
  DialogInformation,
58
55
  type DialogEntity,
59
56
  BaseViewModel,
57
+ QuickBloxUIKitDesktopLayout,
60
58
  };
@@ -1,9 +0,0 @@
1
- import React, { FC } from "react";
2
- import './MyButton.scss';
3
- export interface MyButtonProps {
4
- children?: React.ReactNode;
5
- color: string;
6
- big: boolean;
7
- }
8
- declare const MyButton: FC<MyButtonProps>;
9
- export default MyButton;
@@ -1,10 +0,0 @@
1
- import React, { FC } from "react";
2
- import './MyInput.scss';
3
- export interface MyInputProps {
4
- children?: React.ReactNode;
5
- placeholer: string;
6
- label: string;
7
- big: boolean;
8
- }
9
- declare const MyInput: FC<MyInputProps>;
10
- export default MyInput;
@@ -1,4 +0,0 @@
1
- import { QBDataContextType } from '../../components/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider';
2
- import { Pagination } from '../../../Domain/repository/Pagination';
3
- import { DialogsViewModel } from './DialogViewModel';
4
- export default function useDialogsViewModelWithMockUseCase(currentContext: QBDataContextType, initPagination?: Pagination): DialogsViewModel;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import './DesktopLayout.scss';
3
- declare function Desktop(): JSX.Element;
4
- export default Desktop;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function TestStageWithMockData(): JSX.Element;
3
- export default TestStageWithMockData;
@@ -1,11 +0,0 @@
1
- .my-button {
2
- padding: 10px 5px;
3
- color: black;
4
- border: 1px solid black;
5
- background: transparent;
6
- }
7
-
8
- .big-btn {
9
- font-size: 30px;
10
- padding: 20px;
11
- }
@@ -1,25 +0,0 @@
1
- import React, {FC} from "react";
2
- import './MyButton.scss';
3
-
4
- export interface MyButtonProps {
5
- children?: React.ReactNode
6
- color: string;
7
- big: boolean;
8
- }
9
- const MyButton: FC<MyButtonProps> = ({
10
- children,
11
- color,
12
- big,
13
- ...props}) => {
14
- const rootClasses = ['my-button'];
15
- if (big) {
16
- rootClasses.push('big-btn')
17
- }
18
- return(
19
- <button {...props} className={rootClasses.join(' ')} style={{color}}>
20
- {children}
21
- </button>
22
- );
23
- };
24
-
25
- export default MyButton;
@@ -1,9 +0,0 @@
1
- .my-input {
2
- padding: 10px 5px;
3
- border: 10px solid cornflowerblue;
4
- }
5
-
6
- .big-input {
7
- font-size: 30px;
8
- padding: 20px;
9
- }
@@ -1,36 +0,0 @@
1
- import React, {FC} from "react";
2
- import './MyInput.scss';
3
-
4
- export interface MyInputProps {
5
- children?: React.ReactNode;
6
- placeholer: string;
7
- label: string;
8
- big: boolean;
9
- }
10
- const MyInput: FC<MyInputProps> = ({
11
- children,
12
- placeholer,
13
- label,
14
- big,
15
- ...props
16
- }) => {
17
- const rootClasses = ['my-input'];
18
- if (big) {
19
- rootClasses.push('big-input')
20
- }
21
-
22
- return(
23
- <div>
24
- <label>
25
- {label}
26
- <input className={rootClasses.join(' ')}
27
- placeholder={placeholer} {...props} />
28
- </label>
29
- <div className="name">*important data</div>
30
- </div>
31
-
32
-
33
- );
34
- }
35
-
36
- export default MyInput;