@qore-id/react-native-qoreid-sdk 0.1.3 → 1.0.0
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/README.md +41 -31
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +3 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +1 -1
package/README.md
CHANGED
|
@@ -1,45 +1,61 @@
|
|
|
1
|
-
# @qore-id/react-native-qoreid-sdk
|
|
2
|
-
|
|
3
1
|
QoreID React Native SDK
|
|
4
2
|
|
|
3
|
+
|
|
4
|
+
Link to [documentation](https://dash.readme.com/project/qoreid/v1.0/docs/qoreid-react-native-sdk)
|
|
5
|
+
|
|
5
6
|
## Installation
|
|
6
7
|
|
|
7
|
-
```
|
|
8
|
-
npm install @qore-id/react-native-qoreid-sdk
|
|
8
|
+
```c npm
|
|
9
|
+
npm install --save @qore-id/react-native-qoreid-sdk
|
|
9
10
|
```
|
|
10
|
-
|
|
11
|
-
```sh
|
|
11
|
+
```c yarn
|
|
12
12
|
yarn add @qore-id/react-native-qoreid-sdk
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
### Android
|
|
16
16
|
|
|
17
17
|
Add the following to your `app/build.gradle`
|
|
18
|
+
|
|
18
19
|
```groovy
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
//before your dependencies
|
|
21
|
+
repositories {
|
|
22
|
+
mavenCentral()
|
|
23
|
+
google()
|
|
24
|
+
maven {
|
|
25
|
+
url "https://repo.qoreid.com/repository/maven-releases/"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
26
29
|
```
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
In your `android/app/res/values/styles.xml` Add the Material Component theme to use the QoreIdButton.
|
|
32
|
+
|
|
33
|
+
```xml
|
|
34
|
+
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar" />
|
|
35
|
+
```
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
Add the material library to your `app/build.gradle` dependency
|
|
31
38
|
|
|
32
|
-
```
|
|
33
|
-
|
|
39
|
+
```groovy
|
|
40
|
+
dependencies {
|
|
41
|
+
...
|
|
42
|
+
implementation 'com.google.android.material:material:1.7.0'
|
|
43
|
+
...
|
|
44
|
+
}
|
|
34
45
|
```
|
|
35
46
|
|
|
47
|
+
### iOS
|
|
36
48
|
|
|
49
|
+
From your root directory
|
|
37
50
|
|
|
51
|
+
```sh
|
|
52
|
+
cd ios && pod install
|
|
53
|
+
```
|
|
38
54
|
|
|
39
|
-
## Usage
|
|
55
|
+
## Usage
|
|
40
56
|
|
|
41
|
-
```tsx
|
|
42
|
-
//verify.
|
|
57
|
+
```coffeescript verify.tsx
|
|
58
|
+
//verify.tsx
|
|
43
59
|
import React from 'react'
|
|
44
60
|
import { QoreIdButton } from '@qore-id/react-native-qoreid-sdk';
|
|
45
61
|
|
|
@@ -47,7 +63,6 @@ import { QoreIdButton } from '@qore-id/react-native-qoreid-sdk';
|
|
|
47
63
|
function App() {
|
|
48
64
|
|
|
49
65
|
let clientId = /* CLIENT ID */
|
|
50
|
-
const customButton = ({ onPress }) => <Button onPress={onPress} title="QoreId Button" />
|
|
51
66
|
|
|
52
67
|
const onError = (data) => {
|
|
53
68
|
console.error(data);
|
|
@@ -69,7 +84,7 @@ function App() {
|
|
|
69
84
|
{/* Other components */}
|
|
70
85
|
<QoreIdButton
|
|
71
86
|
title="Verify"
|
|
72
|
-
flowId=""
|
|
87
|
+
flowId="" {/* defaults to 0 */}
|
|
73
88
|
clientId={clientId} {/* Required */}
|
|
74
89
|
productCode="" {/* Required */}
|
|
75
90
|
customerReference={customerRef} {/* Required */}
|
|
@@ -91,7 +106,6 @@ function App() {
|
|
|
91
106
|
onQoreIDSdkSubmitted={onSumitted}
|
|
92
107
|
onQoreIDSdkError={onError}
|
|
93
108
|
onQoreIDSdkClosed={onClosed}
|
|
94
|
-
render={customButton} {/* Only supported for iOS */}
|
|
95
109
|
/>
|
|
96
110
|
</View>
|
|
97
111
|
)
|
|
@@ -99,15 +113,13 @@ function App() {
|
|
|
99
113
|
|
|
100
114
|
```
|
|
101
115
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
### Utilities
|
|
116
|
+
## Utilities
|
|
105
117
|
|
|
106
118
|
QoreId SDK exposes utilities that you can easily use
|
|
107
119
|
|
|
108
|
-
```
|
|
120
|
+
```coffeescript
|
|
109
121
|
|
|
110
|
-
import React from 'react'
|
|
122
|
+
import React, {useRef} from 'react'
|
|
111
123
|
import { QoreIdButton, utils } from '@qore-id/react-native-qoreid-sdk';
|
|
112
124
|
|
|
113
125
|
function App() {
|
|
@@ -123,6 +135,4 @@ function App() {
|
|
|
123
135
|
...
|
|
124
136
|
}
|
|
125
137
|
|
|
126
|
-
```
|
|
127
|
-
- Link to [doc/product-code]('https://docs.qoreid.com/docs/product-codes')
|
|
128
|
-
- Link to [doc/accepted-documents]('https://docs.qoreid.com/docs/ocr-accepted-documents#accepted-documents-for-ocr-verifications')
|
|
138
|
+
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","QoreIdButton","Platform","OS"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AANO,MAAMS,YAAY,GACvBC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACpBhB,OAAO,CAAC,wBAAwB,CAAC,CAC/Bc,YAAY,GACf,CAAC,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_utils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","QoreIdButton","Platform","OS"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AASA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AANO,MAAMS,YAAY,GACvBC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACpBhB,OAAO,CAAC,wBAAwB,CAAC,CAC/Bc,YAAY,GACf,CAAC,CAA4B,EAAC;AAAAJ,OAAA,CAAAI,YAAA,GAAAA,YAAA"}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","QoreIdButton","OS","require"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAGvC,OAAO,MAAMC,YAAY,GACvBD,QAAQ,CAACE,EAAE,KAAK,SAAS,GACpBC,OAAO,CAAC,wBAAwB,CAAC,CAC/BF,YAAY,GACf,CAAC,
|
|
1
|
+
{"version":3,"names":["Platform","QoreIdButton","OS","require"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,cAAc;AAGvC,OAAO,MAAMC,YAAY,GACvBD,QAAQ,CAACE,EAAE,KAAK,SAAS,GACpBC,OAAO,CAAC,wBAAwB,CAAC,CAC/BF,YAAY,GACf,CAAC,CAA4B,EAAC;;AAEpC,cAAc,SAAS"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { IQoreIdButton } from './types';
|
|
3
|
+
export declare const QoreIdButton: import("react").FC<IQoreIdButton<JSX.Element>>;
|
|
2
4
|
export * from './utils';
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,YAAY,gDAIU,CAAA;AAEnC,cAAc,SAAS,CAAC"}
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -5,6 +5,6 @@ export const QoreIdButton =
|
|
|
5
5
|
Platform.OS === 'android'
|
|
6
6
|
? (require('./qoreIdButton.android')
|
|
7
7
|
.QoreIdButton as React.FC<IQoreIdButton>)
|
|
8
|
-
: {} // (require('./qoreIdButton.ios').QoreIdButton as React.FC<IQoreIdButton>);
|
|
8
|
+
: {} as React.FC<IQoreIdButton> // (require('./qoreIdButton.ios').QoreIdButton as React.FC<IQoreIdButton>);
|
|
9
9
|
|
|
10
10
|
export * from './utils';
|