sonic-widget 2.1.4 → 2.1.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.
- package/README.md +6 -3
- package/dist/index.js +202 -202
- 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.6/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.6/dist/index.min.js"></script>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
or
|
|
@@ -81,6 +81,7 @@ ngOnInit(): void {
|
|
|
81
81
|
baseurl: string, // the base url of the backend server
|
|
82
82
|
docModelUrl: string, // the doc model url of the document recognition process
|
|
83
83
|
maskModelUrl: string, // the mask model url of the mask detect process
|
|
84
|
+
serviceWorkerPath: string, // the service worker path
|
|
84
85
|
showPage: boolean, // used to show the page or not
|
|
85
86
|
ipInfoKey: string, // api key to detect vpn used or not from "ipInfo.io" (Optional)
|
|
86
87
|
videoURL: string, // url of video to do (e.g: demo doing kyc) (Optional)
|
|
@@ -130,7 +131,7 @@ ngOnInit(): void {
|
|
|
130
131
|
4. Add a Script tag to the head tag or body tag. And use the latest version.
|
|
131
132
|
|
|
132
133
|
```html
|
|
133
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.1.
|
|
134
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.1.6/dist/index.min.js"></script>
|
|
134
135
|
```
|
|
135
136
|
|
|
136
137
|
5. Next, add the script tag at a necessary place. But add below the widget script.
|
|
@@ -141,6 +142,7 @@ ngOnInit(): void {
|
|
|
141
142
|
baseurl: string, // the base url of the backend server
|
|
142
143
|
docModelUrl: string, // the doc model url of the document recognition process
|
|
143
144
|
maskModelUrl: string, // the mask model url of the mask detect process
|
|
145
|
+
serviceWorkerPath: string, // the service worker path
|
|
144
146
|
showPage: boolean, // used to show the page or not
|
|
145
147
|
ipInfoKey: string, // api key to detect vpn used or not from "ipInfo.io" (Optional)
|
|
146
148
|
videoURL: string, // url of video to do (e.g: demo doing kyc) (Optional)
|
|
@@ -185,6 +187,7 @@ Check with **`data.code`**_
|
|
|
185
187
|
**Note:-**
|
|
186
188
|
|
|
187
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._
|
|
188
191
|
- _**`docModelUrl`** should pass as a string value. It is used as the base URL for document model._
|
|
189
192
|
- _**`maskModelUrl`** should pass as a string value. It is used as the base URL for mask model._
|
|
190
193
|
- _**`showPage`** is used to pass a boolean value ( **`true`** or **`false`** ). To toggle the widget page open or close._
|