@unissey-web/web-components 3.10.0-alpha.1 → 3.10.0-alpha.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.
@@ -3,7 +3,7 @@ import { selfieCaptureStrings } from './selfie-capture.js';
3
3
  import { referenceCaptureStrings } from './reference-capture.js';
4
4
  import './button.js';
5
5
  import './en-e76ed5a0.js';
6
- import './video-recorder-7d643a6c.js';
6
+ import './video-recorder-dddb1bd6.js';
7
7
  import './variables-09a3e162.js';
8
8
  import './video-record-directions.js';
9
9
  import './direction-card-f55e1936.js';
@@ -40,7 +40,8 @@ var FullCapture = /*#__PURE__*/function (_LitElement) {
40
40
  detail: {
41
41
  selfie: e.detail.media,
42
42
  reference: this.reference,
43
- metadata: e.detail.metadata
43
+ metadata: e.detail.metadata,
44
+ error: e.detail.error
44
45
  }
45
46
  }));
46
47
  }
package/dist/index.d.ts CHANGED
@@ -697,6 +697,7 @@ declare class SelfieCapture extends LitElement {
697
697
  handleRecordCompleted(e: CustomEvent<{
698
698
  media: Blob;
699
699
  metadata: unknown;
700
+ error?: string;
700
701
  }>): void;
701
702
  handleRecordStarting(e: CustomEvent): void;
702
703
  handleRecordCapturing(e: CustomEvent): void;
@@ -866,6 +867,7 @@ declare class ReferenceCapture extends LitElement {
866
867
  handleRecordCompleted(e: CustomEvent<{
867
868
  media: Blob;
868
869
  metadata: unknown;
870
+ error?: string;
869
871
  }>): void;
870
872
  handleRecordStarting(e: CustomEvent): void;
871
873
  handleRecordCapturing(e: CustomEvent): void;
@@ -1041,6 +1043,7 @@ declare class FullCapture extends LitElement {
1041
1043
  handleSelfie(e: CustomEvent<{
1042
1044
  media: Blob;
1043
1045
  metadata: unknown;
1046
+ error?: string;
1044
1047
  }>): void;
1045
1048
  handleRecoderReady(e: CustomEvent<{
1046
1049
  recorderElmt: HTMLElement;
@@ -1069,7 +1072,8 @@ declare enum IadMode {
1069
1072
  PASSIVE = "passive",
1070
1073
  PASSIVE_LT = "passive-lt",
1071
1074
  ACTIVE_FALLBACK = "active-fallback",
1072
- ACTIVE = "active"
1075
+ ACTIVE = "active",
1076
+ MEDIA_INTEGRITY = "media-integrity"
1073
1077
  }
1074
1078
  type IadConfig = {
1075
1079
  mode: IadMode;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { Button } from './button.js';
2
- import { R as Recorder } from './video-recorder-7d643a6c.js';
3
- export { C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-7d643a6c.js';
2
+ import { R as Recorder } from './video-recorder-dddb1bd6.js';
3
+ export { C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-dddb1bd6.js';
4
4
  export { VideoRecordDirections } from './video-record-directions.js';
5
5
  export { PictureRecorder } from './picture-recorder.js';
6
6
  export { PictureEditor } from './picture-editor.js';
@@ -155,8 +155,9 @@ var IadMode = /*#__PURE__*/function (IadMode) {
155
155
  IadMode["PASSIVE_LT"] = "passive-lt";
156
156
  IadMode["ACTIVE_FALLBACK"] = "active-fallback";
157
157
  IadMode["ACTIVE"] = "active";
158
+ IadMode["MEDIA_INTEGRITY"] = "media-integrity";
158
159
  return IadMode;
159
- }({}); // Active challenge only (without passive IAD)
160
+ }({}); // No IAD measures as such, but compute a hash to ensure that the media is not corrupted after capture
160
161
 
161
162
  // This is actually a public subset of the actual type defined in sdk.js
162
163
 
@@ -1,6 +1,6 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2 } from './lit-element-ac3d3a27.js';
2
2
  import { E as EN } from './en-e76ed5a0.js';
3
- import { R as Recorder, b as buildPacked } from './video-recorder-7d643a6c.js';
3
+ import { R as Recorder, b as buildPacked } from './video-recorder-dddb1bd6.js';
4
4
  import './variables-09a3e162.js';
5
5
  import './button.js';
6
6
 
@@ -3,7 +3,7 @@ import './button.js';
3
3
  import './image-capture-directions.js';
4
4
  import './file-upload.js';
5
5
  import './picture-recorder.js';
6
- import { b as buildPacked } from './video-recorder-7d643a6c.js';
6
+ import { b as buildPacked } from './video-recorder-dddb1bd6.js';
7
7
  import { E as EN } from './en-e76ed5a0.js';
8
8
  import { c as referenceCaptureVars } from './variables-09a3e162.js';
9
9
  import './direction-card-f55e1936.js';
@@ -227,7 +227,7 @@ var ReferenceCapture = /*#__PURE__*/function (_LitElement) {
227
227
  key: "renderDirections",
228
228
  value: function renderDirections() {
229
229
  var _this$strings$title, _this$strings$directi, _this$strings$directi2, _this$strings$uploadB, _this$strings$picture, _this$strings$recordV;
230
- return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\"\n >", "</span\n >\n\n <div class=\"directions v-space\">\n <slot name=\"directions\">\n <uni-image-capture-directions\n strings=\"", "\"\n ></uni-image-capture-directions>\n </slot>\n </div>\n\n <div class=\"h-box v-space\">\n <div class=\"btn-items\">\n <slot name=\"action-button\"></slot>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\"><uni-upload-icon></uni-upload-icon></div>\n ", "\n </uni-button>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\">\n <uni-photo-camera-icon></uni-photo-camera-icon>\n </div>\n ", "\n </uni-button>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\">\n <uni-camera-video-outlined-icon></uni-camera-video-outlined-icon>\n </div>\n ", "\n </uni-button>\n </div>\n </div>\n </div>\n "])), (_this$strings$title = this.strings.title) !== null && _this$strings$title !== void 0 ? _this$strings$title : referenceCaptureStrings.title, (_this$strings$directi = this.strings.directionSubtitle) !== null && _this$strings$directi !== void 0 ? _this$strings$directi : referenceCaptureStrings.directionSubtitle, JSON.stringify((_this$strings$directi2 = this.strings.directions) !== null && _this$strings$directi2 !== void 0 ? _this$strings$directi2 : referenceCaptureStrings.directions), this.displayUploadStep, (_this$strings$uploadB = this.strings.uploadBtn) !== null && _this$strings$uploadB !== void 0 ? _this$strings$uploadB : referenceCaptureStrings.uploadBtn, this.displayPictureRecordStep, (_this$strings$picture = this.strings.pictureBtn) !== null && _this$strings$picture !== void 0 ? _this$strings$picture : referenceCaptureStrings.pictureBtn, this.displayVideoRecordStep, (_this$strings$recordV = this.strings.recordVidBtn) !== null && _this$strings$recordV !== void 0 ? _this$strings$recordV : referenceCaptureStrings.recordVidBtn);
230
+ return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\">", "</span>\n\n <div class=\"directions v-space\">\n <slot name=\"directions\">\n <uni-image-capture-directions\n strings=\"", "\"\n ></uni-image-capture-directions>\n </slot>\n </div>\n\n <div class=\"h-box v-space\">\n <div class=\"btn-items\">\n <slot name=\"action-button\"></slot>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\"><uni-upload-icon></uni-upload-icon></div>\n ", "\n </uni-button>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\">\n <uni-photo-camera-icon></uni-photo-camera-icon>\n </div>\n ", "\n </uni-button>\n </div>\n\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <div slot=\"icon\">\n <uni-camera-video-outlined-icon></uni-camera-video-outlined-icon>\n </div>\n ", "\n </uni-button>\n </div>\n </div>\n </div>\n "])), (_this$strings$title = this.strings.title) !== null && _this$strings$title !== void 0 ? _this$strings$title : referenceCaptureStrings.title, (_this$strings$directi = this.strings.directionSubtitle) !== null && _this$strings$directi !== void 0 ? _this$strings$directi : referenceCaptureStrings.directionSubtitle, JSON.stringify((_this$strings$directi2 = this.strings.directions) !== null && _this$strings$directi2 !== void 0 ? _this$strings$directi2 : referenceCaptureStrings.directions), this.displayUploadStep, (_this$strings$uploadB = this.strings.uploadBtn) !== null && _this$strings$uploadB !== void 0 ? _this$strings$uploadB : referenceCaptureStrings.uploadBtn, this.displayPictureRecordStep, (_this$strings$picture = this.strings.pictureBtn) !== null && _this$strings$picture !== void 0 ? _this$strings$picture : referenceCaptureStrings.pictureBtn, this.displayVideoRecordStep, (_this$strings$recordV = this.strings.recordVidBtn) !== null && _this$strings$recordV !== void 0 ? _this$strings$recordV : referenceCaptureStrings.recordVidBtn);
231
231
  }
232
232
  }, {
233
233
  key: "renderFileUpload",
@@ -251,7 +251,7 @@ var ReferenceCapture = /*#__PURE__*/function (_LitElement) {
251
251
  key: "renderVideoRecord",
252
252
  value: function renderVideoRecord() {
253
253
  var _this$strings$title3, _this$strings$videoRe, _this$strings$videoRe2, _this$recorderOptions2, _this$strings$back3;
254
- return x(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\"\n >", "</span\n >\n\n <div class=\"recorder v-space\">\n <uni-video-recorder\n id=\"uni-video-recorder\"\n strings=\"", "\"\n preset=\"", "\"\n log-level=\"", "\"\n face-checker=\"disabled\"\n @record=\"", "\"\n @recorderReady=\"", "\"\n @recordCompleted=\"", "\"\n @recordStarting=\"", "\"\n @recordCapturing=\"", "\"\n @recordInterrupted=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <div slot=\"left\">\n <uni-button variant=\"outlined\" @click=\"", "\">\n <uni-back-arrow-icon slot=\"icon\"></uni-back-arrow-icon>\n ", "\n </uni-button>\n </div>\n </uni-video-recorder>\n </div>\n </div>\n "])), (_this$strings$title3 = this.strings.title) !== null && _this$strings$title3 !== void 0 ? _this$strings$title3 : referenceCaptureStrings.title, (_this$strings$videoRe = this.strings.videoRecordSubtitle) !== null && _this$strings$videoRe !== void 0 ? _this$strings$videoRe : referenceCaptureStrings.videoRecordSubtitle, JSON.stringify((_this$strings$videoRe2 = this.strings.videoRecorder) !== null && _this$strings$videoRe2 !== void 0 ? _this$strings$videoRe2 : referenceCaptureStrings.videoRecorder), buildPacked.exports.AcquisitionPreset.DOC_VIDEO, (_this$recorderOptions2 = this.recorderOptions) === null || _this$recorderOptions2 === void 0 ? void 0 : _this$recorderOptions2.logLevel, this.handleVideoRecord, this.handleVideoRecoderReady, this.handleRecordCompleted, this.handleRecordStarting, this.handleRecordCapturing, this.handleRecordInterrupted, this.hideCaptureBtn, this.disableDebugMode, this.displayDirectionsStep, (_this$strings$back3 = this.strings.back) !== null && _this$strings$back3 !== void 0 ? _this$strings$back3 : referenceCaptureStrings.back);
254
+ return x(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\">", "</span>\n\n <div class=\"recorder v-space\">\n <uni-video-recorder\n id=\"uni-video-recorder\"\n strings=\"", "\"\n preset=\"", "\"\n log-level=\"", "\"\n face-checker=\"disabled\"\n @record=\"", "\"\n @recorderReady=\"", "\"\n @recordCompleted=\"", "\"\n @recordStarting=\"", "\"\n @recordCapturing=\"", "\"\n @recordInterrupted=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <div slot=\"left\">\n <uni-button variant=\"outlined\" @click=\"", "\">\n <uni-back-arrow-icon slot=\"icon\"></uni-back-arrow-icon>\n ", "\n </uni-button>\n </div>\n </uni-video-recorder>\n </div>\n </div>\n "])), (_this$strings$title3 = this.strings.title) !== null && _this$strings$title3 !== void 0 ? _this$strings$title3 : referenceCaptureStrings.title, (_this$strings$videoRe = this.strings.videoRecordSubtitle) !== null && _this$strings$videoRe !== void 0 ? _this$strings$videoRe : referenceCaptureStrings.videoRecordSubtitle, JSON.stringify((_this$strings$videoRe2 = this.strings.videoRecorder) !== null && _this$strings$videoRe2 !== void 0 ? _this$strings$videoRe2 : referenceCaptureStrings.videoRecorder), buildPacked.exports.AcquisitionPreset.DOC_VIDEO, (_this$recorderOptions2 = this.recorderOptions) === null || _this$recorderOptions2 === void 0 ? void 0 : _this$recorderOptions2.logLevel, this.handleVideoRecord, this.handleVideoRecoderReady, this.handleRecordCompleted, this.handleRecordStarting, this.handleRecordCapturing, this.handleRecordInterrupted, this.hideCaptureBtn, this.disableDebugMode, this.displayDirectionsStep, (_this$strings$back3 = this.strings.back) !== null && _this$strings$back3 !== void 0 ? _this$strings$back3 : referenceCaptureStrings.back);
255
255
  }
256
256
  }, {
257
257
  key: "renderVideoReplay",
@@ -1,6 +1,6 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i } from './lit-element-ac3d3a27.js';
2
2
  import { E as EN } from './en-e76ed5a0.js';
3
- import { b as buildPacked } from './video-recorder-7d643a6c.js';
3
+ import { b as buildPacked } from './video-recorder-dddb1bd6.js';
4
4
  import './video-record-directions.js';
5
5
  import './button.js';
6
6
  import { s as selfieCaptureVars } from './variables-09a3e162.js';
@@ -97,7 +97,7 @@ var SelfieCapture = /*#__PURE__*/function (_LitElement) {
97
97
  key: "renderDirections",
98
98
  value: function renderDirections() {
99
99
  var _this$strings$title, _this$strings$directi, _this$strings$directi2, _this$strings$recordB;
100
- return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\"\n >", "</span\n >\n\n <div class=\"v-space\"></div>\n\n <div class=\"directions\">\n <slot name=\"directions\">\n <uni-video-record-directions\n strings=\"", "\"\n >\n </uni-video-record-directions>\n </slot>\n </div>\n\n <div class=\"v-space\"></div>\n\n <div class=\"h-box\">\n <div class=\"btn-items\">\n <slot name=\"action-button\"></slot>\n </div>\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <uni-camera-video-outlined-icon slot=\"icon\"></uni-camera-video-outlined-icon>\n ", "\n </uni-button>\n </div>\n </div>\n </div>\n "])), (_this$strings$title = this.strings.title) !== null && _this$strings$title !== void 0 ? _this$strings$title : selfieCaptureStrings.title, (_this$strings$directi = this.strings.directionSubtitle) !== null && _this$strings$directi !== void 0 ? _this$strings$directi : selfieCaptureStrings.directionSubtitle, JSON.stringify((_this$strings$directi2 = this.strings.directions) !== null && _this$strings$directi2 !== void 0 ? _this$strings$directi2 : selfieCaptureStrings.directions), this.handleRecordStart, (_this$strings$recordB = this.strings.recordBtnLabel) !== null && _this$strings$recordB !== void 0 ? _this$strings$recordB : selfieCaptureStrings.recordBtnLabel);
100
+ return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <div class=\"box\">\n <h1 class=\"title\">", "</h1>\n <span class=\"subtitle\">", "</span>\n\n <div class=\"v-space\"></div>\n\n <div class=\"directions\">\n <slot name=\"directions\">\n <uni-video-record-directions\n strings=\"", "\"\n >\n </uni-video-record-directions>\n </slot>\n </div>\n\n <div class=\"v-space\"></div>\n\n <div class=\"h-box\">\n <div class=\"btn-items\">\n <slot name=\"action-button\"></slot>\n </div>\n <div class=\"btn-items\">\n <uni-button @click=\"", "\">\n <uni-camera-video-outlined-icon slot=\"icon\"></uni-camera-video-outlined-icon>\n ", "\n </uni-button>\n </div>\n </div>\n </div>\n "])), (_this$strings$title = this.strings.title) !== null && _this$strings$title !== void 0 ? _this$strings$title : selfieCaptureStrings.title, (_this$strings$directi = this.strings.directionSubtitle) !== null && _this$strings$directi !== void 0 ? _this$strings$directi : selfieCaptureStrings.directionSubtitle, JSON.stringify((_this$strings$directi2 = this.strings.directions) !== null && _this$strings$directi2 !== void 0 ? _this$strings$directi2 : selfieCaptureStrings.directions), this.handleRecordStart, (_this$strings$recordB = this.strings.recordBtnLabel) !== null && _this$strings$recordB !== void 0 ? _this$strings$recordB : selfieCaptureStrings.recordBtnLabel);
101
101
  }
102
102
  }, {
103
103
  key: "renderRecorder",