Skip to content

Commit

Permalink
Merge pull request #2599 from GetStream/develop
Browse files Browse the repository at this point in the history
Next Release
  • Loading branch information
khushal87 authored Jul 29, 2024
2 parents 723342b + 9f03aa4 commit 54b4f92
Show file tree
Hide file tree
Showing 26 changed files with 250 additions and 117 deletions.
3 changes: 1 addition & 2 deletions docusaurus/docs/reactnative/basics/hello_stream_chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ Before starting make sure you have installed `stream-chat-react-native` as direc
Stream Chat for React Native uses [`stream-chat`](https://github.com/GetStream/stream-chat-js), Stream's JavaScript client, to interact with Stream's chat services.
`stream-chat` is a dependency of Stream Chat for React Native so it is can be used once `stream-chat-react-native` is installed.

To start you must get an instance of Stream Chat, for this you will need an API key.
To create one you can sign up for a [free 30-day trial](https://getstream.io/chat/trial/) of Stream Chat, no CC is required.
To start, you can sign up for a [Free subscription](https://getstream.io/chat/pricing/) and then get your API key.

```ts
import { StreamChat } from 'stream-chat';
Expand Down
30 changes: 26 additions & 4 deletions docusaurus/docs/reactnative/basics/internationalization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ streami18n.registerTranslation('nl', {
[`react-native-localize`](https://github.com/zoontek/react-native-localize#-react-native-localize) package provides a toolbox for React Native app localization. You can use this package to access user preferred locale, and use it to set language for chat components:

```tsx
import *as RNLocalizefrom 'react-native-localize';
const streami18n =new Streami18n();
import * as RNLocalize from 'react-native-localize';
const streami18n = new Streami18n();

const userPreferredLocales = RNLocalize.getLocales();

Expand Down Expand Up @@ -176,14 +176,14 @@ const i18n =new Streami18n({
Or by providing your own [Day.js](https://day.js.org/docs/en/installation/installation) object:

```tsx
import Dayjsfrom 'dayjs';
import Dayjs from 'dayjs';

import 'dayjs/locale/nl';
import 'dayjs/locale/it';
// or if you want to include all locales
import 'dayjs/min/locales';

const i18n =new Streami18n({
const i18n = new Streami18n({
language: 'nl',
DateTimeParser: Dayjs,
});
Expand All @@ -195,6 +195,28 @@ If you would like to stick with English language for date-times in Stream compon

If your application has a user-base that speaks more than one language, Stream's Chat Client provides the option to automatically translate messages. For more information on using automatic machine translation for messages, see the [Chat Client Guide on Translation](https://getstream.io/chat/docs/react-native/translation/?language=javascript).

### Timezone location

To display date and time in different than machine's local timezone, you can provide the timezone parameter to the `Streami18n` constructor. The timezone value has to be a valid [timezone identifier string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). If no timezone parameter is provided, then the machine's local timezone is applied.

:::note
On our React Native SDK, the timezone is only supported through `moment-timezone` and not through the default `Dayjs`. This is because of the [following issue](https://github.com/iamkun/dayjs/issues/1377).

So, to ensure this please pass the `moment-timezone` object to the `DateTimeParser` key of the `Streami18n` constructor.
:::

```tsx
import { Streami18n } from 'stream-chat-react';
import momentTimezone from 'moment-timezone';

const streami18n = new Streami18n({
DateTimeParser: momentTimezone,
timezone: 'Europe/Budapest',
});
```

Moment Timezone will automatically load and extend the moment module, then return the modified instance. This will also prevent multiple versions of moment being installed in a project.

## Options

`options` are the first optional parameter passed to `Streami18n`, it is an object with all keys being optional.
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/reactnative/ui-components/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Stream Chat for React Native uses [`stream-chat`](https://github.com/GetStream/s
You don't have to explicitly install `stream-chat` in your project.
:::

To start you must get an instance of Stream Chat, for this you will need an API key. To create one you can sign up for a [free 30-day trial](https://getstream.io/chat/trial/) of Stream Chat.
To start, you can sign up for a [Free subscription](https://getstream.io/chat/pricing/) and then get your API key.

```ts
import { StreamChat } from 'stream-chat';
Expand Down
9 changes: 4 additions & 5 deletions examples/SampleApp/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1040,14 +1040,13 @@ PODS:
- React-Core
- react-native-safe-area-context (4.9.0):
- React-Core
- react-native-video (6.0.0-beta.8):
- react-native-video (6.4.2):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- react-native-video/Video (= 6.0.0-beta.8)
- react-native-video/Video (6.0.0-beta.8):
- react-native-video/Video (= 6.4.2)
- react-native-video/Video (6.4.2):
- glog
- PromisesSwift
- RCT-Folly (= 2022.05.16.00)
- React-Core
- React-nativeconfig (0.73.5)
Expand Down Expand Up @@ -1580,7 +1579,7 @@ SPEC CHECKSUMS:
react-native-netinfo: 299dad906cdbf3b67bcc6f693c807f98bdd127cc
react-native-quick-sqlite: 2b225dadc63b670f027111e58f6f169773f6d755
react-native-safe-area-context: b97eb6f9e3b7f437806c2ce5983f479f8eb5de4b
react-native-video: 2e38d3e0f7382427539b6b436812553480fcf70a
react-native-video: 244d6e4f8f426df9d5cc20915a56194399e9e067
React-nativeconfig: 78e2b14c0ee479449845b67bbe103343257cbcc0
React-NativeModulesApple: 4fce13d416890352a7a9621427459fe738c4e79a
React-perflogger: 0dd9f1725d55f8264b81efadd373fe1d9cca7dc2
Expand Down
6 changes: 6 additions & 0 deletions examples/SampleApp/ios/SampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,9 @@
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
);
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -738,6 +741,9 @@
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
" ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
);
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
2 changes: 1 addition & 1 deletion examples/SampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"react-native-screens": "^3.29.0",
"react-native-share": "10.0.2",
"react-native-svg": "^14.1.0",
"react-native-video": "6.0.0-beta.8",
"react-native-video": "^6.4.2",
"stream-chat-react-native": "link:../../package/native-package",
"stream-chat-react-native-core": "link:../../package"
},
Expand Down
43 changes: 28 additions & 15 deletions examples/SampleApp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1120,13 +1120,20 @@
resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==

"@babel/runtime@^7.0.0", "@babel/runtime@^7.12.0", "@babel/runtime@^7.16.3", "@babel/runtime@^7.20.0", "@babel/runtime@^7.8.4":
"@babel/runtime@^7.0.0", "@babel/runtime@^7.16.3", "@babel/runtime@^7.20.0", "@babel/runtime@^7.8.4":
version "7.23.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7"
integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==
dependencies:
regenerator-runtime "^0.14.0"

"@babel/runtime@^7.17.2":
version "7.24.8"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.8.tgz#5d958c3827b13cc6d05e038c07fb2e5e3420d82e"
integrity sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==
dependencies:
regenerator-runtime "^0.14.0"

"@babel/template@^7.0.0", "@babel/template@^7.22.15", "@babel/template@^7.23.9", "@babel/template@^7.3.3":
version "7.23.9"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.23.9.tgz#f881d0487cba2828d3259dcb9ef5005a9731011a"
Expand Down Expand Up @@ -4198,12 +4205,12 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==

i18next@20.2.4:
version "20.2.4"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-20.2.4.tgz#972220f19dfef0075a70890d3e8b1f7cf64c5bd6"
integrity sha512-goE1LCA/IZOGG26PkkqoOl2KWR7YP606SvokVQZ29J6QwE02KycrzNetoMUJeqYrTxs4rmiiZgZp+q8qofQL6Q==
i18next@^21.6.14:
version "21.10.0"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.10.0.tgz#85429af55fdca4858345d0e16b584ec29520197d"
integrity sha512-YeuIBmFsGjUfO3qBmMOc0rQaun4mIpGKET5WDwvu8lU7gvwpcariZLNtL0Fzj+zazcHUrlXHiptcFhBMFaxzfg==
dependencies:
"@babel/runtime" "^7.12.0"
"@babel/runtime" "^7.17.2"

ieee754@^1.1.13:
version "1.2.1"
Expand Down Expand Up @@ -4278,6 +4285,11 @@ internal-slot@^1.0.5, internal-slot@^1.0.7:
hasown "^2.0.0"
side-channel "^1.0.4"

intl-pluralrules@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/intl-pluralrules/-/intl-pluralrules-2.0.1.tgz#de16c3df1e09437635829725e88ea70c9ad79569"
integrity sha512-astxTLzIdXPeN0K9Rumi6LfMpm3rvNO0iJE+h/k8Kr/is+wPbRe4ikyDjlLr6VTh/mEfNv8RjN+gu3KwDiuhqg==

invariant@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
Expand Down Expand Up @@ -6265,10 +6277,10 @@ react-native-url-polyfill@^1.3.0:
dependencies:
whatwg-url-without-unicode "8.0.0-3"

react-native-video@6.0.0-beta.8:
version "6.0.0-beta.8"
resolved "https://registry.yarnpkg.com/react-native-video/-/react-native-video-6.0.0-beta.8.tgz#76597ea61d3791beb14731e9e469ddb86e88adf9"
integrity sha512-pWAJKhP6yt7sIe/u4vi292sWaHNgqSwZbKzauRKBHHEJr2pY/EG7Lis5hDI+rOJlQ0NmsPEurbUPH5TGQsFJFw==
react-native-video@^6.4.2:
version "6.4.2"
resolved "https://registry.yarnpkg.com/react-native-video/-/react-native-video-6.4.2.tgz#f1d8e7594d36aa513ba21aa86bcd6e11c2716915"
integrity sha512-8/8AVnamWJU80ZTWFFrLtpzfJeonSM8C8C8YycWAnjzro+FpJqpnQFFheVU2l2BSrnRTGA3eT2p4euXc+SByMw==

react-native@*, react-native@^0.73.0:
version "0.73.5"
Expand Down Expand Up @@ -6825,15 +6837,16 @@ statuses@~1.5.0:
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==

stream-chat-react-native-core@5.31.1:
version "5.31.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.31.1.tgz#4367276c8316d325e6b062e4efb95d464d4e2eef"
integrity sha512-EKHMQ0bWRoyubTxk1IKEbkIzcIY5hxHDpyGU7ObGXLLnhoVBEDranZBQ7dNDdbuM88uKh9mGK5WH4NQSTioKxQ==
stream-chat-react-native-core@5.33.1:
version "5.33.1"
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.33.1.tgz#d9e7847469d3ffb6e7fd35fbb7b720f2e25d172e"
integrity sha512-TCDmChJe07cYyL3sErc6qycRFMA+HbflCKRGrFvVvpU0RdWJljaqiOo3avFSauciSnQxx9WxzTkMism8YsFHcQ==
dependencies:
"@gorhom/bottom-sheet" "4.4.8"
dayjs "1.10.5"
emoji-regex "^10.3.0"
i18next "20.2.4"
i18next "^21.6.14"
intl-pluralrules "^2.0.1"
linkifyjs "^4.1.1"
lodash-es "4.17.21"
mime-types "^2.1.34"
Expand Down
18 changes: 5 additions & 13 deletions examples/TypeScriptMessaging/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ PODS:
- hermes-engine/Pre-built (0.73.6)
- libevent (2.1.12)
- OpenSSL-Universal (1.1.1100)
- PromisesObjC (2.4.0)
- PromisesSwift (2.4.0):
- PromisesObjC (= 2.4.0)
- RCT-Folly (2022.05.16.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -963,14 +960,13 @@ PODS:
- React-Core
- react-native-safe-area-context (4.9.0):
- React-Core
- react-native-video (6.0.0-beta.8):
- react-native-video (6.4.2):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- react-native-video/Video (= 6.0.0-beta.8)
- react-native-video/Video (6.0.0-beta.8):
- react-native-video/Video (= 6.4.2)
- react-native-video/Video (6.4.2):
- glog
- PromisesSwift
- RCT-Folly (= 2022.05.16.00)
- React-Core
- React-nativeconfig (0.73.6)
Expand Down Expand Up @@ -1288,8 +1284,6 @@ SPEC REPOS:
- fmt
- libevent
- OpenSSL-Universal
- PromisesObjC
- PromisesSwift
- SocketRocket
- TOCropViewController

Expand Down Expand Up @@ -1449,8 +1443,6 @@ SPEC CHECKSUMS:
hermes-engine: 9cecf9953a681df7556b8cc9c74905de8f3293c0
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0
RCTRequired: ca1d7414aba0b27efcfa2ccd37637edb1ab77d96
RCTTypeSafety: 678e344fb976ff98343ca61dc62e151f3a042292
Expand Down Expand Up @@ -1479,7 +1471,7 @@ SPEC CHECKSUMS:
react-native-netinfo: 299dad906cdbf3b67bcc6f693c807f98bdd127cc
react-native-quick-sqlite: 2b225dadc63b670f027111e58f6f169773f6d755
react-native-safe-area-context: b97eb6f9e3b7f437806c2ce5983f479f8eb5de4b
react-native-video: d440605e68cf173e70f0b25112455e3d86890663
react-native-video: da6a37174e0cf74ba3decdbe671a0bf8e309538c
React-nativeconfig: b4d4e9901d4cabb57be63053fd2aa6086eb3c85f
React-NativeModulesApple: cd26e56d56350e123da0c1e3e4c76cb58a05e1ee
React-perflogger: 5f49905de275bac07ac7ea7f575a70611fa988f2
Expand Down Expand Up @@ -1517,4 +1509,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 90406e1e85c82b37484f5d746afa45c0637bb4b3

COCOAPODS: 1.15.2
COCOAPODS: 1.14.3
4 changes: 2 additions & 2 deletions examples/TypeScriptMessaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@react-navigation/stack": "^6.2.0",
"@stream-io/flat-list-mvcp": "0.10.3",
"react": "18.2.0",
"react-native-audio-recorder-player": "3.6.6",
"react-native": "^0.73.6",
"react-native-audio-recorder-player": "3.6.6",
"react-native-document-picker": "^9.0.1",
"react-native-fs": "^2.18.0",
"react-native-gesture-handler": "^2.14.0",
Expand All @@ -34,7 +34,7 @@
"react-native-screens": "^3.28.0",
"react-native-share": "^8.2.2",
"react-native-svg": "^14.0.0",
"react-native-video": "6.0.0-beta.8",
"react-native-video": "^6.4.2",
"stream-chat-react-native": "link:../../package/native-package",
"stream-chat-react-native-core": "link:../../package"
},
Expand Down
Loading

0 comments on commit 54b4f92

Please sign in to comment.