stream-chat-react-native-core 5.28.0-beta.4 → 5.28.0-beta.6
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/components/AttachmentPicker/AttachmentPicker.js +10 -43
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/{AttachmentSelectionBar.js → AttachmentPickerSelectionBar.js} +6 -6
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -0
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +29 -53
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +2 -6
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +6 -3
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/index.js +4 -4
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -2
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +18 -9
- 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/hooks/useScreenDimensions.js +47 -0
- package/lib/commonjs/hooks/useScreenDimensions.js.map +1 -0
- package/lib/commonjs/i18n/es.json +12 -12
- package/lib/commonjs/i18n/fr.json +12 -12
- package/lib/commonjs/i18n/he.json +12 -12
- package/lib/commonjs/i18n/hi.json +12 -12
- package/lib/commonjs/i18n/it.json +12 -12
- package/lib/commonjs/i18n/ja.json +12 -12
- package/lib/commonjs/i18n/ko.json +12 -12
- package/lib/commonjs/i18n/nl.json +12 -12
- package/lib/commonjs/i18n/pt-BR.json +12 -12
- package/lib/commonjs/i18n/ru.json +12 -12
- package/lib/commonjs/i18n/tr.json +12 -12
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +10 -43
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/{AttachmentSelectionBar.js → AttachmentPickerSelectionBar.js} +6 -6
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -0
- package/lib/module/components/ImageGallery/ImageGallery.js +29 -53
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +2 -6
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +6 -3
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/index.js +4 -4
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -2
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +18 -9
- 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/hooks/useScreenDimensions.js +47 -0
- package/lib/module/hooks/useScreenDimensions.js.map +1 -0
- package/lib/module/i18n/es.json +12 -12
- package/lib/module/i18n/fr.json +12 -12
- package/lib/module/i18n/he.json +12 -12
- package/lib/module/i18n/hi.json +12 -12
- package/lib/module/i18n/it.json +12 -12
- package/lib/module/i18n/ja.json +12 -12
- package/lib/module/i18n/ko.json +12 -12
- package/lib/module/i18n/nl.json +12 -12
- package/lib/module/i18n/pt-BR.json +12 -12
- package/lib/module/i18n/ru.json +12 -12
- package/lib/module/i18n/tr.json +12 -12
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts +30 -12
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerSelectionBar.d.ts +3 -0
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerSelectionBar.d.ts.map +1 -0
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +2 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +1 -1
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +32 -3
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +2 -3
- 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/useScreenDimensions.d.ts +12 -0
- package/lib/typescript/hooks/useScreenDimensions.d.ts.map +1 -0
- package/lib/typescript/i18n/es.json +12 -12
- package/lib/typescript/i18n/fr.json +12 -12
- package/lib/typescript/i18n/he.json +12 -12
- package/lib/typescript/i18n/hi.json +12 -12
- package/lib/typescript/i18n/it.json +12 -12
- package/lib/typescript/i18n/ja.json +12 -12
- package/lib/typescript/i18n/ko.json +12 -12
- package/lib/typescript/i18n/nl.json +12 -12
- package/lib/typescript/i18n/pt-BR.json +12 -12
- package/lib/typescript/i18n/ru.json +12 -12
- package/lib/typescript/i18n/tr.json +12 -12
- package/package.json +1 -1
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +21 -69
- package/src/components/AttachmentPicker/components/{AttachmentSelectionBar.tsx → AttachmentPickerSelectionBar.tsx} +2 -2
- package/src/components/ImageGallery/ImageGallery.tsx +31 -79
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +3 -19
- package/src/components/MessageInput/MessageInput.tsx +11 -7
- package/src/components/MessageInput/__tests__/MessageInput.test.js +2 -0
- package/src/components/index.ts +1 -1
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +34 -10
- package/src/contexts/overlayContext/OverlayContext.tsx +5 -4
- package/src/contexts/overlayContext/OverlayProvider.tsx +10 -7
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useScreenDimensions.ts +41 -0
- package/src/i18n/es.json +12 -12
- package/src/i18n/fr.json +12 -12
- package/src/i18n/he.json +12 -12
- package/src/i18n/hi.json +12 -12
- package/src/i18n/it.json +12 -12
- package/src/i18n/ja.json +12 -12
- package/src/i18n/ko.json +12 -12
- package/src/i18n/nl.json +12 -12
- package/src/i18n/pt-BR.json +12 -12
- package/src/i18n/ru.json +12 -12
- package/src/i18n/tr.json +12 -12
- package/src/version.json +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +0 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +0 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentSelectionBar.d.ts +0 -3
- package/lib/typescript/components/AttachmentPicker/components/AttachmentSelectionBar.d.ts.map +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext, useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
|
+
import { BottomSheetHandleProps } from '@gorhom/bottom-sheet';
|
|
4
|
+
|
|
3
5
|
import type { Asset, DefaultStreamChatGenerics, File } from '../../types/types';
|
|
4
6
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
5
7
|
|
|
@@ -12,6 +14,36 @@ export type AttachmentPickerIconProps = {
|
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
export type AttachmentPickerContextValue = {
|
|
17
|
+
/**
|
|
18
|
+
* Custom UI component to render [draggable handle](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/1.png) of attachment picker.
|
|
19
|
+
*
|
|
20
|
+
* **Default** [AttachmentPickerBottomSheetHandle](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx)
|
|
21
|
+
*/
|
|
22
|
+
AttachmentPickerBottomSheetHandle: React.FC<BottomSheetHandleProps>;
|
|
23
|
+
/**
|
|
24
|
+
* Height of the image picker bottom sheet handle.
|
|
25
|
+
* @type number
|
|
26
|
+
* @default 20
|
|
27
|
+
*/
|
|
28
|
+
attachmentPickerBottomSheetHandleHeight: number;
|
|
29
|
+
/**
|
|
30
|
+
* Height of the image picker bottom sheet when opened.
|
|
31
|
+
* @type number
|
|
32
|
+
* @default 40% of window height
|
|
33
|
+
*/
|
|
34
|
+
attachmentPickerBottomSheetHeight: number;
|
|
35
|
+
/**
|
|
36
|
+
* Custom UI component for AttachmentPickerSelectionBar
|
|
37
|
+
*
|
|
38
|
+
* **Default: ** [AttachmentPickerSelectionBar](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx)
|
|
39
|
+
*/
|
|
40
|
+
AttachmentPickerSelectionBar: React.ComponentType;
|
|
41
|
+
/**
|
|
42
|
+
* Height of the attachment selection bar displayed on the attachment picker.
|
|
43
|
+
* @type number
|
|
44
|
+
* @default 52
|
|
45
|
+
*/
|
|
46
|
+
attachmentSelectionBarHeight: number;
|
|
15
47
|
/**
|
|
16
48
|
* `bottomInset` determine the height of the `AttachmentPicker` and the underlying shift to the `MessageList` when it is opened.
|
|
17
49
|
* This can also be set via the `setBottomInset` function provided by the `useAttachmentPickerContext` hook.
|
|
@@ -53,8 +85,6 @@ export type AttachmentPickerContextValue = {
|
|
|
53
85
|
setSelectedPicker: React.Dispatch<React.SetStateAction<'images' | undefined>>;
|
|
54
86
|
setTopInset: React.Dispatch<React.SetStateAction<number>>;
|
|
55
87
|
topInset: number;
|
|
56
|
-
attachmentPickerBottomSheetHeight?: number;
|
|
57
|
-
attachmentSelectionBarHeight?: number;
|
|
58
88
|
selectedPicker?: 'images';
|
|
59
89
|
};
|
|
60
90
|
|
|
@@ -68,13 +98,7 @@ export const AttachmentPickerProvider = ({
|
|
|
68
98
|
}: PropsWithChildren<{
|
|
69
99
|
value?: Pick<
|
|
70
100
|
AttachmentPickerContextValue,
|
|
71
|
-
| '
|
|
72
|
-
| 'attachmentPickerBottomSheetHeight'
|
|
73
|
-
| 'CameraSelectorIcon'
|
|
74
|
-
| 'closePicker'
|
|
75
|
-
| 'FileSelectorIcon'
|
|
76
|
-
| 'ImageSelectorIcon'
|
|
77
|
-
| 'openPicker'
|
|
101
|
+
'CameraSelectorIcon' | 'closePicker' | 'FileSelectorIcon' | 'ImageSelectorIcon' | 'openPicker'
|
|
78
102
|
> &
|
|
79
103
|
Partial<Pick<AttachmentPickerContextValue, 'bottomInset' | 'topInset'>>;
|
|
80
104
|
}>) => {
|
|
@@ -86,7 +110,7 @@ export const AttachmentPickerProvider = ({
|
|
|
86
110
|
const [selectedImages, setSelectedImages] = useState<Asset[]>([]);
|
|
87
111
|
const [selectedFiles, setSelectedFiles] = useState<File[]>([]);
|
|
88
112
|
const [selectedPicker, setSelectedPicker] = useState<'images'>();
|
|
89
|
-
const [topInset, setTopInset] = useState<number>(
|
|
113
|
+
const [topInset, setTopInset] = useState<number>(topInsetValue ?? 0);
|
|
90
114
|
|
|
91
115
|
useEffect(() => {
|
|
92
116
|
setBottomInset(bottomInsetValue ?? 0);
|
|
@@ -24,7 +24,6 @@ export type OverlayContextValue = {
|
|
|
24
24
|
overlay: Overlay;
|
|
25
25
|
setOverlay: React.Dispatch<React.SetStateAction<Overlay>>;
|
|
26
26
|
style?: DeepPartial<Theme>;
|
|
27
|
-
translucentStatusBar?: boolean;
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
export const OverlayContext = React.createContext(
|
|
@@ -37,7 +36,10 @@ export type OverlayProviderProps<
|
|
|
37
36
|
Partial<
|
|
38
37
|
Pick<
|
|
39
38
|
AttachmentPickerContextValue,
|
|
39
|
+
| 'AttachmentPickerBottomSheetHandle'
|
|
40
|
+
| 'attachmentPickerBottomSheetHandleHeight'
|
|
40
41
|
| 'attachmentPickerBottomSheetHeight'
|
|
42
|
+
| 'AttachmentPickerSelectionBar'
|
|
41
43
|
| 'attachmentSelectionBarHeight'
|
|
42
44
|
| 'bottomInset'
|
|
43
45
|
| 'CameraSelectorIcon'
|
|
@@ -56,8 +58,8 @@ export type OverlayProviderProps<
|
|
|
56
58
|
| 'OverlayReactions'
|
|
57
59
|
| 'OverlayReactionsAvatar'
|
|
58
60
|
>
|
|
59
|
-
> &
|
|
60
|
-
|
|
61
|
+
> & {
|
|
62
|
+
imageGalleryGridHandleHeight: number;
|
|
61
63
|
autoPlayVideo?: boolean;
|
|
62
64
|
/**
|
|
63
65
|
* The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default
|
|
@@ -67,7 +69,6 @@ export type OverlayProviderProps<
|
|
|
67
69
|
giphyVersion?: keyof NonNullable<Attachment['giphy']>;
|
|
68
70
|
/** https://github.com/GetStream/stream-chat-react-native/wiki/Internationalization-(i18n) */
|
|
69
71
|
i18nInstance?: Streami18n;
|
|
70
|
-
imageGalleryGridHandleHeight?: number;
|
|
71
72
|
imageGalleryGridSnapPoints?: [string | number, string | number];
|
|
72
73
|
isMyMessage?: boolean;
|
|
73
74
|
isThreadMessage?: boolean;
|
|
@@ -19,6 +19,7 @@ import { AttachmentPickerBottomSheetHandle as DefaultAttachmentPickerBottomSheet
|
|
|
19
19
|
import { AttachmentPickerError as DefaultAttachmentPickerError } from '../../components/AttachmentPicker/components/AttachmentPickerError';
|
|
20
20
|
import { AttachmentPickerErrorImage as DefaultAttachmentPickerErrorImage } from '../../components/AttachmentPicker/components/AttachmentPickerErrorImage';
|
|
21
21
|
import { AttachmentPickerIOSSelectMorePhotos as DefaultAttachmentPickerIOSSelectMorePhotos } from '../../components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos';
|
|
22
|
+
import { AttachmentPickerSelectionBar as DefaultAttachmentPickerSelectionBar } from '../../components/AttachmentPicker/components/AttachmentPickerSelectionBar';
|
|
22
23
|
import { CameraSelectorIcon as DefaultCameraSelectorIcon } from '../../components/AttachmentPicker/components/CameraSelectorIcon';
|
|
23
24
|
import { FileSelectorIcon as DefaultFileSelectorIcon } from '../../components/AttachmentPicker/components/FileSelectorIcon';
|
|
24
25
|
import { ImageOverlaySelectedComponent as DefaultImageOverlaySelectedComponent } from '../../components/AttachmentPicker/components/ImageOverlaySelectedComponent';
|
|
@@ -28,6 +29,7 @@ import { MessageOverlay } from '../../components/MessageOverlay/MessageOverlay';
|
|
|
28
29
|
import { OverlayBackdrop } from '../../components/MessageOverlay/OverlayBackdrop';
|
|
29
30
|
import { useStreami18n } from '../../hooks/useStreami18n';
|
|
30
31
|
|
|
32
|
+
import { useViewport } from '../../hooks/useViewport';
|
|
31
33
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
32
34
|
import { AttachmentPickerProvider } from '../attachmentPickerContext/AttachmentPickerContext';
|
|
33
35
|
import { ImageGalleryProvider } from '../imageGalleryContext/ImageGalleryContext';
|
|
@@ -63,17 +65,19 @@ export const OverlayProvider = <
|
|
|
63
65
|
>(
|
|
64
66
|
props: PropsWithChildren<OverlayProviderProps<StreamChatGenerics>>,
|
|
65
67
|
) => {
|
|
68
|
+
const { vh } = useViewport();
|
|
66
69
|
const bottomSheetCloseTimeoutRef = useRef<ReturnType<typeof setTimeout>>();
|
|
67
70
|
const {
|
|
68
71
|
AttachmentPickerBottomSheetHandle = DefaultAttachmentPickerBottomSheetHandle,
|
|
69
|
-
attachmentPickerBottomSheetHandleHeight,
|
|
70
|
-
attachmentPickerBottomSheetHeight,
|
|
72
|
+
attachmentPickerBottomSheetHandleHeight = 20,
|
|
73
|
+
attachmentPickerBottomSheetHeight = vh(45),
|
|
71
74
|
AttachmentPickerError = DefaultAttachmentPickerError,
|
|
72
75
|
attachmentPickerErrorButtonText,
|
|
73
76
|
AttachmentPickerErrorImage = DefaultAttachmentPickerErrorImage,
|
|
74
77
|
attachmentPickerErrorText,
|
|
75
78
|
AttachmentPickerIOSSelectMorePhotos = DefaultAttachmentPickerIOSSelectMorePhotos,
|
|
76
|
-
|
|
79
|
+
AttachmentPickerSelectionBar = DefaultAttachmentPickerSelectionBar,
|
|
80
|
+
attachmentSelectionBarHeight = 52,
|
|
77
81
|
autoPlayVideo,
|
|
78
82
|
bottomInset,
|
|
79
83
|
CameraSelectorIcon = DefaultCameraSelectorIcon,
|
|
@@ -98,7 +102,7 @@ export const OverlayProvider = <
|
|
|
98
102
|
giphyVersion,
|
|
99
103
|
i18nInstance,
|
|
100
104
|
imageGalleryCustomComponents,
|
|
101
|
-
imageGalleryGridHandleHeight,
|
|
105
|
+
imageGalleryGridHandleHeight = 40,
|
|
102
106
|
imageGalleryGridSnapPoints,
|
|
103
107
|
ImageOverlaySelectedComponent = DefaultImageOverlaySelectedComponent,
|
|
104
108
|
ImageSelectorIcon = DefaultImageSelectorIcon,
|
|
@@ -122,7 +126,6 @@ export const OverlayProvider = <
|
|
|
122
126
|
OverlayReactions,
|
|
123
127
|
OverlayReactionsAvatar,
|
|
124
128
|
topInset,
|
|
125
|
-
translucentStatusBar,
|
|
126
129
|
value,
|
|
127
130
|
} = props;
|
|
128
131
|
|
|
@@ -139,7 +142,6 @@ export const OverlayProvider = <
|
|
|
139
142
|
ImageOverlaySelectedComponent,
|
|
140
143
|
numberOfAttachmentImagesToLoadPerCall,
|
|
141
144
|
numberOfAttachmentPickerImageColumns,
|
|
142
|
-
translucentStatusBar,
|
|
143
145
|
};
|
|
144
146
|
|
|
145
147
|
const bottomSheetRef = useRef<BottomSheet>(null);
|
|
@@ -189,7 +191,9 @@ export const OverlayProvider = <
|
|
|
189
191
|
}, [overlay]);
|
|
190
192
|
|
|
191
193
|
const attachmentPickerContext = {
|
|
194
|
+
AttachmentPickerBottomSheetHandle,
|
|
192
195
|
attachmentPickerBottomSheetHeight,
|
|
196
|
+
AttachmentPickerSelectionBar,
|
|
193
197
|
attachmentSelectionBarHeight,
|
|
194
198
|
bottomInset,
|
|
195
199
|
CameraSelectorIcon,
|
|
@@ -211,7 +215,6 @@ export const OverlayProvider = <
|
|
|
211
215
|
overlay,
|
|
212
216
|
setOverlay,
|
|
213
217
|
style: value?.style,
|
|
214
|
-
translucentStatusBar,
|
|
215
218
|
};
|
|
216
219
|
|
|
217
220
|
return (
|
package/src/hooks/index.ts
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import { Dimensions } from 'react-native';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A custom hook that provides functions to calculate dimensions based on
|
|
6
|
+
* a percentage of the screen height (vh) and viewport width (vw). It
|
|
7
|
+
* dynamically updates dimensions on changes in device orientation.
|
|
8
|
+
*
|
|
9
|
+
* @returns {Object} An object containing functions vh and vw.
|
|
10
|
+
*/
|
|
11
|
+
export const useScreenDimensions = (rounded?: boolean) => {
|
|
12
|
+
const [screenDimensions, setScreenDimensions] = useState(Dimensions.get('screen'));
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const subscriptions = Dimensions.addEventListener('change', ({ screen }) => {
|
|
16
|
+
setScreenDimensions((prev) => {
|
|
17
|
+
const { height, width } = screen;
|
|
18
|
+
if (prev.height !== height || prev.width !== width) {
|
|
19
|
+
return screen;
|
|
20
|
+
}
|
|
21
|
+
return prev;
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return () => subscriptions?.remove();
|
|
26
|
+
}, []);
|
|
27
|
+
|
|
28
|
+
const vw = (percentageWidth: number) => {
|
|
29
|
+
const value = screenDimensions.width * (percentageWidth / 100);
|
|
30
|
+
return rounded ? Math.round(value) : value;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const vh = (percentageHeight: number) => {
|
|
34
|
+
const value = screenDimensions.height * (percentageHeight / 100);
|
|
35
|
+
return rounded ? Math.round(value) : value;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const screenDimensionFunctions = useMemo(() => ({ vh, vw }), [vh, vw]);
|
|
39
|
+
|
|
40
|
+
return screenDimensionFunctions;
|
|
41
|
+
};
|
package/src/i18n/es.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "",
|
|
3
|
-
"1 Thread Reply": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"Editing Message": "Editando mensaje",
|
|
20
20
|
"Emoji matching": "",
|
|
21
21
|
"Empty message...": "",
|
|
22
|
-
"Error loading": "",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
22
|
+
"Error loading": "Error al cargar",
|
|
23
|
+
"Error loading channel list...": "Error al cargar la lista de canales...",
|
|
24
|
+
"Error loading messages for this channel...": "Error al cargar los mensajes de este canal...",
|
|
25
25
|
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
26
|
+
"File type not supported": "Tipo de archivo no admitido",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"Message deleted": "Mensaje eliminado",
|
|
40
40
|
"Message flagged": "",
|
|
41
41
|
"Mute User": "",
|
|
42
|
-
"Not supported": "",
|
|
42
|
+
"Not supported": "No admitido",
|
|
43
43
|
"Nothing yet...": "",
|
|
44
44
|
"Ok": "",
|
|
45
45
|
"Only visible to you": "",
|
|
46
46
|
"Open Settings": "",
|
|
47
|
-
"Photo": "
|
|
47
|
+
"Photo": "",
|
|
48
48
|
"Photos and Videos": "",
|
|
49
49
|
"Pin to Conversation": "",
|
|
50
50
|
"Pinned by": "",
|
|
51
51
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
52
|
"Please select a channel first": "",
|
|
53
|
-
"Reconnecting...": "
|
|
53
|
+
"Reconnecting...": "",
|
|
54
54
|
"Reply": "",
|
|
55
55
|
"Reply to Message": "Responder al mensaje",
|
|
56
56
|
"Resend": "",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"Unknown User": "",
|
|
67
67
|
"Unmute User": "",
|
|
68
68
|
"Unpin from Conversation": "",
|
|
69
|
-
"Unread Messages": "
|
|
70
|
-
"Video": "
|
|
71
|
-
"You": "",
|
|
69
|
+
"Unread Messages": "",
|
|
70
|
+
"Video": "",
|
|
71
|
+
"You": "Tú",
|
|
72
72
|
"You can't send messages in this channel": "",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
74
74
|
"{{ index }} of {{ photoLength }}": "",
|
|
75
75
|
"{{ replyCount }} Replies": "",
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
76
|
+
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "",
|
|
78
78
|
"🏙 Attachment...": ""
|
|
79
79
|
}
|
package/src/i18n/fr.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "",
|
|
3
|
-
"1 Thread Reply": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"Editing Message": "Édite un message",
|
|
20
20
|
"Emoji matching": "",
|
|
21
21
|
"Empty message...": "",
|
|
22
|
-
"Error loading": "",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
22
|
+
"Error loading": "Erreur lors du chargement",
|
|
23
|
+
"Error loading channel list...": "Erreur lors du chargement de la liste de canaux...",
|
|
24
|
+
"Error loading messages for this channel...": "Erreur lors du chargement des messages de ce canal...",
|
|
25
25
|
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
26
|
+
"File type not supported": "Le type de fichier n'est pas pris en charge",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"Message deleted": "Message supprimé",
|
|
40
40
|
"Message flagged": "",
|
|
41
41
|
"Mute User": "",
|
|
42
|
-
"Not supported": "",
|
|
42
|
+
"Not supported": "Non pris en charge",
|
|
43
43
|
"Nothing yet...": "",
|
|
44
44
|
"Ok": "",
|
|
45
45
|
"Only visible to you": "",
|
|
46
46
|
"Open Settings": "",
|
|
47
|
-
"Photo": "
|
|
47
|
+
"Photo": "",
|
|
48
48
|
"Photos and Videos": "",
|
|
49
49
|
"Pin to Conversation": "",
|
|
50
50
|
"Pinned by": "",
|
|
51
51
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
52
|
"Please select a channel first": "",
|
|
53
|
-
"Reconnecting...": "
|
|
53
|
+
"Reconnecting...": "",
|
|
54
54
|
"Reply": "",
|
|
55
55
|
"Reply to Message": "Répondre au message",
|
|
56
56
|
"Resend": "",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"Unknown User": "",
|
|
67
67
|
"Unmute User": "",
|
|
68
68
|
"Unpin from Conversation": "",
|
|
69
|
-
"Unread Messages": "
|
|
70
|
-
"Video": "
|
|
71
|
-
"You": "",
|
|
69
|
+
"Unread Messages": "",
|
|
70
|
+
"Video": "",
|
|
71
|
+
"You": "Toi",
|
|
72
72
|
"You can't send messages in this channel": "",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
74
74
|
"{{ index }} of {{ photoLength }}": "",
|
|
75
75
|
"{{ replyCount }} Replies": "",
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
76
|
+
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "",
|
|
78
78
|
"🏙 Attachment...": ""
|
|
79
79
|
}
|
package/src/i18n/he.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "",
|
|
3
|
-
"1 Thread Reply": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"Editing Message": "הודעה בעריכה",
|
|
20
20
|
"Emoji matching": "",
|
|
21
21
|
"Empty message...": "",
|
|
22
|
-
"Error loading": "",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
22
|
+
"Error loading": "שגיאה ארעה בעת הטעינה",
|
|
23
|
+
"Error loading channel list...": "שגיאה ארעה בטעינת השיחות...",
|
|
24
|
+
"Error loading messages for this channel...": "שגיאה ארעה בטעינת הודעות עבור שיחה זאת...",
|
|
25
25
|
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
26
|
+
"File type not supported": "סוג הקובץ אינו נתמך",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"Message deleted": "ההודעה נמחקה",
|
|
40
40
|
"Message flagged": "",
|
|
41
41
|
"Mute User": "",
|
|
42
|
-
"Not supported": "",
|
|
42
|
+
"Not supported": "לא נתמך",
|
|
43
43
|
"Nothing yet...": "",
|
|
44
44
|
"Ok": "",
|
|
45
45
|
"Only visible to you": "",
|
|
46
46
|
"Open Settings": "",
|
|
47
|
-
"Photo": "
|
|
47
|
+
"Photo": "",
|
|
48
48
|
"Photos and Videos": "",
|
|
49
49
|
"Pin to Conversation": "",
|
|
50
50
|
"Pinned by": "",
|
|
51
51
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
52
|
"Please select a channel first": "",
|
|
53
|
-
"Reconnecting...": "
|
|
53
|
+
"Reconnecting...": "",
|
|
54
54
|
"Reply": "",
|
|
55
55
|
"Reply to Message": "השב/י להודעה",
|
|
56
56
|
"Resend": "",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"Unknown User": "",
|
|
67
67
|
"Unmute User": "",
|
|
68
68
|
"Unpin from Conversation": "",
|
|
69
|
-
"Unread Messages": "
|
|
70
|
-
"Video": "
|
|
71
|
-
"You": "",
|
|
69
|
+
"Unread Messages": "",
|
|
70
|
+
"Video": "",
|
|
71
|
+
"You": "את/ה",
|
|
72
72
|
"You can't send messages in this channel": "",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
74
74
|
"{{ index }} of {{ photoLength }}": "",
|
|
75
75
|
"{{ replyCount }} Replies": "",
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
76
|
+
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "",
|
|
78
78
|
"🏙 Attachment...": ""
|
|
79
79
|
}
|
package/src/i18n/hi.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "",
|
|
3
|
-
"1 Thread Reply": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"Editing Message": "मैसेज बदला जा रहा है",
|
|
20
20
|
"Emoji matching": "",
|
|
21
21
|
"Empty message...": "",
|
|
22
|
-
"Error loading": "",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
22
|
+
"Error loading": "लोड होने मे त्रुटि",
|
|
23
|
+
"Error loading channel list...": "चैनल सूची लोड करने में त्रुटि...",
|
|
24
|
+
"Error loading messages for this channel...": "इस चैनल के लिए मेसेजेस लोड करने में त्रुटि हुई...",
|
|
25
25
|
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
26
|
+
"File type not supported": "फ़ाइल प्रकार समर्थित नहीं है",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"Message deleted": "मैसेज हटा दिया गया",
|
|
40
40
|
"Message flagged": "",
|
|
41
41
|
"Mute User": "",
|
|
42
|
-
"Not supported": "",
|
|
42
|
+
"Not supported": "समर्थित नहीं",
|
|
43
43
|
"Nothing yet...": "",
|
|
44
44
|
"Ok": "",
|
|
45
45
|
"Only visible to you": "",
|
|
46
46
|
"Open Settings": "",
|
|
47
|
-
"Photo": "
|
|
47
|
+
"Photo": "",
|
|
48
48
|
"Photos and Videos": "",
|
|
49
49
|
"Pin to Conversation": "",
|
|
50
50
|
"Pinned by": "",
|
|
51
51
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
52
|
"Please select a channel first": "",
|
|
53
|
-
"Reconnecting...": "
|
|
53
|
+
"Reconnecting...": "",
|
|
54
54
|
"Reply": "",
|
|
55
55
|
"Reply to Message": "संदेश का जवाब दें",
|
|
56
56
|
"Resend": "",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"Unknown User": "",
|
|
67
67
|
"Unmute User": "",
|
|
68
68
|
"Unpin from Conversation": "",
|
|
69
|
-
"Unread Messages": "
|
|
70
|
-
"Video": "
|
|
71
|
-
"You": "",
|
|
69
|
+
"Unread Messages": "",
|
|
70
|
+
"Video": "",
|
|
71
|
+
"You": "आप",
|
|
72
72
|
"You can't send messages in this channel": "",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
74
74
|
"{{ index }} of {{ photoLength }}": "",
|
|
75
75
|
"{{ replyCount }} Replies": "",
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
76
|
+
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "",
|
|
78
78
|
"🏙 Attachment...": ""
|
|
79
79
|
}
|
package/src/i18n/it.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "",
|
|
3
|
-
"1 Thread Reply": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"Editing Message": "Modificando il Messaggio",
|
|
20
20
|
"Emoji matching": "",
|
|
21
21
|
"Empty message...": "",
|
|
22
|
-
"Error loading": "",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
22
|
+
"Error loading": "Errore di caricamento",
|
|
23
|
+
"Error loading channel list...": "Errore durante il caricamento della lista dei canali...",
|
|
24
|
+
"Error loading messages for this channel...": "Errore durante il caricamento dei messaggi per questo canale...",
|
|
25
25
|
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
26
|
+
"File type not supported": "Tipo di file non supportato",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"Message deleted": "Messaggio cancellato",
|
|
40
40
|
"Message flagged": "",
|
|
41
41
|
"Mute User": "",
|
|
42
|
-
"Not supported": "",
|
|
42
|
+
"Not supported": "non supportato",
|
|
43
43
|
"Nothing yet...": "",
|
|
44
44
|
"Ok": "",
|
|
45
45
|
"Only visible to you": "",
|
|
46
46
|
"Open Settings": "",
|
|
47
|
-
"Photo": "
|
|
47
|
+
"Photo": "",
|
|
48
48
|
"Photos and Videos": "",
|
|
49
49
|
"Pin to Conversation": "",
|
|
50
50
|
"Pinned by": "",
|
|
51
51
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
52
|
"Please select a channel first": "",
|
|
53
|
-
"Reconnecting...": "
|
|
53
|
+
"Reconnecting...": "",
|
|
54
54
|
"Reply": "",
|
|
55
55
|
"Reply to Message": "Rispondi al messaggio",
|
|
56
56
|
"Resend": "",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"Unknown User": "",
|
|
67
67
|
"Unmute User": "",
|
|
68
68
|
"Unpin from Conversation": "",
|
|
69
|
-
"Unread Messages": "
|
|
70
|
-
"Video": "
|
|
71
|
-
"You": "",
|
|
69
|
+
"Unread Messages": "",
|
|
70
|
+
"Video": "",
|
|
71
|
+
"You": "Tu",
|
|
72
72
|
"You can't send messages in this channel": "",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
74
74
|
"{{ index }} of {{ photoLength }}": "",
|
|
75
75
|
"{{ replyCount }} Replies": "",
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
76
|
+
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "",
|
|
78
78
|
"🏙 Attachment...": ""
|
|
79
79
|
}
|
package/src/i18n/ja.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "",
|
|
3
|
-
"1 Thread Reply": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
4
|
"Allow access to your Gallery": "",
|
|
5
5
|
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"Editing Message": "メッセージを編集中",
|
|
20
20
|
"Emoji matching": "",
|
|
21
21
|
"Empty message...": "",
|
|
22
|
-
"Error loading": "",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
22
|
+
"Error loading": "読み込みエラー",
|
|
23
|
+
"Error loading channel list...": "チャネルリストの読み込み中にエラーが発生しました。。。",
|
|
24
|
+
"Error loading messages for this channel...": "このチャネルのメッセージの読み込み中にエラーが発生しました。。。",
|
|
25
25
|
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
26
|
+
"File type not supported": "サポートされていないファイルです",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"Message deleted": "メッセージが削除されました",
|
|
40
40
|
"Message flagged": "",
|
|
41
41
|
"Mute User": "",
|
|
42
|
-
"Not supported": "",
|
|
42
|
+
"Not supported": "サポートしていません",
|
|
43
43
|
"Nothing yet...": "",
|
|
44
44
|
"Ok": "",
|
|
45
45
|
"Only visible to you": "",
|
|
46
46
|
"Open Settings": "",
|
|
47
|
-
"Photo": "
|
|
47
|
+
"Photo": "",
|
|
48
48
|
"Photos and Videos": "",
|
|
49
49
|
"Pin to Conversation": "",
|
|
50
50
|
"Pinned by": "",
|
|
51
51
|
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
52
|
"Please select a channel first": "",
|
|
53
|
-
"Reconnecting...": "
|
|
53
|
+
"Reconnecting...": "",
|
|
54
54
|
"Reply": "",
|
|
55
55
|
"Reply to Message": "メッセージに返信",
|
|
56
56
|
"Resend": "",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"Unknown User": "",
|
|
67
67
|
"Unmute User": "",
|
|
68
68
|
"Unpin from Conversation": "",
|
|
69
|
-
"Unread Messages": "
|
|
70
|
-
"Video": "
|
|
71
|
-
"You": "",
|
|
69
|
+
"Unread Messages": "",
|
|
70
|
+
"Video": "",
|
|
71
|
+
"You": "あなた",
|
|
72
72
|
"You can't send messages in this channel": "",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
74
74
|
"{{ index }} of {{ photoLength }}": "",
|
|
75
75
|
"{{ replyCount }} Replies": "",
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
76
|
+
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "",
|
|
78
78
|
"🏙 Attachment...": ""
|
|
79
79
|
}
|