ngx-scandoc 15.0.5 → 15.0.7
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 -4
- 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 +4 -3
- package/fesm2015/ngx-scandoc.mjs +29 -23
- package/fesm2015/ngx-scandoc.mjs.map +1 -1
- package/fesm2020/ngx-scandoc.mjs +29 -23
- 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 +2 -2
package/fesm2020/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;
|
|
@@ -1392,7 +1396,7 @@ class ScanProvider {
|
|
|
1392
1396
|
});
|
|
1393
1397
|
}
|
|
1394
1398
|
}
|
|
1395
|
-
ScanProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProvider, deps: [{ token: i1$1.HttpClient }, { token:
|
|
1399
|
+
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 });
|
|
1396
1400
|
ScanProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProvider, providedIn: 'root' });
|
|
1397
1401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProvider, decorators: [{
|
|
1398
1402
|
type: Injectable,
|
|
@@ -1401,7 +1405,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1401
1405
|
}]
|
|
1402
1406
|
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }, { type: undefined, decorators: [{
|
|
1403
1407
|
type: Inject,
|
|
1404
|
-
args: [
|
|
1408
|
+
args: [SCAN_CONFIG_TOKEN]
|
|
1405
1409
|
}] }]; } });
|
|
1406
1410
|
|
|
1407
1411
|
class LayoutProvider {
|
|
@@ -1524,7 +1528,7 @@ class AuthProvider {
|
|
|
1524
1528
|
}), map((data) => data.access_token));
|
|
1525
1529
|
}
|
|
1526
1530
|
}
|
|
1527
|
-
AuthProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthProvider, deps: [{ token: i1$1.HttpClient }, { token:
|
|
1531
|
+
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 });
|
|
1528
1532
|
AuthProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthProvider, providedIn: 'root' });
|
|
1529
1533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AuthProvider, decorators: [{
|
|
1530
1534
|
type: Injectable,
|
|
@@ -1533,7 +1537,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1533
1537
|
}]
|
|
1534
1538
|
}], ctorParameters: function () { 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
|
const TRANSLATION_PROVIDER = new InjectionToken('Injection token for translation providers.');
|
|
@@ -3363,6 +3367,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3363
3367
|
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"] }]
|
|
3364
3368
|
}], ctorParameters: function () { return [{ type: NgxScandocCameraProvider }]; } });
|
|
3365
3369
|
|
|
3370
|
+
//import { NgxScandocCameraProvider } from '../../providers/camera.provider';
|
|
3366
3371
|
class CoreComponentsModule {
|
|
3367
3372
|
static forRoot() {
|
|
3368
3373
|
return {
|
|
@@ -3616,12 +3621,12 @@ class ScanSelfieComponent extends BaseComponent {
|
|
|
3616
3621
|
this.dialogRef.close(null);
|
|
3617
3622
|
}
|
|
3618
3623
|
}
|
|
3619
|
-
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:
|
|
3624
|
+
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 });
|
|
3620
3625
|
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 });
|
|
3621
3626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanSelfieComponent, decorators: [{
|
|
3622
3627
|
type: Component,
|
|
3623
3628
|
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"] }]
|
|
3624
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$3.MatDialogRef }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type:
|
|
3629
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$3.MatDialogRef }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: NgxScandocDialogsCoreProvider }]; }, propDecorators: { actions: [{
|
|
3625
3630
|
type: Output
|
|
3626
3631
|
}] } });
|
|
3627
3632
|
|
|
@@ -3671,7 +3676,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3671
3676
|
args: [MAT_DIALOG_DATA]
|
|
3672
3677
|
}] }]; } });
|
|
3673
3678
|
|
|
3674
|
-
class
|
|
3679
|
+
class NgxScandocDialogsCoreProvider {
|
|
3675
3680
|
constructor(matDialog) {
|
|
3676
3681
|
this.matDialog = matDialog;
|
|
3677
3682
|
this.components = {
|
|
@@ -3772,9 +3777,9 @@ class DialogsCoreProvider {
|
|
|
3772
3777
|
});
|
|
3773
3778
|
}
|
|
3774
3779
|
}
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
|
3780
|
+
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 });
|
|
3781
|
+
NgxScandocDialogsCoreProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NgxScandocDialogsCoreProvider, providedIn: 'root' });
|
|
3782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NgxScandocDialogsCoreProvider, decorators: [{
|
|
3778
3783
|
type: Injectable,
|
|
3779
3784
|
args: [{
|
|
3780
3785
|
providedIn: 'root',
|
|
@@ -3834,24 +3839,25 @@ class ScanProfileComponent extends BaseComponent {
|
|
|
3834
3839
|
this.dialogRef?.close();
|
|
3835
3840
|
}
|
|
3836
3841
|
}
|
|
3837
|
-
ScanProfileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProfileComponent, deps: [{ token:
|
|
3842
|
+
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 });
|
|
3838
3843
|
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 });
|
|
3839
3844
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScanProfileComponent, decorators: [{
|
|
3840
3845
|
type: Component,
|
|
3841
3846
|
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"] }]
|
|
3842
|
-
}], ctorParameters: function () { return [{ type:
|
|
3847
|
+
}], ctorParameters: function () { return [{ type: NgxScandocDialogsCoreProvider }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: i1$3.MatDialogRef }, { type: i2.Platform }]; }, propDecorators: { type: [{
|
|
3843
3848
|
type: Input
|
|
3844
3849
|
}], handleTouchMove: [{
|
|
3845
3850
|
type: HostListener,
|
|
3846
3851
|
args: ['touchmove', ['$event']]
|
|
3847
3852
|
}] } });
|
|
3848
3853
|
|
|
3854
|
+
//import { NgxScandocCameraProvider } from '../providers/camera.provider';
|
|
3849
3855
|
//import { NgxScandocCameraProvider } from '../providers/camera.provider';
|
|
3850
3856
|
class DialogsModule {
|
|
3851
3857
|
static forRoot() {
|
|
3852
3858
|
return {
|
|
3853
3859
|
ngModule: DialogsModule,
|
|
3854
|
-
providers: [
|
|
3860
|
+
providers: [NgxScandocDialogsCoreProvider],
|
|
3855
3861
|
};
|
|
3856
3862
|
}
|
|
3857
3863
|
}
|
|
@@ -3930,15 +3936,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3930
3936
|
class HttpErrorInterceptor {
|
|
3931
3937
|
constructor(injector) {
|
|
3932
3938
|
this.injector = injector;
|
|
3939
|
+
this.authProvider = this.injector.get(AuthProvider);
|
|
3933
3940
|
}
|
|
3934
3941
|
intercept(req, next) {
|
|
3935
3942
|
//console.log(req.url);
|
|
3936
3943
|
if (req.url.indexOf('/ks/') >= 0 || req.url.indexOf('/assets/') >= 0) {
|
|
3937
3944
|
return next.handle(req);
|
|
3938
3945
|
}
|
|
3939
|
-
const authProvider = this.injector.get(AuthProvider);
|
|
3940
|
-
if (authProvider.config.validDomains) {
|
|
3941
|
-
const valid = authProvider.config.validDomains
|
|
3946
|
+
// const authProvider = this.injector.get(AuthProvider);
|
|
3947
|
+
if (this.authProvider.config.validDomains) {
|
|
3948
|
+
const valid = this.authProvider.config.validDomains
|
|
3942
3949
|
.map((domain) => {
|
|
3943
3950
|
return req.url.indexOf(domain) >= 0;
|
|
3944
3951
|
})
|
|
@@ -3947,7 +3954,7 @@ class HttpErrorInterceptor {
|
|
|
3947
3954
|
return next.handle(req);
|
|
3948
3955
|
}
|
|
3949
3956
|
}
|
|
3950
|
-
this.inflightAuthRequest = authProvider.accesToken;
|
|
3957
|
+
this.inflightAuthRequest = this.authProvider.accesToken;
|
|
3951
3958
|
return this.inflightAuthRequest.pipe(share(), switchMap((token) => {
|
|
3952
3959
|
// unset request inflight
|
|
3953
3960
|
this.inflightAuthRequest = null;
|
|
@@ -3964,7 +3971,7 @@ class HttpErrorInterceptor {
|
|
|
3964
3971
|
}
|
|
3965
3972
|
console.log(err);
|
|
3966
3973
|
if (err.status === 401 || err.status === 403 || tokenExpired) {
|
|
3967
|
-
return authProvider.refreshToken().pipe(switchMap((token) => {
|
|
3974
|
+
return this.authProvider.refreshToken().pipe(switchMap((token) => {
|
|
3968
3975
|
const transaction = req.headers.get('TransactionID');
|
|
3969
3976
|
const authReq = req.clone({
|
|
3970
3977
|
headers: this.getHeaders(token, transaction || ''),
|
|
@@ -4277,12 +4284,11 @@ class NgxScandocModule {
|
|
|
4277
4284
|
return {
|
|
4278
4285
|
ngModule: NgxScandocModule,
|
|
4279
4286
|
providers: [
|
|
4280
|
-
ScanProvider,
|
|
4281
4287
|
NgxScandocCameraProvider,
|
|
4282
4288
|
AuthProvider,
|
|
4283
|
-
{ provide:
|
|
4289
|
+
{ provide: AUTH_CONFIG_TOKEN, useValue: config.auth },
|
|
4284
4290
|
ScanProvider,
|
|
4285
|
-
{ provide:
|
|
4291
|
+
{ provide: SCAN_CONFIG_TOKEN, useValue: config.scan },
|
|
4286
4292
|
{
|
|
4287
4293
|
provide: HTTP_INTERCEPTORS,
|
|
4288
4294
|
useClass: HttpErrorInterceptor,
|
|
@@ -4312,5 +4318,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
4312
4318
|
* Generated bundle index. Do not edit.
|
|
4313
4319
|
*/
|
|
4314
4320
|
|
|
4315
|
-
export { AppFormModule, AuthProvider, BlankComponent, CameraSwitchComponent, CoreComponentsModule, CorePipesModule,
|
|
4321
|
+
export { AUTH_CONFIG_TOKEN, AppFormModule, AuthProvider, BlankComponent, CameraSwitchComponent, CoreComponentsModule, CorePipesModule, DialogsModule, HttpErrorInterceptor, LoadingComponent, ManualScanComponent, MaterialModule, NgxScanDocTranslationProvider, NgxScandocDialogsCoreProvider, NgxScandocModule, PromptManualComponent, SCAN_CONFIG_TOKEN, SafeResourceUrlPipe, ScanComponent, ScanFieldsProvider, ScanProfileComponent, ScanProvider, ScanSelfieComponent, TranslateLoaderProvider, TurnDocumentComponent, WebcamComponent, WebcamModule, webRtcProvider };
|
|
4316
4322
|
//# sourceMappingURL=ngx-scandoc.mjs.map
|