quickblox-react-ui-kit 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/CommonTypes/FunctionResult.d.ts +5 -1
  2. package/dist/Data/DefaultConfigurations.d.ts +2 -2
  3. package/dist/Domain/use_cases/ai/AIAnswerAssistUseCase.d.ts +13 -0
  4. package/dist/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.d.ts +13 -0
  5. package/dist/Domain/use_cases/ai/AITranslateUseCase.d.ts +14 -0
  6. package/dist/Domain/use_cases/ai/AITranslateWithProxyUseCase.d.ts +14 -0
  7. package/dist/Presentation/Views/Base/BaseViewModel.d.ts +2 -0
  8. package/dist/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIMessageWidget.d.ts +4 -1
  9. package/dist/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.d.ts +3 -2
  10. package/dist/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/Tone.d.ts +5 -13
  11. package/dist/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.d.ts +7 -0
  12. package/dist/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.d.ts +7 -0
  13. package/dist/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.d.ts +3 -1
  14. package/dist/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.d.ts +7 -0
  15. package/dist/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.d.ts +7 -0
  16. package/dist/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.d.ts +8 -0
  17. package/dist/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.d.ts +7 -0
  18. package/dist/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.d.ts +4 -0
  19. package/dist/QBconfig.d.ts +14 -3
  20. package/dist/index-ui.js +316 -33
  21. package/dist/utils/utils.d.ts +9 -0
  22. package/global.d.ts +12 -4
  23. package/package.json +5 -1
  24. package/src/CommonTypes/FunctionResult.ts +6 -1
  25. package/src/Data/DefaultConfigurations.ts +155 -19
  26. package/src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts +69 -0
  27. package/src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts +71 -0
  28. package/src/Domain/use_cases/ai/AIRephraseUseCase.ts +38 -36
  29. package/src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts +25 -21
  30. package/src/Domain/use_cases/ai/AITranslateUseCase.ts +76 -0
  31. package/src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts +79 -0
  32. package/src/Presentation/Views/Base/BaseViewModel.ts +2 -0
  33. package/src/Presentation/Views/Dialogs/Dialogs.tsx +1 -1
  34. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIMessageWidget.ts +7 -2
  35. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.tsx +10 -4
  36. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/Tone.ts +29 -15
  37. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidget.tsx +10 -6
  38. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.tsx +10 -6
  39. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx +17 -0
  40. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx +16 -0
  41. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidget.tsx +13 -12
  42. package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidgetWithProxy.tsx +13 -12
  43. package/src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss +76 -0
  44. package/src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.tsx +34 -0
  45. package/src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss +26 -0
  46. package/src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.tsx +25 -0
  47. package/src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.scss +4 -6
  48. package/src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.tsx +93 -405
  49. package/src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.scss +2 -3
  50. package/src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.tsx +561 -400
  51. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss +62 -0
  52. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.tsx +25 -0
  53. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss +61 -0
  54. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.tsx +32 -0
  55. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss +2 -2
  56. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx +50 -2
  57. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss +40 -0
  58. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.tsx +26 -0
  59. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss +62 -0
  60. package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.tsx +25 -0
  61. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.svg +5 -0
  62. package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx +50 -0
  63. package/src/Presentation/components/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +3 -15
  64. package/src/Presentation/components/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts +15 -14
  65. package/src/QBconfig.ts +156 -10
  66. package/src/package_artan_react_ui.json +13 -9
  67. package/src/package_original.json +5 -1
  68. package/src/utils/utils.ts +63 -0
@@ -0,0 +1,62 @@
1
+ .preview-audio-file-container,
2
+ .preview-audio-file-container * {
3
+ box-sizing: border-box;
4
+ }
5
+ .preview-audio-file-container {
6
+ display: flex;
7
+ flex-direction: row;
8
+ gap: 8px;
9
+ align-items: center;
10
+ justify-content: flex-start;
11
+ align-self: stretch;
12
+ flex-shrink: 0;
13
+ position: relative;
14
+
15
+ &--placeholder {
16
+ flex-shrink: 0;
17
+ width: 32px;
18
+ height: 32px;
19
+ position: static;
20
+
21
+ &__bg {
22
+ background: var(--incoming-background, #e4e6e8);
23
+ border-radius: 8px;
24
+ width: 32px;
25
+ height: 32px;
26
+ position: absolute;
27
+ left: 0px;
28
+ top: 0px;
29
+ }
30
+ &__icon {
31
+ border-radius: 4px;
32
+ padding: 4px;
33
+ display: flex;
34
+ flex-direction: row;
35
+ gap: 0px;
36
+ align-items: center;
37
+ justify-content: center;
38
+ width: 24px;
39
+ height: 24px;
40
+ position: absolute;
41
+ left: 4px;
42
+ top: 4px;
43
+ }
44
+ }
45
+
46
+ &--audio-mp-3 {
47
+ color: var(--main-text, #0b121b);
48
+ text-align: left;
49
+ font: 400 12px/16px "Roboto", sans-serif;
50
+ position: relative;
51
+ flex: 1;
52
+ }
53
+ }
54
+
55
+
56
+ .media-audio-file {
57
+ align-self: stretch;
58
+ flex: 1;
59
+ position: relative;
60
+ overflow: visible;
61
+ }
62
+
@@ -0,0 +1,25 @@
1
+ import './PreviewAudioFile.scss';
2
+ import React from 'react';
3
+ import AudioFile from '../../../svgs/Icons/Media/AudioFile';
4
+
5
+ type PreviewAudioFileProps = {
6
+ fileName: string;
7
+ };
8
+ // eslint-disable-next-line react/function-component-definition
9
+ const PreviewAudioFile: React.FC<PreviewAudioFileProps> = ({
10
+ fileName,
11
+ }: PreviewAudioFileProps) => {
12
+ return (
13
+ <div className="preview-audio-file-container">
14
+ <div className="preview-audio-file-container--placeholder">
15
+ <div className="preview-audio-file-container--placeholder__bg" />
16
+ <div className="preview-audio-file-container--placeholder__icon">
17
+ <AudioFile width="16" height="16" applyZoom color="var(--caption)" />
18
+ </div>
19
+ </div>
20
+ <div className="preview-audio-file-container--audio-mp-3">{fileName}</div>
21
+ </div>
22
+ );
23
+ };
24
+
25
+ export default PreviewAudioFile;
@@ -0,0 +1,61 @@
1
+ .preview-default-file-container,
2
+ .preview-default-file-container * {
3
+ box-sizing: border-box;
4
+ }
5
+ .preview-default-file-container {
6
+ display: flex;
7
+ flex-direction: row;
8
+ gap: 8px;
9
+ align-items: center;
10
+ justify-content: flex-start;
11
+ align-self: stretch;
12
+ flex-shrink: 0;
13
+ position: relative;
14
+
15
+ &--placeholder {
16
+ flex-shrink: 0;
17
+ width: 32px;
18
+ height: 32px;
19
+ position: static;
20
+
21
+ &__bg {
22
+ background: var(--incoming-background, #e4e6e8);
23
+ border-radius: 8px;
24
+ width: 32px;
25
+ height: 32px;
26
+ position: absolute;
27
+ left: 0px;
28
+ top: 0px;
29
+ }
30
+ &__icon {
31
+ border-radius: 4px;
32
+ padding: 4px;
33
+ display: flex;
34
+ flex-direction: row;
35
+ gap: 0px;
36
+ align-items: center;
37
+ justify-content: center;
38
+ width: 24px;
39
+ height: 24px;
40
+ position: absolute;
41
+ left: 4px;
42
+ top: 4px;
43
+ }
44
+ }
45
+
46
+ &--default-file {
47
+ color: var(--main-text, #0b121b);
48
+ text-align: left;
49
+ font: 400 12px/16px "Roboto", sans-serif;
50
+ position: relative;
51
+ flex: 1;
52
+ }
53
+ }
54
+
55
+ .media-text-document {
56
+ align-self: stretch;
57
+ flex: 1;
58
+ position: relative;
59
+ overflow: visible;
60
+ }
61
+
@@ -0,0 +1,32 @@
1
+ import './PreviewDefaultFile.scss';
2
+ import React from 'react';
3
+ import TextDocument from '../../../svgs/Icons/Media/TextDocument';
4
+
5
+ type PreviewDefaultFileProps = {
6
+ fileName: string;
7
+ };
8
+ // eslint-disable-next-line react/function-component-definition
9
+ const PreviewDefaultFile: React.FC<PreviewDefaultFileProps> = ({
10
+ fileName,
11
+ }: PreviewDefaultFileProps) => {
12
+ return (
13
+ <div className="preview-default-file-container">
14
+ <div className="preview-default-file-container--placeholder">
15
+ <div className="preview-default-file-container--placeholder__bg" />
16
+ <div className="preview-default-file-container--placeholder__icon">
17
+ <TextDocument
18
+ width="16"
19
+ height="16"
20
+ applyZoom
21
+ color="var(--caption)"
22
+ />
23
+ </div>
24
+ </div>
25
+ <div className="preview-default-file-container--default-file">
26
+ {fileName}
27
+ </div>
28
+ </div>
29
+ );
30
+ };
31
+
32
+ export default PreviewDefaultFile;
@@ -2,7 +2,7 @@
2
2
 
3
3
  $preview-dialog-color-divider: var(--color-divider);
4
4
  $row-center-container-base-font-size: 12px;
5
- $row-center-container-base-font-line-height: 24px;
5
+ $row-center-container-base-font-line-height: 32px;
6
6
  $row--main-container-min-height: 72px;
7
7
  $row--main-container-min-width: 320px;
8
8
  $row--main-container-text-title-width: 120px;
@@ -55,7 +55,7 @@ $preview-dialog-avatar-wrapper-background-color-private: var(--caption);
55
55
  word-wrap: break-word;
56
56
  overflow: hidden;
57
57
  max-height: $row-center-container-base-font-line-height; /* (Number of lines you want visible) * (line-height) */
58
- line-height: $row-center-container-base-font-size;
58
+ line-height: 11px; // $row-center-container-base-font-size;
59
59
  text-align:justify;
60
60
  }
61
61
 
@@ -14,6 +14,10 @@ import PreviewDialogViewModel from './PreviewDialogViewModel';
14
14
  import NotifyOff from '../../svgs/Icons/Toggle/NotifyOff';
15
15
  import EditDots from '../../svgs/Icons/Actions/EditDots';
16
16
  import UiKitTheme from '../../../../assets/UiKitTheme';
17
+ import PreviewImageFile from './PreviewImageFile/PreviewImageFile';
18
+ import PreviewAudioFile from './PreviewAudioFile/PreviewAudioFile';
19
+ import PreviewVideoFile from './PreviewVideoFile/PreviewVideoFile';
20
+ import PreviewDefaultFile from './PreviewDefaultFile/PreviewDefaultFile';
17
21
 
18
22
  export type ThemeNames = 'light' | 'dark' | 'custom';
19
23
  type PreviewDialogsColorTheme = {
@@ -285,6 +289,50 @@ const PreviewDialog: React.FC<PreviewDialogsProps> = ({
285
289
  minWidth: '182px',
286
290
  };
287
291
 
292
+ const getMessageParts = (message: string) => {
293
+ if (
294
+ message.includes('MediaContentEntity') ||
295
+ message.includes('[Attachment]')
296
+ ) {
297
+ const messageParts = message.split('|');
298
+
299
+ // val messageBody = "${MediaContentEntity::class.java.simpleName}|$fileName|$uid|$fileMimeType"
300
+ // 0, 1, 2, 3
301
+ return messageParts;
302
+ }
303
+
304
+ return [];
305
+ };
306
+
307
+ const getPreviewMessage = (message: string): JSX.Element => {
308
+ const messageParts = getMessageParts(message);
309
+
310
+ if (messageParts && messageParts.length > 0) {
311
+ const fileName: string = messageParts[1];
312
+ const fileUid: string = messageParts[2];
313
+ const fileUrl: string = fileUid && QB.content.privateUrl(fileUid);
314
+
315
+ const result: JSX.Element = <div>{message}</div>;
316
+
317
+ if (messageParts[3].includes('audio')) {
318
+ return <PreviewAudioFile fileName={fileName} />;
319
+ }
320
+ if (messageParts[3].includes('video')) {
321
+ return <PreviewVideoFile fileName={fileName} />;
322
+ }
323
+ if (messageParts[3].includes('image')) {
324
+ return <PreviewImageFile fileName={fileName} imgUrl={fileUrl} />;
325
+ }
326
+ if (fileName.length > 0 && fileName.includes('.')) {
327
+ return <PreviewDefaultFile fileName={fileName} />;
328
+ }
329
+
330
+ return result;
331
+ }
332
+
333
+ return <div>{message}</div>;
334
+ };
335
+
288
336
  return (
289
337
  <div
290
338
  onMouseEnter={() => setHaveHover(true)}
@@ -388,7 +436,7 @@ const PreviewDialog: React.FC<PreviewDialogsProps> = ({
388
436
  CenterItem={
389
437
  <div className="preview-dialog-container__text-left">
390
438
  <span className="preview-dialog-container__text-concat">
391
- {previewMessage}
439
+ {getPreviewMessage(previewMessage || '')}
392
440
  </span>
393
441
  </div>
394
442
  }
@@ -420,7 +468,7 @@ const PreviewDialog: React.FC<PreviewDialogsProps> = ({
420
468
  className={textWrapperContainer}
421
469
  >
422
470
  <span className="preview-dialog-container__text-concat">
423
- {previewMessage}
471
+ {getPreviewMessage(previewMessage || '')}
424
472
  </span>
425
473
  </div>
426
474
  }
@@ -0,0 +1,40 @@
1
+ .preview-image-file-container,
2
+ .preview-image-file-container * {
3
+ box-sizing: border-box;
4
+ }
5
+ .preview-image-file-container {
6
+ display: flex;
7
+ flex-direction: row;
8
+ gap: 8px;
9
+ align-items: center;
10
+ justify-content: flex-start;
11
+ align-self: stretch;
12
+ flex-shrink: 0;
13
+ position: relative;
14
+
15
+ &--placeholder {
16
+ flex-shrink: 0;
17
+ width: 32px;
18
+ height: 32px;
19
+ position: static;
20
+
21
+ &__bg {
22
+ border-radius: 8px;
23
+ width: 32px;
24
+ height: 32px;
25
+ position: absolute;
26
+ left: 0px;
27
+ top: 0px;
28
+ }
29
+ }
30
+
31
+ &--travel-img {
32
+ color: var(--main-text, #0b121b);
33
+ text-align: left;
34
+ font: 400 12px/16px "Roboto", sans-serif;
35
+ position: relative;
36
+ flex: 1;
37
+ }
38
+ }
39
+
40
+
@@ -0,0 +1,26 @@
1
+ import './PreviewImageFile.scss';
2
+ import React from 'react';
3
+
4
+ type PreviewImageFileProps = {
5
+ fileName: string;
6
+ imgUrl: string;
7
+ };
8
+ // eslint-disable-next-line react/function-component-definition
9
+ const PreviewImageFile: React.FC<PreviewImageFileProps> = ({
10
+ fileName,
11
+ imgUrl,
12
+ }: PreviewImageFileProps) => {
13
+ return (
14
+ <div className="preview-image-file-container">
15
+ <div className="preview-image-file-container--placeholder">
16
+ <img
17
+ className="preview-image-file-container--placeholder__bg"
18
+ src={imgUrl}
19
+ />
20
+ </div>
21
+ <div className="preview-image-file-container--travel-img">{fileName}</div>
22
+ </div>
23
+ );
24
+ };
25
+
26
+ export default PreviewImageFile;
@@ -0,0 +1,62 @@
1
+ .preview-video-file-container,
2
+ .preview-video-file-container * {
3
+ box-sizing: border-box;
4
+ }
5
+ .preview-video-file-container {
6
+ display: flex;
7
+ flex-direction: row;
8
+ gap: 8px;
9
+ align-items: center;
10
+ justify-content: flex-start;
11
+ align-self: stretch;
12
+ flex-shrink: 0;
13
+ position: relative;
14
+
15
+ &--placeholder {
16
+ flex-shrink: 0;
17
+ width: 32px;
18
+ height: 32px;
19
+ position: static;
20
+
21
+ &__bg {
22
+ background: var(--incoming-background, #e4e6e8);
23
+ border-radius: 8px;
24
+ width: 32px;
25
+ height: 32px;
26
+ position: absolute;
27
+ left: 0px;
28
+ top: 0px;
29
+ }
30
+ &__icon {
31
+ border-radius: 4px;
32
+ padding: 4px;
33
+ display: flex;
34
+ flex-direction: row;
35
+ gap: 0px;
36
+ align-items: center;
37
+ justify-content: center;
38
+ width: 24px;
39
+ height: 24px;
40
+ position: absolute;
41
+ left: 4px;
42
+ top: 4px;
43
+ }
44
+ }
45
+
46
+ &--video-mp-4 {
47
+ color: var(--main-text, #0b121b);
48
+ text-align: left;
49
+ font: 400 12px/16px "Roboto", sans-serif;
50
+ position: relative;
51
+ flex: 1;
52
+ }
53
+ }
54
+
55
+
56
+ .toggle-play {
57
+ align-self: stretch;
58
+ flex: 1;
59
+ position: relative;
60
+ overflow: visible;
61
+ }
62
+
@@ -0,0 +1,25 @@
1
+ import './PreviewVideoFile.scss';
2
+ import React from 'react';
3
+ import ImagePlay from '../../../svgs/Icons/Toggle/ImagePlay';
4
+
5
+ type PreviewVideoFileProps = {
6
+ fileName: string;
7
+ };
8
+ // eslint-disable-next-line react/function-component-definition
9
+ const PreviewVideoFile: React.FC<PreviewVideoFileProps> = ({
10
+ fileName,
11
+ }: PreviewVideoFileProps) => {
12
+ return (
13
+ <div className="preview-video-file-container">
14
+ <div className="preview-video-file-container--placeholder">
15
+ <div className="preview-video-file-container--placeholder__bg" />
16
+ <div className="preview-video-file-container--placeholder__icon">
17
+ <ImagePlay width="16" height="16" applyZoom color="var(--caption)" />
18
+ </div>
19
+ </div>
20
+ <div className="preview-video-file-container--video-mp-4">{fileName}</div>
21
+ </div>
22
+ );
23
+ };
24
+
25
+ export default PreviewVideoFile;
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="25" viewBox="0 0 24 25" fill="none">
2
+ <path d="M16.1339 5.61003H12.9186V4.69137C12.9186 4.44772 12.8219 4.21406 12.6496 4.04177C12.4773 3.86949 12.2436 3.77271 12 3.77271C11.7563 3.77271 11.5227 3.86949 11.3504 4.04177C11.1781 4.21406 11.0813 4.44772 11.0813 4.69137V5.61003H7.86601C6.64779 5.61003 5.47946 6.09396 4.61805 6.95537C3.75664 7.81678 3.27271 8.98511 3.27271 10.2033V16.6339C3.27271 17.8522 3.75664 19.0205 4.61805 19.8819C5.47946 20.7433 6.64779 21.2272 7.86601 21.2272H16.1339C16.7371 21.2272 17.3344 21.1084 17.8917 20.8776C18.449 20.6468 18.9554 20.3084 19.3819 19.8819C19.8084 19.4554 20.1468 18.949 20.3776 18.3917C20.6084 17.8344 20.7272 17.2371 20.7272 16.6339V10.2033C20.7272 9.60013 20.6084 9.00283 20.3776 8.44555C20.1468 7.88826 19.8084 7.3819 19.3819 6.95537C18.9554 6.52884 18.449 6.1905 17.8917 5.95967C17.3344 5.72883 16.7371 5.61003 16.1339 5.61003ZM18.8899 16.6339C18.8899 17.3649 18.5996 18.0659 18.0827 18.5827C17.5659 19.0996 16.8649 19.3899 16.1339 19.3899H7.86601C7.13507 19.3899 6.43408 19.0996 5.91723 18.5827C5.40039 18.0659 5.11003 17.3649 5.11003 16.6339V10.2033C5.11003 9.47239 5.40039 8.7714 5.91723 8.25455C6.43408 7.73771 7.13507 7.44735 7.86601 7.44735H16.1339C16.8649 7.44735 17.5659 7.73771 18.0827 8.25455C18.5996 8.7714 18.8899 9.47239 18.8899 10.2033V16.6339Z" fill="#3978FC"/>
3
+ <path d="M14.7559 10.2034C14.5123 10.2034 14.2786 10.3002 14.1063 10.4724C13.9341 10.6447 13.8373 10.8784 13.8373 11.122V12.9594C13.8373 13.203 13.9341 13.4367 14.1063 13.6089C14.2786 13.7812 14.5123 13.878 14.7559 13.878C14.9996 13.878 15.2332 13.7812 15.4055 13.6089C15.5778 13.4367 15.6746 13.203 15.6746 12.9594V11.122C15.6746 10.8784 15.5778 10.6447 15.4055 10.4724C15.2332 10.3002 14.9996 10.2034 14.7559 10.2034Z" fill="#3978FC"/>
4
+ <path d="M9.24398 10.2034C9.00034 10.2034 8.76668 10.3002 8.59439 10.4724C8.42211 10.6447 8.32532 10.8784 8.32532 11.122V12.9594C8.32532 13.203 8.42211 13.4367 8.59439 13.6089C8.76668 13.7812 9.00034 13.878 9.24398 13.878C9.48763 13.878 9.72129 13.7812 9.89358 13.6089C10.0659 13.4367 10.1626 13.203 10.1626 12.9594V11.122C10.1626 10.8784 10.0659 10.6447 9.89358 10.4724C9.72129 10.3002 9.48763 10.2034 9.24398 10.2034Z" fill="#3978FC"/>
5
+ </svg>
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { IconTheme } from '../../IconsCommonTypes';
3
+
4
+ function BotIcon(theme: IconTheme | undefined = undefined) {
5
+ return !theme?.applyZoom ? (
6
+ <svg
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ width={theme && theme.width ? theme.width : '24'}
9
+ height={theme && theme.height ? theme.height : '25'}
10
+ viewBox="0 0 24 25"
11
+ fill="none"
12
+ >
13
+ <path
14
+ d="M16.1339 5.61003H12.9186V4.69137C12.9186 4.44772 12.8219 4.21406 12.6496 4.04177C12.4773 3.86949 12.2436 3.77271 12 3.77271C11.7563 3.77271 11.5227 3.86949 11.3504 4.04177C11.1781 4.21406 11.0813 4.44772 11.0813 4.69137V5.61003H7.86601C6.64779 5.61003 5.47946 6.09396 4.61805 6.95537C3.75664 7.81678 3.27271 8.98511 3.27271 10.2033V16.6339C3.27271 17.8522 3.75664 19.0205 4.61805 19.8819C5.47946 20.7433 6.64779 21.2272 7.86601 21.2272H16.1339C16.7371 21.2272 17.3344 21.1084 17.8917 20.8776C18.449 20.6468 18.9554 20.3084 19.3819 19.8819C19.8084 19.4554 20.1468 18.949 20.3776 18.3917C20.6084 17.8344 20.7272 17.2371 20.7272 16.6339V10.2033C20.7272 9.60013 20.6084 9.00283 20.3776 8.44555C20.1468 7.88826 19.8084 7.3819 19.3819 6.95537C18.9554 6.52884 18.449 6.1905 17.8917 5.95967C17.3344 5.72883 16.7371 5.61003 16.1339 5.61003ZM18.8899 16.6339C18.8899 17.3649 18.5996 18.0659 18.0827 18.5827C17.5659 19.0996 16.8649 19.3899 16.1339 19.3899H7.86601C7.13507 19.3899 6.43408 19.0996 5.91723 18.5827C5.40039 18.0659 5.11003 17.3649 5.11003 16.6339V10.2033C5.11003 9.47239 5.40039 8.7714 5.91723 8.25455C6.43408 7.73771 7.13507 7.44735 7.86601 7.44735H16.1339C16.8649 7.44735 17.5659 7.73771 18.0827 8.25455C18.5996 8.7714 18.8899 9.47239 18.8899 10.2033V16.6339Z"
15
+ fill={theme && theme.color ? theme.color : 'var(--color-icon)'}
16
+ />
17
+ <path
18
+ d="M14.7559 10.2034C14.5123 10.2034 14.2786 10.3002 14.1063 10.4724C13.9341 10.6447 13.8373 10.8784 13.8373 11.122V12.9594C13.8373 13.203 13.9341 13.4367 14.1063 13.6089C14.2786 13.7812 14.5123 13.878 14.7559 13.878C14.9996 13.878 15.2332 13.7812 15.4055 13.6089C15.5778 13.4367 15.6746 13.203 15.6746 12.9594V11.122C15.6746 10.8784 15.5778 10.6447 15.4055 10.4724C15.2332 10.3002 14.9996 10.2034 14.7559 10.2034Z"
19
+ fill={theme && theme.color ? theme.color : 'var(--color-icon)'}
20
+ />
21
+ <path
22
+ d="M9.24398 10.2034C9.00034 10.2034 8.76668 10.3002 8.59439 10.4724C8.42211 10.6447 8.32532 10.8784 8.32532 11.122V12.9594C8.32532 13.203 8.42211 13.4367 8.59439 13.6089C8.76668 13.7812 9.00034 13.878 9.24398 13.878C9.48763 13.878 9.72129 13.7812 9.89358 13.6089C10.0659 13.4367 10.1626 13.203 10.1626 12.9594V11.122C10.1626 10.8784 10.0659 10.6447 9.89358 10.4724C9.72129 10.3002 9.48763 10.2034 9.24398 10.2034Z"
23
+ fill={theme && theme.color ? theme.color : 'var(--color-icon)'}
24
+ />
25
+ </svg>
26
+ ) : (
27
+ <svg
28
+ xmlns="http://www.w3.org/2000/svg"
29
+ width={theme && theme.width ? theme.width : '24'}
30
+ height={theme && theme.height ? theme.height : '25'}
31
+ viewBox="0 0 24 25"
32
+ fill="none"
33
+ >
34
+ <path
35
+ d="M16.1339 5.61003H12.9186V4.69137C12.9186 4.44772 12.8219 4.21406 12.6496 4.04177C12.4773 3.86949 12.2436 3.77271 12 3.77271C11.7563 3.77271 11.5227 3.86949 11.3504 4.04177C11.1781 4.21406 11.0813 4.44772 11.0813 4.69137V5.61003H7.86601C6.64779 5.61003 5.47946 6.09396 4.61805 6.95537C3.75664 7.81678 3.27271 8.98511 3.27271 10.2033V16.6339C3.27271 17.8522 3.75664 19.0205 4.61805 19.8819C5.47946 20.7433 6.64779 21.2272 7.86601 21.2272H16.1339C16.7371 21.2272 17.3344 21.1084 17.8917 20.8776C18.449 20.6468 18.9554 20.3084 19.3819 19.8819C19.8084 19.4554 20.1468 18.949 20.3776 18.3917C20.6084 17.8344 20.7272 17.2371 20.7272 16.6339V10.2033C20.7272 9.60013 20.6084 9.00283 20.3776 8.44555C20.1468 7.88826 19.8084 7.3819 19.3819 6.95537C18.9554 6.52884 18.449 6.1905 17.8917 5.95967C17.3344 5.72883 16.7371 5.61003 16.1339 5.61003ZM18.8899 16.6339C18.8899 17.3649 18.5996 18.0659 18.0827 18.5827C17.5659 19.0996 16.8649 19.3899 16.1339 19.3899H7.86601C7.13507 19.3899 6.43408 19.0996 5.91723 18.5827C5.40039 18.0659 5.11003 17.3649 5.11003 16.6339V10.2033C5.11003 9.47239 5.40039 8.7714 5.91723 8.25455C6.43408 7.73771 7.13507 7.44735 7.86601 7.44735H16.1339C16.8649 7.44735 17.5659 7.73771 18.0827 8.25455C18.5996 8.7714 18.8899 9.47239 18.8899 10.2033V16.6339Z"
36
+ fill={theme && theme.color ? theme.color : 'var(--color-icon)'}
37
+ />
38
+ <path
39
+ d="M14.7559 10.2034C14.5123 10.2034 14.2786 10.3002 14.1063 10.4724C13.9341 10.6447 13.8373 10.8784 13.8373 11.122V12.9594C13.8373 13.203 13.9341 13.4367 14.1063 13.6089C14.2786 13.7812 14.5123 13.878 14.7559 13.878C14.9996 13.878 15.2332 13.7812 15.4055 13.6089C15.5778 13.4367 15.6746 13.203 15.6746 12.9594V11.122C15.6746 10.8784 15.5778 10.6447 15.4055 10.4724C15.2332 10.3002 14.9996 10.2034 14.7559 10.2034Z"
40
+ fill={theme && theme.color ? theme.color : 'var(--color-icon)'}
41
+ />
42
+ <path
43
+ d="M9.24398 10.2034C9.00034 10.2034 8.76668 10.3002 8.59439 10.4724C8.42211 10.6447 8.32532 10.8784 8.32532 11.122V12.9594C8.32532 13.203 8.42211 13.4367 8.59439 13.6089C8.76668 13.7812 9.00034 13.878 9.24398 13.878C9.48763 13.878 9.72129 13.7812 9.89358 13.6089C10.0659 13.4367 10.1626 13.203 10.1626 12.9594V11.122C10.1626 10.8784 10.0659 10.6447 9.89358 10.4724C9.72129 10.3002 9.48763 10.2034 9.24398 10.2034Z"
44
+ fill={theme && theme.color ? theme.color : 'var(--color-icon)'}
45
+ />
46
+ </svg>
47
+ );
48
+ }
49
+
50
+ export default BotIcon;
@@ -94,11 +94,7 @@ const QuickBloxUIKitDesktopLayout: React.FC<
94
94
  apiKeyOrSessionToken: token,
95
95
  });
96
96
  } else {
97
- token =
98
- QBConfig.configAIApi.AIAnswerAssistWidgetConfig.proxyConfig
99
- .sessionToken ||
100
- sessionToken ||
101
- '';
97
+ token = sessionToken || '';
102
98
  defaultAIAnswerToMessageWidget =
103
99
  UseDefaultAIAssistAnswerWidgetWithProxy({
104
100
  ...proxyConfig,
@@ -134,11 +130,7 @@ const QuickBloxUIKitDesktopLayout: React.FC<
134
130
  apiKeyOrSessionToken: token,
135
131
  });
136
132
  } else {
137
- token =
138
- QBConfig.configAIApi.AITranslateWidgetConfig.proxyConfig
139
- .sessionToken ||
140
- sessionToken ||
141
- '';
133
+ token = sessionToken || '';
142
134
  defaultAITranslateWidget = UseDefaultAITranslateWidgetWithProxy({
143
135
  ...proxyConfig,
144
136
  apiKeyOrSessionToken: token,
@@ -173,11 +165,7 @@ const QuickBloxUIKitDesktopLayout: React.FC<
173
165
  apiKeyOrSessionToken: token,
174
166
  });
175
167
  } else {
176
- token =
177
- QBConfig.configAIApi.AIRephraseWidgetConfig.proxyConfig
178
- .sessionToken ||
179
- sessionToken ||
180
- '';
168
+ token = sessionToken || '';
181
169
  defaultAIEditMessageWidget =
182
170
  UseDefaultAIRephraseMessageWidgetWithProxy({
183
171
  ...proxyConfig,
@@ -4,23 +4,24 @@ import { qbDataContext, QBDataContextType } from './QuickBloxUIKitProvider';
4
4
  const useQbInitializedDataContext = (): QBDataContextType => {
5
5
  const currentQbDataContext = React.useContext(qbDataContext);
6
6
 
7
- console.log(
8
- `call useQbDataContext with init param: ${JSON.stringify(
9
- currentQbDataContext.InitParams,
10
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
11
- )}`,
12
- );
7
+ // console.log(
8
+ // `call useQbDataContext with init param: ${JSON.stringify(
9
+ // currentQbDataContext.InitParams,
10
+ // // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
11
+ // )}`,
12
+ // );
13
13
  // todo: throw exception if we have not enough data to start session or login
14
- let QuickBloxVersion = '';
14
+ // let QuickBloxVersion = '';
15
15
 
16
16
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17
17
  // @ts-ignore
18
18
  if (!window.QB) {
19
19
  throw new Error('HAVE NO SDK');
20
- } else {
21
- QuickBloxVersion = `Have SDK lib: version ${QB.version} build ${QB.buildNumber}`;
22
- console.log(QuickBloxVersion);
23
20
  }
21
+ // else {
22
+ // QuickBloxVersion = `Have SDK lib: version ${QB.version} build ${QB.buildNumber}`;
23
+ // console.log(QuickBloxVersion);
24
+ // }
24
25
  if (!currentQbDataContext) {
25
26
  throw new Error('HAVE NO DATA CONTEXT');
26
27
  }
@@ -29,10 +30,10 @@ const useQbInitializedDataContext = (): QBDataContextType => {
29
30
  }
30
31
  // проверять был ли обработан логин
31
32
  // если сведения для логина - ник, пароль или токен сессии
32
- console.log(
33
- 'data context: update init param: ',
34
- JSON.stringify(currentQbDataContext.InitParams),
35
- );
33
+ // console.log(
34
+ // 'data context: update init param: ',
35
+ // JSON.stringify(currentQbDataContext.InitParams),
36
+ // );
36
37
  if (
37
38
  currentQbDataContext.InitParams.accountData.appId &&
38
39
  currentQbDataContext.InitParams.accountData.accountKey &&