@unissey-web/sdk-angular 3.7.2

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 (46) hide show
  1. package/README.md +311 -0
  2. package/dist/unissey-sdk/README.md +311 -0
  3. package/dist/unissey-sdk/bundles/unissey-web-sdk-angular.umd.js +1117 -0
  4. package/dist/unissey-sdk/bundles/unissey-web-sdk-angular.umd.js.map +1 -0
  5. package/dist/unissey-sdk/esm2015/lib/components/button/button.component.js +27 -0
  6. package/dist/unissey-sdk/esm2015/lib/components/file-upload/file-upload.component.js +62 -0
  7. package/dist/unissey-sdk/esm2015/lib/components/full-capture/full-capture.component.js +85 -0
  8. package/dist/unissey-sdk/esm2015/lib/components/image-capture-directions/image-capture-directions.component.js +30 -0
  9. package/dist/unissey-sdk/esm2015/lib/components/picture-editor/picture-editor.component.js +66 -0
  10. package/dist/unissey-sdk/esm2015/lib/components/picture-recorder/picture-recorder.component.js +127 -0
  11. package/dist/unissey-sdk/esm2015/lib/components/reference-capture/reference-capture.component.js +135 -0
  12. package/dist/unissey-sdk/esm2015/lib/components/retry-result/retry-result.component.js +69 -0
  13. package/dist/unissey-sdk/esm2015/lib/components/selfie-capture/selfie.component.js +139 -0
  14. package/dist/unissey-sdk/esm2015/lib/components/unissey-sdk-widget.component.js +22 -0
  15. package/dist/unissey-sdk/esm2015/lib/components/video-capture-directions/video-capture-directions.component.js +31 -0
  16. package/dist/unissey-sdk/esm2015/lib/components/video-recorder/video-recorder.component.js +168 -0
  17. package/dist/unissey-sdk/esm2015/lib/translations/en.js +11 -0
  18. package/dist/unissey-sdk/esm2015/lib/unissey-sdk.module.js +78 -0
  19. package/dist/unissey-sdk/esm2015/lib/unissey-sdk.service.js +14 -0
  20. package/dist/unissey-sdk/esm2015/lib/utils/components.js +2 -0
  21. package/dist/unissey-sdk/esm2015/lib/utils/types.js +2 -0
  22. package/dist/unissey-sdk/esm2015/public-api.js +21 -0
  23. package/dist/unissey-sdk/esm2015/unissey-web-sdk-angular.js +5 -0
  24. package/dist/unissey-sdk/fesm2015/unissey-web-sdk-angular.js +1028 -0
  25. package/dist/unissey-sdk/fesm2015/unissey-web-sdk-angular.js.map +1 -0
  26. package/dist/unissey-sdk/lib/components/button/button.component.d.ts +9 -0
  27. package/dist/unissey-sdk/lib/components/file-upload/file-upload.component.d.ts +39 -0
  28. package/dist/unissey-sdk/lib/components/full-capture/full-capture.component.d.ts +59 -0
  29. package/dist/unissey-sdk/lib/components/image-capture-directions/image-capture-directions.component.d.ts +15 -0
  30. package/dist/unissey-sdk/lib/components/picture-editor/picture-editor.component.d.ts +29 -0
  31. package/dist/unissey-sdk/lib/components/picture-recorder/picture-recorder.component.d.ts +56 -0
  32. package/dist/unissey-sdk/lib/components/reference-capture/reference-capture.component.d.ts +96 -0
  33. package/dist/unissey-sdk/lib/components/retry-result/retry-result.component.d.ts +36 -0
  34. package/dist/unissey-sdk/lib/components/selfie-capture/selfie.component.d.ts +97 -0
  35. package/dist/unissey-sdk/lib/components/unissey-sdk-widget.component.d.ts +10 -0
  36. package/dist/unissey-sdk/lib/components/video-capture-directions/video-capture-directions.component.d.ts +16 -0
  37. package/dist/unissey-sdk/lib/components/video-recorder/video-recorder.component.d.ts +156 -0
  38. package/dist/unissey-sdk/lib/translations/en.d.ts +239 -0
  39. package/dist/unissey-sdk/lib/unissey-sdk.module.d.ts +19 -0
  40. package/dist/unissey-sdk/lib/unissey-sdk.service.d.ts +6 -0
  41. package/dist/unissey-sdk/lib/utils/components.d.ts +64 -0
  42. package/dist/unissey-sdk/lib/utils/types.d.ts +30 -0
  43. package/dist/unissey-sdk/package.json +20 -0
  44. package/dist/unissey-sdk/public-api.d.ts +18 -0
  45. package/dist/unissey-sdk/unissey-web-sdk-angular.d.ts +5 -0
  46. package/package.json +76 -0
@@ -0,0 +1,1117 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@unissey-web/web-components/dist/button'), require('@unissey-web/web-components/dist/reference-capture'), require('@unissey-web/web-components/dist/full-capture'), require('@unissey-web/web-components'), require('@unissey-web/web-components/dist/selfie-capture'), require('@unissey-web/web-components/dist/image-capture-directions'), require('@unissey-web/web-components/dist/picture-editor'), require('@unissey-web/web-components/dist/picture-recorder'), require('@unissey-web/web-components/dist/retry-result'), require('@unissey-web/web-components/dist/video-record-directions'), require('@unissey-web/web-components/dist/video-recorder'), require('@angular/common')) :
3
+ typeof define === 'function' && define.amd ? define('@unissey-web/sdk-angular', ['exports', '@angular/core', '@unissey-web/web-components/dist/button', '@unissey-web/web-components/dist/reference-capture', '@unissey-web/web-components/dist/full-capture', '@unissey-web/web-components', '@unissey-web/web-components/dist/selfie-capture', '@unissey-web/web-components/dist/image-capture-directions', '@unissey-web/web-components/dist/picture-editor', '@unissey-web/web-components/dist/picture-recorder', '@unissey-web/web-components/dist/retry-result', '@unissey-web/web-components/dist/video-record-directions', '@unissey-web/web-components/dist/video-recorder', '@angular/common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["unissey-web"] = global["unissey-web"] || {}, global["unissey-web"]["sdk-angular"] = {}), global.ng.core, null, null, null, global["@unissey-web/web-components"], null, null, null, null, null, null, null, global.ng.common));
5
+ })(this, (function (exports, i0, button, referenceCapture, fullCapture, webComponents, selfieCapture, imageCaptureDirections, pictureEditor, pictureRecorder, retryResult, videoRecordDirections, videoRecorder, common) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+
27
+ var ButtonComponent = /** @class */ (function () {
28
+ function ButtonComponent() {
29
+ this.variant = "contained";
30
+ this.disabled = false;
31
+ this.width = "auto";
32
+ }
33
+ return ButtonComponent;
34
+ }());
35
+ ButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ButtonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
36
+ ButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ButtonComponent, selector: "unissey-button", inputs: { variant: "variant", disabled: "disabled", width: "width" }, ngImport: i0__namespace, template: "<uni-button [disabled]=\"disabled\" [variant]=\"variant\" [width]=\"width\">\n <div slot=\"icon\">\n <ng-content select=\"[slot=icon]\"></ng-content>\n </div>\n <ng-content></ng-content>\n</uni-button>\n", styles: [""] });
37
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ButtonComponent, decorators: [{
38
+ type: i0.Component,
39
+ args: [{
40
+ selector: "unissey-button",
41
+ templateUrl: "./button.component.html",
42
+ styleUrls: ["./button.component.css"],
43
+ }]
44
+ }], propDecorators: { variant: [{
45
+ type: i0.Input
46
+ }], disabled: [{
47
+ type: i0.Input
48
+ }], width: [{
49
+ type: i0.Input
50
+ }] } });
51
+
52
+ var UnisseySdkService = /** @class */ (function () {
53
+ function UnisseySdkService() {
54
+ }
55
+ return UnisseySdkService;
56
+ }());
57
+ UnisseySdkService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UnisseySdkService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
58
+ UnisseySdkService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UnisseySdkService, providedIn: 'root' });
59
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UnisseySdkService, decorators: [{
60
+ type: i0.Injectable,
61
+ args: [{
62
+ providedIn: 'root'
63
+ }]
64
+ }], ctorParameters: function () { return []; } });
65
+
66
+ // import UnisseySDK, { DSPreset } from "@unissey/sdk-web-js";
67
+ var UnisseySdkComponent = /** @class */ (function () {
68
+ // @Input() dsPreset?: DSPreset;
69
+ function UnisseySdkComponent() {
70
+ }
71
+ UnisseySdkComponent.prototype.ngOnInit = function () { };
72
+ UnisseySdkComponent.prototype.ngOnChanges = function () { };
73
+ UnisseySdkComponent.prototype.ngOnDestroy = function () { };
74
+ return UnisseySdkComponent;
75
+ }());
76
+ UnisseySdkComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UnisseySdkComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
77
+ UnisseySdkComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: UnisseySdkComponent, selector: "unissey-widget", usesOnChanges: true, ngImport: i0__namespace, template: " <p>unissey-sdk works!</p> ", isInline: true, encapsulation: i0__namespace.ViewEncapsulation.None });
78
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UnisseySdkComponent, decorators: [{
79
+ type: i0.Component,
80
+ args: [{
81
+ selector: "unissey-widget",
82
+ template: " <p>unissey-sdk works!</p> ",
83
+ styles: [],
84
+ encapsulation: i0.ViewEncapsulation.None,
85
+ }]
86
+ }], ctorParameters: function () { return []; } });
87
+
88
+ var ReferenceCaptureComponent = /** @class */ (function () {
89
+ function ReferenceCaptureComponent(renderer) {
90
+ this.renderer = renderer;
91
+ this.recorderOptions = {};
92
+ this.strings = {};
93
+ this.hideCaptureBtn = false;
94
+ this.reference = new i0.EventEmitter();
95
+ this.recorderReady = new i0.EventEmitter();
96
+ this.recordStarting = new i0.EventEmitter();
97
+ this.recordCapturing = new i0.EventEmitter();
98
+ this.recordInterrupted = new i0.EventEmitter();
99
+ this.recordCompleted = new i0.EventEmitter();
100
+ }
101
+ /**
102
+ * @internal
103
+ */
104
+ ReferenceCaptureComponent.prototype.ngOnInit = function () {
105
+ this.stringifiedStrings = JSON.stringify(this.strings);
106
+ this.stringifiedRecorderOptions = JSON.stringify(this.recorderOptions);
107
+ };
108
+ ReferenceCaptureComponent.prototype.ngOnChanges = function (changes) {
109
+ if (changes.strings && !changes.strings.firstChange) {
110
+ this.stringifiedStrings = JSON.stringify(changes.strings.currentValue);
111
+ }
112
+ if (changes.recorderOptions && !changes.recorderOptions.firstChange) {
113
+ this.stringifiedRecorderOptions = JSON.stringify(changes.recorderOptions.currentValue);
114
+ }
115
+ };
116
+ /**
117
+ * @internal
118
+ */
119
+ ReferenceCaptureComponent.prototype.onReference = function (event) {
120
+ var media = event.detail.media;
121
+ this.reference.emit({ media: media });
122
+ };
123
+ /**
124
+ * @internal
125
+ */
126
+ ReferenceCaptureComponent.prototype.onRecorderReady = function (event) {
127
+ this.recorderReady.emit(event.detail);
128
+ };
129
+ /**
130
+ * @internal
131
+ */
132
+ ReferenceCaptureComponent.prototype.onRecordStarting = function (event) {
133
+ this.recordStarting.emit(event.detail);
134
+ };
135
+ /**
136
+ * @internal
137
+ */
138
+ ReferenceCaptureComponent.prototype.onRecordCapturing = function (event) {
139
+ this.recordCapturing.emit(event.detail);
140
+ };
141
+ /**
142
+ * @internal
143
+ */
144
+ ReferenceCaptureComponent.prototype.onRecordInterrupted = function (event) {
145
+ this.recordInterrupted.emit(event.detail);
146
+ };
147
+ /**
148
+ * @internal
149
+ */
150
+ ReferenceCaptureComponent.prototype.onRecordCompleted = function (event) {
151
+ this.recordCompleted.emit(event.detail);
152
+ };
153
+ /**
154
+ * @internal
155
+ */
156
+ ReferenceCaptureComponent.prototype.ngAfterViewInit = function () {
157
+ this.referenceUnlistenFct = this.renderer.listen(this.referenceRef.nativeElement, "reference", this.onReference.bind(this));
158
+ this.recorderReadyUnlistenFct = this.renderer.listen(this.referenceRef.nativeElement, "recorderReady", this.onRecorderReady.bind(this));
159
+ this.recordStartingUnlistenFct = this.renderer.listen(this.referenceRef.nativeElement, "recordStarting", this.onRecordStarting.bind(this));
160
+ this.recordCapturingUnlistenFct = this.renderer.listen(this.referenceRef.nativeElement, "recordCapturing", this.onRecordCapturing.bind(this));
161
+ this.recordInterruptedUnlistenFct = this.renderer.listen(this.referenceRef.nativeElement, "recordInterrupted", this.onRecordInterrupted.bind(this));
162
+ this.recordCompletedUnlistenFct = this.renderer.listen(this.referenceRef.nativeElement, "recordCompleted", this.onRecordCompleted.bind(this));
163
+ };
164
+ /**
165
+ * @internal
166
+ */
167
+ ReferenceCaptureComponent.prototype.ngOnDestroy = function () {
168
+ if (this.referenceUnlistenFct) {
169
+ this.referenceUnlistenFct();
170
+ }
171
+ if (this.recorderReadyUnlistenFct) {
172
+ this.recorderReadyUnlistenFct();
173
+ }
174
+ if (this.recordStartingUnlistenFct) {
175
+ this.recordStartingUnlistenFct();
176
+ }
177
+ if (this.recordCapturingUnlistenFct) {
178
+ this.recordCapturingUnlistenFct();
179
+ }
180
+ if (this.recordInterruptedUnlistenFct) {
181
+ this.recordInterruptedUnlistenFct();
182
+ }
183
+ if (this.recordCompletedUnlistenFct) {
184
+ this.recordCompletedUnlistenFct();
185
+ }
186
+ };
187
+ return ReferenceCaptureComponent;
188
+ }());
189
+ ReferenceCaptureComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReferenceCaptureComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
190
+ ReferenceCaptureComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ReferenceCaptureComponent, selector: "unissey-reference-capture", inputs: { recorderOptions: "recorderOptions", strings: "strings", hideCaptureBtn: "hideCaptureBtn" }, outputs: { reference: "reference", recorderReady: "recorderReady", recordStarting: "recordStarting", recordCapturing: "recordCapturing", recordInterrupted: "recordInterrupted", recordCompleted: "recordCompleted" }, viewQueries: [{ propertyName: "referenceRef", first: true, predicate: ["reference"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<uni-reference-capture\n #reference\n [attr.strings]=\"stringifiedStrings\"\n [attr.recorder-options]=\"stringifiedRecorderOptions\"\n [attr.hide-capture-btn]=\"hideCaptureBtn === true ? true : null\"\n>\n <ng-content></ng-content>\n</uni-reference-capture>\n", changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
191
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ReferenceCaptureComponent, decorators: [{
192
+ type: i0.Component,
193
+ args: [{
194
+ selector: "unissey-reference-capture",
195
+ templateUrl: "./reference-capture.component.html",
196
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
197
+ }]
198
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { recorderOptions: [{
199
+ type: i0.Input
200
+ }], strings: [{
201
+ type: i0.Input
202
+ }], hideCaptureBtn: [{
203
+ type: i0.Input
204
+ }], reference: [{
205
+ type: i0.Output
206
+ }], recorderReady: [{
207
+ type: i0.Output
208
+ }], recordStarting: [{
209
+ type: i0.Output
210
+ }], recordCapturing: [{
211
+ type: i0.Output
212
+ }], recordInterrupted: [{
213
+ type: i0.Output
214
+ }], recordCompleted: [{
215
+ type: i0.Output
216
+ }], referenceRef: [{
217
+ type: i0.ViewChild,
218
+ args: ["reference"]
219
+ }] } });
220
+
221
+ var FullCaptureComponent = /** @class */ (function () {
222
+ function FullCaptureComponent(renderer) {
223
+ this.renderer = renderer;
224
+ this.strings = {};
225
+ this.recorderOptions = {};
226
+ this.hideReferenceCaptureBtn = false;
227
+ this.hideSelfieCaptureBtn = false;
228
+ this.data = new i0.EventEmitter();
229
+ this.recorderReady = new i0.EventEmitter();
230
+ }
231
+ /**
232
+ * @internal
233
+ */
234
+ FullCaptureComponent.prototype.ngOnInit = function () {
235
+ this.stringifiedStrings = JSON.stringify(this.strings);
236
+ this.stringifiedRecorderOptions = JSON.stringify(this.recorderOptions);
237
+ };
238
+ FullCaptureComponent.prototype.ngOnChanges = function (changes) {
239
+ if (changes.strings && !changes.strings.firstChange) {
240
+ this.stringifiedStrings = JSON.stringify(changes.strings.currentValue);
241
+ }
242
+ if (changes.recorderOptions && !changes.recorderOptions.firstChange) {
243
+ this.stringifiedRecorderOptions = JSON.stringify(changes.recorderOptions.currentValue);
244
+ }
245
+ };
246
+ /**
247
+ * @internal
248
+ */
249
+ FullCaptureComponent.prototype.onData = function (event) {
250
+ this.data.emit(event.detail);
251
+ };
252
+ /**
253
+ * @internal
254
+ */
255
+ FullCaptureComponent.prototype.onRecorderReady = function (event) {
256
+ this.recorderReady.emit(event.detail);
257
+ };
258
+ /**
259
+ * @internal
260
+ */
261
+ FullCaptureComponent.prototype.ngAfterViewInit = function () {
262
+ this.fullCaptureUnlistenFct = this.renderer.listen(this.fullCaptureRef.nativeElement, "data", this.onData.bind(this));
263
+ this.recorderReadyUnlistenFct = this.renderer.listen(this.fullCaptureRef.nativeElement, "recorderReady", this.onRecorderReady.bind(this));
264
+ };
265
+ /**
266
+ * @internal
267
+ */
268
+ FullCaptureComponent.prototype.ngOnDestroy = function () {
269
+ if (this.fullCaptureUnlistenFct) {
270
+ this.fullCaptureUnlistenFct();
271
+ }
272
+ if (this.recorderReadyUnlistenFct) {
273
+ this.recorderReadyUnlistenFct();
274
+ }
275
+ };
276
+ return FullCaptureComponent;
277
+ }());
278
+ FullCaptureComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FullCaptureComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
279
+ FullCaptureComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FullCaptureComponent, selector: "unissey-full-capture", inputs: { strings: "strings", recorderOptions: "recorderOptions", hideReferenceCaptureBtn: "hideReferenceCaptureBtn", hideSelfieCaptureBtn: "hideSelfieCaptureBtn" }, outputs: { data: "data", recorderReady: "recorderReady" }, viewQueries: [{ propertyName: "fullCaptureRef", first: true, predicate: ["fullCapture"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<uni-full-capture\n #fullCapture\n [attr.strings]=\"stringifiedStrings\"\n [attr.recorder-options]=\"stringifiedRecorderOptions\"\n [attr.hide-selfie-capture-btn]=\"hideSelfieCaptureBtn === true ? true : null\"\n [attr.hide-reference-capture-btn]=\"hideReferenceCaptureBtn === true ? true : null\"\n>\n <ng-content></ng-content>\n</uni-full-capture>\n", changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
280
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FullCaptureComponent, decorators: [{
281
+ type: i0.Component,
282
+ args: [{
283
+ selector: "unissey-full-capture",
284
+ templateUrl: "./full-capture.component.html",
285
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
286
+ }]
287
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { strings: [{
288
+ type: i0.Input
289
+ }], recorderOptions: [{
290
+ type: i0.Input
291
+ }], hideReferenceCaptureBtn: [{
292
+ type: i0.Input
293
+ }], hideSelfieCaptureBtn: [{
294
+ type: i0.Input
295
+ }], data: [{
296
+ type: i0.Output
297
+ }], recorderReady: [{
298
+ type: i0.Output
299
+ }], fullCaptureRef: [{
300
+ type: i0.ViewChild,
301
+ args: ["fullCapture"]
302
+ }] } });
303
+
304
+ var SelfieCaptureComponent = /** @class */ (function () {
305
+ function SelfieCaptureComponent(renderer) {
306
+ this.renderer = renderer;
307
+ this.strings = webComponents.EN.selfieCapture;
308
+ this.recorderOptions = {};
309
+ this.hideCapturePrevBtn = false;
310
+ this.hideCaptureBtn = false;
311
+ this.selfie = new i0.EventEmitter();
312
+ this.recorderReady = new i0.EventEmitter();
313
+ this.recordStarting = new i0.EventEmitter();
314
+ this.recordCapturing = new i0.EventEmitter();
315
+ this.recordInterrupted = new i0.EventEmitter();
316
+ this.recordCompleted = new i0.EventEmitter();
317
+ }
318
+ /**
319
+ * @internal
320
+ */
321
+ SelfieCaptureComponent.prototype.ngOnInit = function () {
322
+ this.stringifiedStrings = JSON.stringify(this.strings);
323
+ this.stringifiedRecorderOptions = JSON.stringify(this.recorderOptions);
324
+ };
325
+ SelfieCaptureComponent.prototype.ngOnChanges = function (changes) {
326
+ if (changes.strings && !changes.strings.firstChange) {
327
+ this.stringifiedStrings = JSON.stringify(changes.strings.currentValue);
328
+ }
329
+ if (changes.recorderOptions && !changes.recorderOptions.firstChange) {
330
+ this.stringifiedRecorderOptions = JSON.stringify(changes.recorderOptions.currentValue);
331
+ }
332
+ };
333
+ /**
334
+ * @internal
335
+ */
336
+ SelfieCaptureComponent.prototype.onSelfie = function (event) {
337
+ var _a = event.detail, media = _a.media, metadata = _a.metadata;
338
+ this.selfie.emit({ media: media, metadata: metadata });
339
+ };
340
+ /**
341
+ * @internal
342
+ */
343
+ SelfieCaptureComponent.prototype.onRecorderReady = function (event) {
344
+ this.recorderReady.emit(event.detail);
345
+ };
346
+ /**
347
+ * @internal
348
+ */
349
+ SelfieCaptureComponent.prototype.onRecordStarting = function (event) {
350
+ this.recordStarting.emit(event.detail);
351
+ };
352
+ /**
353
+ * @internal
354
+ */
355
+ SelfieCaptureComponent.prototype.onRecordCapturing = function (event) {
356
+ this.recordCapturing.emit(event.detail);
357
+ };
358
+ /**
359
+ * @internal
360
+ */
361
+ SelfieCaptureComponent.prototype.onRecordInterrupted = function (event) {
362
+ this.recordInterrupted.emit(event.detail);
363
+ };
364
+ /**
365
+ * @internal
366
+ */
367
+ SelfieCaptureComponent.prototype.onRecordCompleted = function (event) {
368
+ this.recordCompleted.emit(event.detail);
369
+ };
370
+ /**
371
+ * @internal
372
+ */
373
+ SelfieCaptureComponent.prototype.ngAfterViewInit = function () {
374
+ this.selfieUnlistenFct = this.renderer.listen(this.selfieRef.nativeElement, "selfie", this.onSelfie.bind(this));
375
+ this.recorderReadyUnlistenFct = this.renderer.listen(this.selfieRef.nativeElement, "recorderReady", this.onRecorderReady.bind(this));
376
+ this.recordStartingUnlistenFct = this.renderer.listen(this.selfieRef.nativeElement, "recordStarting", this.onRecordStarting.bind(this));
377
+ this.recordCapturingUnlistenFct = this.renderer.listen(this.selfieRef.nativeElement, "recordCapturing", this.onRecordCapturing.bind(this));
378
+ this.recordInterruptedUnlistenFct = this.renderer.listen(this.selfieRef.nativeElement, "recordInterrupted", this.onRecordInterrupted.bind(this));
379
+ this.recordCompletedUnlistenFct = this.renderer.listen(this.selfieRef.nativeElement, "recordCompleted", this.onRecordCompleted.bind(this));
380
+ };
381
+ /**
382
+ * @internal
383
+ */
384
+ SelfieCaptureComponent.prototype.ngOnDestroy = function () {
385
+ if (this.selfieUnlistenFct) {
386
+ this.selfieUnlistenFct();
387
+ }
388
+ if (this.recorderReadyUnlistenFct) {
389
+ this.recorderReadyUnlistenFct();
390
+ }
391
+ if (this.recordStartingUnlistenFct) {
392
+ this.recordStartingUnlistenFct();
393
+ }
394
+ if (this.recordCapturingUnlistenFct) {
395
+ this.recordCapturingUnlistenFct();
396
+ }
397
+ if (this.recordInterruptedUnlistenFct) {
398
+ this.recordInterruptedUnlistenFct();
399
+ }
400
+ if (this.recordCompletedUnlistenFct) {
401
+ this.recordCompletedUnlistenFct();
402
+ }
403
+ };
404
+ return SelfieCaptureComponent;
405
+ }());
406
+ SelfieCaptureComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelfieCaptureComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
407
+ SelfieCaptureComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SelfieCaptureComponent, selector: "unissey-selfie-capture", inputs: { strings: "strings", recorderOptions: "recorderOptions", hideCapturePrevBtn: "hideCapturePrevBtn", hideCaptureBtn: "hideCaptureBtn" }, outputs: { selfie: "selfie", recorderReady: "recorderReady", recordStarting: "recordStarting", recordCapturing: "recordCapturing", recordInterrupted: "recordInterrupted", recordCompleted: "recordCompleted" }, viewQueries: [{ propertyName: "selfieRef", first: true, predicate: ["selfie"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<uni-selfie-capture\n #selfie\n [attr.strings]=\"stringifiedStrings\"\n [attr.recorder-options]=\"stringifiedRecorderOptions\"\n [attr.hide-capture-prev-btn]=\"hideCapturePrevBtn === true ? true : null\"\n [attr.hide-capture-btn]=\"hideCaptureBtn === true ? true : null\"\n>\n <ng-content></ng-content>\n</uni-selfie-capture>\n", changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
408
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelfieCaptureComponent, decorators: [{
409
+ type: i0.Component,
410
+ args: [{
411
+ selector: "unissey-selfie-capture",
412
+ templateUrl: "./selfie.component.html",
413
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
414
+ }]
415
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { strings: [{
416
+ type: i0.Input
417
+ }], recorderOptions: [{
418
+ type: i0.Input
419
+ }], hideCapturePrevBtn: [{
420
+ type: i0.Input
421
+ }], hideCaptureBtn: [{
422
+ type: i0.Input
423
+ }], selfie: [{
424
+ type: i0.Output
425
+ }], recorderReady: [{
426
+ type: i0.Output
427
+ }], recordStarting: [{
428
+ type: i0.Output
429
+ }], recordCapturing: [{
430
+ type: i0.Output
431
+ }], recordInterrupted: [{
432
+ type: i0.Output
433
+ }], recordCompleted: [{
434
+ type: i0.Output
435
+ }], selfieRef: [{
436
+ type: i0.ViewChild,
437
+ args: ["selfie"]
438
+ }] } });
439
+
440
+ var EN = Object.assign({ targetCapture: {
441
+ back: "Back",
442
+ directionSubtitle: "Let's make sure no one's impersonating you",
443
+ recordBtnLabel: "Record a video",
444
+ title: "Record a short video selfie",
445
+ recordSubtitle: "The acquisition will last 1 second",
446
+ directions: Object.assign({}, webComponents.EN.videoRecordDirections),
447
+ recorder: Object.assign({}, webComponents.EN.videoRecorder),
448
+ } }, webComponents.EN);
449
+
450
+ var ImageCaptureDirectionsComponent = /** @class */ (function () {
451
+ function ImageCaptureDirectionsComponent() {
452
+ this.strings = EN.imageCaptureDirections;
453
+ this.instructions = "";
454
+ }
455
+ ImageCaptureDirectionsComponent.prototype.ngOnChanges = function (changes) {
456
+ if (changes.strings && !changes.strings.firstChange) {
457
+ this.instructions = JSON.stringify(changes.strings.currentValue);
458
+ }
459
+ };
460
+ ImageCaptureDirectionsComponent.prototype.ngOnInit = function () {
461
+ this.instructions = JSON.stringify(this.strings);
462
+ };
463
+ return ImageCaptureDirectionsComponent;
464
+ }());
465
+ ImageCaptureDirectionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageCaptureDirectionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
466
+ ImageCaptureDirectionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ImageCaptureDirectionsComponent, selector: "unissey-image-capture-directions", inputs: { strings: "strings" }, usesOnChanges: true, ngImport: i0__namespace, template: "<uni-image-capture-directions [attr.strings]=\"instructions\"></uni-image-capture-directions>\n" });
467
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ImageCaptureDirectionsComponent, decorators: [{
468
+ type: i0.Component,
469
+ args: [{
470
+ selector: "unissey-image-capture-directions",
471
+ templateUrl: "./image-capture-directions.component.html",
472
+ }]
473
+ }], propDecorators: { strings: [{
474
+ type: i0.Input
475
+ }] } });
476
+
477
+ var PictureEditorComponent = /** @class */ (function () {
478
+ function PictureEditorComponent(renderer) {
479
+ this.renderer = renderer;
480
+ this.image = "";
481
+ this.strings = EN.pictureEditor;
482
+ this.validatedImage = new i0.EventEmitter();
483
+ this.editorStrings = "";
484
+ }
485
+ Object.defineProperty(PictureEditorComponent.prototype, "element", {
486
+ /**
487
+ * @internal
488
+ */
489
+ set: function (node) {
490
+ if (!node) {
491
+ if (this.validationUnlistenFct) {
492
+ this.validationUnlistenFct();
493
+ this.validationUnlistenFct = undefined;
494
+ }
495
+ return;
496
+ }
497
+ this.validationUnlistenFct = this.renderer.listen(node.nativeElement, "picture", this.pictureValidated.bind(this));
498
+ },
499
+ enumerable: false,
500
+ configurable: true
501
+ });
502
+ PictureEditorComponent.prototype.ngOnInit = function () {
503
+ this.editorStrings = JSON.stringify(this.strings);
504
+ };
505
+ PictureEditorComponent.prototype.ngOnChanges = function (changes) {
506
+ if (changes.strings && !changes.strings.firstChange) {
507
+ this.editorStrings = JSON.stringify(changes.strings.currentValue);
508
+ }
509
+ };
510
+ PictureEditorComponent.prototype.ngOnDestroy = function () {
511
+ if (this.validationUnlistenFct) {
512
+ this.validationUnlistenFct();
513
+ }
514
+ };
515
+ /**
516
+ * @internal
517
+ */
518
+ PictureEditorComponent.prototype.pictureValidated = function (event) {
519
+ var picture = event.detail.picture;
520
+ this.validatedImage.emit(picture);
521
+ };
522
+ return PictureEditorComponent;
523
+ }());
524
+ PictureEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PictureEditorComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
525
+ PictureEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PictureEditorComponent, selector: "unissey-picture-editor", inputs: { image: "image", strings: "strings" }, outputs: { validatedImage: "validatedImage" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["editor"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<uni-picture-editor #editor [attr.img]=\"image\" [attr.strings]=\"editorStrings\">\n <div slot=\"cancel\">\n <ng-content select=\"[slot=actions]\"></ng-content>\n </div>\n</uni-picture-editor>\n", styles: [""] });
526
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PictureEditorComponent, decorators: [{
527
+ type: i0.Component,
528
+ args: [{
529
+ selector: "unissey-picture-editor",
530
+ templateUrl: "./picture-editor.component.html",
531
+ styleUrls: ["./picture-editor.component.css"],
532
+ }]
533
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { image: [{
534
+ type: i0.Input
535
+ }], strings: [{
536
+ type: i0.Input
537
+ }], validatedImage: [{
538
+ type: i0.Output
539
+ }], element: [{
540
+ type: i0.ViewChild,
541
+ args: ["editor"]
542
+ }] } });
543
+
544
+ var PictureRecorderComponent = /** @class */ (function () {
545
+ function PictureRecorderComponent(renderer) {
546
+ this.renderer = renderer;
547
+ this.recorderOverlay = webComponents.OverlayDisplayMode.ID_DOCUMENT;
548
+ this.preset = webComponents.AcquisitionPreset.DOC_IMAGE;
549
+ this.config = {};
550
+ this.strings = EN.pictureRecorder;
551
+ this.displayFlipCameraBtn = undefined;
552
+ this.hideCaptureBtn = false;
553
+ this.faceChecker = "disabled";
554
+ this.logLevel = webComponents.LogLevel.QUIET;
555
+ this.picture = new i0.EventEmitter();
556
+ this.recordStarting = new i0.EventEmitter();
557
+ this.recordCapturing = new i0.EventEmitter();
558
+ this.recordInterrupted = new i0.EventEmitter();
559
+ this.recordCompleted = new i0.EventEmitter();
560
+ this.recorderStrings = "";
561
+ }
562
+ Object.defineProperty(PictureRecorderComponent.prototype, "recorder", {
563
+ set: function (node) {
564
+ if (!node) {
565
+ if (this.pictureRecUnlistenFct)
566
+ this.pictureRecUnlistenFct();
567
+ if (this.recordStartingRecUnlistenFct)
568
+ this.recordStartingRecUnlistenFct();
569
+ if (this.recordCapturingRecUnlistenFct)
570
+ this.recordCapturingRecUnlistenFct();
571
+ if (this.recordInterruptedRecUnlistenFct)
572
+ this.recordInterruptedRecUnlistenFct();
573
+ if (this.recordCompletedRecUnlistenFct)
574
+ this.recordCompletedRecUnlistenFct();
575
+ return;
576
+ }
577
+ this.pictureRecUnlistenFct = this.renderer.listen(node.nativeElement, "picture", this.pictureRecorded.bind(this));
578
+ this.recordStartingRecUnlistenFct = this.renderer.listen(node.nativeElement, "recordStarting", this.onRecordStarting.bind(this));
579
+ this.recordCapturingRecUnlistenFct = this.renderer.listen(node.nativeElement, "recordCapturing", this.onRecordCapturing.bind(this));
580
+ this.recordInterruptedRecUnlistenFct = this.renderer.listen(node.nativeElement, "recordInterrupted", this.onRecordInterrupted.bind(this));
581
+ this.recordCompletedRecUnlistenFct = this.renderer.listen(node.nativeElement, "recordCompleted", this.onRecordCompleted.bind(this));
582
+ },
583
+ enumerable: false,
584
+ configurable: true
585
+ });
586
+ PictureRecorderComponent.prototype.ngOnInit = function () {
587
+ this.recorderStrings = JSON.stringify(this.strings);
588
+ };
589
+ PictureRecorderComponent.prototype.ngOnChanges = function (changes) {
590
+ if (changes.strings && !changes.strings.firstChange) {
591
+ this.recorderStrings = JSON.stringify(changes.strings.currentValue);
592
+ }
593
+ };
594
+ PictureRecorderComponent.prototype.ngOnDestroy = function () {
595
+ if (this.pictureRecUnlistenFct) {
596
+ this.pictureRecUnlistenFct();
597
+ }
598
+ };
599
+ PictureRecorderComponent.prototype.pictureRecorded = function (event) {
600
+ var picture = event.detail.picture;
601
+ if (picture) {
602
+ this.picture.emit(picture);
603
+ }
604
+ };
605
+ /**
606
+ * @internal
607
+ */
608
+ PictureRecorderComponent.prototype.onRecordStarting = function (event) {
609
+ this.recordStarting.emit(event.detail);
610
+ };
611
+ /**
612
+ * @internal
613
+ */
614
+ PictureRecorderComponent.prototype.onRecordCapturing = function (event) {
615
+ this.recordCapturing.emit(event.detail);
616
+ };
617
+ /**
618
+ * @internal
619
+ */
620
+ PictureRecorderComponent.prototype.onRecordInterrupted = function (event) {
621
+ this.recordInterrupted.emit(event.detail);
622
+ };
623
+ /**
624
+ * @internal
625
+ */
626
+ PictureRecorderComponent.prototype.onRecordCompleted = function (event) {
627
+ if (event.detail.picture) {
628
+ this.recordCompleted.emit(event.detail.picture);
629
+ }
630
+ };
631
+ return PictureRecorderComponent;
632
+ }());
633
+ PictureRecorderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PictureRecorderComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
634
+ PictureRecorderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PictureRecorderComponent, selector: "unissey-picture-recorder", inputs: { preset: "preset", config: "config", strings: "strings", displayFlipCameraBtn: "displayFlipCameraBtn", hideCaptureBtn: "hideCaptureBtn", faceChecker: "faceChecker", logLevel: "logLevel" }, outputs: { picture: "picture", recordStarting: "recordStarting", recordCapturing: "recordCapturing", recordInterrupted: "recordInterrupted", recordCompleted: "recordCompleted" }, viewQueries: [{ propertyName: "recorder", first: true, predicate: ["recorder"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<uni-picture-recorder\n #recorder\n [attr.preset]=\"preset\"\n [attr.config]=\"config\"\n [attr.strings]=\"recorderStrings\"\n [attr.face-checker]=\"faceChecker\"\n [attr.overlay-mode]=\"recorderOverlay\"\n [attr.display-flip-camera-btn]=\"displayFlipCameraBtn === true ? true : null\"\n [attr.hide-capture-btn]=\"hideCaptureBtn === true ? true : null\"\n [attr.log-level]=\"logLevel\"\n>\n <div slot=\"left\">\n <ng-content select=\"[slot=actions]\"></ng-content>\n </div>\n</uni-picture-recorder>\n", styles: [""] });
635
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PictureRecorderComponent, decorators: [{
636
+ type: i0.Component,
637
+ args: [{
638
+ selector: "unissey-picture-recorder",
639
+ templateUrl: "./picture-recorder.component.html",
640
+ styleUrls: ["./picture-recorder.component.css"],
641
+ }]
642
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { recorder: [{
643
+ type: i0.ViewChild,
644
+ args: ["recorder"]
645
+ }], preset: [{
646
+ type: i0.Input
647
+ }], config: [{
648
+ type: i0.Input
649
+ }], strings: [{
650
+ type: i0.Input
651
+ }], displayFlipCameraBtn: [{
652
+ type: i0.Input
653
+ }], hideCaptureBtn: [{
654
+ type: i0.Input
655
+ }], faceChecker: [{
656
+ type: i0.Input
657
+ }], logLevel: [{
658
+ type: i0.Input
659
+ }], picture: [{
660
+ type: i0.Output
661
+ }], recordStarting: [{
662
+ type: i0.Output
663
+ }], recordCapturing: [{
664
+ type: i0.Output
665
+ }], recordInterrupted: [{
666
+ type: i0.Output
667
+ }], recordCompleted: [{
668
+ type: i0.Output
669
+ }] } });
670
+
671
+ var FileUploadComponent = /** @class */ (function () {
672
+ function FileUploadComponent(renderer) {
673
+ this.renderer = renderer;
674
+ this.maxSize = 5000000;
675
+ this.supportedTypes = ["image/png", "image/jpeg", "image/jpg", "image/jp2"];
676
+ this.strings = EN.fileUpload;
677
+ this.file = new i0.EventEmitter();
678
+ this.stringifiedStrings = "";
679
+ }
680
+ /**
681
+ * @internal
682
+ */
683
+ FileUploadComponent.prototype.ngAfterViewInit = function () {
684
+ this.uploaderUnlistenCb = this.renderer.listen(this.uploader.nativeElement, "change", this.emitUploadedFile.bind(this));
685
+ };
686
+ FileUploadComponent.prototype.ngOnInit = function () {
687
+ this.stringifiedStrings = JSON.stringify(this.strings);
688
+ };
689
+ FileUploadComponent.prototype.ngOnChanges = function (changes) {
690
+ if (changes.strings && !changes.strings.firstChange) {
691
+ this.stringifiedStrings = JSON.stringify(changes.strings.currentValue);
692
+ }
693
+ };
694
+ /**
695
+ * @internal
696
+ */
697
+ FileUploadComponent.prototype.ngOnDestroy = function () {
698
+ if (this.uploaderUnlistenCb) {
699
+ this.uploaderUnlistenCb();
700
+ }
701
+ };
702
+ /**
703
+ * @internal
704
+ */
705
+ FileUploadComponent.prototype.emitUploadedFile = function (event) {
706
+ this.file.emit(event.detail.file);
707
+ };
708
+ return FileUploadComponent;
709
+ }());
710
+ FileUploadComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FileUploadComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
711
+ FileUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FileUploadComponent, selector: "unissey-file-upload", inputs: { maxSize: "maxSize", supportedTypes: "supportedTypes", strings: "strings" }, outputs: { file: "file" }, viewQueries: [{ propertyName: "uploader", first: true, predicate: ["uploader"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<uni-file-upload\n #uploader\n [attr.max-size]=\"maxSize\"\n [attr.strings]=\"stringifiedStrings\"\n [attr.supported-types]=\"supportedTypes\"\n></uni-file-upload>\n" });
712
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FileUploadComponent, decorators: [{
713
+ type: i0.Component,
714
+ args: [{
715
+ selector: "unissey-file-upload",
716
+ templateUrl: "./file-upload.component.html",
717
+ }]
718
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { uploader: [{
719
+ type: i0.ViewChild,
720
+ args: ["uploader"]
721
+ }], maxSize: [{
722
+ type: i0.Input
723
+ }], supportedTypes: [{
724
+ type: i0.Input
725
+ }], strings: [{
726
+ type: i0.Input
727
+ }], file: [{
728
+ type: i0.Output
729
+ }] } });
730
+
731
+ var RetryResultComponent = /** @class */ (function () {
732
+ function RetryResultComponent(renderer) {
733
+ this.renderer = renderer;
734
+ this.hint = "generic";
735
+ this.retriesLeft = 2;
736
+ this.strings = webComponents.EN.retryResult;
737
+ this.finish = new i0.EventEmitter();
738
+ this.retry = new i0.EventEmitter();
739
+ this.retryStringifiedStrings = "";
740
+ }
741
+ Object.defineProperty(RetryResultComponent.prototype, "retryView", {
742
+ set: function (node) {
743
+ if (!node) {
744
+ if (this.onFinishListener) {
745
+ this.onFinishListener();
746
+ this.onFinishListener = undefined;
747
+ }
748
+ if (this.onRetryListener) {
749
+ this.onRetryListener();
750
+ this.onRetryListener = undefined;
751
+ }
752
+ return;
753
+ }
754
+ this.onFinishListener = this.renderer.listen(node.nativeElement, "finish", this.onFinishEvent.bind(this));
755
+ this.onRetryListener = this.renderer.listen(node.nativeElement, "retry", this.onRetryEvent.bind(this));
756
+ },
757
+ enumerable: false,
758
+ configurable: true
759
+ });
760
+ RetryResultComponent.prototype.ngOnInit = function () {
761
+ this.retryStringifiedStrings = JSON.stringify(this.retryStringifiedStrings);
762
+ };
763
+ RetryResultComponent.prototype.ngAfterViewInit = function () {
764
+ if (this.retryView) {
765
+ this.onFinishListener = this.renderer.listen(this.retryView.nativeElement, "finish", this.onFinishEvent);
766
+ this.onRetryListener = this.renderer.listen(this.retryView.nativeElement, "retry", this.onRetryEvent);
767
+ }
768
+ };
769
+ RetryResultComponent.prototype.onFinishEvent = function (_) {
770
+ this.finish.emit();
771
+ };
772
+ RetryResultComponent.prototype.onRetryEvent = function (_) {
773
+ this.retry.emit();
774
+ };
775
+ return RetryResultComponent;
776
+ }());
777
+ RetryResultComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RetryResultComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
778
+ RetryResultComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RetryResultComponent, selector: "unissey-retry-result", inputs: { hint: "hint", retriesLeft: "retriesLeft", strings: "strings" }, outputs: { finish: "finish", retry: "retry" }, viewQueries: [{ propertyName: "retryView", first: true, predicate: ["retryView"], descendants: true }], ngImport: i0__namespace, template: "<uni-retry-result\n #retryView\n [attr.retries-left]=\"retriesLeft\"\n [attr.hint-kind]=\"hint\"\n [strings]=\"strings\"\n></uni-retry-result>\n", styles: [""] });
779
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RetryResultComponent, decorators: [{
780
+ type: i0.Component,
781
+ args: [{
782
+ selector: "unissey-retry-result",
783
+ templateUrl: "./retry-result.component.html",
784
+ styleUrls: ["./retry-result.component.css"],
785
+ }]
786
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { hint: [{
787
+ type: i0.Input
788
+ }], retriesLeft: [{
789
+ type: i0.Input
790
+ }], strings: [{
791
+ type: i0.Input
792
+ }], finish: [{
793
+ type: i0.Output
794
+ }], retry: [{
795
+ type: i0.Output
796
+ }], retryView: [{
797
+ type: i0.ViewChild,
798
+ args: ["retryView"]
799
+ }] } });
800
+
801
+ var VideoCaptureDirectionsComponent = /** @class */ (function () {
802
+ function VideoCaptureDirectionsComponent() {
803
+ this.strings = EN.videoRecordDirections;
804
+ this.instructions = "";
805
+ }
806
+ VideoCaptureDirectionsComponent.prototype.ngOnChanges = function (changes) {
807
+ if (changes.strings && !changes.strings.firstChange) {
808
+ this.instructions = JSON.stringify(changes.strings.currentValue);
809
+ }
810
+ };
811
+ VideoCaptureDirectionsComponent.prototype.ngOnInit = function () {
812
+ this.instructions = JSON.stringify(this.strings);
813
+ };
814
+ return VideoCaptureDirectionsComponent;
815
+ }());
816
+ VideoCaptureDirectionsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VideoCaptureDirectionsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
817
+ VideoCaptureDirectionsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VideoCaptureDirectionsComponent, selector: "unissey-video-capture-directions", inputs: { strings: "strings" }, usesOnChanges: true, ngImport: i0__namespace, template: "<uni-video-record-directions [attr.strings]=\"instructions\"></uni-video-record-directions>\n", styles: [""] });
818
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VideoCaptureDirectionsComponent, decorators: [{
819
+ type: i0.Component,
820
+ args: [{
821
+ selector: "unissey-video-capture-directions",
822
+ templateUrl: "./video-capture-directions.component.html",
823
+ styleUrls: ["./video-capture-directions.component.css"],
824
+ }]
825
+ }], propDecorators: { strings: [{
826
+ type: i0.Input
827
+ }] } });
828
+
829
+ var VideoRecorderComponent = /** @class */ (function () {
830
+ function VideoRecorderComponent(renderer) {
831
+ this.renderer = renderer;
832
+ this.strings = EN.videoRecorder;
833
+ this.preset = webComponents.AcquisitionPreset.SELFIE_FAST;
834
+ this.config = {};
835
+ this.instructionMessages = [];
836
+ this.faceChecker = "disabled-on-retry";
837
+ this.displayFlipCameraBtn = false;
838
+ this.hideCaptureBtn = false;
839
+ this.logLevel = webComponents.LogLevel.QUIET;
840
+ this.record = new i0.EventEmitter();
841
+ this.recorderReady = new i0.EventEmitter();
842
+ this.recordStarting = new i0.EventEmitter();
843
+ this.recordCapturing = new i0.EventEmitter();
844
+ this.recordInterrupted = new i0.EventEmitter();
845
+ this.recordCompleted = new i0.EventEmitter();
846
+ this.issue = new i0.EventEmitter();
847
+ }
848
+ /**
849
+ * @internal
850
+ */
851
+ VideoRecorderComponent.prototype.ngOnInit = function () {
852
+ this.stringifiedStrings = JSON.stringify(this.strings);
853
+ this.stringifiedInstructionMessages = JSON.stringify(this.instructionMessages);
854
+ this.stringifiedConfig = JSON.stringify(this.config);
855
+ };
856
+ VideoRecorderComponent.prototype.ngOnChanges = function (changes) {
857
+ if (changes.strings && !changes.strings.firstChange) {
858
+ this.stringifiedStrings = JSON.stringify(changes.strings.currentValue);
859
+ }
860
+ if (changes.config && !changes.config.firstChange) {
861
+ this.stringifiedConfig = JSON.stringify(changes.config.currentValue);
862
+ }
863
+ if (changes.instructionMessages && !changes.instructionMessages.firstChange) {
864
+ this.stringifiedInstructionMessages = JSON.stringify(changes.instructionMessages.currentValue);
865
+ }
866
+ };
867
+ /**
868
+ * @internal
869
+ */
870
+ VideoRecorderComponent.prototype.onRecord = function (event) {
871
+ this.record.emit(event.detail);
872
+ };
873
+ /**
874
+ * @internal
875
+ */
876
+ VideoRecorderComponent.prototype.onRecorderReady = function (event) {
877
+ this.recorderReady.emit(event.detail);
878
+ };
879
+ /**
880
+ * @internal
881
+ */
882
+ VideoRecorderComponent.prototype.onRecordStarting = function (event) {
883
+ this.recordStarting.emit(event.detail);
884
+ };
885
+ /**
886
+ * @internal
887
+ */
888
+ VideoRecorderComponent.prototype.onRecordCapturing = function (event) {
889
+ this.recordCapturing.emit(event.detail);
890
+ };
891
+ /**
892
+ * @internal
893
+ */
894
+ VideoRecorderComponent.prototype.onRecordInterrupted = function (event) {
895
+ this.recordInterrupted.emit(event.detail);
896
+ };
897
+ /**
898
+ * @internal
899
+ */
900
+ VideoRecorderComponent.prototype.onRecordCompleted = function (event) {
901
+ this.recordCompleted.emit(event.detail);
902
+ };
903
+ /**
904
+ * @internal
905
+ */
906
+ VideoRecorderComponent.prototype.onRecordIssue = function (event) {
907
+ this.issue.emit(event.detail.issueType);
908
+ };
909
+ /**
910
+ * @internal
911
+ */
912
+ VideoRecorderComponent.prototype.ngAfterViewInit = function () {
913
+ this.recorderUnlistenFct = this.renderer.listen(this.recorderRef.nativeElement, "record", this.onRecord.bind(this));
914
+ this.issueUnlistenFct = this.renderer.listen(this.recorderRef.nativeElement, "issue", this.onRecordIssue.bind(this));
915
+ this.recorderReadyUnlistenFct = this.renderer.listen(this.recorderRef.nativeElement, "recorderReady", this.onRecorderReady.bind(this));
916
+ this.recordStartingUnlistenFct = this.renderer.listen(this.recorderRef.nativeElement, "recordStarting", this.onRecordStarting.bind(this));
917
+ this.recordCapturingUnlistenFct = this.renderer.listen(this.recorderRef.nativeElement, "recordCapturing", this.onRecordCapturing.bind(this));
918
+ this.recordInterruptedUnlistenFct = this.renderer.listen(this.recorderRef.nativeElement, "recordInterrupted", this.onRecordInterrupted.bind(this));
919
+ this.recordCompletedUnlistenFct = this.renderer.listen(this.recorderRef.nativeElement, "recordCompleted", this.onRecordCompleted.bind(this));
920
+ };
921
+ /**
922
+ * @internal
923
+ */
924
+ VideoRecorderComponent.prototype.ngOnDestroy = function () {
925
+ if (this.recorderUnlistenFct) {
926
+ this.recorderUnlistenFct();
927
+ }
928
+ if (this.issueUnlistenFct) {
929
+ this.issueUnlistenFct();
930
+ }
931
+ if (this.recorderReadyUnlistenFct) {
932
+ this.recorderReadyUnlistenFct();
933
+ }
934
+ if (this.recordStartingUnlistenFct) {
935
+ this.recordStartingUnlistenFct();
936
+ }
937
+ if (this.recordCapturingUnlistenFct) {
938
+ this.recordCapturingUnlistenFct();
939
+ }
940
+ if (this.recordInterruptedUnlistenFct) {
941
+ this.recordInterruptedUnlistenFct();
942
+ }
943
+ if (this.recordCompletedUnlistenFct) {
944
+ this.recordCompletedUnlistenFct();
945
+ }
946
+ };
947
+ return VideoRecorderComponent;
948
+ }());
949
+ VideoRecorderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VideoRecorderComponent, deps: [{ token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
950
+ VideoRecorderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VideoRecorderComponent, selector: "unissey-video-recorder", inputs: { strings: "strings", preset: "preset", config: "config", instructionMessages: "instructionMessages", faceChecker: "faceChecker", displayFlipCameraBtn: "displayFlipCameraBtn", hideCaptureBtn: "hideCaptureBtn", logLevel: "logLevel" }, outputs: { record: "record", recorderReady: "recorderReady", recordStarting: "recordStarting", recordCapturing: "recordCapturing", recordInterrupted: "recordInterrupted", recordCompleted: "recordCompleted", issue: "issue" }, viewQueries: [{ propertyName: "recorderRef", first: true, predicate: ["camera"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<uni-video-recorder\n #camera\n [attr.preset]=\"preset\"\n [attr.strings]=\"stringifiedStrings\"\n [attr.face-checker]=\"faceChecker\"\n [attr.config]=\"stringifiedConfig\"\n [attr.instruction-messages]=\"stringifiedInstructionMessages\"\n [attr.display-flip-camera-btn]=\"displayFlipCameraBtn === true ? true : null\"\n [attr.hide-capture-btn]=\"hideCaptureBtn === true ? true : null\"\n [attr.log-level]=\"logLevel\"\n>\n <div slot=\"left\">\n <ng-content select=\"[slot=actions]\"></ng-content>\n </div>\n</uni-video-recorder>\n", changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
951
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VideoRecorderComponent, decorators: [{
952
+ type: i0.Component,
953
+ args: [{
954
+ selector: "unissey-video-recorder",
955
+ templateUrl: "./video-recorder.component.html",
956
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
957
+ }]
958
+ }], ctorParameters: function () { return [{ type: i0__namespace.Renderer2 }]; }, propDecorators: { strings: [{
959
+ type: i0.Input
960
+ }], preset: [{
961
+ type: i0.Input
962
+ }], config: [{
963
+ type: i0.Input
964
+ }], instructionMessages: [{
965
+ type: i0.Input
966
+ }], faceChecker: [{
967
+ type: i0.Input
968
+ }], displayFlipCameraBtn: [{
969
+ type: i0.Input
970
+ }], hideCaptureBtn: [{
971
+ type: i0.Input
972
+ }], logLevel: [{
973
+ type: i0.Input
974
+ }], record: [{
975
+ type: i0.Output
976
+ }], recorderReady: [{
977
+ type: i0.Output
978
+ }], recordStarting: [{
979
+ type: i0.Output
980
+ }], recordCapturing: [{
981
+ type: i0.Output
982
+ }], recordInterrupted: [{
983
+ type: i0.Output
984
+ }], recordCompleted: [{
985
+ type: i0.Output
986
+ }], issue: [{
987
+ type: i0.Output
988
+ }], recorderRef: [{
989
+ type: i0.ViewChild,
990
+ args: ["camera"]
991
+ }] } });
992
+
993
+ var UnisseySdkModule = /** @class */ (function () {
994
+ function UnisseySdkModule() {
995
+ }
996
+ return UnisseySdkModule;
997
+ }());
998
+ UnisseySdkModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UnisseySdkModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
999
+ UnisseySdkModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UnisseySdkModule, declarations: [ButtonComponent,
1000
+ FileUploadComponent,
1001
+ FullCaptureComponent,
1002
+ SelfieCaptureComponent,
1003
+ ImageCaptureDirectionsComponent,
1004
+ PictureEditorComponent,
1005
+ PictureRecorderComponent,
1006
+ ReferenceCaptureComponent,
1007
+ RetryResultComponent,
1008
+ VideoCaptureDirectionsComponent,
1009
+ VideoRecorderComponent,
1010
+ UnisseySdkComponent], imports: [common.CommonModule], exports: [ButtonComponent,
1011
+ FileUploadComponent,
1012
+ FullCaptureComponent,
1013
+ SelfieCaptureComponent,
1014
+ ImageCaptureDirectionsComponent,
1015
+ PictureEditorComponent,
1016
+ PictureRecorderComponent,
1017
+ ReferenceCaptureComponent,
1018
+ RetryResultComponent,
1019
+ VideoCaptureDirectionsComponent,
1020
+ VideoRecorderComponent,
1021
+ UnisseySdkComponent] });
1022
+ UnisseySdkModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UnisseySdkModule, imports: [[common.CommonModule]] });
1023
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UnisseySdkModule, decorators: [{
1024
+ type: i0.NgModule,
1025
+ args: [{
1026
+ declarations: [
1027
+ ButtonComponent,
1028
+ FileUploadComponent,
1029
+ FullCaptureComponent,
1030
+ SelfieCaptureComponent,
1031
+ ImageCaptureDirectionsComponent,
1032
+ PictureEditorComponent,
1033
+ PictureRecorderComponent,
1034
+ ReferenceCaptureComponent,
1035
+ RetryResultComponent,
1036
+ VideoCaptureDirectionsComponent,
1037
+ VideoRecorderComponent,
1038
+ UnisseySdkComponent,
1039
+ ],
1040
+ imports: [common.CommonModule],
1041
+ exports: [
1042
+ ButtonComponent,
1043
+ FileUploadComponent,
1044
+ FullCaptureComponent,
1045
+ SelfieCaptureComponent,
1046
+ ImageCaptureDirectionsComponent,
1047
+ PictureEditorComponent,
1048
+ PictureRecorderComponent,
1049
+ ReferenceCaptureComponent,
1050
+ RetryResultComponent,
1051
+ VideoCaptureDirectionsComponent,
1052
+ VideoRecorderComponent,
1053
+ UnisseySdkComponent,
1054
+ ],
1055
+ schemas: [i0.CUSTOM_ELEMENTS_SCHEMA],
1056
+ }]
1057
+ }] });
1058
+
1059
+ /*
1060
+ * Public API Surface of @unissey-web/sdk-angular
1061
+ */
1062
+
1063
+ /**
1064
+ * Generated bundle index. Do not edit.
1065
+ */
1066
+
1067
+ Object.defineProperty(exports, 'AcquisitionPreset', {
1068
+ enumerable: true,
1069
+ get: function () { return webComponents.AcquisitionPreset; }
1070
+ });
1071
+ Object.defineProperty(exports, 'EN', {
1072
+ enumerable: true,
1073
+ get: function () { return webComponents.EN; }
1074
+ });
1075
+ Object.defineProperty(exports, 'FR', {
1076
+ enumerable: true,
1077
+ get: function () { return webComponents.FR; }
1078
+ });
1079
+ Object.defineProperty(exports, 'FacingMode', {
1080
+ enumerable: true,
1081
+ get: function () { return webComponents.FacingMode; }
1082
+ });
1083
+ Object.defineProperty(exports, 'IadMode', {
1084
+ enumerable: true,
1085
+ get: function () { return webComponents.IadMode; }
1086
+ });
1087
+ Object.defineProperty(exports, 'OverlayDisplayMode', {
1088
+ enumerable: true,
1089
+ get: function () { return webComponents.OverlayDisplayMode; }
1090
+ });
1091
+ Object.defineProperty(exports, 'VideoOrientation', {
1092
+ enumerable: true,
1093
+ get: function () { return webComponents.VideoOrientation; }
1094
+ });
1095
+ Object.defineProperty(exports, 'VideoResolutionPreset', {
1096
+ enumerable: true,
1097
+ get: function () { return webComponents.VideoResolutionPreset; }
1098
+ });
1099
+ exports.ButtonComponent = ButtonComponent;
1100
+ exports.FileUploadComponent = FileUploadComponent;
1101
+ exports.FullCaptureComponent = FullCaptureComponent;
1102
+ exports.ImageCaptureDirectionsComponent = ImageCaptureDirectionsComponent;
1103
+ exports.PictureEditorComponent = PictureEditorComponent;
1104
+ exports.PictureRecorderComponent = PictureRecorderComponent;
1105
+ exports.ReferenceCaptureComponent = ReferenceCaptureComponent;
1106
+ exports.RetryResultComponent = RetryResultComponent;
1107
+ exports.SelfieCaptureComponent = SelfieCaptureComponent;
1108
+ exports.UnisseySdkComponent = UnisseySdkComponent;
1109
+ exports.UnisseySdkModule = UnisseySdkModule;
1110
+ exports.UnisseySdkService = UnisseySdkService;
1111
+ exports.VideoCaptureDirectionsComponent = VideoCaptureDirectionsComponent;
1112
+ exports.VideoRecorderComponent = VideoRecorderComponent;
1113
+
1114
+ Object.defineProperty(exports, '__esModule', { value: true });
1115
+
1116
+ }));
1117
+ //# sourceMappingURL=unissey-web-sdk-angular.umd.js.map