sonic-widget 2.6.81 → 2.7.0
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 +38 -6
- package/dist/index.js +1457 -1457
- package/package.json +1 -1
- package/dist/.DS_Store +0 -0
- package/dist/models/.DS_Store +0 -0
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
Use this script tag to get access to the widget:
|
|
13
13
|
|
|
14
14
|
```html
|
|
15
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.
|
|
15
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.7.0/dist/index.min.js"></script>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
or
|
|
@@ -39,7 +39,7 @@ and adding path in `angular.json`
|
|
|
39
39
|
2. Use this script tag to get access to the widget at initial html page:
|
|
40
40
|
|
|
41
41
|
```html
|
|
42
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.
|
|
42
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.7.0/dist/index.min.js"></script>
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
or
|
|
@@ -97,6 +97,8 @@ ngOnInit(): void {
|
|
|
97
97
|
branchId: string, //used to identify the bank branch
|
|
98
98
|
sendLogsEmail: boolean, //used to send logs through email
|
|
99
99
|
blinkThreshold: number, // used for blink threshold
|
|
100
|
+
eyeOpenThreshold: number, // used for eye open threshold
|
|
101
|
+
disableUploadDocs: boolean, // used to show/hide the upload docs option.
|
|
100
102
|
objectPersonThreshold: number, // used for object Person score threshold
|
|
101
103
|
objectPhoneThreshold: number, // used for object Phone score threshold
|
|
102
104
|
grayscalePercentageThreshold: number, // used for black&white percentage score threshold
|
|
@@ -234,7 +236,7 @@ it can be added in `angular.json` by installing the npm package
|
|
|
234
236
|
4. Add a Script tag to the head tag or body tag. And use the latest version.
|
|
235
237
|
|
|
236
238
|
```html
|
|
237
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.
|
|
239
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.7.0/dist/index.min.js"></script>
|
|
238
240
|
```
|
|
239
241
|
|
|
240
242
|
5. Next, add the script tag at a necessary place. But add below the widget script.
|
|
@@ -264,7 +266,9 @@ it can be added in `angular.json` by installing the npm package
|
|
|
264
266
|
isMalay: boolean, //used to change the default language english to malay
|
|
265
267
|
branchId: string, // branch id to identify the branch of the bank
|
|
266
268
|
sendLogsEmail: boolean, //used to send logs through email
|
|
267
|
-
blinkThreshold: number, // threshold used to calculate the user blinked or not, with range limit 0-1(default value is 0.
|
|
269
|
+
blinkThreshold: number, // threshold used to calculate the user's eye blinked or not, with range limit 0-1(default value is 0.35)
|
|
270
|
+
eyeOpenThreshold: number, // threshold used to calculate the user's eye open or not, with range limit 0-1(default value is 0.2)
|
|
271
|
+
disableUploadDocs: boolean, // used to pass a boolean value. It is used to disable the upload option the document process
|
|
268
272
|
objectPersonThreshold: number, // used for object Person score threshold with range limit 0-1(default value is 0.925)
|
|
269
273
|
objectPhoneThreshold: number, // used for object Phone score threshold with range limit 0-1(default value is 0.5)
|
|
270
274
|
grayscalePercentageThreshold: number, // used for black&white percentage score threshold with range limit 0-100(default value is 80)
|
|
@@ -317,15 +321,20 @@ Check with **`data.code`**_
|
|
|
317
321
|
- _**`phone`** should pass as a string value. It is used to create an application for onboard sonic kyc._
|
|
318
322
|
- _**`applicationNo`** should pass as a string value. It is used to create an application for onboard sonic kyc._
|
|
319
323
|
- _**`sendLogsEmail`** is used to pass a boolean value. It is used to send logs to client email address._
|
|
320
|
-
- _**`blinkThreshold`** is used to pass a numerical value. It is used to check the user
|
|
324
|
+
- _**`blinkThreshold`** is used to pass a numerical value. It is used to check the user blinking (range 0-1 and default 0.35). Above the threshold consider to be blinking or eye closed._
|
|
325
|
+
- _**`disableUploadDocs`** is used to pass a boolean value. It is used to disable the upload option the document process._
|
|
326
|
+
- _**`eyeOpenThreshold`** is used to pass a numerical value. It is used to check the user eyes are open (range 0-1 and default 0.2). Below the threshold consider to be eyes are open._
|
|
321
327
|
- _**`objectPersonThreshold`** is used to pass a numerical value. It is used to check the image person as object found with required score as threshold (range 0-1 and default 0.925)._
|
|
322
328
|
- _**`objectPhoneThreshold`** is used to pass a numerical value. It is used to check the image phone/laptop as object found with required score as threshold (range 0-1 and default 0.5)._
|
|
323
329
|
- _**`grayscalePercentageThreshold`** is used to pass a numerical value for percentage. It is used to check the image color as black&white found with required percentage as threshold (range 0-100 and default 80)._
|
|
324
330
|
- _**`onMessage`** is a callback function. It is getting called when the API gives a message or at any configuration error. Return data is an object with its API endpoint and result._
|
|
325
331
|
|
|
326
332
|
|
|
333
|
+
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DEVELOPER info ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
334
|
+
|
|
327
335
|
<!-- use node 18 and install packages using yarn and do yarn dev -->
|
|
328
336
|
|
|
337
|
+
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GrayScale info ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
329
338
|
|
|
330
339
|
<!-- GrayScale Suggestions
|
|
331
340
|
|
|
@@ -343,4 +352,27 @@ After detecting grayscale pixels, you need to determine the percentage of graysc
|
|
|
343
352
|
|
|
344
353
|
80-90% Grayscale Pixels: This threshold means that if 80-90% of the pixels are grayscale, the image will be classified as black and white. This works well for documents and images that are mostly grayscale but may have some minor color elements (e.g., stamps, logos).
|
|
345
354
|
|
|
346
|
-
90-100% Grayscale Pixels: This is a stricter threshold, ensuring that the image is classified as black and white only if nearly all pixels are grayscale. -->
|
|
355
|
+
90-100% Grayscale Pixels: This is a stricter threshold, ensuring that the image is classified as black and white only if nearly all pixels are grayscale. -->
|
|
356
|
+
|
|
357
|
+
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Selfie info ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
|
358
|
+
|
|
359
|
+
<!--
|
|
360
|
+
1.blinkThreshold: number
|
|
361
|
+
|
|
362
|
+
Description : The blinkThreshold is used to determine whether the user's eye is considered blinked. It represents the sensitivity to eye closure during a blink.
|
|
363
|
+
Range : 0-1 (default: 0.35)
|
|
364
|
+
Functionality :
|
|
365
|
+
* If either of the user's eyes exceeds the specified threshold (i.e., the eye closure ratio is greater than the blinkThreshold), the eye is detected as "blinked."
|
|
366
|
+
* This helps identify blinks during facial detection or tracking processes.
|
|
367
|
+
|
|
368
|
+
2.eyeOpenThreshold: number
|
|
369
|
+
|
|
370
|
+
Description : The eyeOpenThreshold is used to detect whether the user's eyes are open or not. It determines the sensitivity to eye openness by checking the openness ratio.
|
|
371
|
+
Range : 0-1 (default: 0.25)
|
|
372
|
+
Functionality :
|
|
373
|
+
* If both eyes fall below the defined threshold, the system interprets that the eyes are open.
|
|
374
|
+
* This value helps differentiate between an open eye and a partially closed
|
|
375
|
+
|
|
376
|
+
Both thresholds work together to archive ekyc selfie process.
|
|
377
|
+
-->
|
|
378
|
+
|