@regulaforensics/idv-gui 3.10.573-nightly → 3.10.575-rc
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/dist/index.d.ts +47 -78
- package/dist/main.iife.js +3 -3
- package/dist/main.js +2179 -2570
- package/dist/main.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { BaseModule } from '../../interfaces-idv/src';
|
|
2
|
-
import { FailedAssets } from '../../interfaces-idv/src';
|
|
3
1
|
import { FunctionComponent } from 'preact';
|
|
4
|
-
import { IdvModuleProps } from '../../interfaces-idv/src';
|
|
5
|
-
import { ImageBase } from '../../interfaces-idv/src';
|
|
6
2
|
import { JSX } from 'preact';
|
|
7
3
|
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
declare type CLIENT_VALIDATOR_TYPE = (typeof CLIENT_VALIDATOR_TYPE)[keyof typeof CLIENT_VALIDATOR_TYPE];
|
|
4
|
+
declare abstract class BaseModule<TModuleProps = unknown, TModulesConfig = unknown> extends HTMLElement {
|
|
5
|
+
abstract props: IdvModuleProps<TModuleProps, TModulesConfig> | null;
|
|
6
|
+
abstract setProps(config: IdvModuleProps<TModuleProps, TModulesConfig>): void;
|
|
7
|
+
}
|
|
14
8
|
|
|
15
9
|
declare const ContentMode: {
|
|
16
10
|
readonly ASPECT_FILL: "ASPECT_FILL";
|
|
@@ -38,6 +32,12 @@ declare type DropdownControl = {
|
|
|
38
32
|
expandButton?: UIImage;
|
|
39
33
|
};
|
|
40
34
|
|
|
35
|
+
declare type FailedAssets = {
|
|
36
|
+
imageURL: Set<string>;
|
|
37
|
+
base64: Set<string>;
|
|
38
|
+
blockingAssets: Set<string>;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
41
|
declare const FontWeight: {
|
|
42
42
|
readonly NORMAL: "NORMAL";
|
|
43
43
|
readonly BOLD: "BOLD";
|
|
@@ -45,11 +45,6 @@ declare const FontWeight: {
|
|
|
45
45
|
|
|
46
46
|
declare type FontWeight = (typeof FontWeight)[keyof typeof FontWeight];
|
|
47
47
|
|
|
48
|
-
declare type GenericPopup = {
|
|
49
|
-
rootElement: UIRootElement;
|
|
50
|
-
reason: string;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
48
|
export declare class GuiIdv extends BaseModule<GuiModuleProps, GuiModuleConfig> {
|
|
54
49
|
private _mounted;
|
|
55
50
|
private _shadowRoot;
|
|
@@ -66,13 +61,13 @@ export declare class GuiIdv extends BaseModule<GuiModuleProps, GuiModuleConfig>
|
|
|
66
61
|
private render;
|
|
67
62
|
disconnectedCallback(): void;
|
|
68
63
|
static isReady(): boolean;
|
|
69
|
-
static getSupportedTemplates: () => ("INFO" | "INFO_DETAILS" | "STATUS" | "PROGRESS" | "QUESTIONS" | "CAMERA" | "GALLERY" | "GEOLOCATION" | "DEVICE_TRANSFER" | "GENERIC" | "
|
|
64
|
+
static getSupportedTemplates: () => ("INFO" | "INFO_DETAILS" | "STATUS" | "PROGRESS" | "QUESTIONS" | "CAMERA" | "GALLERY" | "GEOLOCATION" | "DEVICE_TRANSFER" | "GENERIC" | "UPLOAD_FILES")[];
|
|
70
65
|
static initialize(_modulesConfig: Record<string, unknown>): void;
|
|
71
66
|
static deinitialize(): void;
|
|
72
67
|
static getIdentifier: () => string;
|
|
73
68
|
}
|
|
74
69
|
|
|
75
|
-
export declare const GuiIdvReactComponent: ({ isProcessing: setIsProcessingCallback, moduleProps, perform, devSettings,
|
|
70
|
+
export declare const GuiIdvReactComponent: ({ isProcessing: setIsProcessingCallback, moduleProps, perform, devSettings, }: IdvModuleProps<GuiModuleProps, GuiModuleConfig> & {
|
|
76
71
|
devSettings?: GuiModuleDevSettings;
|
|
77
72
|
}) => JSX.Element;
|
|
78
73
|
|
|
@@ -87,8 +82,6 @@ export declare const GuiIdvSteps: {
|
|
|
87
82
|
readonly GEOLOCATION: "GEOLOCATION";
|
|
88
83
|
readonly DEVICE_TRANSFER: "DEVICE_TRANSFER";
|
|
89
84
|
readonly GENERIC: "GENERIC";
|
|
90
|
-
readonly GENERIC_LOCATION: "GENERIC_LOCATION";
|
|
91
|
-
readonly GENERIC_PROGRESS: "GENERIC_PROGRESS";
|
|
92
85
|
readonly UPLOAD_FILES: "UPLOAD_FILES";
|
|
93
86
|
};
|
|
94
87
|
|
|
@@ -112,7 +105,6 @@ export declare type GuiModuleDevSettings = {
|
|
|
112
105
|
progressBarRange?: number;
|
|
113
106
|
name?: string;
|
|
114
107
|
serverError?: string;
|
|
115
|
-
size?: number;
|
|
116
108
|
}[];
|
|
117
109
|
};
|
|
118
110
|
};
|
|
@@ -154,7 +146,6 @@ export declare type GuiModuleProps = {
|
|
|
154
146
|
templateId: typeof GuiIdvSteps.GEOLOCATION;
|
|
155
147
|
templateLayout: UIGeolocationScreenClientConfig;
|
|
156
148
|
getLocationTimeout?: number;
|
|
157
|
-
locationAccuracy?: LocationAccuracy;
|
|
158
149
|
} | {
|
|
159
150
|
templateId: typeof GuiIdvSteps.QUESTIONS;
|
|
160
151
|
templateLayout: UIQuestionsScreenClientConfig;
|
|
@@ -167,12 +158,6 @@ export declare type GuiModuleProps = {
|
|
|
167
158
|
} | {
|
|
168
159
|
templateId: typeof GuiIdvSteps.GENERIC;
|
|
169
160
|
templateLayout: UIGenericScreenClientConfig;
|
|
170
|
-
} | {
|
|
171
|
-
templateId: typeof GuiIdvSteps.GENERIC_PROGRESS;
|
|
172
|
-
templateLayout: UIGenericProgressScreenClientConfig;
|
|
173
|
-
} | {
|
|
174
|
-
templateId: typeof GuiIdvSteps.GENERIC_LOCATION;
|
|
175
|
-
templateLayout: UIGenericLocationScreenClientConfig;
|
|
176
161
|
} | {
|
|
177
162
|
templateId: typeof GuiIdvSteps.UPLOAD_FILES;
|
|
178
163
|
templateLayout: UIUploadFilesScreenClientConfig;
|
|
@@ -218,6 +203,26 @@ export declare type IDV_UI_ICONS = (typeof IDV_UI_ICONS)[keyof typeof IDV_UI_ICO
|
|
|
218
203
|
|
|
219
204
|
export declare const idvIconDataUrlMap: Record<IDV_UI_ICONS, (color?: string) => string>;
|
|
220
205
|
|
|
206
|
+
declare type IdvModuleProps<TModuleProps, TModulesConfig> = {
|
|
207
|
+
isProcessing?: (isProcessing: boolean) => void;
|
|
208
|
+
moduleProps: TModuleProps;
|
|
209
|
+
modulesConfig?: TModulesConfig;
|
|
210
|
+
perform: (data: any, type?: PerformType) => void;
|
|
211
|
+
idvEventListener: (module: string, data: any) => void;
|
|
212
|
+
nonce?: string;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
declare type ImageBase = {
|
|
216
|
+
imageURL?: string;
|
|
217
|
+
imageId?: string;
|
|
218
|
+
base64?: string;
|
|
219
|
+
prepareRequired?: boolean;
|
|
220
|
+
failurePolicy?: ImageFailurePolicy;
|
|
221
|
+
timeout?: number;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
declare type ImageFailurePolicy = 'ignore' | 'placeholderImage' | 'error';
|
|
225
|
+
|
|
221
226
|
declare type JsonArray = JsonValue[];
|
|
222
227
|
|
|
223
228
|
declare type JsonObject = {
|
|
@@ -226,17 +231,11 @@ declare type JsonObject = {
|
|
|
226
231
|
|
|
227
232
|
declare type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
|
|
228
233
|
|
|
229
|
-
declare
|
|
230
|
-
HIGH = "HIGH",
|
|
231
|
-
BALANCED = "BALANCED",
|
|
232
|
-
LOW = "LOW",
|
|
233
|
-
PASSIVE = "PASSIVE"
|
|
234
|
-
}
|
|
234
|
+
declare type PerformType = (typeof PerformTypes)[keyof typeof PerformTypes] | undefined;
|
|
235
235
|
|
|
236
|
-
declare
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
locationAccuracy: LocationAccuracy;
|
|
236
|
+
declare const PerformTypes: {
|
|
237
|
+
readonly FORM: "form";
|
|
238
|
+
readonly DATA: "data";
|
|
240
239
|
};
|
|
241
240
|
|
|
242
241
|
declare type PopupActionButton = {
|
|
@@ -300,7 +299,7 @@ declare type QuestionsDataSource = {
|
|
|
300
299
|
questions: QuestionDataSource[];
|
|
301
300
|
};
|
|
302
301
|
|
|
303
|
-
declare type
|
|
302
|
+
declare type QuestionsItemTypes = Array<UITextQuestion | UISelectorQuestion | UIMultiSelectorQuestion | UIMultiSelectorButtonsQuestion | UIMultiSelectorOptionsQuestion>;
|
|
304
303
|
|
|
305
304
|
declare const RootElementTypes: {
|
|
306
305
|
readonly SCAFFOLD: "scaffold";
|
|
@@ -352,7 +351,6 @@ declare type UIButton = {
|
|
|
352
351
|
backgroundColor?: string;
|
|
353
352
|
cornerRadius?: number;
|
|
354
353
|
highlightColor?: string;
|
|
355
|
-
hoverColor?: string;
|
|
356
354
|
borderColor?: string;
|
|
357
355
|
borderWidth?: number;
|
|
358
356
|
paddings?: UIPaddings;
|
|
@@ -364,7 +362,6 @@ declare type UICameraScreenClientConfig = {
|
|
|
364
362
|
header?: UIInfoHeaderView;
|
|
365
363
|
footer?: UIInfoFooterView;
|
|
366
364
|
backgroundColor?: string;
|
|
367
|
-
backgroundImage?: UIImage;
|
|
368
365
|
buttons?: UIButton[];
|
|
369
366
|
selectionLimit?: number;
|
|
370
367
|
};
|
|
@@ -406,7 +403,6 @@ declare type UIDeviceTransferScreenClientConfig = {
|
|
|
406
403
|
buttons?: UIButton[];
|
|
407
404
|
footer?: UIInfoFooterView;
|
|
408
405
|
backgroundColor?: string;
|
|
409
|
-
backgroundImage?: UIImage;
|
|
410
406
|
qr?: {
|
|
411
407
|
color?: string;
|
|
412
408
|
};
|
|
@@ -452,9 +448,6 @@ declare type UIElement = {
|
|
|
452
448
|
} | {
|
|
453
449
|
type: typeof UIElementTypes.SPACER;
|
|
454
450
|
content: WithWeightProp<WithWidthAndHeightProps<UISpacer>>;
|
|
455
|
-
} | {
|
|
456
|
-
type: typeof UIElementTypes.PROGRESS_VIEW;
|
|
457
|
-
content: WithWidthAndHeightProps<UIProgressView>;
|
|
458
451
|
};
|
|
459
452
|
|
|
460
453
|
declare const UIElementTypes: {
|
|
@@ -465,7 +458,6 @@ declare const UIElementTypes: {
|
|
|
465
458
|
readonly COLUMN: "column";
|
|
466
459
|
readonly ROW: "row";
|
|
467
460
|
readonly SPACER: "spacer";
|
|
468
|
-
readonly PROGRESS_VIEW: "progressView";
|
|
469
461
|
};
|
|
470
462
|
|
|
471
463
|
declare type UIFileUploadPopupFilesLimitExceededOnly = UIPopup & {
|
|
@@ -480,21 +472,10 @@ declare type UIGalleryScreenClientConfig = {
|
|
|
480
472
|
header?: UIInfoHeaderView;
|
|
481
473
|
footer?: UIInfoFooterView;
|
|
482
474
|
backgroundColor?: string;
|
|
483
|
-
backgroundImage?: UIImage;
|
|
484
475
|
buttons?: UIButton[];
|
|
485
476
|
selectionLimit?: number;
|
|
486
477
|
};
|
|
487
478
|
|
|
488
|
-
declare type UIGenericLocationScreenClientConfig = {
|
|
489
|
-
rootElement: UIRootElement;
|
|
490
|
-
popups: GenericPopup[];
|
|
491
|
-
settings: LocationSettings;
|
|
492
|
-
};
|
|
493
|
-
|
|
494
|
-
declare type UIGenericProgressScreenClientConfig = {
|
|
495
|
-
rootElement: UIRootElement;
|
|
496
|
-
};
|
|
497
|
-
|
|
498
479
|
declare type UIGenericScreenClientConfig = {
|
|
499
480
|
rootElement: UIRootElement;
|
|
500
481
|
};
|
|
@@ -511,7 +492,6 @@ declare type UIGeolocationScreenClientConfig = {
|
|
|
511
492
|
buttons?: UIButton[];
|
|
512
493
|
footer?: UIInfoFooterView;
|
|
513
494
|
backgroundColor?: string;
|
|
514
|
-
backgroundImage?: UIImage;
|
|
515
495
|
popups: [UIGeolocationPopupSystemRestrictedOnly];
|
|
516
496
|
askEveryTime?: boolean;
|
|
517
497
|
};
|
|
@@ -534,15 +514,9 @@ declare type UIImage = ImageBase & {
|
|
|
534
514
|
};
|
|
535
515
|
|
|
536
516
|
declare type UIImageButton = {
|
|
537
|
-
actionId?: string;
|
|
538
|
-
type?: 'DATA' | 'FORM';
|
|
539
517
|
paddings?: UIPaddings;
|
|
540
518
|
image: UIImage;
|
|
541
519
|
responseBody?: JsonObject;
|
|
542
|
-
backgroundColor?: string;
|
|
543
|
-
highlightColor?: string;
|
|
544
|
-
hoverColor?: string;
|
|
545
|
-
cornerRadius?: number;
|
|
546
520
|
};
|
|
547
521
|
|
|
548
522
|
declare type UIInfoDetailsScreenClientConfig = {
|
|
@@ -552,7 +526,6 @@ declare type UIInfoDetailsScreenClientConfig = {
|
|
|
552
526
|
buttons?: UIButton[];
|
|
553
527
|
footer?: UIInfoFooterView;
|
|
554
528
|
backgroundColor?: string;
|
|
555
|
-
backgroundImage?: UIImage;
|
|
556
529
|
};
|
|
557
530
|
|
|
558
531
|
declare type UIInfoFooterView = {
|
|
@@ -571,7 +544,6 @@ declare type UIInfoScreenClientConfig = {
|
|
|
571
544
|
buttons?: UIButton[];
|
|
572
545
|
footer?: UIInfoFooterView;
|
|
573
546
|
backgroundColor?: string;
|
|
574
|
-
backgroundImage?: UIImage;
|
|
575
547
|
};
|
|
576
548
|
|
|
577
549
|
declare type UILabel = {
|
|
@@ -633,7 +605,6 @@ declare type UIProgressScreenClientConfig = {
|
|
|
633
605
|
progressView?: UIProgressView;
|
|
634
606
|
footer?: UIInfoFooterView;
|
|
635
607
|
backgroundColor?: string;
|
|
636
|
-
backgroundImage?: UIImage;
|
|
637
608
|
};
|
|
638
609
|
|
|
639
610
|
declare type UIProgressView = {
|
|
@@ -646,11 +617,10 @@ declare type UIQuestionsScreenClientConfig = {
|
|
|
646
617
|
title?: UILabel;
|
|
647
618
|
buttons?: UIButton[];
|
|
648
619
|
questions: {
|
|
649
|
-
itemTypes:
|
|
620
|
+
itemTypes: QuestionsItemTypes;
|
|
650
621
|
backgroundColor?: string;
|
|
651
622
|
};
|
|
652
623
|
backgroundColor?: string;
|
|
653
|
-
backgroundImage?: UIImage;
|
|
654
624
|
cornerRadius?: number;
|
|
655
625
|
};
|
|
656
626
|
|
|
@@ -681,8 +651,6 @@ declare type UIScaffoldContainer = {
|
|
|
681
651
|
mainColumn?: UIColumn;
|
|
682
652
|
bottomColumn?: UIColumn;
|
|
683
653
|
backgroundColor?: string;
|
|
684
|
-
backgroundImage?: UIImage;
|
|
685
|
-
cornerRadius?: number;
|
|
686
654
|
};
|
|
687
655
|
|
|
688
656
|
declare type UISelectorButtonsQuestion = QuestionItem & {
|
|
@@ -720,7 +688,6 @@ declare type UIStatusScreenClientConfig = {
|
|
|
720
688
|
buttons?: UIButton[];
|
|
721
689
|
footer?: UIInfoFooterView;
|
|
722
690
|
backgroundColor?: string;
|
|
723
|
-
backgroundImage?: UIImage;
|
|
724
691
|
};
|
|
725
692
|
|
|
726
693
|
declare type UITextField = UILabel & {
|
|
@@ -744,7 +711,6 @@ declare type UIUploadFilesScreenClientConfig = {
|
|
|
744
711
|
buttons?: UIButton[];
|
|
745
712
|
footer?: UIInfoFooterView;
|
|
746
713
|
backgroundColor?: string;
|
|
747
|
-
backgroundImage?: UIImage;
|
|
748
714
|
popups?: [UIFileUploadPopupNoFilesOnly, UIFileUploadPopupFilesLimitExceededOnly];
|
|
749
715
|
settings: {
|
|
750
716
|
supportedFileFormats: string[];
|
|
@@ -782,18 +748,21 @@ declare type UploadFileToTemp = (file: File, onProgress: (sentBytes: number, tot
|
|
|
782
748
|
}>;
|
|
783
749
|
|
|
784
750
|
declare type Validator = {
|
|
785
|
-
type: typeof
|
|
751
|
+
type: typeof VALIDATOR_TYPE.NOT_EMPTY;
|
|
786
752
|
message: string;
|
|
787
753
|
} | {
|
|
788
|
-
type: typeof
|
|
754
|
+
type: typeof VALIDATOR_TYPE.REGEX;
|
|
789
755
|
message: string;
|
|
790
756
|
regex: string;
|
|
791
|
-
} | {
|
|
792
|
-
type: string;
|
|
793
|
-
message: string;
|
|
794
|
-
passed?: boolean | null;
|
|
795
757
|
};
|
|
796
758
|
|
|
759
|
+
declare const VALIDATOR_TYPE: {
|
|
760
|
+
readonly NOT_EMPTY: "notEmpty";
|
|
761
|
+
readonly REGEX: "regex";
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
declare type VALIDATOR_TYPE = (typeof VALIDATOR_TYPE)[keyof typeof VALIDATOR_TYPE];
|
|
765
|
+
|
|
797
766
|
declare type WithWeightProp<T> = T & {
|
|
798
767
|
weight?: number;
|
|
799
768
|
};
|