stream-chat-react 13.6.6 → 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.
Files changed (39) hide show
  1. package/dist/components/Channel/Channel.d.ts +1 -1
  2. package/dist/components/Channel/Channel.js +2 -0
  3. package/dist/components/ChannelPreview/ChannelPreview.js +13 -2
  4. package/dist/components/ChannelPreview/utils.js +3 -1
  5. package/dist/components/Chat/hooks/useChat.js +1 -1
  6. package/dist/components/Message/MessageSimple.js +2 -2
  7. package/dist/components/Message/QuotedMessage.js +3 -1
  8. package/dist/components/Message/hooks/useActionHandler.js +6 -5
  9. package/dist/components/Message/renderText/remarkPlugins/imageToLink.d.ts +12 -0
  10. package/dist/components/Message/renderText/remarkPlugins/imageToLink.js +27 -0
  11. package/dist/components/Message/renderText/remarkPlugins/index.d.ts +2 -0
  12. package/dist/components/Message/renderText/remarkPlugins/index.js +2 -0
  13. package/dist/components/Message/renderText/remarkPlugins/plusPlusToEmphasis.d.ts +6 -0
  14. package/dist/components/Message/renderText/remarkPlugins/plusPlusToEmphasis.js +64 -0
  15. package/dist/components/Message/renderText/renderText.js +4 -1
  16. package/dist/components/MessageInput/EditMessageForm.d.ts +2 -1
  17. package/dist/components/MessageInput/hooks/useMessageComposer.js +3 -1
  18. package/dist/components/Poll/PollActions/PollActions.js +2 -1
  19. package/dist/components/TextareaComposer/TextareaComposer.js +4 -1
  20. package/dist/context/ComponentContext.d.ts +3 -1
  21. package/dist/experimental/index.browser.cjs +125 -49
  22. package/dist/experimental/index.browser.cjs.map +4 -4
  23. package/dist/experimental/index.node.cjs +125 -49
  24. package/dist/experimental/index.node.cjs.map +4 -4
  25. package/dist/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.js +2 -1
  26. package/dist/i18n/TranslationBuilder/notifications/attachmentUpload.d.ts +1 -0
  27. package/dist/i18n/TranslationBuilder/notifications/attachmentUpload.js +5 -0
  28. package/dist/index.browser.cjs +1414 -1314
  29. package/dist/index.browser.cjs.map +4 -4
  30. package/dist/index.node.cjs +1416 -1314
  31. package/dist/index.node.cjs.map +4 -4
  32. package/dist/plugins/Emojis/index.browser.cjs +4 -1
  33. package/dist/plugins/Emojis/index.browser.cjs.map +2 -2
  34. package/dist/plugins/Emojis/index.node.cjs +4 -1
  35. package/dist/plugins/Emojis/index.node.cjs.map +2 -2
  36. package/dist/types/defaultDataInterfaces.d.ts +2 -0
  37. package/dist/utils/useStableCallback.d.ts +25 -0
  38. package/dist/utils/useStableCallback.js +29 -0
  39. 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
+ };