ngx-scandoc 15.0.4 → 15.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/tokens/config.tokens.d.ts +4 -0
- package/dialogs/components/scan-profile/scan-profile.component.d.ts +3 -3
- package/dialogs/components/scan-selfie/scan-selfie.component.d.ts +2 -2
- package/dialogs/dialogs.core.provider.d.ts +3 -3
- package/esm2020/core/components/components.module.mjs +2 -1
- package/esm2020/core/tokens/config.tokens.mjs +4 -0
- package/esm2020/dialogs/components/scan-profile/scan-profile.component.mjs +3 -3
- package/esm2020/dialogs/components/scan-selfie/scan-selfie.component.mjs +3 -3
- package/esm2020/dialogs/dialogs.core.provider.mjs +5 -5
- package/esm2020/dialogs/dialogs.module.mjs +4 -3
- package/esm2020/lib/ngx-scandoc.module.mjs +4 -3
- package/esm2020/providers/auth.provider.mjs +4 -3
- package/esm2020/providers/camera.provider.mjs +2 -1
- package/esm2020/providers/interceptor.provider.mjs +7 -6
- package/esm2020/providers/scan.provider.mjs +4 -3
- package/esm2020/public-api.mjs +3 -3
- package/fesm2015/ngx-scandoc.mjs +30 -22
- package/fesm2015/ngx-scandoc.mjs.map +1 -1
- package/fesm2020/ngx-scandoc.mjs +30 -22
- package/fesm2020/ngx-scandoc.mjs.map +1 -1
- package/package.json +1 -1
- package/providers/interceptor.provider.d.ts +2 -0
- package/public-api.d.ts +1 -2
package/fesm2015/ngx-scandoc.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, Input, HostListener, ViewChild, Output, NgModule,
|
|
2
|
+
import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, Input, HostListener, ViewChild, Output, NgModule, InjectionToken, Inject, Optional, HostBinding, Pipe, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import * as i2$1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { Subject, Observable, from, of, tap as tap$1, distinctUntilChanged, switchMap as switchMap$1, throwError, forkJoin } from 'rxjs';
|
|
@@ -177,6 +177,7 @@ class WebcamUtil {
|
|
|
177
177
|
|
|
178
178
|
class NgxScandocCameraProvider {
|
|
179
179
|
constructor() {
|
|
180
|
+
this.mediaDevices = [];
|
|
180
181
|
this.selfie$ = new Subject();
|
|
181
182
|
this.rectPosition = {
|
|
182
183
|
l: 0,
|
|
@@ -654,6 +655,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
654
655
|
}]
|
|
655
656
|
}] });
|
|
656
657
|
|
|
658
|
+
const AUTH_CONFIG_TOKEN = new InjectionToken('configAuth');
|
|
659
|
+
const SCAN_CONFIG_TOKEN = new InjectionToken('scanConfig');
|
|
660
|
+
|
|
657
661
|
class ScanProvider {
|
|
658
662
|
constructor(http, config) {
|
|
659
663
|
this.http = http;
|
|
@@ -1389,7 +1393,7 @@ class ScanProvider {
|
|
|
1389
1393
|
});
|
|
1390
1394
|
}
|
|
1391
1395
|
}
|
|
1392
|
-
ScanProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProvider, deps: [{ token: i1$1.HttpClient }, { token:
|
|
1396
|
+
ScanProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProvider, deps: [{ token: i1$1.HttpClient }, { token: SCAN_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1393
1397
|
ScanProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProvider, providedIn: 'root' });
|
|
1394
1398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProvider, decorators: [{
|
|
1395
1399
|
type: Injectable,
|
|
@@ -1399,7 +1403,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1399
1403
|
}], ctorParameters: function () {
|
|
1400
1404
|
return [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
|
|
1401
1405
|
type: Inject,
|
|
1402
|
-
args: [
|
|
1406
|
+
args: [SCAN_CONFIG_TOKEN]
|
|
1403
1407
|
}] }];
|
|
1404
1408
|
} });
|
|
1405
1409
|
|
|
@@ -1523,7 +1527,7 @@ class AuthProvider {
|
|
|
1523
1527
|
}), map((data) => data.access_token));
|
|
1524
1528
|
}
|
|
1525
1529
|
}
|
|
1526
|
-
AuthProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthProvider, deps: [{ token: i1$1.HttpClient }, { token:
|
|
1530
|
+
AuthProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthProvider, deps: [{ token: i1$1.HttpClient }, { token: AUTH_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1527
1531
|
AuthProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthProvider, providedIn: 'root' });
|
|
1528
1532
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthProvider, decorators: [{
|
|
1529
1533
|
type: Injectable,
|
|
@@ -1533,7 +1537,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1533
1537
|
}], ctorParameters: function () {
|
|
1534
1538
|
return [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
|
|
1535
1539
|
type: Inject,
|
|
1536
|
-
args: [
|
|
1540
|
+
args: [AUTH_CONFIG_TOKEN]
|
|
1537
1541
|
}] }];
|
|
1538
1542
|
} });
|
|
1539
1543
|
|
|
@@ -3370,6 +3374,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3370
3374
|
args: [{ selector: 'ngx-scan-camera-switch', template: "<mat-form-field\n style=\"font-size: 14px; margin-top: 8px\"\n class=\"w-100 mr-16 mt-8\"\n\n>\n <mat-label> {{ \"scandoc.camera\" | translate }} </mat-label>\n <mat-select\n (selectionChange)=\"cameraProvider.selectCamera($event)\"\n [(ngModel)]=\"cameraProvider.deviceId\"\n >\n <mat-option\n *ngFor=\"let device of cameraProvider.mediaDevices\"\n [value]=\"device.deviceId\"\n >\n {{ device.label }}\n </mat-option>\n </mat-select>\n</mat-form-field>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1}\n"] }]
|
|
3371
3375
|
}], ctorParameters: function () { return [{ type: NgxScandocCameraProvider }]; } });
|
|
3372
3376
|
|
|
3377
|
+
//import { NgxScandocCameraProvider } from '../../providers/camera.provider';
|
|
3373
3378
|
class CoreComponentsModule {
|
|
3374
3379
|
static forRoot() {
|
|
3375
3380
|
return {
|
|
@@ -3631,12 +3636,12 @@ class ScanSelfieComponent extends BaseComponent {
|
|
|
3631
3636
|
this.dialogRef.close(null);
|
|
3632
3637
|
}
|
|
3633
3638
|
}
|
|
3634
|
-
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:
|
|
3639
|
+
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 });
|
|
3635
3640
|
ScanSelfieComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ScanSelfieComponent, selector: "app-scan-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 });
|
|
3636
3641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanSelfieComponent, decorators: [{
|
|
3637
3642
|
type: Component,
|
|
3638
3643
|
args: [{ selector: 'app-scan-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"] }]
|
|
3639
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$3.MatDialogRef }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type:
|
|
3644
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$3.MatDialogRef }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: NgxScandocDialogsCoreProvider }]; }, propDecorators: { actions: [{
|
|
3640
3645
|
type: Output
|
|
3641
3646
|
}] } });
|
|
3642
3647
|
|
|
@@ -3690,7 +3695,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3690
3695
|
}] }];
|
|
3691
3696
|
} });
|
|
3692
3697
|
|
|
3693
|
-
class
|
|
3698
|
+
class NgxScandocDialogsCoreProvider {
|
|
3694
3699
|
constructor(matDialog) {
|
|
3695
3700
|
this.matDialog = matDialog;
|
|
3696
3701
|
this.components = {
|
|
@@ -3791,9 +3796,9 @@ class DialogsCoreProvider {
|
|
|
3791
3796
|
});
|
|
3792
3797
|
}
|
|
3793
3798
|
}
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
|
3799
|
+
NgxScandocDialogsCoreProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NgxScandocDialogsCoreProvider, deps: [{ token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3800
|
+
NgxScandocDialogsCoreProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NgxScandocDialogsCoreProvider, providedIn: 'root' });
|
|
3801
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NgxScandocDialogsCoreProvider, decorators: [{
|
|
3797
3802
|
type: Injectable,
|
|
3798
3803
|
args: [{
|
|
3799
3804
|
providedIn: 'root',
|
|
@@ -3855,24 +3860,25 @@ class ScanProfileComponent extends BaseComponent {
|
|
|
3855
3860
|
(_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.close();
|
|
3856
3861
|
}
|
|
3857
3862
|
}
|
|
3858
|
-
ScanProfileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProfileComponent, deps: [{ token:
|
|
3863
|
+
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 });
|
|
3859
3864
|
ScanProfileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ScanProfileComponent, selector: "app-scan-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 });
|
|
3860
3865
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProfileComponent, decorators: [{
|
|
3861
3866
|
type: Component,
|
|
3862
3867
|
args: [{ selector: 'app-scan-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"] }]
|
|
3863
|
-
}], ctorParameters: function () { return [{ type:
|
|
3868
|
+
}], ctorParameters: function () { return [{ type: NgxScandocDialogsCoreProvider }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: i1$3.MatDialogRef }, { type: i2.Platform }]; }, propDecorators: { type: [{
|
|
3864
3869
|
type: Input
|
|
3865
3870
|
}], handleTouchMove: [{
|
|
3866
3871
|
type: HostListener,
|
|
3867
3872
|
args: ['touchmove', ['$event']]
|
|
3868
3873
|
}] } });
|
|
3869
3874
|
|
|
3875
|
+
//import { NgxScandocCameraProvider } from '../providers/camera.provider';
|
|
3870
3876
|
//import { NgxScandocCameraProvider } from '../providers/camera.provider';
|
|
3871
3877
|
class DialogsModule {
|
|
3872
3878
|
static forRoot() {
|
|
3873
3879
|
return {
|
|
3874
3880
|
ngModule: DialogsModule,
|
|
3875
|
-
providers: [
|
|
3881
|
+
providers: [NgxScandocDialogsCoreProvider],
|
|
3876
3882
|
};
|
|
3877
3883
|
}
|
|
3878
3884
|
}
|
|
@@ -3953,15 +3959,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3953
3959
|
class HttpErrorInterceptor {
|
|
3954
3960
|
constructor(injector) {
|
|
3955
3961
|
this.injector = injector;
|
|
3962
|
+
this.authProvider = this.injector.get(AuthProvider);
|
|
3956
3963
|
}
|
|
3957
3964
|
intercept(req, next) {
|
|
3958
3965
|
//console.log(req.url);
|
|
3959
3966
|
if (req.url.indexOf('/ks/') >= 0 || req.url.indexOf('/assets/') >= 0) {
|
|
3960
3967
|
return next.handle(req);
|
|
3961
3968
|
}
|
|
3962
|
-
const authProvider = this.injector.get(AuthProvider);
|
|
3963
|
-
if (authProvider.config.validDomains) {
|
|
3964
|
-
const valid = authProvider.config.validDomains
|
|
3969
|
+
// const authProvider = this.injector.get(AuthProvider);
|
|
3970
|
+
if (this.authProvider.config.validDomains) {
|
|
3971
|
+
const valid = this.authProvider.config.validDomains
|
|
3965
3972
|
.map((domain) => {
|
|
3966
3973
|
return req.url.indexOf(domain) >= 0;
|
|
3967
3974
|
})
|
|
@@ -3970,7 +3977,7 @@ class HttpErrorInterceptor {
|
|
|
3970
3977
|
return next.handle(req);
|
|
3971
3978
|
}
|
|
3972
3979
|
}
|
|
3973
|
-
this.inflightAuthRequest = authProvider.accesToken;
|
|
3980
|
+
this.inflightAuthRequest = this.authProvider.accesToken;
|
|
3974
3981
|
return this.inflightAuthRequest.pipe(share(), switchMap((token) => {
|
|
3975
3982
|
// unset request inflight
|
|
3976
3983
|
this.inflightAuthRequest = null;
|
|
@@ -3987,7 +3994,7 @@ class HttpErrorInterceptor {
|
|
|
3987
3994
|
}
|
|
3988
3995
|
console.log(err);
|
|
3989
3996
|
if (err.status === 401 || err.status === 403 || tokenExpired) {
|
|
3990
|
-
return authProvider.refreshToken().pipe(switchMap((token) => {
|
|
3997
|
+
return this.authProvider.refreshToken().pipe(switchMap((token) => {
|
|
3991
3998
|
const transaction = req.headers.get('TransactionID');
|
|
3992
3999
|
const authReq = req.clone({
|
|
3993
4000
|
headers: this.getHeaders(token, transaction || ''),
|
|
@@ -4302,9 +4309,9 @@ class NgxScandocModule {
|
|
|
4302
4309
|
providers: [
|
|
4303
4310
|
NgxScandocCameraProvider,
|
|
4304
4311
|
AuthProvider,
|
|
4305
|
-
{ provide:
|
|
4312
|
+
{ provide: AUTH_CONFIG_TOKEN, useValue: config.auth },
|
|
4306
4313
|
ScanProvider,
|
|
4307
|
-
{ provide:
|
|
4314
|
+
{ provide: SCAN_CONFIG_TOKEN, useValue: config.scan },
|
|
4308
4315
|
{
|
|
4309
4316
|
provide: HTTP_INTERCEPTORS,
|
|
4310
4317
|
useClass: HttpErrorInterceptor,
|
|
@@ -4329,10 +4336,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4329
4336
|
/*
|
|
4330
4337
|
* Public API Surface of ngx-scandoc
|
|
4331
4338
|
*/
|
|
4339
|
+
// export {NgxScandocCameraProvider} from './providers/camera.provider'
|
|
4332
4340
|
|
|
4333
4341
|
/**
|
|
4334
4342
|
* Generated bundle index. Do not edit.
|
|
4335
4343
|
*/
|
|
4336
4344
|
|
|
4337
|
-
export { AppFormModule, AuthProvider, BlankComponent, CameraSwitchComponent, CoreComponentsModule, CorePipesModule,
|
|
4345
|
+
export { AppFormModule, AuthProvider, BlankComponent, CameraSwitchComponent, CoreComponentsModule, CorePipesModule, DialogsModule, HttpErrorInterceptor, LoadingComponent, ManualScanComponent, MaterialModule, NgxScanDocTranslationProvider, NgxScandocDialogsCoreProvider, NgxScandocModule, PromptManualComponent, SafeResourceUrlPipe, ScanComponent, ScanFieldsProvider, ScanProfileComponent, ScanProvider, ScanSelfieComponent, TranslateLoaderProvider, TurnDocumentComponent, WebcamComponent, WebcamModule, webRtcProvider };
|
|
4338
4346
|
//# sourceMappingURL=ngx-scandoc.mjs.map
|