ngx-scandoc 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/core/components/scan/scan.component.mjs +28 -17
- package/esm2020/dialogs/components/scan-profile/scan-profile.component.mjs +4 -1
- package/esm2020/providers/interceptor.provider.mjs +1 -2
- package/fesm2015/ngx-scandoc.mjs +32 -19
- package/fesm2015/ngx-scandoc.mjs.map +1 -1
- package/fesm2020/ngx-scandoc.mjs +30 -17
- package/fesm2020/ngx-scandoc.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2020/ngx-scandoc.mjs
CHANGED
|
@@ -2387,6 +2387,15 @@ class ScanComponent extends BaseComponent {
|
|
|
2387
2387
|
load: 0,
|
|
2388
2388
|
};
|
|
2389
2389
|
this.scanProvider = this.injector.get(ScanProvider);
|
|
2390
|
+
if (!this.scanProvider.config.development) {
|
|
2391
|
+
// console = {
|
|
2392
|
+
// log: (...args: any) => {},
|
|
2393
|
+
// time: (...args: any) => {},
|
|
2394
|
+
// timeEnd: (...args: any) => {},
|
|
2395
|
+
// warn: (...args: any) => {},
|
|
2396
|
+
// error: (...args: any) => {},
|
|
2397
|
+
// };
|
|
2398
|
+
}
|
|
2390
2399
|
}
|
|
2391
2400
|
get class() {
|
|
2392
2401
|
return this.isMobile;
|
|
@@ -2444,12 +2453,14 @@ class ScanComponent extends BaseComponent {
|
|
|
2444
2453
|
}
|
|
2445
2454
|
this.cd.detectChanges();
|
|
2446
2455
|
if (this.scannedImages.length > 4 && !this.validation) {
|
|
2447
|
-
this.
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2456
|
+
if (this.scanProvider.config.development) {
|
|
2457
|
+
this.scannedImages.forEach((img) => {
|
|
2458
|
+
const consoleBackground = "font-size:100px;background-image: url('" +
|
|
2459
|
+
img.imageResized +
|
|
2460
|
+
"');background-size: contain; background-repeat: no-repeat;";
|
|
2461
|
+
console.log('%c ', consoleBackground);
|
|
2462
|
+
});
|
|
2463
|
+
}
|
|
2453
2464
|
// this.frontImage = webcamImage.imageResized;
|
|
2454
2465
|
console.timeEnd('scan');
|
|
2455
2466
|
console.time('scan');
|
|
@@ -2585,15 +2596,7 @@ class ScanComponent extends BaseComponent {
|
|
|
2585
2596
|
// this.manualMode(type);
|
|
2586
2597
|
// });
|
|
2587
2598
|
if (!this.scanSecondSide) {
|
|
2588
|
-
|
|
2589
|
-
this.promptManual = true;
|
|
2590
|
-
}
|
|
2591
|
-
else {
|
|
2592
|
-
this.actions.emit({
|
|
2593
|
-
type: 'manualMode',
|
|
2594
|
-
data: {},
|
|
2595
|
-
});
|
|
2596
|
-
}
|
|
2599
|
+
this.promptManual = true;
|
|
2597
2600
|
// MANUAL_INTERVAL += 10;
|
|
2598
2601
|
}
|
|
2599
2602
|
// this.verificationErrorSent = false;
|
|
@@ -2965,7 +2968,15 @@ class ScanComponent extends BaseComponent {
|
|
|
2965
2968
|
}
|
|
2966
2969
|
manualSet(key) {
|
|
2967
2970
|
if (key) {
|
|
2968
|
-
this.
|
|
2971
|
+
if (this.scanProvider.config.showManualMode) {
|
|
2972
|
+
this.manualMode();
|
|
2973
|
+
}
|
|
2974
|
+
else {
|
|
2975
|
+
this.actions.emit({
|
|
2976
|
+
type: 'manualMode',
|
|
2977
|
+
data: {},
|
|
2978
|
+
});
|
|
2979
|
+
}
|
|
2969
2980
|
}
|
|
2970
2981
|
else {
|
|
2971
2982
|
this.promptManual = false;
|
|
@@ -3811,6 +3822,9 @@ class ScanProfileComponent extends BaseComponent {
|
|
|
3811
3822
|
}
|
|
3812
3823
|
actions(event) {
|
|
3813
3824
|
switch (event.type) {
|
|
3825
|
+
case 'manualMode':
|
|
3826
|
+
this.dialogRef?.close({ manual: true });
|
|
3827
|
+
break;
|
|
3814
3828
|
case 'scanDataClose':
|
|
3815
3829
|
this.dialogRef?.close(event.data);
|
|
3816
3830
|
break;
|
|
@@ -3935,7 +3949,6 @@ class HttpErrorInterceptor {
|
|
|
3935
3949
|
return next.handle(req);
|
|
3936
3950
|
}
|
|
3937
3951
|
}
|
|
3938
|
-
console.log('AUTH II');
|
|
3939
3952
|
this.inflightAuthRequest = authProvider.accesToken;
|
|
3940
3953
|
return this.inflightAuthRequest.pipe(share(), switchMap((token) => {
|
|
3941
3954
|
// unset request inflight
|