sonic-widget 2.8.8 → 2.9.1

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 +7 -4
  2. package/dist/index.js +26 -26
  3. package/package.json +1 -1
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.8.8/dist/index.min.js"></script>
15
+ <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.9.1/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.8.8/dist/index.min.js"></script>
42
+ <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.9.1/dist/index.min.js"></script>
43
43
  ```
44
44
 
45
45
  or
@@ -74,6 +74,7 @@ declare var sonic: any;
74
74
  ngOnInit(): void {
75
75
 
76
76
  const config = {
77
+ usedFor: string, // the type of the widget
77
78
  baseurl: string, // the base url of the backend server
78
79
  docModelPath: string, // the doc model url of the document recognition process
79
80
  maskModelPath: string, // the mask model url of the mask detect process
@@ -238,7 +239,7 @@ it can be added in `angular.json` by installing the npm package
238
239
  4. Add a Script tag to the head tag or body tag. And use the latest version.
239
240
 
240
241
  ```html
241
- <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.8.8/dist/index.min.js"></script>
242
+ <script src="https://cdn.jsdelivr.net/npm/sonic-widget@2.9.1/dist/index.min.js"></script>
242
243
  ```
243
244
 
244
245
  5. Next, add the script tag at a necessary place. But add below the widget script.
@@ -246,6 +247,7 @@ it can be added in `angular.json` by installing the npm package
246
247
  ```html
247
248
  <script>
248
249
  const config = {
250
+ usedFor: string, // the type of the widget
249
251
  baseurl: string, // the base url of the backend server
250
252
  docModelPath: string, // the doc model url of the document recognition process
251
253
  maskModelPath: string, // the mask model url of the mask detect process
@@ -305,6 +307,7 @@ Check with **`data.code`**_
305
307
  **Note:-**
306
308
 
307
309
  <!-- - _**`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._ -->
310
+ - _**`usedFor`** is used for defining the widget purpose by providing string value as **`PROD`** or **`DEV`**._
308
311
  - _**`baseurl`** should pass as a string value. It is used as the base URL for API calls._
309
312
  - _**`docModelPath`** should pass as a string value. It is used as the base URL for document model._
310
313
  - _**`maskModelPath`** should pass as a string value. It is used as the base URL for mask model._
@@ -320,7 +323,7 @@ Check with **`data.code`**_
320
323
  - _**`appId`** should pass as a string value. It is used to find an application policy for onboard sonic kyc._
321
324
  - _**`appName`** should pass as a string value. It is used for onboard kyc application name. it is optional and default **`Sonic`** ._
322
325
  - _**`ipInfoKey`** should pass as a string value. It is used for location details and paid api key for VPN restriction. For more details visit **`https://ipinfo.io/`**._
323
- - _**`googleMapKey`** should pass as a string value. It is used for location details and geo fence. For more details visit **`https://developers.google.com/maps`**._
326
+ - _**`googleMapKey`** should pass as a string value. It is used for location details and geo fence. For more details visit **`https://developers.google.com/maps`**. If backend have gmap key it will pass else in optional it will take from widget config._
324
327
  - _**`googleCaptchaKey`** should pass as a string value. It is used for spam/bot attack. For more details visit **`https://developers.google.com/recaptcha`**._
325
328
  - _**`passphrase`** should pass as a string value. It is used for encrypting the string with this special key and same key need to be used at backend also for decrypting the data._
326
329
  - _**`userName`** should pass as a string value. It is used to create an application for onboard sonic kyc._