@qbs-origin/origin-form 0.8.5 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,13 @@
1
- import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
3
  import { FieldType } from '@ngx-formly/core';
4
4
  import { ApplicationDataService } from '../../services/applicationData.service';
5
5
  import * as i0 from "@angular/core";
6
- export declare class FormlyScanIdComponent extends FieldType implements OnInit {
6
+ export interface WizardStep {
7
+ label: string;
8
+ status: 'upcoming' | 'active' | 'completed';
9
+ }
10
+ export declare class FormlyScanIdComponent extends FieldType implements OnInit, OnDestroy {
7
11
  private appDataService;
8
12
  private cdr;
9
13
  control: FormControl;
@@ -20,19 +24,49 @@ export declare class FormlyScanIdComponent extends FieldType implements OnInit {
20
24
  photoBase64Back: string;
21
25
  isLoading: boolean;
22
26
  successMessage: string | null;
23
- fileInputFront: ElementRef;
24
- fileInputBack: ElementRef;
25
- videoElement: ElementRef;
26
- videoStream: MediaStream | null;
27
27
  isScanValid: boolean;
28
+ currentWizardStep: number;
29
+ wizardSteps: WizardStep[];
30
+ cameraActive: boolean;
31
+ availableCameras: MediaDeviceInfo[];
32
+ selectedCameraId: string;
33
+ photoPreviewFront: string;
34
+ photoPreviewBack: string;
35
+ isDragOver: boolean;
36
+ showFlash: boolean;
37
+ canRetry: boolean;
38
+ fileInput: ElementRef<HTMLInputElement>;
39
+ videoElement: ElementRef<HTMLVideoElement>;
40
+ videoStream: MediaStream | null;
41
+ private valueChangesSub?;
28
42
  constructor(appDataService: ApplicationDataService, cdr: ChangeDetectorRef);
29
43
  ngOnInit(): void;
44
+ ngOnDestroy(): void;
45
+ get currentPhotoPreview(): string;
46
+ get currentStepLabel(): string;
47
+ get currentStepShortLabel(): string;
48
+ private initWizardSteps;
49
+ private updateWizardSteps;
50
+ goBack(): void;
51
+ goToStep(stepIndex: number): void;
30
52
  selectCardType(isOldIdCard: boolean): void;
31
- onFileSelected(event: any, isFront: boolean): void;
32
- takePicture(): void;
33
- startCamera(deviceId: string): void;
34
- capturePhoto(isFront: boolean): void;
53
+ onFileSelected(event: Event): void;
54
+ private processFile;
55
+ onDragOver(event: DragEvent): void;
56
+ onDragLeave(event: DragEvent): void;
57
+ onDrop(event: DragEvent): void;
58
+ openCamera(): Promise<void>;
59
+ switchCamera(deviceId: string): Promise<void>;
60
+ private startCameraStream;
61
+ private stopCameraStream;
62
+ private stopCamera;
63
+ closeCamera(): void;
64
+ captureCurrentPhoto(): void;
65
+ private triggerFlash;
66
+ confirmPhoto(): void;
67
+ resetCurrentPhoto(): void;
35
68
  uploadPhoto(): void;
69
+ retryUpload(): void;
36
70
  resetForm(preserveError?: boolean): void;
37
71
  checkUploadCondition(): void;
38
72
  private extractStatusFromAppData;
@@ -10,6 +10,9 @@ export declare class FormlySignComponent extends BaseFormlyStepComponent impleme
10
10
  private dialog;
11
11
  signLib: SignLibComponent;
12
12
  canProceed: boolean;
13
+ isInitializing: boolean;
14
+ initError: string | null;
15
+ isSignComplete: boolean;
13
16
  private _signButtonStyle;
14
17
  config: any;
15
18
  configService: ConfigService;
@@ -17,6 +20,7 @@ export declare class FormlySignComponent extends BaseFormlyStepComponent impleme
17
20
  onInit(): void;
18
21
  onPageSelectedAsync(): Promise<void>;
19
22
  retryAsync(): Promise<void>;
23
+ retryInit(): Promise<void>;
20
24
  getConfig(): Promise<{
21
25
  AppDataId: any;
22
26
  StepId: string;
@@ -15,6 +15,7 @@ export declare class FormlyViewDocumentsComponent extends BaseFormlyControlCompo
15
15
  currentPdf: any;
16
16
  currentDocument: GeneratedDocument;
17
17
  cachedDocuments: any;
18
+ docError: string | null;
18
19
  constructor(appDataService: ApplicationDataService, dialog: DialogService, cdr: ChangeDetectorRef);
19
20
  onInit(): void;
20
21
  getDocuments(): void;
@@ -6,7 +6,7 @@ export declare class OriginFormAuthService {
6
6
  private tokenSubject;
7
7
  private refreshTokenSubject;
8
8
  constructor(authClient: AuthenticationClient);
9
- setTokens(token: string, refreshToken: string): Promise<string>;
9
+ setTokens(token: string, refreshToken: string): Promise<void>;
10
10
  getToken(): string;
11
11
  refreshToken(): Observable<string>;
12
12
  tokenObservable(): Observable<string>;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@qbs-origin/origin-form",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
4
4
  "dependencies": {
5
- "@qbs-origin/sign-lib": "^2.1.22",
5
+ "@qbs-origin/sign-lib": "^2.1.24",
6
6
  "@ekyc_qoobiss/qbs-ect-cmp": "^5.3.2",
7
7
  "tslib": "^2.8.1"
8
8
  },