ngx-scandoc 15.1.3 → 15.1.5
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/core/interfaces/config.d.ts +1 -0
- package/esm2020/core/components/scan/scan.component.mjs +55 -35
- package/esm2020/core/components/webcam/domain/webcam-image.mjs +1 -1
- package/esm2020/core/components/webcam/webcam/webcam.component.mjs +150 -29
- package/esm2020/core/interfaces/config.mjs +1 -1
- 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 +246 -138
- package/fesm2015/ngx-scandoc.mjs.map +1 -1
- package/fesm2020/ngx-scandoc.mjs +245 -138
- 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/en.json +1 -1
package/fesm2015/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,90 @@ 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
|
+
var _a, _b;
|
|
335
|
+
//console.warn(t.getConstraints());
|
|
336
|
+
if (!this.isMobile) {
|
|
337
|
+
try {
|
|
338
|
+
const settings = t.getSettings();
|
|
339
|
+
const cap = t.getCapabilities();
|
|
340
|
+
const con = t.getConstraints();
|
|
341
|
+
console.warn(cap, con);
|
|
342
|
+
console.warn(settings);
|
|
343
|
+
const max = (_a = cap.width) === null || _a === void 0 ? void 0 : _a.max;
|
|
344
|
+
const min = (_b = cap.width) === null || _b === void 0 ? void 0 : _b.min;
|
|
345
|
+
const currentWidth = settings.width;
|
|
346
|
+
const currentHeight = settings.height;
|
|
347
|
+
const conWidth = con.width;
|
|
348
|
+
const conHeight = con.width;
|
|
349
|
+
console.warn('CAPS', min, max, 'CURENT', currentWidth, currentHeight);
|
|
350
|
+
if (max &&
|
|
351
|
+
currentWidth &&
|
|
352
|
+
max > currentWidth &&
|
|
353
|
+
conWidth != max) {
|
|
354
|
+
console.log('[SET NEW RESOLUTION]');
|
|
355
|
+
this.setupAttempt++;
|
|
356
|
+
if (this.setupAttempt < 4) {
|
|
357
|
+
this.setup(videoTrackConstraints);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
this.setDeviceId(stream);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
catch (error) {
|
|
365
|
+
console.warn(error);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
console.warn('MOBILE VIDEO START');
|
|
370
|
+
this.setDeviceId(stream);
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
}, (er) => {
|
|
374
|
+
this.setupAttempt++;
|
|
375
|
+
console.warn('ERROR', er);
|
|
376
|
+
if (this.setupAttempt < 4) {
|
|
377
|
+
if (er instanceof OverconstrainedError) {
|
|
378
|
+
if (!this.isMobile) {
|
|
379
|
+
this.setup(videoTrackConstraints);
|
|
380
|
+
}
|
|
381
|
+
// this.setup({
|
|
382
|
+
// height: 720,
|
|
383
|
+
// width: 1280,
|
|
384
|
+
// });
|
|
385
|
+
//}
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
this.setup(videoTrackConstraints);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
347
391
|
});
|
|
348
392
|
}
|
|
349
393
|
startVideo() {
|
|
350
394
|
console.log('START VIDEO');
|
|
351
395
|
this.video.srcObject = this.mediaStream;
|
|
352
396
|
this.video.onloadedmetadata = (data) => {
|
|
353
|
-
|
|
397
|
+
console.log(data);
|
|
354
398
|
this.video.play();
|
|
355
399
|
this.showVideo = true;
|
|
356
400
|
this.cd.detectChanges();
|
|
@@ -358,7 +402,7 @@ class WebcamComponent extends BaseComponent {
|
|
|
358
402
|
};
|
|
359
403
|
this.video.onplay = () => {
|
|
360
404
|
this.videoReady.next(true);
|
|
361
|
-
|
|
405
|
+
console.log(this.video.videoWidth, this.video.videoHeight);
|
|
362
406
|
this.drawRectangle();
|
|
363
407
|
};
|
|
364
408
|
}
|
|
@@ -383,21 +427,23 @@ class WebcamComponent extends BaseComponent {
|
|
|
383
427
|
_canvas.width = videoWidth;
|
|
384
428
|
_canvas.height = videoHeight;
|
|
385
429
|
const ctx = _canvas.getContext('2d', {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
430
|
+
// alpha: false,
|
|
431
|
+
// powerPreference: 'high-performance',
|
|
432
|
+
// antialias: false,
|
|
433
|
+
// depth: false,
|
|
434
|
+
// desynchronized: true,
|
|
435
|
+
// willReadFrequently: true,
|
|
391
436
|
});
|
|
392
437
|
const canvas = document.createElement('canvas'); // needs an initial size
|
|
393
438
|
canvas.height = smallSize.h;
|
|
394
439
|
canvas.width = smallSize.w;
|
|
395
440
|
const ctxO = canvas.getContext('2d', {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
441
|
+
// alpha: false,
|
|
442
|
+
// powerPreference: 'high-performance',
|
|
443
|
+
// antialias: false,
|
|
444
|
+
// depth: false,
|
|
445
|
+
// desynchronized: true,
|
|
446
|
+
// willReadFrequently: true,
|
|
401
447
|
});
|
|
402
448
|
this.canvasData.ctx = ctx;
|
|
403
449
|
this.canvasData.ctxO = ctxO;
|
|
@@ -443,6 +489,23 @@ class WebcamComponent extends BaseComponent {
|
|
|
443
489
|
this.imageCapture.emit(new WebcamImage(imgAsUrl, mimeType, new ImageData(1, 1), null));
|
|
444
490
|
}
|
|
445
491
|
}
|
|
492
|
+
humanFileSize(bytes, si = false, dp = 1) {
|
|
493
|
+
const thresh = si ? 1000 : 1024;
|
|
494
|
+
if (Math.abs(bytes) < thresh) {
|
|
495
|
+
return bytes + ' B';
|
|
496
|
+
}
|
|
497
|
+
const units = si
|
|
498
|
+
? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
|
499
|
+
: ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];
|
|
500
|
+
let u = -1;
|
|
501
|
+
const r = Math.pow(10, dp);
|
|
502
|
+
do {
|
|
503
|
+
bytes /= thresh;
|
|
504
|
+
++u;
|
|
505
|
+
} while (Math.round(Math.abs(bytes) * r) / r >= thresh &&
|
|
506
|
+
u < units.length - 1);
|
|
507
|
+
return bytes.toFixed(dp) + ' ' + units[u];
|
|
508
|
+
}
|
|
446
509
|
takeSnapshot(time) {
|
|
447
510
|
if (this.type !== 'document') {
|
|
448
511
|
this.takeSelfie();
|
|
@@ -488,10 +551,15 @@ class WebcamComponent extends BaseComponent {
|
|
|
488
551
|
ctxO.drawImage(_canvas, 0, 0, size.w, size.h);
|
|
489
552
|
//console.timeEnd('drawVideo');
|
|
490
553
|
//console.time('DRAW');
|
|
491
|
-
const imData = ctx.getImageData(0, 0, videoWidth, videoHeight);
|
|
554
|
+
// const imData: any = ctx.getImageData(0, 0, videoWidth, videoHeight);
|
|
555
|
+
console.log(canvas.width, _canvas.width);
|
|
492
556
|
//console.timeEnd('DRAW');
|
|
493
557
|
//console.time('CTX');
|
|
494
|
-
const resize = canvas.toDataURL(
|
|
558
|
+
const resize = canvas.toDataURL('image/jpeg');
|
|
559
|
+
const canvasData = _canvas.toDataURL(mimeType, 1);
|
|
560
|
+
console.log(this.humanFileSize(canvasData.length));
|
|
561
|
+
console.log(this.humanFileSize(resize.length));
|
|
562
|
+
console.log(new Date().toISOString());
|
|
495
563
|
//console.timeEnd('CTX');
|
|
496
564
|
const currentTime = new Date().getTime();
|
|
497
565
|
const diff = currentTime - time;
|
|
@@ -501,7 +569,7 @@ class WebcamComponent extends BaseComponent {
|
|
|
501
569
|
const delayMax = drawTime < 60 ? 100 : 200;
|
|
502
570
|
const delay = diff > delayMax ? 0 : delayMax - diff;
|
|
503
571
|
const timeout = setTimeout(() => {
|
|
504
|
-
this.imageCapture.emit(new WebcamImage(
|
|
572
|
+
this.imageCapture.emit(new WebcamImage(canvasData, mimeType, '', resize));
|
|
505
573
|
clearTimeout(timeout);
|
|
506
574
|
}, delay);
|
|
507
575
|
}
|
|
@@ -530,9 +598,16 @@ class WebcamComponent extends BaseComponent {
|
|
|
530
598
|
const ctx = _canvas.getContext('2d');
|
|
531
599
|
ctx.clearRect(0, 0, _canvas.width, _canvas.height);
|
|
532
600
|
const { width, height } = _canvas;
|
|
533
|
-
|
|
534
|
-
|
|
601
|
+
console.log('CANVAS', width, height);
|
|
602
|
+
let { videoWidth, videoHeight } = this.video;
|
|
603
|
+
// video will be scaled to max canvas height
|
|
535
604
|
const aspect = videoWidth / videoHeight;
|
|
605
|
+
// if (videoHeight < height) {
|
|
606
|
+
// videoHeight = height;
|
|
607
|
+
// videoWidth = height*aspect;
|
|
608
|
+
// }
|
|
609
|
+
console.log('VIDEO', videoWidth, videoHeight);
|
|
610
|
+
const docSize = this.type === 'selfie' ? 1 : 86 / 55;
|
|
536
611
|
let _height;
|
|
537
612
|
let _width;
|
|
538
613
|
if (videoWidth >= videoHeight) {
|
|
@@ -551,6 +626,7 @@ class WebcamComponent extends BaseComponent {
|
|
|
551
626
|
_height = _width / aspect;
|
|
552
627
|
}
|
|
553
628
|
}
|
|
629
|
+
console.log('CALC', _width, _height);
|
|
554
630
|
let w, h;
|
|
555
631
|
if (_width <= _height) {
|
|
556
632
|
w = _width - 2 * padding;
|
|
@@ -560,19 +636,25 @@ class WebcamComponent extends BaseComponent {
|
|
|
560
636
|
h = _height - 2 * padding;
|
|
561
637
|
w = docSize * h;
|
|
562
638
|
}
|
|
639
|
+
if (w > _width) {
|
|
640
|
+
w = _width - 2 * padding;
|
|
641
|
+
h = w / docSize;
|
|
642
|
+
}
|
|
563
643
|
h = Math.floor(h);
|
|
564
644
|
w = Math.floor(w);
|
|
645
|
+
console.log(w, h);
|
|
565
646
|
const left = Math.floor((width - w) / 2);
|
|
566
647
|
const top = Math.floor((height - h) / 2);
|
|
567
648
|
ctx.strokeStyle = 'white';
|
|
568
649
|
// ctx.strokeRect(left, top, _width, _height);
|
|
569
|
-
ctx.fillStyle = 'rgba(255, 255, 255, 0.
|
|
650
|
+
ctx.fillStyle = 'rgba(255, 255, 255, 0.2)';
|
|
570
651
|
// ctx.shadowColor = 'white';
|
|
571
652
|
ctx.shadowBlur = 15;
|
|
572
653
|
ctx.beginPath();
|
|
573
654
|
// Draw using 5px for border radius on all sides
|
|
574
655
|
// stroke it but no fill
|
|
575
|
-
|
|
656
|
+
const radius = this.isMobile ? 10 : 30;
|
|
657
|
+
ctx.roundRect(left, top, w, h, radius);
|
|
576
658
|
ctx.stroke();
|
|
577
659
|
ctx.fill();
|
|
578
660
|
this.cameraProvider.rectPosition = {
|
|
@@ -1410,7 +1492,7 @@ class LayoutProvider {
|
|
|
1410
1492
|
this.isMobile = false;
|
|
1411
1493
|
this.breakpoint$ = this.breakpointObserver
|
|
1412
1494
|
.observe(['(min-width: 768px)'])
|
|
1413
|
-
.pipe(tap
|
|
1495
|
+
.pipe(tap((value) => console.log(value)), distinctUntilChanged());
|
|
1414
1496
|
}
|
|
1415
1497
|
init() {
|
|
1416
1498
|
this.breakpoint$.subscribe((v) => {
|
|
@@ -1473,7 +1555,7 @@ class NgxScandocAuthProvider {
|
|
|
1473
1555
|
.post(`${path}${refresh}`, {
|
|
1474
1556
|
refresh_token: this.refresh_token,
|
|
1475
1557
|
})
|
|
1476
|
-
.pipe(tap((token) => {
|
|
1558
|
+
.pipe(tap$1((token) => {
|
|
1477
1559
|
// console.log(this.token);
|
|
1478
1560
|
this.token = token.access_token;
|
|
1479
1561
|
this.updateToken();
|
|
@@ -1505,7 +1587,7 @@ class NgxScandocAuthProvider {
|
|
|
1505
1587
|
clientId: clientId,
|
|
1506
1588
|
token: tokenName,
|
|
1507
1589
|
})
|
|
1508
|
-
.pipe(map((data) => data.accessToken), tap((token) => {
|
|
1590
|
+
.pipe(map((data) => data.accessToken), tap$1((token) => {
|
|
1509
1591
|
this.token = token;
|
|
1510
1592
|
const decoded = jwt_decode(this.token);
|
|
1511
1593
|
const { iat, exp } = decoded;
|
|
@@ -1517,7 +1599,7 @@ class NgxScandocAuthProvider {
|
|
|
1517
1599
|
user_key: this.user_key,
|
|
1518
1600
|
sub_client: this.sub_client,
|
|
1519
1601
|
})
|
|
1520
|
-
.pipe(tap((token) => {
|
|
1602
|
+
.pipe(tap$1((token) => {
|
|
1521
1603
|
this.token = token.access_token;
|
|
1522
1604
|
this.refresh_token = token.refresh_token;
|
|
1523
1605
|
this.updateToken();
|
|
@@ -1535,20 +1617,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1535
1617
|
|
|
1536
1618
|
const TRANSLATION_PROVIDER = new InjectionToken('Injection token for translation providers.');
|
|
1537
1619
|
class NgxScanDocTranslationProvider {
|
|
1538
|
-
constructor(translate, injector,
|
|
1620
|
+
constructor(translate, injector,
|
|
1621
|
+
//@Optional() @Inject(SCAN_CONFIG_TOKEN) config: ScanConfig,
|
|
1622
|
+
providers, platformLocation) {
|
|
1539
1623
|
this.translate = translate;
|
|
1540
1624
|
this.injector = injector;
|
|
1541
1625
|
this.platformLocation = platformLocation;
|
|
1542
|
-
|
|
1626
|
+
console.log('MM', Math.random());
|
|
1543
1627
|
this.customLoader = this.translate.currentLoader;
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
for (const provider of providers) {
|
|
1550
|
-
this.addTranslationFolder(provider.name, provider.source);
|
|
1551
|
-
}
|
|
1628
|
+
//console.log('config',config)
|
|
1629
|
+
// console.log(this.translate)
|
|
1630
|
+
if (providers && providers.length > 0) {
|
|
1631
|
+
for (const provider of providers) {
|
|
1632
|
+
this.addTranslationFolder(provider.name, provider.source);
|
|
1552
1633
|
}
|
|
1553
1634
|
}
|
|
1554
1635
|
}
|
|
@@ -1560,6 +1641,10 @@ class NgxScanDocTranslationProvider {
|
|
|
1560
1641
|
// .join('');
|
|
1561
1642
|
// return baseHref != '' ? `/${baseHref}${path}` : path;
|
|
1562
1643
|
}
|
|
1644
|
+
setDefaultLang(lang) {
|
|
1645
|
+
this.defaultLang = lang;
|
|
1646
|
+
this.translate.setDefaultLang(this.defaultLang);
|
|
1647
|
+
}
|
|
1563
1648
|
addTranslationFolder(name = '', path = '') {
|
|
1564
1649
|
console.log(name, path, this.userLang, this.defaultLang);
|
|
1565
1650
|
if (!this.customLoader.providerRegistered(name)) {
|
|
@@ -2401,6 +2486,8 @@ class ScanComponent extends BaseComponent {
|
|
|
2401
2486
|
time: 0,
|
|
2402
2487
|
load: 0,
|
|
2403
2488
|
};
|
|
2489
|
+
this.numberOfValidations = 0;
|
|
2490
|
+
this.validationDebug = [];
|
|
2404
2491
|
this.scanProvider = this.injector.get(ScanProvider);
|
|
2405
2492
|
if (!this.scanProvider.config.development) {
|
|
2406
2493
|
// console = {
|
|
@@ -2454,25 +2541,26 @@ class ScanComponent extends BaseComponent {
|
|
|
2454
2541
|
this.scanDelay = diff;
|
|
2455
2542
|
}
|
|
2456
2543
|
this.scanImageTimestamps.load = time;
|
|
2457
|
-
if (webcamImage.
|
|
2544
|
+
if (webcamImage.imageAsDataUrl) {
|
|
2458
2545
|
this.scannedImages.push(webcamImage);
|
|
2459
2546
|
this.handleLongValidationError(webcamImage, 'worker');
|
|
2460
2547
|
}
|
|
2461
2548
|
this.cd.detectChanges();
|
|
2462
|
-
if (this.scannedImages.length >
|
|
2463
|
-
if (this.scanProvider.config.development) {
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
}
|
|
2549
|
+
if (this.scannedImages.length > 0 && !this.validation) {
|
|
2550
|
+
// if (this.scanProvider.config.development) {
|
|
2551
|
+
// this.scannedImages.forEach((img) => {
|
|
2552
|
+
// const consoleBackground =
|
|
2553
|
+
// "font-size:100px;background-image: url('" +
|
|
2554
|
+
// img.imageResized +
|
|
2555
|
+
// "');background-size: contain; background-repeat: no-repeat;";
|
|
2556
|
+
// console.log('%c ', consoleBackground);
|
|
2557
|
+
// });
|
|
2558
|
+
// }
|
|
2471
2559
|
// this.frontImage = webcamImage.imageResized;
|
|
2472
|
-
console.timeEnd('scan');
|
|
2473
|
-
console.time('scan');
|
|
2560
|
+
// console.timeEnd('scan');
|
|
2561
|
+
// console.time('scan');
|
|
2474
2562
|
// get last 10
|
|
2475
|
-
console.log('CAPTURED:', this.scannedImages.length);
|
|
2563
|
+
// console.log('CAPTURED:', this.scannedImages.length);
|
|
2476
2564
|
const images = this.scannedImages.slice(-5);
|
|
2477
2565
|
// set images to 0
|
|
2478
2566
|
this.scannedImages = [];
|
|
@@ -2491,21 +2579,31 @@ class ScanComponent extends BaseComponent {
|
|
|
2491
2579
|
this.__subs(this.scanProvider.burst(imagesArray)).subscribe((resp) => {
|
|
2492
2580
|
this.displayInfo = 'scandoc.info.c' + resp.InfoCode;
|
|
2493
2581
|
// console.timeEnd('validationPOST');
|
|
2494
|
-
console.log('AnalysisTime', resp.AnalysisTime);
|
|
2582
|
+
// console.log('AnalysisTime', resp.AnalysisTime);
|
|
2495
2583
|
const { DocType, Series, Side, InfoCode } = resp;
|
|
2496
2584
|
// if (InfoCode === '1006' && this.idScan) {
|
|
2497
2585
|
// this.handleLongValidationError(image);
|
|
2498
2586
|
// }
|
|
2587
|
+
// console.warn(resp.Validated, this.numberOfValidations);
|
|
2499
2588
|
if (resp.Validated) {
|
|
2589
|
+
this.numberOfValidations++;
|
|
2590
|
+
this.validationDebug.push(resp);
|
|
2591
|
+
}
|
|
2592
|
+
else {
|
|
2593
|
+
this.numberOfValidations = 0;
|
|
2594
|
+
this.validationDebug = [];
|
|
2595
|
+
}
|
|
2596
|
+
if (this.numberOfValidations >= 3) {
|
|
2500
2597
|
this.displayInfo = '';
|
|
2501
|
-
console.log('[SCANNED INDEX]', resp.Index);
|
|
2598
|
+
// console.log('[SCANNED INDEX]', resp.Index);
|
|
2502
2599
|
const selectedImage = images[resp.Index];
|
|
2503
2600
|
// this.preview = this.webcamImage.imageAsDataUrl;
|
|
2504
2601
|
this.cd.detectChanges();
|
|
2505
2602
|
let image = selectedImage;
|
|
2603
|
+
console.warn(type);
|
|
2506
2604
|
if (type == 'worker') {
|
|
2507
|
-
const dataUrl = this.handleBitmapImage(selectedImage.bitmap);
|
|
2508
|
-
image =
|
|
2605
|
+
//const dataUrl = this.handleBitmapImage(selectedImage.bitmap);
|
|
2606
|
+
image = selectedImage.imageAsDataUrl;
|
|
2509
2607
|
}
|
|
2510
2608
|
if (InfoCode === '1007') {
|
|
2511
2609
|
// For ID ask for other side
|
|
@@ -2516,13 +2614,17 @@ class ScanComponent extends BaseComponent {
|
|
|
2516
2614
|
this.scanBlastData[1].image = image;
|
|
2517
2615
|
}
|
|
2518
2616
|
if (this.scanBlastData[0].image && this.scanBlastData[1].image) {
|
|
2519
|
-
console.warn('UPLOAD');
|
|
2617
|
+
// console.warn('UPLOAD');
|
|
2520
2618
|
if (type == 'worker') {
|
|
2521
2619
|
this.imageHandler.next({ type: 'stop' });
|
|
2522
2620
|
}
|
|
2621
|
+
//console.warn('DEBUG', Side, this.validationDebug);
|
|
2523
2622
|
this.scanBlastFinish();
|
|
2524
2623
|
}
|
|
2525
2624
|
else {
|
|
2625
|
+
this.numberOfValidations = 0;
|
|
2626
|
+
// console.warn('DEBUG',Side,this.validationDebug)
|
|
2627
|
+
this.validationDebug = [];
|
|
2526
2628
|
const num = Side === 'FRONT' ? 1 : 0;
|
|
2527
2629
|
this.scanSecondSide = true;
|
|
2528
2630
|
this.singleScan(this.scanBlastData[num]);
|
|
@@ -2538,8 +2640,9 @@ class ScanComponent extends BaseComponent {
|
|
|
2538
2640
|
}
|
|
2539
2641
|
}
|
|
2540
2642
|
else {
|
|
2643
|
+
// console.warn('DEBUG', Side, this.validationDebug);
|
|
2541
2644
|
this.scanBlastData[0].image = image;
|
|
2542
|
-
console.warn('UPLOAD');
|
|
2645
|
+
// console.warn('UPLOAD');
|
|
2543
2646
|
if (type == 'worker') {
|
|
2544
2647
|
this.imageHandler.next({ type: 'stop' });
|
|
2545
2648
|
}
|
|
@@ -2579,7 +2682,7 @@ class ScanComponent extends BaseComponent {
|
|
|
2579
2682
|
// delete this.logData.ExpectedOutput._avatar;
|
|
2580
2683
|
// }
|
|
2581
2684
|
// this.scanProvider.sendLog(this.logData).subscribe();
|
|
2582
|
-
console.log('LOG DATA', this.logData);
|
|
2685
|
+
// console.log('LOG DATA', this.logData);
|
|
2583
2686
|
this.__subs(this.scanProvider.sendLog(this.logData)).subscribe();
|
|
2584
2687
|
}
|
|
2585
2688
|
handleLongValidationError(img, type = 'plain') {
|
|
@@ -2592,7 +2695,9 @@ class ScanComponent extends BaseComponent {
|
|
|
2592
2695
|
console.warn('[HANDLE ERROR]');
|
|
2593
2696
|
this.zone.run(() => {
|
|
2594
2697
|
// if (!this.scanSecondSide) {
|
|
2595
|
-
this.
|
|
2698
|
+
if (this.scanProvider.config.manualModeEnabled) {
|
|
2699
|
+
this.promptManual = true;
|
|
2700
|
+
}
|
|
2596
2701
|
// }
|
|
2597
2702
|
this.startTime = Date.now();
|
|
2598
2703
|
});
|
|
@@ -2708,10 +2813,10 @@ class ScanComponent extends BaseComponent {
|
|
|
2708
2813
|
}
|
|
2709
2814
|
getImgBase64(num) {
|
|
2710
2815
|
console.log('GET 64');
|
|
2711
|
-
if (this.manualDataSet) {
|
|
2712
|
-
|
|
2713
|
-
}
|
|
2714
|
-
return this.scanBlastData[num].image.dataUrl.split(',')[1];
|
|
2816
|
+
// if (this.manualDataSet) {
|
|
2817
|
+
return this.scanBlastData[num].image._imageAsDataUrl.split(',')[1];
|
|
2818
|
+
// }
|
|
2819
|
+
// return this.scanBlastData[num].image.dataUrl.split(',')[1];
|
|
2715
2820
|
}
|
|
2716
2821
|
scanBlastFinish() {
|
|
2717
2822
|
const { browser, os, device } = this.deviceService;
|
|
@@ -2735,7 +2840,7 @@ class ScanComponent extends BaseComponent {
|
|
|
2735
2840
|
DeviceInfo: {
|
|
2736
2841
|
OS: os,
|
|
2737
2842
|
Device: device,
|
|
2738
|
-
Browser: browser
|
|
2843
|
+
Browser: browser,
|
|
2739
2844
|
},
|
|
2740
2845
|
FrontImageType: 'base64',
|
|
2741
2846
|
FrontImageCropped: false,
|
|
@@ -2805,11 +2910,11 @@ class ScanComponent extends BaseComponent {
|
|
|
2805
2910
|
return;
|
|
2806
2911
|
}
|
|
2807
2912
|
if (results && data.Metadata.length > 0 && data.InfoCode === '1000') {
|
|
2808
|
-
console.log('Extraction time', data.AnalysisTime);
|
|
2913
|
+
// console.log('Extraction time', data.AnalysisTime);
|
|
2809
2914
|
// this.zone.run(() => {
|
|
2810
|
-
console.time('parseblast');
|
|
2915
|
+
// console.time('parseblast');
|
|
2811
2916
|
const result = this.scanProvider.parseBlast(results);
|
|
2812
|
-
console.timeEnd('parseblast');
|
|
2917
|
+
// console.timeEnd('parseblast');
|
|
2813
2918
|
// console.log('RES', this.result);
|
|
2814
2919
|
// this.cd.detectChanges();
|
|
2815
2920
|
const model = result.model;
|
|
@@ -2830,18 +2935,18 @@ class ScanComponent extends BaseComponent {
|
|
|
2830
2935
|
data: {
|
|
2831
2936
|
model: this.model,
|
|
2832
2937
|
images: this.images,
|
|
2833
|
-
results
|
|
2938
|
+
results,
|
|
2834
2939
|
},
|
|
2835
2940
|
});
|
|
2836
2941
|
if (!this.scanProvider.config.hideResults) {
|
|
2837
2942
|
this.zone.run(() => {
|
|
2838
2943
|
this.result = true;
|
|
2839
|
-
console.time('ff');
|
|
2944
|
+
// console.time('ff');
|
|
2840
2945
|
this.cd.detectChanges();
|
|
2841
2946
|
this.scanResults.next({ type: 'model', data: model });
|
|
2842
2947
|
// this.cd.detectChanges();
|
|
2843
2948
|
// });
|
|
2844
|
-
console.timeEnd('ff');
|
|
2949
|
+
// console.timeEnd('ff');
|
|
2845
2950
|
});
|
|
2846
2951
|
}
|
|
2847
2952
|
}
|
|
@@ -2993,10 +3098,10 @@ class ScanComponent extends BaseComponent {
|
|
|
2993
3098
|
}
|
|
2994
3099
|
}
|
|
2995
3100
|
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 });
|
|
2996
|
-
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>keyboard_onscreen</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 });
|
|
3101
|
+
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 });
|
|
2997
3102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanComponent, decorators: [{
|
|
2998
3103
|
type: Component,
|
|
2999
|
-
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>keyboard_onscreen</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"] }]
|
|
3104
|
+
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"] }]
|
|
3000
3105
|
}], 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: [{
|
|
3001
3106
|
type: Input
|
|
3002
3107
|
}], dialogs: [{
|
|
@@ -3545,10 +3650,10 @@ class ConfirmComponent {
|
|
|
3545
3650
|
close() { }
|
|
3546
3651
|
}
|
|
3547
3652
|
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 });
|
|
3548
|
-
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" }] });
|
|
3653
|
+
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" }] });
|
|
3549
3654
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfirmComponent, decorators: [{
|
|
3550
3655
|
type: Component,
|
|
3551
|
-
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"] }]
|
|
3656
|
+
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"] }]
|
|
3552
3657
|
}], ctorParameters: function () {
|
|
3553
3658
|
return [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
3554
3659
|
type: Inject,
|
|
@@ -3636,10 +3741,10 @@ class ScanSelfieComponent extends BaseComponent {
|
|
|
3636
3741
|
}
|
|
3637
3742
|
}
|
|
3638
3743
|
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 });
|
|
3639
|
-
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 });
|
|
3744
|
+
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 });
|
|
3640
3745
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanSelfieComponent, decorators: [{
|
|
3641
3746
|
type: Component,
|
|
3642
|
-
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"] }]
|
|
3747
|
+
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"] }]
|
|
3643
3748
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$3.MatDialogRef }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: NgxScandocDialogsCoreProvider }]; }, propDecorators: { actions: [{
|
|
3644
3749
|
type: Output
|
|
3645
3750
|
}] } });
|
|
@@ -3860,10 +3965,10 @@ class ScanProfileComponent extends BaseComponent {
|
|
|
3860
3965
|
}
|
|
3861
3966
|
}
|
|
3862
3967
|
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 });
|
|
3863
|
-
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 });
|
|
3968
|
+
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 });
|
|
3864
3969
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProfileComponent, decorators: [{
|
|
3865
3970
|
type: Component,
|
|
3866
|
-
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"] }]
|
|
3971
|
+
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"] }]
|
|
3867
3972
|
}], ctorParameters: function () { return [{ type: NgxScandocDialogsCoreProvider }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: i1$3.MatDialogRef }, { type: i2.Platform }]; }, propDecorators: { type: [{
|
|
3868
3973
|
type: Input
|
|
3869
3974
|
}], handleTouchMove: [{
|
|
@@ -4306,8 +4411,6 @@ class NgxScandocModule {
|
|
|
4306
4411
|
return {
|
|
4307
4412
|
ngModule: NgxScandocModule,
|
|
4308
4413
|
providers: [
|
|
4309
|
-
NgxScandocCameraProvider,
|
|
4310
|
-
NgxScandocAuthProvider,
|
|
4311
4414
|
{ provide: AUTH_CONFIG_TOKEN, useValue: config.auth },
|
|
4312
4415
|
ScanProvider,
|
|
4313
4416
|
{ provide: SCAN_CONFIG_TOKEN, useValue: config.scan },
|
|
@@ -4316,9 +4419,14 @@ class NgxScandocModule {
|
|
|
4316
4419
|
useClass: HttpErrorInterceptor,
|
|
4317
4420
|
multi: true,
|
|
4318
4421
|
},
|
|
4422
|
+
NgxScanDocTranslationProvider,
|
|
4423
|
+
NgxScandocCameraProvider,
|
|
4424
|
+
// NgxScandocAuthProvider,
|
|
4319
4425
|
],
|
|
4320
4426
|
};
|
|
4321
4427
|
}
|
|
4428
|
+
constructor() {
|
|
4429
|
+
}
|
|
4322
4430
|
}
|
|
4323
4431
|
NgxScandocModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NgxScandocModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4324
4432
|
NgxScandocModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NgxScandocModule, imports: [DialogsModule], exports: [DialogsModule] });
|
|
@@ -4330,7 +4438,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4330
4438
|
imports: [DialogsModule.forRoot()],
|
|
4331
4439
|
exports: [DialogsModule],
|
|
4332
4440
|
}]
|
|
4333
|
-
}] });
|
|
4441
|
+
}], ctorParameters: function () { return []; } });
|
|
4334
4442
|
|
|
4335
4443
|
/*
|
|
4336
4444
|
* Public API Surface of ngx-scandoc
|