ngx-scandoc 15.2.4 → 15.2.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.
@@ -218,7 +218,7 @@ class WebcamComponent extends BaseComponent {
218
218
  }
219
219
  this.resizeTimeout = setTimeout(() => {
220
220
  this.drawRectangle();
221
- }, 50);
221
+ }, 1000);
222
222
  }
223
223
  constructor(breakpointObserver, platform, cd, zone, cameraProvider) {
224
224
  super();
@@ -592,6 +592,9 @@ class WebcamComponent extends BaseComponent {
592
592
  }
593
593
  });
594
594
  }
595
+ test() {
596
+ this.drawRectangle();
597
+ }
595
598
  stopAllTracks() {
596
599
  this.showVideo = false;
597
600
  if (this.mediaStream && this.mediaStream.getTracks) {
@@ -612,6 +615,7 @@ class WebcamComponent extends BaseComponent {
612
615
  // this.__subs(this.stopVideoTracks()).subscribe()
613
616
  }
614
617
  drawRectangle() {
618
+ console.warn('RECT');
615
619
  this.zone.run(() => {
616
620
  const _canvas = this.canvas.nativeElement;
617
621
  let padding = 10;
@@ -680,6 +684,7 @@ class WebcamComponent extends BaseComponent {
680
684
  ctx.roundRect(left, top, w, h, radius);
681
685
  ctx.stroke();
682
686
  ctx.fill();
687
+ console.warn('CAN', left, top, w, h, radius, ctx);
683
688
  this.cameraProvider.rectPosition = {
684
689
  l: left,
685
690
  t: top,
@@ -707,10 +712,10 @@ class WebcamComponent extends BaseComponent {
707
712
  }
708
713
  }
709
714
  WebcamComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WebcamComponent, deps: [{ token: i1.BreakpointObserver }, { token: i2.Platform }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: NgxScandocCameraProvider }], target: i0.ɵɵFactoryTarget.Component });
710
- WebcamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: { imageHandler: "imageHandler", type: "type", trigger: "trigger", refresh: "refresh" }, outputs: { cameraSwitched: "cameraSwitched", videoReady: "videoReady", imageCapture: "imageCapture", initError: "initError" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, static: true }, { propertyName: "videoRef", first: true, predicate: ["video"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"webcam-wrapper\">\n <video #video autoplay muted style=\"display: block\" playsinline></video>\n\n <div class=\"rectangle\">\n <canvas\n #canvas\n [ngStyle]=\"{ visibility: showVideo ? 'visible' : 'hidden' }\"\n [width]=\"video.offsetWidth\"\n [height]=\"video.offsetHeight\"\n ></canvas>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:row;flex:1;transform:transale3d(0,0,0);background-color:#000;overflow:hidden}.webcam-wrapper{display:flex;overflow:hidden;flex-direction:row;flex:1;position:relative}.webcam-wrapper video{overflow:hidden;flex:1;object-fit:contain}.webcam-wrapper canvas{transform:translateZ(0);display:block;position:absolute;z-index:20;left:0;top:0}.webcam-wrapper .rectangle{position:absolute;left:0;top:0;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
715
+ WebcamComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: { imageHandler: "imageHandler", type: "type", trigger: "trigger", refresh: "refresh" }, outputs: { cameraSwitched: "cameraSwitched", videoReady: "videoReady", imageCapture: "imageCapture", initError: "initError" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, static: true }, { propertyName: "videoRef", first: true, predicate: ["video"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"webcam-wrapper\">\n <video #video autoplay muted style=\"display: block\" playsinline></video>\n\n <div class=\"rectangle\">\n <canvas\n #canvas\n [ngStyle]=\"{ visibility: showVideo ? 'visible' : 'hidden' }\"\n [width]=\"video.offsetWidth\"\n [height]=\"video.offsetHeight\"\n ></canvas>\n </div>\n\n\n</div>\n", styles: [":host{display:flex;flex-direction:row;flex:1;transform:transale3d(0,0,0);background-color:#000;overflow:hidden}.webcam-wrapper{display:flex;overflow:hidden;flex-direction:row;flex:1;position:relative}.webcam-wrapper video{overflow:hidden;flex:1;object-fit:contain}.webcam-wrapper canvas{transform:translateZ(0);display:block;position:absolute;z-index:20;left:0;top:0}.webcam-wrapper .rectangle{position:absolute;left:0;top:0;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
711
716
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WebcamComponent, decorators: [{
712
717
  type: Component,
713
- args: [{ selector: 'ngx-scandoc-webcam', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"webcam-wrapper\">\n <video #video autoplay muted style=\"display: block\" playsinline></video>\n\n <div class=\"rectangle\">\n <canvas\n #canvas\n [ngStyle]=\"{ visibility: showVideo ? 'visible' : 'hidden' }\"\n [width]=\"video.offsetWidth\"\n [height]=\"video.offsetHeight\"\n ></canvas>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:row;flex:1;transform:transale3d(0,0,0);background-color:#000;overflow:hidden}.webcam-wrapper{display:flex;overflow:hidden;flex-direction:row;flex:1;position:relative}.webcam-wrapper video{overflow:hidden;flex:1;object-fit:contain}.webcam-wrapper canvas{transform:translateZ(0);display:block;position:absolute;z-index:20;left:0;top:0}.webcam-wrapper .rectangle{position:absolute;left:0;top:0;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;height:100%}\n"] }]
718
+ args: [{ selector: 'ngx-scandoc-webcam', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"webcam-wrapper\">\n <video #video autoplay muted style=\"display: block\" playsinline></video>\n\n <div class=\"rectangle\">\n <canvas\n #canvas\n [ngStyle]=\"{ visibility: showVideo ? 'visible' : 'hidden' }\"\n [width]=\"video.offsetWidth\"\n [height]=\"video.offsetHeight\"\n ></canvas>\n </div>\n\n\n</div>\n", styles: [":host{display:flex;flex-direction:row;flex:1;transform:transale3d(0,0,0);background-color:#000;overflow:hidden}.webcam-wrapper{display:flex;overflow:hidden;flex-direction:row;flex:1;position:relative}.webcam-wrapper video{overflow:hidden;flex:1;object-fit:contain}.webcam-wrapper canvas{transform:translateZ(0);display:block;position:absolute;z-index:20;left:0;top:0}.webcam-wrapper .rectangle{position:absolute;left:0;top:0;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;height:100%}\n"] }]
714
719
  }], ctorParameters: function () { return [{ type: i1.BreakpointObserver }, { type: i2.Platform }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: NgxScandocCameraProvider }]; }, propDecorators: { imageHandler: [{
715
720
  type: Input
716
721
  }], type: [{
@@ -769,9 +774,8 @@ class ScanProvider {
769
774
  constructor(http, injector) {
770
775
  this.http = http;
771
776
  this.injector = injector;
772
- // enableVerification = true;
773
777
  this.config = this.injector.get(SCAN_CONFIG_TOKEN);
774
- this.canStoreImages = this.config.canStoreImages;
778
+ this.canStoreImages = this.config.canStoreImages || false;
775
779
  }
776
780
  genderList() {
777
781
  return {
@@ -1542,7 +1546,6 @@ class NgxScandocAuthProvider {
1542
1546
  constructor(http, injector) {
1543
1547
  this.http = http;
1544
1548
  this.injector = injector;
1545
- this.config = this.injector.get(AUTH_CONFIG_TOKEN);
1546
1549
  this.token = '';
1547
1550
  this.refresh_token = '';
1548
1551
  this.tokenTimestamps = {
@@ -1550,6 +1553,7 @@ class NgxScandocAuthProvider {
1550
1553
  Client: 0,
1551
1554
  SubClient: 0,
1552
1555
  };
1556
+ this.config = this.injector.get(AUTH_CONFIG_TOKEN);
1553
1557
  }
1554
1558
  setSubClient(name) {
1555
1559
  this.subClient = name;
@@ -4077,9 +4081,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4077
4081
  class HttpErrorInterceptor {
4078
4082
  constructor(injector) {
4079
4083
  this.injector = injector;
4080
- this.authProvider = this.injector.get(NgxScandocAuthProvider);
4081
4084
  }
4082
4085
  intercept(req, next) {
4086
+ this.authProvider = this.injector.get(NgxScandocAuthProvider);
4083
4087
  //console.log(req.url);
4084
4088
  if (req.url.indexOf('/ks/') >= 0 || req.url.indexOf('/assets/') >= 0) {
4085
4089
  return next.handle(req);
@@ -4462,5 +4466,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4462
4466
  * Generated bundle index. Do not edit.
4463
4467
  */
4464
4468
 
4465
- export { AUTH_CONFIG_TOKEN, AppFormModule, BlankComponent, CameraSwitchComponent, CoreComponentsModule, CorePipesModule, DialogsModule, HttpErrorInterceptor, LoadingComponent, ManualScanComponent, MaterialModule, NgxScanDocTranslationProvider, NgxScandocAuthProvider, NgxScandocDialogsCoreProvider, NgxScandocFieldsProvider, NgxScandocModule, PromptManualComponent, SCAN_CONFIG_TOKEN, SafeResourceUrlPipe, ScanComponent, ScanProfileComponent, ScanProvider, ScanSelfieComponent, TranslateLoaderProvider, TurnDocumentComponent, WebcamComponent, WebcamModule, webRtcProvider };
4469
+ export { AUTH_CONFIG_TOKEN, AppFormModule, BlankComponent, CameraSwitchComponent, CoreComponentsModule, CorePipesModule, DialogsModule, HttpErrorInterceptor, LoadingComponent, ManualScanComponent, MaterialModule, NgxScanDocTranslationProvider, NgxScandocAuthProvider, NgxScandocDialogsCoreProvider, NgxScandocFieldsProvider, NgxScandocModule, PromptManualComponent, SCAN_CONFIG_TOKEN, SafeResourceUrlPipe, ScanComponent, ScanProfileComponent, ScanProvider, ScanSelfieComponent, TranslateLoaderProvider, TurnDocumentComponent, WebcamComponent, WebcamImage, WebcamModule, webRtcProvider };
4466
4470
  //# sourceMappingURL=ngx-scandoc.mjs.map