quickblox-react-ui-kit 0.3.0-beta.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Data/Stubs.d.ts +1 -1
- package/dist/Data/dto/file/RemoteFileDTO.d.ts +1 -1
- package/dist/Data/dto/message/RemoteMessageDTO.d.ts +1 -1
- package/dist/Data/dto/user/LocalUserDTO.d.ts +1 -1
- package/dist/Data/dto/user/RemoteUserDTO.d.ts +2 -2
- package/dist/Domain/entity/FileEntity.d.ts +1 -1
- package/dist/Domain/entity/UserEntity.d.ts +1 -1
- package/dist/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.d.ts +2 -1
- package/dist/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.d.ts +2 -1
- package/dist/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.d.ts +1 -0
- package/dist/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.d.ts +1 -0
- package/dist/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.d.ts +2 -2
- package/dist/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.d.ts +2 -1
- package/dist/Presentation/Views/Dialog/MessageItem/MessageItem.d.ts +2 -1
- package/dist/Presentation/Views/DialogInfo/DialogInfo.d.ts +1 -0
- package/dist/Presentation/Views/DialogList/DialogList.d.ts +1 -0
- package/dist/Presentation/Views/EditDialog/EditDialog.d.ts +2 -1
- package/dist/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.d.ts +1 -0
- package/dist/Presentation/Views/PreviewDialog/PreviewDialog.d.ts +1 -0
- package/dist/Presentation/providers/QuickBloxUIKitProvider/useQBConnection.d.ts +1 -0
- package/dist/Presentation/ui-components/DialogWindow/DialogWindow.d.ts +3 -2
- package/dist/Presentation/ui-components/Dropdown/DropdownOption.d.ts +2 -1
- package/dist/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.d.ts +1 -0
- package/dist/Presentation/ui-components/MessageInput/MessageInput.d.ts +1 -0
- package/dist/index-ui.js +776 -710
- package/dist/index-ui.js.map +1 -1
- package/dist/qb-api-calls/index.d.ts +8 -7
- package/global.d.ts +2513 -546
- package/package.json +2 -2
- package/src/App.scss +3 -0
- package/src/Data/Creator.ts +1 -2
- package/src/Data/Stubs.ts +4 -5
- package/src/Data/dto/file/RemoteFileDTO.ts +2 -2
- package/src/Data/dto/message/RemoteMessageDTO.ts +1 -1
- package/src/Data/dto/user/LocalUserDTO.ts +2 -2
- package/src/Data/dto/user/RemoteUserDTO.ts +4 -4
- package/src/Data/mapper/FileRemoteDTOMapper.ts +8 -6
- package/src/Data/mapper/MessageRemoteDTOMapper.ts +1 -1
- package/src/Data/mapper/UserLocalDTOMapper.ts +2 -2
- package/src/Data/mapper/UserRemoteDTOMapper.ts +2 -2
- package/src/Data/repository/MessagesRepository.ts +2 -2
- package/src/Data/repository/UsersRepository.ts +1 -1
- package/src/Data/source/remote/Mapper/FileDTOMapper.ts +23 -23
- package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +2 -2
- package/src/Data/source/remote/Mapper/UserDTOMapper.ts +0 -2
- package/src/Data/source/remote/RemoteDataSource.ts +50 -8
- package/src/Domain/entity/FileEntity.ts +1 -1
- package/src/Domain/entity/UserEntity.ts +1 -11
- package/src/Domain/use_cases/UpdateDialogUseCase.ts +6 -1
- package/src/Domain/use_cases/base/Subscribable/SubscriptionPerformer.ts +1 -1
- package/src/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.scss +5 -0
- package/src/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.tsx +9 -2
- package/src/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.scss +10 -0
- package/src/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.tsx +16 -7
- package/src/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.scss +7 -2
- package/src/Presentation/Views/Dialog/AIWidgets/AIRephraseWidget/AIRephraseWidget.tsx +12 -3
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogListItem/DialogListItem.scss +1 -1
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/ForwardMessageFlow.tsx +9 -5
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.scss +31 -1
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/InputForForwarding/InputForForwarding.tsx +7 -7
- package/src/Presentation/Views/Dialog/MessageContextMenu/MessageContextMenu.tsx +17 -6
- package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +6 -0
- package/src/Presentation/Views/Dialog/useDialogViewModel.ts +1 -0
- package/src/Presentation/Views/DialogInfo/DialogInfo.scss +11 -1
- package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +36 -18
- package/src/Presentation/Views/DialogInfo/UsersList/useUsersListViewModel.ts +1 -0
- package/src/Presentation/Views/DialogList/DialogList.scss +5 -0
- package/src/Presentation/Views/DialogList/DialogList.tsx +12 -2
- package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +33 -16
- package/src/Presentation/Views/EditDialog/EditDialog.scss +11 -0
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +9 -1
- package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +14 -0
- package/src/Presentation/Views/InviteMembers/useInviteMembersViewModel.ts +1 -11
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +4 -0
- package/src/Presentation/icons/media/video-file.svg +2 -2
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +426 -499
- package/src/Presentation/providers/QuickBloxUIKitProvider/useQBConnection.ts +16 -0
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.scss +11 -0
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.tsx +4 -1
- package/src/Presentation/ui-components/Dropdown/Dropdown.scss +4 -0
- package/src/Presentation/ui-components/Dropdown/Dropdown.tsx +1 -1
- package/src/Presentation/ui-components/Dropdown/DropdownOption.tsx +9 -1
- package/src/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.tsx +3 -0
- package/src/Presentation/ui-components/MessageInput/MessageInput.scss +18 -4
- package/src/Presentation/ui-components/MessageInput/MessageInput.tsx +8 -2
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx +2 -2
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx +2 -0
- package/src/index.scss +5 -2
- package/src/qb-api-calls/index.ts +58 -49
- package/storybook-static/758.53b4954a.iframe.bundle.js +14 -0
- package/storybook-static/{758.e75a5a47.iframe.bundle.js.map → 758.53b4954a.iframe.bundle.js.map} +1 -1
- package/storybook-static/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.90aa44c5.iframe.bundle.js → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6665bbfb.iframe.bundle.js} +1 -1
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.cf340397.iframe.bundle.js +1 -0
- package/storybook-static/{Presentation-ui-components-Dropdown-Dropdown-stories.aacf2ec2.iframe.bundle.js → Presentation-ui-components-Dropdown-Dropdown-stories.b32a1e17.iframe.bundle.js} +1 -1
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.c2ead6a5.iframe.bundle.js +1 -0
- package/storybook-static/{Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.1661d95b.iframe.bundle.js → Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.527e000e.iframe.bundle.js} +1 -1
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.2ff75703.iframe.bundle.js +1 -0
- package/storybook-static/{docs-Introduction-mdx.ac401482.iframe.bundle.js → docs-Introduction-mdx.bcb06844.iframe.bundle.js} +2 -2
- package/storybook-static/{docs-Introduction-mdx.ac401482.iframe.bundle.js.map → docs-Introduction-mdx.bcb06844.iframe.bundle.js.map} +1 -1
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/project.json +1 -1
- package/storybook-static/{runtime~main.e945879b.iframe.bundle.js → runtime~main.7ee2126e.iframe.bundle.js} +1 -1
- package/storybook-static/static/css/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e720ff21.chunk.css → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bee082ca.chunk.css} +2 -2
- package/storybook-static/static/css/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e720ff21.chunk.css.map → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bee082ca.chunk.css.map} +1 -1
- package/storybook-static/static/css/{Presentation-ui-components-DialogWindow-DialogWindow-stories.6fb3af8d.chunk.css → Presentation-ui-components-DialogWindow-DialogWindow-stories.4f813450.chunk.css} +2 -2
- package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.4f813450.chunk.css.map +1 -0
- package/storybook-static/static/css/{Presentation-ui-components-Dropdown-Dropdown-stories.66965d64.chunk.css → Presentation-ui-components-Dropdown-Dropdown-stories.e37f549d.chunk.css} +2 -2
- package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.e37f549d.chunk.css.map +1 -0
- package/storybook-static/static/css/{Presentation-ui-components-MessageInput-MessageInput-stories.0e99d80b.chunk.css → Presentation-ui-components-MessageInput-MessageInput-stories.7eb916fc.chunk.css} +2 -2
- package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.7eb916fc.chunk.css.map +1 -0
- package/storybook-static/static/css/{main.6fa55a2c.css → main.a921485c.css} +2 -2
- package/storybook-static/static/css/{main.6fa55a2c.css.map → main.a921485c.css.map} +1 -1
- package/storybook-static/static/media/video-file.dbd1f8c63a3769f9e9a027f0922d56b2.svg +3 -0
- package/storybook-static/758.e75a5a47.iframe.bundle.js +0 -14
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.3523a670.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.262a0cf2.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.8f6fca84.iframe.bundle.js +0 -1
- package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.6fb3af8d.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.66965d64.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.0e99d80b.chunk.css.map +0 -1
- package/storybook-static/static/media/video-file.dc2971be489b2af7b1c04dcc55bfe881.svg +0 -3
|
@@ -50,6 +50,17 @@ $create-dialog-container-height: 180px;
|
|
|
50
50
|
|
|
51
51
|
margin-bottom: 24px;
|
|
52
52
|
|
|
53
|
+
&--disable {
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: 0;
|
|
56
|
+
left: 0;
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 100%;
|
|
59
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
60
|
+
z-index: 100;
|
|
61
|
+
display: block;
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
&--wrapper {
|
|
54
65
|
min-height: 180px;
|
|
55
66
|
display: flex;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import '
|
|
2
|
+
import cn from 'classnames';
|
|
3
3
|
import ColumnContainer from '../../components/containers/ColumnContainer/ColumnContainer';
|
|
4
4
|
import User from '../../components/UI/svgs/Icons/Contents/User';
|
|
5
5
|
import RowRightContainer from '../../components/containers/RowRightContainer/RowRightContainer';
|
|
@@ -14,6 +14,7 @@ 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
16
|
import { Button, TextField } from '../../ui-components';
|
|
17
|
+
import './EditDialog.scss';
|
|
17
18
|
|
|
18
19
|
export const TypeOpenDialog = {
|
|
19
20
|
edit: 'edit',
|
|
@@ -29,6 +30,7 @@ type EditDialogProps = {
|
|
|
29
30
|
typeAddEditDialog: OpenDialogArcheType;
|
|
30
31
|
clickUpdatedHandler?: FunctionTypeEditDialogParamsToVoid;
|
|
31
32
|
clickCancelHandler?: FunctionTypeVoidToVoid;
|
|
33
|
+
disableActions?: boolean;
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
// eslint-disable-next-line react/function-component-definition,@typescript-eslint/no-unused-vars
|
|
@@ -39,6 +41,7 @@ const EditDialog: React.FC<EditDialogProps> = ({
|
|
|
39
41
|
typeAddEditDialog = TypeOpenDialog.create,
|
|
40
42
|
clickUpdatedHandler,
|
|
41
43
|
clickCancelHandler,
|
|
44
|
+
disableActions = false,
|
|
42
45
|
}) => {
|
|
43
46
|
const currentContext = useQbInitializedDataContext();
|
|
44
47
|
const maxUploadFileSize = currentContext.InitParams.maxFileSize;
|
|
@@ -176,6 +179,11 @@ const EditDialog: React.FC<EditDialogProps> = ({
|
|
|
176
179
|
}}
|
|
177
180
|
className="edit-container"
|
|
178
181
|
>
|
|
182
|
+
<div
|
|
183
|
+
className={cn('', {
|
|
184
|
+
'edit-dialog-container--disable': disableActions,
|
|
185
|
+
})}
|
|
186
|
+
/>
|
|
179
187
|
<div className="edit-dialog-container">
|
|
180
188
|
<div className="edit-dialog-container--wrapper">
|
|
181
189
|
<div className="edit-dialog-container--wrapper__inf">
|
|
@@ -17,6 +17,7 @@ type CreateNewDialogFlowProps = {
|
|
|
17
17
|
dialogsViewModel: DialogListViewModel;
|
|
18
18
|
onFinished: (newEntity: DialogEntity) => void;
|
|
19
19
|
onCancel?: () => void;
|
|
20
|
+
isOnline: boolean;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
// eslint-disable-next-line react/function-component-definition
|
|
@@ -24,6 +25,7 @@ const CreateNewDialogFlow: React.FC<CreateNewDialogFlowProps> = ({
|
|
|
24
25
|
dialogsViewModel,
|
|
25
26
|
onFinished,
|
|
26
27
|
onCancel,
|
|
28
|
+
isOnline,
|
|
27
29
|
}: CreateNewDialogFlowProps) => {
|
|
28
30
|
const currentContext = React.useContext(qbDataContext);
|
|
29
31
|
const remoteDataSourceMock: RemoteDataSource =
|
|
@@ -122,6 +124,18 @@ const CreateNewDialogFlow: React.FC<CreateNewDialogFlowProps> = ({
|
|
|
122
124
|
|
|
123
125
|
return (
|
|
124
126
|
<div>
|
|
127
|
+
<div
|
|
128
|
+
style={{
|
|
129
|
+
position: 'absolute',
|
|
130
|
+
top: '0',
|
|
131
|
+
left: '0',
|
|
132
|
+
width: '100%',
|
|
133
|
+
height: '100%',
|
|
134
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
135
|
+
zIndex: '100',
|
|
136
|
+
display: isOnline ? 'none' : 'block',
|
|
137
|
+
}}
|
|
138
|
+
/>
|
|
125
139
|
{stepToCreate === setUpDialogType && (
|
|
126
140
|
<CreateDialog
|
|
127
141
|
createPrivateDialogOnClick={() => {
|
|
@@ -116,17 +116,7 @@ export default function useInviteMembersViewModel(): InviteMembersViewModel {
|
|
|
116
116
|
|
|
117
117
|
return {
|
|
118
118
|
get entity(): UserEntity {
|
|
119
|
-
return Stubs.createUserEntityWithParams(
|
|
120
|
-
0,
|
|
121
|
-
'',
|
|
122
|
-
'',
|
|
123
|
-
'',
|
|
124
|
-
'',
|
|
125
|
-
'',
|
|
126
|
-
'',
|
|
127
|
-
'',
|
|
128
|
-
'',
|
|
129
|
-
);
|
|
119
|
+
return Stubs.createUserEntityWithParams(0, '', '', '', '', '', 0, '', '');
|
|
130
120
|
},
|
|
131
121
|
// id: Date.now(),
|
|
132
122
|
// name: '',
|
|
@@ -53,6 +53,7 @@ type PreviewDialogsProps = {
|
|
|
53
53
|
theme?: PreviewDialogsTheme;
|
|
54
54
|
onLeaveDialog: FunctionTypeDialogEntityToVoid;
|
|
55
55
|
additionalSettings?: PreviewDialogSettings;
|
|
56
|
+
disableActions?: boolean;
|
|
56
57
|
};
|
|
57
58
|
// eslint-disable-next-line react/function-component-definition
|
|
58
59
|
const PreviewDialog: React.FC<PreviewDialogsProps> = ({
|
|
@@ -65,6 +66,7 @@ const PreviewDialog: React.FC<PreviewDialogsProps> = ({
|
|
|
65
66
|
message_date_time_sent,
|
|
66
67
|
theme = undefined,
|
|
67
68
|
onLeaveDialog,
|
|
69
|
+
disableActions = false,
|
|
68
70
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
69
71
|
additionalSettings = undefined,
|
|
70
72
|
}: PreviewDialogsProps) => {
|
|
@@ -293,8 +295,10 @@ const PreviewDialog: React.FC<PreviewDialogsProps> = ({
|
|
|
293
295
|
{
|
|
294
296
|
value: 'Leave',
|
|
295
297
|
label: 'Leave',
|
|
298
|
+
disabled: disableActions,
|
|
296
299
|
},
|
|
297
300
|
]}
|
|
301
|
+
disabled={disableActions}
|
|
298
302
|
onSelect={(value: string) => {
|
|
299
303
|
if (value === 'Leave') {
|
|
300
304
|
onLeaveDialog(dialogViewModel?.entity as DialogEntity);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg viewBox="0 0
|
|
2
|
-
<path d="
|
|
1
|
+
<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M33.0001 7.33325L36.6667 14.6666H31.1667L27.5001 7.33325H23.8334L27.5001 14.6666H22.0001L18.3334 7.33325H14.6667L18.3334 14.6666H12.8334L9.16675 7.33325H7.33341C5.31675 7.33325 3.68508 8.98325 3.68508 10.9999L3.66675 32.9999C3.66675 35.0166 5.31675 36.6666 7.33341 36.6666H36.6667C38.6834 36.6666 40.3334 35.0166 40.3334 32.9999V7.33325H33.0001Z"/>
|
|
3
3
|
</svg>
|