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