pipwave-ekyc-uikit 0.0.1-beta.0 → 0.0.1-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/README.md +28 -7
- package/dist/index.html +7 -9
- package/dist/pw-bundle.js +46 -101
- package/package.json +2 -2
- package/pipwave-ekyc-uikit-1.0.0.tgz +0 -0
- package/dist/4674f8ded773cb03e824.eot +0 -0
- package/dist/55a4970ef78c9bb412fc.png +0 -0
- package/dist/5e7382c63da0098d634a.ttf +0 -0
- package/dist/6066b413c3f9efac085d.png +0 -0
- package/dist/6b7dddff26aa104fa23a.png +0 -0
- package/dist/83bebaf37c09c7e1c3ee.woff +0 -0
- package/dist/99e8d68ac2302586e944.png +0 -0
- package/dist/a37df928f2e0c1d63dcc.png +0 -0
- package/dist/abdfc62f24a1d76a13f4.png +0 -0
- package/dist/cff684e59ffb052d72cb.woff2 +0 -0
- package/dist/ef1bcc8d682d604c5fa0.png +0 -0
package/README.md
CHANGED
|
@@ -31,24 +31,45 @@ You need to provide one html div element along with id attributes
|
|
|
31
31
|
|
|
32
32
|
Add the scripts below to your project, to start render the uikit.
|
|
33
33
|
The script first initialized the uikit, then call the init method and
|
|
34
|
-
passed in
|
|
34
|
+
passed in an object at the first init function parameter. The object requires
|
|
35
|
+
three key to be passed in as listed below:
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
target: The id of the container that will be used to display the ekyc
|
|
38
|
+
accessToken: The accessToken for the user that need to undergo the ekyc process
|
|
39
|
+
displayMode: To determine the display of the ekyc gui. Supported value is 'in-page' and 'hpp'.
|
|
40
|
+
Default: 'in-page'
|
|
37
41
|
|
|
38
42
|
```javascript
|
|
43
|
+
import PWUISDK from 'pipwave-ekyc-uikit';
|
|
44
|
+
|
|
39
45
|
const pw = new PWUISDK()
|
|
40
|
-
pw.init(
|
|
46
|
+
pw.init({
|
|
47
|
+
target: 'pw-sdk-container',
|
|
48
|
+
accessToken: //<AccessToken>
|
|
49
|
+
displayMode: //'in-page' | 'hpp'
|
|
50
|
+
})
|
|
41
51
|
```
|
|
42
52
|
|
|
43
|
-
### `
|
|
53
|
+
### `onFinish {Function} optional`
|
|
44
54
|
|
|
45
55
|
Call back that fires when the eKYC process is done
|
|
46
56
|
|
|
47
|
-
Example `
|
|
57
|
+
Example `onFinish` callBack:
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
pw.onFinish(() => {
|
|
61
|
+
// do your own handling here
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### `onClose {Function} optional`
|
|
66
|
+
|
|
67
|
+
Call back that fires when the eKYC process is closed
|
|
68
|
+
|
|
69
|
+
Example `onClose` callBack:
|
|
48
70
|
|
|
49
71
|
```javascript
|
|
50
|
-
pw.
|
|
51
|
-
// alert('eKYC process finished')
|
|
72
|
+
pw.onClose(() => {
|
|
52
73
|
// do your own handling here
|
|
53
74
|
});
|
|
54
75
|
```
|
package/dist/index.html
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
<head>
|
|
5
5
|
<script src="./pw-bundle.js"></script>
|
|
6
|
-
<!-- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
7
|
-
<link rel="stylesheet"
|
|
8
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />
|
|
9
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
10
|
-
<link rel="stylesheet"
|
|
11
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" /> -->
|
|
12
6
|
</head>
|
|
13
7
|
|
|
14
8
|
<body>
|
|
@@ -20,11 +14,15 @@
|
|
|
20
14
|
|
|
21
15
|
</body>
|
|
22
16
|
<script>
|
|
17
|
+
// const accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTI2OTg3MTQsImV4cCI6MTY5MjcwMjMxNCwic3ViIjoiNjg0NzAwIiwibWVyY2hhbnRJZCI6IkcyRy10ZXN0aW5nIiwic2Vzc2lvbklkIjoiZWNlYWQ5NzAtNGIxZS00MzVmLWJhYjYtOTkyOWE1YWJjZTU4Iiwic2NvcGVzIjoiUE9TVF8vZWt5Yy9zZXNzaW9uL3tzZXNzaW9uX2lkfS9kb2MsUE9TVF8vZWt5Yy9zZXNzaW9uL3tzZXNzaW9uX2lkfS9zZWxmaWUsR0VUXy9la3ljL3Nlc3Npb24ve3Nlc3Npb25faWR9L2NoZWNrLFBVVF8vZWt5Yy9zZXNzaW9uL3tzZXNzaW9uX2lkfS9mZWVkYmFjayxHRVRfL2VreWMvc2Vzc2lvbi97c2Vzc2lvbl9pZH0vbWVyY2hhbnQiLCJsYW5ndWFnZSI6ImVuIiwidmVyaWZpY2F0aW9uVHlwZXMiOlsibmF0aW9uYWxfaWRlbnRpdHlfZG9jdW1lbnQiLCJzZWxmaWUiXSwibWF4UmV0cmllcyI6MCwiYXVkIjoiaHR0cHM6Ly9zdGFnaW5nLW9wZW4tYXBpLnBpcHdhdmUuY29tLyIsImlzcyI6IlB3U2xzIiwic3ViVHlwZSI6InVzZXIiLCJzdXBwb3J0ZWRDb3VudHJpZXMiOltdLCJleGNsdWRlZENvdW50cmllcyI6W119.wlYWLUzMcAvitXF3r8jnzg48OJ7Ppqd7XhBahmXOx8o'
|
|
18
|
+
|
|
23
19
|
// const pw = new PWUISDK();
|
|
24
|
-
// pw.init("pw-sdk-container")
|
|
20
|
+
// pw.init({ target: "pw-sdk-container", accessToken })
|
|
21
|
+
|
|
22
|
+
// pw.onFinish(() => {
|
|
23
|
+
// })
|
|
25
24
|
|
|
26
|
-
// pw.
|
|
27
|
-
// alert('eKYC process finished')
|
|
25
|
+
// pw.onClose(() => {
|
|
28
26
|
// })
|
|
29
27
|
|
|
30
28
|
</script>
|