stream-chat-react-native 5.4.4-beta.1 → 5.5.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native",
3
3
  "description": "The official React Native SDK for Stream Chat, a service for building chat applications",
4
- "version": "5.4.4-beta.1",
4
+ "version": "5.5.0-beta.2",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -11,7 +11,7 @@
11
11
  "types": "types/index.d.ts",
12
12
  "dependencies": {
13
13
  "es6-symbol": "^3.1.3",
14
- "stream-chat-react-native-core": "5.4.4-beta.1"
14
+ "stream-chat-react-native-core": "5.5.0-beta.2"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@react-native-camera-roll/camera-roll": "^5.0.0",
@@ -31,15 +31,18 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@react-native-camera-roll/camera-roll": "^5.0.2",
34
+ "@react-native-community/netinfo": ">=2.0.7",
35
+ "@stream-io/flat-list-mvcp": "0.10.2",
34
36
  "@types/react-native-share": "^3.3.3",
37
+ "react-native": ">=0.60.0",
35
38
  "react-native-document-picker": "^8.1.1",
39
+ "react-native-fs": ">=2.16.6",
36
40
  "react-native-haptic-feedback": "^1.14.0",
37
41
  "react-native-image-crop-picker": "^0.38.0",
38
- "@stream-io/flat-list-mvcp": "0.10.2",
39
- "@react-native-community/netinfo": ">=2.0.7",
40
- "react-native": ">=0.60.0",
41
- "react-native-fs": ">=2.16.6",
42
42
  "react-native-image-resizer": ">=1.4.2",
43
43
  "react-native-share": ">=4.1.0"
44
+ },
45
+ "optionalDependencies": {
46
+ "@react-native-clipboard/clipboard": "^1.11.1"
44
47
  }
45
48
  }
@@ -6,6 +6,7 @@ export * from './getPhotos';
6
6
  export * from './NetInfo';
7
7
  export * from './pickDocument';
8
8
  export * from './saveFile';
9
+ export * from './setClipboardString';
9
10
  export * from './takePhoto';
10
11
  export * from './triggerHaptic';
11
12
  export * from './Sound';
@@ -0,0 +1,11 @@
1
+ let Clipboard: { setString: (string: string) => void };
2
+
3
+ try {
4
+ Clipboard = require('@react-native-clipboard/clipboard').default;
5
+ } catch (e) {
6
+ // do nothing
7
+ }
8
+
9
+ export const setClipboardString = Clipboard
10
+ ? (string: string) => Clipboard.setString(string)
11
+ : null;
@@ -45,7 +45,7 @@ export const shareImage = RNShare
45
45
  });
46
46
  return true;
47
47
  } catch (error) {
48
- throw new Error('Sharing failed...');
48
+ console.warn('Sharing failed...');
49
49
  }
50
50
  }
51
51
  : null;
package/src/index.js CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  getPhotos,
12
12
  pickDocument,
13
13
  saveFile,
14
+ setClipboardString,
14
15
  shareImage,
15
16
  Sound,
16
17
  takePhoto,
@@ -27,6 +28,7 @@ registerNativeHandlers({
27
28
  NetInfo,
28
29
  pickDocument,
29
30
  saveFile,
31
+ setClipboardString,
30
32
  SDK: 'stream-chat-react-native',
31
33
  shareImage,
32
34
  Sound,