ngx-scandoc 1.3.2 → 1.3.4

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.
@@ -2835,18 +2835,22 @@ class ScanComponent extends BaseComponent {
2835
2835
  // console.log('MODEL', this.model);
2836
2836
  this.actions.emit({
2837
2837
  type: 'scanFinish',
2838
- model,
2839
- results,
2840
- });
2841
- this.zone.run(() => {
2842
- this.result = true;
2843
- console.time('ff');
2844
- this.cd.detectChanges();
2845
- this.scanResults.next({ type: 'model', data: model });
2846
- // this.cd.detectChanges();
2847
- // });
2848
- console.timeEnd('ff');
2838
+ data: {
2839
+ model: this.model,
2840
+ images: this.images,
2841
+ },
2849
2842
  });
2843
+ if (!this.scanProvider.config.hideResults) {
2844
+ this.zone.run(() => {
2845
+ this.result = true;
2846
+ console.time('ff');
2847
+ this.cd.detectChanges();
2848
+ this.scanResults.next({ type: 'model', data: model });
2849
+ // this.cd.detectChanges();
2850
+ // });
2851
+ console.timeEnd('ff');
2852
+ });
2853
+ }
2850
2854
  }
2851
2855
  else {
2852
2856
  console.log('ERROR');
@@ -3793,10 +3797,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3793
3797
  }], ctorParameters: function () { return [{ type: i1$3.MatDialog }]; } });
3794
3798
 
3795
3799
  class ScanProfileComponent extends BaseComponent {
3796
- constructor(dialogs, cameraProvider, dialogRef, platform) {
3800
+ constructor(dialogs, cameraProvider, scanProvider, dialogRef, platform) {
3797
3801
  super();
3798
3802
  this.dialogs = dialogs;
3799
3803
  this.cameraProvider = cameraProvider;
3804
+ this.scanProvider = scanProvider;
3800
3805
  this.dialogRef = dialogRef;
3801
3806
  this.platform = platform;
3802
3807
  this.type = 'desktop';
@@ -3822,6 +3827,11 @@ class ScanProfileComponent extends BaseComponent {
3822
3827
  }
3823
3828
  actions(event) {
3824
3829
  switch (event.type) {
3830
+ case 'scanFinish':
3831
+ if (this.scanProvider.config.hideResults) {
3832
+ this.dialogRef?.close(event.data);
3833
+ }
3834
+ break;
3825
3835
  case 'manualMode':
3826
3836
  this.dialogRef?.close({ manual: true });
3827
3837
  break;
@@ -3839,12 +3849,12 @@ class ScanProfileComponent extends BaseComponent {
3839
3849
  this.dialogRef?.close();
3840
3850
  }
3841
3851
  }
3842
- ScanProfileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScanProfileComponent, deps: [{ token: DialogsCoreProvider }, { token: NgxScandocCameraProvider }, { token: i1$3.MatDialogRef }, { token: i2.Platform }], target: i0.ɵɵFactoryTarget.Component });
3852
+ ScanProfileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScanProfileComponent, deps: [{ token: DialogsCoreProvider }, { token: NgxScandocCameraProvider }, { token: ScanProvider }, { token: i1$3.MatDialogRef }, { token: i2.Platform }], target: i0.ɵɵFactoryTarget.Component });
3843
3853
  ScanProfileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-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 });
3844
3854
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ScanProfileComponent, decorators: [{
3845
3855
  type: Component,
3846
3856
  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"] }]
3847
- }], ctorParameters: function () { return [{ type: DialogsCoreProvider }, { type: NgxScandocCameraProvider }, { type: i1$3.MatDialogRef }, { type: i2.Platform }]; }, propDecorators: { type: [{
3857
+ }], ctorParameters: function () { return [{ type: DialogsCoreProvider }, { type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: i1$3.MatDialogRef }, { type: i2.Platform }]; }, propDecorators: { type: [{
3848
3858
  type: Input
3849
3859
  }], handleTouchMove: [{
3850
3860
  type: HostListener,