pipwave-ekyc-uikit 0.0.1-beta.1 → 0.0.1-beta.3

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 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 the id of the div container, and access token
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
- Note: The first parameter should be the id of the html element you set
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('pw-sdk-container', <accessToken>)
46
+ pw.init({
47
+ target: 'pw-sdk-container',
48
+ accessToken: //<AccessToken>
49
+ displayMode: //'in-page' | 'hpp'
50
+ })
41
51
  ```
42
52
 
43
- ### `listenToFinishEkyc {Function} optional`
53
+ ### `onFinish {Function} optional`
44
54
 
45
55
  Call back that fires when the eKYC process is done
46
56
 
47
- Example `listenToFinishEkyc` callBack:
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.listenToFinishEkyc(() => {
51
- // alert('eKYC process finished')
72
+ pw.onClose(() => {
52
73
  // do your own handling here
53
74
  });
54
75
  ```
package/dist/index.html CHANGED
@@ -14,11 +14,15 @@
14
14
 
15
15
  </body>
16
16
  <script>
17
+ // const accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2OTI2OTg3MTQsImV4cCI6MTY5MjcwMjMxNCwic3ViIjoiNjg0NzAwIiwibWVyY2hhbnRJZCI6IkcyRy10ZXN0aW5nIiwic2Vzc2lvbklkIjoiZWNlYWQ5NzAtNGIxZS00MzVmLWJhYjYtOTkyOWE1YWJjZTU4Iiwic2NvcGVzIjoiUE9TVF8vZWt5Yy9zZXNzaW9uL3tzZXNzaW9uX2lkfS9kb2MsUE9TVF8vZWt5Yy9zZXNzaW9uL3tzZXNzaW9uX2lkfS9zZWxmaWUsR0VUXy9la3ljL3Nlc3Npb24ve3Nlc3Npb25faWR9L2NoZWNrLFBVVF8vZWt5Yy9zZXNzaW9uL3tzZXNzaW9uX2lkfS9mZWVkYmFjayxHRVRfL2VreWMvc2Vzc2lvbi97c2Vzc2lvbl9pZH0vbWVyY2hhbnQiLCJsYW5ndWFnZSI6ImVuIiwidmVyaWZpY2F0aW9uVHlwZXMiOlsibmF0aW9uYWxfaWRlbnRpdHlfZG9jdW1lbnQiLCJzZWxmaWUiXSwibWF4UmV0cmllcyI6MCwiYXVkIjoiaHR0cHM6Ly9zdGFnaW5nLW9wZW4tYXBpLnBpcHdhdmUuY29tLyIsImlzcyI6IlB3U2xzIiwic3ViVHlwZSI6InVzZXIiLCJzdXBwb3J0ZWRDb3VudHJpZXMiOltdLCJleGNsdWRlZENvdW50cmllcyI6W119.wlYWLUzMcAvitXF3r8jnzg48OJ7Ppqd7XhBahmXOx8o'
18
+
17
19
  // const pw = new PWUISDK();
18
- // pw.init("pw-sdk-container")
20
+ // pw.init({ target: "pw-sdk-container", accessToken })
21
+
22
+ // pw.onFinish(() => {
23
+ // })
19
24
 
20
- // pw.listenToFinishEkyc(() => {
21
- // alert('eKYC process finished')
25
+ // pw.onClose(() => {
22
26
  // })
23
27
 
24
28
  </script>