quickblox-react-ui-kit 0.3.1-beta.5 → 0.3.1-beta.7
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/Presentation/ui-components/TextField/TextField.d.ts +1 -1
- package/dist/index-ui.js +11 -41
- package/dist/index-ui.js.map +1 -1
- package/package.json +1 -1
- package/src/Data/source/remote/RemoteDataSource.ts +6 -2
- package/src/Presentation/Views/DialogList/DialogList.tsx +0 -37
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +1 -0
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +4 -1
- package/src/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.tsx +2 -0
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.scss +1 -1
- package/src/Presentation/ui-components/Toast/Toast.scss +5 -0
- package/src/Presentation/ui-components/Toast/ToastProvider.tsx +1 -0
- package/storybook-static/{703.2cbec951.iframe.bundle.js → 703.776b9f13.iframe.bundle.js} +2 -2
- package/storybook-static/{703.2cbec951.iframe.bundle.js.map → 703.776b9f13.iframe.bundle.js.map} +1 -1
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.0d1800d9.iframe.bundle.js +1 -0
- package/storybook-static/{Presentation-ui-components-Toast-Toast-stories.b903385b.iframe.bundle.js → Presentation-ui-components-Toast-Toast-stories.1b8758fc.iframe.bundle.js} +2 -2
- package/storybook-static/{Presentation-ui-components-Toast-Toast-stories.b903385b.iframe.bundle.js.map → Presentation-ui-components-Toast-Toast-stories.1b8758fc.iframe.bundle.js.map} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/{runtime~main.bbf4d5b0.iframe.bundle.js → runtime~main.3464b25a.iframe.bundle.js} +1 -1
- package/storybook-static/static/css/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2a9e5bc3.chunk.css → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6d563072.chunk.css} +2 -2
- package/storybook-static/static/css/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2a9e5bc3.chunk.css.map → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6d563072.chunk.css.map} +1 -1
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.31cd021e.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.31cd021e.chunk.css.map +1 -0
- package/storybook-static/static/css/{Presentation-ui-components-Toast-Toast-stories.11d83296.chunk.css → Presentation-ui-components-Toast-Toast-stories.a5b284f4.chunk.css} +2 -2
- package/storybook-static/static/css/{Presentation-ui-components-Toast-Toast-stories.11d83296.chunk.css.map → Presentation-ui-components-Toast-Toast-stories.a5b284f4.chunk.css.map} +1 -1
- package/src/package_artan_react_ui.json +0 -91
- package/src/package_original.json +0 -115
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.bf8a24d1.iframe.bundle.js +0 -1
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css.map +0 -1
package/package.json
CHANGED
|
@@ -635,9 +635,13 @@ export class RemoteDataSource implements IRemoteDataSource {
|
|
|
635
635
|
};
|
|
636
636
|
QB.chat.onMessageErrorListener = (messageId: string, error: unknown) => {
|
|
637
637
|
console.log(
|
|
638
|
-
`EVENT: receive error
|
|
638
|
+
`EVENT: receive error message id: ${messageId}, error: ${stringifyError(
|
|
639
639
|
error,
|
|
640
|
-
)}`,
|
|
640
|
+
)}, current auth status is: ${this.authProcessed ? 'true' : 'false'}`,
|
|
641
|
+
);
|
|
642
|
+
this.subscriptionOnSessionExpiredListener.informSubscribers(
|
|
643
|
+
true,
|
|
644
|
+
EventMessageType.LocalMessage,
|
|
641
645
|
);
|
|
642
646
|
};
|
|
643
647
|
|
|
@@ -242,43 +242,6 @@ const DialogList: React.FC<DialogsProps> = ({
|
|
|
242
242
|
return AvatarComponent;
|
|
243
243
|
};
|
|
244
244
|
|
|
245
|
-
/*
|
|
246
|
-
import React, {useState, useEffect} from 'react';
|
|
247
|
-
|
|
248
|
-
// предполагая, что dialogListViewModel определен в родительском компоненте и передан в этот компонент как проп
|
|
249
|
-
const YourComponent = ({ dialogListViewModel }) => {
|
|
250
|
-
const [pointerEventsValue, setPointerEvents] = useState('auto');
|
|
251
|
-
|
|
252
|
-
// поведение на 12 секунд
|
|
253
|
-
useEffect(() => {
|
|
254
|
-
let timeout;
|
|
255
|
-
if (dialogListViewModel && dialogListViewModel.loading) {
|
|
256
|
-
setPointerEvents('none');
|
|
257
|
-
timeout = setTimeout(() => {
|
|
258
|
-
setPointerEvents('auto');
|
|
259
|
-
}, 12000); // блокировать нажатие на 12 секунд
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// поведение на отмену эффекта
|
|
263
|
-
return () => {
|
|
264
|
-
if (timeout) {
|
|
265
|
-
clearTimeout(timeout);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}, [dialogListViewModel]);
|
|
269
|
-
|
|
270
|
-
return (
|
|
271
|
-
<div
|
|
272
|
-
style={{
|
|
273
|
-
pointerEventsValue: pointerEventsValue
|
|
274
|
-
}}
|
|
275
|
-
>
|
|
276
|
-
...
|
|
277
|
-
</div>
|
|
278
|
-
);
|
|
279
|
-
}
|
|
280
|
-
*/
|
|
281
|
-
|
|
282
245
|
return (
|
|
283
246
|
<div
|
|
284
247
|
key={item.entity.id}
|
|
@@ -80,6 +80,7 @@ const EditDialog: React.FC<EditDialogProps> = ({
|
|
|
80
80
|
|
|
81
81
|
const fileSize = file?.size || 0;
|
|
82
82
|
|
|
83
|
+
console.log('MAX_FILE_SIZE', maxUploadFileSize, ' fileSize', fileSize);
|
|
83
84
|
if (fileSize >= maxUploadFileSize) {
|
|
84
85
|
setErrorMessageUpload(errorMessageUploadMaxSize);
|
|
85
86
|
|
|
@@ -61,6 +61,7 @@ import useModal from '../../../hooks/useModal';
|
|
|
61
61
|
import useQBConnection from '../../providers/QuickBloxUIKitProvider/useQBConnection';
|
|
62
62
|
import { ProxyConfig } from '../../../CommonTypes/CommonTypes';
|
|
63
63
|
import EventMessageType from '../../../Domain/entity/EventMessageType';
|
|
64
|
+
import { formatFileSize } from '../../../utils/formatFileSize';
|
|
64
65
|
|
|
65
66
|
type AIWidgetPlaceHolder = {
|
|
66
67
|
enabled: boolean;
|
|
@@ -922,7 +923,9 @@ const QuickBloxUIKitDesktopLayout: React.FC<
|
|
|
922
923
|
}
|
|
923
924
|
} else if (fileToSend) {
|
|
924
925
|
toast(
|
|
925
|
-
`file size ${
|
|
926
|
+
`file size ${formatFileSize(
|
|
927
|
+
fileToSend?.size,
|
|
928
|
+
)} must be less then ${MAXSIZE_FOR_MESSAGE} mb.`,
|
|
926
929
|
);
|
|
927
930
|
setFileToSend(null);
|
|
928
931
|
}
|
package/src/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.tsx
CHANGED
|
@@ -26,6 +26,8 @@ const AttachmentUploader: React.FC<AttachmentMessageProps> = ({
|
|
|
26
26
|
style={{ display: 'none' }}
|
|
27
27
|
onChange={(event) => {
|
|
28
28
|
onChangeFile(event);
|
|
29
|
+
// eslint-disable-next-line no-param-reassign
|
|
30
|
+
event.target.value = '';
|
|
29
31
|
}}
|
|
30
32
|
disabled={disableAction}
|
|
31
33
|
/>
|