@unissey-web/web-components 5.0.0-beta.1 → 5.0.0-beta.10

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.
@@ -4,4 +4,4 @@ function commonjsRequire (path) {
4
4
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
5
5
  }
6
6
 
7
- export { commonjsGlobal as a, commonjsRequire as c };
7
+ export { commonjsRequire as a, commonjsGlobal as c };
package/dist/button.js CHANGED
@@ -1,5 +1,5 @@
1
- import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x, s, b as _classCallCheck, c as _callSuper } from './lit-element-ac3d3a27.js';
2
- import { b as buttonsVars, d as defaultVars } from './variables-b4a2d316.js';
1
+ import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x, s, b as _classCallCheck, c as _callSuper } from './lit-element-83035a6f.js';
2
+ import { e as buttonsVars, d as defaultVars } from './variables-c07a8719.js';
3
3
 
4
4
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
5
5
  var Button = /*#__PURE__*/function (_LitElement) {
@@ -1,5 +1,5 @@
1
- import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x, s, b as _classCallCheck, c as _callSuper } from './lit-element-ac3d3a27.js';
2
- import { d as defaultVars, e as directionCardsVars } from './variables-b4a2d316.js';
1
+ import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x, s, b as _classCallCheck, c as _callSuper } from './lit-element-83035a6f.js';
2
+ import { d as defaultVars, c as directionCardsVars } from './variables-c07a8719.js';
3
3
 
4
4
  var _templateObject$1;
5
5
  var directionsStyle = i(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n .layout {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .item {\n margin-top: 15px;\n width: 100%;\n }\n"])));
@@ -21,7 +21,10 @@ var videoRecorder = {
21
21
  capture: "Record a video",
22
22
  retry: "Retry",
23
23
  errors: {
24
- noFace: "We couldn't detect a face, please try again."
24
+ noFace: "We couldn't detect a face, please try again.",
25
+ activeChallenge: "Action failed. Please try again.",
26
+ sdkError: "There has been an error while processing",
27
+ unsupportedFaceDetector: "The face detector is not supported on the current device, please try again."
25
28
  },
26
29
  hints: {
27
30
  up: "Move your face up",
@@ -1,7 +1,7 @@
1
- import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2, g as _asyncToGenerator, h as _regeneratorRuntime } from './lit-element-ac3d3a27.js';
2
- import { E as EN } from './en-e76ed5a0.js';
3
- import { f as fileUploadVars } from './variables-b4a2d316.js';
4
- import { a as commonjsGlobal } from './_commonjsHelpers-cef27602.js';
1
+ import { i, d as _taggedTemplateLiteral, _ as _inherits, a as _createClass, x, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2, f as _asyncToGenerator, g as _regenerator } from './lit-element-83035a6f.js';
2
+ import { E as EN } from './en-066d960b.js';
3
+ import { f as fileUploadVars } from './variables-c07a8719.js';
4
+ import { c as commonjsGlobal } from './_commonjsHelpers-02146103.js';
5
5
 
6
6
  var heic2any$1 = {exports: {}};
7
7
 
@@ -319,54 +319,53 @@ var FileUpload = /*#__PURE__*/function (_LitElement) {
319
319
  }, {
320
320
  key: "handleFileSelection",
321
321
  value: function () {
322
- var _handleFileSelection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(files) {
322
+ var _handleFileSelection = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(files) {
323
323
  var file, _this$validateFile, isFileValid, error, convertedFile;
324
- return _regeneratorRuntime().wrap(function _callee$(_context) {
325
- while (1) switch (_context.prev = _context.next) {
324
+ return _regenerator().w(function (_context) {
325
+ while (1) switch (_context.n) {
326
326
  case 0:
327
327
  if (!(files.length === 1)) {
328
- _context.next = 16;
328
+ _context.n = 5;
329
329
  break;
330
330
  }
331
331
  file = files.item(0);
332
332
  _this$validateFile = _objectSpread2({}, this.validateFile("".concat(file === null || file === void 0 ? void 0 : file.type), (file === null || file === void 0 ? void 0 : file.size) || 0)), isFileValid = _this$validateFile.valid, error = _this$validateFile.error;
333
333
  if (!isFileValid) {
334
- _context.next = 15;
334
+ _context.n = 4;
335
335
  break;
336
336
  }
337
337
  if (!(file && file.type === "image/heic")) {
338
- _context.next = 11;
338
+ _context.n = 2;
339
339
  break;
340
340
  }
341
- _context.next = 7;
341
+ _context.n = 1;
342
342
  return heic2any({
343
343
  blob: file,
344
344
  toType: "image/jpg"
345
345
  });
346
- case 7:
347
- convertedFile = _context.sent;
346
+ case 1:
347
+ convertedFile = _context.v;
348
348
  this.dispatchEvent(new CustomEvent("change", {
349
349
  detail: {
350
350
  file: convertedFile
351
351
  }
352
352
  }));
353
- _context.next = 12;
353
+ _context.n = 3;
354
354
  break;
355
- case 11:
355
+ case 2:
356
356
  this.dispatchEvent(new CustomEvent("change", {
357
357
  detail: {
358
358
  file: file
359
359
  }
360
360
  }));
361
- case 12:
361
+ case 3:
362
362
  this.error = "";
363
- _context.next = 16;
363
+ _context.n = 5;
364
364
  break;
365
- case 15:
365
+ case 4:
366
366
  this.error = error;
367
- case 16:
368
- case "end":
369
- return _context.stop();
367
+ case 5:
368
+ return _context.a(2);
370
369
  }
371
370
  }, _callee, this);
372
371
  }));
@@ -1,13 +1,13 @@
1
- import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper } from './lit-element-ac3d3a27.js';
1
+ import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper } from './lit-element-83035a6f.js';
2
2
  import { selfieCaptureStrings } from './selfie-capture.js';
3
3
  import { referenceCaptureStrings } from './reference-capture.js';
4
4
  import './button.js';
5
- import './en-e76ed5a0.js';
6
- import './video-recorder-1c6c128e.js';
7
- import './_commonjsHelpers-cef27602.js';
8
- import './variables-b4a2d316.js';
5
+ import './en-066d960b.js';
6
+ import './video-recorder-287c7e54.js';
7
+ import './_commonjsHelpers-02146103.js';
8
+ import './variables-c07a8719.js';
9
9
  import './video-record-directions.js';
10
- import './direction-card-df682b7a.js';
10
+ import './direction-card-5904f865.js';
11
11
  import './image-capture-directions.js';
12
12
  import './file-upload.js';
13
13
  import './picture-recorder.js';
@@ -54,10 +54,25 @@ var FullCapture = /*#__PURE__*/function (_LitElement) {
54
54
  recorderElmt: e.detail.recorderElmt,
55
55
  mediaType: e.detail.mediaType,
56
56
  contentKind: e.detail.contentKind,
57
- acquisitionTIme: e.detail.acquisitionTime
57
+ acquisitionTIme: e.detail.acquisitionTime,
58
+ activeChallengeNumActions: e.detail.activeChallengeNumActions
58
59
  }
59
60
  }));
60
61
  }
62
+ }, {
63
+ key: "handleReferenceActiveChallenge",
64
+ value: function handleReferenceActiveChallenge(e) {
65
+ this.dispatchEvent(new CustomEvent("referenceActiveChallenge", {
66
+ detail: e.detail
67
+ }));
68
+ }
69
+ }, {
70
+ key: "handleSelfieActiveChallenge",
71
+ value: function handleSelfieActiveChallenge(e) {
72
+ this.dispatchEvent(new CustomEvent("selfieActiveChallenge", {
73
+ detail: e.detail
74
+ }));
75
+ }
61
76
  }, {
62
77
  key: "handleBack",
63
78
  value: function handleBack() {
@@ -67,13 +82,13 @@ var FullCapture = /*#__PURE__*/function (_LitElement) {
67
82
  key: "renderReferenceStep",
68
83
  value: function renderReferenceStep() {
69
84
  var _this$strings$referen, _this$strings$referen2, _this$strings$referen3;
70
- return x(_templateObject || (_templateObject = _taggedTemplateLiteral([" <uni-reference-capture\n @reference=\"", "\"\n @recorderReady=\"", "\"\n recorder-options=\"", "\"\n strings=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <slot name=\"reference-directions\" slot=\"directions\">\n <uni-image-capture-directions\n strings=\"", "\"\n ></uni-image-capture-directions>\n </slot>\n\n <slot name=\"reference-action-button\" slot=\"action-button\"></slot>\n </uni-reference-capture>"])), this.handleReference, this.handleRecoderReady, JSON.stringify(this.recorderOptions), JSON.stringify((_this$strings$referen = this.strings.reference) !== null && _this$strings$referen !== void 0 ? _this$strings$referen : referenceCaptureStrings), this.hideReferenceCaptureBtn, this.disableDebugMode, JSON.stringify((_this$strings$referen2 = (_this$strings$referen3 = this.strings.reference) === null || _this$strings$referen3 === void 0 ? void 0 : _this$strings$referen3.directions) !== null && _this$strings$referen2 !== void 0 ? _this$strings$referen2 : referenceCaptureStrings.directions));
85
+ return x(_templateObject || (_templateObject = _taggedTemplateLiteral([" <uni-reference-capture\n @reference=\"", "\"\n @recorderReady=\"", "\"\n @activeChallenge=\"", "\"\n recorder-options=\"", "\"\n strings=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <slot name=\"reference-directions\" slot=\"directions\">\n <uni-image-capture-directions\n strings=\"", "\"\n ></uni-image-capture-directions>\n </slot>\n\n <slot name=\"reference-action-button\" slot=\"action-button\"></slot>\n <slot name=\"refererence-ac-top-hints\" slot=\"ac-top-hints\"></slot>\n <slot name=\"reference-ac-face-hints\" slot=\"ac-face-hints\"></slot>\n <slot name=\"reference-ac-bottom-hints\" slot=\"ac-bottom-hints\"></slot>\n </uni-reference-capture>"])), this.handleReference, this.handleRecoderReady, this.handleReferenceActiveChallenge, JSON.stringify(this.recorderOptions), JSON.stringify((_this$strings$referen = this.strings.reference) !== null && _this$strings$referen !== void 0 ? _this$strings$referen : referenceCaptureStrings), this.hideReferenceCaptureBtn, this.disableDebugMode, JSON.stringify((_this$strings$referen2 = (_this$strings$referen3 = this.strings.reference) === null || _this$strings$referen3 === void 0 ? void 0 : _this$strings$referen3.directions) !== null && _this$strings$referen2 !== void 0 ? _this$strings$referen2 : referenceCaptureStrings.directions));
71
86
  }
72
87
  }, {
73
88
  key: "renderSelfieStep",
74
89
  value: function renderSelfieStep() {
75
90
  var _this$strings$selfie, _this$strings$selfie$, _this$strings$selfie2, _this$strings$selfie$2, _this$strings$selfie3;
76
- return x(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["<uni-selfie-capture\n @selfie=\"", "\"\n @recorderReady=\"", "\"\n strings=\"", "\"\n recorder-options=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <slot name=\"selfie-directions\" slot=\"directions\">\n <uni-video-record-directions\n strings=\"", "\"\n >\n </uni-video-record-directions>\n </slot>\n <uni-button slot=\"action-button\" variant=\"outlined\" @click=\"", "\">\n <uni-back-arrow-icon slot=\"icon\"></uni-back-arrow-icon>\n ", "\n </uni-button>\n </uni-selfie-capture>"])), this.handleSelfie, this.handleRecoderReady, JSON.stringify((_this$strings$selfie = this.strings.selfie) !== null && _this$strings$selfie !== void 0 ? _this$strings$selfie : selfieCaptureStrings), JSON.stringify(this.recorderOptions), this.hideSelfieCaptureBtn, this.disableDebugMode, JSON.stringify((_this$strings$selfie$ = (_this$strings$selfie2 = this.strings.selfie) === null || _this$strings$selfie2 === void 0 ? void 0 : _this$strings$selfie2.directions) !== null && _this$strings$selfie$ !== void 0 ? _this$strings$selfie$ : selfieCaptureStrings.directions), this.handleBack, (_this$strings$selfie$2 = (_this$strings$selfie3 = this.strings.selfie) === null || _this$strings$selfie3 === void 0 ? void 0 : _this$strings$selfie3.back) !== null && _this$strings$selfie$2 !== void 0 ? _this$strings$selfie$2 : selfieCaptureStrings.back);
91
+ return x(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["<uni-selfie-capture\n @selfie=\"", "\"\n @recorderReady=\"", "\"\n @activeChallenge=\"", "\"\n strings=\"", "\"\n recorder-options=\"", "\"\n ?hide-capture-btn=", "\n ?disable-debug-mode=", "\n >\n <slot name=\"selfie-directions\" slot=\"directions\">\n <uni-video-record-directions\n strings=\"", "\"\n >\n </uni-video-record-directions>\n </slot>\n <uni-button slot=\"action-button\" variant=\"outlined\" @click=\"", "\">\n <uni-back-arrow-icon slot=\"icon\"></uni-back-arrow-icon>\n ", "\n </uni-button>\n <slot name=\"selfie-ac-top-hints\" slot=\"ac-top-hints\"></slot>\n <slot name=\"selfie-ac-face-hints\" slot=\"ac-face-hints\"></slot>\n <slot name=\"selfie-ac-bottom-hints\" slot=\"ac-bottom-hints\"></slot>\n </uni-selfie-capture>"])), this.handleSelfie, this.handleRecoderReady, this.handleSelfieActiveChallenge, JSON.stringify((_this$strings$selfie = this.strings.selfie) !== null && _this$strings$selfie !== void 0 ? _this$strings$selfie : selfieCaptureStrings), JSON.stringify(this.recorderOptions), this.hideSelfieCaptureBtn, this.disableDebugMode, JSON.stringify((_this$strings$selfie$ = (_this$strings$selfie2 = this.strings.selfie) === null || _this$strings$selfie2 === void 0 ? void 0 : _this$strings$selfie2.directions) !== null && _this$strings$selfie$ !== void 0 ? _this$strings$selfie$ : selfieCaptureStrings.directions), this.handleBack, (_this$strings$selfie$2 = (_this$strings$selfie3 = this.strings.selfie) === null || _this$strings$selfie3 === void 0 ? void 0 : _this$strings$selfie3.back) !== null && _this$strings$selfie$2 !== void 0 ? _this$strings$selfie$2 : selfieCaptureStrings.back);
77
92
  }
78
93
  }, {
79
94
  key: "render",
@@ -1,7 +1,7 @@
1
- import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i, e as _objectSpread2 } from './lit-element-ac3d3a27.js';
2
- import { d as directionsStyle } from './direction-card-df682b7a.js';
3
- import { d as defaultVars } from './variables-b4a2d316.js';
4
- import { E as EN } from './en-e76ed5a0.js';
1
+ import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i, e as _objectSpread2 } from './lit-element-83035a6f.js';
2
+ import { d as directionsStyle } from './direction-card-5904f865.js';
3
+ import { d as defaultVars } from './variables-c07a8719.js';
4
+ import { E as EN } from './en-066d960b.js';
5
5
 
6
6
  var _templateObject$3;
7
7
  var FaceCardPicto = /*#__PURE__*/function (_LitElement) {
package/dist/index.d.ts CHANGED
@@ -93,6 +93,9 @@ declare const EN: {
93
93
  retry: string;
94
94
  errors: {
95
95
  noFace: string;
96
+ activeChallenge: string;
97
+ sdkError: string;
98
+ unsupportedFaceDetector: string;
96
99
  };
97
100
  hints: {
98
101
  up: string;
@@ -180,6 +183,9 @@ declare const EN: {
180
183
  retry: string;
181
184
  errors: {
182
185
  noFace: string;
186
+ activeChallenge: string;
187
+ sdkError: string;
188
+ unsupportedFaceDetector: string;
183
189
  };
184
190
  hints: {
185
191
  up: string;
@@ -238,6 +244,9 @@ declare const EN: {
238
244
  retry: string;
239
245
  errors: {
240
246
  noFace: string;
247
+ activeChallenge: string;
248
+ sdkError: string;
249
+ unsupportedFaceDetector: string;
241
250
  };
242
251
  hints: {
243
252
  up: string;
@@ -280,10 +289,6 @@ declare const EN: {
280
289
  };
281
290
  type I18n = typeof EN;
282
291
 
283
- type InstructionMessage = {
284
- message: string;
285
- duration: number;
286
- };
287
292
  declare class Recorder extends LitElement {
288
293
  session: UnisseySession | null;
289
294
  sessionPromise: Promise<void> | null;
@@ -298,15 +303,15 @@ declare class Recorder extends LitElement {
298
303
  };
299
304
  mediaType: string;
300
305
  faceChecker: FaceChecker;
301
- instructionMessage: string;
302
- instructionTimer: number;
303
306
  instructions: string[];
304
- instructionNumber: number;
305
307
  defaultStrings: {
306
308
  capture: string;
307
309
  retry: string;
308
310
  errors: {
309
311
  noFace: string;
312
+ activeChallenge: string;
313
+ sdkError: string;
314
+ unsupportedFaceDetector: string;
310
315
  };
311
316
  hints: {
312
317
  up: string;
@@ -350,8 +355,8 @@ declare class Recorder extends LitElement {
350
355
  willRetryCapture: boolean;
351
356
  isCameraFlipped: boolean;
352
357
  faceDetectionFails: boolean;
358
+ activeChallengeFails: boolean;
353
359
  disableDebugMode: boolean;
354
- actionToDisplay: string | undefined;
355
360
  actionState: "success" | "error" | undefined;
356
361
  static properties: {
357
362
  preset: {
@@ -409,15 +414,6 @@ declare class Recorder extends LitElement {
409
414
  instructions: {
410
415
  state: boolean;
411
416
  };
412
- instructionMessage: {
413
- state: boolean;
414
- };
415
- instructionTimer: {
416
- state: boolean;
417
- };
418
- actionToDisplay: {
419
- state: boolean;
420
- };
421
417
  isActionSuccessful: {
422
418
  state: boolean;
423
419
  };
@@ -436,6 +432,7 @@ declare class Recorder extends LitElement {
436
432
  private releaseSdkJs;
437
433
  private sdkJsListener_status;
438
434
  private sdkJsListener_faceInfo;
435
+ private handleError;
439
436
  private sdkJsListener_issue;
440
437
  private sdkJsListener_activeChallenge;
441
438
  private buildSessionConfig;
@@ -443,8 +440,7 @@ declare class Recorder extends LitElement {
443
440
  private initSession;
444
441
  private handleBadFacePos;
445
442
  private resetHints;
446
- private setDimensionsToElement;
447
- private adjustContainerSize;
443
+ private setVideoCustomStyle;
448
444
  private displaySpinner;
449
445
  private hideSpinner;
450
446
  displayError(message?: string): Promise<void>;
@@ -641,6 +637,9 @@ declare const selfieCaptureStrings: {
641
637
  retry: string;
642
638
  errors: {
643
639
  noFace: string;
640
+ activeChallenge: string;
641
+ sdkError: string;
642
+ unsupportedFaceDetector: string;
644
643
  };
645
644
  hints: {
646
645
  up: string;
@@ -677,7 +676,6 @@ type RecorderOptions$1 = Partial<{
677
676
  logLevel: LogLevel$1;
678
677
  config: Partial<SessionConfig$1>;
679
678
  faceChecker: FaceChecker;
680
- instructionMessages: InstructionMessage[];
681
679
  }>;
682
680
  declare class SelfieCapture extends LitElement {
683
681
  captureStep: CaptureStep$2;
@@ -726,6 +724,7 @@ declare class SelfieCapture extends LitElement {
726
724
  handleRecoderReady(e: CustomEvent<{
727
725
  mediaType: string;
728
726
  acquisitionTime: number;
727
+ activeChallengeNumActions?: number;
729
728
  }>): void;
730
729
  handleRecordCompleted(e: CustomEvent<{
731
730
  media: Blob;
@@ -735,6 +734,10 @@ declare class SelfieCapture extends LitElement {
735
734
  handleRecordStarting(e: CustomEvent): void;
736
735
  handleRecordCapturing(e: CustomEvent): void;
737
736
  handleRecordInterrupted(e: CustomEvent): void;
737
+ handleActiveChallenge(e: CustomEvent<{
738
+ action?: string;
739
+ status?: string;
740
+ }>): void;
738
741
  renderDirections(): lit_html.TemplateResult<1>;
739
742
  renderRecorder(): lit_html.TemplateResult<1>;
740
743
  render(): lit_html.TemplateResult<1>;
@@ -798,6 +801,9 @@ declare const referenceCaptureStrings: {
798
801
  retry: string;
799
802
  errors: {
800
803
  noFace: string;
804
+ activeChallenge: string;
805
+ sdkError: string;
806
+ unsupportedFaceDetector: string;
801
807
  };
802
808
  hints: {
803
809
  up: string;
@@ -896,6 +902,7 @@ declare class ReferenceCapture extends LitElement {
896
902
  handlePictureRecoderReady(e: CustomEvent<{
897
903
  mediaType: string;
898
904
  acquisitionTime: number;
905
+ activeChallengeNumActions?: number;
899
906
  }>): void;
900
907
  handleRecordCompleted(e: CustomEvent<{
901
908
  media: Blob;
@@ -905,6 +912,10 @@ declare class ReferenceCapture extends LitElement {
905
912
  handleRecordStarting(e: CustomEvent): void;
906
913
  handleRecordCapturing(e: CustomEvent): void;
907
914
  handleRecordInterrupted(e: CustomEvent): void;
915
+ handleActiveChallenge(e: CustomEvent<{
916
+ action?: string;
917
+ status?: string;
918
+ }>): void;
908
919
  renderDirections(): lit_html.TemplateResult<1>;
909
920
  renderFileUpload(): lit_html.TemplateResult<1>;
910
921
  renderPictureEditor(): lit_html.TemplateResult<1>;
@@ -943,6 +954,9 @@ declare const fullCaptureStrings: {
943
954
  retry: string;
944
955
  errors: {
945
956
  noFace: string;
957
+ activeChallenge: string;
958
+ sdkError: string;
959
+ unsupportedFaceDetector: string;
946
960
  };
947
961
  hints: {
948
962
  up: string;
@@ -1004,6 +1018,9 @@ declare const fullCaptureStrings: {
1004
1018
  retry: string;
1005
1019
  errors: {
1006
1020
  noFace: string;
1021
+ activeChallenge: string;
1022
+ sdkError: string;
1023
+ unsupportedFaceDetector: string;
1007
1024
  };
1008
1025
  hints: {
1009
1026
  up: string;
@@ -1083,6 +1100,15 @@ declare class FullCapture extends LitElement {
1083
1100
  mediaType: string;
1084
1101
  contentKind: string;
1085
1102
  acquisitionTime?: number;
1103
+ activeChallengeNumActions?: number;
1104
+ }>): void;
1105
+ handleReferenceActiveChallenge(e: CustomEvent<{
1106
+ action?: string;
1107
+ status?: string;
1108
+ }>): void;
1109
+ handleSelfieActiveChallenge(e: CustomEvent<{
1110
+ action?: string;
1111
+ status?: string;
1086
1112
  }>): void;
1087
1113
  handleBack(): void;
1088
1114
  renderReferenceStep(): lit_html.TemplateResult<1>;
@@ -1093,9 +1119,9 @@ declare class FullCapture extends LitElement {
1093
1119
  declare const FR: I18n;
1094
1120
 
1095
1121
  declare enum AcquisitionPreset {
1096
- SELFIE_FAST = "selfie-fast",
1097
- SELFIE_SUBSTANTIAL = "selfie-substantial",
1098
- SELFIE_OPTIMIZED = "selfie-optimized",
1122
+ SELFIE_MJPEG = "selfie-mjpeg",
1123
+ SELFIE_STD = "selfie-standard",
1124
+ SELFIE_COMPOSITE = "selfie-composite",
1099
1125
  NO_RECORD = "no-record",
1100
1126
  DOC_VIDEO = "doc-video",
1101
1127
  DOC_IMAGE = "doc-image"
@@ -1103,11 +1129,11 @@ declare enum AcquisitionPreset {
1103
1129
  declare enum IadMode {
1104
1130
  DISABLED = "disabled",
1105
1131
  INTEGRITY = "integrity",
1106
- BASELINE = "baseline",
1132
+ BASIC = "basic",
1107
1133
  PASSIVE = "passive",
1108
1134
  SUBSTANTIAL = "substantial",
1109
1135
  MEDIA_INTEGRITY = "integrity",
1110
- PASSIVE_LT = "baseline"
1136
+ PASSIVE_LT = "basic"
1111
1137
  }
1112
1138
  type IadConfig = {
1113
1139
  mode: IadMode;
@@ -1115,7 +1141,11 @@ type IadConfig = {
1115
1141
  activeChallengeConfig?: ActiveChallengeConfig;
1116
1142
  };
1117
1143
  type ActiveChallengeConfig = {
1118
- maxSecondsBetweenActions?: number;
1144
+ maxSecondsBetweenActions: number;
1145
+ numberOfInstructions?: number;
1146
+ disableAutomaticDetection?: boolean;
1147
+ additionalRecord?: boolean;
1148
+ selfieBeforeAction?: number;
1119
1149
  customActions?: CustomAction[];
1120
1150
  };
1121
1151
  type CustomAction = {
@@ -1208,4 +1238,4 @@ interface SessionConfig {
1208
1238
  };
1209
1239
  }
1210
1240
 
1211
- export { AcquisitionPreset, ActiveChallengeConfig, Animation, Button, CameraConfig, CameraVideoOutlinedIcon, ColorRGBA, DirectionCard, EN, FR, FaceChecker, FacingMode, FileUpload, FullCapture, IadConfig, IadMode, ImageCaptureDirections, InstructionMessage, LogLevel, OverlayColors, OverlayConfig, OverlayDisplayMode, OverlayHints, PictureEditor, PictureRecorder, Recorder, RecorderExt, RecorderOptions$1 as RecorderOptions, RecordingConfig, ReferenceCapture, RetryResult, SelfieCapture, SessionConfig, VideoLength, VideoOrientation, VideoRecordDirections, VideoResolutionPreset };
1241
+ export { AcquisitionPreset, ActiveChallengeConfig, Animation, Button, CameraConfig, CameraVideoOutlinedIcon, ColorRGBA, CustomAction, DirectionCard, EN, FR, FaceChecker, FacingMode, FileUpload, FullCapture, IadConfig, IadMode, ImageCaptureDirections, LogLevel, OverlayColors, OverlayConfig, OverlayDisplayMode, OverlayHints, PictureEditor, PictureRecorder, Recorder, RecorderExt, RecorderOptions$1 as RecorderOptions, RecordingConfig, ReferenceCapture, RetryResult, SelfieCapture, SessionConfig, VideoLength, VideoOrientation, VideoRecordDirections, VideoResolutionPreset };
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  export { Button } from './button.js';
2
- import { R as Recorder } from './video-recorder-1c6c128e.js';
3
- export { A as Animation, C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-1c6c128e.js';
2
+ import { R as Recorder } from './video-recorder-287c7e54.js';
3
+ export { A as Animation, C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-287c7e54.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';
7
7
  export { FileUpload } from './file-upload.js';
8
8
  export { ImageCaptureDirections } from './image-capture-directions.js';
9
- import { _ as _inherits, a as _createClass, b as _classCallCheck, c as _callSuper } from './lit-element-ac3d3a27.js';
9
+ import { _ as _inherits, a as _createClass, b as _classCallCheck, c as _callSuper } from './lit-element-83035a6f.js';
10
10
  export { RetryResult } from './retry-result.js';
11
11
  export { SelfieCapture } from './selfie-capture.js';
12
12
  export { ReferenceCapture } from './reference-capture.js';
13
13
  export { FullCapture } from './full-capture.js';
14
- export { D as DirectionCard } from './direction-card-df682b7a.js';
15
- export { E as EN } from './en-e76ed5a0.js';
16
- import './variables-b4a2d316.js';
17
- import './_commonjsHelpers-cef27602.js';
14
+ export { D as DirectionCard } from './direction-card-5904f865.js';
15
+ export { E as EN } from './en-066d960b.js';
16
+ import './variables-c07a8719.js';
17
+ import './_commonjsHelpers-02146103.js';
18
18
 
19
19
  // @ts-ignore
20
20
 
@@ -32,7 +32,10 @@ var videoRecorder = {
32
32
  capture: "Enregistrer une vidéo",
33
33
  retry: "Réessayer",
34
34
  errors: {
35
- noFace: "Votre visage n'a pas pu être détecté, veuillez réessayer."
35
+ noFace: "Votre visage n'a pas pu être détecté, veuillez réessayer.",
36
+ activeChallenge: "Action échouée. Veuillez réessayer.",
37
+ sdkError: "Une erreur s'est produite lors du traitement",
38
+ unsupportedFaceDetector: "Le détecteur de visage n'est pas supporté sur l'appareil actuel, veuillez réessayer."
36
39
  },
37
40
  hints: {
38
41
  up: "Plus vers le haut",
@@ -142,9 +145,9 @@ var FR = {
142
145
  };
143
146
 
144
147
  var AcquisitionPreset = /*#__PURE__*/function (AcquisitionPreset) {
145
- AcquisitionPreset["SELFIE_FAST"] = "selfie-fast";
146
- AcquisitionPreset["SELFIE_SUBSTANTIAL"] = "selfie-substantial";
147
- AcquisitionPreset["SELFIE_OPTIMIZED"] = "selfie-optimized";
148
+ AcquisitionPreset["SELFIE_MJPEG"] = "selfie-mjpeg";
149
+ AcquisitionPreset["SELFIE_STD"] = "selfie-standard";
150
+ AcquisitionPreset["SELFIE_COMPOSITE"] = "selfie-composite";
148
151
  AcquisitionPreset["NO_RECORD"] = "no-record";
149
152
  AcquisitionPreset["DOC_VIDEO"] = "doc-video";
150
153
  AcquisitionPreset["DOC_IMAGE"] = "doc-image";
@@ -152,12 +155,19 @@ var AcquisitionPreset = /*#__PURE__*/function (AcquisitionPreset) {
152
155
  }({});
153
156
  var IadMode = /*#__PURE__*/function (IadMode) {
154
157
  IadMode["DISABLED"] = "disabled";
158
+ // No IAD (equivalent to keep 'iadConfig' undefined)
155
159
  IadMode["INTEGRITY"] = "integrity";
156
- IadMode["BASELINE"] = "baseline";
160
+ // No IAD measures as such, but compute a hash to ensure that the media is not corrupted after capture
161
+ IadMode["BASIC"] = "basic";
162
+ // IadMode.MEDIA_INTEGRITY + Basic IAD check (Virtual Camera and Emulators detection). No Randomness.
157
163
  IadMode["PASSIVE"] = "passive";
164
+ // IadMode.BASIC + passive randomness when applicable = All passive countermeasures: Substantial passive (with randomness) countermeasures when applicable, otherwise Baseline (passive) countermeasures
158
165
  IadMode["SUBSTANTIAL"] = "substantial";
166
+ // IadMode.PASSIVE + Active Challenge when passive randomness is not applicable
167
+ /** @deprecated Use 'INTEGRITY' instead */
159
168
  IadMode["MEDIA_INTEGRITY"] = "integrity";
160
- IadMode["PASSIVE_LT"] = "baseline";
169
+ /** @deprecated Use 'BASIC' instead - but it requires preparation 'data'*/
170
+ IadMode["PASSIVE_LT"] = "basic";
161
171
  return IadMode;
162
172
  }({});
163
173