ngx-scandoc 19.0.3 → 19.0.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.
- package/fesm2022/ngx-scandoc.mjs +1119 -1119
- package/fesm2022/ngx-scandoc.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/ngx-scandoc.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Output, ViewChild, HostListener, Input, ChangeDetectionStrategy, Component, NgModule, InjectionToken, Optional, Inject,
|
|
2
|
+
import { Injectable, EventEmitter, Output, ViewChild, HostListener, Input, ChangeDetectionStrategy, Component, NgModule, InjectionToken, HostBinding, Optional, Inject, Pipe, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import * as i4 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { Subject, of, from, Observable, tap, distinctUntilChanged, switchMap as switchMap$1, throwError, forkJoin } from 'rxjs';
|
|
@@ -7,7 +7,7 @@ import { takeUntil, map, switchMap, tap as tap$1, catchError, share, retry } fro
|
|
|
7
7
|
import * as i1 from '@angular/cdk/layout';
|
|
8
8
|
import * as i2 from '@angular/cdk/platform';
|
|
9
9
|
import { PlatformModule } from '@angular/cdk/platform';
|
|
10
|
-
import * as i5 from '@angular/forms';
|
|
10
|
+
import * as i5$2 from '@angular/forms';
|
|
11
11
|
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
12
12
|
import moment from 'moment';
|
|
13
13
|
import * as i1$1 from '@angular/common/http';
|
|
@@ -20,19 +20,17 @@ import * as i3 from '@angular/material/button';
|
|
|
20
20
|
import { MatButtonModule } from '@angular/material/button';
|
|
21
21
|
import * as i8 from '@angular/material/progress-bar';
|
|
22
22
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
23
|
+
import * as i5 from '@angular/material/card';
|
|
24
|
+
import { MatCardModule } from '@angular/material/card';
|
|
23
25
|
import * as i4$1 from '@ngx-translate/core';
|
|
24
26
|
import { TranslateModule } from '@ngx-translate/core';
|
|
25
|
-
import * as i6 from '@angular/material/card';
|
|
26
|
-
import { MatCardModule } from '@angular/material/card';
|
|
27
|
-
import * as i7 from '@ngx-formly/core';
|
|
28
|
-
import { FormlyModule } from '@ngx-formly/core';
|
|
29
27
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
30
28
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
31
29
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
32
30
|
import { MatChipsModule } from '@angular/material/chips';
|
|
33
31
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
34
32
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
35
|
-
import * as i1$
|
|
33
|
+
import * as i1$4 from '@angular/material/dialog';
|
|
36
34
|
import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
37
35
|
import * as i4$3 from '@angular/material/input';
|
|
38
36
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -40,18 +38,20 @@ import { MatListModule } from '@angular/material/list';
|
|
|
40
38
|
import { MatMenuModule } from '@angular/material/menu';
|
|
41
39
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
42
40
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
43
|
-
import * as i5$
|
|
41
|
+
import * as i5$3 from '@angular/material/select';
|
|
44
42
|
import { MatSelectModule } from '@angular/material/select';
|
|
45
43
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
46
44
|
import { MatSliderModule } from '@angular/material/slider';
|
|
47
45
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
48
46
|
import { MatTableModule } from '@angular/material/table';
|
|
49
47
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
48
|
+
import * as i1$2 from '@ngx-formly/core';
|
|
49
|
+
import { FormlyModule } from '@ngx-formly/core';
|
|
50
50
|
import { FieldType, FormlyMaterialModule } from '@ngx-formly/material';
|
|
51
51
|
import { FormlySelectModule } from '@ngx-formly/core/select';
|
|
52
52
|
import { AvatarModule } from 'ngx-avatars';
|
|
53
53
|
import { FormlyMatDatepickerModule } from '@ngx-formly/material/datepicker';
|
|
54
|
-
import * as i1$
|
|
54
|
+
import * as i1$3 from '@angular/platform-browser';
|
|
55
55
|
import { webSocket } from 'rxjs/webSocket';
|
|
56
56
|
|
|
57
57
|
/**
|
|
@@ -1647,891 +1647,368 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1647
1647
|
}]
|
|
1648
1648
|
}], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i0.Injector }] });
|
|
1649
1649
|
|
|
1650
|
-
|
|
1651
|
-
class
|
|
1652
|
-
|
|
1653
|
-
//@Optional() @Inject(SCAN_CONFIG_TOKEN) config: ScanConfig,
|
|
1654
|
-
providers, platformLocation) {
|
|
1655
|
-
this.translate = translate;
|
|
1656
|
-
this.injector = injector;
|
|
1657
|
-
this.platformLocation = platformLocation;
|
|
1658
|
-
console.log('MM', Math.random());
|
|
1659
|
-
this.customLoader = this.translate.currentLoader;
|
|
1660
|
-
//console.log('config',config)
|
|
1661
|
-
// console.log(this.translate)
|
|
1662
|
-
if (providers && providers.length > 0) {
|
|
1663
|
-
for (const provider of providers) {
|
|
1664
|
-
this.addTranslationFolder(provider.name, provider.source);
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
path(path) {
|
|
1669
|
-
return path;
|
|
1670
|
-
// const baseHref = this.platformLocation
|
|
1671
|
-
// .getBaseHrefFromDOM()
|
|
1672
|
-
// .split('/')
|
|
1673
|
-
// .join('');
|
|
1674
|
-
// return baseHref != '' ? `/${baseHref}${path}` : path;
|
|
1675
|
-
}
|
|
1676
|
-
setDefaultLang(lang) {
|
|
1677
|
-
this.defaultLang = lang;
|
|
1678
|
-
this.translate.setDefaultLang(this.defaultLang);
|
|
1650
|
+
class ManualScanComponent extends BaseComponent {
|
|
1651
|
+
get class() {
|
|
1652
|
+
return this.isMobile;
|
|
1679
1653
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
this.
|
|
1654
|
+
onResize() {
|
|
1655
|
+
if (this.wraper) {
|
|
1656
|
+
this.width = this.wraper.nativeElement.clientWidth;
|
|
1657
|
+
this.height = this.wraper.nativeElement.clientHeight;
|
|
1658
|
+
setTimeout(() => {
|
|
1659
|
+
const video = this.wraper?.nativeElement.querySelector('video');
|
|
1660
|
+
if (video) {
|
|
1661
|
+
// console.log(video.clientWidth, video.clientHeight);
|
|
1662
|
+
this.videoWidth = video.clientWidth;
|
|
1663
|
+
this.videoHeight = video.clientHeight;
|
|
1664
|
+
}
|
|
1665
|
+
this.cd.detectChanges();
|
|
1666
|
+
}, 100);
|
|
1667
|
+
this.cd.detectChanges();
|
|
1684
1668
|
}
|
|
1685
1669
|
}
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
}
|
|
1670
|
+
constructor(cameraProvider, cd, layoutProvider, zone) {
|
|
1671
|
+
super();
|
|
1672
|
+
this.cameraProvider = cameraProvider;
|
|
1673
|
+
this.cd = cd;
|
|
1674
|
+
this.layoutProvider = layoutProvider;
|
|
1675
|
+
this.zone = zone;
|
|
1676
|
+
this.action = new EventEmitter();
|
|
1677
|
+
this.videoOptions = {
|
|
1678
|
+
width: 1920,
|
|
1679
|
+
height: 1080,
|
|
1680
|
+
facingMode: 'environment',
|
|
1681
|
+
};
|
|
1682
|
+
this.cameraReady = false;
|
|
1683
|
+
this.scanBlastData = [
|
|
1684
|
+
{
|
|
1685
|
+
title: 'scandoc.front',
|
|
1686
|
+
description: 'scandoc.frontDescription',
|
|
1687
|
+
side: 'FRONT',
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
title: 'scandoc.back',
|
|
1691
|
+
description: 'scandoc.backDescription',
|
|
1692
|
+
disabled: true,
|
|
1693
|
+
side: 'BACK',
|
|
1694
|
+
},
|
|
1695
|
+
];
|
|
1696
|
+
this.error = false;
|
|
1697
|
+
this.scaning = false;
|
|
1698
|
+
this.documentTypeSelected = false;
|
|
1699
|
+
this.preview = null;
|
|
1700
|
+
this.scanDatas = [];
|
|
1701
|
+
this.trigger = new Subject();
|
|
1702
|
+
// switch to next / previous / specific webcam; true/false: forward/backwards, string: deviceId
|
|
1703
|
+
this.nextWebcam = new Subject();
|
|
1704
|
+
this.isMobile = false;
|
|
1698
1705
|
}
|
|
1699
|
-
|
|
1700
|
-
this.
|
|
1701
|
-
this.
|
|
1702
|
-
|
|
1706
|
+
ngOnInit() {
|
|
1707
|
+
this.__subs(this.layoutProvider.breakpoint$).subscribe((v) => {
|
|
1708
|
+
this.zone.run(() => {
|
|
1709
|
+
this.isMobile = !v.matches;
|
|
1703
1710
|
setTimeout(() => {
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
if (fallback && fallback !== lang) {
|
|
1710
|
-
this.loadTranslation(fallback);
|
|
1711
|
-
}
|
|
1711
|
+
console.log('WTF');
|
|
1712
|
+
this.cd.detectChanges();
|
|
1713
|
+
}, 200);
|
|
1714
|
+
});
|
|
1715
|
+
console.log('MNOBILE', this.isMobile);
|
|
1712
1716
|
});
|
|
1713
1717
|
}
|
|
1714
|
-
|
|
1715
|
-
return this.
|
|
1716
|
-
if (fallback && fallback !== lang) {
|
|
1717
|
-
return this.updateTranslation(fallback);
|
|
1718
|
-
}
|
|
1719
|
-
return this.translate.use(lang);
|
|
1720
|
-
}), switchMap(() => {
|
|
1721
|
-
this.onTranslationChanged(lang);
|
|
1722
|
-
return this.translate.use(lang);
|
|
1723
|
-
}));
|
|
1718
|
+
get nextWebcamObservable() {
|
|
1719
|
+
return this.nextWebcam.asObservable();
|
|
1724
1720
|
}
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1721
|
+
cameraWasSwitched(deviceId) {
|
|
1722
|
+
console.log('[active device]', deviceId);
|
|
1723
|
+
// this.deviceId = deviceId;
|
|
1724
|
+
// this.cameraReady = true;
|
|
1725
|
+
// this.defaultDevice = deviceId;
|
|
1726
|
+
setTimeout(() => {
|
|
1727
|
+
this.onResize();
|
|
1728
|
+
// this.scan();
|
|
1729
|
+
}, 300);
|
|
1730
|
+
}
|
|
1731
|
+
handleInitError(error) {
|
|
1732
|
+
console.log(error);
|
|
1733
|
+
}
|
|
1734
|
+
resolutionLimit(file) {
|
|
1735
|
+
const minWidth = 1280;
|
|
1736
|
+
const minHeight = 720;
|
|
1737
|
+
return new Observable((observer) => {
|
|
1738
|
+
const img = new Image();
|
|
1739
|
+
img.src = window.URL.createObjectURL(file);
|
|
1740
|
+
img.onload = () => {
|
|
1741
|
+
const width = img.naturalWidth;
|
|
1742
|
+
const height = img.naturalHeight;
|
|
1743
|
+
let valid = false;
|
|
1744
|
+
if (width > height) {
|
|
1745
|
+
valid = width >= minWidth && height >= minHeight;
|
|
1746
|
+
}
|
|
1747
|
+
else {
|
|
1748
|
+
valid = width >= minHeight && height >= minWidth;
|
|
1749
|
+
}
|
|
1750
|
+
observer.next(valid);
|
|
1751
|
+
};
|
|
1752
|
+
img.onerror = (error) => {
|
|
1753
|
+
observer.error(error);
|
|
1754
|
+
};
|
|
1729
1755
|
});
|
|
1730
1756
|
}
|
|
1731
|
-
|
|
1732
|
-
this.
|
|
1733
|
-
return this.updateTranslation(lang);
|
|
1757
|
+
getImgBase64(num) {
|
|
1758
|
+
return this.scanBlastData[num].image.dataUrl.split(',')[1];
|
|
1734
1759
|
}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1760
|
+
getBase64(file) {
|
|
1761
|
+
return new Observable((observer) => {
|
|
1762
|
+
const reader = new FileReader();
|
|
1763
|
+
reader.readAsDataURL(file);
|
|
1764
|
+
reader.onload = () => {
|
|
1765
|
+
observer.next(reader.result);
|
|
1766
|
+
};
|
|
1767
|
+
reader.onerror = (error) => {
|
|
1768
|
+
observer.error(error);
|
|
1769
|
+
};
|
|
1770
|
+
});
|
|
1771
|
+
}
|
|
1772
|
+
handleFileInput(target, event, side) {
|
|
1773
|
+
const files = target.files;
|
|
1774
|
+
this.selectedSide = side;
|
|
1775
|
+
console.log(files);
|
|
1776
|
+
const file = files.item(0);
|
|
1777
|
+
this.resolutionLimit(file)
|
|
1778
|
+
.pipe(switchMap$1((valid) => {
|
|
1779
|
+
return valid ? this.getBase64(file) : of(false);
|
|
1780
|
+
}))
|
|
1781
|
+
.subscribe((imageAsDataUrl) => {
|
|
1782
|
+
// console.log(imageAsDataUrl);
|
|
1783
|
+
event.target.value = null;
|
|
1784
|
+
if (!imageAsDataUrl) {
|
|
1785
|
+
console.warn('MIN RES');
|
|
1786
|
+
// this.dialogs.alert(
|
|
1787
|
+
// 'core.page.error',
|
|
1788
|
+
// this.translate.instant(
|
|
1789
|
+
// 'pms.dialogs.components.scanProfile.minResolution'
|
|
1790
|
+
// )
|
|
1791
|
+
// );
|
|
1750
1792
|
}
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
}
|
|
1793
|
+
else {
|
|
1794
|
+
side.image = {
|
|
1795
|
+
_imageAsDataUrl: imageAsDataUrl,
|
|
1796
|
+
imageAsDataUrl: imageAsDataUrl,
|
|
1797
|
+
};
|
|
1798
|
+
if (this.selectedSide.side === 'FRONT') {
|
|
1799
|
+
this.scanBlastData[1].disabled = false;
|
|
1800
|
+
}
|
|
1759
1801
|
}
|
|
1760
|
-
|
|
1761
|
-
|
|
1802
|
+
this.cd.detectChanges();
|
|
1803
|
+
});
|
|
1762
1804
|
}
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1805
|
+
cameraOff(ev) { }
|
|
1806
|
+
ngOnDestroy() { }
|
|
1807
|
+
singleScan(side) {
|
|
1808
|
+
this.scanType = side.side;
|
|
1809
|
+
this.preview = null;
|
|
1810
|
+
this.selectedSide = side;
|
|
1811
|
+
this.selectedSide.image = null;
|
|
1812
|
+
this.documentTypeSelected = true;
|
|
1813
|
+
this.scanBlastData[1].disabled = false;
|
|
1814
|
+
this.cameraProvider.$showSwitch.next(true);
|
|
1815
|
+
this.cd.detectChanges();
|
|
1816
|
+
setTimeout(() => {
|
|
1817
|
+
this.onResize();
|
|
1818
|
+
}, 10);
|
|
1819
|
+
}
|
|
1820
|
+
scanBlastFinish() {
|
|
1821
|
+
this.action.emit(this.scanBlastData);
|
|
1822
|
+
}
|
|
1823
|
+
get scanBlastCanUpload() {
|
|
1824
|
+
return this.scanBlastData[0].image ? true : false;
|
|
1825
|
+
}
|
|
1826
|
+
handleImage(webcamImage) {
|
|
1827
|
+
console.log('[received webcam image]', webcamImage);
|
|
1828
|
+
this.webcamImage = webcamImage;
|
|
1829
|
+
this.preview = webcamImage.imageAsDataUrl;
|
|
1830
|
+
this.cameraProvider.$showSwitch.next(false);
|
|
1831
|
+
this.cd.detectChanges();
|
|
1832
|
+
}
|
|
1833
|
+
continue() {
|
|
1834
|
+
this.documentTypeSelected = false;
|
|
1835
|
+
setTimeout(() => {
|
|
1836
|
+
this.selectedSide.image = this.webcamImage;
|
|
1837
|
+
if (this.selectedSide.side === 'FRONT') {
|
|
1838
|
+
this.scanBlastData[1].disabled = false;
|
|
1839
|
+
}
|
|
1840
|
+
this.cd.detectChanges();
|
|
1841
|
+
}, 200);
|
|
1842
|
+
}
|
|
1843
|
+
retry() {
|
|
1844
|
+
this.preview = false;
|
|
1845
|
+
this.cameraProvider.$showSwitch.next(true);
|
|
1846
|
+
// this.result = false;
|
|
1847
|
+
if (this.error) {
|
|
1848
|
+
this.documentTypeSelected = false;
|
|
1849
|
+
this.scanBlastData.forEach((element) => {
|
|
1850
|
+
element.image = null;
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
this.error = false;
|
|
1854
|
+
}
|
|
1855
|
+
triggerSnapshot() {
|
|
1856
|
+
this.trigger.next(0);
|
|
1857
|
+
}
|
|
1858
|
+
scan() {
|
|
1859
|
+
console.log('SCAN');
|
|
1860
|
+
this.triggerSnapshot();
|
|
1861
|
+
this.scanDatas[0] = true;
|
|
1862
|
+
console.log(this.cameraProvider);
|
|
1863
|
+
this.cd.detectChanges();
|
|
1864
|
+
}
|
|
1865
|
+
rotateBase64Image(base64data) {
|
|
1866
|
+
return new Observable((observer) => {
|
|
1867
|
+
const canvas = document.createElement('canvas');
|
|
1868
|
+
const ctx = canvas.getContext('2d');
|
|
1869
|
+
var image = new Image();
|
|
1870
|
+
image.src = base64data;
|
|
1871
|
+
image.onload = () => {
|
|
1872
|
+
console.log(canvas);
|
|
1873
|
+
canvas.width = image.height;
|
|
1874
|
+
canvas.height = image.width;
|
|
1875
|
+
if (ctx) {
|
|
1876
|
+
ctx.rotate((90 * Math.PI) / 180);
|
|
1877
|
+
ctx.translate(0, -canvas.width);
|
|
1878
|
+
ctx.drawImage(image, 0, 0);
|
|
1879
|
+
observer.next(canvas.toDataURL());
|
|
1880
|
+
}
|
|
1881
|
+
else {
|
|
1882
|
+
observer.error({ type: 'generic error' });
|
|
1883
|
+
}
|
|
1884
|
+
};
|
|
1885
|
+
image.onerror = (e) => {
|
|
1886
|
+
observer.error(e);
|
|
1887
|
+
};
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1890
|
+
singleScanRotate(side) {
|
|
1891
|
+
console.log(side);
|
|
1892
|
+
this.rotateBase64Image(side.image.imageAsDataUrl).subscribe((data) => {
|
|
1893
|
+
side.image = { imageAsDataUrl: data };
|
|
1894
|
+
this.cd.detectChanges();
|
|
1895
|
+
});
|
|
1896
|
+
}
|
|
1897
|
+
videoReady(event) {
|
|
1898
|
+
console.log('READY', event);
|
|
1899
|
+
this.cameraReady = event;
|
|
1900
|
+
}
|
|
1901
|
+
singleScanRemove(side) {
|
|
1902
|
+
side.image = null;
|
|
1903
|
+
if (side.side === 'FRONT') {
|
|
1904
|
+
this.scanBlastData[1].disabled = true;
|
|
1905
|
+
}
|
|
1906
|
+
this.cd.detectChanges();
|
|
1907
|
+
}
|
|
1908
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ManualScanComponent, deps: [{ token: NgxScandocCameraProvider }, { token: i0.ChangeDetectorRef }, { token: LayoutProvider }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1909
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ManualScanComponent, isStandalone: false, selector: "ngx-manual-scan", outputs: { action: "action" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class.mobile": "this.class" } }, viewQueries: [{ propertyName: "wraper", first: true, predicate: ["wraper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\n\n<ng-container *ngIf=\"!result\">\n\n<ng-container *ngIf=\"!documentTypeSelected\">\n <section\n class=\"scanBlastWraper\"\n ngClass.lt-md=\"mobile\"\n fxFlex\n fxLayout=\"column\"\n >\n <div class=\"scanBlast\" fxFlex fxLayout.lt-md=\"column\" fxLayout=\"row\">\n <mat-card\n appearance=\"outlined\"\n style=\"display: flex; flex-direction: column\"\n fxLayout=\"column\"\n *ngFor=\"let side of scanBlastData\"\n >\n <div ngClass.lt-sm=\"small\" class=\"head\">\n <div class=\"title\" fxFlex>{{ side.title | translate }}</div>\n </div>\n <div class=\"actions\" style=\"display: flex; flex-direction: row\">\n <button\n (click)=\"singleScan(side)\"\n [disabled]=\"side.disabled\"\n style=\"margin-right: 4px\"\n mat-raised-button\n >\n <div class=\"buttonWrap\">\n <mat-icon>camera</mat-icon>\n <div>\n {{ \"scandoc.scanCamera\" | translate }}\n </div>\n </div>\n </button>\n <button\n (click)=\"file.click()\"\n [disabled]=\"side.disabled\"\n style=\"margin-left: 4px\"\n mat-raised-button\n >\n <input\n accept=\"image/*\"\n type=\"file\"\n style=\"display: none\"\n (change)=\"handleFileInput($event.target, $event, side)\"\n #file\n />\n <div class=\"buttonWrap\">\n <mat-icon>file_upload</mat-icon>\n <div>\n {{ \"scandoc.useFromDisk\" | translate }}\n </div>\n </div>\n </button>\n </div>\n <div class=\"content\" style=\"display: flex\">\n <div style=\"flex: 1\" class=\"previewPlaceholder\">\n <div class=\"description\">\n <ng-container *ngIf=\"side.image\">\n <div class=\"imgWrap\">\n <div\n style=\"flex: 1\"\n class=\"image\"\n [style.background-image]=\"\n 'url(' + side.image.imageAsDataUrl + ')'\n \"\n ></div>\n\n <div\n class=\"btnActions\"\n fxLayout.lt-md=\"column\"\n fxLayout=\"row\"\n style=\"display: flex; flex-direction: row\"\n >\n <button\n (click)=\"singleScanRemove(side)\"\n class=\"mr-4 remButton flex\"\n mat-raised-button\n >\n <div class=\"buttonWrap\">\n <mat-icon>delete</mat-icon>\n <div class=\"label\">\n {{ \"scandoc.remove\" | translate }}\n </div>\n </div>\n </button>\n <button\n class=\"ml-4 rotateButton flex\"\n mat-raised-button\n (click)=\"singleScanRotate(side)\"\n >\n <div class=\"buttonWrap\">\n <mat-icon>rotate_90_degrees_cw</mat-icon>\n <div class=\"label\">\n {{ \"scandoc.rotate\" | translate }}\n </div>\n </div>\n </button>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!side.image\">\n <div class=\"empty\">\n {{ side.description | translate }}\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </mat-card>\n </div>\n <footer>\n <div\n class=\"px-8 pb-8\"\n style=\"padding: 0px 8px 8px 8px; display: flex; flex-direction: row\"\n >\n <button\n (click)=\"scanBlastFinish()\"\n [disabled]=\"!scanBlastCanUpload\"\n style=\"flex: 1\"\n mat-raised-button\n >\n {{ \"scandoc.upload\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<div\n style=\"position: relative; display: flex; flex-direction: column; flex: 1\"\n *ngIf=\"documentTypeSelected\"\n>\n <div\n style=\"display: flex; flex-direction: row; flex: 1\"\n #wraper\n class=\"wraper\"\n >\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 *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main flex\"\n\n #webcam\n [trigger]=\"trigger\"\n (imageCapture)=\"handleImage($event)\"\n(videoReady)=\"videoReady($event)\"\n (cameraSwitched)=\"cameraWasSwitched($event)\"\n (initError)=\"handleInitError($event)\"\n type=\"manual\"\n\n (destroyed)=\"cameraOff($event)\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n display: flex;\n flex-direction: row;\n flex: 1;\n z-index: 20;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"pms.dialogs.components.scanProfile.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ul>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.placeIdCloseToDevice\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.ensureSufficientLight\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.holdDocumentSteady\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.makeSureAllEdgesOfTheIdAreVisible\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.makeSureThereAreNoGlareAndShadowsOnTheId\"\n | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div\n class=\"scanPreview\"\n style=\"display: flex; flex-direction: column; flex: 1\"\n *ngIf=\"!error && !scaning\"\n >\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"pms.dialogs.components.scanProfile.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\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 fxLayout=\"row\" class=\"p-8\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n {{ displayInfo }}\n </div>\n <div style=\"height: 26px;\">\n <div style=\"text-align: center; font-size: 18px;\" *ngIf=\"idScan && !preview && cameraReady\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"pms.dialogs.components.scanProfile.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"pms.dialogs.components.scanProfile.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <button\n [disabled]=\"!cameraReady\"\n class=\"w-100-p\"\n *ngIf=\"!preview\"\n mat-raised-button\n (click)=\"scan()\"\n >\n <ng-container>\n <ng-container *ngIf=\"scanType === 'FRONT'\">{{\n \"scandoc.captureFront\" | translate\n }}</ng-container>\n <ng-container *ngIf=\"scanType === 'BACK'\">{{\n \"scandoc.captureBack\" | translate\n }}</ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"scanSide === 1\">{{\n \"pms.dialogs.components.scanProfile.captureBackOfId\" | translate\n }}</ng-container>\n </button>\n\n <div\n class=\"w-100-p\"\n *ngIf=\"preview\"\n style=\"display: flex; flex-direction: row; align-items: center; flex: 1\"\n >\n <button class=\"flex mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4 flex\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n</div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5}:host.mobile .buttonWrap div{font-size:11px!important}:host.mobile .scanBlastWraper .head{height:30px!important}:host.mobile .scanBlastWraper .head .title{font-size:12px!important}:host.mobile .scanBlastWraper .scanBlast{flex-direction:column}:host.mobile .scanBlastWraper mat-card{margin:4px!important}:host.mobile .scanBlastWraper .description{flex-direction:row!important}:host.mobile .scanBlastWraper .description .imgWrap{padding:0!important}:host.mobile .scanBlastWraper .description .btnActions{position:absolute;right:0}:host.mobile .scanBlastWraper .description button{margin:0!important;position:absolute;right:16px}:host.mobile .scanBlastWraper .description button.rotateButton{top:58px}:host.mobile .scanBlastWraper .description button.remButton{top:8px}:host.mobile .scanBlastWraper .description button mat-icon{margin:0!important}:host.mobile .scanBlastWraper .description button div.label{display:none}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}.debug{position:absolute;left:0;width:100%;height:80px;top:0;border-bottom:1px solid #ccc;background-color:#f8f8f8;display:flex;overflow:hidden;color:#000}.debug img{height:50px;border:1px solid #000}.displayInfo{text-align:center;height:20px;flex:1;position:absolute;width:100%;background-color:#000;height:30px;bottom:55px;left:0;line-height:30px;color:#fff;z-index:200}.element{margin-bottom:8px}.element label{font-size:14px}.element div{font-size:18px}.wraper{position:relative;overflow:hidden}.preview{width:100%;border-radius:1%}.documentTypeWraper{width:400px}.documentTypeWraper .label{font-size:14px;margin-bottom:20px}.documentTypeWraper button{box-shadow:none}.overPane{position:absolute;width:100%;height:100%;top:0;left:0}.overPane app-webcam{clip-path:url(#myClip)}.subhead{height:55px;padding-top:8px}.rectangle{z-index:2;position:absolute;top:50%;left:50%;width:85.6mm;height:53.98mm;transform:translate(-50%,-50%);box-sizing:border-box;border:2px dashed #459be5;border-radius:3mm}.mask{z-index:1;position:absolute;width:100%;height:100%;background-position:center center;background-size:380mm;background-repeat:no-repeat}.label{font-size:11px;margin-top:4px}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}h4{font-size:16px}.images .title{padding:8px 0;font-weight:600}.images img{margin-bottom:16px}.error .title{font-size:22px}.error ul{font-size:18px}.photo{width:120px;height:120px;overflow:hidden}.signature{width:200px}mat-card{box-shadow:none!important}.scanBlastWraper{overflow:hidden;display:flex;flex-direction:column;flex:1}.scanBlastWraper button{text-transform:uppercase;overflow:hidden}.scanBlastWraper .buttonWrap{display:flex;flex-direction:row;align-items:center;justify-content:center}.scanBlast{display:flex;flex-direction:row;flex:1;padding:0 4px}.scanBlast mat-card{padding:0;box-shadow:none;margin:8px 4px;flex:1}.scanBlast mat-card .head{display:flex;flex-direction:row;align-items:center;justify-items:center;border-bottom:1px solid rgba(0,0,0,.12);height:60px;padding:8px}.scanBlast mat-card .head.small{height:30px!important;padding:4px 8px!important}.scanBlast mat-card .head.small .title{font-size:12px!important;margin-left:4px!important}.scanBlast mat-card .head button{max-width:120px;height:40px;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.scanBlast mat-card .head .title{margin-left:16px;color:#459ae5;font-size:16px}.scanBlast mat-card .content{margin:8px;flex:1}.scanBlast mat-card .description{text-align:center;color:#888}.scanBlast mat-card .actions{background-color:#e9e9e9;display:flex;flex-direction:row}.scanBlast mat-card .actions .mat-button-disabled{background-color:#fff!important}.scanBlast mat-card .actions button{box-shadow:none;width:50%;margin:8px;height:40px;font-size:12px}.scanBlast mat-card .actions button mat-icon{margin-right:8px}.scanBlast mat-card .previewPlaceholder{flex:1;border-radius:6px;display:flex;flex-direction:column}.scanBlast mat-card .previewPlaceholder .description{display:flex;flex:1;flex-direction:column;justify-content:center}.scanBlast mat-card .previewPlaceholder button{box-shadow:none;margin-top:8px;height:40px;font-size:12px}.scanBlast mat-card .previewPlaceholder button mat-icon{margin-right:8px}.scanBlast mat-card .previewPlaceholder .imgWrap{flex-direction:column;flex:1;display:flex;padding:8px;background-color:#f5f5f5;border-radius:4px}.scanBlast mat-card .previewPlaceholder .imgWrap img{width:100%;border-radius:4px}.scanBlast mat-card .previewPlaceholder .imgWrap .image{background-position:center;background-repeat:no-repeat;background-size:contain}.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}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.result{display:flex;flex-direction:column}.result .wrap{overflow:auto;flex:1;display:flex;flex-direction:row}.result .wrap .panel{flex:1}.result .wrap form{display:flex;flex-direction:row;padding:0 16px;width:100%}.result .wrap form formly-form{flex:1}.flex{flex:1}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: ["imageHandler", "type", "trigger", "refresh"], outputs: ["cameraSwitched", "videoReady", "imageCapture", "initError"] }, { kind: "component", type: i5.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i5$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] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
1910
|
+
}
|
|
1911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ManualScanComponent, decorators: [{
|
|
1912
|
+
type: Component,
|
|
1913
|
+
args: [{ selector: 'ngx-manual-scan', standalone: false, template: "\n\n<ng-container *ngIf=\"!result\">\n\n<ng-container *ngIf=\"!documentTypeSelected\">\n <section\n class=\"scanBlastWraper\"\n ngClass.lt-md=\"mobile\"\n fxFlex\n fxLayout=\"column\"\n >\n <div class=\"scanBlast\" fxFlex fxLayout.lt-md=\"column\" fxLayout=\"row\">\n <mat-card\n appearance=\"outlined\"\n style=\"display: flex; flex-direction: column\"\n fxLayout=\"column\"\n *ngFor=\"let side of scanBlastData\"\n >\n <div ngClass.lt-sm=\"small\" class=\"head\">\n <div class=\"title\" fxFlex>{{ side.title | translate }}</div>\n </div>\n <div class=\"actions\" style=\"display: flex; flex-direction: row\">\n <button\n (click)=\"singleScan(side)\"\n [disabled]=\"side.disabled\"\n style=\"margin-right: 4px\"\n mat-raised-button\n >\n <div class=\"buttonWrap\">\n <mat-icon>camera</mat-icon>\n <div>\n {{ \"scandoc.scanCamera\" | translate }}\n </div>\n </div>\n </button>\n <button\n (click)=\"file.click()\"\n [disabled]=\"side.disabled\"\n style=\"margin-left: 4px\"\n mat-raised-button\n >\n <input\n accept=\"image/*\"\n type=\"file\"\n style=\"display: none\"\n (change)=\"handleFileInput($event.target, $event, side)\"\n #file\n />\n <div class=\"buttonWrap\">\n <mat-icon>file_upload</mat-icon>\n <div>\n {{ \"scandoc.useFromDisk\" | translate }}\n </div>\n </div>\n </button>\n </div>\n <div class=\"content\" style=\"display: flex\">\n <div style=\"flex: 1\" class=\"previewPlaceholder\">\n <div class=\"description\">\n <ng-container *ngIf=\"side.image\">\n <div class=\"imgWrap\">\n <div\n style=\"flex: 1\"\n class=\"image\"\n [style.background-image]=\"\n 'url(' + side.image.imageAsDataUrl + ')'\n \"\n ></div>\n\n <div\n class=\"btnActions\"\n fxLayout.lt-md=\"column\"\n fxLayout=\"row\"\n style=\"display: flex; flex-direction: row\"\n >\n <button\n (click)=\"singleScanRemove(side)\"\n class=\"mr-4 remButton flex\"\n mat-raised-button\n >\n <div class=\"buttonWrap\">\n <mat-icon>delete</mat-icon>\n <div class=\"label\">\n {{ \"scandoc.remove\" | translate }}\n </div>\n </div>\n </button>\n <button\n class=\"ml-4 rotateButton flex\"\n mat-raised-button\n (click)=\"singleScanRotate(side)\"\n >\n <div class=\"buttonWrap\">\n <mat-icon>rotate_90_degrees_cw</mat-icon>\n <div class=\"label\">\n {{ \"scandoc.rotate\" | translate }}\n </div>\n </div>\n </button>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!side.image\">\n <div class=\"empty\">\n {{ side.description | translate }}\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </mat-card>\n </div>\n <footer>\n <div\n class=\"px-8 pb-8\"\n style=\"padding: 0px 8px 8px 8px; display: flex; flex-direction: row\"\n >\n <button\n (click)=\"scanBlastFinish()\"\n [disabled]=\"!scanBlastCanUpload\"\n style=\"flex: 1\"\n mat-raised-button\n >\n {{ \"scandoc.upload\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<div\n style=\"position: relative; display: flex; flex-direction: column; flex: 1\"\n *ngIf=\"documentTypeSelected\"\n>\n <div\n style=\"display: flex; flex-direction: row; flex: 1\"\n #wraper\n class=\"wraper\"\n >\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 *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main flex\"\n\n #webcam\n [trigger]=\"trigger\"\n (imageCapture)=\"handleImage($event)\"\n(videoReady)=\"videoReady($event)\"\n (cameraSwitched)=\"cameraWasSwitched($event)\"\n (initError)=\"handleInitError($event)\"\n type=\"manual\"\n\n (destroyed)=\"cameraOff($event)\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n display: flex;\n flex-direction: row;\n flex: 1;\n z-index: 20;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"pms.dialogs.components.scanProfile.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ul>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.placeIdCloseToDevice\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.ensureSufficientLight\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.holdDocumentSteady\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.makeSureAllEdgesOfTheIdAreVisible\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.makeSureThereAreNoGlareAndShadowsOnTheId\"\n | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div\n class=\"scanPreview\"\n style=\"display: flex; flex-direction: column; flex: 1\"\n *ngIf=\"!error && !scaning\"\n >\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"pms.dialogs.components.scanProfile.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\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 fxLayout=\"row\" class=\"p-8\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n {{ displayInfo }}\n </div>\n <div style=\"height: 26px;\">\n <div style=\"text-align: center; font-size: 18px;\" *ngIf=\"idScan && !preview && cameraReady\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"pms.dialogs.components.scanProfile.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"pms.dialogs.components.scanProfile.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <button\n [disabled]=\"!cameraReady\"\n class=\"w-100-p\"\n *ngIf=\"!preview\"\n mat-raised-button\n (click)=\"scan()\"\n >\n <ng-container>\n <ng-container *ngIf=\"scanType === 'FRONT'\">{{\n \"scandoc.captureFront\" | translate\n }}</ng-container>\n <ng-container *ngIf=\"scanType === 'BACK'\">{{\n \"scandoc.captureBack\" | translate\n }}</ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"scanSide === 1\">{{\n \"pms.dialogs.components.scanProfile.captureBackOfId\" | translate\n }}</ng-container>\n </button>\n\n <div\n class=\"w-100-p\"\n *ngIf=\"preview\"\n style=\"display: flex; flex-direction: row; align-items: center; flex: 1\"\n >\n <button class=\"flex mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4 flex\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n</div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5}:host.mobile .buttonWrap div{font-size:11px!important}:host.mobile .scanBlastWraper .head{height:30px!important}:host.mobile .scanBlastWraper .head .title{font-size:12px!important}:host.mobile .scanBlastWraper .scanBlast{flex-direction:column}:host.mobile .scanBlastWraper mat-card{margin:4px!important}:host.mobile .scanBlastWraper .description{flex-direction:row!important}:host.mobile .scanBlastWraper .description .imgWrap{padding:0!important}:host.mobile .scanBlastWraper .description .btnActions{position:absolute;right:0}:host.mobile .scanBlastWraper .description button{margin:0!important;position:absolute;right:16px}:host.mobile .scanBlastWraper .description button.rotateButton{top:58px}:host.mobile .scanBlastWraper .description button.remButton{top:8px}:host.mobile .scanBlastWraper .description button mat-icon{margin:0!important}:host.mobile .scanBlastWraper .description button div.label{display:none}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}.debug{position:absolute;left:0;width:100%;height:80px;top:0;border-bottom:1px solid #ccc;background-color:#f8f8f8;display:flex;overflow:hidden;color:#000}.debug img{height:50px;border:1px solid #000}.displayInfo{text-align:center;height:20px;flex:1;position:absolute;width:100%;background-color:#000;height:30px;bottom:55px;left:0;line-height:30px;color:#fff;z-index:200}.element{margin-bottom:8px}.element label{font-size:14px}.element div{font-size:18px}.wraper{position:relative;overflow:hidden}.preview{width:100%;border-radius:1%}.documentTypeWraper{width:400px}.documentTypeWraper .label{font-size:14px;margin-bottom:20px}.documentTypeWraper button{box-shadow:none}.overPane{position:absolute;width:100%;height:100%;top:0;left:0}.overPane app-webcam{clip-path:url(#myClip)}.subhead{height:55px;padding-top:8px}.rectangle{z-index:2;position:absolute;top:50%;left:50%;width:85.6mm;height:53.98mm;transform:translate(-50%,-50%);box-sizing:border-box;border:2px dashed #459be5;border-radius:3mm}.mask{z-index:1;position:absolute;width:100%;height:100%;background-position:center center;background-size:380mm;background-repeat:no-repeat}.label{font-size:11px;margin-top:4px}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}h4{font-size:16px}.images .title{padding:8px 0;font-weight:600}.images img{margin-bottom:16px}.error .title{font-size:22px}.error ul{font-size:18px}.photo{width:120px;height:120px;overflow:hidden}.signature{width:200px}mat-card{box-shadow:none!important}.scanBlastWraper{overflow:hidden;display:flex;flex-direction:column;flex:1}.scanBlastWraper button{text-transform:uppercase;overflow:hidden}.scanBlastWraper .buttonWrap{display:flex;flex-direction:row;align-items:center;justify-content:center}.scanBlast{display:flex;flex-direction:row;flex:1;padding:0 4px}.scanBlast mat-card{padding:0;box-shadow:none;margin:8px 4px;flex:1}.scanBlast mat-card .head{display:flex;flex-direction:row;align-items:center;justify-items:center;border-bottom:1px solid rgba(0,0,0,.12);height:60px;padding:8px}.scanBlast mat-card .head.small{height:30px!important;padding:4px 8px!important}.scanBlast mat-card .head.small .title{font-size:12px!important;margin-left:4px!important}.scanBlast mat-card .head button{max-width:120px;height:40px;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.scanBlast mat-card .head .title{margin-left:16px;color:#459ae5;font-size:16px}.scanBlast mat-card .content{margin:8px;flex:1}.scanBlast mat-card .description{text-align:center;color:#888}.scanBlast mat-card .actions{background-color:#e9e9e9;display:flex;flex-direction:row}.scanBlast mat-card .actions .mat-button-disabled{background-color:#fff!important}.scanBlast mat-card .actions button{box-shadow:none;width:50%;margin:8px;height:40px;font-size:12px}.scanBlast mat-card .actions button mat-icon{margin-right:8px}.scanBlast mat-card .previewPlaceholder{flex:1;border-radius:6px;display:flex;flex-direction:column}.scanBlast mat-card .previewPlaceholder .description{display:flex;flex:1;flex-direction:column;justify-content:center}.scanBlast mat-card .previewPlaceholder button{box-shadow:none;margin-top:8px;height:40px;font-size:12px}.scanBlast mat-card .previewPlaceholder button mat-icon{margin-right:8px}.scanBlast mat-card .previewPlaceholder .imgWrap{flex-direction:column;flex:1;display:flex;padding:8px;background-color:#f5f5f5;border-radius:4px}.scanBlast mat-card .previewPlaceholder .imgWrap img{width:100%;border-radius:4px}.scanBlast mat-card .previewPlaceholder .imgWrap .image{background-position:center;background-repeat:no-repeat;background-size:contain}.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}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.result{display:flex;flex-direction:column}.result .wrap{overflow:auto;flex:1;display:flex;flex-direction:row}.result .wrap .panel{flex:1}.result .wrap form{display:flex;flex-direction:row;padding:0 16px;width:100%}.result .wrap form formly-form{flex:1}.flex{flex:1}\n"] }]
|
|
1914
|
+
}], ctorParameters: () => [{ type: NgxScandocCameraProvider }, { type: i0.ChangeDetectorRef }, { type: LayoutProvider }, { type: i0.NgZone }], propDecorators: { action: [{
|
|
1915
|
+
type: Output
|
|
1916
|
+
}], wraper: [{
|
|
1917
|
+
type: ViewChild,
|
|
1918
|
+
args: ['wraper']
|
|
1919
|
+
}], class: [{
|
|
1920
|
+
type: HostBinding,
|
|
1921
|
+
args: ['class.mobile']
|
|
1922
|
+
}], onResize: [{
|
|
1923
|
+
type: HostListener,
|
|
1924
|
+
args: ['window:resize', ['$event']]
|
|
1925
|
+
}] } });
|
|
1777
1926
|
|
|
1778
|
-
class
|
|
1779
|
-
|
|
1780
|
-
this.
|
|
1781
|
-
this.provider = provider;
|
|
1782
|
-
this.selfie$ = new Subject();
|
|
1927
|
+
class ScanComponent extends BaseComponent {
|
|
1928
|
+
get class() {
|
|
1929
|
+
return this.isMobile;
|
|
1783
1930
|
}
|
|
1784
|
-
|
|
1785
|
-
|
|
1931
|
+
onResize() {
|
|
1932
|
+
if (this.result) {
|
|
1933
|
+
this.cd.detectChanges();
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
constructor(cd, zone, cameraProvider, injector, layoutProvider, platform, deviceService, auth) {
|
|
1937
|
+
super();
|
|
1938
|
+
this.cd = cd;
|
|
1939
|
+
this.zone = zone;
|
|
1940
|
+
this.cameraProvider = cameraProvider;
|
|
1941
|
+
this.injector = injector;
|
|
1942
|
+
this.layoutProvider = layoutProvider;
|
|
1943
|
+
this.platform = platform;
|
|
1944
|
+
this.deviceService = deviceService;
|
|
1945
|
+
this.auth = auth;
|
|
1946
|
+
this.scanBlastData = [
|
|
1786
1947
|
{
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
label: 'scandoc.form.scan.document.update.profile',
|
|
1797
|
-
},
|
|
1798
|
-
},
|
|
1799
|
-
{
|
|
1800
|
-
wrappers: [],
|
|
1801
|
-
type: 'checkbox',
|
|
1802
|
-
class: 'checkbox ',
|
|
1803
|
-
key: 'document',
|
|
1804
|
-
defaultValue: true,
|
|
1805
|
-
props: {
|
|
1806
|
-
label: 'scandoc.form.scan.document.update.document',
|
|
1807
|
-
},
|
|
1808
|
-
},
|
|
1809
|
-
{
|
|
1810
|
-
wrappers: [],
|
|
1811
|
-
type: 'checkbox',
|
|
1812
|
-
class: 'checkbox ',
|
|
1813
|
-
key: 'attachment',
|
|
1814
|
-
defaultValue: true,
|
|
1815
|
-
props: {
|
|
1816
|
-
label: 'scandoc.form.scan.document.update.attachment',
|
|
1817
|
-
},
|
|
1818
|
-
},
|
|
1819
|
-
].map((item) => this.translate.forms(item)),
|
|
1948
|
+
title: 'pms.dialogs.components.scanProfile.front',
|
|
1949
|
+
description: 'pms.dialogs.components.scanProfile.frontDescription',
|
|
1950
|
+
side: 'FRONT',
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
title: 'pms.dialogs.components.scanProfile.back',
|
|
1954
|
+
description: 'pms.dialogs.components.scanProfile.backDescription',
|
|
1955
|
+
disabled: true,
|
|
1956
|
+
side: 'BACK',
|
|
1820
1957
|
},
|
|
1821
1958
|
];
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
},
|
|
1876
|
-
{
|
|
1877
|
-
type: 'input',
|
|
1878
|
-
key: 'middleName',
|
|
1879
|
-
className: 'small',
|
|
1880
|
-
props: {
|
|
1881
|
-
label: 'scandoc.form.scan.document.middleName',
|
|
1882
|
-
},
|
|
1883
|
-
},
|
|
1884
|
-
{
|
|
1885
|
-
className: '',
|
|
1886
|
-
fieldGroupClassName: 'form-flex-row space-between',
|
|
1887
|
-
fieldGroup: [
|
|
1888
|
-
{
|
|
1889
|
-
type: 'datepicker',
|
|
1890
|
-
key: 'birthDate',
|
|
1891
|
-
className: 'w-100-p small mr-8',
|
|
1892
|
-
props: {
|
|
1893
|
-
label: 'scandoc.form.scan.document.birthDate',
|
|
1894
|
-
},
|
|
1895
|
-
},
|
|
1896
|
-
{
|
|
1897
|
-
type: 'select',
|
|
1898
|
-
key: 'gender',
|
|
1899
|
-
className: 'w-100-p small ml-8',
|
|
1900
|
-
props: {
|
|
1901
|
-
label: 'scandoc.form.scan.document.gender',
|
|
1902
|
-
options: [
|
|
1903
|
-
{ value: 'MALE', label: 'MALE' },
|
|
1904
|
-
{ value: 'FEMALE', label: 'FEMALE' },
|
|
1905
|
-
{ value: 'NA', label: 'N/A' },
|
|
1906
|
-
],
|
|
1907
|
-
},
|
|
1908
|
-
},
|
|
1909
|
-
],
|
|
1910
|
-
},
|
|
1911
|
-
{
|
|
1912
|
-
className: '',
|
|
1913
|
-
fieldGroupClassName: 'form-flex-row space-between',
|
|
1914
|
-
fieldGroup: [
|
|
1915
|
-
{
|
|
1916
|
-
type: 'input',
|
|
1917
|
-
key: 'birthPlace',
|
|
1918
|
-
className: 'small w-100-p mr-8',
|
|
1919
|
-
props: {
|
|
1920
|
-
label: 'scandoc.form.scan.document.birthPlace',
|
|
1921
|
-
},
|
|
1922
|
-
},
|
|
1923
|
-
{
|
|
1924
|
-
type: 'select',
|
|
1925
|
-
key: 'birthCountry',
|
|
1926
|
-
className: 'small w-100-p ml-8',
|
|
1927
|
-
props: {
|
|
1928
|
-
label: 'scandoc.form.scan.document.birthCountry',
|
|
1929
|
-
options: this.provider.countries(),
|
|
1930
|
-
},
|
|
1931
|
-
},
|
|
1932
|
-
],
|
|
1933
|
-
},
|
|
1934
|
-
{
|
|
1935
|
-
className: 'small',
|
|
1936
|
-
key: 'nationality',
|
|
1937
|
-
type: 'select',
|
|
1938
|
-
props: {
|
|
1939
|
-
label: 'scandoc.form.scan.document.nationality',
|
|
1940
|
-
// appearance: 'outline',
|
|
1941
|
-
// options: this.profileProvider.nationalities(),
|
|
1942
|
-
options: this.provider.countries(),
|
|
1943
|
-
},
|
|
1944
|
-
},
|
|
1945
|
-
],
|
|
1946
|
-
},
|
|
1947
|
-
{
|
|
1948
|
-
className: 'w-100-p',
|
|
1949
|
-
fieldGroupClassName: 'form-flex-column',
|
|
1950
|
-
fieldGroup: [
|
|
1951
|
-
{
|
|
1952
|
-
className: 'w-100-p',
|
|
1953
|
-
fieldGroupClassName: 'card-group',
|
|
1954
|
-
fieldGroup: [
|
|
1955
|
-
{
|
|
1956
|
-
type: 'title',
|
|
1957
|
-
props: {
|
|
1958
|
-
label: 'scandoc.form.scan.document.documentTitle',
|
|
1959
|
-
},
|
|
1960
|
-
},
|
|
1961
|
-
{
|
|
1962
|
-
type: 'select',
|
|
1963
|
-
key: 'documentType',
|
|
1964
|
-
props: {
|
|
1965
|
-
label: 'scandoc.form.scan.document.documentType',
|
|
1966
|
-
options: [
|
|
1967
|
-
{ value: 'ID', label: 'Identity Document' },
|
|
1968
|
-
{ value: 'PASS', label: 'Passport' },
|
|
1969
|
-
{ value: 'DL', label: 'Driver Licence' },
|
|
1970
|
-
],
|
|
1971
|
-
// valueProp: 'id',
|
|
1972
|
-
// labelProp: 'value',
|
|
1973
|
-
required: true,
|
|
1974
|
-
},
|
|
1975
|
-
},
|
|
1976
|
-
{
|
|
1977
|
-
type: 'input',
|
|
1978
|
-
key: 'documentNumber',
|
|
1979
|
-
props: {
|
|
1980
|
-
label: 'scandoc.form.scan.document.documentNumber',
|
|
1981
|
-
required: true,
|
|
1982
|
-
},
|
|
1983
|
-
},
|
|
1984
|
-
{
|
|
1985
|
-
className: '',
|
|
1986
|
-
fieldGroupClassName: 'form-flex-row space-between',
|
|
1987
|
-
fieldGroup: [
|
|
1988
|
-
{
|
|
1989
|
-
type: 'datepicker',
|
|
1990
|
-
key: 'issueDate',
|
|
1991
|
-
className: 'small mr-8',
|
|
1992
|
-
props: {
|
|
1993
|
-
label: 'scandoc.form.scan.document.issueDate',
|
|
1994
|
-
},
|
|
1995
|
-
},
|
|
1996
|
-
{
|
|
1997
|
-
type: 'datepicker',
|
|
1998
|
-
key: 'expirationDate',
|
|
1999
|
-
className: 'small ml-8',
|
|
2000
|
-
props: {
|
|
2001
|
-
label: 'scandoc.form.scan.document.expirationDate',
|
|
2002
|
-
},
|
|
2003
|
-
},
|
|
2004
|
-
],
|
|
2005
|
-
},
|
|
2006
|
-
{
|
|
2007
|
-
type: 'select',
|
|
2008
|
-
key: 'issueStateCode',
|
|
2009
|
-
props: {
|
|
2010
|
-
label: 'scandoc.form.scan.document.issuingStateCode',
|
|
2011
|
-
options: this.provider.countries(),
|
|
2012
|
-
},
|
|
2013
|
-
},
|
|
2014
|
-
{
|
|
2015
|
-
type: 'input',
|
|
2016
|
-
key: 'issuingPlace',
|
|
2017
|
-
props: {
|
|
2018
|
-
label: 'scandoc.form.scan.document.issuingPlace',
|
|
2019
|
-
required: false,
|
|
2020
|
-
},
|
|
2021
|
-
},
|
|
2022
|
-
],
|
|
2023
|
-
},
|
|
2024
|
-
{
|
|
2025
|
-
className: 'w-100-p',
|
|
2026
|
-
fieldGroupClassName: 'card-group',
|
|
2027
|
-
fieldGroup: [
|
|
2028
|
-
{
|
|
2029
|
-
type: 'title',
|
|
2030
|
-
props: {
|
|
2031
|
-
label: 'scandoc.form.scan.document.addressTitle',
|
|
2032
|
-
badge: 'communications',
|
|
2033
|
-
},
|
|
2034
|
-
},
|
|
2035
|
-
{
|
|
2036
|
-
className: 'small',
|
|
2037
|
-
key: 'country',
|
|
2038
|
-
type: 'select',
|
|
2039
|
-
props: {
|
|
2040
|
-
required: true,
|
|
2041
|
-
label: 'scandoc.form.profile.address.country',
|
|
2042
|
-
options: this.provider.countries(),
|
|
2043
|
-
},
|
|
2044
|
-
// expressionProperties: {
|
|
2045
|
-
// 'props.disabled': (model: any) => !model.newAddress,
|
|
2046
|
-
// },
|
|
2047
|
-
hooks: {
|
|
2048
|
-
onInit: (model) => {
|
|
2049
|
-
console.log(model);
|
|
2050
|
-
},
|
|
2051
|
-
},
|
|
2052
|
-
},
|
|
2053
|
-
{
|
|
2054
|
-
className: '',
|
|
2055
|
-
fieldGroupClassName: 'form-flex-row space-between',
|
|
2056
|
-
fieldGroup: [
|
|
2057
|
-
{
|
|
2058
|
-
className: 'mr-8 w-100-p',
|
|
2059
|
-
key: 'zip',
|
|
2060
|
-
type: 'input',
|
|
2061
|
-
props: {
|
|
2062
|
-
label: 'scandoc.form.profile.address.zip',
|
|
2063
|
-
labelProp: (item) => {
|
|
2064
|
-
return `${item.zip} (${item.city})`;
|
|
2065
|
-
},
|
|
2066
|
-
set: (field, option) => {
|
|
2067
|
-
// console.log(option, field);
|
|
2068
|
-
field.formControl.setValue(option.value.zip);
|
|
2069
|
-
// set CITY
|
|
2070
|
-
field.form.get('city').setValue(option.value.city);
|
|
2071
|
-
},
|
|
2072
|
-
filter: (key, field) => {
|
|
2073
|
-
// return this.profileProvider.zipCodes({
|
|
2074
|
-
// countryCode: field.form.get('country').value,
|
|
2075
|
-
// zip: key,
|
|
2076
|
-
// });
|
|
2077
|
-
},
|
|
2078
|
-
},
|
|
2079
|
-
// expressionProperties: {
|
|
2080
|
-
// 'props.disabled': (model: any) =>
|
|
2081
|
-
// !model.newAddress,
|
|
2082
|
-
// },
|
|
2083
|
-
},
|
|
2084
|
-
{
|
|
2085
|
-
className: 'small w-100-p ml-8',
|
|
2086
|
-
key: 'city',
|
|
2087
|
-
type: 'input',
|
|
2088
|
-
props: {
|
|
2089
|
-
label: 'scandoc.form.profile.address.city',
|
|
2090
|
-
},
|
|
2091
|
-
},
|
|
2092
|
-
],
|
|
2093
|
-
},
|
|
2094
|
-
{
|
|
2095
|
-
className: 'small w-100-p',
|
|
2096
|
-
key: 'street1',
|
|
2097
|
-
type: 'input',
|
|
2098
|
-
props: {
|
|
2099
|
-
label: 'scandoc.form.profile.address.street',
|
|
2100
|
-
},
|
|
2101
|
-
},
|
|
2102
|
-
],
|
|
2103
|
-
},
|
|
2104
|
-
],
|
|
2105
|
-
},
|
|
2106
|
-
],
|
|
2107
|
-
},
|
|
2108
|
-
].map((item) => this.translate.forms(item));
|
|
2109
|
-
}
|
|
2110
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocFieldsProvider, deps: [{ token: NgxScanDocTranslationProvider }, { token: ScanProvider }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2111
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocFieldsProvider, providedIn: 'root' }); }
|
|
2112
|
-
}
|
|
2113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocFieldsProvider, decorators: [{
|
|
2114
|
-
type: Injectable,
|
|
2115
|
-
args: [{
|
|
2116
|
-
providedIn: 'root',
|
|
2117
|
-
}]
|
|
2118
|
-
}], ctorParameters: () => [{ type: NgxScanDocTranslationProvider }, { type: ScanProvider }] });
|
|
2119
|
-
|
|
2120
|
-
class ScanResultsComponent extends BaseComponent {
|
|
2121
|
-
constructor(cameraProvider, formProvider, provider, cd, zone) {
|
|
2122
|
-
super();
|
|
2123
|
-
this.cameraProvider = cameraProvider;
|
|
2124
|
-
this.formProvider = formProvider;
|
|
2125
|
-
this.provider = provider;
|
|
2126
|
-
this.cd = cd;
|
|
2127
|
-
this.zone = zone;
|
|
2128
|
-
this.action = new EventEmitter();
|
|
2129
|
-
}
|
|
2130
|
-
ngOnInit() {
|
|
2131
|
-
console.time('fields');
|
|
2132
|
-
this.fields = this.formProvider.document();
|
|
2133
|
-
console.timeEnd('fields');
|
|
2134
|
-
this.__subs(this.data).subscribe((resp) => {
|
|
2135
|
-
this.zone.run(() => {
|
|
2136
|
-
switch (resp.type) {
|
|
2137
|
-
case 'avatar':
|
|
2138
|
-
this.model._avatar = resp.data;
|
|
2139
|
-
this.form = new FormGroup({});
|
|
2140
|
-
console.log(this.model);
|
|
2141
|
-
break;
|
|
2142
|
-
case 'model':
|
|
2143
|
-
this.model = resp.data;
|
|
2144
|
-
break;
|
|
2145
|
-
}
|
|
2146
|
-
console.timeEnd('results');
|
|
2147
|
-
this.cd.detectChanges();
|
|
2148
|
-
});
|
|
2149
|
-
});
|
|
2150
|
-
}
|
|
2151
|
-
ngOnDestroy() {
|
|
2152
|
-
this.__destroy();
|
|
2153
|
-
}
|
|
2154
|
-
selfie() {
|
|
2155
|
-
this.action.emit({ selfie: true });
|
|
2156
|
-
}
|
|
2157
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanResultsComponent, deps: [{ token: NgxScandocCameraProvider }, { token: NgxScandocFieldsProvider }, { token: ScanProvider }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2158
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ScanResultsComponent, isStandalone: false, selector: "ngx-scan-results", inputs: { data: "data", images: "images", form: "form" }, outputs: { action: "action" }, usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"model\" class=\"wraper\">\n <div style=\"flex: 1\">\n\n\n <form class=\"py-0 w-100-p\" [formGroup]=\"form\">\n <formly-form fxFlex [form]=\"form\" [fields]=\"fields\" [model]=\"model\">\n </formly-form>\n </form>\n </div>\n <div style=\"flex: 1\" >\n <mat-card appearance=\"outlined\" style=\"margin:0px 4px; padding: 16px\" class=\"images\">\n <h3>{{ \"scandoc.result.images\" | translate }}</h3>\n <ng-container *ngFor=\"let img of model.images\">\n <div fxLayout=\"column\">\n <ng-container *ngIf=\"img.side === 0\">\n <div class=\"title\">\n {{ \"scandoc.result.frontSide\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"img.side === 1\">\n <div class=\"title\">{{ \"scandoc.result.backSide\" | translate }}</div>\n </ng-container>\n <img\n class=\"preview\"\n style=\"max-width: 460px; border-radius: 1rem\"\n [src]=\"img.data\"\n />\n </div>\n </ng-container>\n </mat-card>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;overflow-y:auto;overflow-x:hidden}.images .title{padding:8px 0;font-weight:600}.images img{margin-bottom:16px;width:100%}.wraper{padding:4px;flex:1;display:flex;flex-direction:row}mat-card{box-shadow:none!important}.selfieContainer{display:flex;flex-direction:row;align-items:center}.selfieContainer .selfie{width:150px}.selfieContainer .selfie .preview{width:120px;height:120px;border-radius:80px}.selfieContainer .button{box-shadow:none;border:1px solid rgba(0,0,0,.1)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i6.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i7.LegacyFormlyForm, selector: "formly-form" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
2159
|
-
}
|
|
2160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanResultsComponent, decorators: [{
|
|
2161
|
-
type: Component,
|
|
2162
|
-
args: [{ selector: 'ngx-scan-results', standalone: false, template: "<div *ngIf=\"model\" class=\"wraper\">\n <div style=\"flex: 1\">\n\n\n <form class=\"py-0 w-100-p\" [formGroup]=\"form\">\n <formly-form fxFlex [form]=\"form\" [fields]=\"fields\" [model]=\"model\">\n </formly-form>\n </form>\n </div>\n <div style=\"flex: 1\" >\n <mat-card appearance=\"outlined\" style=\"margin:0px 4px; padding: 16px\" class=\"images\">\n <h3>{{ \"scandoc.result.images\" | translate }}</h3>\n <ng-container *ngFor=\"let img of model.images\">\n <div fxLayout=\"column\">\n <ng-container *ngIf=\"img.side === 0\">\n <div class=\"title\">\n {{ \"scandoc.result.frontSide\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"img.side === 1\">\n <div class=\"title\">{{ \"scandoc.result.backSide\" | translate }}</div>\n </ng-container>\n <img\n class=\"preview\"\n style=\"max-width: 460px; border-radius: 1rem\"\n [src]=\"img.data\"\n />\n </div>\n </ng-container>\n </mat-card>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;overflow-y:auto;overflow-x:hidden}.images .title{padding:8px 0;font-weight:600}.images img{margin-bottom:16px;width:100%}.wraper{padding:4px;flex:1;display:flex;flex-direction:row}mat-card{box-shadow:none!important}.selfieContainer{display:flex;flex-direction:row;align-items:center}.selfieContainer .selfie{width:150px}.selfieContainer .selfie .preview{width:120px;height:120px;border-radius:80px}.selfieContainer .button{box-shadow:none;border:1px solid rgba(0,0,0,.1)}\n"] }]
|
|
2163
|
-
}], ctorParameters: () => [{ type: NgxScandocCameraProvider }, { type: NgxScandocFieldsProvider }, { type: ScanProvider }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { data: [{
|
|
2164
|
-
type: Input
|
|
2165
|
-
}], images: [{
|
|
2166
|
-
type: Input
|
|
2167
|
-
}], form: [{
|
|
2168
|
-
type: Input
|
|
2169
|
-
}], action: [{
|
|
2170
|
-
type: Output
|
|
2171
|
-
}] } });
|
|
2172
|
-
|
|
2173
|
-
class ManualScanComponent extends BaseComponent {
|
|
2174
|
-
get class() {
|
|
2175
|
-
return this.isMobile;
|
|
2176
|
-
}
|
|
2177
|
-
onResize() {
|
|
2178
|
-
if (this.wraper) {
|
|
2179
|
-
this.width = this.wraper.nativeElement.clientWidth;
|
|
2180
|
-
this.height = this.wraper.nativeElement.clientHeight;
|
|
2181
|
-
setTimeout(() => {
|
|
2182
|
-
const video = this.wraper?.nativeElement.querySelector('video');
|
|
2183
|
-
if (video) {
|
|
2184
|
-
// console.log(video.clientWidth, video.clientHeight);
|
|
2185
|
-
this.videoWidth = video.clientWidth;
|
|
2186
|
-
this.videoHeight = video.clientHeight;
|
|
2187
|
-
}
|
|
2188
|
-
this.cd.detectChanges();
|
|
2189
|
-
}, 100);
|
|
2190
|
-
this.cd.detectChanges();
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
constructor(cameraProvider, cd, layoutProvider, zone) {
|
|
2194
|
-
super();
|
|
2195
|
-
this.cameraProvider = cameraProvider;
|
|
2196
|
-
this.cd = cd;
|
|
2197
|
-
this.layoutProvider = layoutProvider;
|
|
2198
|
-
this.zone = zone;
|
|
2199
|
-
this.action = new EventEmitter();
|
|
2200
|
-
this.videoOptions = {
|
|
2201
|
-
width: 1920,
|
|
2202
|
-
height: 1080,
|
|
2203
|
-
facingMode: 'environment',
|
|
2204
|
-
};
|
|
2205
|
-
this.cameraReady = false;
|
|
2206
|
-
this.scanBlastData = [
|
|
2207
|
-
{
|
|
2208
|
-
title: 'scandoc.front',
|
|
2209
|
-
description: 'scandoc.frontDescription',
|
|
2210
|
-
side: 'FRONT',
|
|
2211
|
-
},
|
|
2212
|
-
{
|
|
2213
|
-
title: 'scandoc.back',
|
|
2214
|
-
description: 'scandoc.backDescription',
|
|
2215
|
-
disabled: true,
|
|
2216
|
-
side: 'BACK',
|
|
2217
|
-
},
|
|
2218
|
-
];
|
|
2219
|
-
this.error = false;
|
|
2220
|
-
this.scaning = false;
|
|
2221
|
-
this.documentTypeSelected = false;
|
|
2222
|
-
this.preview = null;
|
|
2223
|
-
this.scanDatas = [];
|
|
2224
|
-
this.trigger = new Subject();
|
|
2225
|
-
// switch to next / previous / specific webcam; true/false: forward/backwards, string: deviceId
|
|
2226
|
-
this.nextWebcam = new Subject();
|
|
2227
|
-
this.isMobile = false;
|
|
2228
|
-
}
|
|
2229
|
-
ngOnInit() {
|
|
2230
|
-
this.__subs(this.layoutProvider.breakpoint$).subscribe((v) => {
|
|
2231
|
-
this.zone.run(() => {
|
|
2232
|
-
this.isMobile = !v.matches;
|
|
2233
|
-
setTimeout(() => {
|
|
2234
|
-
console.log('WTF');
|
|
2235
|
-
this.cd.detectChanges();
|
|
2236
|
-
}, 200);
|
|
2237
|
-
});
|
|
2238
|
-
console.log('MNOBILE', this.isMobile);
|
|
2239
|
-
});
|
|
2240
|
-
}
|
|
2241
|
-
get nextWebcamObservable() {
|
|
2242
|
-
return this.nextWebcam.asObservable();
|
|
2243
|
-
}
|
|
2244
|
-
cameraWasSwitched(deviceId) {
|
|
2245
|
-
console.log('[active device]', deviceId);
|
|
2246
|
-
// this.deviceId = deviceId;
|
|
2247
|
-
// this.cameraReady = true;
|
|
2248
|
-
// this.defaultDevice = deviceId;
|
|
2249
|
-
setTimeout(() => {
|
|
2250
|
-
this.onResize();
|
|
2251
|
-
// this.scan();
|
|
2252
|
-
}, 300);
|
|
2253
|
-
}
|
|
2254
|
-
handleInitError(error) {
|
|
2255
|
-
console.log(error);
|
|
2256
|
-
}
|
|
2257
|
-
resolutionLimit(file) {
|
|
2258
|
-
const minWidth = 1280;
|
|
2259
|
-
const minHeight = 720;
|
|
2260
|
-
return new Observable((observer) => {
|
|
2261
|
-
const img = new Image();
|
|
2262
|
-
img.src = window.URL.createObjectURL(file);
|
|
2263
|
-
img.onload = () => {
|
|
2264
|
-
const width = img.naturalWidth;
|
|
2265
|
-
const height = img.naturalHeight;
|
|
2266
|
-
let valid = false;
|
|
2267
|
-
if (width > height) {
|
|
2268
|
-
valid = width >= minWidth && height >= minHeight;
|
|
2269
|
-
}
|
|
2270
|
-
else {
|
|
2271
|
-
valid = width >= minHeight && height >= minWidth;
|
|
2272
|
-
}
|
|
2273
|
-
observer.next(valid);
|
|
2274
|
-
};
|
|
2275
|
-
img.onerror = (error) => {
|
|
2276
|
-
observer.error(error);
|
|
2277
|
-
};
|
|
2278
|
-
});
|
|
2279
|
-
}
|
|
2280
|
-
getImgBase64(num) {
|
|
2281
|
-
return this.scanBlastData[num].image.dataUrl.split(',')[1];
|
|
2282
|
-
}
|
|
2283
|
-
getBase64(file) {
|
|
2284
|
-
return new Observable((observer) => {
|
|
2285
|
-
const reader = new FileReader();
|
|
2286
|
-
reader.readAsDataURL(file);
|
|
2287
|
-
reader.onload = () => {
|
|
2288
|
-
observer.next(reader.result);
|
|
2289
|
-
};
|
|
2290
|
-
reader.onerror = (error) => {
|
|
2291
|
-
observer.error(error);
|
|
2292
|
-
};
|
|
2293
|
-
});
|
|
2294
|
-
}
|
|
2295
|
-
handleFileInput(target, event, side) {
|
|
2296
|
-
const files = target.files;
|
|
2297
|
-
this.selectedSide = side;
|
|
2298
|
-
console.log(files);
|
|
2299
|
-
const file = files.item(0);
|
|
2300
|
-
this.resolutionLimit(file)
|
|
2301
|
-
.pipe(switchMap$1((valid) => {
|
|
2302
|
-
return valid ? this.getBase64(file) : of(false);
|
|
2303
|
-
}))
|
|
2304
|
-
.subscribe((imageAsDataUrl) => {
|
|
2305
|
-
// console.log(imageAsDataUrl);
|
|
2306
|
-
event.target.value = null;
|
|
2307
|
-
if (!imageAsDataUrl) {
|
|
2308
|
-
console.warn('MIN RES');
|
|
2309
|
-
// this.dialogs.alert(
|
|
2310
|
-
// 'core.page.error',
|
|
2311
|
-
// this.translate.instant(
|
|
2312
|
-
// 'pms.dialogs.components.scanProfile.minResolution'
|
|
2313
|
-
// )
|
|
2314
|
-
// );
|
|
2315
|
-
}
|
|
2316
|
-
else {
|
|
2317
|
-
side.image = {
|
|
2318
|
-
_imageAsDataUrl: imageAsDataUrl,
|
|
2319
|
-
imageAsDataUrl: imageAsDataUrl,
|
|
2320
|
-
};
|
|
2321
|
-
if (this.selectedSide.side === 'FRONT') {
|
|
2322
|
-
this.scanBlastData[1].disabled = false;
|
|
2323
|
-
}
|
|
2324
|
-
}
|
|
2325
|
-
this.cd.detectChanges();
|
|
2326
|
-
});
|
|
2327
|
-
}
|
|
2328
|
-
cameraOff(ev) { }
|
|
2329
|
-
ngOnDestroy() { }
|
|
2330
|
-
singleScan(side) {
|
|
2331
|
-
this.scanType = side.side;
|
|
2332
|
-
this.preview = null;
|
|
2333
|
-
this.selectedSide = side;
|
|
2334
|
-
this.selectedSide.image = null;
|
|
2335
|
-
this.documentTypeSelected = true;
|
|
2336
|
-
this.scanBlastData[1].disabled = false;
|
|
2337
|
-
this.cameraProvider.$showSwitch.next(true);
|
|
2338
|
-
this.cd.detectChanges();
|
|
2339
|
-
setTimeout(() => {
|
|
2340
|
-
this.onResize();
|
|
2341
|
-
}, 10);
|
|
2342
|
-
}
|
|
2343
|
-
scanBlastFinish() {
|
|
2344
|
-
this.action.emit(this.scanBlastData);
|
|
2345
|
-
}
|
|
2346
|
-
get scanBlastCanUpload() {
|
|
2347
|
-
return this.scanBlastData[0].image ? true : false;
|
|
2348
|
-
}
|
|
2349
|
-
handleImage(webcamImage) {
|
|
2350
|
-
console.log('[received webcam image]', webcamImage);
|
|
2351
|
-
this.webcamImage = webcamImage;
|
|
2352
|
-
this.preview = webcamImage.imageAsDataUrl;
|
|
2353
|
-
this.cameraProvider.$showSwitch.next(false);
|
|
2354
|
-
this.cd.detectChanges();
|
|
2355
|
-
}
|
|
2356
|
-
continue() {
|
|
2357
|
-
this.documentTypeSelected = false;
|
|
2358
|
-
setTimeout(() => {
|
|
2359
|
-
this.selectedSide.image = this.webcamImage;
|
|
2360
|
-
if (this.selectedSide.side === 'FRONT') {
|
|
2361
|
-
this.scanBlastData[1].disabled = false;
|
|
2362
|
-
}
|
|
2363
|
-
this.cd.detectChanges();
|
|
2364
|
-
}, 200);
|
|
2365
|
-
}
|
|
2366
|
-
retry() {
|
|
2367
|
-
this.preview = false;
|
|
2368
|
-
this.cameraProvider.$showSwitch.next(true);
|
|
2369
|
-
// this.result = false;
|
|
2370
|
-
if (this.error) {
|
|
2371
|
-
this.documentTypeSelected = false;
|
|
2372
|
-
this.scanBlastData.forEach((element) => {
|
|
2373
|
-
element.image = null;
|
|
2374
|
-
});
|
|
2375
|
-
}
|
|
2376
|
-
this.error = false;
|
|
2377
|
-
}
|
|
2378
|
-
triggerSnapshot() {
|
|
2379
|
-
this.trigger.next(0);
|
|
2380
|
-
}
|
|
2381
|
-
scan() {
|
|
2382
|
-
console.log('SCAN');
|
|
2383
|
-
this.triggerSnapshot();
|
|
2384
|
-
this.scanDatas[0] = true;
|
|
2385
|
-
console.log(this.cameraProvider);
|
|
2386
|
-
this.cd.detectChanges();
|
|
2387
|
-
}
|
|
2388
|
-
rotateBase64Image(base64data) {
|
|
2389
|
-
return new Observable((observer) => {
|
|
2390
|
-
const canvas = document.createElement('canvas');
|
|
2391
|
-
const ctx = canvas.getContext('2d');
|
|
2392
|
-
var image = new Image();
|
|
2393
|
-
image.src = base64data;
|
|
2394
|
-
image.onload = () => {
|
|
2395
|
-
console.log(canvas);
|
|
2396
|
-
canvas.width = image.height;
|
|
2397
|
-
canvas.height = image.width;
|
|
2398
|
-
if (ctx) {
|
|
2399
|
-
ctx.rotate((90 * Math.PI) / 180);
|
|
2400
|
-
ctx.translate(0, -canvas.width);
|
|
2401
|
-
ctx.drawImage(image, 0, 0);
|
|
2402
|
-
observer.next(canvas.toDataURL());
|
|
2403
|
-
}
|
|
2404
|
-
else {
|
|
2405
|
-
observer.error({ type: 'generic error' });
|
|
2406
|
-
}
|
|
2407
|
-
};
|
|
2408
|
-
image.onerror = (e) => {
|
|
2409
|
-
observer.error(e);
|
|
2410
|
-
};
|
|
2411
|
-
});
|
|
2412
|
-
}
|
|
2413
|
-
singleScanRotate(side) {
|
|
2414
|
-
console.log(side);
|
|
2415
|
-
this.rotateBase64Image(side.image.imageAsDataUrl).subscribe((data) => {
|
|
2416
|
-
side.image = { imageAsDataUrl: data };
|
|
2417
|
-
this.cd.detectChanges();
|
|
2418
|
-
});
|
|
2419
|
-
}
|
|
2420
|
-
videoReady(event) {
|
|
2421
|
-
console.log('READY', event);
|
|
2422
|
-
this.cameraReady = event;
|
|
2423
|
-
}
|
|
2424
|
-
singleScanRemove(side) {
|
|
2425
|
-
side.image = null;
|
|
2426
|
-
if (side.side === 'FRONT') {
|
|
2427
|
-
this.scanBlastData[1].disabled = true;
|
|
2428
|
-
}
|
|
2429
|
-
this.cd.detectChanges();
|
|
2430
|
-
}
|
|
2431
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ManualScanComponent, deps: [{ token: NgxScandocCameraProvider }, { token: i0.ChangeDetectorRef }, { token: LayoutProvider }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2432
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ManualScanComponent, isStandalone: false, selector: "ngx-manual-scan", outputs: { action: "action" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class.mobile": "this.class" } }, viewQueries: [{ propertyName: "wraper", first: true, predicate: ["wraper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\n\n<ng-container *ngIf=\"!result\">\n\n<ng-container *ngIf=\"!documentTypeSelected\">\n <section\n class=\"scanBlastWraper\"\n ngClass.lt-md=\"mobile\"\n fxFlex\n fxLayout=\"column\"\n >\n <div class=\"scanBlast\" fxFlex fxLayout.lt-md=\"column\" fxLayout=\"row\">\n <mat-card\n appearance=\"outlined\"\n style=\"display: flex; flex-direction: column\"\n fxLayout=\"column\"\n *ngFor=\"let side of scanBlastData\"\n >\n <div ngClass.lt-sm=\"small\" class=\"head\">\n <div class=\"title\" fxFlex>{{ side.title | translate }}</div>\n </div>\n <div class=\"actions\" style=\"display: flex; flex-direction: row\">\n <button\n (click)=\"singleScan(side)\"\n [disabled]=\"side.disabled\"\n style=\"margin-right: 4px\"\n mat-raised-button\n >\n <div class=\"buttonWrap\">\n <mat-icon>camera</mat-icon>\n <div>\n {{ \"scandoc.scanCamera\" | translate }}\n </div>\n </div>\n </button>\n <button\n (click)=\"file.click()\"\n [disabled]=\"side.disabled\"\n style=\"margin-left: 4px\"\n mat-raised-button\n >\n <input\n accept=\"image/*\"\n type=\"file\"\n style=\"display: none\"\n (change)=\"handleFileInput($event.target, $event, side)\"\n #file\n />\n <div class=\"buttonWrap\">\n <mat-icon>file_upload</mat-icon>\n <div>\n {{ \"scandoc.useFromDisk\" | translate }}\n </div>\n </div>\n </button>\n </div>\n <div class=\"content\" style=\"display: flex\">\n <div style=\"flex: 1\" class=\"previewPlaceholder\">\n <div class=\"description\">\n <ng-container *ngIf=\"side.image\">\n <div class=\"imgWrap\">\n <div\n style=\"flex: 1\"\n class=\"image\"\n [style.background-image]=\"\n 'url(' + side.image.imageAsDataUrl + ')'\n \"\n ></div>\n\n <div\n class=\"btnActions\"\n fxLayout.lt-md=\"column\"\n fxLayout=\"row\"\n style=\"display: flex; flex-direction: row\"\n >\n <button\n (click)=\"singleScanRemove(side)\"\n class=\"mr-4 remButton flex\"\n mat-raised-button\n >\n <div class=\"buttonWrap\">\n <mat-icon>delete</mat-icon>\n <div class=\"label\">\n {{ \"scandoc.remove\" | translate }}\n </div>\n </div>\n </button>\n <button\n class=\"ml-4 rotateButton flex\"\n mat-raised-button\n (click)=\"singleScanRotate(side)\"\n >\n <div class=\"buttonWrap\">\n <mat-icon>rotate_90_degrees_cw</mat-icon>\n <div class=\"label\">\n {{ \"scandoc.rotate\" | translate }}\n </div>\n </div>\n </button>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!side.image\">\n <div class=\"empty\">\n {{ side.description | translate }}\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </mat-card>\n </div>\n <footer>\n <div\n class=\"px-8 pb-8\"\n style=\"padding: 0px 8px 8px 8px; display: flex; flex-direction: row\"\n >\n <button\n (click)=\"scanBlastFinish()\"\n [disabled]=\"!scanBlastCanUpload\"\n style=\"flex: 1\"\n mat-raised-button\n >\n {{ \"scandoc.upload\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<div\n style=\"position: relative; display: flex; flex-direction: column; flex: 1\"\n *ngIf=\"documentTypeSelected\"\n>\n <div\n style=\"display: flex; flex-direction: row; flex: 1\"\n #wraper\n class=\"wraper\"\n >\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 *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main flex\"\n\n #webcam\n [trigger]=\"trigger\"\n (imageCapture)=\"handleImage($event)\"\n(videoReady)=\"videoReady($event)\"\n (cameraSwitched)=\"cameraWasSwitched($event)\"\n (initError)=\"handleInitError($event)\"\n type=\"manual\"\n\n (destroyed)=\"cameraOff($event)\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n display: flex;\n flex-direction: row;\n flex: 1;\n z-index: 20;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"pms.dialogs.components.scanProfile.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ul>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.placeIdCloseToDevice\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.ensureSufficientLight\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.holdDocumentSteady\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.makeSureAllEdgesOfTheIdAreVisible\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.makeSureThereAreNoGlareAndShadowsOnTheId\"\n | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div\n class=\"scanPreview\"\n style=\"display: flex; flex-direction: column; flex: 1\"\n *ngIf=\"!error && !scaning\"\n >\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"pms.dialogs.components.scanProfile.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\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 fxLayout=\"row\" class=\"p-8\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n {{ displayInfo }}\n </div>\n <div style=\"height: 26px;\">\n <div style=\"text-align: center; font-size: 18px;\" *ngIf=\"idScan && !preview && cameraReady\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"pms.dialogs.components.scanProfile.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"pms.dialogs.components.scanProfile.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <button\n [disabled]=\"!cameraReady\"\n class=\"w-100-p\"\n *ngIf=\"!preview\"\n mat-raised-button\n (click)=\"scan()\"\n >\n <ng-container>\n <ng-container *ngIf=\"scanType === 'FRONT'\">{{\n \"scandoc.captureFront\" | translate\n }}</ng-container>\n <ng-container *ngIf=\"scanType === 'BACK'\">{{\n \"scandoc.captureBack\" | translate\n }}</ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"scanSide === 1\">{{\n \"pms.dialogs.components.scanProfile.captureBackOfId\" | translate\n }}</ng-container>\n </button>\n\n <div\n class=\"w-100-p\"\n *ngIf=\"preview\"\n style=\"display: flex; flex-direction: row; align-items: center; flex: 1\"\n >\n <button class=\"flex mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4 flex\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n</div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5}:host.mobile .buttonWrap div{font-size:11px!important}:host.mobile .scanBlastWraper .head{height:30px!important}:host.mobile .scanBlastWraper .head .title{font-size:12px!important}:host.mobile .scanBlastWraper .scanBlast{flex-direction:column}:host.mobile .scanBlastWraper mat-card{margin:4px!important}:host.mobile .scanBlastWraper .description{flex-direction:row!important}:host.mobile .scanBlastWraper .description .imgWrap{padding:0!important}:host.mobile .scanBlastWraper .description .btnActions{position:absolute;right:0}:host.mobile .scanBlastWraper .description button{margin:0!important;position:absolute;right:16px}:host.mobile .scanBlastWraper .description button.rotateButton{top:58px}:host.mobile .scanBlastWraper .description button.remButton{top:8px}:host.mobile .scanBlastWraper .description button mat-icon{margin:0!important}:host.mobile .scanBlastWraper .description button div.label{display:none}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}.debug{position:absolute;left:0;width:100%;height:80px;top:0;border-bottom:1px solid #ccc;background-color:#f8f8f8;display:flex;overflow:hidden;color:#000}.debug img{height:50px;border:1px solid #000}.displayInfo{text-align:center;height:20px;flex:1;position:absolute;width:100%;background-color:#000;height:30px;bottom:55px;left:0;line-height:30px;color:#fff;z-index:200}.element{margin-bottom:8px}.element label{font-size:14px}.element div{font-size:18px}.wraper{position:relative;overflow:hidden}.preview{width:100%;border-radius:1%}.documentTypeWraper{width:400px}.documentTypeWraper .label{font-size:14px;margin-bottom:20px}.documentTypeWraper button{box-shadow:none}.overPane{position:absolute;width:100%;height:100%;top:0;left:0}.overPane app-webcam{clip-path:url(#myClip)}.subhead{height:55px;padding-top:8px}.rectangle{z-index:2;position:absolute;top:50%;left:50%;width:85.6mm;height:53.98mm;transform:translate(-50%,-50%);box-sizing:border-box;border:2px dashed #459be5;border-radius:3mm}.mask{z-index:1;position:absolute;width:100%;height:100%;background-position:center center;background-size:380mm;background-repeat:no-repeat}.label{font-size:11px;margin-top:4px}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}h4{font-size:16px}.images .title{padding:8px 0;font-weight:600}.images img{margin-bottom:16px}.error .title{font-size:22px}.error ul{font-size:18px}.photo{width:120px;height:120px;overflow:hidden}.signature{width:200px}mat-card{box-shadow:none!important}.scanBlastWraper{overflow:hidden;display:flex;flex-direction:column;flex:1}.scanBlastWraper button{text-transform:uppercase;overflow:hidden}.scanBlastWraper .buttonWrap{display:flex;flex-direction:row;align-items:center;justify-content:center}.scanBlast{display:flex;flex-direction:row;flex:1;padding:0 4px}.scanBlast mat-card{padding:0;box-shadow:none;margin:8px 4px;flex:1}.scanBlast mat-card .head{display:flex;flex-direction:row;align-items:center;justify-items:center;border-bottom:1px solid rgba(0,0,0,.12);height:60px;padding:8px}.scanBlast mat-card .head.small{height:30px!important;padding:4px 8px!important}.scanBlast mat-card .head.small .title{font-size:12px!important;margin-left:4px!important}.scanBlast mat-card .head button{max-width:120px;height:40px;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.scanBlast mat-card .head .title{margin-left:16px;color:#459ae5;font-size:16px}.scanBlast mat-card .content{margin:8px;flex:1}.scanBlast mat-card .description{text-align:center;color:#888}.scanBlast mat-card .actions{background-color:#e9e9e9;display:flex;flex-direction:row}.scanBlast mat-card .actions .mat-button-disabled{background-color:#fff!important}.scanBlast mat-card .actions button{box-shadow:none;width:50%;margin:8px;height:40px;font-size:12px}.scanBlast mat-card .actions button mat-icon{margin-right:8px}.scanBlast mat-card .previewPlaceholder{flex:1;border-radius:6px;display:flex;flex-direction:column}.scanBlast mat-card .previewPlaceholder .description{display:flex;flex:1;flex-direction:column;justify-content:center}.scanBlast mat-card .previewPlaceholder button{box-shadow:none;margin-top:8px;height:40px;font-size:12px}.scanBlast mat-card .previewPlaceholder button mat-icon{margin-right:8px}.scanBlast mat-card .previewPlaceholder .imgWrap{flex-direction:column;flex:1;display:flex;padding:8px;background-color:#f5f5f5;border-radius:4px}.scanBlast mat-card .previewPlaceholder .imgWrap img{width:100%;border-radius:4px}.scanBlast mat-card .previewPlaceholder .imgWrap .image{background-position:center;background-repeat:no-repeat;background-size:contain}.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}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.result{display:flex;flex-direction:column}.result .wrap{overflow:auto;flex:1;display:flex;flex-direction:row}.result .wrap .panel{flex:1}.result .wrap form{display:flex;flex-direction:row;padding:0 16px;width:100%}.result .wrap form formly-form{flex:1}.flex{flex:1}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: ["imageHandler", "type", "trigger", "refresh"], outputs: ["cameraSwitched", "videoReady", "imageCapture", "initError"] }, { kind: "component", type: i6.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i5$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] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
2433
|
-
}
|
|
2434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ManualScanComponent, decorators: [{
|
|
2435
|
-
type: Component,
|
|
2436
|
-
args: [{ selector: 'ngx-manual-scan', standalone: false, template: "\n\n<ng-container *ngIf=\"!result\">\n\n<ng-container *ngIf=\"!documentTypeSelected\">\n <section\n class=\"scanBlastWraper\"\n ngClass.lt-md=\"mobile\"\n fxFlex\n fxLayout=\"column\"\n >\n <div class=\"scanBlast\" fxFlex fxLayout.lt-md=\"column\" fxLayout=\"row\">\n <mat-card\n appearance=\"outlined\"\n style=\"display: flex; flex-direction: column\"\n fxLayout=\"column\"\n *ngFor=\"let side of scanBlastData\"\n >\n <div ngClass.lt-sm=\"small\" class=\"head\">\n <div class=\"title\" fxFlex>{{ side.title | translate }}</div>\n </div>\n <div class=\"actions\" style=\"display: flex; flex-direction: row\">\n <button\n (click)=\"singleScan(side)\"\n [disabled]=\"side.disabled\"\n style=\"margin-right: 4px\"\n mat-raised-button\n >\n <div class=\"buttonWrap\">\n <mat-icon>camera</mat-icon>\n <div>\n {{ \"scandoc.scanCamera\" | translate }}\n </div>\n </div>\n </button>\n <button\n (click)=\"file.click()\"\n [disabled]=\"side.disabled\"\n style=\"margin-left: 4px\"\n mat-raised-button\n >\n <input\n accept=\"image/*\"\n type=\"file\"\n style=\"display: none\"\n (change)=\"handleFileInput($event.target, $event, side)\"\n #file\n />\n <div class=\"buttonWrap\">\n <mat-icon>file_upload</mat-icon>\n <div>\n {{ \"scandoc.useFromDisk\" | translate }}\n </div>\n </div>\n </button>\n </div>\n <div class=\"content\" style=\"display: flex\">\n <div style=\"flex: 1\" class=\"previewPlaceholder\">\n <div class=\"description\">\n <ng-container *ngIf=\"side.image\">\n <div class=\"imgWrap\">\n <div\n style=\"flex: 1\"\n class=\"image\"\n [style.background-image]=\"\n 'url(' + side.image.imageAsDataUrl + ')'\n \"\n ></div>\n\n <div\n class=\"btnActions\"\n fxLayout.lt-md=\"column\"\n fxLayout=\"row\"\n style=\"display: flex; flex-direction: row\"\n >\n <button\n (click)=\"singleScanRemove(side)\"\n class=\"mr-4 remButton flex\"\n mat-raised-button\n >\n <div class=\"buttonWrap\">\n <mat-icon>delete</mat-icon>\n <div class=\"label\">\n {{ \"scandoc.remove\" | translate }}\n </div>\n </div>\n </button>\n <button\n class=\"ml-4 rotateButton flex\"\n mat-raised-button\n (click)=\"singleScanRotate(side)\"\n >\n <div class=\"buttonWrap\">\n <mat-icon>rotate_90_degrees_cw</mat-icon>\n <div class=\"label\">\n {{ \"scandoc.rotate\" | translate }}\n </div>\n </div>\n </button>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!side.image\">\n <div class=\"empty\">\n {{ side.description | translate }}\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </mat-card>\n </div>\n <footer>\n <div\n class=\"px-8 pb-8\"\n style=\"padding: 0px 8px 8px 8px; display: flex; flex-direction: row\"\n >\n <button\n (click)=\"scanBlastFinish()\"\n [disabled]=\"!scanBlastCanUpload\"\n style=\"flex: 1\"\n mat-raised-button\n >\n {{ \"scandoc.upload\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<div\n style=\"position: relative; display: flex; flex-direction: column; flex: 1\"\n *ngIf=\"documentTypeSelected\"\n>\n <div\n style=\"display: flex; flex-direction: row; flex: 1\"\n #wraper\n class=\"wraper\"\n >\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 *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main flex\"\n\n #webcam\n [trigger]=\"trigger\"\n (imageCapture)=\"handleImage($event)\"\n(videoReady)=\"videoReady($event)\"\n (cameraSwitched)=\"cameraWasSwitched($event)\"\n (initError)=\"handleInitError($event)\"\n type=\"manual\"\n\n (destroyed)=\"cameraOff($event)\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n display: flex;\n flex-direction: row;\n flex: 1;\n z-index: 20;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"pms.dialogs.components.scanProfile.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ul>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.placeIdCloseToDevice\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.ensureSufficientLight\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.holdDocumentSteady\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.makeSureAllEdgesOfTheIdAreVisible\"\n | translate\n }}\n </li>\n <li>\n {{\n \"pms.dialogs.components.scanProfile.makeSureThereAreNoGlareAndShadowsOnTheId\"\n | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div\n class=\"scanPreview\"\n style=\"display: flex; flex-direction: column; flex: 1\"\n *ngIf=\"!error && !scaning\"\n >\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"pms.dialogs.components.scanProfile.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\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 fxLayout=\"row\" class=\"p-8\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n {{ displayInfo }}\n </div>\n <div style=\"height: 26px;\">\n <div style=\"text-align: center; font-size: 18px;\" *ngIf=\"idScan && !preview && cameraReady\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"pms.dialogs.components.scanProfile.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"pms.dialogs.components.scanProfile.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <button\n [disabled]=\"!cameraReady\"\n class=\"w-100-p\"\n *ngIf=\"!preview\"\n mat-raised-button\n (click)=\"scan()\"\n >\n <ng-container>\n <ng-container *ngIf=\"scanType === 'FRONT'\">{{\n \"scandoc.captureFront\" | translate\n }}</ng-container>\n <ng-container *ngIf=\"scanType === 'BACK'\">{{\n \"scandoc.captureBack\" | translate\n }}</ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"scanSide === 1\">{{\n \"pms.dialogs.components.scanProfile.captureBackOfId\" | translate\n }}</ng-container>\n </button>\n\n <div\n class=\"w-100-p\"\n *ngIf=\"preview\"\n style=\"display: flex; flex-direction: row; align-items: center; flex: 1\"\n >\n <button class=\"flex mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4 flex\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n</div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5}:host.mobile .buttonWrap div{font-size:11px!important}:host.mobile .scanBlastWraper .head{height:30px!important}:host.mobile .scanBlastWraper .head .title{font-size:12px!important}:host.mobile .scanBlastWraper .scanBlast{flex-direction:column}:host.mobile .scanBlastWraper mat-card{margin:4px!important}:host.mobile .scanBlastWraper .description{flex-direction:row!important}:host.mobile .scanBlastWraper .description .imgWrap{padding:0!important}:host.mobile .scanBlastWraper .description .btnActions{position:absolute;right:0}:host.mobile .scanBlastWraper .description button{margin:0!important;position:absolute;right:16px}:host.mobile .scanBlastWraper .description button.rotateButton{top:58px}:host.mobile .scanBlastWraper .description button.remButton{top:8px}:host.mobile .scanBlastWraper .description button mat-icon{margin:0!important}:host.mobile .scanBlastWraper .description button div.label{display:none}.page-header{display:flex;flex-direction:row;align-items:center}.page-header button{height:100%}.debug{position:absolute;left:0;width:100%;height:80px;top:0;border-bottom:1px solid #ccc;background-color:#f8f8f8;display:flex;overflow:hidden;color:#000}.debug img{height:50px;border:1px solid #000}.displayInfo{text-align:center;height:20px;flex:1;position:absolute;width:100%;background-color:#000;height:30px;bottom:55px;left:0;line-height:30px;color:#fff;z-index:200}.element{margin-bottom:8px}.element label{font-size:14px}.element div{font-size:18px}.wraper{position:relative;overflow:hidden}.preview{width:100%;border-radius:1%}.documentTypeWraper{width:400px}.documentTypeWraper .label{font-size:14px;margin-bottom:20px}.documentTypeWraper button{box-shadow:none}.overPane{position:absolute;width:100%;height:100%;top:0;left:0}.overPane app-webcam{clip-path:url(#myClip)}.subhead{height:55px;padding-top:8px}.rectangle{z-index:2;position:absolute;top:50%;left:50%;width:85.6mm;height:53.98mm;transform:translate(-50%,-50%);box-sizing:border-box;border:2px dashed #459be5;border-radius:3mm}.mask{z-index:1;position:absolute;width:100%;height:100%;background-position:center center;background-size:380mm;background-repeat:no-repeat}.label{font-size:11px;margin-top:4px}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}h4{font-size:16px}.images .title{padding:8px 0;font-weight:600}.images img{margin-bottom:16px}.error .title{font-size:22px}.error ul{font-size:18px}.photo{width:120px;height:120px;overflow:hidden}.signature{width:200px}mat-card{box-shadow:none!important}.scanBlastWraper{overflow:hidden;display:flex;flex-direction:column;flex:1}.scanBlastWraper button{text-transform:uppercase;overflow:hidden}.scanBlastWraper .buttonWrap{display:flex;flex-direction:row;align-items:center;justify-content:center}.scanBlast{display:flex;flex-direction:row;flex:1;padding:0 4px}.scanBlast mat-card{padding:0;box-shadow:none;margin:8px 4px;flex:1}.scanBlast mat-card .head{display:flex;flex-direction:row;align-items:center;justify-items:center;border-bottom:1px solid rgba(0,0,0,.12);height:60px;padding:8px}.scanBlast mat-card .head.small{height:30px!important;padding:4px 8px!important}.scanBlast mat-card .head.small .title{font-size:12px!important;margin-left:4px!important}.scanBlast mat-card .head button{max-width:120px;height:40px;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.scanBlast mat-card .head .title{margin-left:16px;color:#459ae5;font-size:16px}.scanBlast mat-card .content{margin:8px;flex:1}.scanBlast mat-card .description{text-align:center;color:#888}.scanBlast mat-card .actions{background-color:#e9e9e9;display:flex;flex-direction:row}.scanBlast mat-card .actions .mat-button-disabled{background-color:#fff!important}.scanBlast mat-card .actions button{box-shadow:none;width:50%;margin:8px;height:40px;font-size:12px}.scanBlast mat-card .actions button mat-icon{margin-right:8px}.scanBlast mat-card .previewPlaceholder{flex:1;border-radius:6px;display:flex;flex-direction:column}.scanBlast mat-card .previewPlaceholder .description{display:flex;flex:1;flex-direction:column;justify-content:center}.scanBlast mat-card .previewPlaceholder button{box-shadow:none;margin-top:8px;height:40px;font-size:12px}.scanBlast mat-card .previewPlaceholder button mat-icon{margin-right:8px}.scanBlast mat-card .previewPlaceholder .imgWrap{flex-direction:column;flex:1;display:flex;padding:8px;background-color:#f5f5f5;border-radius:4px}.scanBlast mat-card .previewPlaceholder .imgWrap img{width:100%;border-radius:4px}.scanBlast mat-card .previewPlaceholder .imgWrap .image{background-position:center;background-repeat:no-repeat;background-size:contain}.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}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.result{display:flex;flex-direction:column}.result .wrap{overflow:auto;flex:1;display:flex;flex-direction:row}.result .wrap .panel{flex:1}.result .wrap form{display:flex;flex-direction:row;padding:0 16px;width:100%}.result .wrap form formly-form{flex:1}.flex{flex:1}\n"] }]
|
|
2437
|
-
}], ctorParameters: () => [{ type: NgxScandocCameraProvider }, { type: i0.ChangeDetectorRef }, { type: LayoutProvider }, { type: i0.NgZone }], propDecorators: { action: [{
|
|
2438
|
-
type: Output
|
|
2439
|
-
}], wraper: [{
|
|
2440
|
-
type: ViewChild,
|
|
2441
|
-
args: ['wraper']
|
|
2442
|
-
}], class: [{
|
|
2443
|
-
type: HostBinding,
|
|
2444
|
-
args: ['class.mobile']
|
|
2445
|
-
}], onResize: [{
|
|
2446
|
-
type: HostListener,
|
|
2447
|
-
args: ['window:resize', ['$event']]
|
|
2448
|
-
}] } });
|
|
2449
|
-
|
|
2450
|
-
class ScanComponent extends BaseComponent {
|
|
2451
|
-
get class() {
|
|
2452
|
-
return this.isMobile;
|
|
2453
|
-
}
|
|
2454
|
-
onResize() {
|
|
2455
|
-
if (this.result) {
|
|
2456
|
-
this.cd.detectChanges();
|
|
2457
|
-
}
|
|
2458
|
-
}
|
|
2459
|
-
constructor(cd, zone, cameraProvider, injector, layoutProvider, platform, deviceService, auth) {
|
|
2460
|
-
super();
|
|
2461
|
-
this.cd = cd;
|
|
2462
|
-
this.zone = zone;
|
|
2463
|
-
this.cameraProvider = cameraProvider;
|
|
2464
|
-
this.injector = injector;
|
|
2465
|
-
this.layoutProvider = layoutProvider;
|
|
2466
|
-
this.platform = platform;
|
|
2467
|
-
this.deviceService = deviceService;
|
|
2468
|
-
this.auth = auth;
|
|
2469
|
-
this.scanBlastData = [
|
|
2470
|
-
{
|
|
2471
|
-
title: 'pms.dialogs.components.scanProfile.front',
|
|
2472
|
-
description: 'pms.dialogs.components.scanProfile.frontDescription',
|
|
2473
|
-
side: 'FRONT',
|
|
2474
|
-
},
|
|
2475
|
-
{
|
|
2476
|
-
title: 'pms.dialogs.components.scanProfile.back',
|
|
2477
|
-
description: 'pms.dialogs.components.scanProfile.backDescription',
|
|
2478
|
-
disabled: true,
|
|
2479
|
-
side: 'BACK',
|
|
2480
|
-
},
|
|
2481
|
-
];
|
|
2482
|
-
this.type = 'desktop';
|
|
2483
|
-
this.actions = new EventEmitter();
|
|
2484
|
-
this.scanResults = new Subject();
|
|
2485
|
-
this.scanSecondSide = false;
|
|
2486
|
-
this.startTime = 0;
|
|
2487
|
-
this.scanInProgress = false;
|
|
2488
|
-
// webcam snapshot trigger
|
|
2489
|
-
this.documentTypeSelected = false;
|
|
2490
|
-
this.preview = null;
|
|
2491
|
-
this.errorCode = '1000';
|
|
2492
|
-
this.displayInfo = 'scandoc.info.position';
|
|
2493
|
-
this.verificationErrorSent = false;
|
|
2494
|
-
this.error = false;
|
|
2495
|
-
this.cameraReady = false;
|
|
2496
|
-
this.scaning = false;
|
|
2497
|
-
this.promptManual = false;
|
|
2498
|
-
this.imageHandler = new Subject();
|
|
2499
|
-
this.manualDataSet = false;
|
|
2500
|
-
this.logData = {
|
|
2501
|
-
AcceptTermsAndConditions: true,
|
|
2502
|
-
Request: null,
|
|
2503
|
-
Response: null,
|
|
2504
|
-
ExpectedOutput: null,
|
|
2505
|
-
};
|
|
2506
|
-
this.scanDatas = [];
|
|
2507
|
-
this.idScan = null;
|
|
2508
|
-
this.validation = false;
|
|
2509
|
-
this.scannedImages = [];
|
|
2510
|
-
this.scanDelay = 0;
|
|
2511
|
-
this.trigger = new Subject();
|
|
2512
|
-
// switch to next / previous / specific webcam; true/false: forward/backwards, string: deviceId
|
|
2513
|
-
this.nextWebcam = new Subject();
|
|
2514
|
-
this.imageVerified = false;
|
|
2515
|
-
this.form = new FormGroup({});
|
|
2516
|
-
this.manual = false;
|
|
2517
|
-
this.isMobile = this.platform.IOS || this.platform.ANDROID;
|
|
2518
|
-
this.showDialog = false;
|
|
2519
|
-
this.scanImageTimestamps = {
|
|
2520
|
-
time: 0,
|
|
2521
|
-
load: 0,
|
|
2522
|
-
};
|
|
2523
|
-
this.numberOfValidations = 0;
|
|
2524
|
-
this.validationDebug = [];
|
|
2525
|
-
this.blurValues = [];
|
|
2526
|
-
this.scanProvider = this.injector.get(ScanProvider);
|
|
2527
|
-
if (!this.scanProvider.config.development) {
|
|
2528
|
-
// console = {
|
|
2529
|
-
// log: (...args: any) => {},
|
|
2530
|
-
// time: (...args: any) => {},
|
|
2531
|
-
// timeEnd: (...args: any) => {},
|
|
2532
|
-
// warn: (...args: any) => {},
|
|
2533
|
-
// error: (...args: any) => {},
|
|
2534
|
-
// };
|
|
1959
|
+
this.type = 'desktop';
|
|
1960
|
+
this.actions = new EventEmitter();
|
|
1961
|
+
this.scanResults = new Subject();
|
|
1962
|
+
this.scanSecondSide = false;
|
|
1963
|
+
this.startTime = 0;
|
|
1964
|
+
this.scanInProgress = false;
|
|
1965
|
+
// webcam snapshot trigger
|
|
1966
|
+
this.documentTypeSelected = false;
|
|
1967
|
+
this.preview = null;
|
|
1968
|
+
this.errorCode = '1000';
|
|
1969
|
+
this.displayInfo = 'scandoc.info.position';
|
|
1970
|
+
this.verificationErrorSent = false;
|
|
1971
|
+
this.error = false;
|
|
1972
|
+
this.cameraReady = false;
|
|
1973
|
+
this.scaning = false;
|
|
1974
|
+
this.promptManual = false;
|
|
1975
|
+
this.imageHandler = new Subject();
|
|
1976
|
+
this.manualDataSet = false;
|
|
1977
|
+
this.logData = {
|
|
1978
|
+
AcceptTermsAndConditions: true,
|
|
1979
|
+
Request: null,
|
|
1980
|
+
Response: null,
|
|
1981
|
+
ExpectedOutput: null,
|
|
1982
|
+
};
|
|
1983
|
+
this.scanDatas = [];
|
|
1984
|
+
this.idScan = null;
|
|
1985
|
+
this.validation = false;
|
|
1986
|
+
this.scannedImages = [];
|
|
1987
|
+
this.scanDelay = 0;
|
|
1988
|
+
this.trigger = new Subject();
|
|
1989
|
+
// switch to next / previous / specific webcam; true/false: forward/backwards, string: deviceId
|
|
1990
|
+
this.nextWebcam = new Subject();
|
|
1991
|
+
this.imageVerified = false;
|
|
1992
|
+
this.form = new FormGroup({});
|
|
1993
|
+
this.manual = false;
|
|
1994
|
+
this.isMobile = this.platform.IOS || this.platform.ANDROID;
|
|
1995
|
+
this.showDialog = false;
|
|
1996
|
+
this.scanImageTimestamps = {
|
|
1997
|
+
time: 0,
|
|
1998
|
+
load: 0,
|
|
1999
|
+
};
|
|
2000
|
+
this.numberOfValidations = 0;
|
|
2001
|
+
this.validationDebug = [];
|
|
2002
|
+
this.blurValues = [];
|
|
2003
|
+
this.scanProvider = this.injector.get(ScanProvider);
|
|
2004
|
+
if (!this.scanProvider.config.development) {
|
|
2005
|
+
// console = {
|
|
2006
|
+
// log: (...args: any) => {},
|
|
2007
|
+
// time: (...args: any) => {},
|
|
2008
|
+
// timeEnd: (...args: any) => {},
|
|
2009
|
+
// warn: (...args: any) => {},
|
|
2010
|
+
// error: (...args: any) => {},
|
|
2011
|
+
// };
|
|
2535
2012
|
}
|
|
2536
2013
|
}
|
|
2537
2014
|
resetLogData() {
|
|
@@ -3136,11 +2613,11 @@ class ScanComponent extends BaseComponent {
|
|
|
3136
2613
|
this.__destroy();
|
|
3137
2614
|
}
|
|
3138
2615
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: NgxScandocCameraProvider }, { token: i0.Injector }, { token: LayoutProvider }, { token: i2.Platform }, { token: i4$2.DeviceDetectorService }, { token: NgxScandocAuthProvider }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3139
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ScanComponent, isStandalone: false, selector: "ngx-scan", inputs: { type: "type", dialogs: "dialogs", refresh: "refresh", showDialog: "showDialog" }, outputs: { actions: "actions" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class.mobile": "this.class" } }, usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngIf=\"cameraProvider.rectPosition.t > 0 && displayInfo && !result && !manual\"\n>\n <div class=\"hint\" [ngStyle]=\"{ top: cameraProvider.hintPosition + 'px' }\">\n <span class=\"text\">\n {{ displayInfo | translate }}\n </span>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"showDialog\">\n <div class=\"pageTurn\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n </div>\n <footer>\n <button (click)=\"closeDialog()\" mat-raised-button>Ok</button>\n </footer>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"promptManual\">\n <div class=\"manualMode\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>screenshot</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n </div>\n <footer>\n <button\n style=\"margin-right: 8px\"\n (click)=\"manualSet(true)\"\n mat-raised-button\n >\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button\n style=\"margin-left: 8px\"\n (click)=\"manualSet(false)\"\n mat-raised-button\n >\n {{ \"scandoc.no\" | translate }}\n </button>\n </footer>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"result\">\n <section>\n <ngx-scan-results\n (action)=\"selfie()\"\n [form]=\"form\"\n [data]=\"scanResults\"\n ></ngx-scan-results>\n\n <footer>\n <div class=\"actions\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retake()\">\n {{ \"scandoc.reTake\" | translate }}\n </button>\n <button\n [disabled]=\"error || form.invalid\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"use()\"\n >\n {{ \"scandoc.useData\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<ng-container *ngIf=\"manual\">\n <section>\n <ngx-manual-scan (action)=\"manualScanData($event)\"></ngx-manual-scan>\n </section>\n</ng-container>\n<ng-container *ngIf=\"!result && documentTypeSelected && !manual\">\n <section>\n <div #wraper class=\"wraper\">\n <div class=\"loading\" *ngIf=\"(!cameraReady && !preview) || scaning\">\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main\"\n #webcam\n type=\"document\"\n [trigger]=\"trigger\"\n [imageHandler]=\"imageHandler\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (destroyed)=\"cameraOff($event)\"\n (videoReady)=\"videoReady($event)\"\n [refresh]=\"refresh\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n display: flex;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"scandoc.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ng-container *ngIf=\"errorCode === '1001'\">\n <div>\n {{ \"scandoc.extraction.c1001\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"errorCode === '1002'\">\n <div>\n {{ \"scandoc.extraction.c1002\" | translate }}\n </div>\n </ng-container>\n\n <ul *ngIf=\"errorCode === '1000'\">\n <li>\n {{ \"scandoc.placeIdCloseToDevice\" | translate }}\n </li>\n <li>\n {{ \"scandoc.ensureSufficientLight\" | translate }}\n </li>\n <li>\n {{ \"scandoc.holdDocumentSteady\" | translate }}\n </li>\n <li>\n {{ \"scandoc.makeSureAllEdgesOfTheIdAreVisible\" | translate }}\n </li>\n <li>\n {{\n \"scandoc.makeSureThereAreNoGlareAndShadowsOnTheId\" | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"scanPreview\" *ngIf=\"!error && !scaning\">\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"scandoc.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\n <div\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer *ngIf=\"preview\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n <ng-container *ngIf=\"displayInfo\">\n {{ displayInfo | translate }}\n </ng-container>\n </div> -->\n <!-- <div style=\"height: 26px\">\n <div\n style=\"text-align: center; font-size: 18px\"\n *ngIf=\"idScan && !preview && cameraReady\"\n >\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"scandoc.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"scandoc.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <div class=\"actions\" *ngIf=\"preview\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden;position:relative}:host.mobile .hint{font-size:13px}section{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.wraper{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:1}.wraper .loading{position:absolute;inset:0;z-index:20;background-color:#f5f5f5}.documentTurnOver{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.documentTurnOver mat-icon{width:200px;color:#fff;height:200px;font-size:100px}.displayInfo{text-align:center;flex:1;width:100%;background-color:#000;height:50px;display:flex;flex-direction:row;align-items:center;justify-content:center;color:#fff;z-index:200}.displayInfo.mobile{font-size:12px}.preview{width:100%;border-radius:1%}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}footer .actions{display:flex;flex-direction:row;align-items:center;padding:8px}footer .actions button{flex:1}.error{display:flex;align-items:center;justify-content:center;flex:1}.error .title{font-size:20px;margin-bottom:8px}.error .title mat-icon{margin-right:8px}.error ul{font-size:18px;list-style-type:none}mat-card{box-shadow:none!important}.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}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode .content{margin-top:20px;background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.manualMode .inner{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px}.manualMode .inner mat-icon{width:60px;height:60px;font-size:60px}.manualMode .inner .text{margin:20px 0}.manualMode footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.manualMode footer button{min-width:140px;box-shadow:none;border:1px solid #ccc}.pageTurn{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .content{background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.pageTurn .inner{display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .inner mat-icon{width:60px;height:60px;font-size:60px}.pageTurn .inner .text{margin:20px 0;font-size:14px}.pageTurn footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.pageTurn footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}.hint{position:absolute;z-index:5;font-size:18px;line-height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.hint .text{border-radius:3px;padding:4px 8px;background-color:#000;color:#fff;text-align:center;display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: ["imageHandler", "type", "trigger", "refresh"], outputs: ["cameraSwitched", "videoReady", "imageCapture", "initError"] }, { kind: "component", type: i5$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] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ScanResultsComponent, selector: "ngx-scan-results", inputs: ["data", "images", "form"], outputs: ["action"] }, { kind: "component", type: ManualScanComponent, selector: "ngx-manual-scan", outputs: ["action"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2616
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ScanComponent, isStandalone: false, selector: "ngx-scan", inputs: { type: "type", dialogs: "dialogs", refresh: "refresh", showDialog: "showDialog" }, outputs: { actions: "actions" }, host: { listeners: { "window:resize": "onResize($event)" }, properties: { "class.mobile": "this.class" } }, usesInheritance: true, ngImport: i0, template: "<ng-container\n *ngIf=\"cameraProvider.rectPosition.t > 0 && displayInfo && !result && !manual\"\n>\n <div class=\"hint\" [ngStyle]=\"{ top: cameraProvider.hintPosition + 'px' }\">\n <span class=\"text\">\n {{ displayInfo | translate }}\n </span>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"showDialog\">\n <div class=\"pageTurn\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n </div>\n <footer>\n <button (click)=\"closeDialog()\" mat-raised-button>Ok</button>\n </footer>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"promptManual\">\n <div class=\"manualMode\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>screenshot</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n </div>\n <footer>\n <button\n style=\"margin-right: 8px\"\n (click)=\"manualSet(true)\"\n mat-raised-button\n >\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button\n style=\"margin-left: 8px\"\n (click)=\"manualSet(false)\"\n mat-raised-button\n >\n {{ \"scandoc.no\" | translate }}\n </button>\n </footer>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"result\">\n <section>\n <!-- <ngx-scan-results\n (action)=\"selfie()\"\n [form]=\"form\"\n [data]=\"scanResults\"\n ></ngx-scan-results> -->\n\n hum\n\n <footer>\n <div class=\"actions\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retake()\">\n {{ \"scandoc.reTake\" | translate }}\n </button>\n <button\n [disabled]=\"error || form.invalid\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"use()\"\n >\n {{ \"scandoc.useData\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<ng-container *ngIf=\"manual\">\n <section>\n <ngx-manual-scan (action)=\"manualScanData($event)\"></ngx-manual-scan>\n </section>\n</ng-container>\n<ng-container *ngIf=\"!result && documentTypeSelected && !manual\">\n <section>\n <div #wraper class=\"wraper\">\n <div class=\"loading\" *ngIf=\"(!cameraReady && !preview) || scaning\">\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main\"\n #webcam\n type=\"document\"\n [trigger]=\"trigger\"\n [imageHandler]=\"imageHandler\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (destroyed)=\"cameraOff($event)\"\n (videoReady)=\"videoReady($event)\"\n [refresh]=\"refresh\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n display: flex;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"scandoc.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ng-container *ngIf=\"errorCode === '1001'\">\n <div>\n {{ \"scandoc.extraction.c1001\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"errorCode === '1002'\">\n <div>\n {{ \"scandoc.extraction.c1002\" | translate }}\n </div>\n </ng-container>\n\n <ul *ngIf=\"errorCode === '1000'\">\n <li>\n {{ \"scandoc.placeIdCloseToDevice\" | translate }}\n </li>\n <li>\n {{ \"scandoc.ensureSufficientLight\" | translate }}\n </li>\n <li>\n {{ \"scandoc.holdDocumentSteady\" | translate }}\n </li>\n <li>\n {{ \"scandoc.makeSureAllEdgesOfTheIdAreVisible\" | translate }}\n </li>\n <li>\n {{\n \"scandoc.makeSureThereAreNoGlareAndShadowsOnTheId\" | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"scanPreview\" *ngIf=\"!error && !scaning\">\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"scandoc.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\n <div\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer *ngIf=\"preview\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n <ng-container *ngIf=\"displayInfo\">\n {{ displayInfo | translate }}\n </ng-container>\n </div> -->\n <!-- <div style=\"height: 26px\">\n <div\n style=\"text-align: center; font-size: 18px\"\n *ngIf=\"idScan && !preview && cameraReady\"\n >\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"scandoc.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"scandoc.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <div class=\"actions\" *ngIf=\"preview\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden;position:relative}:host.mobile .hint{font-size:13px}section{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.wraper{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:1}.wraper .loading{position:absolute;inset:0;z-index:20;background-color:#f5f5f5}.documentTurnOver{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.documentTurnOver mat-icon{width:200px;color:#fff;height:200px;font-size:100px}.displayInfo{text-align:center;flex:1;width:100%;background-color:#000;height:50px;display:flex;flex-direction:row;align-items:center;justify-content:center;color:#fff;z-index:200}.displayInfo.mobile{font-size:12px}.preview{width:100%;border-radius:1%}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}footer .actions{display:flex;flex-direction:row;align-items:center;padding:8px}footer .actions button{flex:1}.error{display:flex;align-items:center;justify-content:center;flex:1}.error .title{font-size:20px;margin-bottom:8px}.error .title mat-icon{margin-right:8px}.error ul{font-size:18px;list-style-type:none}mat-card{box-shadow:none!important}.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}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode .content{margin-top:20px;background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.manualMode .inner{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px}.manualMode .inner mat-icon{width:60px;height:60px;font-size:60px}.manualMode .inner .text{margin:20px 0}.manualMode footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.manualMode footer button{min-width:140px;box-shadow:none;border:1px solid #ccc}.pageTurn{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .content{background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.pageTurn .inner{display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .inner mat-icon{width:60px;height:60px;font-size:60px}.pageTurn .inner .text{margin:20px 0;font-size:14px}.pageTurn footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.pageTurn footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}.hint{position:absolute;z-index:5;font-size:18px;line-height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.hint .text{border-radius:3px;padding:4px 8px;background-color:#000;color:#fff;text-align:center;display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: WebcamComponent, selector: "ngx-scandoc-webcam", inputs: ["imageHandler", "type", "trigger", "refresh"], outputs: ["cameraSwitched", "videoReady", "imageCapture", "initError"] }, { kind: "component", type: i5$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] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ManualScanComponent, selector: "ngx-manual-scan", outputs: ["action"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3140
2617
|
}
|
|
3141
2618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanComponent, decorators: [{
|
|
3142
2619
|
type: Component,
|
|
3143
|
-
args: [{ selector: 'ngx-scan', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-container\n *ngIf=\"cameraProvider.rectPosition.t > 0 && displayInfo && !result && !manual\"\n>\n <div class=\"hint\" [ngStyle]=\"{ top: cameraProvider.hintPosition + 'px' }\">\n <span class=\"text\">\n {{ displayInfo | translate }}\n </span>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"showDialog\">\n <div class=\"pageTurn\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n </div>\n <footer>\n <button (click)=\"closeDialog()\" mat-raised-button>Ok</button>\n </footer>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"promptManual\">\n <div class=\"manualMode\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>screenshot</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n </div>\n <footer>\n <button\n style=\"margin-right: 8px\"\n (click)=\"manualSet(true)\"\n mat-raised-button\n >\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button\n style=\"margin-left: 8px\"\n (click)=\"manualSet(false)\"\n mat-raised-button\n >\n {{ \"scandoc.no\" | translate }}\n </button>\n </footer>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"result\">\n <section>\n <ngx-scan-results\n (action)=\"selfie()\"\n [form]=\"form\"\n [data]=\"scanResults\"\n ></ngx-scan-results>\n\n <footer>\n <div class=\"actions\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retake()\">\n {{ \"scandoc.reTake\" | translate }}\n </button>\n <button\n [disabled]=\"error || form.invalid\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"use()\"\n >\n {{ \"scandoc.useData\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<ng-container *ngIf=\"manual\">\n <section>\n <ngx-manual-scan (action)=\"manualScanData($event)\"></ngx-manual-scan>\n </section>\n</ng-container>\n<ng-container *ngIf=\"!result && documentTypeSelected && !manual\">\n <section>\n <div #wraper class=\"wraper\">\n <div class=\"loading\" *ngIf=\"(!cameraReady && !preview) || scaning\">\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main\"\n #webcam\n type=\"document\"\n [trigger]=\"trigger\"\n [imageHandler]=\"imageHandler\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (destroyed)=\"cameraOff($event)\"\n (videoReady)=\"videoReady($event)\"\n [refresh]=\"refresh\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n display: flex;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"scandoc.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ng-container *ngIf=\"errorCode === '1001'\">\n <div>\n {{ \"scandoc.extraction.c1001\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"errorCode === '1002'\">\n <div>\n {{ \"scandoc.extraction.c1002\" | translate }}\n </div>\n </ng-container>\n\n <ul *ngIf=\"errorCode === '1000'\">\n <li>\n {{ \"scandoc.placeIdCloseToDevice\" | translate }}\n </li>\n <li>\n {{ \"scandoc.ensureSufficientLight\" | translate }}\n </li>\n <li>\n {{ \"scandoc.holdDocumentSteady\" | translate }}\n </li>\n <li>\n {{ \"scandoc.makeSureAllEdgesOfTheIdAreVisible\" | translate }}\n </li>\n <li>\n {{\n \"scandoc.makeSureThereAreNoGlareAndShadowsOnTheId\" | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"scanPreview\" *ngIf=\"!error && !scaning\">\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"scandoc.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\n <div\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer *ngIf=\"preview\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n <ng-container *ngIf=\"displayInfo\">\n {{ displayInfo | translate }}\n </ng-container>\n </div> -->\n <!-- <div style=\"height: 26px\">\n <div\n style=\"text-align: center; font-size: 18px\"\n *ngIf=\"idScan && !preview && cameraReady\"\n >\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"scandoc.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"scandoc.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <div class=\"actions\" *ngIf=\"preview\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden;position:relative}:host.mobile .hint{font-size:13px}section{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.wraper{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:1}.wraper .loading{position:absolute;inset:0;z-index:20;background-color:#f5f5f5}.documentTurnOver{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.documentTurnOver mat-icon{width:200px;color:#fff;height:200px;font-size:100px}.displayInfo{text-align:center;flex:1;width:100%;background-color:#000;height:50px;display:flex;flex-direction:row;align-items:center;justify-content:center;color:#fff;z-index:200}.displayInfo.mobile{font-size:12px}.preview{width:100%;border-radius:1%}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}footer .actions{display:flex;flex-direction:row;align-items:center;padding:8px}footer .actions button{flex:1}.error{display:flex;align-items:center;justify-content:center;flex:1}.error .title{font-size:20px;margin-bottom:8px}.error .title mat-icon{margin-right:8px}.error ul{font-size:18px;list-style-type:none}mat-card{box-shadow:none!important}.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}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode .content{margin-top:20px;background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.manualMode .inner{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px}.manualMode .inner mat-icon{width:60px;height:60px;font-size:60px}.manualMode .inner .text{margin:20px 0}.manualMode footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.manualMode footer button{min-width:140px;box-shadow:none;border:1px solid #ccc}.pageTurn{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .content{background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.pageTurn .inner{display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .inner mat-icon{width:60px;height:60px;font-size:60px}.pageTurn .inner .text{margin:20px 0;font-size:14px}.pageTurn footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.pageTurn footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}.hint{position:absolute;z-index:5;font-size:18px;line-height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.hint .text{border-radius:3px;padding:4px 8px;background-color:#000;color:#fff;text-align:center;display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone}\n"] }]
|
|
2620
|
+
args: [{ selector: 'ngx-scan', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-container\n *ngIf=\"cameraProvider.rectPosition.t > 0 && displayInfo && !result && !manual\"\n>\n <div class=\"hint\" [ngStyle]=\"{ top: cameraProvider.hintPosition + 'px' }\">\n <span class=\"text\">\n {{ displayInfo | translate }}\n </span>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"showDialog\">\n <div class=\"pageTurn\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n </div>\n <footer>\n <button (click)=\"closeDialog()\" mat-raised-button>Ok</button>\n </footer>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"promptManual\">\n <div class=\"manualMode\">\n <div class=\"content\">\n <div class=\"inner\">\n <mat-icon>screenshot</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n </div>\n <footer>\n <button\n style=\"margin-right: 8px\"\n (click)=\"manualSet(true)\"\n mat-raised-button\n >\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button\n style=\"margin-left: 8px\"\n (click)=\"manualSet(false)\"\n mat-raised-button\n >\n {{ \"scandoc.no\" | translate }}\n </button>\n </footer>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"result\">\n <section>\n <!-- <ngx-scan-results\n (action)=\"selfie()\"\n [form]=\"form\"\n [data]=\"scanResults\"\n ></ngx-scan-results> -->\n\n hum\n\n <footer>\n <div class=\"actions\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retake()\">\n {{ \"scandoc.reTake\" | translate }}\n </button>\n <button\n [disabled]=\"error || form.invalid\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"use()\"\n >\n {{ \"scandoc.useData\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n\n<ng-container *ngIf=\"manual\">\n <section>\n <ngx-manual-scan (action)=\"manualScanData($event)\"></ngx-manual-scan>\n </section>\n</ng-container>\n<ng-container *ngIf=\"!result && documentTypeSelected && !manual\">\n <section>\n <div #wraper class=\"wraper\">\n <div class=\"loading\" *ngIf=\"(!cameraReady && !preview) || scaning\">\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n\n <ng-container *ngIf=\"!error\">\n <ngx-scandoc-webcam\n *ngIf=\"!preview && !scaning\"\n class=\"main\"\n #webcam\n type=\"document\"\n [trigger]=\"trigger\"\n [imageHandler]=\"imageHandler\"\n (imageCapture)=\"handleImage($event)\"\n (initError)=\"handleInitError($event)\"\n (destroyed)=\"cameraOff($event)\"\n (videoReady)=\"videoReady($event)\"\n [refresh]=\"refresh\"\n >\n </ngx-scandoc-webcam>\n </ng-container>\n <div\n class=\"previewData\"\n *ngIf=\"preview\"\n style=\"\n z-index: 20;\n display: flex;\n position: absolute;\n width: 100%;\n height: 100%;\n \"\n >\n <div class=\"p-16 error\" *ngIf=\"error\">\n <div>\n <div class=\"title\">\n <mat-icon>error_outline</mat-icon\n ><span class=\"ml-8\">{{\n \"scandoc.unableToDetectId\" | translate\n }}</span>\n </div>\n\n <ng-container *ngIf=\"errorCode === '1001'\">\n <div>\n {{ \"scandoc.extraction.c1001\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"errorCode === '1002'\">\n <div>\n {{ \"scandoc.extraction.c1002\" | translate }}\n </div>\n </ng-container>\n\n <ul *ngIf=\"errorCode === '1000'\">\n <li>\n {{ \"scandoc.placeIdCloseToDevice\" | translate }}\n </li>\n <li>\n {{ \"scandoc.ensureSufficientLight\" | translate }}\n </li>\n <li>\n {{ \"scandoc.holdDocumentSteady\" | translate }}\n </li>\n <li>\n {{ \"scandoc.makeSureAllEdgesOfTheIdAreVisible\" | translate }}\n </li>\n <li>\n {{\n \"scandoc.makeSureThereAreNoGlareAndShadowsOnTheId\" | translate\n }}\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"scanPreview\" *ngIf=\"!error && !scaning\">\n <!-- <div class=\"py-16\" style=\"font-size: 16px\">\n {{\n \"scandoc.ensureAllTextsAreVisible\"\n | translate\n }}\n </div> -->\n <div\n class=\"image\"\n [style.background-image]=\"'url(' + preview + ')'\"\n ></div>\n </div>\n </div>\n </div>\n\n <footer *ngIf=\"preview\">\n <!-- <div class=\"displayInfo\" *ngIf=\"!preview && cameraReady\">\n <ng-container *ngIf=\"displayInfo\">\n {{ displayInfo | translate }}\n </ng-container>\n </div> -->\n <!-- <div style=\"height: 26px\">\n <div\n style=\"text-align: center; font-size: 18px\"\n *ngIf=\"idScan && !preview && cameraReady\"\n >\n <ng-container *ngIf=\"idScan === 'BACK'\">\n Turn document and:\n {{ \"scandoc.captureBack\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"idScan === 'FRONT'\">\n Turn document and:\n {{ \"scandoc.captureFront\" | translate }}\n </ng-container>\n </div>\n </div> -->\n\n <div class=\"actions\" *ngIf=\"preview\">\n <button class=\"mr-4\" mat-raised-button (click)=\"retry()\">\n {{ \"scandoc.retry\" | translate }}\n </button>\n\n <button\n [disabled]=\"error\"\n class=\"ml-4\"\n mat-raised-button\n (click)=\"continue()\"\n >\n {{ \"scandoc.continueWithSelectedImage\" | translate }}\n </button>\n </div>\n </footer>\n </section>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;background-color:#f5f5f5;overflow:hidden;position:relative}:host.mobile .hint{font-size:13px}section{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.wraper{position:relative;overflow:hidden;display:flex;flex-direction:column;flex:1}.wraper .loading{position:absolute;inset:0;z-index:20;background-color:#f5f5f5}.documentTurnOver{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.documentTurnOver mat-icon{width:200px;color:#fff;height:200px;font-size:100px}.displayInfo{text-align:center;flex:1;width:100%;background-color:#000;height:50px;display:flex;flex-direction:row;align-items:center;justify-content:center;color:#fff;z-index:200}.displayInfo.mobile{font-size:12px}.preview{width:100%;border-radius:1%}footer button{box-shadow:none!important;height:45px;min-height:45px;text-transform:uppercase}footer .actions{display:flex;flex-direction:row;align-items:center;padding:8px}footer .actions button{flex:1}.error{display:flex;align-items:center;justify-content:center;flex:1}.error .title{font-size:20px;margin-bottom:8px}.error .title mat-icon{margin-right:8px}.error ul{font-size:18px;list-style-type:none}mat-card{box-shadow:none!important}.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}.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.manualMode .content{margin-top:20px;background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.manualMode .inner{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px}.manualMode .inner mat-icon{width:60px;height:60px;font-size:60px}.manualMode .inner .text{margin:20px 0}.manualMode footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.manualMode footer button{min-width:140px;box-shadow:none;border:1px solid #ccc}.pageTurn{position:absolute;width:100%;height:100%;z-index:200;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .content{background-color:#fff;border-radius:6px;max-width:300px;width:100%;display:flex;flex-direction:column;padding:30px 20px 0}.pageTurn .inner{display:flex;flex-direction:column;align-items:center;justify-content:center}.pageTurn .inner mat-icon{width:60px;height:60px;font-size:60px}.pageTurn .inner .text{margin:20px 0;font-size:14px}.pageTurn footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}.pageTurn footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}.hint{position:absolute;z-index:5;font-size:18px;line-height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%}.hint .text{border-radius:3px;padding:4px 8px;background-color:#000;color:#fff;text-align:center;display:inline;-webkit-box-decoration-break:clone;box-decoration-break:clone}\n"] }]
|
|
3144
2621
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: NgxScandocCameraProvider }, { type: i0.Injector }, { type: LayoutProvider }, { type: i2.Platform }, { type: i4$2.DeviceDetectorService }, { type: NgxScandocAuthProvider }], propDecorators: { type: [{
|
|
3145
2622
|
type: Input
|
|
3146
2623
|
}], dialogs: [{
|
|
@@ -3270,254 +2747,777 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3270
2747
|
MatSliderModule,
|
|
3271
2748
|
MatSlideToggleModule,
|
|
3272
2749
|
],
|
|
3273
|
-
exports: [
|
|
3274
|
-
MatNativeDateModule,
|
|
3275
|
-
MatDatepickerModule,
|
|
3276
|
-
MatSelectModule,
|
|
3277
|
-
MatCardModule,
|
|
3278
|
-
MatMenuModule,
|
|
3279
|
-
MatIconModule,
|
|
3280
|
-
MatButtonModule,
|
|
3281
|
-
MatDialogModule,
|
|
3282
|
-
MatInputModule,
|
|
3283
|
-
MatSnackBarModule,
|
|
3284
|
-
MatProgressBarModule,
|
|
3285
|
-
MatProgressSpinnerModule,
|
|
3286
|
-
MatTableModule,
|
|
3287
|
-
MatPaginatorModule,
|
|
3288
|
-
MatChipsModule,
|
|
3289
|
-
MatBadgeModule,
|
|
3290
|
-
MatCheckboxModule,
|
|
3291
|
-
MatListModule,
|
|
3292
|
-
MatTabsModule,
|
|
3293
|
-
MatSlideToggleModule,
|
|
3294
|
-
MatAutocompleteModule,
|
|
2750
|
+
exports: [
|
|
2751
|
+
MatNativeDateModule,
|
|
2752
|
+
MatDatepickerModule,
|
|
2753
|
+
MatSelectModule,
|
|
2754
|
+
MatCardModule,
|
|
2755
|
+
MatMenuModule,
|
|
2756
|
+
MatIconModule,
|
|
2757
|
+
MatButtonModule,
|
|
2758
|
+
MatDialogModule,
|
|
2759
|
+
MatInputModule,
|
|
2760
|
+
MatSnackBarModule,
|
|
2761
|
+
MatProgressBarModule,
|
|
2762
|
+
MatProgressSpinnerModule,
|
|
2763
|
+
MatTableModule,
|
|
2764
|
+
MatPaginatorModule,
|
|
2765
|
+
MatChipsModule,
|
|
2766
|
+
MatBadgeModule,
|
|
2767
|
+
MatCheckboxModule,
|
|
2768
|
+
MatListModule,
|
|
2769
|
+
MatTabsModule,
|
|
2770
|
+
MatSlideToggleModule,
|
|
2771
|
+
MatAutocompleteModule,
|
|
2772
|
+
],
|
|
2773
|
+
providers: [],
|
|
2774
|
+
}]
|
|
2775
|
+
}] });
|
|
2776
|
+
|
|
2777
|
+
class AvatarTypeComponent extends FieldType {
|
|
2778
|
+
constructor(cd) {
|
|
2779
|
+
super();
|
|
2780
|
+
this.cd = cd;
|
|
2781
|
+
this.width = 'w-120';
|
|
2782
|
+
this.padding = 'px-32 pt-8 pb-8';
|
|
2783
|
+
}
|
|
2784
|
+
ngOnChange() { }
|
|
2785
|
+
selfie() { }
|
|
2786
|
+
;
|
|
2787
|
+
ngAfterViewInit() {
|
|
2788
|
+
if (this.to.width) {
|
|
2789
|
+
this.width = this.to.width;
|
|
2790
|
+
}
|
|
2791
|
+
if (this.to.padding) {
|
|
2792
|
+
this.padding = this.to.padding;
|
|
2793
|
+
}
|
|
2794
|
+
this.cd.detectChanges();
|
|
2795
|
+
}
|
|
2796
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AvatarTypeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2797
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: AvatarTypeComponent, isStandalone: false, selector: "app-formly-avatar-type", usesInheritance: true, ngImport: i0, template: `
|
|
2798
|
+
<mat-card appearance="outlined" style="margin: 4px; padding:16px">
|
|
2799
|
+
<div class="card-title">{{ 'scandoc.result.avatar' | translate }}</div>
|
|
2800
|
+
<div class="selfieContainer">
|
|
2801
|
+
<div class="selfie">
|
|
2802
|
+
<img *ngIf="model?._avatar" class="preview" [src]="model._avatar" />
|
|
2803
|
+
</div>
|
|
2804
|
+
<button (click)="selfie()" mat-raised-button>
|
|
2805
|
+
{{ 'scandoc.result.takeSelfie' | translate }}
|
|
2806
|
+
</button>
|
|
2807
|
+
</div>
|
|
2808
|
+
</mat-card>
|
|
2809
|
+
`, isInline: true, styles: ["mat-card{border-radius:0;box-shadow:none!important}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
2810
|
+
}
|
|
2811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AvatarTypeComponent, decorators: [{
|
|
2812
|
+
type: Component,
|
|
2813
|
+
args: [{ selector: 'app-formly-avatar-type', template: `
|
|
2814
|
+
<mat-card appearance="outlined" style="margin: 4px; padding:16px">
|
|
2815
|
+
<div class="card-title">{{ 'scandoc.result.avatar' | translate }}</div>
|
|
2816
|
+
<div class="selfieContainer">
|
|
2817
|
+
<div class="selfie">
|
|
2818
|
+
<img *ngIf="model?._avatar" class="preview" [src]="model._avatar" />
|
|
2819
|
+
</div>
|
|
2820
|
+
<button (click)="selfie()" mat-raised-button>
|
|
2821
|
+
{{ 'scandoc.result.takeSelfie' | translate }}
|
|
2822
|
+
</button>
|
|
2823
|
+
</div>
|
|
2824
|
+
</mat-card>
|
|
2825
|
+
`, standalone: false, styles: ["mat-card{border-radius:0;box-shadow:none!important}\n"] }]
|
|
2826
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
2827
|
+
|
|
2828
|
+
class TitleTypeComponent extends FieldType {
|
|
2829
|
+
constructor(cd) {
|
|
2830
|
+
super();
|
|
2831
|
+
this.cd = cd;
|
|
2832
|
+
}
|
|
2833
|
+
ngOnInit() {
|
|
2834
|
+
this.opt = {
|
|
2835
|
+
badge: this.to.badge,
|
|
2836
|
+
};
|
|
2837
|
+
}
|
|
2838
|
+
ngAfterViewInit() {
|
|
2839
|
+
this.cd.detectChanges();
|
|
2840
|
+
}
|
|
2841
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TitleTypeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2842
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TitleTypeComponent, isStandalone: false, selector: "app-formly-title-type", usesInheritance: true, ngImport: i0, template: `
|
|
2843
|
+
<div class="card-title">
|
|
2844
|
+
{{ to.label }}
|
|
2845
|
+
</div>
|
|
2846
|
+
`, isInline: true, styles: [""] }); }
|
|
2847
|
+
}
|
|
2848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TitleTypeComponent, decorators: [{
|
|
2849
|
+
type: Component,
|
|
2850
|
+
args: [{ selector: 'app-formly-title-type', template: `
|
|
2851
|
+
<div class="card-title">
|
|
2852
|
+
{{ to.label }}
|
|
2853
|
+
</div>
|
|
2854
|
+
`, standalone: false }]
|
|
2855
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
2856
|
+
|
|
2857
|
+
class ProfileImageTypeComponent extends FieldType {
|
|
2858
|
+
constructor(cd, cameraProvider, scanProvider) {
|
|
2859
|
+
super();
|
|
2860
|
+
this.cd = cd;
|
|
2861
|
+
this.cameraProvider = cameraProvider;
|
|
2862
|
+
this.scanProvider = scanProvider;
|
|
2863
|
+
}
|
|
2864
|
+
selfie() {
|
|
2865
|
+
this.cameraProvider.selfie$.next(true);
|
|
2866
|
+
}
|
|
2867
|
+
ngOnChange() { }
|
|
2868
|
+
ngAfterViewInit() { }
|
|
2869
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProfileImageTypeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: NgxScandocCameraProvider }, { token: ScanProvider }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2870
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ProfileImageTypeComponent, isStandalone: false, selector: "app-formly-profile-image-type", usesInheritance: true, ngImport: i0, template: `
|
|
2871
|
+
<mat-form-field>
|
|
2872
|
+
<mat-label>{{ 'scandoc.result.avatar' | translate }} </mat-label>
|
|
2873
|
+
<input matInput style="display:none" />
|
|
2874
|
+
<div class="selfieContainer">
|
|
2875
|
+
<div class="selfie">
|
|
2876
|
+
<img *ngIf="model?._avatar" class="preview" [src]="model._avatar" />
|
|
2877
|
+
</div>
|
|
2878
|
+
<button
|
|
2879
|
+
*ngIf="scanProvider.enableVerification"
|
|
2880
|
+
(click)="selfie()"
|
|
2881
|
+
mat-raised-button
|
|
2882
|
+
>
|
|
2883
|
+
{{ 'scandoc.result.takeSelfie' | translate }}
|
|
2884
|
+
</button>
|
|
2885
|
+
</div>
|
|
2886
|
+
</mat-form-field>
|
|
2887
|
+
`, isInline: true, styles: [".selfieContainer{display:flex;flex-direction:column;align-items:center;justify-content:center}.selfieContainer button{margin-top:6px;box-shadow:none!important;border:1px solid rgba(0,0,0,.12);text-transform:uppercase;font-size:12px}.selfie{width:126px;height:126px;border-radius:70px;background:#f5f5f5;display:flex;flex-direction:column;align-items:center;justify-content:center}.selfie img{width:120px;height:120px;border-radius:60px}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$3.MatLabel, selector: "mat-label" }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i4$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
2888
|
+
}
|
|
2889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProfileImageTypeComponent, decorators: [{
|
|
2890
|
+
type: Component,
|
|
2891
|
+
args: [{ selector: 'app-formly-profile-image-type', template: `
|
|
2892
|
+
<mat-form-field>
|
|
2893
|
+
<mat-label>{{ 'scandoc.result.avatar' | translate }} </mat-label>
|
|
2894
|
+
<input matInput style="display:none" />
|
|
2895
|
+
<div class="selfieContainer">
|
|
2896
|
+
<div class="selfie">
|
|
2897
|
+
<img *ngIf="model?._avatar" class="preview" [src]="model._avatar" />
|
|
2898
|
+
</div>
|
|
2899
|
+
<button
|
|
2900
|
+
*ngIf="scanProvider.enableVerification"
|
|
2901
|
+
(click)="selfie()"
|
|
2902
|
+
mat-raised-button
|
|
2903
|
+
>
|
|
2904
|
+
{{ 'scandoc.result.takeSelfie' | translate }}
|
|
2905
|
+
</button>
|
|
2906
|
+
</div>
|
|
2907
|
+
</mat-form-field>
|
|
2908
|
+
`, standalone: false, styles: [".selfieContainer{display:flex;flex-direction:column;align-items:center;justify-content:center}.selfieContainer button{margin-top:6px;box-shadow:none!important;border:1px solid rgba(0,0,0,.12);text-transform:uppercase;font-size:12px}.selfie{width:126px;height:126px;border-radius:70px;background:#f5f5f5;display:flex;flex-direction:column;align-items:center;justify-content:center}.selfie img{width:120px;height:120px;border-radius:60px}\n"] }]
|
|
2909
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: NgxScandocCameraProvider }, { type: ScanProvider }] });
|
|
2910
|
+
|
|
2911
|
+
class AppFormModule {
|
|
2912
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2913
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: AppFormModule, declarations: [TitleTypeComponent,
|
|
2914
|
+
AvatarTypeComponent,
|
|
2915
|
+
ProfileImageTypeComponent], imports: [CommonModule,
|
|
2916
|
+
FormsModule,
|
|
2917
|
+
FormlyMatDatepickerModule,
|
|
2918
|
+
FormlySelectModule,
|
|
2919
|
+
MaterialModule,
|
|
2920
|
+
AvatarModule,
|
|
2921
|
+
TranslateModule,
|
|
2922
|
+
FormlyMaterialModule, i1$2.FormlyModule], exports: [FormlyModule] }); }
|
|
2923
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppFormModule, imports: [CommonModule,
|
|
2924
|
+
FormsModule,
|
|
2925
|
+
FormlyMatDatepickerModule,
|
|
2926
|
+
FormlySelectModule,
|
|
2927
|
+
MaterialModule,
|
|
2928
|
+
AvatarModule,
|
|
2929
|
+
TranslateModule,
|
|
2930
|
+
FormlyMaterialModule,
|
|
2931
|
+
FormlyModule.forChild({
|
|
2932
|
+
types: [
|
|
2933
|
+
{
|
|
2934
|
+
name: 'title',
|
|
2935
|
+
component: TitleTypeComponent,
|
|
2936
|
+
wrappers: [],
|
|
2937
|
+
},
|
|
2938
|
+
{
|
|
2939
|
+
name: 'profile-image',
|
|
2940
|
+
component: ProfileImageTypeComponent,
|
|
2941
|
+
wrappers: [],
|
|
2942
|
+
},
|
|
2943
|
+
],
|
|
2944
|
+
}), FormlyModule] }); }
|
|
2945
|
+
}
|
|
2946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppFormModule, decorators: [{
|
|
2947
|
+
type: NgModule,
|
|
2948
|
+
args: [{
|
|
2949
|
+
declarations: [
|
|
2950
|
+
TitleTypeComponent,
|
|
2951
|
+
AvatarTypeComponent,
|
|
2952
|
+
ProfileImageTypeComponent,
|
|
2953
|
+
],
|
|
2954
|
+
imports: [
|
|
2955
|
+
CommonModule,
|
|
2956
|
+
FormsModule,
|
|
2957
|
+
FormlyMatDatepickerModule,
|
|
2958
|
+
FormlySelectModule,
|
|
2959
|
+
MaterialModule,
|
|
2960
|
+
AvatarModule,
|
|
2961
|
+
TranslateModule,
|
|
2962
|
+
FormlyMaterialModule,
|
|
2963
|
+
FormlyModule.forChild({
|
|
2964
|
+
types: [
|
|
2965
|
+
{
|
|
2966
|
+
name: 'title',
|
|
2967
|
+
component: TitleTypeComponent,
|
|
2968
|
+
wrappers: [],
|
|
2969
|
+
},
|
|
2970
|
+
{
|
|
2971
|
+
name: 'profile-image',
|
|
2972
|
+
component: ProfileImageTypeComponent,
|
|
2973
|
+
wrappers: [],
|
|
2974
|
+
},
|
|
2975
|
+
],
|
|
2976
|
+
}),
|
|
3295
2977
|
],
|
|
3296
2978
|
providers: [],
|
|
2979
|
+
exports: [FormlyModule],
|
|
3297
2980
|
}]
|
|
3298
2981
|
}] });
|
|
3299
2982
|
|
|
3300
|
-
class
|
|
3301
|
-
constructor(
|
|
3302
|
-
|
|
3303
|
-
this.cd = cd;
|
|
3304
|
-
this.width = 'w-120';
|
|
3305
|
-
this.padding = 'px-32 pt-8 pb-8';
|
|
2983
|
+
class CameraSwitchComponent {
|
|
2984
|
+
constructor(cameraProvider) {
|
|
2985
|
+
this.cameraProvider = cameraProvider;
|
|
3306
2986
|
}
|
|
3307
|
-
ngOnChange() { }
|
|
3308
|
-
selfie() { }
|
|
3309
|
-
;
|
|
3310
2987
|
ngAfterViewInit() {
|
|
3311
|
-
|
|
3312
|
-
|
|
2988
|
+
// this.cameraProvider.setDefault();
|
|
2989
|
+
}
|
|
2990
|
+
ngOnDestroy() { }
|
|
2991
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CameraSwitchComponent, deps: [{ token: NgxScandocCameraProvider }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2992
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CameraSwitchComponent, isStandalone: false, selector: "ngx-scan-camera-switch", ngImport: i0, template: "<mat-form-field\n style=\"font-size: 14px; margin-top: 8px\"\n class=\"w-100-p 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"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$3.MatLabel, selector: "mat-label" }, { kind: "component", type: i5$3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i5$3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
2993
|
+
}
|
|
2994
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CameraSwitchComponent, decorators: [{
|
|
2995
|
+
type: Component,
|
|
2996
|
+
args: [{ selector: 'ngx-scan-camera-switch', standalone: false, template: "<mat-form-field\n style=\"font-size: 14px; margin-top: 8px\"\n class=\"w-100-p 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"] }]
|
|
2997
|
+
}], ctorParameters: () => [{ type: NgxScandocCameraProvider }] });
|
|
2998
|
+
|
|
2999
|
+
const TRANSLATION_PROVIDER = new InjectionToken('Injection token for translation providers.');
|
|
3000
|
+
class NgxScanDocTranslationProvider {
|
|
3001
|
+
constructor(translate, injector,
|
|
3002
|
+
//@Optional() @Inject(SCAN_CONFIG_TOKEN) config: ScanConfig,
|
|
3003
|
+
providers, platformLocation) {
|
|
3004
|
+
this.translate = translate;
|
|
3005
|
+
this.injector = injector;
|
|
3006
|
+
this.platformLocation = platformLocation;
|
|
3007
|
+
console.log('MM', Math.random());
|
|
3008
|
+
this.customLoader = this.translate.currentLoader;
|
|
3009
|
+
//console.log('config',config)
|
|
3010
|
+
// console.log(this.translate)
|
|
3011
|
+
if (providers && providers.length > 0) {
|
|
3012
|
+
for (const provider of providers) {
|
|
3013
|
+
this.addTranslationFolder(provider.name, provider.source);
|
|
3014
|
+
}
|
|
3313
3015
|
}
|
|
3314
|
-
|
|
3315
|
-
|
|
3016
|
+
}
|
|
3017
|
+
path(path) {
|
|
3018
|
+
return path;
|
|
3019
|
+
// const baseHref = this.platformLocation
|
|
3020
|
+
// .getBaseHrefFromDOM()
|
|
3021
|
+
// .split('/')
|
|
3022
|
+
// .join('');
|
|
3023
|
+
// return baseHref != '' ? `/${baseHref}${path}` : path;
|
|
3024
|
+
}
|
|
3025
|
+
setDefaultLang(lang) {
|
|
3026
|
+
this.defaultLang = lang;
|
|
3027
|
+
this.translate.setDefaultLang(this.defaultLang);
|
|
3028
|
+
}
|
|
3029
|
+
registerTranslationFolder(name = '', path = '') {
|
|
3030
|
+
console.log(name, path, this.userLang, this.defaultLang);
|
|
3031
|
+
if (!this.customLoader.providerRegistered(name)) {
|
|
3032
|
+
this.customLoader.registerProvider(name, this.path(path));
|
|
3316
3033
|
}
|
|
3317
|
-
this.cd.detectChanges();
|
|
3318
3034
|
}
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3035
|
+
addTranslationFolder(name = '', path = '') {
|
|
3036
|
+
console.log(name, path, this.userLang, this.defaultLang);
|
|
3037
|
+
if (!this.customLoader.providerRegistered(name)) {
|
|
3038
|
+
this.customLoader.registerProvider(name, this.path(path));
|
|
3039
|
+
if (this.userLang) {
|
|
3040
|
+
const existCurrentLang = this.translate.currentLang ? true : false;
|
|
3041
|
+
this.loadTranslation(this.userLang, this.defaultLang, !existCurrentLang);
|
|
3042
|
+
}
|
|
3043
|
+
else {
|
|
3044
|
+
this.loadTranslation(this.defaultLang);
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
loadTranslation(lang, fallback, useLang = true) {
|
|
3049
|
+
this.translate.getTranslation(lang).subscribe((resp) => {
|
|
3050
|
+
this.onTranslationChanged(lang);
|
|
3051
|
+
if (useLang) {
|
|
3052
|
+
setTimeout(() => {
|
|
3053
|
+
this.translate.use(lang);
|
|
3054
|
+
}, 20);
|
|
3055
|
+
}
|
|
3056
|
+
// this.translate.reloadLang(lang)
|
|
3057
|
+
}, () => {
|
|
3058
|
+
if (fallback && fallback !== lang) {
|
|
3059
|
+
this.loadTranslation(fallback);
|
|
3060
|
+
}
|
|
3061
|
+
});
|
|
3062
|
+
}
|
|
3063
|
+
updateTranslation(lang, fallback) {
|
|
3064
|
+
return this.translate.getTranslation(lang).pipe(catchError(() => {
|
|
3065
|
+
if (fallback && fallback !== lang) {
|
|
3066
|
+
return this.updateTranslation(fallback);
|
|
3067
|
+
}
|
|
3068
|
+
return this.translate.use(lang);
|
|
3069
|
+
}), switchMap(() => {
|
|
3070
|
+
this.onTranslationChanged(lang);
|
|
3071
|
+
return this.translate.use(lang);
|
|
3072
|
+
}));
|
|
3073
|
+
}
|
|
3074
|
+
onTranslationChanged(lang) {
|
|
3075
|
+
this.translate.onTranslationChange.next({
|
|
3076
|
+
lang,
|
|
3077
|
+
translations: this.customLoader.getFullTranslationJSON(lang),
|
|
3078
|
+
});
|
|
3079
|
+
}
|
|
3080
|
+
use(lang) {
|
|
3081
|
+
this.customLoader.init(lang);
|
|
3082
|
+
return this.updateTranslation(lang);
|
|
3083
|
+
}
|
|
3084
|
+
forms(item, namespace = null) {
|
|
3085
|
+
if (item.fieldGroup) {
|
|
3086
|
+
item.fieldGroup = item.fieldGroup.map((field) => this.forms(field));
|
|
3087
|
+
}
|
|
3088
|
+
const prefix = namespace ? namespace + '.' : '';
|
|
3089
|
+
if (item.props &&
|
|
3090
|
+
(item.props.label || item.props.placeholder || item.props.options)) {
|
|
3091
|
+
if (!item.expressions) {
|
|
3092
|
+
item.expressions = {};
|
|
3093
|
+
}
|
|
3094
|
+
if (item.props.label) {
|
|
3095
|
+
item.expressions['props.label'] = this.translate.stream(prefix + item.props.label);
|
|
3096
|
+
}
|
|
3097
|
+
if (item.props.placeholder) {
|
|
3098
|
+
item.expressions['props.placeholder'] = this.translate.stream(prefix + item.props.placeholder);
|
|
3099
|
+
}
|
|
3100
|
+
if (Array.isArray(item.props.options)) {
|
|
3101
|
+
item.expressions['props.options'] = item.props.options.map((m) => {
|
|
3102
|
+
// console.log(m);
|
|
3103
|
+
if (m.label) {
|
|
3104
|
+
m.label = this.translate.instant(prefix + m.label);
|
|
3105
|
+
}
|
|
3106
|
+
return m;
|
|
3107
|
+
});
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
return item;
|
|
3111
|
+
}
|
|
3112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScanDocTranslationProvider, deps: [{ token: i4$1.TranslateService }, { token: i0.Injector }, { token: TRANSLATION_PROVIDER, optional: true }, { token: i4.PlatformLocation }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3113
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScanDocTranslationProvider, providedIn: 'root' }); }
|
|
3114
|
+
}
|
|
3115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScanDocTranslationProvider, decorators: [{
|
|
3116
|
+
type: Injectable,
|
|
3117
|
+
args: [{
|
|
3118
|
+
providedIn: 'root',
|
|
3119
|
+
}]
|
|
3120
|
+
}], ctorParameters: () => [{ type: i4$1.TranslateService }, { type: i0.Injector }, { type: undefined, decorators: [{
|
|
3121
|
+
type: Optional
|
|
3122
|
+
}, {
|
|
3123
|
+
type: Inject,
|
|
3124
|
+
args: [TRANSLATION_PROVIDER]
|
|
3125
|
+
}] }, { type: i4.PlatformLocation }] });
|
|
3126
|
+
|
|
3127
|
+
class NgxScandocFieldsProvider {
|
|
3128
|
+
constructor(translate, provider) {
|
|
3129
|
+
this.translate = translate;
|
|
3130
|
+
this.provider = provider;
|
|
3131
|
+
this.selfie$ = new Subject();
|
|
3132
|
+
}
|
|
3133
|
+
update() {
|
|
3134
|
+
return [
|
|
3135
|
+
{
|
|
3136
|
+
fieldGroupClassName: 'px-16',
|
|
3137
|
+
fieldGroup: [
|
|
3138
|
+
{
|
|
3139
|
+
wrappers: [],
|
|
3140
|
+
type: 'checkbox',
|
|
3141
|
+
key: 'profile',
|
|
3142
|
+
class: 'checkbox ',
|
|
3143
|
+
defaultValue: true,
|
|
3144
|
+
props: {
|
|
3145
|
+
label: 'scandoc.form.scan.document.update.profile',
|
|
3146
|
+
},
|
|
3147
|
+
},
|
|
3148
|
+
{
|
|
3149
|
+
wrappers: [],
|
|
3150
|
+
type: 'checkbox',
|
|
3151
|
+
class: 'checkbox ',
|
|
3152
|
+
key: 'document',
|
|
3153
|
+
defaultValue: true,
|
|
3154
|
+
props: {
|
|
3155
|
+
label: 'scandoc.form.scan.document.update.document',
|
|
3156
|
+
},
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
wrappers: [],
|
|
3160
|
+
type: 'checkbox',
|
|
3161
|
+
class: 'checkbox ',
|
|
3162
|
+
key: 'attachment',
|
|
3163
|
+
defaultValue: true,
|
|
3164
|
+
props: {
|
|
3165
|
+
label: 'scandoc.form.scan.document.update.attachment',
|
|
3166
|
+
},
|
|
3167
|
+
},
|
|
3168
|
+
].map((item) => this.translate.forms(item)),
|
|
3169
|
+
},
|
|
3170
|
+
];
|
|
3171
|
+
}
|
|
3172
|
+
document() {
|
|
3173
|
+
if (this.customFields) {
|
|
3174
|
+
return this.customFields;
|
|
3175
|
+
}
|
|
3176
|
+
return [
|
|
3177
|
+
{
|
|
3178
|
+
className: 'w-100-p',
|
|
3179
|
+
fieldGroupClassName: 'form-flex-row profile-details',
|
|
3180
|
+
fieldGroup: [
|
|
3181
|
+
{
|
|
3182
|
+
className: 'w-100-p ',
|
|
3183
|
+
fieldGroupClassName: 'card-group',
|
|
3184
|
+
fieldGroup: [
|
|
3185
|
+
{
|
|
3186
|
+
type: 'title',
|
|
3187
|
+
props: {
|
|
3188
|
+
label: 'scandoc.form.scan.document.guestDetailsTitle',
|
|
3189
|
+
},
|
|
3190
|
+
},
|
|
3191
|
+
{
|
|
3192
|
+
type: 'profile-image',
|
|
3193
|
+
key: '_avatar',
|
|
3194
|
+
props: {
|
|
3195
|
+
label: 'scandoc.form.scan.document.firstName',
|
|
3196
|
+
},
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
type: 'input',
|
|
3200
|
+
key: 'firstName',
|
|
3201
|
+
className: 'small',
|
|
3202
|
+
props: {
|
|
3203
|
+
label: 'scandoc.form.scan.document.firstName',
|
|
3204
|
+
required: true,
|
|
3205
|
+
},
|
|
3206
|
+
},
|
|
3207
|
+
{
|
|
3208
|
+
type: 'input',
|
|
3209
|
+
key: 'lastName',
|
|
3210
|
+
className: 'small',
|
|
3211
|
+
props: {
|
|
3212
|
+
label: 'scandoc.form.scan.document.lastName',
|
|
3213
|
+
required: true,
|
|
3214
|
+
},
|
|
3215
|
+
},
|
|
3216
|
+
{
|
|
3217
|
+
className: 'small',
|
|
3218
|
+
key: 'secondName',
|
|
3219
|
+
type: 'input',
|
|
3220
|
+
props: {
|
|
3221
|
+
label: 'scandoc.form.scan.document.secondLastName',
|
|
3222
|
+
},
|
|
3223
|
+
hideExpression: 'model.hideSecondLastName',
|
|
3224
|
+
},
|
|
3225
|
+
{
|
|
3226
|
+
type: 'input',
|
|
3227
|
+
key: 'middleName',
|
|
3228
|
+
className: 'small',
|
|
3229
|
+
props: {
|
|
3230
|
+
label: 'scandoc.form.scan.document.middleName',
|
|
3231
|
+
},
|
|
3232
|
+
},
|
|
3233
|
+
{
|
|
3234
|
+
className: '',
|
|
3235
|
+
fieldGroupClassName: 'form-flex-row space-between',
|
|
3236
|
+
fieldGroup: [
|
|
3237
|
+
{
|
|
3238
|
+
type: 'datepicker',
|
|
3239
|
+
key: 'birthDate',
|
|
3240
|
+
className: 'w-100-p small mr-8',
|
|
3241
|
+
props: {
|
|
3242
|
+
label: 'scandoc.form.scan.document.birthDate',
|
|
3243
|
+
},
|
|
3244
|
+
},
|
|
3245
|
+
{
|
|
3246
|
+
type: 'select',
|
|
3247
|
+
key: 'gender',
|
|
3248
|
+
className: 'w-100-p small ml-8',
|
|
3249
|
+
props: {
|
|
3250
|
+
label: 'scandoc.form.scan.document.gender',
|
|
3251
|
+
options: [
|
|
3252
|
+
{ value: 'MALE', label: 'MALE' },
|
|
3253
|
+
{ value: 'FEMALE', label: 'FEMALE' },
|
|
3254
|
+
{ value: 'NA', label: 'N/A' },
|
|
3255
|
+
],
|
|
3256
|
+
},
|
|
3257
|
+
},
|
|
3258
|
+
],
|
|
3259
|
+
},
|
|
3260
|
+
{
|
|
3261
|
+
className: '',
|
|
3262
|
+
fieldGroupClassName: 'form-flex-row space-between',
|
|
3263
|
+
fieldGroup: [
|
|
3264
|
+
{
|
|
3265
|
+
type: 'input',
|
|
3266
|
+
key: 'birthPlace',
|
|
3267
|
+
className: 'small w-100-p mr-8',
|
|
3268
|
+
props: {
|
|
3269
|
+
label: 'scandoc.form.scan.document.birthPlace',
|
|
3270
|
+
},
|
|
3271
|
+
},
|
|
3272
|
+
{
|
|
3273
|
+
type: 'select',
|
|
3274
|
+
key: 'birthCountry',
|
|
3275
|
+
className: 'small w-100-p ml-8',
|
|
3276
|
+
props: {
|
|
3277
|
+
label: 'scandoc.form.scan.document.birthCountry',
|
|
3278
|
+
options: this.provider.countries(),
|
|
3279
|
+
},
|
|
3280
|
+
},
|
|
3281
|
+
],
|
|
3282
|
+
},
|
|
3283
|
+
{
|
|
3284
|
+
className: 'small',
|
|
3285
|
+
key: 'nationality',
|
|
3286
|
+
type: 'select',
|
|
3287
|
+
props: {
|
|
3288
|
+
label: 'scandoc.form.scan.document.nationality',
|
|
3289
|
+
// appearance: 'outline',
|
|
3290
|
+
// options: this.profileProvider.nationalities(),
|
|
3291
|
+
options: this.provider.countries(),
|
|
3292
|
+
},
|
|
3293
|
+
},
|
|
3294
|
+
],
|
|
3295
|
+
},
|
|
3296
|
+
{
|
|
3297
|
+
className: 'w-100-p',
|
|
3298
|
+
fieldGroupClassName: 'form-flex-column',
|
|
3299
|
+
fieldGroup: [
|
|
3300
|
+
{
|
|
3301
|
+
className: 'w-100-p',
|
|
3302
|
+
fieldGroupClassName: 'card-group',
|
|
3303
|
+
fieldGroup: [
|
|
3304
|
+
{
|
|
3305
|
+
type: 'title',
|
|
3306
|
+
props: {
|
|
3307
|
+
label: 'scandoc.form.scan.document.documentTitle',
|
|
3308
|
+
},
|
|
3309
|
+
},
|
|
3310
|
+
{
|
|
3311
|
+
type: 'select',
|
|
3312
|
+
key: 'documentType',
|
|
3313
|
+
props: {
|
|
3314
|
+
label: 'scandoc.form.scan.document.documentType',
|
|
3315
|
+
options: [
|
|
3316
|
+
{ value: 'ID', label: 'Identity Document' },
|
|
3317
|
+
{ value: 'PASS', label: 'Passport' },
|
|
3318
|
+
{ value: 'DL', label: 'Driver Licence' },
|
|
3319
|
+
],
|
|
3320
|
+
// valueProp: 'id',
|
|
3321
|
+
// labelProp: 'value',
|
|
3322
|
+
required: true,
|
|
3323
|
+
},
|
|
3324
|
+
},
|
|
3325
|
+
{
|
|
3326
|
+
type: 'input',
|
|
3327
|
+
key: 'documentNumber',
|
|
3328
|
+
props: {
|
|
3329
|
+
label: 'scandoc.form.scan.document.documentNumber',
|
|
3330
|
+
required: true,
|
|
3331
|
+
},
|
|
3332
|
+
},
|
|
3333
|
+
{
|
|
3334
|
+
className: '',
|
|
3335
|
+
fieldGroupClassName: 'form-flex-row space-between',
|
|
3336
|
+
fieldGroup: [
|
|
3337
|
+
{
|
|
3338
|
+
type: 'datepicker',
|
|
3339
|
+
key: 'issueDate',
|
|
3340
|
+
className: 'small mr-8',
|
|
3341
|
+
props: {
|
|
3342
|
+
label: 'scandoc.form.scan.document.issueDate',
|
|
3343
|
+
},
|
|
3344
|
+
},
|
|
3345
|
+
{
|
|
3346
|
+
type: 'datepicker',
|
|
3347
|
+
key: 'expirationDate',
|
|
3348
|
+
className: 'small ml-8',
|
|
3349
|
+
props: {
|
|
3350
|
+
label: 'scandoc.form.scan.document.expirationDate',
|
|
3351
|
+
},
|
|
3352
|
+
},
|
|
3353
|
+
],
|
|
3354
|
+
},
|
|
3355
|
+
{
|
|
3356
|
+
type: 'select',
|
|
3357
|
+
key: 'issueStateCode',
|
|
3358
|
+
props: {
|
|
3359
|
+
label: 'scandoc.form.scan.document.issuingStateCode',
|
|
3360
|
+
options: this.provider.countries(),
|
|
3361
|
+
},
|
|
3362
|
+
},
|
|
3363
|
+
{
|
|
3364
|
+
type: 'input',
|
|
3365
|
+
key: 'issuingPlace',
|
|
3366
|
+
props: {
|
|
3367
|
+
label: 'scandoc.form.scan.document.issuingPlace',
|
|
3368
|
+
required: false,
|
|
3369
|
+
},
|
|
3370
|
+
},
|
|
3371
|
+
],
|
|
3372
|
+
},
|
|
3373
|
+
{
|
|
3374
|
+
className: 'w-100-p',
|
|
3375
|
+
fieldGroupClassName: 'card-group',
|
|
3376
|
+
fieldGroup: [
|
|
3377
|
+
{
|
|
3378
|
+
type: 'title',
|
|
3379
|
+
props: {
|
|
3380
|
+
label: 'scandoc.form.scan.document.addressTitle',
|
|
3381
|
+
badge: 'communications',
|
|
3382
|
+
},
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
className: 'small',
|
|
3386
|
+
key: 'country',
|
|
3387
|
+
type: 'select',
|
|
3388
|
+
props: {
|
|
3389
|
+
required: true,
|
|
3390
|
+
label: 'scandoc.form.profile.address.country',
|
|
3391
|
+
options: this.provider.countries(),
|
|
3392
|
+
},
|
|
3393
|
+
// expressionProperties: {
|
|
3394
|
+
// 'props.disabled': (model: any) => !model.newAddress,
|
|
3395
|
+
// },
|
|
3396
|
+
hooks: {
|
|
3397
|
+
onInit: (model) => {
|
|
3398
|
+
console.log(model);
|
|
3399
|
+
},
|
|
3400
|
+
},
|
|
3401
|
+
},
|
|
3402
|
+
{
|
|
3403
|
+
className: '',
|
|
3404
|
+
fieldGroupClassName: 'form-flex-row space-between',
|
|
3405
|
+
fieldGroup: [
|
|
3406
|
+
{
|
|
3407
|
+
className: 'mr-8 w-100-p',
|
|
3408
|
+
key: 'zip',
|
|
3409
|
+
type: 'input',
|
|
3410
|
+
props: {
|
|
3411
|
+
label: 'scandoc.form.profile.address.zip',
|
|
3412
|
+
labelProp: (item) => {
|
|
3413
|
+
return `${item.zip} (${item.city})`;
|
|
3414
|
+
},
|
|
3415
|
+
set: (field, option) => {
|
|
3416
|
+
// console.log(option, field);
|
|
3417
|
+
field.formControl.setValue(option.value.zip);
|
|
3418
|
+
// set CITY
|
|
3419
|
+
field.form.get('city').setValue(option.value.city);
|
|
3420
|
+
},
|
|
3421
|
+
filter: (key, field) => {
|
|
3422
|
+
// return this.profileProvider.zipCodes({
|
|
3423
|
+
// countryCode: field.form.get('country').value,
|
|
3424
|
+
// zip: key,
|
|
3425
|
+
// });
|
|
3426
|
+
},
|
|
3427
|
+
},
|
|
3428
|
+
// expressionProperties: {
|
|
3429
|
+
// 'props.disabled': (model: any) =>
|
|
3430
|
+
// !model.newAddress,
|
|
3431
|
+
// },
|
|
3432
|
+
},
|
|
3433
|
+
{
|
|
3434
|
+
className: 'small w-100-p ml-8',
|
|
3435
|
+
key: 'city',
|
|
3436
|
+
type: 'input',
|
|
3437
|
+
props: {
|
|
3438
|
+
label: 'scandoc.form.profile.address.city',
|
|
3439
|
+
},
|
|
3440
|
+
},
|
|
3441
|
+
],
|
|
3442
|
+
},
|
|
3443
|
+
{
|
|
3444
|
+
className: 'small w-100-p',
|
|
3445
|
+
key: 'street1',
|
|
3446
|
+
type: 'input',
|
|
3447
|
+
props: {
|
|
3448
|
+
label: 'scandoc.form.profile.address.street',
|
|
3449
|
+
},
|
|
3450
|
+
},
|
|
3451
|
+
],
|
|
3452
|
+
},
|
|
3453
|
+
],
|
|
3454
|
+
},
|
|
3455
|
+
],
|
|
3456
|
+
},
|
|
3457
|
+
].map((item) => this.translate.forms(item));
|
|
3458
|
+
}
|
|
3459
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocFieldsProvider, deps: [{ token: NgxScanDocTranslationProvider }, { token: ScanProvider }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3460
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocFieldsProvider, providedIn: 'root' }); }
|
|
3333
3461
|
}
|
|
3334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
3335
|
-
type:
|
|
3336
|
-
args: [{
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
<div class="selfie">
|
|
3341
|
-
<img *ngIf="model?._avatar" class="preview" [src]="model._avatar" />
|
|
3342
|
-
</div>
|
|
3343
|
-
<button (click)="selfie()" mat-raised-button>
|
|
3344
|
-
{{ 'scandoc.result.takeSelfie' | translate }}
|
|
3345
|
-
</button>
|
|
3346
|
-
</div>
|
|
3347
|
-
</mat-card>
|
|
3348
|
-
`, standalone: false, styles: ["mat-card{border-radius:0;box-shadow:none!important}\n"] }]
|
|
3349
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
3462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocFieldsProvider, decorators: [{
|
|
3463
|
+
type: Injectable,
|
|
3464
|
+
args: [{
|
|
3465
|
+
providedIn: 'root',
|
|
3466
|
+
}]
|
|
3467
|
+
}], ctorParameters: () => [{ type: NgxScanDocTranslationProvider }, { type: ScanProvider }] });
|
|
3350
3468
|
|
|
3351
|
-
class
|
|
3352
|
-
constructor(cd) {
|
|
3469
|
+
class ScanResultsComponent extends BaseComponent {
|
|
3470
|
+
constructor(cameraProvider, formProvider, provider, cd, zone) {
|
|
3353
3471
|
super();
|
|
3472
|
+
this.cameraProvider = cameraProvider;
|
|
3473
|
+
this.formProvider = formProvider;
|
|
3474
|
+
this.provider = provider;
|
|
3354
3475
|
this.cd = cd;
|
|
3476
|
+
this.zone = zone;
|
|
3477
|
+
this.action = new EventEmitter();
|
|
3355
3478
|
}
|
|
3356
3479
|
ngOnInit() {
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3480
|
+
console.time('fields');
|
|
3481
|
+
this.fields = this.formProvider.document();
|
|
3482
|
+
console.timeEnd('fields');
|
|
3483
|
+
this.__subs(this.data).subscribe((resp) => {
|
|
3484
|
+
this.zone.run(() => {
|
|
3485
|
+
switch (resp.type) {
|
|
3486
|
+
case 'avatar':
|
|
3487
|
+
this.model._avatar = resp.data;
|
|
3488
|
+
this.form = new FormGroup({});
|
|
3489
|
+
console.log(this.model);
|
|
3490
|
+
break;
|
|
3491
|
+
case 'model':
|
|
3492
|
+
this.model = resp.data;
|
|
3493
|
+
break;
|
|
3494
|
+
}
|
|
3495
|
+
console.timeEnd('results');
|
|
3496
|
+
this.cd.detectChanges();
|
|
3497
|
+
});
|
|
3498
|
+
});
|
|
3363
3499
|
}
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
<div class="card-title">
|
|
3367
|
-
{{ to.label }}
|
|
3368
|
-
</div>
|
|
3369
|
-
`, isInline: true, styles: [""] }); }
|
|
3370
|
-
}
|
|
3371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TitleTypeComponent, decorators: [{
|
|
3372
|
-
type: Component,
|
|
3373
|
-
args: [{ selector: 'app-formly-title-type', template: `
|
|
3374
|
-
<div class="card-title">
|
|
3375
|
-
{{ to.label }}
|
|
3376
|
-
</div>
|
|
3377
|
-
`, standalone: false }]
|
|
3378
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
3379
|
-
|
|
3380
|
-
class ProfileImageTypeComponent extends FieldType {
|
|
3381
|
-
constructor(cd, cameraProvider, scanProvider) {
|
|
3382
|
-
super();
|
|
3383
|
-
this.cd = cd;
|
|
3384
|
-
this.cameraProvider = cameraProvider;
|
|
3385
|
-
this.scanProvider = scanProvider;
|
|
3500
|
+
ngOnDestroy() {
|
|
3501
|
+
this.__destroy();
|
|
3386
3502
|
}
|
|
3387
3503
|
selfie() {
|
|
3388
|
-
this.
|
|
3389
|
-
}
|
|
3390
|
-
ngOnChange() { }
|
|
3391
|
-
ngAfterViewInit() { }
|
|
3392
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProfileImageTypeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: NgxScandocCameraProvider }, { token: ScanProvider }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3393
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ProfileImageTypeComponent, isStandalone: false, selector: "app-formly-profile-image-type", usesInheritance: true, ngImport: i0, template: `
|
|
3394
|
-
<mat-form-field>
|
|
3395
|
-
<mat-label>{{ 'scandoc.result.avatar' | translate }} </mat-label>
|
|
3396
|
-
<input matInput style="display:none" />
|
|
3397
|
-
<div class="selfieContainer">
|
|
3398
|
-
<div class="selfie">
|
|
3399
|
-
<img *ngIf="model?._avatar" class="preview" [src]="model._avatar" />
|
|
3400
|
-
</div>
|
|
3401
|
-
<button
|
|
3402
|
-
*ngIf="scanProvider.enableVerification"
|
|
3403
|
-
(click)="selfie()"
|
|
3404
|
-
mat-raised-button
|
|
3405
|
-
>
|
|
3406
|
-
{{ 'scandoc.result.takeSelfie' | translate }}
|
|
3407
|
-
</button>
|
|
3408
|
-
</div>
|
|
3409
|
-
</mat-form-field>
|
|
3410
|
-
`, isInline: true, styles: [".selfieContainer{display:flex;flex-direction:column;align-items:center;justify-content:center}.selfieContainer button{margin-top:6px;box-shadow:none!important;border:1px solid rgba(0,0,0,.12);text-transform:uppercase;font-size:12px}.selfie{width:126px;height:126px;border-radius:70px;background:#f5f5f5;display:flex;flex-direction:column;align-items:center;justify-content:center}.selfie img{width:120px;height:120px;border-radius:60px}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$3.MatLabel, selector: "mat-label" }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i4$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
3411
|
-
}
|
|
3412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProfileImageTypeComponent, decorators: [{
|
|
3413
|
-
type: Component,
|
|
3414
|
-
args: [{ selector: 'app-formly-profile-image-type', template: `
|
|
3415
|
-
<mat-form-field>
|
|
3416
|
-
<mat-label>{{ 'scandoc.result.avatar' | translate }} </mat-label>
|
|
3417
|
-
<input matInput style="display:none" />
|
|
3418
|
-
<div class="selfieContainer">
|
|
3419
|
-
<div class="selfie">
|
|
3420
|
-
<img *ngIf="model?._avatar" class="preview" [src]="model._avatar" />
|
|
3421
|
-
</div>
|
|
3422
|
-
<button
|
|
3423
|
-
*ngIf="scanProvider.enableVerification"
|
|
3424
|
-
(click)="selfie()"
|
|
3425
|
-
mat-raised-button
|
|
3426
|
-
>
|
|
3427
|
-
{{ 'scandoc.result.takeSelfie' | translate }}
|
|
3428
|
-
</button>
|
|
3429
|
-
</div>
|
|
3430
|
-
</mat-form-field>
|
|
3431
|
-
`, standalone: false, styles: [".selfieContainer{display:flex;flex-direction:column;align-items:center;justify-content:center}.selfieContainer button{margin-top:6px;box-shadow:none!important;border:1px solid rgba(0,0,0,.12);text-transform:uppercase;font-size:12px}.selfie{width:126px;height:126px;border-radius:70px;background:#f5f5f5;display:flex;flex-direction:column;align-items:center;justify-content:center}.selfie img{width:120px;height:120px;border-radius:60px}\n"] }]
|
|
3432
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: NgxScandocCameraProvider }, { type: ScanProvider }] });
|
|
3433
|
-
|
|
3434
|
-
class AppFormModule {
|
|
3435
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3436
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: AppFormModule, declarations: [TitleTypeComponent,
|
|
3437
|
-
AvatarTypeComponent,
|
|
3438
|
-
ProfileImageTypeComponent], imports: [CommonModule,
|
|
3439
|
-
FormsModule,
|
|
3440
|
-
FormlyMatDatepickerModule,
|
|
3441
|
-
FormlySelectModule,
|
|
3442
|
-
MaterialModule,
|
|
3443
|
-
AvatarModule,
|
|
3444
|
-
TranslateModule,
|
|
3445
|
-
FormlyMaterialModule, i7.FormlyModule], exports: [FormlyModule] }); }
|
|
3446
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppFormModule, imports: [CommonModule,
|
|
3447
|
-
FormsModule,
|
|
3448
|
-
FormlyMatDatepickerModule,
|
|
3449
|
-
FormlySelectModule,
|
|
3450
|
-
MaterialModule,
|
|
3451
|
-
AvatarModule,
|
|
3452
|
-
TranslateModule,
|
|
3453
|
-
FormlyMaterialModule,
|
|
3454
|
-
FormlyModule.forChild({
|
|
3455
|
-
types: [
|
|
3456
|
-
{
|
|
3457
|
-
name: 'title',
|
|
3458
|
-
component: TitleTypeComponent,
|
|
3459
|
-
wrappers: [],
|
|
3460
|
-
},
|
|
3461
|
-
{
|
|
3462
|
-
name: 'profile-image',
|
|
3463
|
-
component: ProfileImageTypeComponent,
|
|
3464
|
-
wrappers: [],
|
|
3465
|
-
},
|
|
3466
|
-
],
|
|
3467
|
-
}), FormlyModule] }); }
|
|
3468
|
-
}
|
|
3469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppFormModule, decorators: [{
|
|
3470
|
-
type: NgModule,
|
|
3471
|
-
args: [{
|
|
3472
|
-
declarations: [
|
|
3473
|
-
TitleTypeComponent,
|
|
3474
|
-
AvatarTypeComponent,
|
|
3475
|
-
ProfileImageTypeComponent,
|
|
3476
|
-
],
|
|
3477
|
-
imports: [
|
|
3478
|
-
CommonModule,
|
|
3479
|
-
FormsModule,
|
|
3480
|
-
FormlyMatDatepickerModule,
|
|
3481
|
-
FormlySelectModule,
|
|
3482
|
-
MaterialModule,
|
|
3483
|
-
AvatarModule,
|
|
3484
|
-
TranslateModule,
|
|
3485
|
-
FormlyMaterialModule,
|
|
3486
|
-
FormlyModule.forChild({
|
|
3487
|
-
types: [
|
|
3488
|
-
{
|
|
3489
|
-
name: 'title',
|
|
3490
|
-
component: TitleTypeComponent,
|
|
3491
|
-
wrappers: [],
|
|
3492
|
-
},
|
|
3493
|
-
{
|
|
3494
|
-
name: 'profile-image',
|
|
3495
|
-
component: ProfileImageTypeComponent,
|
|
3496
|
-
wrappers: [],
|
|
3497
|
-
},
|
|
3498
|
-
],
|
|
3499
|
-
}),
|
|
3500
|
-
],
|
|
3501
|
-
providers: [],
|
|
3502
|
-
exports: [FormlyModule],
|
|
3503
|
-
}]
|
|
3504
|
-
}] });
|
|
3505
|
-
|
|
3506
|
-
class CameraSwitchComponent {
|
|
3507
|
-
constructor(cameraProvider) {
|
|
3508
|
-
this.cameraProvider = cameraProvider;
|
|
3509
|
-
}
|
|
3510
|
-
ngAfterViewInit() {
|
|
3511
|
-
// this.cameraProvider.setDefault();
|
|
3504
|
+
this.action.emit({ selfie: true });
|
|
3512
3505
|
}
|
|
3513
|
-
|
|
3514
|
-
static { this.ɵ
|
|
3515
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CameraSwitchComponent, isStandalone: false, selector: "ngx-scan-camera-switch", ngImport: i0, template: "<mat-form-field\n style=\"font-size: 14px; margin-top: 8px\"\n class=\"w-100-p 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"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$3.MatLabel, selector: "mat-label" }, { kind: "component", type: i5$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
3506
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanResultsComponent, deps: [{ token: NgxScandocCameraProvider }, { token: NgxScandocFieldsProvider }, { token: ScanProvider }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3507
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ScanResultsComponent, isStandalone: false, selector: "ngx-scan-results", inputs: { data: "data", images: "images", form: "form" }, outputs: { action: "action" }, usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"model\" class=\"wraper\">\n <div style=\"flex: 1\">\n\n\n <form class=\"py-0 w-100-p\" [formGroup]=\"form\">\n <formly-form fxFlex [form]=\"form\" [fields]=\"fields\" [model]=\"model\">\n </formly-form>\n </form>\n </div>\n <div style=\"flex: 1\" >\n <mat-card appearance=\"outlined\" style=\"margin:0px 4px; padding: 16px\" class=\"images\">\n <h3>{{ \"scandoc.result.images\" | translate }}</h3>\n <ng-container *ngFor=\"let img of model.images\">\n <div fxLayout=\"column\">\n <ng-container *ngIf=\"img.side === 0\">\n <div class=\"title\">\n {{ \"scandoc.result.frontSide\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"img.side === 1\">\n <div class=\"title\">{{ \"scandoc.result.backSide\" | translate }}</div>\n </ng-container>\n <img\n class=\"preview\"\n style=\"max-width: 460px; border-radius: 1rem\"\n [src]=\"img.data\"\n />\n </div>\n </ng-container>\n </mat-card>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;overflow-y:auto;overflow-x:hidden}.images .title{padding:8px 0;font-weight:600}.images img{margin-bottom:16px;width:100%}.wraper{padding:4px;flex:1;display:flex;flex-direction:row}mat-card{box-shadow:none!important}.selfieContainer{display:flex;flex-direction:row;align-items:center}.selfieContainer .selfie{width:150px}.selfieContainer .selfie .preview{width:120px;height:120px;border-radius:80px}.selfieContainer .button{box-shadow:none;border:1px solid rgba(0,0,0,.1)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i5.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i1$2.LegacyFormlyForm, selector: "formly-form" }, { kind: "directive", type: i5$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
3516
3508
|
}
|
|
3517
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type:
|
|
3509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanResultsComponent, decorators: [{
|
|
3518
3510
|
type: Component,
|
|
3519
|
-
args: [{ selector: 'ngx-scan-
|
|
3520
|
-
}], ctorParameters: () => [{ type: NgxScandocCameraProvider }]
|
|
3511
|
+
args: [{ selector: 'ngx-scan-results', standalone: false, template: "<div *ngIf=\"model\" class=\"wraper\">\n <div style=\"flex: 1\">\n\n\n <form class=\"py-0 w-100-p\" [formGroup]=\"form\">\n <formly-form fxFlex [form]=\"form\" [fields]=\"fields\" [model]=\"model\">\n </formly-form>\n </form>\n </div>\n <div style=\"flex: 1\" >\n <mat-card appearance=\"outlined\" style=\"margin:0px 4px; padding: 16px\" class=\"images\">\n <h3>{{ \"scandoc.result.images\" | translate }}</h3>\n <ng-container *ngFor=\"let img of model.images\">\n <div fxLayout=\"column\">\n <ng-container *ngIf=\"img.side === 0\">\n <div class=\"title\">\n {{ \"scandoc.result.frontSide\" | translate }}\n </div>\n </ng-container>\n <ng-container *ngIf=\"img.side === 1\">\n <div class=\"title\">{{ \"scandoc.result.backSide\" | translate }}</div>\n </ng-container>\n <img\n class=\"preview\"\n style=\"max-width: 460px; border-radius: 1rem\"\n [src]=\"img.data\"\n />\n </div>\n </ng-container>\n </mat-card>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column!important;flex:1;overflow-y:auto;overflow-x:hidden}.images .title{padding:8px 0;font-weight:600}.images img{margin-bottom:16px;width:100%}.wraper{padding:4px;flex:1;display:flex;flex-direction:row}mat-card{box-shadow:none!important}.selfieContainer{display:flex;flex-direction:row;align-items:center}.selfieContainer .selfie{width:150px}.selfieContainer .selfie .preview{width:120px;height:120px;border-radius:80px}.selfieContainer .button{box-shadow:none;border:1px solid rgba(0,0,0,.1)}\n"] }]
|
|
3512
|
+
}], ctorParameters: () => [{ type: NgxScandocCameraProvider }, { type: NgxScandocFieldsProvider }, { type: ScanProvider }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { data: [{
|
|
3513
|
+
type: Input
|
|
3514
|
+
}], images: [{
|
|
3515
|
+
type: Input
|
|
3516
|
+
}], form: [{
|
|
3517
|
+
type: Input
|
|
3518
|
+
}], action: [{
|
|
3519
|
+
type: Output
|
|
3520
|
+
}] } });
|
|
3521
3521
|
|
|
3522
3522
|
//import { NgxScandocCameraProvider } from '../../providers/camera.provider';
|
|
3523
3523
|
class CoreComponentsModule {
|
|
@@ -3586,7 +3586,7 @@ class SafeResourceUrlPipe {
|
|
|
3586
3586
|
// return this.sanitizer.bypassSecurityTrustStyle(style);
|
|
3587
3587
|
// return this.sanitizer.bypassSecurityTrustXxx(style); - see docs
|
|
3588
3588
|
}
|
|
3589
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SafeResourceUrlPipe, deps: [{ token: i1$
|
|
3589
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SafeResourceUrlPipe, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3590
3590
|
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: SafeResourceUrlPipe, isStandalone: false, name: "safeResourceUrl" }); }
|
|
3591
3591
|
}
|
|
3592
3592
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SafeResourceUrlPipe, decorators: [{
|
|
@@ -3595,7 +3595,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
3595
3595
|
name: 'safeResourceUrl',
|
|
3596
3596
|
standalone: false
|
|
3597
3597
|
}]
|
|
3598
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3598
|
+
}], ctorParameters: () => [{ type: i1$3.DomSanitizer }] });
|
|
3599
3599
|
|
|
3600
3600
|
class CorePipesModule {
|
|
3601
3601
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CorePipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -3667,13 +3667,13 @@ class ScanProfileComponent extends BaseComponent {
|
|
|
3667
3667
|
close() {
|
|
3668
3668
|
this.dialogRef?.close();
|
|
3669
3669
|
}
|
|
3670
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanProfileComponent, deps: [{ token: NgxScandocCameraProvider }, { token: ScanProvider }, { token: i1$
|
|
3670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanProfileComponent, deps: [{ token: NgxScandocCameraProvider }, { token: ScanProvider }, { token: i1$4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3671
3671
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ScanProfileComponent, isStandalone: false, selector: "ngx-scandoc-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;overflow:hidden;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: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$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] ", exportAs: ["matButton"] }, { kind: "component", type: ScanComponent, selector: "ngx-scan", inputs: ["type", "dialogs", "refresh", "showDialog"], outputs: ["actions"] }, { kind: "component", type: CameraSwitchComponent, selector: "ngx-scan-camera-switch" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3672
3672
|
}
|
|
3673
3673
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanProfileComponent, decorators: [{
|
|
3674
3674
|
type: Component,
|
|
3675
3675
|
args: [{ selector: 'ngx-scandoc-profile', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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;overflow:hidden;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"] }]
|
|
3676
|
-
}], ctorParameters: () => [{ type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: i1$
|
|
3676
|
+
}], ctorParameters: () => [{ type: NgxScandocCameraProvider }, { type: ScanProvider }, { type: i1$4.MatDialogRef }, { type: undefined, decorators: [{
|
|
3677
3677
|
type: Inject,
|
|
3678
3678
|
args: [MAT_DIALOG_DATA]
|
|
3679
3679
|
}] }], propDecorators: { type: [{
|
|
@@ -3711,13 +3711,13 @@ class BlankComponent {
|
|
|
3711
3711
|
this.init();
|
|
3712
3712
|
}
|
|
3713
3713
|
}
|
|
3714
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BlankComponent, deps: [{ token: i1$
|
|
3714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BlankComponent, deps: [{ token: i1$4.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3715
3715
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: BlankComponent, isStandalone: false, selector: "ngx-scandoc-blank", viewQueries: [{ propertyName: "body", first: true, predicate: ["body"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-template #body></ng-template>\n", styles: [":host{display:flex;flex:1;flex-direction:column;overflow:hidden;height:100%}\n"] }); }
|
|
3716
3716
|
}
|
|
3717
3717
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BlankComponent, decorators: [{
|
|
3718
3718
|
type: Component,
|
|
3719
3719
|
args: [{ selector: 'ngx-scandoc-blank', standalone: false, template: "<ng-template #body></ng-template>\n", styles: [":host{display:flex;flex:1;flex-direction:column;overflow:hidden;height:100%}\n"] }]
|
|
3720
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3720
|
+
}], ctorParameters: () => [{ type: i1$4.MatDialogRef }, { type: undefined, decorators: [{
|
|
3721
3721
|
type: Inject,
|
|
3722
3722
|
args: [MAT_DIALOG_DATA]
|
|
3723
3723
|
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { body: [{
|
|
@@ -3761,13 +3761,13 @@ class ConfirmComponent {
|
|
|
3761
3761
|
this.dialogRef.close(key);
|
|
3762
3762
|
}
|
|
3763
3763
|
close() { }
|
|
3764
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmComponent, deps: [{ token: i1$
|
|
3764
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmComponent, deps: [{ token: i1$4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3765
3765
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ConfirmComponent, isStandalone: false, selector: "ngx-scandoc-confirm", host: { listeners: { "document:keyup.enter": "onEnterPress($event)", "document:keyup.escape": "onEscapePress($event)" } }, ngImport: i0, template: "<header class=\"page-header\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div class=\"title\" ngClass.lt-sm=\"title-small\">\n {{ data.title | translate }}\n\n <!-- {{ data.text.statusText }} {{ data.text.status }} -->\n </div>\n\n <span fxFlex></span>\n\n <!-- <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button> -->\n <!-- <mat-icon class=\"mr-16\" style=\"color:#888;\">info_outline</mat-icon> -->\n</header>\n\n<div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <div class=\"text\" *ngIf=\"data.text\">\n <span [innerHtml]=\"data.text\"></span>\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <div class=\"actions\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button\n *ngIf=\"!data.alert && !options?.hideCancelButton\"\n (click)=\"action(false)\"\n mat-raised-button\n >\n {{ data.cancel || \"scandoc.cancel\" | translate }}\n </button>\n\n <button\n *ngIf=\"data.no && !options?.hideNoButton\"\n (click)=\"action('no')\"\n mat-raised-button\n >\n {{ data.no }}\n </button>\n <button\n *ngIf=\"!data.hideOkButton && !options?.hideOkButton\"\n (click)=\"action(true)\"\n mat-raised-button\n >\n <ng-container *ngIf=\"!data.alert\">\n {{ data.ok || \"scandoc.confirm\" | translate }}\n </ng-container>\n\n <ng-container *ngIf=\"data.alert\">\n {{ data.ok || \"scandoc.ok\" | translate }}\n </ng-container>\n </button>\n </div>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.title{font-size:18px}.text{padding:0 30px;text-align:center;font-size:16px;margin:40px 0}.actions{min-height:60px;padding:0 20px}.actions button{min-width:120px;margin-right:16px;text-transform:uppercase;box-shadow:none;border:1px solid rgba(0,0,0,.12)}footer{background-color:#fff}footer button{box-shadow:none!important;border:1px solid rgba(0,0,0,.12);font-size:13px}\n", ".page-header{z-index:2000;height:64px;padding:0;overflow:hidden;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: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
3766
3766
|
}
|
|
3767
3767
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ConfirmComponent, decorators: [{
|
|
3768
3768
|
type: Component,
|
|
3769
3769
|
args: [{ selector: 'ngx-scandoc-confirm', standalone: false, template: "<header class=\"page-header\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <div class=\"title\" ngClass.lt-sm=\"title-small\">\n {{ data.title | translate }}\n\n <!-- {{ data.text.statusText }} {{ data.text.status }} -->\n </div>\n\n <span fxFlex></span>\n\n <!-- <div class=\"separator\"></div>\n\n <button mat-button (click)=\"close()\">\n <mat-icon>close</mat-icon>\n </button> -->\n <!-- <mat-icon class=\"mr-16\" style=\"color:#888;\">info_outline</mat-icon> -->\n</header>\n\n<div fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <div class=\"text\" *ngIf=\"data.text\">\n <span [innerHtml]=\"data.text\"></span>\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <div class=\"actions\" fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button\n *ngIf=\"!data.alert && !options?.hideCancelButton\"\n (click)=\"action(false)\"\n mat-raised-button\n >\n {{ data.cancel || \"scandoc.cancel\" | translate }}\n </button>\n\n <button\n *ngIf=\"data.no && !options?.hideNoButton\"\n (click)=\"action('no')\"\n mat-raised-button\n >\n {{ data.no }}\n </button>\n <button\n *ngIf=\"!data.hideOkButton && !options?.hideOkButton\"\n (click)=\"action(true)\"\n mat-raised-button\n >\n <ng-container *ngIf=\"!data.alert\">\n {{ data.ok || \"scandoc.confirm\" | translate }}\n </ng-container>\n\n <ng-container *ngIf=\"data.alert\">\n {{ data.ok || \"scandoc.ok\" | translate }}\n </ng-container>\n </button>\n </div>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.title{font-size:18px}.text{padding:0 30px;text-align:center;font-size:16px;margin:40px 0}.actions{min-height:60px;padding:0 20px}.actions button{min-width:120px;margin-right:16px;text-transform:uppercase;box-shadow:none;border:1px solid rgba(0,0,0,.12)}footer{background-color:#fff}footer button{box-shadow:none!important;border:1px solid rgba(0,0,0,.12);font-size:13px}\n", ".page-header{z-index:2000;height:64px;padding:0;overflow:hidden;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"] }]
|
|
3770
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3770
|
+
}], ctorParameters: () => [{ type: i1$4.MatDialogRef }, { type: undefined, decorators: [{
|
|
3771
3771
|
type: Inject,
|
|
3772
3772
|
args: [MAT_DIALOG_DATA]
|
|
3773
3773
|
}] }], propDecorators: { onEnterPress: [{
|
|
@@ -3846,13 +3846,13 @@ class ScanSelfieComponent extends BaseComponent {
|
|
|
3846
3846
|
close() {
|
|
3847
3847
|
this.dialogRef.close(null);
|
|
3848
3848
|
}
|
|
3849
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanSelfieComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$
|
|
3849
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanSelfieComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$4.MatDialogRef }, { token: NgxScandocCameraProvider }, { token: ScanProvider }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3850
3850
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ScanSelfieComponent, isStandalone: false, selector: "ngx-scandoc-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;overflow:hidden;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: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$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] ", 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", "refresh"], outputs: ["cameraSwitched", "videoReady", "imageCapture", "initError"] }, { kind: "component", type: CameraSwitchComponent, selector: "ngx-scan-camera-switch" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3851
3851
|
}
|
|
3852
3852
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ScanSelfieComponent, decorators: [{
|
|
3853
3853
|
type: Component,
|
|
3854
3854
|
args: [{ selector: 'ngx-scandoc-selfie', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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;overflow:hidden;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"] }]
|
|
3855
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$
|
|
3855
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$4.MatDialogRef }, { type: NgxScandocCameraProvider }, { type: ScanProvider }], propDecorators: { actions: [{
|
|
3856
3856
|
type: Output
|
|
3857
3857
|
}] } });
|
|
3858
3858
|
|
|
@@ -3868,13 +3868,13 @@ class TurnDocumentComponent {
|
|
|
3868
3868
|
console.log(this.dialogRef);
|
|
3869
3869
|
this.dialogRef.close();
|
|
3870
3870
|
}
|
|
3871
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TurnDocumentComponent, deps: [{ token: i1$
|
|
3871
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TurnDocumentComponent, deps: [{ token: i1$4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3872
3872
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TurnDocumentComponent, isStandalone: false, selector: "ngx-scandoc-turn-document", ngImport: i0, template: "<div class=\"inner\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"data.idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"data.idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <button (click)=\"close()\" mat-raised-button>Ok</button>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.inner{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 20px 0}.inner mat-icon{width:60px;height:60px;font-size:60px}.inner .text{margin:20px 0}footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$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] ", exportAs: ["matButton"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
3873
3873
|
}
|
|
3874
3874
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TurnDocumentComponent, decorators: [{
|
|
3875
3875
|
type: Component,
|
|
3876
3876
|
args: [{ selector: 'ngx-scandoc-turn-document', standalone: false, template: "<div class=\"inner\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <mat-icon>360</mat-icon>\n <div class=\"text\">\n <ng-container *ngIf=\"data.idScan === 'BACK'\">\n {{ \"scandoc.turnAndCapture.back\" | translate }}\n </ng-container>\n <ng-container *ngIf=\"data.idScan === 'FRONT'\">\n {{ \"scandoc.turnAndCapture.front\" | translate }}\n </ng-container>\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <button (click)=\"close()\" mat-raised-button>Ok</button>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.inner{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 20px 0}.inner mat-icon{width:60px;height:60px;font-size:60px}.inner .text{margin:20px 0}footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:20px}footer button{min-width:200px;box-shadow:none;border:1px solid #ccc}\n"] }]
|
|
3877
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3877
|
+
}], ctorParameters: () => [{ type: i1$4.MatDialogRef }, { type: undefined, decorators: [{
|
|
3878
3878
|
type: Inject,
|
|
3879
3879
|
args: [MAT_DIALOG_DATA]
|
|
3880
3880
|
}] }] });
|
|
@@ -3891,13 +3891,13 @@ class PromptManualComponent {
|
|
|
3891
3891
|
console.log(this.dialogRef);
|
|
3892
3892
|
this.dialogRef.close(key);
|
|
3893
3893
|
}
|
|
3894
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PromptManualComponent, deps: [{ token: i1$
|
|
3894
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PromptManualComponent, deps: [{ token: i1$4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3895
3895
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: PromptManualComponent, isStandalone: false, selector: "ngx-scandoc-prompt-manual", ngImport: i0, template: "<div class=\"inner\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <mat-icon>screenshot_keyboard</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <button style=\"margin-right: 8px\" (click)=\"close(true)\" mat-raised-button>\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button style=\"margin-left: 8px\" (click)=\"close(false)\" mat-raised-button>\n {{ \"scandoc.no\" | translate }}\n </button>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.inner{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 20px 0}.inner mat-icon{width:60px;height:60px;font-size:60px}.inner .text{margin:20px 0}footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:10px}footer button{max-width:120px;box-shadow:none;border:1px solid #ccc;flex:1}\n"], dependencies: [{ kind: "component", type: i5$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] ", exportAs: ["matButton"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] }); }
|
|
3896
3896
|
}
|
|
3897
3897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PromptManualComponent, decorators: [{
|
|
3898
3898
|
type: Component,
|
|
3899
3899
|
args: [{ selector: 'ngx-scandoc-prompt-manual', standalone: false, template: "<div class=\"inner\" fxLayout=\"column\" fxLayoutAlign=\"center center\">\n <!-- <img\n style=\"height: 240px; margin: 34px 0px;display: none;\"\n [src]=\"'/assets/images/illustrations/' + images[type]\"\n /> -->\n <!-- <img style=\"width:60px;\" src=\"/assets/images/illustrations/door-lock.png\"> -->\n\n <mat-icon>screenshot_keyboard</mat-icon>\n <div class=\"text\">\n {{ \"scandoc.manual\" | translate }}\n </div>\n</div>\n\n<!-- -->\n\n<footer>\n <button style=\"margin-right: 8px\" (click)=\"close(true)\" mat-raised-button>\n {{ \"scandoc.yes\" | translate }}\n </button>\n <button style=\"margin-left: 8px\" (click)=\"close(false)\" mat-raised-button>\n {{ \"scandoc.no\" | translate }}\n </button>\n</footer>\n", styles: [":host{display:flex;flex-direction:column;flex:1;height:100%;width:100%}.inner{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 20px 0}.inner mat-icon{width:60px;height:60px;font-size:60px}.inner .text{margin:20px 0}footer{display:flex;flex-direction:row;align-items:center;justify-content:center;padding-bottom:10px}footer button{max-width:120px;box-shadow:none;border:1px solid #ccc;flex:1}\n"] }]
|
|
3900
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3900
|
+
}], ctorParameters: () => [{ type: i1$4.MatDialogRef }, { type: undefined, decorators: [{
|
|
3901
3901
|
type: Inject,
|
|
3902
3902
|
args: [MAT_DIALOG_DATA]
|
|
3903
3903
|
}] }] });
|
|
@@ -4003,7 +4003,7 @@ class NgxScandocDialogsCoreProvider {
|
|
|
4003
4003
|
data,
|
|
4004
4004
|
});
|
|
4005
4005
|
}
|
|
4006
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocDialogsCoreProvider, deps: [{ token: i1$
|
|
4006
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocDialogsCoreProvider, deps: [{ token: i1$4.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4007
4007
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocDialogsCoreProvider, providedIn: 'root' }); }
|
|
4008
4008
|
}
|
|
4009
4009
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxScandocDialogsCoreProvider, decorators: [{
|
|
@@ -4011,7 +4011,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
4011
4011
|
args: [{
|
|
4012
4012
|
providedIn: 'root',
|
|
4013
4013
|
}]
|
|
4014
|
-
}], ctorParameters: () => [{ type: i1$
|
|
4014
|
+
}], ctorParameters: () => [{ type: i1$4.MatDialog }] });
|
|
4015
4015
|
|
|
4016
4016
|
//import { NgxScandocCameraProvider } from '../providers/camera.provider';
|
|
4017
4017
|
//import { NgxScandocCameraProvider } from '../providers/camera.provider';
|