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