@originallyus/feedback-rn-sdk 1.0.3 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +11 -11
  2. package/package.json +11 -11
package/README.md CHANGED
@@ -10,10 +10,12 @@ Add package:
10
10
  npm install @originallyus/feedback-rn-sdk
11
11
  ```
12
12
 
13
- or
13
+ ## Install Peer Dependencies
14
14
 
15
- ```sh
16
- yarn add @originallyus/feedback-rn-sdk
15
+ These packages are specified as peerDependencies and need to be installed separatedly.
16
+
17
+ ```
18
+ yarn add axios crypto-js react-native-encrypted-storage react-native-device-info react-native-rate
17
19
  ```
18
20
 
19
21
  ## Install Custom Fonts
@@ -35,7 +37,6 @@ Please follow this guide to install fonts: [`Install Fonts to RN App`](https://m
35
37
 
36
38
  Please do not change the filenames as Android are using those to identify fonts. These filenames follows actual PostScript Name of the fonts.
37
39
 
38
-
39
40
  ## Quick Start
40
41
 
41
42
  Please initalize the SDK once in App.js. The mounting point of the SDK should be placed directly in your App.js for it to stay on top of all other views.
@@ -48,7 +49,7 @@ const App = (props) => {
48
49
  const feedbackRef = useRef();
49
50
  };
50
51
 
51
- // in your render function
52
+ // in your render function
52
53
  return (
53
54
  // Make sure the app is full screen and vertical align center
54
55
  <View style={{ flex: 1, justifyContent: 'center' }}>
@@ -106,20 +107,19 @@ const OtherComponent = (props) => {
106
107
  };
107
108
  ```
108
109
 
109
-
110
110
  ## Callback Function (optional)
111
111
 
112
112
  An optional callback function can be provided as parameter to capture the outcome of the SDK.
113
113
 
114
- - **formDidShow = false** is triggered when there is no form to be shown, this callback function will be triggered almost immediately.
115
- - **formDidShow = true** is triggered when has been shown and user has finished interacting with it or dismiss/cancel it
114
+ - **formDidShow = false** is triggered when there is no form to be shown, this callback function will be triggered almost immediately.
115
+ - **formDidShow = true** is triggered when has been shown and user has finished interacting with it or dismiss/cancel it
116
116
 
117
117
  ```js
118
118
  feedbackRef.current.testRatingForm(eventTag, (formDidShow) => {
119
- console.log("formDidShow", formDidShow);
119
+ console.log('formDidShow', formDidShow);
120
120
  });
121
121
 
122
122
  feedbackRef.current.showRatingForm(eventTag, (formDidShow) => {
123
- console.log("formDidShow", formDidShow);
123
+ console.log('formDidShow', formDidShow);
124
124
  });
125
- ```
125
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@originallyus/feedback-rn-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "A cross-platform Feedback component for React Native.",
5
5
  "main": "lib/commonjs/index",
6
6
  "react-native": "lib/commonjs/index",
@@ -58,10 +58,6 @@
58
58
  "resolutions": {
59
59
  "@types/react": "17.0.21"
60
60
  },
61
- "peerDependencies": {
62
- "react": "*",
63
- "react-native": "*"
64
- },
65
61
  "workspaces": [
66
62
  "example"
67
63
  ],
@@ -136,12 +132,16 @@
136
132
  ]
137
133
  ]
138
134
  },
135
+ "peerDependencies": {
136
+ "axios": "*",
137
+ "crypto-js": "*",
138
+ "react": "*",
139
+ "react-native": "*",
140
+ "react-native-device-info": "*",
141
+ "react-native-encrypted-storage": "*",
142
+ "react-native-rate": "*"
143
+ },
139
144
  "dependencies": {
140
- "axios": "^1.6.5",
141
- "crypto-js": "^4.2.0",
142
- "react-native-android-keyboard-adjust-originallyus": "^1.0.2",
143
- "react-native-device-info": "^10.12.0",
144
- "react-native-encrypted-storage": "^4.0.3",
145
- "react-native-rate": "^1.2.12"
145
+ "react-native-android-keyboard-adjust-originallyus": "*"
146
146
  }
147
147
  }