@tsocial/tvweb-sdk 5.3.1 → 5.4.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.
@@ -224,9 +224,12 @@
224
224
 
225
225
  function handleStepDoneIDCard ({ stepNumber, image, qrScannedResult, recordedVideos, apiResult }) {
226
226
  const steps = JSON.parse(idCardStepsEl.value)
227
+ console.log('image', image)
227
228
 
228
229
  resultExtractIdInfoEl.appendChild(document.createTextNode(`\n-----------------------------------------\n`))
229
230
  resultExtractIdInfoEl.appendChild(document.createTextNode(`\nSTEP NUMBER ${stepNumber}:\n`));
231
+
232
+
230
233
  const imgEl = document.createElement("img");
231
234
  imgEl.width = "300";
232
235
  imgEl.src = URL.createObjectURL(image.blob);
@@ -235,11 +238,11 @@
235
238
  resultExtractIdInfoEl.appendChild(document.createTextNode(`Recorded videos: ${recordedVideos.length}\n`));
236
239
 
237
240
  if (qrScannedResult) {
238
- const { result, imageBlob } = qrScannedResult
241
+ const { result, image } = qrScannedResult
239
242
 
240
243
  const qrImgEl = document.createElement("img");
241
244
  qrImgEl.width = "200";
242
- qrImgEl.src = URL.createObjectURL(imageBlob);
245
+ qrImgEl.src = URL.createObjectURL(image.blob);
243
246
  resultExtractIdInfoEl.appendChild(qrImgEl);
244
247
  resultExtractIdInfoEl.appendChild(document.createTextNode(`\n${result}\n`));
245
248
  }
@@ -261,10 +264,10 @@
261
264
  }
262
265
 
263
266
  async function handleDetectIdCard (props) {
264
- const { cardType, imageBlob, cardSide } = props
267
+ const { cardType, image, cardSide } = props
265
268
  const apiClient = new trustvisionSdk.default(inputAccessKey.value, inputSecretKey.value, inputApiUrl.value);
266
269
  const resultUpload = await apiClient.uploadImage({
267
- file: imageBlob,
270
+ file: image.blob,
268
271
  label: `id_card.${cardType}.${cardSide}`,
269
272
  });
270
273
  const imageId = resultUpload.data.image_id
@@ -294,6 +297,7 @@
294
297
  onStepDone: handleStepDoneIDCard,
295
298
  steps: JSON.parse(idCardStepsEl.value),
296
299
  tracking: JSON.parse(trackingConfigEl.value),
300
+ outputEncryptionSettings: { key: 'abc123' },
297
301
  }
298
302
 
299
303
  if (apiCheck) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsocial/tvweb-sdk",
3
- "version": "5.3.1",
3
+ "version": "5.4.0",
4
4
  "description": "TV Web SDK - The Standalone SDK",
5
5
  "keywords": [],
6
6
  "author": "Nha Hoang <nha.hoang@trustingsocial.com>",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@tsocial/trustvision-sdk": "2.10.1",
27
- "@tsocial/tvweb-core": "^5.3.1",
28
- "@tsocial/tvweb-ui": "^5.3.1",
27
+ "@tsocial/tvweb-core": "^5.4.0",
28
+ "@tsocial/tvweb-ui": "^5.4.0",
29
29
  "http-server": "0.12.3",
30
30
  "invariant": "^2.2.4",
31
31
  "react": "^16.14.0",
@@ -34,7 +34,7 @@
34
34
  "styled-components": "^5.2.1"
35
35
  },
36
36
  "devDependencies": {
37
- "@tsocial/tvweb-builder": "^5.3.1"
37
+ "@tsocial/tvweb-builder": "^5.4.0"
38
38
  },
39
- "gitHead": "ef8db18cecf2542422137773e636ccdccface4bf"
39
+ "gitHead": "c2aedb28f04afe4cb63281fe17fff6baaceb560a"
40
40
  }