sonic-widget 2.1.3 → 2.1.5
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 +12 -3
- package/dist/index.js +1470 -1470
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
Use this script tag to get access to the widget:
|
|
17
17
|
|
|
18
18
|
```html
|
|
19
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.1.
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.1.5/dist/index.min.js"></script>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
or
|
|
@@ -43,7 +43,7 @@ and adding path in `angular.json`
|
|
|
43
43
|
2. Use this script tag to get access to the widget at initial html page:
|
|
44
44
|
|
|
45
45
|
```html
|
|
46
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.1.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.1.5/dist/index.min.js"></script>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
or
|
|
@@ -79,6 +79,9 @@ ngOnInit(): void {
|
|
|
79
79
|
|
|
80
80
|
const config = {
|
|
81
81
|
baseurl: string, // the base url of the backend server
|
|
82
|
+
docModelUrl: string, // the doc model url of the document recognition process
|
|
83
|
+
maskModelUrl: string, // the mask model url of the mask detect process
|
|
84
|
+
serviceWorkerPath: string, // the service worker path
|
|
82
85
|
showPage: boolean, // used to show the page or not
|
|
83
86
|
ipInfoKey: string, // api key to detect vpn used or not from "ipInfo.io" (Optional)
|
|
84
87
|
videoURL: string, // url of video to do (e.g: demo doing kyc) (Optional)
|
|
@@ -128,7 +131,7 @@ ngOnInit(): void {
|
|
|
128
131
|
4. Add a Script tag to the head tag or body tag. And use the latest version.
|
|
129
132
|
|
|
130
133
|
```html
|
|
131
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.1.
|
|
134
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.1.5/dist/index.min.js"></script>
|
|
132
135
|
```
|
|
133
136
|
|
|
134
137
|
5. Next, add the script tag at a necessary place. But add below the widget script.
|
|
@@ -137,6 +140,9 @@ ngOnInit(): void {
|
|
|
137
140
|
<script>
|
|
138
141
|
const config = {
|
|
139
142
|
baseurl: string, // the base url of the backend server
|
|
143
|
+
docModelUrl: string, // the doc model url of the document recognition process
|
|
144
|
+
maskModelUrl: string, // the mask model url of the mask detect process
|
|
145
|
+
serviceWorkerPath: string, // the service worker path
|
|
140
146
|
showPage: boolean, // used to show the page or not
|
|
141
147
|
ipInfoKey: string, // api key to detect vpn used or not from "ipInfo.io" (Optional)
|
|
142
148
|
videoURL: string, // url of video to do (e.g: demo doing kyc) (Optional)
|
|
@@ -181,6 +187,9 @@ Check with **`data.code`**_
|
|
|
181
187
|
**Note:-**
|
|
182
188
|
|
|
183
189
|
- _**`baseurl`** should pass as a string value. It is used as the base URL for API calls._
|
|
190
|
+
- _**`serviceWorkerPath`** should pass as a string value. It is used as the service worker path and its default path is **`/demo-app/assets/service-worker.js`** and Cache name should be different to fix conflict._
|
|
191
|
+
- _**`docModelUrl`** should pass as a string value. It is used as the base URL for document model._
|
|
192
|
+
- _**`maskModelUrl`** should pass as a string value. It is used as the base URL for mask model._
|
|
184
193
|
- _**`showPage`** is used to pass a boolean value ( **`true`** or **`false`** ). To toggle the widget page open or close._
|
|
185
194
|
- _**`ipInfoKey`** should pass as a string value. It is used to detect whether vpn is used or not from "ipInfo.io" with this api key and it is optional._
|
|
186
195
|
- _**`videoURL`** should pass as a string value as url. It is used to show the video onboard sonic kyc and it is optional._
|