stream-chat-react-native-core 9.1.3 → 9.2.0-beta.2
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/lib/commonjs/a11y/a11yUtils.js +40 -0
- package/lib/commonjs/a11y/a11yUtils.js.map +1 -0
- package/lib/commonjs/a11y/hooks/useA11yLabel.js +16 -0
- package/lib/commonjs/a11y/hooks/useA11yLabel.js.map +1 -0
- package/lib/commonjs/a11y/hooks/useAccessibilityActivateAction.js +25 -0
- package/lib/commonjs/a11y/hooks/useAccessibilityActivateAction.js.map +1 -0
- package/lib/commonjs/a11y/hooks/useAnnounceOnStateChange.js +36 -0
- package/lib/commonjs/a11y/hooks/useAnnounceOnStateChange.js.map +1 -0
- package/lib/commonjs/a11y/hooks/useReducedMotionPreference.js +34 -0
- package/lib/commonjs/a11y/hooks/useReducedMotionPreference.js.map +1 -0
- package/lib/commonjs/a11y/hooks/useResolvedModalAccessibilityProps.js +20 -0
- package/lib/commonjs/a11y/hooks/useResolvedModalAccessibilityProps.js.map +1 -0
- package/lib/commonjs/a11y/hooks/useScreenReaderEnabled.js +37 -0
- package/lib/commonjs/a11y/hooks/useScreenReaderEnabled.js.map +1 -0
- package/lib/commonjs/a11y/index.js +81 -0
- package/lib/commonjs/a11y/index.js.map +1 -0
- package/lib/commonjs/components/AITypingIndicatorView/AITypingIndicatorView.js +10 -0
- package/lib/commonjs/components/AITypingIndicatorView/AITypingIndicatorView.js.map +1 -1
- package/lib/commonjs/components/Accessibility/NotificationAnnouncer.js +37 -0
- package/lib/commonjs/components/Accessibility/NotificationAnnouncer.js.map +1 -0
- package/lib/commonjs/components/Accessibility/hooks/useIncomingMessageAnnouncements.js +109 -0
- package/lib/commonjs/components/Accessibility/hooks/useIncomingMessageAnnouncements.js.map +1 -0
- package/lib/commonjs/components/Accessibility/index.js +37 -0
- package/lib/commonjs/components/Accessibility/index.js.map +1 -0
- package/lib/commonjs/components/Accessibility/useAccessibilityAnnouncer.js +15 -0
- package/lib/commonjs/components/Accessibility/useAccessibilityAnnouncer.js.map +1 -0
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +20 -0
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentMediaPicker.js +1 -0
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentMediaPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js +19 -2
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerContent.js +2 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerContent.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentTypePickerButton.js +9 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentTypePickerButton.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +2 -1
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js +4 -0
- package/lib/commonjs/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +2 -2
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingDots.js +2 -0
- package/lib/commonjs/components/Indicators/LoadingDots.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js +3 -0
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +2 -0
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AttachmentPreview/AttachmentRemoveControl.js +16 -4
- package/lib/commonjs/components/MessageInput/components/AttachmentPreview/AttachmentRemoveControl.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecorder.js +3 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecorder.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +5 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/InputButtons/AttachButton.js +12 -3
- package/lib/commonjs/components/MessageInput/components/InputButtons/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/OutputButtons/EditButton.js +1 -0
- package/lib/commonjs/components/MessageInput/components/OutputButtons/EditButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/OutputButtons/SendButton.js +1 -0
- package/lib/commonjs/components/MessageInput/components/OutputButtons/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageFlashList.js +19 -2
- package/lib/commonjs/components/MessageList/MessageFlashList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +32 -8
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +12 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/MessageList/UnreadMessagesNotification.js +1 -0
- package/lib/commonjs/components/MessageList/UnreadMessagesNotification.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useScrollToBottomAccessibilityAction.js +47 -0
- package/lib/commonjs/components/MessageList/hooks/useScrollToBottomAccessibilityAction.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageActionList.js +4 -1
- package/lib/commonjs/components/MessageMenu/MessageActionList.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js +12 -3
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageReactionPicker.js +2 -0
- package/lib/commonjs/components/MessageMenu/MessageReactionPicker.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/ReactionButton.js +9 -1
- package/lib/commonjs/components/MessageMenu/ReactionButton.js.map +1 -1
- package/lib/commonjs/components/Poll/components/CreatePollHeader.js +2 -0
- package/lib/commonjs/components/Poll/components/CreatePollHeader.js.map +1 -1
- package/lib/commonjs/components/Poll/components/MultipleVotesSettings.js +2 -0
- package/lib/commonjs/components/Poll/components/MultipleVotesSettings.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollModalHeader.js +1 -0
- package/lib/commonjs/components/Poll/components/PollModalHeader.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollOption.js +15 -0
- package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
- package/lib/commonjs/components/ProgressControl/ProgressControl.js +10 -0
- package/lib/commonjs/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +3 -0
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js +6 -3
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js.map +1 -1
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/ui/Avatar/Avatar.js +17 -2
- package/lib/commonjs/components/ui/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/ui/Avatar/ChannelAvatar.js +3 -1
- package/lib/commonjs/components/ui/Avatar/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ui/Avatar/UserAvatar.js +1 -0
- package/lib/commonjs/components/ui/Avatar/UserAvatar.js.map +1 -1
- package/lib/commonjs/components/ui/Button/Button.js +64 -21
- package/lib/commonjs/components/ui/Button/Button.js.map +1 -1
- package/lib/commonjs/components/ui/Input/Input.js +63 -21
- package/lib/commonjs/components/ui/Input/Input.js.map +1 -1
- package/lib/commonjs/contexts/accessibilityContext/AccessibilityContext.js +134 -0
- package/lib/commonjs/contexts/accessibilityContext/AccessibilityContext.js.map +1 -0
- package/lib/commonjs/contexts/accessibilityContext/index.js +15 -0
- package/lib/commonjs/contexts/accessibilityContext/index.js.map +1 -0
- package/lib/commonjs/contexts/index.js +11 -0
- package/lib/commonjs/contexts/index.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +19 -14
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/hooks/index.js +11 -0
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/i18n/en.json +57 -1
- package/lib/commonjs/i18n/es.json +57 -1
- package/lib/commonjs/i18n/fr.json +57 -1
- package/lib/commonjs/i18n/he.json +57 -1
- package/lib/commonjs/i18n/hi.json +57 -1
- package/lib/commonjs/i18n/it.json +57 -1
- package/lib/commonjs/i18n/ja.json +57 -1
- package/lib/commonjs/i18n/ko.json +57 -1
- package/lib/commonjs/i18n/nl.json +57 -1
- package/lib/commonjs/i18n/pt-br.json +57 -1
- package/lib/commonjs/i18n/ru.json +57 -1
- package/lib/commonjs/i18n/tr.json +57 -1
- package/lib/commonjs/mock-builders/DB/mock.js +3 -1
- package/lib/commonjs/mock-builders/DB/mock.js.map +1 -1
- package/lib/commonjs/test-utils/BetterSqlite.js +3 -2
- package/lib/commonjs/test-utils/BetterSqlite.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/a11y/a11yUtils.js +40 -0
- package/lib/module/a11y/a11yUtils.js.map +1 -0
- package/lib/module/a11y/hooks/useA11yLabel.js +16 -0
- package/lib/module/a11y/hooks/useA11yLabel.js.map +1 -0
- package/lib/module/a11y/hooks/useAccessibilityActivateAction.js +25 -0
- package/lib/module/a11y/hooks/useAccessibilityActivateAction.js.map +1 -0
- package/lib/module/a11y/hooks/useAnnounceOnStateChange.js +36 -0
- package/lib/module/a11y/hooks/useAnnounceOnStateChange.js.map +1 -0
- package/lib/module/a11y/hooks/useReducedMotionPreference.js +34 -0
- package/lib/module/a11y/hooks/useReducedMotionPreference.js.map +1 -0
- package/lib/module/a11y/hooks/useResolvedModalAccessibilityProps.js +20 -0
- package/lib/module/a11y/hooks/useResolvedModalAccessibilityProps.js.map +1 -0
- package/lib/module/a11y/hooks/useScreenReaderEnabled.js +37 -0
- package/lib/module/a11y/hooks/useScreenReaderEnabled.js.map +1 -0
- package/lib/module/a11y/index.js +81 -0
- package/lib/module/a11y/index.js.map +1 -0
- package/lib/module/components/AITypingIndicatorView/AITypingIndicatorView.js +10 -0
- package/lib/module/components/AITypingIndicatorView/AITypingIndicatorView.js.map +1 -1
- package/lib/module/components/Accessibility/NotificationAnnouncer.js +37 -0
- package/lib/module/components/Accessibility/NotificationAnnouncer.js.map +1 -0
- package/lib/module/components/Accessibility/hooks/useIncomingMessageAnnouncements.js +109 -0
- package/lib/module/components/Accessibility/hooks/useIncomingMessageAnnouncements.js.map +1 -0
- package/lib/module/components/Accessibility/index.js +37 -0
- package/lib/module/components/Accessibility/index.js.map +1 -0
- package/lib/module/components/Accessibility/useAccessibilityAnnouncer.js +15 -0
- package/lib/module/components/Accessibility/useAccessibilityAnnouncer.js.map +1 -0
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +20 -0
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentMediaPicker.js +1 -0
- package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentMediaPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js +19 -2
- package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerContent.js +2 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerContent.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentTypePickerButton.js +9 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentTypePickerButton.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +2 -1
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js +4 -0
- package/lib/module/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +2 -2
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/module/components/Indicators/LoadingDots.js +2 -0
- package/lib/module/components/Indicators/LoadingDots.js.map +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js +3 -0
- package/lib/module/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +2 -0
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/MessageInput/components/AttachmentPreview/AttachmentRemoveControl.js +16 -4
- package/lib/module/components/MessageInput/components/AttachmentPreview/AttachmentRemoveControl.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecorder.js +3 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecorder.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +5 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
- package/lib/module/components/MessageInput/components/InputButtons/AttachButton.js +12 -3
- package/lib/module/components/MessageInput/components/InputButtons/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/components/OutputButtons/EditButton.js +1 -0
- package/lib/module/components/MessageInput/components/OutputButtons/EditButton.js.map +1 -1
- package/lib/module/components/MessageInput/components/OutputButtons/SendButton.js +1 -0
- package/lib/module/components/MessageInput/components/OutputButtons/SendButton.js.map +1 -1
- package/lib/module/components/MessageList/MessageFlashList.js +19 -2
- package/lib/module/components/MessageList/MessageFlashList.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +32 -8
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +12 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/MessageList/UnreadMessagesNotification.js +1 -0
- package/lib/module/components/MessageList/UnreadMessagesNotification.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useScrollToBottomAccessibilityAction.js +47 -0
- package/lib/module/components/MessageList/hooks/useScrollToBottomAccessibilityAction.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageActionList.js +4 -1
- package/lib/module/components/MessageMenu/MessageActionList.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageActionListItem.js +12 -3
- package/lib/module/components/MessageMenu/MessageActionListItem.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageReactionPicker.js +2 -0
- package/lib/module/components/MessageMenu/MessageReactionPicker.js.map +1 -1
- package/lib/module/components/MessageMenu/ReactionButton.js +9 -1
- package/lib/module/components/MessageMenu/ReactionButton.js.map +1 -1
- package/lib/module/components/Poll/components/CreatePollHeader.js +2 -0
- package/lib/module/components/Poll/components/CreatePollHeader.js.map +1 -1
- package/lib/module/components/Poll/components/MultipleVotesSettings.js +2 -0
- package/lib/module/components/Poll/components/MultipleVotesSettings.js.map +1 -1
- package/lib/module/components/Poll/components/PollModalHeader.js +1 -0
- package/lib/module/components/Poll/components/PollModalHeader.js.map +1 -1
- package/lib/module/components/Poll/components/PollOption.js +15 -0
- package/lib/module/components/Poll/components/PollOption.js.map +1 -1
- package/lib/module/components/ProgressControl/ProgressControl.js +10 -0
- package/lib/module/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +3 -0
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/UIComponents/BottomSheetModal.js +6 -3
- package/lib/module/components/UIComponents/BottomSheetModal.js.map +1 -1
- package/lib/module/components/index.js +11 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/ui/Avatar/Avatar.js +17 -2
- package/lib/module/components/ui/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/ui/Avatar/ChannelAvatar.js +3 -1
- package/lib/module/components/ui/Avatar/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ui/Avatar/UserAvatar.js +1 -0
- package/lib/module/components/ui/Avatar/UserAvatar.js.map +1 -1
- package/lib/module/components/ui/Button/Button.js +64 -21
- package/lib/module/components/ui/Button/Button.js.map +1 -1
- package/lib/module/components/ui/Input/Input.js +63 -21
- package/lib/module/components/ui/Input/Input.js.map +1 -1
- package/lib/module/contexts/accessibilityContext/AccessibilityContext.js +134 -0
- package/lib/module/contexts/accessibilityContext/AccessibilityContext.js.map +1 -0
- package/lib/module/contexts/accessibilityContext/index.js +15 -0
- package/lib/module/contexts/accessibilityContext/index.js.map +1 -0
- package/lib/module/contexts/index.js +11 -0
- package/lib/module/contexts/index.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +19 -14
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/hooks/index.js +11 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/i18n/en.json +57 -1
- package/lib/module/i18n/es.json +57 -1
- package/lib/module/i18n/fr.json +57 -1
- package/lib/module/i18n/he.json +57 -1
- package/lib/module/i18n/hi.json +57 -1
- package/lib/module/i18n/it.json +57 -1
- package/lib/module/i18n/ja.json +57 -1
- package/lib/module/i18n/ko.json +57 -1
- package/lib/module/i18n/nl.json +57 -1
- package/lib/module/i18n/pt-br.json +57 -1
- package/lib/module/i18n/ru.json +57 -1
- package/lib/module/i18n/tr.json +57 -1
- package/lib/module/mock-builders/DB/mock.js +3 -1
- package/lib/module/mock-builders/DB/mock.js.map +1 -1
- package/lib/module/test-utils/BetterSqlite.js +3 -2
- package/lib/module/test-utils/BetterSqlite.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/a11y/a11yUtils.d.ts +31 -0
- package/lib/typescript/a11y/a11yUtils.d.ts.map +1 -0
- package/lib/typescript/a11y/hooks/useA11yLabel.d.ts +13 -0
- package/lib/typescript/a11y/hooks/useA11yLabel.d.ts.map +1 -0
- package/lib/typescript/a11y/hooks/useAccessibilityActivateAction.d.ts +17 -0
- package/lib/typescript/a11y/hooks/useAccessibilityActivateAction.d.ts.map +1 -0
- package/lib/typescript/a11y/hooks/useAnnounceOnStateChange.d.ts +14 -0
- package/lib/typescript/a11y/hooks/useAnnounceOnStateChange.d.ts.map +1 -0
- package/lib/typescript/a11y/hooks/useReducedMotionPreference.d.ts +6 -0
- package/lib/typescript/a11y/hooks/useReducedMotionPreference.d.ts.map +1 -0
- package/lib/typescript/a11y/hooks/useResolvedModalAccessibilityProps.d.ts +18 -0
- package/lib/typescript/a11y/hooks/useResolvedModalAccessibilityProps.d.ts.map +1 -0
- package/lib/typescript/a11y/hooks/useScreenReaderEnabled.d.ts +10 -0
- package/lib/typescript/a11y/hooks/useScreenReaderEnabled.d.ts.map +1 -0
- package/lib/typescript/a11y/index.d.ts +8 -0
- package/lib/typescript/a11y/index.d.ts.map +1 -0
- package/lib/typescript/components/AITypingIndicatorView/AITypingIndicatorView.d.ts.map +1 -1
- package/lib/typescript/components/Accessibility/NotificationAnnouncer.d.ts +12 -0
- package/lib/typescript/components/Accessibility/NotificationAnnouncer.d.ts.map +1 -0
- package/lib/typescript/components/Accessibility/hooks/useIncomingMessageAnnouncements.d.ts +20 -0
- package/lib/typescript/components/Accessibility/hooks/useIncomingMessageAnnouncements.d.ts.map +1 -0
- package/lib/typescript/components/Accessibility/index.d.ts +4 -0
- package/lib/typescript/components/Accessibility/index.d.ts.map +1 -0
- package/lib/typescript/components/Accessibility/useAccessibilityAnnouncer.d.ts +15 -0
- package/lib/typescript/components/Accessibility/useAccessibilityAnnouncer.d.ts.map +1 -0
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentMediaPicker.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerContent.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentTypePickerButton.d.ts +2 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentTypePickerButton.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.d.ts.map +1 -1
- package/lib/typescript/components/Indicators/LoadingDots.d.ts.map +1 -1
- package/lib/typescript/components/Indicators/LoadingErrorIndicator.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/AttachmentPreview/AttachmentRemoveControl.d.ts +5 -2
- package/lib/typescript/components/MessageInput/components/AttachmentPreview/AttachmentRemoveControl.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecorder.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/InputButtons/AttachButton.d.ts +1 -0
- package/lib/typescript/components/MessageInput/components/InputButtons/AttachButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/OutputButtons/EditButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/OutputButtons/SendButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/MessageFlashList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/ScrollToBottomButton.d.ts +2 -0
- package/lib/typescript/components/MessageList/ScrollToBottomButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/UnreadMessagesNotification.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/hooks/useScrollToBottomAccessibilityAction.d.ts +20 -0
- package/lib/typescript/components/MessageList/hooks/useScrollToBottomAccessibilityAction.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageActionList.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageActionListItem.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageReactionPicker.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/ReactionButton.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/CreatePollHeader.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/MultipleVotesSettings.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollModalHeader.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
- package/lib/typescript/components/ProgressControl/ProgressControl.d.ts.map +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/ui/Avatar/Avatar.d.ts +12 -1
- package/lib/typescript/components/ui/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/components/ui/Avatar/ChannelAvatar.d.ts.map +1 -1
- package/lib/typescript/components/ui/Avatar/UserAvatar.d.ts.map +1 -1
- package/lib/typescript/components/ui/Button/Button.d.ts +10 -1
- package/lib/typescript/components/ui/Button/Button.d.ts.map +1 -1
- package/lib/typescript/components/ui/Input/Input.d.ts.map +1 -1
- package/lib/typescript/contexts/accessibilityContext/AccessibilityContext.d.ts +34 -0
- package/lib/typescript/contexts/accessibilityContext/AccessibilityContext.d.ts.map +1 -0
- package/lib/typescript/contexts/accessibilityContext/index.d.ts +2 -0
- package/lib/typescript/contexts/accessibilityContext/index.d.ts.map +1 -0
- package/lib/typescript/contexts/index.d.ts +1 -0
- package/lib/typescript/contexts/index.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +7 -0
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts.map +1 -1
- package/lib/typescript/hooks/index.d.ts +1 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -1
- package/lib/typescript/hooks/useTranslatedMessage.d.ts +2 -2
- package/lib/typescript/i18n/en.json +57 -1
- package/lib/typescript/i18n/es.json +57 -1
- package/lib/typescript/i18n/fr.json +57 -1
- package/lib/typescript/i18n/he.json +57 -1
- package/lib/typescript/i18n/hi.json +57 -1
- package/lib/typescript/i18n/it.json +57 -1
- package/lib/typescript/i18n/ja.json +57 -1
- package/lib/typescript/i18n/ko.json +57 -1
- package/lib/typescript/i18n/nl.json +57 -1
- package/lib/typescript/i18n/pt-br.json +57 -1
- package/lib/typescript/i18n/ru.json +57 -1
- package/lib/typescript/i18n/tr.json +57 -1
- package/lib/typescript/test-utils/BetterSqlite.d.ts.map +1 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +56 -0
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/offline-support/offline-feature.tsx +40 -34
- package/src/a11y/__tests__/a11yUtils.test.ts +70 -0
- package/src/a11y/a11yUtils.ts +50 -0
- package/src/a11y/hooks/useA11yLabel.ts +22 -0
- package/src/a11y/hooks/useAccessibilityActivateAction.ts +44 -0
- package/src/a11y/hooks/useAnnounceOnStateChange.ts +47 -0
- package/src/a11y/hooks/useReducedMotionPreference.ts +38 -0
- package/src/a11y/hooks/useResolvedModalAccessibilityProps.ts +30 -0
- package/src/a11y/hooks/useScreenReaderEnabled.ts +44 -0
- package/src/a11y/index.ts +7 -0
- package/src/components/AITypingIndicatorView/AITypingIndicatorView.tsx +17 -2
- package/src/components/AITypingIndicatorView/__tests__/AITypingIndicatorView.test.tsx +73 -0
- package/src/components/Accessibility/NotificationAnnouncer.tsx +43 -0
- package/src/components/Accessibility/__tests__/AccessibilityAnnouncer.test.tsx +75 -0
- package/src/components/Accessibility/hooks/useIncomingMessageAnnouncements.ts +157 -0
- package/src/components/Accessibility/index.ts +3 -0
- package/src/components/Accessibility/useAccessibilityAnnouncer.ts +30 -0
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +23 -1
- package/src/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentMediaPicker.tsx +1 -0
- package/src/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.tsx +15 -2
- package/src/components/AttachmentPicker/components/AttachmentPickerContent.tsx +1 -0
- package/src/components/AttachmentPicker/components/AttachmentTypePickerButton.tsx +9 -0
- package/src/components/Channel/Channel.tsx +3 -0
- package/src/components/ChannelList/__tests__/ChannelListView.test.tsx +16 -5
- package/src/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.tsx +14 -1
- package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +9 -3
- package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx +4 -1
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +2 -2
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +1 -1
- package/src/components/ImageGallery/components/ImageGalleryVideoControl.tsx +1 -1
- package/src/components/Indicators/LoadingDots.tsx +5 -1
- package/src/components/Indicators/LoadingErrorIndicator.tsx +7 -1
- package/src/components/Indicators/LoadingIndicator.tsx +1 -1
- package/src/components/Message/MessageItemView/__tests__/__snapshots__/MessageAuthor.test.tsx.snap +2 -0
- package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.tsx.snap +30 -15
- package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.tsx.snap +20 -10
- package/src/components/MessageInput/components/AttachmentPreview/AttachmentRemoveControl.tsx +18 -2
- package/src/components/MessageInput/components/AudioRecorder/AudioRecorder.tsx +3 -0
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingButton.tsx +8 -1
- package/src/components/MessageInput/components/InputButtons/AttachButton.tsx +13 -3
- package/src/components/MessageInput/components/OutputButtons/EditButton.tsx +1 -0
- package/src/components/MessageInput/components/OutputButtons/SendButton.tsx +1 -0
- package/src/components/MessageList/MessageFlashList.tsx +23 -2
- package/src/components/MessageList/MessageList.tsx +32 -2
- package/src/components/MessageList/ScrollToBottomButton.tsx +19 -1
- package/src/components/MessageList/UnreadMessagesNotification.tsx +1 -0
- package/src/components/MessageList/__tests__/MessageList.test.tsx +186 -0
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.tsx +2 -2
- package/src/components/MessageList/__tests__/__snapshots__/ScrollToBottomButton.test.tsx.snap +4 -1
- package/src/components/MessageList/__tests__/__snapshots__/TypingIndicator.test.tsx.snap +6 -0
- package/src/components/MessageList/hooks/useScrollToBottomAccessibilityAction.ts +74 -0
- package/src/components/MessageMenu/MessageActionList.tsx +4 -1
- package/src/components/MessageMenu/MessageActionListItem.tsx +11 -4
- package/src/components/MessageMenu/MessageReactionPicker.tsx +2 -0
- package/src/components/MessageMenu/ReactionButton.tsx +7 -1
- package/src/components/MessageMenu/__tests__/MessageReactionPicker.test.tsx +13 -15
- package/src/components/MessageMenu/__tests__/MessageUserReactions.test.tsx +20 -18
- package/src/components/MessageMenu/__tests__/ReactionButton.test.tsx +18 -5
- package/src/components/Poll/components/CreatePollHeader.tsx +2 -0
- package/src/components/Poll/components/MultipleVotesSettings.tsx +2 -0
- package/src/components/Poll/components/PollModalHeader.tsx +1 -0
- package/src/components/Poll/components/PollOption.tsx +11 -0
- package/src/components/ProgressControl/ProgressControl.tsx +8 -0
- package/src/components/Reply/Reply.tsx +9 -2
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.tsx.snap +23 -6
- package/src/components/UIComponents/BottomSheetModal.tsx +4 -0
- package/src/components/index.ts +2 -0
- package/src/components/ui/Avatar/Avatar.tsx +24 -2
- package/src/components/ui/Avatar/ChannelAvatar.tsx +3 -0
- package/src/components/ui/Avatar/UserAvatar.tsx +1 -0
- package/src/components/ui/Button/Button.tsx +50 -0
- package/src/components/ui/Button/__tests__/Button.test.tsx +44 -0
- package/src/components/ui/Input/Input.tsx +35 -0
- package/src/contexts/accessibilityContext/AccessibilityContext.tsx +199 -0
- package/src/contexts/accessibilityContext/__tests__/AccessibilityContext.test.tsx +65 -0
- package/src/contexts/accessibilityContext/index.ts +1 -0
- package/src/contexts/index.ts +1 -0
- package/src/contexts/overlayContext/OverlayContext.tsx +7 -0
- package/src/contexts/overlayContext/OverlayProvider.tsx +18 -14
- package/src/contexts/overlayContext/__tests__/OverlayProvider.test.tsx +51 -0
- package/src/hooks/index.ts +1 -0
- package/src/i18n/en.json +57 -1
- package/src/i18n/es.json +57 -1
- package/src/i18n/fr.json +57 -1
- package/src/i18n/he.json +57 -1
- package/src/i18n/hi.json +57 -1
- package/src/i18n/it.json +57 -1
- package/src/i18n/ja.json +57 -1
- package/src/i18n/ko.json +57 -1
- package/src/i18n/nl.json +57 -1
- package/src/i18n/pt-br.json +57 -1
- package/src/i18n/ru.json +57 -1
- package/src/i18n/tr.json +57 -1
- package/src/mock-builders/DB/mock.ts +2 -1
- package/src/test-utils/BetterSqlite.ts +3 -1
- package/src/version.json +1 -1
package/src/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import { FileReference, isLocalImageAttachment, isLocalVideoAttachment } from 's
|
|
|
6
6
|
|
|
7
7
|
import { isIosLimited, type PhotoContentItemType } from './shared';
|
|
8
8
|
|
|
9
|
+
import { useA11yLabel } from '../../../../a11y/hooks/useA11yLabel';
|
|
9
10
|
import { useAttachmentPickerContext } from '../../../../contexts';
|
|
10
11
|
import { useComponentsContext } from '../../../../contexts/componentsContext/ComponentsContext';
|
|
11
12
|
import { useAttachmentManagerState } from '../../../../contexts/messageInputContext/hooks/useAttachmentManagerState';
|
|
@@ -52,9 +53,11 @@ const AttachmentVideo = (props: AttachmentPickerItemType) => {
|
|
|
52
53
|
const { duration: videoDuration, thumb_url } = asset;
|
|
53
54
|
|
|
54
55
|
const size = vw(100) / (numberOfAttachmentPickerImageColumns || 3) - 2;
|
|
56
|
+
const selected = selectedIndex !== -1;
|
|
57
|
+
const accessibilityLabel = useA11yLabel(selected ? 'a11y/Deselect video' : 'a11y/Select video');
|
|
55
58
|
|
|
56
59
|
const onPressVideo = async () => {
|
|
57
|
-
if (
|
|
60
|
+
if (selected) {
|
|
58
61
|
const attachment = attachments[selectedIndex];
|
|
59
62
|
if (attachment) {
|
|
60
63
|
attachmentManager.removeAttachments([attachment.localMetadata.id]);
|
|
@@ -70,6 +73,10 @@ const AttachmentVideo = (props: AttachmentPickerItemType) => {
|
|
|
70
73
|
|
|
71
74
|
return (
|
|
72
75
|
<BottomSheetTouchableOpacity
|
|
76
|
+
accessible={accessibilityLabel ? true : undefined}
|
|
77
|
+
accessibilityLabel={accessibilityLabel}
|
|
78
|
+
accessibilityRole={accessibilityLabel ? 'button' : undefined}
|
|
79
|
+
accessibilityState={accessibilityLabel ? { selected } : undefined}
|
|
73
80
|
onPress={onPressVideo}
|
|
74
81
|
style={[
|
|
75
82
|
{
|
|
@@ -110,11 +117,13 @@ const AttachmentImage = (props: AttachmentPickerItemType) => {
|
|
|
110
117
|
);
|
|
111
118
|
|
|
112
119
|
const size = vw(100) / (numberOfAttachmentPickerImageColumns || 3) - 2;
|
|
120
|
+
const selected = selectedIndex !== -1;
|
|
121
|
+
const accessibilityLabel = useA11yLabel(selected ? 'a11y/Deselect image' : 'a11y/Select image');
|
|
113
122
|
|
|
114
123
|
const { uri } = asset;
|
|
115
124
|
|
|
116
125
|
const onPressImage = async () => {
|
|
117
|
-
if (
|
|
126
|
+
if (selected) {
|
|
118
127
|
const attachment = attachments[selectedIndex];
|
|
119
128
|
if (attachment) {
|
|
120
129
|
await attachmentManager.removeAttachments([attachment.localMetadata.id]);
|
|
@@ -130,6 +139,10 @@ const AttachmentImage = (props: AttachmentPickerItemType) => {
|
|
|
130
139
|
|
|
131
140
|
return (
|
|
132
141
|
<BottomSheetTouchableOpacity
|
|
142
|
+
accessible={accessibilityLabel ? true : undefined}
|
|
143
|
+
accessibilityLabel={accessibilityLabel}
|
|
144
|
+
accessibilityRole={accessibilityLabel ? 'button' : undefined}
|
|
145
|
+
accessibilityState={accessibilityLabel ? { selected } : undefined}
|
|
133
146
|
onPress={onPressImage}
|
|
134
147
|
style={[
|
|
135
148
|
{
|
|
@@ -28,12 +28,14 @@ import { Button, ButtonProps } from '../../ui';
|
|
|
28
28
|
import { BottomSheetModal } from '../../UIComponents';
|
|
29
29
|
|
|
30
30
|
export type AttachmentTypePickerButtonProps = Pick<ButtonProps, 'selected' | 'onPress'> & {
|
|
31
|
+
accessibilityLabelKey?: string;
|
|
31
32
|
Icon: ButtonProps['LeadingIcon'];
|
|
32
33
|
} & Pick<PressableProps, 'testID'>;
|
|
33
34
|
|
|
34
35
|
const hitSlop = { bottom: 15, top: 15 };
|
|
35
36
|
|
|
36
37
|
export const AttachmentTypePickerButton = ({
|
|
38
|
+
accessibilityLabelKey,
|
|
37
39
|
testID,
|
|
38
40
|
selected,
|
|
39
41
|
onPress: onPressProp,
|
|
@@ -52,6 +54,7 @@ export const AttachmentTypePickerButton = ({
|
|
|
52
54
|
|
|
53
55
|
return (
|
|
54
56
|
<Button
|
|
57
|
+
accessibilityLabelKey={accessibilityLabelKey}
|
|
55
58
|
testID={testID}
|
|
56
59
|
hitSlop={hitSlop}
|
|
57
60
|
onPress={onPress}
|
|
@@ -80,6 +83,7 @@ export const MediaPickerButton = () => {
|
|
|
80
83
|
|
|
81
84
|
return hasImagePicker ? (
|
|
82
85
|
<AttachmentTypePickerButton
|
|
86
|
+
accessibilityLabelKey='a11y/Open photo picker'
|
|
83
87
|
testID='upload-photo-touchable'
|
|
84
88
|
Icon={Picture}
|
|
85
89
|
selected={selectedPicker === 'images'}
|
|
@@ -113,6 +117,7 @@ export const CameraPickerButton = () => {
|
|
|
113
117
|
return hasCameraPicker ? (
|
|
114
118
|
<>
|
|
115
119
|
<AttachmentTypePickerButton
|
|
120
|
+
accessibilityLabelKey='a11y/Open camera'
|
|
116
121
|
testID='take-photo-touchable'
|
|
117
122
|
Icon={Camera}
|
|
118
123
|
selected={selectedPicker === 'camera-photo'}
|
|
@@ -120,6 +125,7 @@ export const CameraPickerButton = () => {
|
|
|
120
125
|
/>
|
|
121
126
|
{Platform.OS === 'android' ? (
|
|
122
127
|
<AttachmentTypePickerButton
|
|
128
|
+
accessibilityLabelKey='a11y/Open video recorder'
|
|
123
129
|
Icon={VideoIcon}
|
|
124
130
|
selected={selectedPicker === 'camera-video'}
|
|
125
131
|
onPress={onVideoRecorderPickerPress}
|
|
@@ -144,6 +150,7 @@ export const FilePickerButton = () => {
|
|
|
144
150
|
|
|
145
151
|
return hasFilePicker ? (
|
|
146
152
|
<AttachmentTypePickerButton
|
|
153
|
+
accessibilityLabelKey='a11y/Open file picker'
|
|
147
154
|
testID='upload-file-touchable'
|
|
148
155
|
Icon={FilePickerIcon}
|
|
149
156
|
selected={selectedPicker === 'files'}
|
|
@@ -171,6 +178,7 @@ export const PollPickerButton = () => {
|
|
|
171
178
|
|
|
172
179
|
return !threadList && hasCreatePoll && ownCapabilities.sendPoll ? ( // do not allow poll creation in threads
|
|
173
180
|
<AttachmentTypePickerButton
|
|
181
|
+
accessibilityLabelKey='a11y/Open poll creation'
|
|
174
182
|
testID='create-poll-touchable'
|
|
175
183
|
Icon={PollThumbnail}
|
|
176
184
|
selected={selectedPicker === 'polls'}
|
|
@@ -198,6 +206,7 @@ export const CommandsPickerButton = () => {
|
|
|
198
206
|
return hasCommands ? (
|
|
199
207
|
<>
|
|
200
208
|
<AttachmentTypePickerButton
|
|
209
|
+
accessibilityLabelKey='a11y/Open commands'
|
|
201
210
|
testID='commands-touchable'
|
|
202
211
|
Icon={CommandsIcon}
|
|
203
212
|
selected={selectedPicker === 'commands'}
|
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
AudioPlayerContextProps,
|
|
50
50
|
AudioPlayerProvider,
|
|
51
51
|
} from '../../contexts/audioPlayerContext/AudioPlayerContext';
|
|
52
|
+
|
|
52
53
|
import { ChannelContextValue, ChannelProvider } from '../../contexts/channelContext/ChannelContext';
|
|
53
54
|
import type { UseChannelStateValue } from '../../contexts/channelsStateContext/useChannelState';
|
|
54
55
|
import { useChannelState } from '../../contexts/channelsStateContext/useChannelState';
|
|
@@ -111,6 +112,7 @@ import {
|
|
|
111
112
|
MessageStatusTypes,
|
|
112
113
|
ReactionData,
|
|
113
114
|
} from '../../utils/utils';
|
|
115
|
+
import { NotificationAnnouncer } from '../Accessibility/NotificationAnnouncer';
|
|
114
116
|
import { AttachmentPicker } from '../AttachmentPicker/AttachmentPicker';
|
|
115
117
|
import type { KeyboardCompatibleViewProps } from '../KeyboardCompatibleView/KeyboardControllerAvoidingView';
|
|
116
118
|
import { Emoji } from '../MessageMenu/EmojiPickerList';
|
|
@@ -1754,6 +1756,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
|
|
|
1754
1756
|
<MessageComposerProvider value={messageComposerContext}>
|
|
1755
1757
|
<MessageInputProvider value={inputMessageInputContext}>
|
|
1756
1758
|
<AudioPlayerProvider value={audioPlayerContext}>
|
|
1759
|
+
<NotificationAnnouncer />
|
|
1757
1760
|
<View style={{ height: '100%' }}>{children}</View>
|
|
1758
1761
|
<AttachmentPicker />
|
|
1759
1762
|
</AudioPlayerProvider>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { cleanup, render, waitFor } from '@testing-library/react-native';
|
|
4
|
-
import type { StreamChat } from 'stream-chat';
|
|
4
|
+
import type { Channel, QueryChannelsRequestType, StreamChat } from 'stream-chat';
|
|
5
5
|
|
|
6
6
|
import type { ChannelsContextValue } from '../../../contexts/channelsContext/ChannelsContext';
|
|
7
7
|
import { ChannelsProvider } from '../../../contexts/channelsContext/ChannelsContext';
|
|
8
8
|
import { ChatContext, ChatProvider } from '../../../contexts/chatContext/ChatContext';
|
|
9
9
|
import { getOrCreateChannelApi } from '../../../mock-builders/api/getOrCreateChannel';
|
|
10
|
-
import { queryChannelsApi } from '../../../mock-builders/api/queryChannels';
|
|
11
10
|
import { useMockedApis } from '../../../mock-builders/api/useMockedApis';
|
|
12
11
|
import { generateChannelResponse } from '../../../mock-builders/generator/channel';
|
|
13
12
|
import { getTestClientWithUser } from '../../../mock-builders/mock';
|
|
@@ -16,6 +15,11 @@ import { ChannelList } from '../ChannelList';
|
|
|
16
15
|
import { ChannelListView } from '../ChannelListView';
|
|
17
16
|
|
|
18
17
|
let chatClient: StreamChat;
|
|
18
|
+
let defaultChannels: Channel[];
|
|
19
|
+
let queryChannelsResponse: Channel[];
|
|
20
|
+
|
|
21
|
+
const queryChannelsOverride: QueryChannelsRequestType = () =>
|
|
22
|
+
Promise.resolve(queryChannelsResponse);
|
|
19
23
|
|
|
20
24
|
/**
|
|
21
25
|
* Renders the full ChannelList (which now always uses ChannelListView internally).
|
|
@@ -31,6 +35,7 @@ const Component = () => (
|
|
|
31
35
|
$in: ['vishal', 'neil'],
|
|
32
36
|
},
|
|
33
37
|
}}
|
|
38
|
+
queryChannelsOverride={queryChannelsOverride}
|
|
34
39
|
/>
|
|
35
40
|
</ChatProvider>
|
|
36
41
|
)}
|
|
@@ -90,13 +95,19 @@ describe('ChannelListView', () => {
|
|
|
90
95
|
chatClient = await getTestClientWithUser({ id: 'vishal' });
|
|
91
96
|
const c1 = generateChannelResponse();
|
|
92
97
|
const c2 = generateChannelResponse();
|
|
93
|
-
useMockedApis(chatClient, [getOrCreateChannelApi(c1)
|
|
98
|
+
useMockedApis(chatClient, [getOrCreateChannelApi(c1)]);
|
|
94
99
|
const channel1 = chatClient.channel(c1.channel.type, c1.channel.id);
|
|
95
100
|
await channel1.watch();
|
|
101
|
+
useMockedApis(chatClient, [getOrCreateChannelApi(c2)]);
|
|
96
102
|
const channel2 = chatClient.channel(c2.channel.type, c2.channel.id);
|
|
97
103
|
await channel2.watch();
|
|
98
|
-
|
|
104
|
+
defaultChannels = [channel1, channel2];
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
beforeEach(() => {
|
|
108
|
+
queryChannelsResponse = defaultChannels;
|
|
99
109
|
});
|
|
110
|
+
|
|
100
111
|
afterEach(cleanup);
|
|
101
112
|
|
|
102
113
|
it('renders without crashing', async () => {
|
|
@@ -107,7 +118,7 @@ describe('ChannelListView', () => {
|
|
|
107
118
|
});
|
|
108
119
|
|
|
109
120
|
it('renders the `EmptyStateIndicator` when no channels are present', async () => {
|
|
110
|
-
|
|
121
|
+
queryChannelsResponse = [];
|
|
111
122
|
const { getByTestId } = render(<Component />);
|
|
112
123
|
await waitFor(() => {
|
|
113
124
|
expect(getByTestId('empty-channel-state-title')).toBeTruthy();
|
|
@@ -5,6 +5,7 @@ import { LocalMessage, MessageResponse } from 'stream-chat';
|
|
|
5
5
|
|
|
6
6
|
import { ChannelPreviewProps } from './ChannelPreview';
|
|
7
7
|
|
|
8
|
+
import { useA11yLabel } from '../../a11y/hooks/useA11yLabel';
|
|
8
9
|
import { useChatContext } from '../../contexts/chatContext/ChatContext';
|
|
9
10
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
10
11
|
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
@@ -61,6 +62,18 @@ export const ChannelMessagePreviewDeliveryStatus = ({
|
|
|
61
62
|
isReadEventsEnabled: readEvents,
|
|
62
63
|
});
|
|
63
64
|
|
|
65
|
+
const statusLabel = useA11yLabel(
|
|
66
|
+
message.status === MessageStatusTypes.SENDING
|
|
67
|
+
? 'a11y/Sending'
|
|
68
|
+
: message.status === MessageStatusTypes.RECEIVED && status === MessageDeliveryStatus.READ
|
|
69
|
+
? 'a11y/Read'
|
|
70
|
+
: status === MessageDeliveryStatus.DELIVERED
|
|
71
|
+
? 'a11y/Delivered'
|
|
72
|
+
: status === MessageDeliveryStatus.SENT
|
|
73
|
+
? 'a11y/Sent'
|
|
74
|
+
: 'a11y/Sending',
|
|
75
|
+
);
|
|
76
|
+
|
|
64
77
|
if (!channel.data?.name && membersWithoutSelf.length === 1 && !isLastMessageByCurrentUser) {
|
|
65
78
|
return null;
|
|
66
79
|
}
|
|
@@ -70,7 +83,7 @@ export const ChannelMessagePreviewDeliveryStatus = ({
|
|
|
70
83
|
}
|
|
71
84
|
|
|
72
85
|
return (
|
|
73
|
-
<View style={styles.container}>
|
|
86
|
+
<View accessibilityLabel={statusLabel} accessibilityRole='text' style={styles.container}>
|
|
74
87
|
{message.status === MessageStatusTypes.SENDING ? (
|
|
75
88
|
<Time stroke={semantics.chatTextTimestamp} height={16} width={16} {...timeIcon} />
|
|
76
89
|
) : message.status === MessageStatusTypes.RECEIVED &&
|
|
@@ -59,7 +59,10 @@ const ImageGalleryComponentVideo = (props: ImageGalleryProps) => {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
|
-
<OverlayProvider
|
|
62
|
+
<OverlayProvider
|
|
63
|
+
accessibility={{ enabled: true }}
|
|
64
|
+
value={{ overlayOpacity: { value: 1 } as SharedValue<number> }}
|
|
65
|
+
>
|
|
63
66
|
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
|
|
64
67
|
<WithComponents overrides={{ ImageGalleryHeader: undefined as any }}>
|
|
65
68
|
<ImageGalleryContext.Provider
|
|
@@ -101,7 +104,10 @@ const ImageGalleryComponentImage = (
|
|
|
101
104
|
});
|
|
102
105
|
|
|
103
106
|
return (
|
|
104
|
-
<OverlayProvider
|
|
107
|
+
<OverlayProvider
|
|
108
|
+
accessibility={{ enabled: true }}
|
|
109
|
+
value={{ overlayOpacity: { value: 1 } as SharedValue<number> }}
|
|
110
|
+
>
|
|
105
111
|
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
|
|
106
112
|
<WithComponents overrides={{ ImageGalleryHeader: undefined as any }}>
|
|
107
113
|
<ImageGalleryContext.Provider
|
|
@@ -129,7 +135,7 @@ describe('ImageGalleryFooter', () => {
|
|
|
129
135
|
});
|
|
130
136
|
});
|
|
131
137
|
|
|
132
|
-
it('render image gallery footer component with
|
|
138
|
+
it('render image gallery footer component with share and grid buttons', async () => {
|
|
133
139
|
render(<ImageGalleryComponentVideo />);
|
|
134
140
|
|
|
135
141
|
await waitFor(() => {
|
|
@@ -47,7 +47,10 @@ const ImageGalleryComponent = (props: ImageGalleryProps) => {
|
|
|
47
47
|
}, [imageGalleryStateStore]);
|
|
48
48
|
|
|
49
49
|
return (
|
|
50
|
-
<OverlayProvider
|
|
50
|
+
<OverlayProvider
|
|
51
|
+
accessibility={{ enabled: true }}
|
|
52
|
+
value={{ overlayOpacity: { value: 1 } as SharedValue<number> }}
|
|
53
|
+
>
|
|
51
54
|
<ImageGalleryContext.Provider
|
|
52
55
|
value={
|
|
53
56
|
{
|
|
@@ -134,7 +134,7 @@ export const ImageGalleryFooterWithContext = (props: ImageGalleryFooterProps) =>
|
|
|
134
134
|
</Text>
|
|
135
135
|
</View>
|
|
136
136
|
<Button
|
|
137
|
-
|
|
137
|
+
accessibilityLabelKey='a11y/Grid Icon'
|
|
138
138
|
variant='secondary'
|
|
139
139
|
type='ghost'
|
|
140
140
|
size='md'
|
|
@@ -166,7 +166,7 @@ const ShareButton = ({ share, savingInProgress }: ShareButtonProps) => {
|
|
|
166
166
|
</View>
|
|
167
167
|
) : (
|
|
168
168
|
<Button
|
|
169
|
-
|
|
169
|
+
accessibilityLabelKey='a11y/Share Button'
|
|
170
170
|
variant='secondary'
|
|
171
171
|
type='ghost'
|
|
172
172
|
size='md'
|
|
@@ -74,7 +74,7 @@ export const ImageGalleryHeader = (props: ImageGalleryHeaderProps) => {
|
|
|
74
74
|
<ReanimatedSafeAreaView edges={['top']} style={[styles.container, headerStyle]}>
|
|
75
75
|
<View style={styles.innerContainer}>
|
|
76
76
|
<Button
|
|
77
|
-
|
|
77
|
+
accessibilityLabelKey='a11y/Hide Overlay'
|
|
78
78
|
variant='secondary'
|
|
79
79
|
type='ghost'
|
|
80
80
|
size='md'
|
|
@@ -74,7 +74,7 @@ export const ImageGalleryVideoControl = React.memo((props: ImageGalleryVideoCont
|
|
|
74
74
|
<View style={[styles.container, container]}>
|
|
75
75
|
<View style={styles.leftContainer}>
|
|
76
76
|
<Button
|
|
77
|
-
|
|
77
|
+
accessibilityLabelKey='a11y/Play Pause Button'
|
|
78
78
|
variant='secondary'
|
|
79
79
|
type='ghost'
|
|
80
80
|
size='md'
|
|
@@ -31,7 +31,11 @@ export const LoadingDots = (props: Props) => {
|
|
|
31
31
|
const offsetLength = duration / numberOfDots;
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
|
-
<View
|
|
34
|
+
<View
|
|
35
|
+
accessibilityElementsHidden
|
|
36
|
+
importantForAccessibility='no-hide-descendants'
|
|
37
|
+
style={[{ flexDirection: 'row' }, container, style]}
|
|
38
|
+
>
|
|
35
39
|
{Array.from(Array(numberOfDots)).map((_item, index) => (
|
|
36
40
|
<LoadingDot
|
|
37
41
|
diameter={diameter}
|
|
@@ -16,7 +16,13 @@ const LoadingErrorWrapper = (props: React.PropsWithChildren<LoadingErrorWrapperP
|
|
|
16
16
|
const styles = useStyles();
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<TouchableOpacity
|
|
19
|
+
<TouchableOpacity
|
|
20
|
+
accessibilityHint={onPress ? 'Tap to retry' : undefined}
|
|
21
|
+
accessibilityLiveRegion='assertive'
|
|
22
|
+
accessibilityRole={onPress ? 'button' : 'alert'}
|
|
23
|
+
onPress={onPress}
|
|
24
|
+
style={styles.container}
|
|
25
|
+
>
|
|
20
26
|
<Text style={styles.errorText} testID='loading-error'>
|
|
21
27
|
{text}
|
|
22
28
|
</Text>
|
|
@@ -12,7 +12,7 @@ const LoadingIndicatorWrapper = ({ text }: LoadingIndicatorWrapperProps) => {
|
|
|
12
12
|
const styles = useStyles();
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<View style={styles.container}>
|
|
15
|
+
<View accessibilityLiveRegion='polite' accessibilityRole='progressbar' style={styles.container}>
|
|
16
16
|
<Spinner height={20} width={20} />
|
|
17
17
|
{text ? (
|
|
18
18
|
<Text style={styles.loadingText} testID='loading'>
|
|
@@ -36,13 +36,14 @@ exports[`AttachButton should call handleAttachButtonPress when the button is cli
|
|
|
36
36
|
}
|
|
37
37
|
>
|
|
38
38
|
<View
|
|
39
|
+
accessibilityRole="button"
|
|
39
40
|
accessibilityState={
|
|
40
41
|
{
|
|
41
42
|
"busy": undefined,
|
|
42
43
|
"checked": undefined,
|
|
43
44
|
"disabled": false,
|
|
44
45
|
"expanded": undefined,
|
|
45
|
-
"selected":
|
|
46
|
+
"selected": false,
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
accessibilityValue={
|
|
@@ -196,13 +197,14 @@ exports[`AttachButton should call handleAttachButtonPress when the button is cli
|
|
|
196
197
|
}
|
|
197
198
|
>
|
|
198
199
|
<View
|
|
200
|
+
accessibilityRole="button"
|
|
199
201
|
accessibilityState={
|
|
200
202
|
{
|
|
201
203
|
"busy": undefined,
|
|
202
204
|
"checked": undefined,
|
|
203
205
|
"disabled": false,
|
|
204
206
|
"expanded": undefined,
|
|
205
|
-
"selected":
|
|
207
|
+
"selected": false,
|
|
206
208
|
}
|
|
207
209
|
}
|
|
208
210
|
accessibilityValue={
|
|
@@ -335,13 +337,14 @@ exports[`AttachButton should call handleAttachButtonPress when the button is cli
|
|
|
335
337
|
}
|
|
336
338
|
>
|
|
337
339
|
<View
|
|
340
|
+
accessibilityRole="button"
|
|
338
341
|
accessibilityState={
|
|
339
342
|
{
|
|
340
343
|
"busy": undefined,
|
|
341
344
|
"checked": undefined,
|
|
342
345
|
"disabled": false,
|
|
343
346
|
"expanded": undefined,
|
|
344
|
-
"selected":
|
|
347
|
+
"selected": false,
|
|
345
348
|
}
|
|
346
349
|
}
|
|
347
350
|
accessibilityValue={
|
|
@@ -503,13 +506,14 @@ exports[`AttachButton should call handleAttachButtonPress when the button is cli
|
|
|
503
506
|
}
|
|
504
507
|
>
|
|
505
508
|
<View
|
|
509
|
+
accessibilityRole="button"
|
|
506
510
|
accessibilityState={
|
|
507
511
|
{
|
|
508
512
|
"busy": undefined,
|
|
509
513
|
"checked": undefined,
|
|
510
514
|
"disabled": false,
|
|
511
515
|
"expanded": undefined,
|
|
512
|
-
"selected":
|
|
516
|
+
"selected": false,
|
|
513
517
|
}
|
|
514
518
|
}
|
|
515
519
|
accessibilityValue={
|
|
@@ -638,13 +642,14 @@ exports[`AttachButton should call handleAttachButtonPress when the button is cli
|
|
|
638
642
|
}
|
|
639
643
|
>
|
|
640
644
|
<View
|
|
645
|
+
accessibilityRole="button"
|
|
641
646
|
accessibilityState={
|
|
642
647
|
{
|
|
643
648
|
"busy": undefined,
|
|
644
649
|
"checked": undefined,
|
|
645
650
|
"disabled": false,
|
|
646
651
|
"expanded": undefined,
|
|
647
|
-
"selected":
|
|
652
|
+
"selected": false,
|
|
648
653
|
}
|
|
649
654
|
}
|
|
650
655
|
accessibilityValue={
|
|
@@ -905,13 +910,14 @@ exports[`AttachButton should render a enabled AttachButton 1`] = `
|
|
|
905
910
|
}
|
|
906
911
|
>
|
|
907
912
|
<View
|
|
913
|
+
accessibilityRole="button"
|
|
908
914
|
accessibilityState={
|
|
909
915
|
{
|
|
910
916
|
"busy": undefined,
|
|
911
917
|
"checked": undefined,
|
|
912
918
|
"disabled": false,
|
|
913
919
|
"expanded": undefined,
|
|
914
|
-
"selected":
|
|
920
|
+
"selected": false,
|
|
915
921
|
}
|
|
916
922
|
}
|
|
917
923
|
accessibilityValue={
|
|
@@ -1065,13 +1071,14 @@ exports[`AttachButton should render a enabled AttachButton 1`] = `
|
|
|
1065
1071
|
}
|
|
1066
1072
|
>
|
|
1067
1073
|
<View
|
|
1074
|
+
accessibilityRole="button"
|
|
1068
1075
|
accessibilityState={
|
|
1069
1076
|
{
|
|
1070
1077
|
"busy": undefined,
|
|
1071
1078
|
"checked": undefined,
|
|
1072
1079
|
"disabled": false,
|
|
1073
1080
|
"expanded": undefined,
|
|
1074
|
-
"selected":
|
|
1081
|
+
"selected": false,
|
|
1075
1082
|
}
|
|
1076
1083
|
}
|
|
1077
1084
|
accessibilityValue={
|
|
@@ -1204,13 +1211,14 @@ exports[`AttachButton should render a enabled AttachButton 1`] = `
|
|
|
1204
1211
|
}
|
|
1205
1212
|
>
|
|
1206
1213
|
<View
|
|
1214
|
+
accessibilityRole="button"
|
|
1207
1215
|
accessibilityState={
|
|
1208
1216
|
{
|
|
1209
1217
|
"busy": undefined,
|
|
1210
1218
|
"checked": undefined,
|
|
1211
1219
|
"disabled": false,
|
|
1212
1220
|
"expanded": undefined,
|
|
1213
|
-
"selected":
|
|
1221
|
+
"selected": false,
|
|
1214
1222
|
}
|
|
1215
1223
|
}
|
|
1216
1224
|
accessibilityValue={
|
|
@@ -1372,13 +1380,14 @@ exports[`AttachButton should render a enabled AttachButton 1`] = `
|
|
|
1372
1380
|
}
|
|
1373
1381
|
>
|
|
1374
1382
|
<View
|
|
1383
|
+
accessibilityRole="button"
|
|
1375
1384
|
accessibilityState={
|
|
1376
1385
|
{
|
|
1377
1386
|
"busy": undefined,
|
|
1378
1387
|
"checked": undefined,
|
|
1379
1388
|
"disabled": false,
|
|
1380
1389
|
"expanded": undefined,
|
|
1381
|
-
"selected":
|
|
1390
|
+
"selected": false,
|
|
1382
1391
|
}
|
|
1383
1392
|
}
|
|
1384
1393
|
accessibilityValue={
|
|
@@ -1507,13 +1516,14 @@ exports[`AttachButton should render a enabled AttachButton 1`] = `
|
|
|
1507
1516
|
}
|
|
1508
1517
|
>
|
|
1509
1518
|
<View
|
|
1519
|
+
accessibilityRole="button"
|
|
1510
1520
|
accessibilityState={
|
|
1511
1521
|
{
|
|
1512
1522
|
"busy": undefined,
|
|
1513
1523
|
"checked": undefined,
|
|
1514
1524
|
"disabled": false,
|
|
1515
1525
|
"expanded": undefined,
|
|
1516
|
-
"selected":
|
|
1526
|
+
"selected": false,
|
|
1517
1527
|
}
|
|
1518
1528
|
}
|
|
1519
1529
|
accessibilityValue={
|
|
@@ -1774,13 +1784,14 @@ exports[`AttachButton should render an disabled AttachButton 1`] = `
|
|
|
1774
1784
|
}
|
|
1775
1785
|
>
|
|
1776
1786
|
<View
|
|
1787
|
+
accessibilityRole="button"
|
|
1777
1788
|
accessibilityState={
|
|
1778
1789
|
{
|
|
1779
1790
|
"busy": undefined,
|
|
1780
1791
|
"checked": undefined,
|
|
1781
1792
|
"disabled": true,
|
|
1782
1793
|
"expanded": undefined,
|
|
1783
|
-
"selected":
|
|
1794
|
+
"selected": false,
|
|
1784
1795
|
}
|
|
1785
1796
|
}
|
|
1786
1797
|
accessibilityValue={
|
|
@@ -1934,13 +1945,14 @@ exports[`AttachButton should render an disabled AttachButton 1`] = `
|
|
|
1934
1945
|
}
|
|
1935
1946
|
>
|
|
1936
1947
|
<View
|
|
1948
|
+
accessibilityRole="button"
|
|
1937
1949
|
accessibilityState={
|
|
1938
1950
|
{
|
|
1939
1951
|
"busy": undefined,
|
|
1940
1952
|
"checked": undefined,
|
|
1941
1953
|
"disabled": false,
|
|
1942
1954
|
"expanded": undefined,
|
|
1943
|
-
"selected":
|
|
1955
|
+
"selected": false,
|
|
1944
1956
|
}
|
|
1945
1957
|
}
|
|
1946
1958
|
accessibilityValue={
|
|
@@ -2073,13 +2085,14 @@ exports[`AttachButton should render an disabled AttachButton 1`] = `
|
|
|
2073
2085
|
}
|
|
2074
2086
|
>
|
|
2075
2087
|
<View
|
|
2088
|
+
accessibilityRole="button"
|
|
2076
2089
|
accessibilityState={
|
|
2077
2090
|
{
|
|
2078
2091
|
"busy": undefined,
|
|
2079
2092
|
"checked": undefined,
|
|
2080
2093
|
"disabled": false,
|
|
2081
2094
|
"expanded": undefined,
|
|
2082
|
-
"selected":
|
|
2095
|
+
"selected": false,
|
|
2083
2096
|
}
|
|
2084
2097
|
}
|
|
2085
2098
|
accessibilityValue={
|
|
@@ -2241,13 +2254,14 @@ exports[`AttachButton should render an disabled AttachButton 1`] = `
|
|
|
2241
2254
|
}
|
|
2242
2255
|
>
|
|
2243
2256
|
<View
|
|
2257
|
+
accessibilityRole="button"
|
|
2244
2258
|
accessibilityState={
|
|
2245
2259
|
{
|
|
2246
2260
|
"busy": undefined,
|
|
2247
2261
|
"checked": undefined,
|
|
2248
2262
|
"disabled": false,
|
|
2249
2263
|
"expanded": undefined,
|
|
2250
|
-
"selected":
|
|
2264
|
+
"selected": false,
|
|
2251
2265
|
}
|
|
2252
2266
|
}
|
|
2253
2267
|
accessibilityValue={
|
|
@@ -2376,13 +2390,14 @@ exports[`AttachButton should render an disabled AttachButton 1`] = `
|
|
|
2376
2390
|
}
|
|
2377
2391
|
>
|
|
2378
2392
|
<View
|
|
2393
|
+
accessibilityRole="button"
|
|
2379
2394
|
accessibilityState={
|
|
2380
2395
|
{
|
|
2381
2396
|
"busy": undefined,
|
|
2382
2397
|
"checked": undefined,
|
|
2383
2398
|
"disabled": false,
|
|
2384
2399
|
"expanded": undefined,
|
|
2385
|
-
"selected":
|
|
2400
|
+
"selected": false,
|
|
2386
2401
|
}
|
|
2387
2402
|
}
|
|
2388
2403
|
accessibilityValue={
|