sonic-widget 2.4.2 → 2.4.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 +11 -20
- package/dist/index.js +1618 -1618
- package/dist/service-worker.js +1 -1
- 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.4.
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.3/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.4.
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.3/dist/index.min.js"></script>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
or
|
|
@@ -95,6 +95,7 @@ ngOnInit(): void {
|
|
|
95
95
|
isMalay: boolean, //used to change the default language english to malay
|
|
96
96
|
branchId: string, //used to identify the bank branch
|
|
97
97
|
sendLogsEmail: boolean, //used to send logs through email
|
|
98
|
+
blinkThreshold: number, // used for blink threshold
|
|
98
99
|
onMessage: function (data) {}, // callback function, when api response message or error or any other actions
|
|
99
100
|
};
|
|
100
101
|
|
|
@@ -112,23 +113,11 @@ ngOnInit(): void {
|
|
|
112
113
|
```javascript
|
|
113
114
|
const CACHE_NAME = 'demo-app-ai-tensorflow-models-cache-v1';
|
|
114
115
|
const urlsToCache = [
|
|
115
|
-
// coco ssd
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
"https://teachablemachine.withgoogle.com/models/ikFAYzyyu/metadata.json",
|
|
121
|
-
|
|
122
|
-
// mask model
|
|
123
|
-
"https://teachablemachine.withgoogle.com/models/_08Yck2dy/model.json",
|
|
124
|
-
"https://teachablemachine.withgoogle.com/models/_08Yck2dy/metadata.json",
|
|
125
|
-
|
|
126
|
-
// blazeface
|
|
127
|
-
'https://tfhub.dev/tensorflow/tfjs-model/blazeface/1/default/1/model.json?tfjs-format=file',
|
|
128
|
-
|
|
129
|
-
// handpose model
|
|
130
|
-
"https://tfhub.dev/mediapipe/tfjs-model/handpose_3d/detector/full/1/model.json?tfjs-format=file",
|
|
131
|
-
"https://tfhub.dev/mediapipe/tfjs-model/handpose_3d/landmark/full/1/model.json?tfjs-format=file"
|
|
116
|
+
// coco ssd - tensorflow model
|
|
117
|
+
// document model - teachable machine drive link or folder path
|
|
118
|
+
// mask model - teachable machine drive link or folder path
|
|
119
|
+
// face landmark model - mediapipe tasks-vision
|
|
120
|
+
// hand landmark model - mediapipe tasks-vision
|
|
132
121
|
// Add more model files if necessary
|
|
133
122
|
]
|
|
134
123
|
|
|
@@ -241,7 +230,7 @@ it can be added in `angular.json` by installing the npm package
|
|
|
241
230
|
4. Add a Script tag to the head tag or body tag. And use the latest version.
|
|
242
231
|
|
|
243
232
|
```html
|
|
244
|
-
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.
|
|
233
|
+
<script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.4.3/dist/index.min.js"></script>
|
|
245
234
|
```
|
|
246
235
|
|
|
247
236
|
5. Next, add the script tag at a necessary place. But add below the widget script.
|
|
@@ -266,6 +255,7 @@ it can be added in `angular.json` by installing the npm package
|
|
|
266
255
|
isMalay: boolean, //used to change the default language english to malay
|
|
267
256
|
branchId: string, // branch id to identify the branch of the bank
|
|
268
257
|
sendLogsEmail: boolean, //used to send logs through email
|
|
258
|
+
blinkThreshold: number, // threshold used to calculate the user blinked or not with range limit 0-1(default value is 0.35)
|
|
269
259
|
onMessage: function (data) {}, // callback function, when api response message or error or any other actions
|
|
270
260
|
};
|
|
271
261
|
// get the element used in the action button
|
|
@@ -312,4 +302,5 @@ Check with **`data.code`**_
|
|
|
312
302
|
- _**`phone`** should pass as a string value. It is used to create an application for onboard sonic kyc._
|
|
313
303
|
- _**`applicationNo`** should pass as a string value. It is used to create an application for onboard sonic kyc._
|
|
314
304
|
- _**`sendLogsEmail`** is used to pass a boolean value. It is used to send logs to client email address._
|
|
305
|
+
- _**`blinkThreshold`** is used to pass a numerical value. It is used to check the user blinks (range 0-1 and default 0.35)._
|
|
315
306
|
- _**`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._
|