ngx-scandoc 15.1.4 → 15.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/components/scan/scan.component.d.ts +2 -0
- package/core/components/webcam/domain/webcam-image.d.ts +1 -1
- package/core/components/webcam/webcam/webcam.component.d.ts +3 -0
- package/esm2020/core/components/scan/scan.component.mjs +52 -34
- package/esm2020/core/components/webcam/domain/webcam-image.mjs +1 -1
- package/esm2020/core/components/webcam/webcam/webcam.component.mjs +150 -29
- package/esm2020/dialogs/components/confirm/confirm.component.mjs +2 -2
- package/esm2020/dialogs/components/scan-profile/scan-profile.component.mjs +2 -2
- package/esm2020/dialogs/components/scan-selfie/scan-selfie.component.mjs +2 -2
- package/esm2020/lib/ngx-scandoc.module.mjs +8 -5
- package/esm2020/providers/camera.provider.mjs +14 -6
- package/esm2020/providers/translation.provider.mjs +14 -12
- package/fesm2015/ngx-scandoc.mjs +243 -137
- package/fesm2015/ngx-scandoc.mjs.map +1 -1
- package/fesm2020/ngx-scandoc.mjs +242 -137
- package/fesm2020/ngx-scandoc.mjs.map +1 -1
- package/lib/ngx-scandoc.module.d.ts +1 -0
- package/package.json +1 -1
- package/providers/camera.provider.d.ts +1 -0
- package/providers/translation.provider.d.ts +1 -1
- package/src/assets/i18n/de.json +5 -2
- package/src/assets/i18n/en.json +1 -1
- package/src/assets/i18n/hr.json +5 -1
- package/src/assets/i18n/it.json +5 -1
package/fesm2020/ngx-scandoc.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, Input, HostListener, ViewChild, Output, NgModule, InjectionToken, Optional, Inject, HostBinding, Pipe, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import * as i2$1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { Subject,
|
|
6
|
-
import { takeUntil,
|
|
5
|
+
import { Subject, of, from, Observable, tap, distinctUntilChanged, switchMap as switchMap$1, throwError, forkJoin } from 'rxjs';
|
|
6
|
+
import { takeUntil, map, switchMap, tap as tap$1, catchError, share, retry } from 'rxjs/operators';
|
|
7
7
|
import * as i1 from '@angular/cdk/layout';
|
|
8
8
|
import * as i2 from '@angular/cdk/platform';
|
|
9
9
|
import { PlatformModule } from '@angular/cdk/platform';
|
|
@@ -127,57 +127,8 @@ class BaseComponent {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
class WebcamUtil {
|
|
131
|
-
/**
|
|
132
|
-
* Lists available videoInput devices
|
|
133
|
-
* @returns a list of media device info.
|
|
134
|
-
*/
|
|
135
|
-
static getAvailableVideoInputs(facingMode = 'environment') {
|
|
136
|
-
return new Observable((observer) => {
|
|
137
|
-
if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {
|
|
138
|
-
return observer.error(null);
|
|
139
|
-
}
|
|
140
|
-
const _window = window;
|
|
141
|
-
let streams;
|
|
142
|
-
from(navigator.mediaDevices.getUserMedia({
|
|
143
|
-
video: { facingMode, deviceId: undefined },
|
|
144
|
-
}))
|
|
145
|
-
.pipe(tap((s) => {
|
|
146
|
-
streams = s;
|
|
147
|
-
}), switchMap((s) => from(navigator.mediaDevices.enumerateDevices())))
|
|
148
|
-
.subscribe((devices) => {
|
|
149
|
-
// console.log(devices);
|
|
150
|
-
if (streams) {
|
|
151
|
-
streams.getTracks().forEach((track) => {
|
|
152
|
-
track.stop();
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
observer.next(devices.filter((device) => device.kind === 'videoinput'));
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
// return new Promise((resolve, reject) => {
|
|
159
|
-
// navigator.mediaDevices.getUserMedia({
|
|
160
|
-
// video: undefined,
|
|
161
|
-
// });
|
|
162
|
-
// navigator.mediaDevices
|
|
163
|
-
// .enumerateDevices()
|
|
164
|
-
// .then((devices: MediaDeviceInfo[]) => {
|
|
165
|
-
// resolve(
|
|
166
|
-
// devices.filter(
|
|
167
|
-
// (device: MediaDeviceInfo) => device.kind === 'videoinput'
|
|
168
|
-
// )
|
|
169
|
-
// );
|
|
170
|
-
// })
|
|
171
|
-
// .catch((err) => {
|
|
172
|
-
// reject(err.message || err);
|
|
173
|
-
// });
|
|
174
|
-
// });
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
130
|
class NgxScandocCameraProvider {
|
|
179
131
|
constructor() {
|
|
180
|
-
this.mediaDevices = [];
|
|
181
132
|
this.selfie$ = new Subject();
|
|
182
133
|
this.rectPosition = {
|
|
183
134
|
l: 0,
|
|
@@ -205,14 +156,23 @@ class NgxScandocCameraProvider {
|
|
|
205
156
|
if (this.mediaDevices) {
|
|
206
157
|
return of(this.mediaDevices);
|
|
207
158
|
}
|
|
208
|
-
return this.devices;
|
|
159
|
+
return this.devices.asObservable();
|
|
160
|
+
}
|
|
161
|
+
preloadVideo() {
|
|
162
|
+
return from(navigator.mediaDevices.getUserMedia({ video: true })).pipe(map((mediaStream) => {
|
|
163
|
+
mediaStream.getTracks().forEach((track) => {
|
|
164
|
+
track.stop();
|
|
165
|
+
});
|
|
166
|
+
}));
|
|
209
167
|
}
|
|
210
168
|
setup() {
|
|
211
169
|
console.warn('SETUP');
|
|
212
170
|
this.$showSwitch.subscribe((s) => {
|
|
213
171
|
console.log(s);
|
|
214
172
|
});
|
|
215
|
-
|
|
173
|
+
// console.time('device');
|
|
174
|
+
const devices$ = this.preloadVideo().pipe(switchMap(() => from(navigator.mediaDevices.enumerateDevices()).pipe(map((inputDevices) => inputDevices.filter((m) => m.kind == 'videoinput')))));
|
|
175
|
+
devices$.subscribe((mediaDevices) => {
|
|
216
176
|
console.log('[DEVICES]', mediaDevices, mediaDevices.map((d) => d.label));
|
|
217
177
|
this.mediaDevices = mediaDevices;
|
|
218
178
|
this.multipleWebcamsAvailable = mediaDevices && mediaDevices.length > 1;
|
|
@@ -265,6 +225,7 @@ class WebcamComponent extends BaseComponent {
|
|
|
265
225
|
this.cameraProvider = cameraProvider;
|
|
266
226
|
this.canvasSize = { width: 0, height: 0 };
|
|
267
227
|
this.showVideo = false;
|
|
228
|
+
this.setupAttempt = 0;
|
|
268
229
|
this.canvasData = {
|
|
269
230
|
ctx: null,
|
|
270
231
|
ctxO: null,
|
|
@@ -300,24 +261,40 @@ class WebcamComponent extends BaseComponent {
|
|
|
300
261
|
}
|
|
301
262
|
setConstraints() {
|
|
302
263
|
const out = {};
|
|
264
|
+
console.warn('MOBILE', this.isMobile);
|
|
303
265
|
switch (this.type) {
|
|
304
266
|
default:
|
|
305
267
|
if (this.isMobile) {
|
|
306
268
|
out.video = { height: { ideal: 1600 }, width: { ideal: 1600 } };
|
|
269
|
+
out.video.facingMode = 'environment';
|
|
307
270
|
}
|
|
308
271
|
else {
|
|
309
|
-
out.video = {
|
|
272
|
+
out.video = {
|
|
273
|
+
width: {
|
|
274
|
+
min: 1280,
|
|
275
|
+
ideal: 1920,
|
|
276
|
+
max: 2900,
|
|
277
|
+
},
|
|
278
|
+
height: {
|
|
279
|
+
min: 720,
|
|
280
|
+
ideal: 1080,
|
|
281
|
+
max: 2900,
|
|
282
|
+
},
|
|
283
|
+
};
|
|
310
284
|
}
|
|
311
|
-
out.video.facingMode = 'environment';
|
|
312
285
|
break;
|
|
313
286
|
case 'selfie':
|
|
314
287
|
if (this.isMobile) {
|
|
315
288
|
out.video = { height: { ideal: 1600 }, width: { ideal: 1600 } };
|
|
289
|
+
out.video.facingMode = 'user';
|
|
316
290
|
}
|
|
317
291
|
else {
|
|
318
|
-
out.video = {
|
|
292
|
+
out.video = {
|
|
293
|
+
frameRate: { min: 10 },
|
|
294
|
+
height: { ideal: 1080 },
|
|
295
|
+
width: { ideal: 1920 },
|
|
296
|
+
};
|
|
319
297
|
}
|
|
320
|
-
out.video.facingMode = 'user';
|
|
321
298
|
break;
|
|
322
299
|
}
|
|
323
300
|
return out.video;
|
|
@@ -334,23 +311,89 @@ class WebcamComponent extends BaseComponent {
|
|
|
334
311
|
}
|
|
335
312
|
}
|
|
336
313
|
init() {
|
|
337
|
-
|
|
338
|
-
|
|
314
|
+
this.__subs(this.cameraProvider.getDevices()).subscribe((resp) => {
|
|
315
|
+
console.warn('DEVICES', resp);
|
|
316
|
+
const videoTrackConstraints = this.setConstraints();
|
|
317
|
+
this.setupAttempt = 0;
|
|
318
|
+
this.setup(videoTrackConstraints);
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
setDeviceId(stream) {
|
|
322
|
+
this.mediaStream = stream;
|
|
323
|
+
this.cameraProvider.deviceId = this.activeTrackSettings.deviceId;
|
|
324
|
+
this.startVideo();
|
|
339
325
|
}
|
|
340
326
|
setup(videoTrackConstraints) {
|
|
327
|
+
console.warn('videoTrackConstraints', videoTrackConstraints);
|
|
328
|
+
console.time('device');
|
|
341
329
|
this.__subs(from(navigator.mediaDevices.getUserMedia({
|
|
342
330
|
video: videoTrackConstraints,
|
|
343
331
|
}))).subscribe((stream) => {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
332
|
+
console.timeEnd('device');
|
|
333
|
+
stream.getTracks().forEach((t) => {
|
|
334
|
+
//console.warn(t.getConstraints());
|
|
335
|
+
if (!this.isMobile) {
|
|
336
|
+
try {
|
|
337
|
+
const settings = t.getSettings();
|
|
338
|
+
const cap = t.getCapabilities();
|
|
339
|
+
const con = t.getConstraints();
|
|
340
|
+
console.warn(cap, con);
|
|
341
|
+
console.warn(settings);
|
|
342
|
+
const max = cap.width?.max;
|
|
343
|
+
const min = cap.width?.min;
|
|
344
|
+
const currentWidth = settings.width;
|
|
345
|
+
const currentHeight = settings.height;
|
|
346
|
+
const conWidth = con.width;
|
|
347
|
+
const conHeight = con.width;
|
|
348
|
+
console.warn('CAPS', min, max, 'CURENT', currentWidth, currentHeight);
|
|
349
|
+
if (max &&
|
|
350
|
+
currentWidth &&
|
|
351
|
+
max > currentWidth &&
|
|
352
|
+
conWidth != max) {
|
|
353
|
+
console.log('[SET NEW RESOLUTION]');
|
|
354
|
+
this.setupAttempt++;
|
|
355
|
+
if (this.setupAttempt < 4) {
|
|
356
|
+
this.setup(videoTrackConstraints);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
else {
|
|
360
|
+
this.setDeviceId(stream);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
catch (error) {
|
|
364
|
+
console.warn(error);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
console.warn('MOBILE VIDEO START');
|
|
369
|
+
this.setDeviceId(stream);
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
}, (er) => {
|
|
373
|
+
this.setupAttempt++;
|
|
374
|
+
console.warn('ERROR', er);
|
|
375
|
+
if (this.setupAttempt < 4) {
|
|
376
|
+
if (er instanceof OverconstrainedError) {
|
|
377
|
+
if (!this.isMobile) {
|
|
378
|
+
this.setup(videoTrackConstraints);
|
|
379
|
+
}
|
|
380
|
+
// this.setup({
|
|
381
|
+
// height: 720,
|
|
382
|
+
// width: 1280,
|
|
383
|
+
// });
|
|
384
|
+
//}
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
this.setup(videoTrackConstraints);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
347
390
|
});
|
|
348
391
|
}
|
|
349
392
|
startVideo() {
|
|
350
393
|
console.log('START VIDEO');
|
|
351
394
|
this.video.srcObject = this.mediaStream;
|
|
352
395
|
this.video.onloadedmetadata = (data) => {
|
|
353
|
-
|
|
396
|
+
console.log(data);
|
|
354
397
|
this.video.play();
|
|
355
398
|
this.showVideo = true;
|
|
356
399
|
this.cd.detectChanges();
|
|
@@ -358,7 +401,7 @@ class WebcamComponent extends BaseComponent {
|
|
|
358
401
|
};
|
|
359
402
|
this.video.onplay = () => {
|
|
360
403
|
this.videoReady.next(true);
|
|
361
|
-
|
|
404
|
+
console.log(this.video.videoWidth, this.video.videoHeight);
|
|
362
405
|
this.drawRectangle();
|
|
363
406
|
};
|
|
364
407
|
}
|
|
@@ -383,21 +426,23 @@ class WebcamComponent extends BaseComponent {
|
|
|
383
426
|
_canvas.width = videoWidth;
|
|
384
427
|
_canvas.height = videoHeight;
|
|
385
428
|
const ctx = _canvas.getContext('2d', {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
429
|
+
// alpha: false,
|
|
430
|
+
// powerPreference: 'high-performance',
|
|
431
|
+
// antialias: false,
|
|
432
|
+
// depth: false,
|
|
433
|
+
// desynchronized: true,
|
|
434
|
+
// willReadFrequently: true,
|
|
391
435
|
});
|
|
392
436
|
const canvas = document.createElement('canvas'); // needs an initial size
|
|
393
437
|
canvas.height = smallSize.h;
|
|
394
438
|
canvas.width = smallSize.w;
|
|
395
439
|
const ctxO = canvas.getContext('2d', {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
440
|
+
// alpha: false,
|
|
441
|
+
// powerPreference: 'high-performance',
|
|
442
|
+
// antialias: false,
|
|
443
|
+
// depth: false,
|
|
444
|
+
// desynchronized: true,
|
|
445
|
+
// willReadFrequently: true,
|
|
401
446
|
});
|
|
402
447
|
this.canvasData.ctx = ctx;
|
|
403
448
|
this.canvasData.ctxO = ctxO;
|
|
@@ -443,6 +488,23 @@ class WebcamComponent extends BaseComponent {
|
|
|
443
488
|
this.imageCapture.emit(new WebcamImage(imgAsUrl, mimeType, new ImageData(1, 1), null));
|
|
444
489
|
}
|
|
445
490
|
}
|
|
491
|
+
humanFileSize(bytes, si = false, dp = 1) {
|
|
492
|
+
const thresh = si ? 1000 : 1024;
|
|
493
|
+
if (Math.abs(bytes) < thresh) {
|
|
494
|
+
return bytes + ' B';
|
|
495
|
+
}
|
|
496
|
+
const units = si
|
|
497
|
+
? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
|
498
|
+
: ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];
|
|
499
|
+
let u = -1;
|
|
500
|
+
const r = 10 ** dp;
|
|
501
|
+
do {
|
|
502
|
+
bytes /= thresh;
|
|
503
|
+
++u;
|
|
504
|
+
} while (Math.round(Math.abs(bytes) * r) / r >= thresh &&
|
|
505
|
+
u < units.length - 1);
|
|
506
|
+
return bytes.toFixed(dp) + ' ' + units[u];
|
|
507
|
+
}
|
|
446
508
|
takeSnapshot(time) {
|
|
447
509
|
if (this.type !== 'document') {
|
|
448
510
|
this.takeSelfie();
|
|
@@ -488,10 +550,15 @@ class WebcamComponent extends BaseComponent {
|
|
|
488
550
|
ctxO.drawImage(_canvas, 0, 0, size.w, size.h);
|
|
489
551
|
//console.timeEnd('drawVideo');
|
|
490
552
|
//console.time('DRAW');
|
|
491
|
-
const imData = ctx.getImageData(0, 0, videoWidth, videoHeight);
|
|
553
|
+
// const imData: any = ctx.getImageData(0, 0, videoWidth, videoHeight);
|
|
554
|
+
console.log(canvas.width, _canvas.width);
|
|
492
555
|
//console.timeEnd('DRAW');
|
|
493
556
|
//console.time('CTX');
|
|
494
|
-
const resize = canvas.toDataURL(
|
|
557
|
+
const resize = canvas.toDataURL('image/jpeg');
|
|
558
|
+
const canvasData = _canvas.toDataURL(mimeType, 1);
|
|
559
|
+
console.log(this.humanFileSize(canvasData.length));
|
|
560
|
+
console.log(this.humanFileSize(resize.length));
|
|
561
|
+
console.log(new Date().toISOString());
|
|
495
562
|
//console.timeEnd('CTX');
|
|
496
563
|
const currentTime = new Date().getTime();
|
|
497
564
|
const diff = currentTime - time;
|
|
@@ -501,7 +568,7 @@ class WebcamComponent extends BaseComponent {
|
|
|
501
568
|
const delayMax = drawTime < 60 ? 100 : 200;
|
|
502
569
|
const delay = diff > delayMax ? 0 : delayMax - diff;
|
|
503
570
|
const timeout = setTimeout(() => {
|
|
504
|
-
this.imageCapture.emit(new WebcamImage(
|
|
571
|
+
this.imageCapture.emit(new WebcamImage(canvasData, mimeType, '', resize));
|
|
505
572
|
clearTimeout(timeout);
|
|
506
573
|
}, delay);
|
|
507
574
|
}
|
|
@@ -530,9 +597,16 @@ class WebcamComponent extends BaseComponent {
|
|
|
530
597
|
const ctx = _canvas.getContext('2d');
|
|
531
598
|
ctx.clearRect(0, 0, _canvas.width, _canvas.height);
|
|
532
599
|
const { width, height } = _canvas;
|
|
533
|
-
|
|
534
|
-
|
|
600
|
+
console.log('CANVAS', width, height);
|
|
601
|
+
let { videoWidth, videoHeight } = this.video;
|
|
602
|
+
// video will be scaled to max canvas height
|
|
535
603
|
const aspect = videoWidth / videoHeight;
|
|
604
|
+
// if (videoHeight < height) {
|
|
605
|
+
// videoHeight = height;
|
|
606
|
+
// videoWidth = height*aspect;
|
|
607
|
+
// }
|
|
608
|
+
console.log('VIDEO', videoWidth, videoHeight);
|
|
609
|
+
const docSize = this.type === 'selfie' ? 1 : 86 / 55;
|
|
536
610
|
let _height;
|
|
537
611
|
let _width;
|
|
538
612
|
if (videoWidth >= videoHeight) {
|
|
@@ -551,6 +625,7 @@ class WebcamComponent extends BaseComponent {
|
|
|
551
625
|
_height = _width / aspect;
|
|
552
626
|
}
|
|
553
627
|
}
|
|
628
|
+
console.log('CALC', _width, _height);
|
|
554
629
|
let w, h;
|
|
555
630
|
if (_width <= _height) {
|
|
556
631
|
w = _width - 2 * padding;
|
|
@@ -560,19 +635,25 @@ class WebcamComponent extends BaseComponent {
|
|
|
560
635
|
h = _height - 2 * padding;
|
|
561
636
|
w = docSize * h;
|
|
562
637
|
}
|
|
638
|
+
if (w > _width) {
|
|
639
|
+
w = _width - 2 * padding;
|
|
640
|
+
h = w / docSize;
|
|
641
|
+
}
|
|
563
642
|
h = Math.floor(h);
|
|
564
643
|
w = Math.floor(w);
|
|
644
|
+
console.log(w, h);
|
|
565
645
|
const left = Math.floor((width - w) / 2);
|
|
566
646
|
const top = Math.floor((height - h) / 2);
|
|
567
647
|
ctx.strokeStyle = 'white';
|
|
568
648
|
// ctx.strokeRect(left, top, _width, _height);
|
|
569
|
-
ctx.fillStyle = 'rgba(255, 255, 255, 0.
|
|
649
|
+
ctx.fillStyle = 'rgba(255, 255, 255, 0.2)';
|
|
570
650
|
// ctx.shadowColor = 'white';
|
|
571
651
|
ctx.shadowBlur = 15;
|
|
572
652
|
ctx.beginPath();
|
|
573
653
|
// Draw using 5px for border radius on all sides
|
|
574
654
|
// stroke it but no fill
|
|
575
|
-
|
|
655
|
+
const radius = this.isMobile ? 10 : 30;
|
|
656
|
+
ctx.roundRect(left, top, w, h, radius);
|
|
576
657
|
ctx.stroke();
|
|
577
658
|
ctx.fill();
|
|
578
659
|
this.cameraProvider.rectPosition = {
|
|
@@ -1413,7 +1494,7 @@ class LayoutProvider {
|
|
|
1413
1494
|
this.isMobile = false;
|
|
1414
1495
|
this.breakpoint$ = this.breakpointObserver
|
|
1415
1496
|
.observe(['(min-width: 768px)'])
|
|
1416
|
-
.pipe(tap
|
|
1497
|
+
.pipe(tap((value) => console.log(value)), distinctUntilChanged());
|
|
1417
1498
|
}
|
|
1418
1499
|
init() {
|
|
1419
1500
|
this.breakpoint$.subscribe((v) => {
|
|
@@ -1476,7 +1557,7 @@ class NgxScandocAuthProvider {
|
|
|
1476
1557
|
.post(`${path}${refresh}`, {
|
|
1477
1558
|
refresh_token: this.refresh_token,
|
|
1478
1559
|
})
|
|
1479
|
-
.pipe(tap((token) => {
|
|
1560
|
+
.pipe(tap$1((token) => {
|
|
1480
1561
|
// console.log(this.token);
|
|
1481
1562
|
this.token = token.access_token;
|
|
1482
1563
|
this.updateToken();
|
|
@@ -1508,7 +1589,7 @@ class NgxScandocAuthProvider {
|
|
|
1508
1589
|
clientId: clientId,
|
|
1509
1590
|
token: tokenName,
|
|
1510
1591
|
})
|
|
1511
|
-
.pipe(map((data) => data.accessToken), tap((token) => {
|
|
1592
|
+
.pipe(map((data) => data.accessToken), tap$1((token) => {
|
|
1512
1593
|
this.token = token;
|
|
1513
1594
|
const decoded = jwt_decode(this.token);
|
|
1514
1595
|
const { iat, exp } = decoded;
|
|
@@ -1520,7 +1601,7 @@ class NgxScandocAuthProvider {
|
|
|
1520
1601
|
user_key: this.user_key,
|
|
1521
1602
|
sub_client: this.sub_client,
|
|
1522
1603
|
})
|
|
1523
|
-
.pipe(tap((token) => {
|
|
1604
|
+
.pipe(tap$1((token) => {
|
|
1524
1605
|
this.token = token.access_token;
|
|
1525
1606
|
this.refresh_token = token.refresh_token;
|
|
1526
1607
|
this.updateToken();
|
|
@@ -1538,20 +1619,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1538
1619
|
|
|
1539
1620
|
const TRANSLATION_PROVIDER = new InjectionToken('Injection token for translation providers.');
|
|
1540
1621
|
class NgxScanDocTranslationProvider {
|
|
1541
|
-
constructor(translate, injector,
|
|
1622
|
+
constructor(translate, injector,
|
|
1623
|
+
//@Optional() @Inject(SCAN_CONFIG_TOKEN) config: ScanConfig,
|
|
1624
|
+
providers, platformLocation) {
|
|
1542
1625
|
this.translate = translate;
|
|
1543
1626
|
this.injector = injector;
|
|
1544
1627
|
this.platformLocation = platformLocation;
|
|
1545
|
-
|
|
1628
|
+
console.log('MM', Math.random());
|
|
1546
1629
|
this.customLoader = this.translate.currentLoader;
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
for (const provider of providers) {
|
|
1553
|
-
this.addTranslationFolder(provider.name, provider.source);
|
|
1554
|
-
}
|
|
1630
|
+
//console.log('config',config)
|
|
1631
|
+
// console.log(this.translate)
|
|
1632
|
+
if (providers && providers.length > 0) {
|
|
1633
|
+
for (const provider of providers) {
|
|
1634
|
+
this.addTranslationFolder(provider.name, provider.source);
|
|
1555
1635
|
}
|
|
1556
1636
|
}
|
|
1557
1637
|
}
|
|
@@ -1563,6 +1643,10 @@ class NgxScanDocTranslationProvider {
|
|
|
1563
1643
|
// .join('');
|
|
1564
1644
|
// return baseHref != '' ? `/${baseHref}${path}` : path;
|
|
1565
1645
|
}
|
|
1646
|
+
setDefaultLang(lang) {
|
|
1647
|
+
this.defaultLang = lang;
|
|
1648
|
+
this.translate.setDefaultLang(this.defaultLang);
|
|
1649
|
+
}
|
|
1566
1650
|
addTranslationFolder(name = '', path = '') {
|
|
1567
1651
|
console.log(name, path, this.userLang, this.defaultLang);
|
|
1568
1652
|
if (!this.customLoader.providerRegistered(name)) {
|
|
@@ -2401,6 +2485,8 @@ class ScanComponent extends BaseComponent {
|
|
|
2401
2485
|
time: 0,
|
|
2402
2486
|
load: 0,
|
|
2403
2487
|
};
|
|
2488
|
+
this.numberOfValidations = 0;
|
|
2489
|
+
this.validationDebug = [];
|
|
2404
2490
|
this.scanProvider = this.injector.get(ScanProvider);
|
|
2405
2491
|
if (!this.scanProvider.config.development) {
|
|
2406
2492
|
// console = {
|
|
@@ -2454,25 +2540,26 @@ class ScanComponent extends BaseComponent {
|
|
|
2454
2540
|
this.scanDelay = diff;
|
|
2455
2541
|
}
|
|
2456
2542
|
this.scanImageTimestamps.load = time;
|
|
2457
|
-
if (webcamImage.
|
|
2543
|
+
if (webcamImage.imageAsDataUrl) {
|
|
2458
2544
|
this.scannedImages.push(webcamImage);
|
|
2459
2545
|
this.handleLongValidationError(webcamImage, 'worker');
|
|
2460
2546
|
}
|
|
2461
2547
|
this.cd.detectChanges();
|
|
2462
|
-
if (this.scannedImages.length >
|
|
2463
|
-
if (this.scanProvider.config.development) {
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
}
|
|
2548
|
+
if (this.scannedImages.length > 0 && !this.validation) {
|
|
2549
|
+
// if (this.scanProvider.config.development) {
|
|
2550
|
+
// this.scannedImages.forEach((img) => {
|
|
2551
|
+
// const consoleBackground =
|
|
2552
|
+
// "font-size:100px;background-image: url('" +
|
|
2553
|
+
// img.imageResized +
|
|
2554
|
+
// "');background-size: contain; background-repeat: no-repeat;";
|
|
2555
|
+
// console.log('%c ', consoleBackground);
|
|
2556
|
+
// });
|
|
2557
|
+
// }
|
|
2471
2558
|
// this.frontImage = webcamImage.imageResized;
|
|
2472
|
-
console.timeEnd('scan');
|
|
2473
|
-
console.time('scan');
|
|
2559
|
+
// console.timeEnd('scan');
|
|
2560
|
+
// console.time('scan');
|
|
2474
2561
|
// get last 10
|
|
2475
|
-
console.log('CAPTURED:', this.scannedImages.length);
|
|
2562
|
+
// console.log('CAPTURED:', this.scannedImages.length);
|
|
2476
2563
|
const images = this.scannedImages.slice(-5);
|
|
2477
2564
|
// set images to 0
|
|
2478
2565
|
this.scannedImages = [];
|
|
@@ -2491,21 +2578,31 @@ class ScanComponent extends BaseComponent {
|
|
|
2491
2578
|
this.__subs(this.scanProvider.burst(imagesArray)).subscribe((resp) => {
|
|
2492
2579
|
this.displayInfo = 'scandoc.info.c' + resp.InfoCode;
|
|
2493
2580
|
// console.timeEnd('validationPOST');
|
|
2494
|
-
console.log('AnalysisTime', resp.AnalysisTime);
|
|
2581
|
+
// console.log('AnalysisTime', resp.AnalysisTime);
|
|
2495
2582
|
const { DocType, Series, Side, InfoCode } = resp;
|
|
2496
2583
|
// if (InfoCode === '1006' && this.idScan) {
|
|
2497
2584
|
// this.handleLongValidationError(image);
|
|
2498
2585
|
// }
|
|
2586
|
+
// console.warn(resp.Validated, this.numberOfValidations);
|
|
2499
2587
|
if (resp.Validated) {
|
|
2588
|
+
this.numberOfValidations++;
|
|
2589
|
+
this.validationDebug.push(resp);
|
|
2590
|
+
}
|
|
2591
|
+
else {
|
|
2592
|
+
this.numberOfValidations = 0;
|
|
2593
|
+
this.validationDebug = [];
|
|
2594
|
+
}
|
|
2595
|
+
if (this.numberOfValidations >= 3) {
|
|
2500
2596
|
this.displayInfo = '';
|
|
2501
|
-
console.log('[SCANNED INDEX]', resp.Index);
|
|
2597
|
+
// console.log('[SCANNED INDEX]', resp.Index);
|
|
2502
2598
|
const selectedImage = images[resp.Index];
|
|
2503
2599
|
// this.preview = this.webcamImage.imageAsDataUrl;
|
|
2504
2600
|
this.cd.detectChanges();
|
|
2505
2601
|
let image = selectedImage;
|
|
2602
|
+
console.warn(type);
|
|
2506
2603
|
if (type == 'worker') {
|
|
2507
|
-
const dataUrl = this.handleBitmapImage(selectedImage.bitmap);
|
|
2508
|
-
image =
|
|
2604
|
+
//const dataUrl = this.handleBitmapImage(selectedImage.bitmap);
|
|
2605
|
+
image = selectedImage.imageAsDataUrl;
|
|
2509
2606
|
}
|
|
2510
2607
|
if (InfoCode === '1007') {
|
|
2511
2608
|
// For ID ask for other side
|
|
@@ -2516,13 +2613,17 @@ class ScanComponent extends BaseComponent {
|
|
|
2516
2613
|
this.scanBlastData[1].image = image;
|
|
2517
2614
|
}
|
|
2518
2615
|
if (this.scanBlastData[0].image && this.scanBlastData[1].image) {
|
|
2519
|
-
console.warn('UPLOAD');
|
|
2616
|
+
// console.warn('UPLOAD');
|
|
2520
2617
|
if (type == 'worker') {
|
|
2521
2618
|
this.imageHandler.next({ type: 'stop' });
|
|
2522
2619
|
}
|
|
2620
|
+
//console.warn('DEBUG', Side, this.validationDebug);
|
|
2523
2621
|
this.scanBlastFinish();
|
|
2524
2622
|
}
|
|
2525
2623
|
else {
|
|
2624
|
+
this.numberOfValidations = 0;
|
|
2625
|
+
// console.warn('DEBUG',Side,this.validationDebug)
|
|
2626
|
+
this.validationDebug = [];
|
|
2526
2627
|
const num = Side === 'FRONT' ? 1 : 0;
|
|
2527
2628
|
this.scanSecondSide = true;
|
|
2528
2629
|
this.singleScan(this.scanBlastData[num]);
|
|
@@ -2538,8 +2639,9 @@ class ScanComponent extends BaseComponent {
|
|
|
2538
2639
|
}
|
|
2539
2640
|
}
|
|
2540
2641
|
else {
|
|
2642
|
+
// console.warn('DEBUG', Side, this.validationDebug);
|
|
2541
2643
|
this.scanBlastData[0].image = image;
|
|
2542
|
-
console.warn('UPLOAD');
|
|
2644
|
+
// console.warn('UPLOAD');
|
|
2543
2645
|
if (type == 'worker') {
|
|
2544
2646
|
this.imageHandler.next({ type: 'stop' });
|
|
2545
2647
|
}
|
|
@@ -2579,7 +2681,7 @@ class ScanComponent extends BaseComponent {
|
|
|
2579
2681
|
// delete this.logData.ExpectedOutput._avatar;
|
|
2580
2682
|
// }
|
|
2581
2683
|
// this.scanProvider.sendLog(this.logData).subscribe();
|
|
2582
|
-
console.log('LOG DATA', this.logData);
|
|
2684
|
+
// console.log('LOG DATA', this.logData);
|
|
2583
2685
|
this.__subs(this.scanProvider.sendLog(this.logData)).subscribe();
|
|
2584
2686
|
}
|
|
2585
2687
|
handleLongValidationError(img, type = 'plain') {
|
|
@@ -2710,10 +2812,10 @@ class ScanComponent extends BaseComponent {
|
|
|
2710
2812
|
}
|
|
2711
2813
|
getImgBase64(num) {
|
|
2712
2814
|
console.log('GET 64');
|
|
2713
|
-
if (this.manualDataSet) {
|
|
2714
|
-
|
|
2715
|
-
}
|
|
2716
|
-
return this.scanBlastData[num].image.dataUrl.split(',')[1];
|
|
2815
|
+
// if (this.manualDataSet) {
|
|
2816
|
+
return this.scanBlastData[num].image._imageAsDataUrl.split(',')[1];
|
|
2817
|
+
// }
|
|
2818
|
+
// return this.scanBlastData[num].image.dataUrl.split(',')[1];
|
|
2717
2819
|
}
|
|
2718
2820
|
scanBlastFinish() {
|
|
2719
2821
|
const { browser, os, device } = this.deviceService;
|
|
@@ -2737,7 +2839,7 @@ class ScanComponent extends BaseComponent {
|
|
|
2737
2839
|
DeviceInfo: {
|
|
2738
2840
|
OS: os,
|
|
2739
2841
|
Device: device,
|
|
2740
|
-
Browser: browser
|
|
2842
|
+
Browser: browser,
|
|
2741
2843
|
},
|
|
2742
2844
|
FrontImageType: 'base64',
|
|
2743
2845
|
FrontImageCropped: false,
|
|
@@ -2806,11 +2908,11 @@ class ScanComponent extends BaseComponent {
|
|
|
2806
2908
|
return;
|
|
2807
2909
|
}
|
|
2808
2910
|
if (results && data.Metadata.length > 0 && data.InfoCode === '1000') {
|
|
2809
|
-
console.log('Extraction time', data.AnalysisTime);
|
|
2911
|
+
// console.log('Extraction time', data.AnalysisTime);
|
|
2810
2912
|
// this.zone.run(() => {
|
|
2811
|
-
console.time('parseblast');
|
|
2913
|
+
// console.time('parseblast');
|
|
2812
2914
|
const result = this.scanProvider.parseBlast(results);
|
|
2813
|
-
console.timeEnd('parseblast');
|
|
2915
|
+
// console.timeEnd('parseblast');
|
|
2814
2916
|
// console.log('RES', this.result);
|
|
2815
2917
|
// this.cd.detectChanges();
|
|
2816
2918
|
const model = result.model;
|
|
@@ -2831,18 +2933,18 @@ class ScanComponent extends BaseComponent {
|
|
|
2831
2933
|
data: {
|
|
2832
2934
|
model: this.model,
|
|
2833
2935
|
images: this.images,
|
|
2834
|
-
results
|
|
2936
|
+
results,
|
|
2835
2937
|
},
|
|
2836
2938
|
});
|
|
2837
2939
|
if (!this.scanProvider.config.hideResults) {
|
|
2838
2940
|
this.zone.run(() => {
|
|
2839
2941
|
this.result = true;
|
|
2840
|
-
console.time('ff');
|
|
2942
|
+
// console.time('ff');
|
|
2841
2943
|
this.cd.detectChanges();
|
|
2842
2944
|
this.scanResults.next({ type: 'model', data: model });
|
|
2843
2945
|
// this.cd.detectChanges();
|
|
2844
2946
|
// });
|
|
2845
|
-
console.timeEnd('ff');
|
|
2947
|
+
// console.timeEnd('ff');
|
|
2846
2948
|
});
|
|
2847
2949
|
}
|
|
2848
2950
|
}
|
|
@@ -2992,10 +3094,10 @@ class ScanComponent extends BaseComponent {
|
|
|
2992
3094
|
}
|
|
2993
3095
|
}
|
|
2994
3096
|
ScanComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: NgxScandocCameraProvider }, { token: i0.Injector }, { token: LayoutProvider }, { token: i2.Platform }, { token: i4$1.DeviceDetectorService }, { token: NgxScandocAuthProvider }], target: i0.ɵɵFactoryTarget.Component });
|
|
2995
|
-
ScanComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ScanComponent, selector: "ngx-scan", inputs: { type: "type", dialogs: "dialogs", showDialog: "showDialog" }, outputs: { actions: "actions" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class.mobile": "this.class" } }, usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngIf=\"cameraProvider.rectPosition.t > 0 && displayInfo && !result && !manual\"\n>\n <div class=\"hint\" [ngStyle]=\"{ top: cameraProvider.hintPosition + 'px' }\">\n <span class=\"text\">\n {{ displayInfo | translate }}\n </span>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"showDialog\">\n <div class=\"pageTurn\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n </div>\n <footer>\n <button (click)=\"closeDialog()\" mat-raised-button>Ok</button>\n </footer>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"promptManual\">\n <div class=\"manualMode\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>ink_pen</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n </div>\n <footer>\n <button\n style=\"margin-right: 8px\"\n (click)=\"manualSet(true)\"\n mat-raised-button\n >\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button\n style=\"margin-left: 8px\"\n (click)=\"manualSet(false)\"\n mat-raised-button\n >\n {{ \"scandoc.no\" | translate }}\n </button>\n </footer>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"result\">\n <section>\n <ngx-scan-results\n (action)=\"selfie()\"\n [form]=\"form\"\n [data]=\"scanResults\"\n ></ngx-scan-results>\n\n <footer>\n <div class=\"actions\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retake()\">\n {{ \"scandoc.reTake\" | translate }}\n </button>\n <button\n [disabled]=\"error || form.invalid\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"use()\"\n >\n {{ \"scandoc.useData\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<ng-container *ngIf=\"manual\">\n <section>\n <ngx-manual-scan (action)=\"manualScanData($event)\"></ngx-manual-scan>\n </section>\n</ng-container>\n<ng-container *ngIf=\"!result && documentTypeSelected && !manual\">\n <section>\n <div #wraper class=\"wraper\">\n <div class=\"loading\" *ngIf=\"(!cameraReady && !preview) || scaning\">\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main\"\n #webcam\n type=\"document\"\n [trigger]=\"trigger\"\n [imageHandler]=\"imageHandler\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (destroyed)=\"cameraOff($event)\"\n (videoReady)=\"videoReady($event)\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n display: flex;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"scandoc.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ng-container *ngIf=\"errorCode === '1001'\">\n <div>\n {{ \"scandoc.extraction.c1001\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"errorCode === '1002'\">\n <div>\n {{ \"scandoc.extraction.c1002\" | translate }}\n </div>\n </ng-container>\n\n <ul *ngIf=\"errorCode === '1000'\">\n <li>\n {{ \"scandoc.placeIdCloseToDevice\" | translate }}\n </li>\n <li>\n {{ \"scandoc.ensureSufficientLight\" | translate }}\n </li>\n <li>\n {{ \"scandoc.holdDocumentSteady\" | translate }}\n </li>\n <li>\n {{ \"scandoc.makeSureAllEdgesOfTheIdAreVisible\" | translate }}\n </li>\n <li>\n {{\n \"scandoc.makeSureThereAreNoGlareAndShadowsOnTheId\" | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"scanPreview\" *ngIf=\"!error && !scaning\">\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"scandoc.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\n <div\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer *ngIf=\"preview\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n <ng-container *ngIf=\"displayInfo\">\n {{ displayInfo | translate }}\n </ng-container>\n </div> -->\n <!-- <div style=\"height: 26px\">\n <div\n style=\"text-align: center; font-size: 18px\"\n *ngIf=\"idScan && !preview && cameraReady\"\n >\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"scandoc.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"scandoc.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <div class=\"actions\" *ngIf=\"preview\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden;position:relative}:host.mobile .hint{font-size:13px}section{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.wraper{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:1}.wraper .loading{position:absolute;inset:0;z-index:20;background-color:#f5f5f5}.documentTurnOver{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.documentTurnOver mat-icon{width:200px;color:#fff;height:200px;font-size:100px}.displayInfo{text-align:center;flex:1;width:100%;background-color:#000;height:50px;display:flex;flex-direction:row;align-items:center;justify-content:center;color:#fff;z-index:200}.displayInfo.mobile{font-size:12px}.preview{width:100%;border-radius:1%}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}footer .actions{display:flex;flex-direction:row;align-items:center;padding:8px}footer .actions button{flex:1}.error{display:flex;align-items:center;justify-content:center;flex:1}.error .title{font-size:20px;margin-bottom:8px}.error .title mat-icon{margin-right:8px}.error ul{font-size:18px;list-style-type:none}mat-card{box-shadow:none!important}.mr-4{margin-right:4px}.ml-4{margin-left:4px}.p-16{padding:16px}.p-8{padding:8px}.py-16{padding:16px 0}.w-100-p{width:100%}.scanPreview{padding:16px}.scanPreview .image{background-position:center;background-repeat:no-repeat;background-size:contain}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode .content{margin-top:20px;background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.manualMode .inner{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px}.manualMode .inner mat-icon{width:60px;height:60px;font-size:60px}.manualMode .inner .text{margin:20px 0}.manualMode footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.manualMode footer button{min-width:140px;box-shadow:none;border:1px solid #ccc}.pageTurn{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .content{background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.pageTurn .inner{display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .inner mat-icon{width:60px;height:60px;font-size:60px}.pageTurn .inner .text{margin:20px 0;font-size:14px}.pageTurn footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.pageTurn footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}.hint{position:absolute;z-index:5;font-size:18px;line-height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.hint .text{border-radius:3px;padding:4px 8px;background-color:#000;color:#fff;text-align:center;display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: ["imageHandler", "type", "trigger"], outputs: ["cameraSwitched", "videoReady", "imageCapture", "initError"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ScanResultsComponent, selector: "ngx-scan-results", inputs: ["data", "images", "form"], outputs: ["action"] }, { kind: "component", type: ManualScanComponent, selector: "ngx-manual-scan", outputs: ["action"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3097
|
+
ScanComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ScanComponent, selector: "ngx-scan", inputs: { type: "type", dialogs: "dialogs", showDialog: "showDialog" }, outputs: { actions: "actions" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class.mobile": "this.class" } }, usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngIf=\"cameraProvider.rectPosition.t > 0 && displayInfo && !result && !manual\"\n>\n <div class=\"hint\" [ngStyle]=\"{ top: cameraProvider.hintPosition + 'px' }\">\n <span class=\"text\">\n {{ displayInfo | translate }}\n </span>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"showDialog\">\n <div class=\"pageTurn\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n </div>\n <footer>\n <button (click)=\"closeDialog()\" mat-raised-button>Ok</button>\n </footer>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"promptManual\">\n <div class=\"manualMode\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>screenshot</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n </div>\n <footer>\n <button\n style=\"margin-right: 8px\"\n (click)=\"manualSet(true)\"\n mat-raised-button\n >\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button\n style=\"margin-left: 8px\"\n (click)=\"manualSet(false)\"\n mat-raised-button\n >\n {{ \"scandoc.no\" | translate }}\n </button>\n </footer>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"result\">\n <section>\n <ngx-scan-results\n (action)=\"selfie()\"\n [form]=\"form\"\n [data]=\"scanResults\"\n ></ngx-scan-results>\n\n <footer>\n <div class=\"actions\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retake()\">\n {{ \"scandoc.reTake\" | translate }}\n </button>\n <button\n [disabled]=\"error || form.invalid\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"use()\"\n >\n {{ \"scandoc.useData\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<ng-container *ngIf=\"manual\">\n <section>\n <ngx-manual-scan (action)=\"manualScanData($event)\"></ngx-manual-scan>\n </section>\n</ng-container>\n<ng-container *ngIf=\"!result && documentTypeSelected && !manual\">\n <section>\n <div #wraper class=\"wraper\">\n <div class=\"loading\" *ngIf=\"(!cameraReady && !preview) || scaning\">\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main\"\n #webcam\n type=\"document\"\n [trigger]=\"trigger\"\n [imageHandler]=\"imageHandler\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (destroyed)=\"cameraOff($event)\"\n (videoReady)=\"videoReady($event)\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n display: flex;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"scandoc.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ng-container *ngIf=\"errorCode === '1001'\">\n <div>\n {{ \"scandoc.extraction.c1001\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"errorCode === '1002'\">\n <div>\n {{ \"scandoc.extraction.c1002\" | translate }}\n </div>\n </ng-container>\n\n <ul *ngIf=\"errorCode === '1000'\">\n <li>\n {{ \"scandoc.placeIdCloseToDevice\" | translate }}\n </li>\n <li>\n {{ \"scandoc.ensureSufficientLight\" | translate }}\n </li>\n <li>\n {{ \"scandoc.holdDocumentSteady\" | translate }}\n </li>\n <li>\n {{ \"scandoc.makeSureAllEdgesOfTheIdAreVisible\" | translate }}\n </li>\n <li>\n {{\n \"scandoc.makeSureThereAreNoGlareAndShadowsOnTheId\" | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"scanPreview\" *ngIf=\"!error && !scaning\">\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"scandoc.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\n <div\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer *ngIf=\"preview\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n <ng-container *ngIf=\"displayInfo\">\n {{ displayInfo | translate }}\n </ng-container>\n </div> -->\n <!-- <div style=\"height: 26px\">\n <div\n style=\"text-align: center; font-size: 18px\"\n *ngIf=\"idScan && !preview && cameraReady\"\n >\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"scandoc.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"scandoc.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <div class=\"actions\" *ngIf=\"preview\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden;position:relative}:host.mobile .hint{font-size:13px}section{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.wraper{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:1}.wraper .loading{position:absolute;inset:0;z-index:20;background-color:#f5f5f5}.documentTurnOver{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.documentTurnOver mat-icon{width:200px;color:#fff;height:200px;font-size:100px}.displayInfo{text-align:center;flex:1;width:100%;background-color:#000;height:50px;display:flex;flex-direction:row;align-items:center;justify-content:center;color:#fff;z-index:200}.displayInfo.mobile{font-size:12px}.preview{width:100%;border-radius:1%}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}footer .actions{display:flex;flex-direction:row;align-items:center;padding:8px}footer .actions button{flex:1}.error{display:flex;align-items:center;justify-content:center;flex:1}.error .title{font-size:20px;margin-bottom:8px}.error .title mat-icon{margin-right:8px}.error ul{font-size:18px;list-style-type:none}mat-card{box-shadow:none!important}.mr-4{margin-right:4px}.ml-4{margin-left:4px}.p-16{padding:16px}.p-8{padding:8px}.py-16{padding:16px 0}.w-100-p{width:100%}.scanPreview{padding:16px}.scanPreview .image{background-position:center;background-repeat:no-repeat;background-size:contain}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode .content{margin-top:20px;background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.manualMode .inner{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px}.manualMode .inner mat-icon{width:60px;height:60px;font-size:60px}.manualMode .inner .text{margin:20px 0}.manualMode footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.manualMode footer button{min-width:140px;box-shadow:none;border:1px solid #ccc}.pageTurn{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .content{background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.pageTurn .inner{display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .inner mat-icon{width:60px;height:60px;font-size:60px}.pageTurn .inner .text{margin:20px 0;font-size:14px}.pageTurn footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.pageTurn footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}.hint{position:absolute;z-index:5;font-size:18px;line-height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.hint .text{border-radius:3px;padding:4px 8px;background-color:#000;color:#fff;text-align:center;display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: ["imageHandler", "type", "trigger"], outputs: ["cameraSwitched", "videoReady", "imageCapture", "initError"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ScanResultsComponent, selector: "ngx-scan-results", inputs: ["data", "images", "form"], outputs: ["action"] }, { kind: "component", type: ManualScanComponent, selector: "ngx-manual-scan", outputs: ["action"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2996
3098
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanComponent, decorators: [{
|
|
2997
3099
|
type: Component,
|
|
2998
|
-
args: [{ selector: 'ngx-scan', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container\n *ngIf=\"cameraProvider.rectPosition.t > 0 && displayInfo && !result && !manual\"\n>\n <div class=\"hint\" [ngStyle]=\"{ top: cameraProvider.hintPosition + 'px' }\">\n <span class=\"text\">\n {{ displayInfo | translate }}\n </span>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"showDialog\">\n <div class=\"pageTurn\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n </div>\n <footer>\n <button (click)=\"closeDialog()\" mat-raised-button>Ok</button>\n </footer>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"promptManual\">\n <div class=\"manualMode\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>ink_pen</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n </div>\n <footer>\n <button\n style=\"margin-right: 8px\"\n (click)=\"manualSet(true)\"\n mat-raised-button\n >\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button\n style=\"margin-left: 8px\"\n (click)=\"manualSet(false)\"\n mat-raised-button\n >\n {{ \"scandoc.no\" | translate }}\n </button>\n </footer>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"result\">\n <section>\n <ngx-scan-results\n (action)=\"selfie()\"\n [form]=\"form\"\n [data]=\"scanResults\"\n ></ngx-scan-results>\n\n <footer>\n <div class=\"actions\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retake()\">\n {{ \"scandoc.reTake\" | translate }}\n </button>\n <button\n [disabled]=\"error || form.invalid\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"use()\"\n >\n {{ \"scandoc.useData\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<ng-container *ngIf=\"manual\">\n <section>\n <ngx-manual-scan (action)=\"manualScanData($event)\"></ngx-manual-scan>\n </section>\n</ng-container>\n<ng-container *ngIf=\"!result && documentTypeSelected && !manual\">\n <section>\n <div #wraper class=\"wraper\">\n <div class=\"loading\" *ngIf=\"(!cameraReady && !preview) || scaning\">\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main\"\n #webcam\n type=\"document\"\n [trigger]=\"trigger\"\n [imageHandler]=\"imageHandler\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (destroyed)=\"cameraOff($event)\"\n (videoReady)=\"videoReady($event)\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n display: flex;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"scandoc.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ng-container *ngIf=\"errorCode === '1001'\">\n <div>\n {{ \"scandoc.extraction.c1001\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"errorCode === '1002'\">\n <div>\n {{ \"scandoc.extraction.c1002\" | translate }}\n </div>\n </ng-container>\n\n <ul *ngIf=\"errorCode === '1000'\">\n <li>\n {{ \"scandoc.placeIdCloseToDevice\" | translate }}\n </li>\n <li>\n {{ \"scandoc.ensureSufficientLight\" | translate }}\n </li>\n <li>\n {{ \"scandoc.holdDocumentSteady\" | translate }}\n </li>\n <li>\n {{ \"scandoc.makeSureAllEdgesOfTheIdAreVisible\" | translate }}\n </li>\n <li>\n {{\n \"scandoc.makeSureThereAreNoGlareAndShadowsOnTheId\" | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"scanPreview\" *ngIf=\"!error && !scaning\">\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"scandoc.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\n <div\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer *ngIf=\"preview\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n <ng-container *ngIf=\"displayInfo\">\n {{ displayInfo | translate }}\n </ng-container>\n </div> -->\n <!-- <div style=\"height: 26px\">\n <div\n style=\"text-align: center; font-size: 18px\"\n *ngIf=\"idScan && !preview && cameraReady\"\n >\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"scandoc.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"scandoc.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <div class=\"actions\" *ngIf=\"preview\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden;position:relative}:host.mobile .hint{font-size:13px}section{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.wraper{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:1}.wraper .loading{position:absolute;inset:0;z-index:20;background-color:#f5f5f5}.documentTurnOver{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.documentTurnOver mat-icon{width:200px;color:#fff;height:200px;font-size:100px}.displayInfo{text-align:center;flex:1;width:100%;background-color:#000;height:50px;display:flex;flex-direction:row;align-items:center;justify-content:center;color:#fff;z-index:200}.displayInfo.mobile{font-size:12px}.preview{width:100%;border-radius:1%}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}footer .actions{display:flex;flex-direction:row;align-items:center;padding:8px}footer .actions button{flex:1}.error{display:flex;align-items:center;justify-content:center;flex:1}.error .title{font-size:20px;margin-bottom:8px}.error .title mat-icon{margin-right:8px}.error ul{font-size:18px;list-style-type:none}mat-card{box-shadow:none!important}.mr-4{margin-right:4px}.ml-4{margin-left:4px}.p-16{padding:16px}.p-8{padding:8px}.py-16{padding:16px 0}.w-100-p{width:100%}.scanPreview{padding:16px}.scanPreview .image{background-position:center;background-repeat:no-repeat;background-size:contain}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode .content{margin-top:20px;background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.manualMode .inner{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px}.manualMode .inner mat-icon{width:60px;height:60px;font-size:60px}.manualMode .inner .text{margin:20px 0}.manualMode footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.manualMode footer button{min-width:140px;box-shadow:none;border:1px solid #ccc}.pageTurn{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .content{background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.pageTurn .inner{display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .inner mat-icon{width:60px;height:60px;font-size:60px}.pageTurn .inner .text{margin:20px 0;font-size:14px}.pageTurn footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.pageTurn footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}.hint{position:absolute;z-index:5;font-size:18px;line-height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.hint .text{border-radius:3px;padding:4px 8px;background-color:#000;color:#fff;text-align:center;display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone}\n"] }]
|
|
3100
|
+
args: [{ selector: 'ngx-scan', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container\n *ngIf=\"cameraProvider.rectPosition.t > 0 && displayInfo && !result && !manual\"\n>\n <div class=\"hint\" [ngStyle]=\"{ top: cameraProvider.hintPosition + 'px' }\">\n <span class=\"text\">\n {{ displayInfo | translate }}\n </span>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"showDialog\">\n <div class=\"pageTurn\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n </div>\n <footer>\n <button (click)=\"closeDialog()\" mat-raised-button>Ok</button>\n </footer>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"promptManual\">\n <div class=\"manualMode\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>screenshot</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n </div>\n <footer>\n <button\n style=\"margin-right: 8px\"\n (click)=\"manualSet(true)\"\n mat-raised-button\n >\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button\n style=\"margin-left: 8px\"\n (click)=\"manualSet(false)\"\n mat-raised-button\n >\n {{ \"scandoc.no\" | translate }}\n </button>\n </footer>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"result\">\n <section>\n <ngx-scan-results\n (action)=\"selfie()\"\n [form]=\"form\"\n [data]=\"scanResults\"\n ></ngx-scan-results>\n\n <footer>\n <div class=\"actions\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retake()\">\n {{ \"scandoc.reTake\" | translate }}\n </button>\n <button\n [disabled]=\"error || form.invalid\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"use()\"\n >\n {{ \"scandoc.useData\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<ng-container *ngIf=\"manual\">\n <section>\n <ngx-manual-scan (action)=\"manualScanData($event)\"></ngx-manual-scan>\n </section>\n</ng-container>\n<ng-container *ngIf=\"!result && documentTypeSelected && !manual\">\n <section>\n <div #wraper class=\"wraper\">\n <div class=\"loading\" *ngIf=\"(!cameraReady && !preview) || scaning\">\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main\"\n #webcam\n type=\"document\"\n [trigger]=\"trigger\"\n [imageHandler]=\"imageHandler\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (destroyed)=\"cameraOff($event)\"\n (videoReady)=\"videoReady($event)\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n display: flex;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"scandoc.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ng-container *ngIf=\"errorCode === '1001'\">\n <div>\n {{ \"scandoc.extraction.c1001\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"errorCode === '1002'\">\n <div>\n {{ \"scandoc.extraction.c1002\" | translate }}\n </div>\n </ng-container>\n\n <ul *ngIf=\"errorCode === '1000'\">\n <li>\n {{ \"scandoc.placeIdCloseToDevice\" | translate }}\n </li>\n <li>\n {{ \"scandoc.ensureSufficientLight\" | translate }}\n </li>\n <li>\n {{ \"scandoc.holdDocumentSteady\" | translate }}\n </li>\n <li>\n {{ \"scandoc.makeSureAllEdgesOfTheIdAreVisible\" | translate }}\n </li>\n <li>\n {{\n \"scandoc.makeSureThereAreNoGlareAndShadowsOnTheId\" | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"scanPreview\" *ngIf=\"!error && !scaning\">\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"scandoc.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\n <div\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer *ngIf=\"preview\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n <ng-container *ngIf=\"displayInfo\">\n {{ displayInfo | translate }}\n </ng-container>\n </div> -->\n <!-- <div style=\"height: 26px\">\n <div\n style=\"text-align: center; font-size: 18px\"\n *ngIf=\"idScan && !preview && cameraReady\"\n >\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"scandoc.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"scandoc.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <div class=\"actions\" *ngIf=\"preview\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden;position:relative}:host.mobile .hint{font-size:13px}section{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.wraper{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:1}.wraper .loading{position:absolute;inset:0;z-index:20;background-color:#f5f5f5}.documentTurnOver{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.documentTurnOver mat-icon{width:200px;color:#fff;height:200px;font-size:100px}.displayInfo{text-align:center;flex:1;width:100%;background-color:#000;height:50px;display:flex;flex-direction:row;align-items:center;justify-content:center;color:#fff;z-index:200}.displayInfo.mobile{font-size:12px}.preview{width:100%;border-radius:1%}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}footer .actions{display:flex;flex-direction:row;align-items:center;padding:8px}footer .actions button{flex:1}.error{display:flex;align-items:center;justify-content:center;flex:1}.error .title{font-size:20px;margin-bottom:8px}.error .title mat-icon{margin-right:8px}.error ul{font-size:18px;list-style-type:none}mat-card{box-shadow:none!important}.mr-4{margin-right:4px}.ml-4{margin-left:4px}.p-16{padding:16px}.p-8{padding:8px}.py-16{padding:16px 0}.w-100-p{width:100%}.scanPreview{padding:16px}.scanPreview .image{background-position:center;background-repeat:no-repeat;background-size:contain}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode .content{margin-top:20px;background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.manualMode .inner{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px}.manualMode .inner mat-icon{width:60px;height:60px;font-size:60px}.manualMode .inner .text{margin:20px 0}.manualMode footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.manualMode footer button{min-width:140px;box-shadow:none;border:1px solid #ccc}.pageTurn{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .content{background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.pageTurn .inner{display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .inner mat-icon{width:60px;height:60px;font-size:60px}.pageTurn .inner .text{margin:20px 0;font-size:14px}.pageTurn footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.pageTurn footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}.hint{position:absolute;z-index:5;font-size:18px;line-height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.hint .text{border-radius:3px;padding:4px 8px;background-color:#000;color:#fff;text-align:center;display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone}\n"] }]
|
|
2999
3101
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: NgxScandocCameraProvider }, { type: i0.Injector }, { type: LayoutProvider }, { type: i2.Platform }, { type: i4$1.DeviceDetectorService }, { type: NgxScandocAuthProvider }]; }, propDecorators: { type: [{
|
|
3000
3102
|
type: Input
|
|
3001
3103
|
}], dialogs: [{
|
|
@@ -3541,10 +3643,10 @@ class ConfirmComponent {
|
|
|
3541
3643
|
close() { }
|
|
3542
3644
|
}
|
|
3543
3645
|
ConfirmComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfirmComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
3544
|
-
ConfirmComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ConfirmComponent, selector: "ngx-scandoc-confirm", host: { listeners: { "document:keyup.enter": "onEnterPress($event)", "document:keyup.escape": "onEscapePress($event)" } }, ngImport: i0, template: "<header class=\"page-header\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div class=\"title\" ngClass.lt-sm=\"title-small\">\n {{ data.title | translate }}\n\n <!-- {{ data.text.statusText }} {{ data.text.status }} -->\n </div>\n\n <span fxFlex></span>\n\n <!-- <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button> -->\n <!-- <mat-icon class=\"mr-16\" style=\"color:#888;\">info_outline</mat-icon> -->\n</header>\n\n<div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <div class=\"text\" *ngIf=\"data.text\">\n <span [innerHtml]=\"data.text\"></span>\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <div class=\"actions\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button\n *ngIf=\"!data.alert && !options?.hideCancelButton\"\n (click)=\"action(false)\"\n mat-raised-button\n >\n {{ data.cancel || \"scandoc.cancel\" | translate }}\n </button>\n\n <button\n *ngIf=\"data.no && !options?.hideNoButton\"\n (click)=\"action('no')\"\n mat-raised-button\n >\n {{ data.no }}\n </button>\n <button\n *ngIf=\"!data.hideOkButton && !options?.hideOkButton\"\n (click)=\"action(true)\"\n mat-raised-button\n >\n <ng-container *ngIf=\"!data.alert\">\n {{ data.ok || \"scandoc.confirm\" | translate }}\n </ng-container>\n\n <ng-container *ngIf=\"data.alert\">\n {{ data.ok || \"scandoc.ok\" | translate }}\n </ng-container>\n </button>\n </div>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.title{font-size:18px}.text{padding:0 30px;text-align:center;font-size:16px;margin:40px 0}.actions{min-height:60px;padding:0 20px}.actions button{min-width:120px;margin-right:16px;text-transform:uppercase;box-shadow:none;border:1px solid rgba(0,0,0,.12)}footer{background-color:#fff}footer button{box-shadow:none!important;border:1px solid rgba(0,0,0,.12);font-size:13px}\n", ".page-header{z-index:2000;height:64px;padding:0;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
3646
|
+
ConfirmComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ConfirmComponent, selector: "ngx-scandoc-confirm", host: { listeners: { "document:keyup.enter": "onEnterPress($event)", "document:keyup.escape": "onEscapePress($event)" } }, ngImport: i0, template: "<header class=\"page-header\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div class=\"title\" ngClass.lt-sm=\"title-small\">\n {{ data.title | translate }}\n\n <!-- {{ data.text.statusText }} {{ data.text.status }} -->\n </div>\n\n <span fxFlex></span>\n\n <!-- <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button> -->\n <!-- <mat-icon class=\"mr-16\" style=\"color:#888;\">info_outline</mat-icon> -->\n</header>\n\n<div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <div class=\"text\" *ngIf=\"data.text\">\n <span [innerHtml]=\"data.text\"></span>\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <div class=\"actions\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button\n *ngIf=\"!data.alert && !options?.hideCancelButton\"\n (click)=\"action(false)\"\n mat-raised-button\n >\n {{ data.cancel || \"scandoc.cancel\" | translate }}\n </button>\n\n <button\n *ngIf=\"data.no && !options?.hideNoButton\"\n (click)=\"action('no')\"\n mat-raised-button\n >\n {{ data.no }}\n </button>\n <button\n *ngIf=\"!data.hideOkButton && !options?.hideOkButton\"\n (click)=\"action(true)\"\n mat-raised-button\n >\n <ng-container *ngIf=\"!data.alert\">\n {{ data.ok || \"scandoc.confirm\" | translate }}\n </ng-container>\n\n <ng-container *ngIf=\"data.alert\">\n {{ data.ok || \"scandoc.ok\" | translate }}\n </ng-container>\n </button>\n </div>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.title{font-size:18px}.text{padding:0 30px;text-align:center;font-size:16px;margin:40px 0}.actions{min-height:60px;padding:0 20px}.actions button{min-width:120px;margin-right:16px;text-transform:uppercase;box-shadow:none;border:1px solid rgba(0,0,0,.12)}footer{background-color:#fff}footer button{box-shadow:none!important;border:1px solid rgba(0,0,0,.12);font-size:13px}\n", ".page-header{z-index:2000;height:64px;padding:0;overflow:hidden;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
3545
3647
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfirmComponent, decorators: [{
|
|
3546
3648
|
type: Component,
|
|
3547
|
-
args: [{ selector: 'ngx-scandoc-confirm', template: "<header class=\"page-header\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div class=\"title\" ngClass.lt-sm=\"title-small\">\n {{ data.title | translate }}\n\n <!-- {{ data.text.statusText }} {{ data.text.status }} -->\n </div>\n\n <span fxFlex></span>\n\n <!-- <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button> -->\n <!-- <mat-icon class=\"mr-16\" style=\"color:#888;\">info_outline</mat-icon> -->\n</header>\n\n<div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <div class=\"text\" *ngIf=\"data.text\">\n <span [innerHtml]=\"data.text\"></span>\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <div class=\"actions\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button\n *ngIf=\"!data.alert && !options?.hideCancelButton\"\n (click)=\"action(false)\"\n mat-raised-button\n >\n {{ data.cancel || \"scandoc.cancel\" | translate }}\n </button>\n\n <button\n *ngIf=\"data.no && !options?.hideNoButton\"\n (click)=\"action('no')\"\n mat-raised-button\n >\n {{ data.no }}\n </button>\n <button\n *ngIf=\"!data.hideOkButton && !options?.hideOkButton\"\n (click)=\"action(true)\"\n mat-raised-button\n >\n <ng-container *ngIf=\"!data.alert\">\n {{ data.ok || \"scandoc.confirm\" | translate }}\n </ng-container>\n\n <ng-container *ngIf=\"data.alert\">\n {{ data.ok || \"scandoc.ok\" | translate }}\n </ng-container>\n </button>\n </div>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.title{font-size:18px}.text{padding:0 30px;text-align:center;font-size:16px;margin:40px 0}.actions{min-height:60px;padding:0 20px}.actions button{min-width:120px;margin-right:16px;text-transform:uppercase;box-shadow:none;border:1px solid rgba(0,0,0,.12)}footer{background-color:#fff}footer button{box-shadow:none!important;border:1px solid rgba(0,0,0,.12);font-size:13px}\n", ".page-header{z-index:2000;height:64px;padding:0;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"] }]
|
|
3649
|
+
args: [{ selector: 'ngx-scandoc-confirm', template: "<header class=\"page-header\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div class=\"title\" ngClass.lt-sm=\"title-small\">\n {{ data.title | translate }}\n\n <!-- {{ data.text.statusText }} {{ data.text.status }} -->\n </div>\n\n <span fxFlex></span>\n\n <!-- <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button> -->\n <!-- <mat-icon class=\"mr-16\" style=\"color:#888;\">info_outline</mat-icon> -->\n</header>\n\n<div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <div class=\"text\" *ngIf=\"data.text\">\n <span [innerHtml]=\"data.text\"></span>\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <div class=\"actions\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button\n *ngIf=\"!data.alert && !options?.hideCancelButton\"\n (click)=\"action(false)\"\n mat-raised-button\n >\n {{ data.cancel || \"scandoc.cancel\" | translate }}\n </button>\n\n <button\n *ngIf=\"data.no && !options?.hideNoButton\"\n (click)=\"action('no')\"\n mat-raised-button\n >\n {{ data.no }}\n </button>\n <button\n *ngIf=\"!data.hideOkButton && !options?.hideOkButton\"\n (click)=\"action(true)\"\n mat-raised-button\n >\n <ng-container *ngIf=\"!data.alert\">\n {{ data.ok || \"scandoc.confirm\" | translate }}\n </ng-container>\n\n <ng-container *ngIf=\"data.alert\">\n {{ data.ok || \"scandoc.ok\" | translate }}\n </ng-container>\n </button>\n </div>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.title{font-size:18px}.text{padding:0 30px;text-align:center;font-size:16px;margin:40px 0}.actions{min-height:60px;padding:0 20px}.actions button{min-width:120px;margin-right:16px;text-transform:uppercase;box-shadow:none;border:1px solid rgba(0,0,0,.12)}footer{background-color:#fff}footer button{box-shadow:none!important;border:1px solid rgba(0,0,0,.12);font-size:13px}\n", ".page-header{z-index:2000;height:64px;padding:0;overflow:hidden;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"] }]
|
|
3548
3650
|
}], ctorParameters: function () { return [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
3549
3651
|
type: Inject,
|
|
3550
3652
|
args: [MAT_DIALOG_DATA]
|
|
@@ -3627,10 +3729,10 @@ class ScanSelfieComponent extends BaseComponent {
|
|
|
3627
3729
|
}
|
|
3628
3730
|
}
|
|
3629
3731
|
ScanSelfieComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanSelfieComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$3.MatDialogRef }, { token: NgxScandocCameraProvider }, { token: ScanProvider }, { token: NgxScandocDialogsCoreProvider }], target: i0.ɵɵFactoryTarget.Component });
|
|
3630
|
-
ScanSelfieComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ScanSelfieComponent, selector: "ngx-scandoc-selfie", outputs: { actions: "actions" }, usesInheritance: true, ngImport: i0, template: "<header class=\"page-header\">\n <div class=\"title\">\n {{ \"scandoc.result.takeSelfie\" | translate }}\n </div>\n\n <span style=\"flex: 1\"></span>\n\n <ng-container *ngIf=\"cameraProvider.$showSwitchSelfie | async\">\n <div class=\"separator\"></div>\n <div style=\"padding: 0px 16px\">\n <ngx-scan-camera-switch></ngx-scan-camera-switch>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n</header>\n\n\n<div class=\"flex-column flex\">\n <div #wraper class=\"wraper flex flex-row\">\n <div\n style=\"\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n z-index: 20;\n background-color: whitesmoke;\n \"\n *ngIf=\"!cameraReady && !preview\"\n >\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container>\n <ngx-scandoc-webcam\n *ngIf=\"!preview\"\n class=\"main flex\"\n #webcam\n [trigger]=\"trigger\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (videoReady)=\"videoReady($event)\"\n type=\"selfie\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n position: absolute;\n width: 100%;\n height: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n \"\n >\n <div\n class=\"scanPreview\"\n style=\"display: flex; flex-direction: column; flex: 1\"\n >\n <div\n style=\"flex: 1\"\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer class=\"p-8 flex-row\">\n <button\n [disabled]=\"!cameraReady\"\n class=\"w-100-p\"\n *ngIf=\"!preview\"\n mat-raised-button\n (click)=\"scan()\"\n >\n <ng-container> {{ \"scandoc.result.takeSelfie\" | translate }} </ng-container>\n </button>\n\n <div\n class=\"w-100-p flex-row flex\"\n *ngIf=\"preview\"\n style=\"align-items: center\"\n >\n <button style=\"flex: 1\" class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n style=\"flex: 1\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n</div>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5}.flex{flex:1}.flex-column{display:flex;flex-direction:column}.flex-row{display:flex;flex-direction:row}.wraper{position:relative;overflow:hidden}h3{color:#459ae5;font-size:16px}.preview{width:100%;border-radius:1%}.subhead{height:55px;padding-top:8px}footer button{box-shadow:none!important;height:45px;min-height:45px;border:1px solid rgba(0,0,0,.12);text-transform:uppercase}.error .title{font-size:22px}.error ul{font-size:18px}.mr-4{margin-right:4px}.ml-4{margin-left:4px}.p-16{padding:16px}.p-8{padding:8px}.py-16{padding:16px 0}.w-100-p{width:100%}.scanPreview{padding:16px}.scanPreview .image{background-position:center;background-repeat:no-repeat;background-size:contain}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}@media only screen and (max-width: 768px){header .title{font-size:12px!important;line-height:18px!important}}\n", ".page-header{z-index:2000;height:64px;padding:0;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: ["imageHandler", "type", "trigger"], outputs: ["cameraSwitched", "videoReady", "imageCapture", "initError"] }, { kind: "component", type: CameraSwitchComponent, selector: "ngx-scan-camera-switch" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3732
|
+
ScanSelfieComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ScanSelfieComponent, selector: "ngx-scandoc-selfie", outputs: { actions: "actions" }, usesInheritance: true, ngImport: i0, template: "<header class=\"page-header\">\n <div class=\"title\">\n {{ \"scandoc.result.takeSelfie\" | translate }}\n </div>\n\n <span style=\"flex: 1\"></span>\n\n <ng-container *ngIf=\"cameraProvider.$showSwitchSelfie | async\">\n <div class=\"separator\"></div>\n <div style=\"padding: 0px 16px\">\n <ngx-scan-camera-switch></ngx-scan-camera-switch>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n</header>\n\n\n<div class=\"flex-column flex\">\n <div #wraper class=\"wraper flex flex-row\">\n <div\n style=\"\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n z-index: 20;\n background-color: whitesmoke;\n \"\n *ngIf=\"!cameraReady && !preview\"\n >\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container>\n <ngx-scandoc-webcam\n *ngIf=\"!preview\"\n class=\"main flex\"\n #webcam\n [trigger]=\"trigger\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (videoReady)=\"videoReady($event)\"\n type=\"selfie\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n position: absolute;\n width: 100%;\n height: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n \"\n >\n <div\n class=\"scanPreview\"\n style=\"display: flex; flex-direction: column; flex: 1\"\n >\n <div\n style=\"flex: 1\"\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer class=\"p-8 flex-row\">\n <button\n [disabled]=\"!cameraReady\"\n class=\"w-100-p\"\n *ngIf=\"!preview\"\n mat-raised-button\n (click)=\"scan()\"\n >\n <ng-container> {{ \"scandoc.result.takeSelfie\" | translate }} </ng-container>\n </button>\n\n <div\n class=\"w-100-p flex-row flex\"\n *ngIf=\"preview\"\n style=\"align-items: center\"\n >\n <button style=\"flex: 1\" class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n style=\"flex: 1\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n</div>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5}.flex{flex:1}.flex-column{display:flex;flex-direction:column}.flex-row{display:flex;flex-direction:row}.wraper{position:relative;overflow:hidden}h3{color:#459ae5;font-size:16px}.preview{width:100%;border-radius:1%}.subhead{height:55px;padding-top:8px}footer button{box-shadow:none!important;height:45px;min-height:45px;border:1px solid rgba(0,0,0,.12);text-transform:uppercase}.error .title{font-size:22px}.error ul{font-size:18px}.mr-4{margin-right:4px}.ml-4{margin-left:4px}.p-16{padding:16px}.p-8{padding:8px}.py-16{padding:16px 0}.w-100-p{width:100%}.scanPreview{padding:16px}.scanPreview .image{background-position:center;background-repeat:no-repeat;background-size:contain}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}@media only screen and (max-width: 768px){header .title{font-size:12px!important;line-height:18px!important}}\n", ".page-header{z-index:2000;height:64px;padding:0;overflow:hidden;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: ["imageHandler", "type", "trigger"], outputs: ["cameraSwitched", "videoReady", "imageCapture", "initError"] }, { kind: "component", type: CameraSwitchComponent, selector: "ngx-scan-camera-switch" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3631
3733
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanSelfieComponent, decorators: [{
|
|
3632
3734
|
type: Component,
|
|
3633
|
-
args: [{ selector: 'ngx-scandoc-selfie', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"page-header\">\n <div class=\"title\">\n {{ \"scandoc.result.takeSelfie\" | translate }}\n </div>\n\n <span style=\"flex: 1\"></span>\n\n <ng-container *ngIf=\"cameraProvider.$showSwitchSelfie | async\">\n <div class=\"separator\"></div>\n <div style=\"padding: 0px 16px\">\n <ngx-scan-camera-switch></ngx-scan-camera-switch>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n</header>\n\n\n<div class=\"flex-column flex\">\n <div #wraper class=\"wraper flex flex-row\">\n <div\n style=\"\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n z-index: 20;\n background-color: whitesmoke;\n \"\n *ngIf=\"!cameraReady && !preview\"\n >\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container>\n <ngx-scandoc-webcam\n *ngIf=\"!preview\"\n class=\"main flex\"\n #webcam\n [trigger]=\"trigger\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (videoReady)=\"videoReady($event)\"\n type=\"selfie\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n position: absolute;\n width: 100%;\n height: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n \"\n >\n <div\n class=\"scanPreview\"\n style=\"display: flex; flex-direction: column; flex: 1\"\n >\n <div\n style=\"flex: 1\"\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer class=\"p-8 flex-row\">\n <button\n [disabled]=\"!cameraReady\"\n class=\"w-100-p\"\n *ngIf=\"!preview\"\n mat-raised-button\n (click)=\"scan()\"\n >\n <ng-container> {{ \"scandoc.result.takeSelfie\" | translate }} </ng-container>\n </button>\n\n <div\n class=\"w-100-p flex-row flex\"\n *ngIf=\"preview\"\n style=\"align-items: center\"\n >\n <button style=\"flex: 1\" class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n style=\"flex: 1\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n</div>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5}.flex{flex:1}.flex-column{display:flex;flex-direction:column}.flex-row{display:flex;flex-direction:row}.wraper{position:relative;overflow:hidden}h3{color:#459ae5;font-size:16px}.preview{width:100%;border-radius:1%}.subhead{height:55px;padding-top:8px}footer button{box-shadow:none!important;height:45px;min-height:45px;border:1px solid rgba(0,0,0,.12);text-transform:uppercase}.error .title{font-size:22px}.error ul{font-size:18px}.mr-4{margin-right:4px}.ml-4{margin-left:4px}.p-16{padding:16px}.p-8{padding:8px}.py-16{padding:16px 0}.w-100-p{width:100%}.scanPreview{padding:16px}.scanPreview .image{background-position:center;background-repeat:no-repeat;background-size:contain}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}@media only screen and (max-width: 768px){header .title{font-size:12px!important;line-height:18px!important}}\n", ".page-header{z-index:2000;height:64px;padding:0;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"] }]
|
|
3735
|
+
args: [{ selector: 'ngx-scandoc-selfie', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"page-header\">\n <div class=\"title\">\n {{ \"scandoc.result.takeSelfie\" | translate }}\n </div>\n\n <span style=\"flex: 1\"></span>\n\n <ng-container *ngIf=\"cameraProvider.$showSwitchSelfie | async\">\n <div class=\"separator\"></div>\n <div style=\"padding: 0px 16px\">\n <ngx-scan-camera-switch></ngx-scan-camera-switch>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n</header>\n\n\n<div class=\"flex-column flex\">\n <div #wraper class=\"wraper flex flex-row\">\n <div\n style=\"\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n z-index: 20;\n background-color: whitesmoke;\n \"\n *ngIf=\"!cameraReady && !preview\"\n >\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container>\n <ngx-scandoc-webcam\n *ngIf=\"!preview\"\n class=\"main flex\"\n #webcam\n [trigger]=\"trigger\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (videoReady)=\"videoReady($event)\"\n type=\"selfie\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n position: absolute;\n width: 100%;\n height: 100%;\n flex: 1;\n display: flex;\n flex-direction: row;\n \"\n >\n <div\n class=\"scanPreview\"\n style=\"display: flex; flex-direction: column; flex: 1\"\n >\n <div\n style=\"flex: 1\"\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer class=\"p-8 flex-row\">\n <button\n [disabled]=\"!cameraReady\"\n class=\"w-100-p\"\n *ngIf=\"!preview\"\n mat-raised-button\n (click)=\"scan()\"\n >\n <ng-container> {{ \"scandoc.result.takeSelfie\" | translate }} </ng-container>\n </button>\n\n <div\n class=\"w-100-p flex-row flex\"\n *ngIf=\"preview\"\n style=\"align-items: center\"\n >\n <button style=\"flex: 1\" class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n style=\"flex: 1\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n</div>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5}.flex{flex:1}.flex-column{display:flex;flex-direction:column}.flex-row{display:flex;flex-direction:row}.wraper{position:relative;overflow:hidden}h3{color:#459ae5;font-size:16px}.preview{width:100%;border-radius:1%}.subhead{height:55px;padding-top:8px}footer button{box-shadow:none!important;height:45px;min-height:45px;border:1px solid rgba(0,0,0,.12);text-transform:uppercase}.error .title{font-size:22px}.error ul{font-size:18px}.mr-4{margin-right:4px}.ml-4{margin-left:4px}.p-16{padding:16px}.p-8{padding:8px}.py-16{padding:16px 0}.w-100-p{width:100%}.scanPreview{padding:16px}.scanPreview .image{background-position:center;background-repeat:no-repeat;background-size:contain}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}@media only screen and (max-width: 768px){header .title{font-size:12px!important;line-height:18px!important}}\n", ".page-header{z-index:2000;height:64px;padding:0;overflow:hidden;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"] }]
|
|
3634
3736
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$3.MatDialogRef }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: NgxScandocDialogsCoreProvider }]; }, propDecorators: { actions: [{
|
|
3635
3737
|
type: Output
|
|
3636
3738
|
}] } });
|
|
@@ -3845,10 +3947,10 @@ class ScanProfileComponent extends BaseComponent {
|
|
|
3845
3947
|
}
|
|
3846
3948
|
}
|
|
3847
3949
|
ScanProfileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProfileComponent, deps: [{ token: NgxScandocDialogsCoreProvider }, { token: NgxScandocCameraProvider }, { token: ScanProvider }, { token: i1$3.MatDialogRef }, { token: i2.Platform }], target: i0.ɵɵFactoryTarget.Component });
|
|
3848
|
-
ScanProfileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ScanProfileComponent, selector: "ngx-scandoc-profile", inputs: { type: "type" }, host: { listeners: { "touchmove": "handleTouchMove($event)" } }, usesInheritance: true, ngImport: i0, template: "<header class=\"page-header\">\n <div class=\"title\" >\n {{ \"scandoc.title\" | translate }}\n </div>\n\n <span style=\"flex: 1\"></span>\n\n <ng-container *ngIf=\"cameraProvider.$showSwitch| async\">\n <div class=\"separator\"></div>\n <div style=\"padding: 0px 16px\">\n <ngx-scan-camera-switch></ngx-scan-camera-switch>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"type === 'desktop'\">\n <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n</header>\n\n<ngx-scan\n (actions)=\"actions($event)\"\n [showDialog]=\"showDialog\"\n [dialogs]=\"dialogs\"\n></ngx-scan>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}@media only screen and (max-width: 768px){header .title{font-size:12px!important;line-height:18px!important}}\n", ".page-header{z-index:2000;height:64px;padding:0;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: ScanComponent, selector: "ngx-scan", inputs: ["type", "dialogs", "showDialog"], outputs: ["actions"] }, { kind: "component", type: CameraSwitchComponent, selector: "ngx-scan-camera-switch" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3950
|
+
ScanProfileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ScanProfileComponent, selector: "ngx-scandoc-profile", inputs: { type: "type" }, host: { listeners: { "touchmove": "handleTouchMove($event)" } }, usesInheritance: true, ngImport: i0, template: "<header class=\"page-header\">\n <div class=\"title\" >\n {{ \"scandoc.title\" | translate }}\n </div>\n\n <span style=\"flex: 1\"></span>\n\n <ng-container *ngIf=\"cameraProvider.$showSwitch| async\">\n <div class=\"separator\"></div>\n <div style=\"padding: 0px 16px\">\n <ngx-scan-camera-switch></ngx-scan-camera-switch>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"type === 'desktop'\">\n <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n</header>\n\n<ngx-scan\n (actions)=\"actions($event)\"\n [showDialog]=\"showDialog\"\n [dialogs]=\"dialogs\"\n></ngx-scan>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}@media only screen and (max-width: 768px){header .title{font-size:12px!important;line-height:18px!important}}\n", ".page-header{z-index:2000;height:64px;padding:0;overflow:hidden;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: ScanComponent, selector: "ngx-scan", inputs: ["type", "dialogs", "showDialog"], outputs: ["actions"] }, { kind: "component", type: CameraSwitchComponent, selector: "ngx-scan-camera-switch" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3849
3951
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProfileComponent, decorators: [{
|
|
3850
3952
|
type: Component,
|
|
3851
|
-
args: [{ selector: 'ngx-scandoc-profile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"page-header\">\n <div class=\"title\" >\n {{ \"scandoc.title\" | translate }}\n </div>\n\n <span style=\"flex: 1\"></span>\n\n <ng-container *ngIf=\"cameraProvider.$showSwitch| async\">\n <div class=\"separator\"></div>\n <div style=\"padding: 0px 16px\">\n <ngx-scan-camera-switch></ngx-scan-camera-switch>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"type === 'desktop'\">\n <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n</header>\n\n<ngx-scan\n (actions)=\"actions($event)\"\n [showDialog]=\"showDialog\"\n [dialogs]=\"dialogs\"\n></ngx-scan>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}@media only screen and (max-width: 768px){header .title{font-size:12px!important;line-height:18px!important}}\n", ".page-header{z-index:2000;height:64px;padding:0;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"] }]
|
|
3953
|
+
args: [{ selector: 'ngx-scandoc-profile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"page-header\">\n <div class=\"title\" >\n {{ \"scandoc.title\" | translate }}\n </div>\n\n <span style=\"flex: 1\"></span>\n\n <ng-container *ngIf=\"cameraProvider.$showSwitch| async\">\n <div class=\"separator\"></div>\n <div style=\"padding: 0px 16px\">\n <ngx-scan-camera-switch></ngx-scan-camera-switch>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"type === 'desktop'\">\n <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n</header>\n\n<ngx-scan\n (actions)=\"actions($event)\"\n [showDialog]=\"showDialog\"\n [dialogs]=\"dialogs\"\n></ngx-scan>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}@media only screen and (max-width: 768px){header .title{font-size:12px!important;line-height:18px!important}}\n", ".page-header{z-index:2000;height:64px;padding:0;overflow:hidden;background-color:#fff;border-bottom:1px solid rgba(0,0,0,.12)}.page-header .title{padding-left:24px;line-height:64px;font-size:18px}.page-header .separator{width:1px;background-color:#0000001f;height:100%}.page-header .total{line-height:64px}.page-header .total span{font-weight:700}.page-footer{height:64px}.page-footer button{margin-left:24px;box-shadow:none!important}\n"] }]
|
|
3852
3954
|
}], ctorParameters: function () { return [{ type: NgxScandocDialogsCoreProvider }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: i1$3.MatDialogRef }, { type: i2.Platform }]; }, propDecorators: { type: [{
|
|
3853
3955
|
type: Input
|
|
3854
3956
|
}], handleTouchMove: [{
|
|
@@ -4289,8 +4391,6 @@ class NgxScandocModule {
|
|
|
4289
4391
|
return {
|
|
4290
4392
|
ngModule: NgxScandocModule,
|
|
4291
4393
|
providers: [
|
|
4292
|
-
NgxScandocCameraProvider,
|
|
4293
|
-
NgxScandocAuthProvider,
|
|
4294
4394
|
{ provide: AUTH_CONFIG_TOKEN, useValue: config.auth },
|
|
4295
4395
|
ScanProvider,
|
|
4296
4396
|
{ provide: SCAN_CONFIG_TOKEN, useValue: config.scan },
|
|
@@ -4299,9 +4399,14 @@ class NgxScandocModule {
|
|
|
4299
4399
|
useClass: HttpErrorInterceptor,
|
|
4300
4400
|
multi: true,
|
|
4301
4401
|
},
|
|
4402
|
+
NgxScanDocTranslationProvider,
|
|
4403
|
+
NgxScandocCameraProvider,
|
|
4404
|
+
// NgxScandocAuthProvider,
|
|
4302
4405
|
],
|
|
4303
4406
|
};
|
|
4304
4407
|
}
|
|
4408
|
+
constructor() {
|
|
4409
|
+
}
|
|
4305
4410
|
}
|
|
4306
4411
|
NgxScandocModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NgxScandocModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4307
4412
|
NgxScandocModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NgxScandocModule, imports: [DialogsModule], exports: [DialogsModule] });
|
|
@@ -4313,7 +4418,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4313
4418
|
imports: [DialogsModule.forRoot()],
|
|
4314
4419
|
exports: [DialogsModule],
|
|
4315
4420
|
}]
|
|
4316
|
-
}] });
|
|
4421
|
+
}], ctorParameters: function () { return []; } });
|
|
4317
4422
|
|
|
4318
4423
|
/*
|
|
4319
4424
|
* Public API Surface of ngx-scandoc
|