stream-chat-react 13.7.0 → 13.8.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/components/Channel/Channel.d.ts +1 -1
- package/dist/components/Channel/Channel.js +2 -0
- package/dist/components/ChannelPreview/ChannelPreview.js +13 -2
- package/dist/components/Chat/hooks/useChat.js +1 -1
- package/dist/components/Message/MessageSimple.js +2 -2
- package/dist/components/Message/QuotedMessage.js +3 -1
- package/dist/components/Message/hooks/useActionHandler.js +6 -5
- package/dist/components/MessageInput/EditMessageForm.d.ts +2 -1
- package/dist/components/MessageInput/hooks/useMessageComposer.js +3 -1
- package/dist/components/Poll/PollActions/PollActions.js +2 -1
- package/dist/components/TextareaComposer/TextareaComposer.js +4 -1
- package/dist/context/ComponentContext.d.ts +3 -1
- package/dist/experimental/index.browser.cjs +20 -5
- package/dist/experimental/index.browser.cjs.map +2 -2
- package/dist/experimental/index.node.cjs +20 -5
- package/dist/experimental/index.node.cjs.map +2 -2
- package/dist/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.js +2 -1
- package/dist/i18n/TranslationBuilder/notifications/attachmentUpload.d.ts +1 -0
- package/dist/i18n/TranslationBuilder/notifications/attachmentUpload.js +5 -0
- package/dist/index.browser.cjs +1267 -1233
- package/dist/index.browser.cjs.map +4 -4
- package/dist/index.node.cjs +1267 -1233
- package/dist/index.node.cjs.map +4 -4
- package/dist/plugins/Emojis/index.browser.cjs +4 -1
- package/dist/plugins/Emojis/index.browser.cjs.map +2 -2
- package/dist/plugins/Emojis/index.node.cjs +4 -1
- package/dist/plugins/Emojis/index.node.cjs.map +2 -2
- package/dist/types/defaultDataInterfaces.d.ts +2 -0
- package/dist/utils/useStableCallback.d.ts +25 -0
- package/dist/utils/useStableCallback.js +29 -0
- package/package.json +3 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { attachmentUploadBlockedNotificationTranslator, attachmentUploadFailedNotificationTranslator, } from './attachmentUpload';
|
|
1
|
+
import { attachmentUploadBlockedNotificationTranslator, attachmentUploadFailedNotificationTranslator, attachmentUploadNotTerminatedTranslator, } from './attachmentUpload';
|
|
2
2
|
import { TranslationTopic } from '../../TranslationBuilder';
|
|
3
3
|
import { pollCreationFailedNotificationTranslator } from './pollComposition';
|
|
4
4
|
import { pollVoteCountTrespass } from './pollVoteCountTrespass';
|
|
@@ -6,6 +6,7 @@ export const defaultNotificationTranslators = {
|
|
|
6
6
|
'api:attachment:upload:failed': attachmentUploadFailedNotificationTranslator,
|
|
7
7
|
'api:poll:create:failed': pollCreationFailedNotificationTranslator,
|
|
8
8
|
'validation:attachment:upload:blocked': attachmentUploadBlockedNotificationTranslator,
|
|
9
|
+
'validation:attachment:upload:in-progress': attachmentUploadNotTerminatedTranslator,
|
|
9
10
|
'validation:poll:castVote:limit': pollVoteCountTrespass,
|
|
10
11
|
};
|
|
11
12
|
export class NotificationTranslationTopic extends TranslationTopic {
|
|
@@ -2,3 +2,4 @@ import type { NotificationTranslatorOptions } from './types';
|
|
|
2
2
|
import type { Translator } from '../TranslationBuilder';
|
|
3
3
|
export declare const attachmentUploadBlockedNotificationTranslator: Translator<NotificationTranslatorOptions>;
|
|
4
4
|
export declare const attachmentUploadFailedNotificationTranslator: Translator<NotificationTranslatorOptions>;
|
|
5
|
+
export declare const attachmentUploadNotTerminatedTranslator: Translator<NotificationTranslatorOptions>;
|
|
@@ -30,3 +30,8 @@ export const attachmentUploadFailedNotificationTranslator = ({ options, t }) =>
|
|
|
30
30
|
// custom reason string
|
|
31
31
|
return t('Attachment upload failed due to {{reason}}', { reason });
|
|
32
32
|
};
|
|
33
|
+
export const attachmentUploadNotTerminatedTranslator = ({ options: { notification }, t }) => {
|
|
34
|
+
if (!notification?.message)
|
|
35
|
+
return null;
|
|
36
|
+
return t('Wait until all attachments have uploaded');
|
|
37
|
+
};
|