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