sonic-widget 2.5.1 → 2.5.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.
Files changed (3) hide show
  1. package/README.md +22 -17
  2. package/dist/index.js +488 -488
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,14 +1,10 @@
1
- <center>
2
-
3
- <h1> SONIC WIDGET </h1>
1
+ # SONIC WIDGET
4
2
 
5
3
  [![version](https://img.shields.io/npm/v/sonic-widget?style=flat)](https://www.npmjs.com/package/sonic-widget)
6
4
  [![downloads](https://img.shields.io/npm/dm/sonic-widget?style=flat)](https://www.npmjs.com/package/sonic-widget)
7
5
  [![jsdelivr](https://data.jsdelivr.com/v1/package/npm/sonic-widget/badge)](https://www.jsdelivr.com/package/npm/sonic-widget)
8
6
  [![NPM](https://img.shields.io/npm/l/sonic-widget)](https://www.jsdelivr.com/package/npm/sonic-widget)
9
7
 
10
- </center>
11
-
12
8
  ## Installation:
13
9
 
14
10
  **Sonic Widget** - _used to show the onboard kyc at your web page itself._
@@ -16,7 +12,7 @@
16
12
  Use this script tag to get access to the widget:
17
13
 
18
14
  ```html
19
- <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.5.1/dist/index.min.js"></script>
15
+ <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.5.2/dist/index.min.js"></script>
20
16
  ```
21
17
 
22
18
  or
@@ -43,7 +39,7 @@ and adding path in `angular.json`
43
39
  2. Use this script tag to get access to the widget at initial html page:
44
40
 
45
41
  ```html
46
- <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.5.1/dist/index.min.js"></script>
42
+ <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.5.2/dist/index.min.js"></script>
47
43
  ```
48
44
 
49
45
  or
@@ -79,8 +75,11 @@ ngOnInit(): void {
79
75
 
80
76
  const config = {
81
77
  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
78
+ docModelPath: string, // the doc model url of the document recognition process
79
+ maskModelPath: string, // the mask model url of the mask detect process
80
+ faceModelUrl: string, // the face model url of the face recognition process
81
+ handModelUrl: string, // the hand model url of the hand recognition process
82
+ objectModelUrl: string, // the object model url of the object recognition process
84
83
  showPage: boolean, // used to show the page or not
85
84
  speedCheckURL: string, // public URL of the internet speed check
86
85
  videoURL: string, // url of video to do (e.g: demo doing kyc) (Optional)
@@ -232,7 +231,7 @@ it can be added in `angular.json` by installing the npm package
232
231
  4. Add a Script tag to the head tag or body tag. And use the latest version.
233
232
 
234
233
  ```html
235
- <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.5.1/dist/index.min.js"></script>
234
+ <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.5.2/dist/index.min.js"></script>
236
235
  ```
237
236
 
238
237
  5. Next, add the script tag at a necessary place. But add below the widget script.
@@ -241,8 +240,11 @@ it can be added in `angular.json` by installing the npm package
241
240
  <script>
242
241
  const config = {
243
242
  baseurl: string, // the base url of the backend server
244
- docModelUrl: string, // the doc model url of the document recognition process
245
- maskModelUrl: string, // the mask model url of the mask detect process
243
+ docModelPath: string, // the doc model url of the document recognition process
244
+ maskModelPath: string, // the mask model url of the mask detect process
245
+ faceModelUrl: string, // the face model url of the face recognition process
246
+ handModelUrl: string, // the hand model url of the hand recognition process
247
+ objectModelUrl: string, // the object model url of the object recognition process
246
248
  showPage: boolean, // used to show the page or not
247
249
  speedCheckURL: string, // public URL of the internet speed check
248
250
  videoURL: string, // url of video to do (e.g: demo doing kyc) (Optional)
@@ -257,9 +259,9 @@ it can be added in `angular.json` by installing the npm package
257
259
  isMalay: boolean, //used to change the default language english to malay
258
260
  branchId: string, // branch id to identify the branch of the bank
259
261
  sendLogsEmail: boolean, //used to send logs through email
260
- blinkThreshold: number, // threshold used to calculate the user blinked or not, with range limit 0-1(default value is 0.35)
261
- objectPersonThreshold: number, // used for object Person score threshold with range limit 0-1(default value is 0.35)
262
- objectPhoneThreshold: number, // used for object Phone score threshold with range limit 0-1(default value is 0.35)
262
+ blinkThreshold: number, // threshold used to calculate the user blinked or not, with range limit 0-1(default value is 0.4)
263
+ objectPersonThreshold: number, // used for object Person score threshold with range limit 0-1(default value is 0.925)
264
+ objectPhoneThreshold: number, // used for object Phone score threshold with range limit 0-1(default value is 0.5)
263
265
  onMessage: function (data) {}, // callback function, when api response message or error or any other actions
264
266
  };
265
267
  // get the element used in the action button
@@ -290,8 +292,11 @@ Check with **`data.code`**_
290
292
 
291
293
  <!-- - _**`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._ -->
292
294
  - _**`baseurl`** should pass as a string value. It is used as the base URL for API calls._
293
- - _**`docModelUrl`** should pass as a string value. It is used as the base URL for document model._
294
- - _**`maskModelUrl`** should pass as a string value. It is used as the base URL for mask model._
295
+ - _**`docModelPath`** should pass as a string value. It is used as the base URL for document model._
296
+ - _**`maskModelPath`** should pass as a string value. It is used as the base URL for mask model._
297
+ - _**`faceModelUrl`** should pass as a string value. It is used as the base URL for task vision face model._
298
+ - _**`handModelUrl`** should pass as a string value. It is used as the base URL for task vision hand model._
299
+ - _**`objectModelUrl`** should pass as a string value. It is used as the base URL for coco-ssd object model._
295
300
  - _**`showPage`** is used to pass a boolean value ( **`true`** or **`false`** ). To toggle the widget page open or close._
296
301
  - _**`speedCheckURL`** should pass as a string value. It is used to detect internet speed and intimate the user._
297
302
  - _**`videoURL`** should pass as a string value as url. It is used to show the video onboard sonic kyc and it is optional._