stream-chat-react 13.2.3 → 13.4.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/Attachment/Attachment.d.ts +5 -3
- package/dist/components/Attachment/Attachment.js +12 -5
- package/dist/components/Attachment/AttachmentContainer.d.ts +4 -3
- package/dist/components/Attachment/AttachmentContainer.js +5 -1
- package/dist/components/Attachment/Geolocation.d.ts +13 -0
- package/dist/components/Attachment/Geolocation.js +34 -0
- package/dist/components/Attachment/icons.d.ts +2 -0
- package/dist/components/Attachment/icons.js +5 -0
- package/dist/components/Attachment/index.d.ts +3 -1
- package/dist/components/Attachment/index.js +3 -1
- package/dist/components/Attachment/utils.d.ts +4 -1
- package/dist/components/Channel/Channel.d.ts +1 -1
- package/dist/components/Channel/Channel.js +2 -0
- package/dist/components/ChannelPreview/utils.js +3 -0
- package/dist/components/Chat/hooks/useChat.js +1 -1
- package/dist/components/Dialog/DialogAnchor.d.ts +3 -2
- package/dist/components/Dialog/DialogAnchor.js +7 -2
- package/dist/components/Form/Dropdown.d.ts +14 -0
- package/dist/components/Form/Dropdown.js +49 -0
- package/dist/components/Form/SwitchField.js +3 -1
- package/dist/components/Location/ShareLocationDialog.d.ts +18 -0
- package/dist/components/Location/ShareLocationDialog.js +139 -0
- package/dist/components/Location/hooks/useLiveLocationSharingManager.d.ts +18 -0
- package/dist/components/Location/hooks/useLiveLocationSharingManager.js +57 -0
- package/dist/components/Location/index.d.ts +1 -0
- package/dist/components/Location/index.js +1 -0
- package/dist/components/Message/MessageSimple.js +6 -1
- package/dist/components/Message/index.d.ts +3 -1
- package/dist/components/Message/index.js +3 -1
- package/dist/components/Message/renderText/renderText.d.ts +1 -1
- package/dist/components/Message/renderText/renderText.js +1 -1
- package/dist/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.d.ts +3 -1
- package/dist/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.js +35 -26
- package/dist/components/MessageInput/AttachmentPreviewList/GeolocationPreview.d.ts +13 -0
- package/dist/components/MessageInput/AttachmentPreviewList/GeolocationPreview.js +25 -0
- package/dist/components/MessageInput/AttachmentPreviewList/index.d.ts +1 -0
- package/dist/components/MessageInput/AttachmentSelector.d.ts +2 -1
- package/dist/components/MessageInput/AttachmentSelector.js +34 -12
- package/dist/components/MessageInput/MessageInput.d.ts +3 -1
- package/dist/components/MessageInput/MessageInput.js +7 -3
- package/dist/components/MessageInput/hooks/index.d.ts +1 -0
- package/dist/components/MessageInput/hooks/index.js +1 -0
- package/dist/components/MessageInput/hooks/useAttachmentsForPreview.d.ts +17 -0
- package/dist/components/MessageInput/hooks/useAttachmentsForPreview.js +22 -0
- package/dist/components/MessageInput/index.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts +8 -3
- package/dist/components/Modal/Modal.js +19 -8
- package/dist/components/Poll/PollActions/AddCommentForm.js +8 -0
- package/dist/components/Poll/PollActions/SuggestPollOptionForm.js +6 -3
- package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.js +4 -1
- package/dist/components/TextareaComposer/SuggestionList/SuggestionListItem.js +4 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -0
- package/dist/context/ComponentContext.d.ts +3 -0
- package/dist/css/v2/index.css +1 -1
- package/dist/css/v2/index.layout.css +1 -1
- package/dist/experimental/index.browser.cjs +11 -0
- package/dist/experimental/index.browser.cjs.map +2 -2
- package/dist/experimental/index.node.cjs +11 -0
- package/dist/experimental/index.node.cjs.map +2 -2
- package/dist/i18n/Streami18n.d.ts +21 -0
- package/dist/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.js +2 -0
- package/dist/i18n/TranslationBuilder/notifications/pollVoteCountTrespass.d.ts +3 -0
- package/dist/i18n/TranslationBuilder/notifications/pollVoteCountTrespass.js +1 -0
- package/dist/i18n/de.json +22 -1
- package/dist/i18n/en.json +22 -1
- package/dist/i18n/es.json +22 -1
- package/dist/i18n/fr.json +22 -1
- package/dist/i18n/hi.json +22 -1
- package/dist/i18n/it.json +22 -1
- package/dist/i18n/ja.json +22 -1
- package/dist/i18n/ko.json +22 -1
- package/dist/i18n/nl.json +22 -1
- package/dist/i18n/pt.json +22 -1
- package/dist/i18n/ru.json +22 -1
- package/dist/i18n/tr.json +22 -1
- package/dist/index.browser.cjs +2610 -1727
- package/dist/index.browser.cjs.map +4 -4
- package/dist/index.node.cjs +2622 -1727
- package/dist/index.node.cjs.map +4 -4
- package/dist/scss/v2/AttachmentList/AttachmentList-layout.scss +50 -0
- package/dist/scss/v2/AttachmentList/AttachmentList-theme.scss +56 -0
- package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-layout.scss +3 -0
- package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-theme.scss +11 -0
- package/dist/scss/v2/Dialog/Dialog-layout.scss +1 -2
- package/dist/scss/v2/Form/Form-layout.scss +40 -0
- package/dist/scss/v2/Form/Form-theme.scss +62 -0
- package/dist/scss/v2/Location/Location-layout.scss +52 -0
- package/dist/scss/v2/Location/Location-theme.scss +32 -0
- package/dist/scss/v2/MessageInput/MessageInput-theme.scss +7 -0
- package/dist/scss/v2/Modal/Modal-layout.scss +2 -0
- package/dist/scss/v2/Poll/Poll-layout.scss +0 -35
- package/dist/scss/v2/Poll/Poll-theme.scss +0 -28
- package/dist/scss/v2/_icons.scss +1 -0
- package/dist/scss/v2/index.layout.scss +1 -0
- package/dist/scss/v2/index.scss +1 -0
- package/package.json +6 -6
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import React, { useCallback, useLayoutEffect, useRef } from 'react';
|
|
3
3
|
import { useMessageComposer } from '../../MessageInput';
|
|
4
|
+
import { useMessageInputContext } from '../../../context';
|
|
4
5
|
export const SuggestionListItem = React.forwardRef(function SuggestionListItem({ className, component: Component, focused, item, onMouseEnter }, innerRef) {
|
|
5
6
|
const { textComposer } = useMessageComposer();
|
|
7
|
+
const { textareaRef } = useMessageInputContext();
|
|
6
8
|
const containerRef = useRef(null);
|
|
7
9
|
const handleSelect = useCallback(() => {
|
|
8
10
|
textComposer.handleSelect(item);
|
|
9
|
-
|
|
11
|
+
textareaRef.current?.focus();
|
|
12
|
+
}, [item, textareaRef, textComposer]);
|
|
10
13
|
useLayoutEffect(() => {
|
|
11
14
|
if (!focused)
|
|
12
15
|
return;
|
|
@@ -14,10 +14,11 @@ export * from './Gallery';
|
|
|
14
14
|
export * from './InfiniteScrollPaginator';
|
|
15
15
|
export * from './Loading';
|
|
16
16
|
export * from './LoadMore';
|
|
17
|
+
export * from './Location';
|
|
17
18
|
export * from './MediaRecorder';
|
|
18
19
|
export * from './Message';
|
|
19
20
|
export * from './MessageActions';
|
|
20
|
-
export
|
|
21
|
+
export * from './MessageBounce';
|
|
21
22
|
export * from './MessageInput';
|
|
22
23
|
export * from './MessageList';
|
|
23
24
|
export * from './Modal';
|
package/dist/components/index.js
CHANGED
|
@@ -14,9 +14,11 @@ export * from './Gallery';
|
|
|
14
14
|
export * from './InfiniteScrollPaginator';
|
|
15
15
|
export * from './Loading';
|
|
16
16
|
export * from './LoadMore';
|
|
17
|
+
export * from './Location';
|
|
17
18
|
export * from './MediaRecorder';
|
|
18
19
|
export * from './Message';
|
|
19
20
|
export * from './MessageActions';
|
|
21
|
+
export * from './MessageBounce';
|
|
20
22
|
export * from './MessageInput';
|
|
21
23
|
export * from './MessageList';
|
|
22
24
|
export * from './Modal';
|
|
@@ -5,6 +5,7 @@ import type { SuggestionItemProps, SuggestionListProps } from '../components/Tex
|
|
|
5
5
|
import type { SearchProps, SearchResultsPresearchProps, SearchSourceResultListProps } from '../experimental';
|
|
6
6
|
import type { PropsWithChildrenOnly, UnknownType } from '../types/types';
|
|
7
7
|
import type { StopAIGenerationButtonProps } from '../components/MessageInput/StopAIGenerationButton';
|
|
8
|
+
import type { ShareLocationDialogProps } from '../components/Location';
|
|
8
9
|
export type ComponentContextValue = {
|
|
9
10
|
/** Custom UI component to display a message attachment, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Attachment.tsx) */
|
|
10
11
|
Attachment?: React.ComponentType<AttachmentProps>;
|
|
@@ -143,6 +144,8 @@ export type ComponentContextValue = {
|
|
|
143
144
|
SendButton?: React.ComponentType<SendButtonProps>;
|
|
144
145
|
/** Custom UI component checkbox that indicates message to be sent to main channel, defaults to and accepts same props as: [SendToChannelCheckbox](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/SendToChannelCheckbox.tsx) */
|
|
145
146
|
SendToChannelCheckbox?: React.ComponentType;
|
|
147
|
+
/** Custom UI component to render the location sharing dialog, defaults to and accepts same props as: [ShareLocationDialog](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Location/ShareLocationDialog.tsx) */
|
|
148
|
+
ShareLocationDialog?: React.ComponentType<ShareLocationDialogProps>;
|
|
146
149
|
/** Custom UI component button for initiating audio recording, defaults to and accepts same props as: [StartRecordingAudioButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MediaRecorder/AudioRecorder/AudioRecordingButtons.tsx) */
|
|
147
150
|
StartRecordingAudioButton?: React.ComponentType<StartRecordingAudioButtonProps>;
|
|
148
151
|
StopAIGenerationButton?: React.ComponentType<StopAIGenerationButtonProps> | null;
|