@unissey-web/web-components 5.0.0-alpha.8 → 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.
- package/dist/{_commonjsHelpers-cef27602.js → _commonjsHelpers-02146103.js} +1 -1
- package/dist/button.js +2 -2
- package/dist/{direction-card-277681c3.js → direction-card-5904f865.js} +2 -2
- package/dist/{en-e76ed5a0.js → en-066d960b.js} +4 -1
- package/dist/file-upload.js +20 -21
- package/dist/full-capture.js +24 -9
- package/dist/image-capture-directions.js +4 -4
- package/dist/index.d.ts +87 -26
- package/dist/index.js +23 -13
- package/dist/{lit-element-ac3d3a27.js → lit-element-83035a6f.js} +101 -294
- package/dist/picture-editor.js +47 -54
- package/dist/picture-recorder.js +5 -5
- package/dist/reference-capture.js +17 -9
- package/dist/retry-result.js +6 -6
- package/dist/selfie-capture.js +17 -9
- package/dist/variables-c07a8719.js +100 -0
- package/dist/video-record-directions.js +4 -4
- package/dist/video-recorder-287c7e54.js +1177 -0
- package/dist/video-recorder.js +5 -5
- package/package.json +4 -3
- package/dist/variables-55f57e89.js +0 -99
- package/dist/video-recorder-14345052.js +0 -1133
|
@@ -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 {
|
|
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-
|
|
2
|
-
import {
|
|
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-
|
|
2
|
-
import { d as defaultVars,
|
|
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",
|
package/dist/file-upload.js
CHANGED
|
@@ -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,
|
|
2
|
-
import { E as EN } from './en-
|
|
3
|
-
import { f as fileUploadVars } from './variables-
|
|
4
|
-
import {
|
|
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(
|
|
322
|
+
var _handleFileSelection = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(files) {
|
|
323
323
|
var file, _this$validateFile, isFileValid, error, convertedFile;
|
|
324
|
-
return
|
|
325
|
-
while (1) switch (_context.
|
|
324
|
+
return _regenerator().w(function (_context) {
|
|
325
|
+
while (1) switch (_context.n) {
|
|
326
326
|
case 0:
|
|
327
327
|
if (!(files.length === 1)) {
|
|
328
|
-
_context.
|
|
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.
|
|
334
|
+
_context.n = 4;
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
337
337
|
if (!(file && file.type === "image/heic")) {
|
|
338
|
-
_context.
|
|
338
|
+
_context.n = 2;
|
|
339
339
|
break;
|
|
340
340
|
}
|
|
341
|
-
_context.
|
|
341
|
+
_context.n = 1;
|
|
342
342
|
return heic2any({
|
|
343
343
|
blob: file,
|
|
344
344
|
toType: "image/jpg"
|
|
345
345
|
});
|
|
346
|
-
case
|
|
347
|
-
convertedFile = _context.
|
|
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.
|
|
353
|
+
_context.n = 3;
|
|
354
354
|
break;
|
|
355
|
-
case
|
|
355
|
+
case 2:
|
|
356
356
|
this.dispatchEvent(new CustomEvent("change", {
|
|
357
357
|
detail: {
|
|
358
358
|
file: file
|
|
359
359
|
}
|
|
360
360
|
}));
|
|
361
|
-
case
|
|
361
|
+
case 3:
|
|
362
362
|
this.error = "";
|
|
363
|
-
_context.
|
|
363
|
+
_context.n = 5;
|
|
364
364
|
break;
|
|
365
|
-
case
|
|
365
|
+
case 4:
|
|
366
366
|
this.error = error;
|
|
367
|
-
case
|
|
368
|
-
|
|
369
|
-
return _context.stop();
|
|
367
|
+
case 5:
|
|
368
|
+
return _context.a(2);
|
|
370
369
|
}
|
|
371
370
|
}, _callee, this);
|
|
372
371
|
}));
|
package/dist/full-capture.js
CHANGED
|
@@ -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-
|
|
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-
|
|
6
|
-
import './video-recorder-
|
|
7
|
-
import './_commonjsHelpers-
|
|
8
|
-
import './variables-
|
|
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-
|
|
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-
|
|
2
|
-
import { d as directionsStyle } from './direction-card-
|
|
3
|
-
import { d as defaultVars } from './variables-
|
|
4
|
-
import { E as EN } from './en-
|
|
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
|
@@ -61,6 +61,27 @@ declare class OverlayHints extends LitElement {
|
|
|
61
61
|
render(): lit_html.TemplateResult<1>;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
declare class Animation extends LitElement {
|
|
65
|
+
animationPath: string | undefined;
|
|
66
|
+
loop: boolean;
|
|
67
|
+
autoplay: boolean;
|
|
68
|
+
static properties: {
|
|
69
|
+
animationPath: {
|
|
70
|
+
attribute: string;
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
};
|
|
73
|
+
loop: {
|
|
74
|
+
attribute: string;
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
};
|
|
77
|
+
autoplay: {
|
|
78
|
+
attribute: string;
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
render(): lit_html.TemplateResult<1>;
|
|
83
|
+
}
|
|
84
|
+
|
|
64
85
|
declare class CameraVideoOutlinedIcon extends LitElement {
|
|
65
86
|
static styles: lit.CSSResult;
|
|
66
87
|
render(): lit_html.TemplateResult<1>;
|
|
@@ -72,6 +93,9 @@ declare const EN: {
|
|
|
72
93
|
retry: string;
|
|
73
94
|
errors: {
|
|
74
95
|
noFace: string;
|
|
96
|
+
activeChallenge: string;
|
|
97
|
+
sdkError: string;
|
|
98
|
+
unsupportedFaceDetector: string;
|
|
75
99
|
};
|
|
76
100
|
hints: {
|
|
77
101
|
up: string;
|
|
@@ -159,6 +183,9 @@ declare const EN: {
|
|
|
159
183
|
retry: string;
|
|
160
184
|
errors: {
|
|
161
185
|
noFace: string;
|
|
186
|
+
activeChallenge: string;
|
|
187
|
+
sdkError: string;
|
|
188
|
+
unsupportedFaceDetector: string;
|
|
162
189
|
};
|
|
163
190
|
hints: {
|
|
164
191
|
up: string;
|
|
@@ -217,6 +244,9 @@ declare const EN: {
|
|
|
217
244
|
retry: string;
|
|
218
245
|
errors: {
|
|
219
246
|
noFace: string;
|
|
247
|
+
activeChallenge: string;
|
|
248
|
+
sdkError: string;
|
|
249
|
+
unsupportedFaceDetector: string;
|
|
220
250
|
};
|
|
221
251
|
hints: {
|
|
222
252
|
up: string;
|
|
@@ -259,10 +289,6 @@ declare const EN: {
|
|
|
259
289
|
};
|
|
260
290
|
type I18n = typeof EN;
|
|
261
291
|
|
|
262
|
-
type InstructionMessage = {
|
|
263
|
-
message: string;
|
|
264
|
-
duration: number;
|
|
265
|
-
};
|
|
266
292
|
declare class Recorder extends LitElement {
|
|
267
293
|
session: UnisseySession | null;
|
|
268
294
|
sessionPromise: Promise<void> | null;
|
|
@@ -277,16 +303,15 @@ declare class Recorder extends LitElement {
|
|
|
277
303
|
};
|
|
278
304
|
mediaType: string;
|
|
279
305
|
faceChecker: FaceChecker;
|
|
280
|
-
instructionMessages: InstructionMessage[];
|
|
281
|
-
instructionMessage: string;
|
|
282
|
-
instructionTimer: number;
|
|
283
306
|
instructions: string[];
|
|
284
|
-
instructionNumber: number;
|
|
285
307
|
defaultStrings: {
|
|
286
308
|
capture: string;
|
|
287
309
|
retry: string;
|
|
288
310
|
errors: {
|
|
289
311
|
noFace: string;
|
|
312
|
+
activeChallenge: string;
|
|
313
|
+
sdkError: string;
|
|
314
|
+
unsupportedFaceDetector: string;
|
|
290
315
|
};
|
|
291
316
|
hints: {
|
|
292
317
|
up: string;
|
|
@@ -330,7 +355,9 @@ declare class Recorder extends LitElement {
|
|
|
330
355
|
willRetryCapture: boolean;
|
|
331
356
|
isCameraFlipped: boolean;
|
|
332
357
|
faceDetectionFails: boolean;
|
|
358
|
+
activeChallengeFails: boolean;
|
|
333
359
|
disableDebugMode: boolean;
|
|
360
|
+
actionState: "success" | "error" | undefined;
|
|
334
361
|
static properties: {
|
|
335
362
|
preset: {
|
|
336
363
|
attribute: string;
|
|
@@ -360,10 +387,6 @@ declare class Recorder extends LitElement {
|
|
|
360
387
|
attribute: string;
|
|
361
388
|
type: NumberConstructor;
|
|
362
389
|
};
|
|
363
|
-
instructionMessages: {
|
|
364
|
-
attribute: string;
|
|
365
|
-
type: ArrayConstructor;
|
|
366
|
-
};
|
|
367
390
|
disableDebugMode: {
|
|
368
391
|
attribute: string;
|
|
369
392
|
type: BooleanConstructor;
|
|
@@ -391,10 +414,7 @@ declare class Recorder extends LitElement {
|
|
|
391
414
|
instructions: {
|
|
392
415
|
state: boolean;
|
|
393
416
|
};
|
|
394
|
-
|
|
395
|
-
state: boolean;
|
|
396
|
-
};
|
|
397
|
-
instructionTimer: {
|
|
417
|
+
isActionSuccessful: {
|
|
398
418
|
state: boolean;
|
|
399
419
|
};
|
|
400
420
|
};
|
|
@@ -412,6 +432,7 @@ declare class Recorder extends LitElement {
|
|
|
412
432
|
private releaseSdkJs;
|
|
413
433
|
private sdkJsListener_status;
|
|
414
434
|
private sdkJsListener_faceInfo;
|
|
435
|
+
private handleError;
|
|
415
436
|
private sdkJsListener_issue;
|
|
416
437
|
private sdkJsListener_activeChallenge;
|
|
417
438
|
private buildSessionConfig;
|
|
@@ -419,8 +440,7 @@ declare class Recorder extends LitElement {
|
|
|
419
440
|
private initSession;
|
|
420
441
|
private handleBadFacePos;
|
|
421
442
|
private resetHints;
|
|
422
|
-
private
|
|
423
|
-
private adjustContainerSize;
|
|
443
|
+
private setVideoCustomStyle;
|
|
424
444
|
private displaySpinner;
|
|
425
445
|
private hideSpinner;
|
|
426
446
|
displayError(message?: string): Promise<void>;
|
|
@@ -617,6 +637,9 @@ declare const selfieCaptureStrings: {
|
|
|
617
637
|
retry: string;
|
|
618
638
|
errors: {
|
|
619
639
|
noFace: string;
|
|
640
|
+
activeChallenge: string;
|
|
641
|
+
sdkError: string;
|
|
642
|
+
unsupportedFaceDetector: string;
|
|
620
643
|
};
|
|
621
644
|
hints: {
|
|
622
645
|
up: string;
|
|
@@ -653,7 +676,6 @@ type RecorderOptions$1 = Partial<{
|
|
|
653
676
|
logLevel: LogLevel$1;
|
|
654
677
|
config: Partial<SessionConfig$1>;
|
|
655
678
|
faceChecker: FaceChecker;
|
|
656
|
-
instructionMessages: InstructionMessage[];
|
|
657
679
|
}>;
|
|
658
680
|
declare class SelfieCapture extends LitElement {
|
|
659
681
|
captureStep: CaptureStep$2;
|
|
@@ -702,6 +724,7 @@ declare class SelfieCapture extends LitElement {
|
|
|
702
724
|
handleRecoderReady(e: CustomEvent<{
|
|
703
725
|
mediaType: string;
|
|
704
726
|
acquisitionTime: number;
|
|
727
|
+
activeChallengeNumActions?: number;
|
|
705
728
|
}>): void;
|
|
706
729
|
handleRecordCompleted(e: CustomEvent<{
|
|
707
730
|
media: Blob;
|
|
@@ -711,6 +734,10 @@ declare class SelfieCapture extends LitElement {
|
|
|
711
734
|
handleRecordStarting(e: CustomEvent): void;
|
|
712
735
|
handleRecordCapturing(e: CustomEvent): void;
|
|
713
736
|
handleRecordInterrupted(e: CustomEvent): void;
|
|
737
|
+
handleActiveChallenge(e: CustomEvent<{
|
|
738
|
+
action?: string;
|
|
739
|
+
status?: string;
|
|
740
|
+
}>): void;
|
|
714
741
|
renderDirections(): lit_html.TemplateResult<1>;
|
|
715
742
|
renderRecorder(): lit_html.TemplateResult<1>;
|
|
716
743
|
render(): lit_html.TemplateResult<1>;
|
|
@@ -774,6 +801,9 @@ declare const referenceCaptureStrings: {
|
|
|
774
801
|
retry: string;
|
|
775
802
|
errors: {
|
|
776
803
|
noFace: string;
|
|
804
|
+
activeChallenge: string;
|
|
805
|
+
sdkError: string;
|
|
806
|
+
unsupportedFaceDetector: string;
|
|
777
807
|
};
|
|
778
808
|
hints: {
|
|
779
809
|
up: string;
|
|
@@ -872,6 +902,7 @@ declare class ReferenceCapture extends LitElement {
|
|
|
872
902
|
handlePictureRecoderReady(e: CustomEvent<{
|
|
873
903
|
mediaType: string;
|
|
874
904
|
acquisitionTime: number;
|
|
905
|
+
activeChallengeNumActions?: number;
|
|
875
906
|
}>): void;
|
|
876
907
|
handleRecordCompleted(e: CustomEvent<{
|
|
877
908
|
media: Blob;
|
|
@@ -881,6 +912,10 @@ declare class ReferenceCapture extends LitElement {
|
|
|
881
912
|
handleRecordStarting(e: CustomEvent): void;
|
|
882
913
|
handleRecordCapturing(e: CustomEvent): void;
|
|
883
914
|
handleRecordInterrupted(e: CustomEvent): void;
|
|
915
|
+
handleActiveChallenge(e: CustomEvent<{
|
|
916
|
+
action?: string;
|
|
917
|
+
status?: string;
|
|
918
|
+
}>): void;
|
|
884
919
|
renderDirections(): lit_html.TemplateResult<1>;
|
|
885
920
|
renderFileUpload(): lit_html.TemplateResult<1>;
|
|
886
921
|
renderPictureEditor(): lit_html.TemplateResult<1>;
|
|
@@ -919,6 +954,9 @@ declare const fullCaptureStrings: {
|
|
|
919
954
|
retry: string;
|
|
920
955
|
errors: {
|
|
921
956
|
noFace: string;
|
|
957
|
+
activeChallenge: string;
|
|
958
|
+
sdkError: string;
|
|
959
|
+
unsupportedFaceDetector: string;
|
|
922
960
|
};
|
|
923
961
|
hints: {
|
|
924
962
|
up: string;
|
|
@@ -980,6 +1018,9 @@ declare const fullCaptureStrings: {
|
|
|
980
1018
|
retry: string;
|
|
981
1019
|
errors: {
|
|
982
1020
|
noFace: string;
|
|
1021
|
+
activeChallenge: string;
|
|
1022
|
+
sdkError: string;
|
|
1023
|
+
unsupportedFaceDetector: string;
|
|
983
1024
|
};
|
|
984
1025
|
hints: {
|
|
985
1026
|
up: string;
|
|
@@ -1059,6 +1100,15 @@ declare class FullCapture extends LitElement {
|
|
|
1059
1100
|
mediaType: string;
|
|
1060
1101
|
contentKind: string;
|
|
1061
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;
|
|
1062
1112
|
}>): void;
|
|
1063
1113
|
handleBack(): void;
|
|
1064
1114
|
renderReferenceStep(): lit_html.TemplateResult<1>;
|
|
@@ -1069,9 +1119,9 @@ declare class FullCapture extends LitElement {
|
|
|
1069
1119
|
declare const FR: I18n;
|
|
1070
1120
|
|
|
1071
1121
|
declare enum AcquisitionPreset {
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1122
|
+
SELFIE_MJPEG = "selfie-mjpeg",
|
|
1123
|
+
SELFIE_STD = "selfie-standard",
|
|
1124
|
+
SELFIE_COMPOSITE = "selfie-composite",
|
|
1075
1125
|
NO_RECORD = "no-record",
|
|
1076
1126
|
DOC_VIDEO = "doc-video",
|
|
1077
1127
|
DOC_IMAGE = "doc-image"
|
|
@@ -1079,11 +1129,11 @@ declare enum AcquisitionPreset {
|
|
|
1079
1129
|
declare enum IadMode {
|
|
1080
1130
|
DISABLED = "disabled",
|
|
1081
1131
|
INTEGRITY = "integrity",
|
|
1082
|
-
|
|
1132
|
+
BASIC = "basic",
|
|
1083
1133
|
PASSIVE = "passive",
|
|
1084
1134
|
SUBSTANTIAL = "substantial",
|
|
1085
1135
|
MEDIA_INTEGRITY = "integrity",
|
|
1086
|
-
PASSIVE_LT = "
|
|
1136
|
+
PASSIVE_LT = "basic"
|
|
1087
1137
|
}
|
|
1088
1138
|
type IadConfig = {
|
|
1089
1139
|
mode: IadMode;
|
|
@@ -1091,7 +1141,18 @@ type IadConfig = {
|
|
|
1091
1141
|
activeChallengeConfig?: ActiveChallengeConfig;
|
|
1092
1142
|
};
|
|
1093
1143
|
type ActiveChallengeConfig = {
|
|
1094
|
-
maxSecondsBetweenActions
|
|
1144
|
+
maxSecondsBetweenActions: number;
|
|
1145
|
+
numberOfInstructions?: number;
|
|
1146
|
+
disableAutomaticDetection?: boolean;
|
|
1147
|
+
additionalRecord?: boolean;
|
|
1148
|
+
selfieBeforeAction?: number;
|
|
1149
|
+
customActions?: CustomAction[];
|
|
1150
|
+
};
|
|
1151
|
+
type CustomAction = {
|
|
1152
|
+
durationSec: number;
|
|
1153
|
+
position: number;
|
|
1154
|
+
label: string;
|
|
1155
|
+
message: string;
|
|
1095
1156
|
};
|
|
1096
1157
|
type VideoLength = {
|
|
1097
1158
|
type: "duration";
|
|
@@ -1177,4 +1238,4 @@ interface SessionConfig {
|
|
|
1177
1238
|
};
|
|
1178
1239
|
}
|
|
1179
1240
|
|
|
1180
|
-
export { AcquisitionPreset, ActiveChallengeConfig, Button, CameraConfig, CameraVideoOutlinedIcon, ColorRGBA, DirectionCard, EN, FR, FaceChecker, FacingMode, FileUpload, FullCapture, IadConfig, IadMode, ImageCaptureDirections,
|
|
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-
|
|
3
|
-
export { C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-
|
|
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-
|
|
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-
|
|
15
|
-
export { E as EN } from './en-
|
|
16
|
-
import './variables-
|
|
17
|
-
import './_commonjsHelpers-
|
|
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["
|
|
146
|
-
AcquisitionPreset["
|
|
147
|
-
AcquisitionPreset["
|
|
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
|
-
|
|
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
|
-
|
|
169
|
+
/** @deprecated Use 'BASIC' instead - but it requires preparation 'data'*/
|
|
170
|
+
IadMode["PASSIVE_LT"] = "basic";
|
|
161
171
|
return IadMode;
|
|
162
172
|
}({});
|
|
163
173
|
|