-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
1,012 additions
and
1,623 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 21 additions & 20 deletions
41
angular-components-integration/src/app/app.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
<div> | ||
<h1>DOT components integration</h1> | ||
<app-document-auto-capture | ||
*ngIf="currentStep === step.DOCUMENT_CAPTURE" | ||
(photoTakenCallBack)="handlePhotoTaken($event)" | ||
(onError)="handleOnError($event)" | ||
></app-document-auto-capture> | ||
<app-face-auto-capture | ||
*ngIf="currentStep === step.FACE_CAPTURE" | ||
(photoTakenCallBack)="handlePhotoTaken($event)" | ||
(onError)="handleOnError($event)" | ||
></app-face-auto-capture> | ||
<app-result | ||
*ngIf="currentStep ===step.RESULT" | ||
[imageUrl]="imageUrl" | ||
(backBtnClick)="handleStepChange($event)" | ||
></app-result> | ||
<app-component-select | ||
*ngIf="currentStep === step.SELECT_COMPONENT" | ||
(btnClick)="handleStepChange($event)" | ||
></app-component-select> | ||
</div> | ||
<div *ngIf="currentStep === step.DOCUMENT_CAPTURE"> | ||
<app-document-auto-capture | ||
(photoTakenCallBack)="handlePhotoTaken($event)" | ||
(onError)="handleOnError($event)" | ||
(backBtnClick)="handleStepChange($event)"> | ||
</app-document-auto-capture> | ||
<app-result *ngIf="imageUrl" [imageUrl]="imageUrl"></app-result> | ||
</div> | ||
<div *ngIf="currentStep === step.FACE_CAPTURE"> | ||
<app-face-auto-capture | ||
(photoTakenCallBack)="handlePhotoTaken($event)" | ||
(onError)="handleOnError($event)" | ||
(backBtnClick)="handleStepChange($event)"> | ||
</app-face-auto-capture> | ||
<app-result *ngIf="imageUrl" [imageUrl]="imageUrl"></app-result> | ||
</div> | ||
<app-component-select | ||
*ngIf="currentStep === step.SELECT_COMPONENT" | ||
(btnClick)="handleStepChange($event)"> | ||
</app-component-select> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 3 additions & 9 deletions
12
...omponents-integration/src/app/components/component-select/component-select.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
<div> | ||
<button | ||
(click)="onFaceClick()" | ||
class="select-component-btn" | ||
> | ||
<button (click)="onFaceClick()" class="button"> | ||
Face | ||
</button> | ||
<button | ||
(click)="onDocumentClick()" | ||
class="select-component-btn" | ||
> | ||
<button (click)="onDocumentClick()" class="button"> | ||
Document | ||
</button> | ||
</div> | ||
</div> |
8 changes: 7 additions & 1 deletion
8
...integration/src/app/components/document-auto-capture/document-auto-capture.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
<div> | ||
<h2>Document auto capture</h2> | ||
<button (click)="onBackClick()" class="button"> | ||
Go back | ||
</button> | ||
<button (click)="handleContinue()" class="button" [disabled]="isButtonDisabled"> | ||
Continue detection | ||
</button> | ||
<div class="container"> | ||
<x-dot-document-auto-capture id="dot-document-auto-capture"></x-dot-document-auto-capture> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
...ponents-integration/src/app/components/face-auto-capture/face-auto-capture.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
<div> | ||
<h2>Face auto capture</h2> | ||
<button (click)="onBackClick()" class="button"> | ||
Go back | ||
</button> | ||
<button (click)="handleContinue()" class="button" [disabled]="isButtonDisabled"> | ||
Continue detection | ||
</button> | ||
<div class="container"> | ||
<x-dot-face-auto-capture id="dot-face-auto-capture"></x-dot-face-auto-capture> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 2 additions & 12 deletions
14
angular-components-integration/src/app/components/result/result.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,3 @@ | ||
<div class="container"> | ||
<button | ||
(click)="onBackClick()" | ||
class="select-component-btn" | ||
> | ||
Go back | ||
</button> | ||
<img | ||
[src]="imageSrc" | ||
alt="result-image" | ||
class="result-img" | ||
> | ||
</div> | ||
<img [src]="imageSrc" alt="result-image" class="result-img"> | ||
</div> |
13 changes: 4 additions & 9 deletions
13
angular-components-integration/src/app/components/result/result.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; | ||
import { Component, OnChanges, Input } from '@angular/core'; | ||
import { DomSanitizer, SafeUrl } from "@angular/platform-browser"; | ||
import { Step } from 'src/app/types'; | ||
|
||
@Component({ | ||
selector: 'app-result', | ||
templateUrl: './result.component.html', | ||
styleUrls: ['./result.component.css'] | ||
}) | ||
export class ResultComponent implements OnInit { | ||
export class ResultComponent implements OnChanges { | ||
@Input() imageUrl!: string; | ||
@Output() backBtnClick = new EventEmitter<Step>(); | ||
|
||
imageSrc: SafeUrl = ''; | ||
|
||
constructor(private domSanitizer: DomSanitizer) { } | ||
|
||
ngOnInit(): void { | ||
ngOnChanges(): void { | ||
this.imageSrc = this.domSanitizer.bypassSecurityTrustUrl(this.imageUrl) | ||
} | ||
|
||
onBackClick() { | ||
this.backBtnClick.emit(Step.SELECT_COMPONENT) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="stylesheet" href="style.css"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | ||
<script src="lib/main-face.js"></script> | ||
<script src="lib/main-document.js"></script> | ||
<script src="main.js"></script> | ||
<title>JQuery Integration Sample</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<div id="app"> | ||
<h1>DOT Web Components Integration</h1> | ||
<div><a href="#" id="selfie" class="primary">selfie</a> <a href="#" id="document" class="primary">document</a><br /></div> | ||
<div id="container"> | ||
<x-dot-face-auto-capture></x-dot-face-auto-capture> <!-- initial render of the custom components, needs to be supplied props to properly start --> | ||
<x-dot-document-auto-capture></x-dot-document-auto-capture> | ||
</div> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="stylesheet" href="style.css"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | ||
<script src="lib/index-face.js"></script> | ||
<script src="lib/index-document.js"></script> | ||
<script src="index.js"></script> | ||
<title>JQuery Integration Sample</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<div id="app"> | ||
<h1>DOT Web Components Integration</h1> | ||
<div> | ||
<button id="selfie" class="button">Selfie</button> | ||
<button id="document" class="button">Document</button> | ||
<button disabled="true" id="continue" class="button">Continue detection</button> | ||
</div> | ||
<div id="container"> | ||
<x-dot-face-auto-capture></x-dot-face-auto-capture> | ||
<!-- initial render of the custom components, needs to be supplied props to properly start --> | ||
<x-dot-document-auto-capture></x-dot-document-auto-capture> | ||
</div> | ||
</body> | ||
<div id="result"></div> | ||
</div> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.