@regulaforensics/idv-gui 3.10.526-nightly → 3.10.527-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 +37 -64
- package/dist/main.iife.js +3 -3
- package/dist/main.js +1872 -2139
- package/dist/main.umd.cjs +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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
|
|
|
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
|
+
}
|
|
8
|
+
|
|
8
9
|
declare const ContentMode: {
|
|
9
10
|
readonly ASPECT_FILL: "ASPECT_FILL";
|
|
10
11
|
readonly ASPECT_FIT: "ASPECT_FIT";
|
|
@@ -31,6 +32,12 @@ declare type DropdownControl = {
|
|
|
31
32
|
expandButton?: UIImage;
|
|
32
33
|
};
|
|
33
34
|
|
|
35
|
+
declare type FailedAssets = {
|
|
36
|
+
imageURL: Set<string>;
|
|
37
|
+
base64: Set<string>;
|
|
38
|
+
blockingAssets: Set<string>;
|
|
39
|
+
};
|
|
40
|
+
|
|
34
41
|
declare const FontWeight: {
|
|
35
42
|
readonly NORMAL: "NORMAL";
|
|
36
43
|
readonly BOLD: "BOLD";
|
|
@@ -38,11 +45,6 @@ declare const FontWeight: {
|
|
|
38
45
|
|
|
39
46
|
declare type FontWeight = (typeof FontWeight)[keyof typeof FontWeight];
|
|
40
47
|
|
|
41
|
-
declare type GenericPopup = {
|
|
42
|
-
rootElement: UIRootElement;
|
|
43
|
-
reason: string;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
48
|
export declare class GuiIdv extends BaseModule<GuiModuleProps, GuiModuleConfig> {
|
|
47
49
|
private _mounted;
|
|
48
50
|
private _shadowRoot;
|
|
@@ -59,13 +61,13 @@ export declare class GuiIdv extends BaseModule<GuiModuleProps, GuiModuleConfig>
|
|
|
59
61
|
private render;
|
|
60
62
|
disconnectedCallback(): void;
|
|
61
63
|
static isReady(): boolean;
|
|
62
|
-
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")[];
|
|
63
65
|
static initialize(_modulesConfig: Record<string, unknown>): void;
|
|
64
66
|
static deinitialize(): void;
|
|
65
67
|
static getIdentifier: () => string;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
export declare const GuiIdvReactComponent: ({ isProcessing: setIsProcessingCallback, moduleProps, perform, devSettings,
|
|
70
|
+
export declare const GuiIdvReactComponent: ({ isProcessing: setIsProcessingCallback, moduleProps, perform, devSettings, }: IdvModuleProps<GuiModuleProps, GuiModuleConfig> & {
|
|
69
71
|
devSettings?: GuiModuleDevSettings;
|
|
70
72
|
}) => JSX.Element;
|
|
71
73
|
|
|
@@ -80,8 +82,6 @@ export declare const GuiIdvSteps: {
|
|
|
80
82
|
readonly GEOLOCATION: "GEOLOCATION";
|
|
81
83
|
readonly DEVICE_TRANSFER: "DEVICE_TRANSFER";
|
|
82
84
|
readonly GENERIC: "GENERIC";
|
|
83
|
-
readonly GENERIC_LOCATION: "GENERIC_LOCATION";
|
|
84
|
-
readonly GENERIC_PROGRESS: "GENERIC_PROGRESS";
|
|
85
85
|
readonly UPLOAD_FILES: "UPLOAD_FILES";
|
|
86
86
|
};
|
|
87
87
|
|
|
@@ -105,7 +105,6 @@ export declare type GuiModuleDevSettings = {
|
|
|
105
105
|
progressBarRange?: number;
|
|
106
106
|
name?: string;
|
|
107
107
|
serverError?: string;
|
|
108
|
-
size?: number;
|
|
109
108
|
}[];
|
|
110
109
|
};
|
|
111
110
|
};
|
|
@@ -147,7 +146,6 @@ export declare type GuiModuleProps = {
|
|
|
147
146
|
templateId: typeof GuiIdvSteps.GEOLOCATION;
|
|
148
147
|
templateLayout: UIGeolocationScreenClientConfig;
|
|
149
148
|
getLocationTimeout?: number;
|
|
150
|
-
locationAccuracy?: LocationAccuracy;
|
|
151
149
|
} | {
|
|
152
150
|
templateId: typeof GuiIdvSteps.QUESTIONS;
|
|
153
151
|
templateLayout: UIQuestionsScreenClientConfig;
|
|
@@ -160,12 +158,6 @@ export declare type GuiModuleProps = {
|
|
|
160
158
|
} | {
|
|
161
159
|
templateId: typeof GuiIdvSteps.GENERIC;
|
|
162
160
|
templateLayout: UIGenericScreenClientConfig;
|
|
163
|
-
} | {
|
|
164
|
-
templateId: typeof GuiIdvSteps.GENERIC_PROGRESS;
|
|
165
|
-
templateLayout: UIGenericProgressScreenClientConfig;
|
|
166
|
-
} | {
|
|
167
|
-
templateId: typeof GuiIdvSteps.GENERIC_LOCATION;
|
|
168
|
-
templateLayout: UIGenericLocationScreenClientConfig;
|
|
169
161
|
} | {
|
|
170
162
|
templateId: typeof GuiIdvSteps.UPLOAD_FILES;
|
|
171
163
|
templateLayout: UIUploadFilesScreenClientConfig;
|
|
@@ -211,6 +203,26 @@ export declare type IDV_UI_ICONS = (typeof IDV_UI_ICONS)[keyof typeof IDV_UI_ICO
|
|
|
211
203
|
|
|
212
204
|
export declare const idvIconDataUrlMap: Record<IDV_UI_ICONS, (color?: string) => string>;
|
|
213
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
|
+
|
|
214
226
|
declare type JsonArray = JsonValue[];
|
|
215
227
|
|
|
216
228
|
declare type JsonObject = {
|
|
@@ -219,17 +231,11 @@ declare type JsonObject = {
|
|
|
219
231
|
|
|
220
232
|
declare type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
|
|
221
233
|
|
|
222
|
-
declare
|
|
223
|
-
HIGH = "HIGH",
|
|
224
|
-
BALANCED = "BALANCED",
|
|
225
|
-
LOW = "LOW",
|
|
226
|
-
PASSIVE = "PASSIVE"
|
|
227
|
-
}
|
|
234
|
+
declare type PerformType = (typeof PerformTypes)[keyof typeof PerformTypes] | undefined;
|
|
228
235
|
|
|
229
|
-
declare
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
locationAccuracy: LocationAccuracy;
|
|
236
|
+
declare const PerformTypes: {
|
|
237
|
+
readonly FORM: "form";
|
|
238
|
+
readonly DATA: "data";
|
|
233
239
|
};
|
|
234
240
|
|
|
235
241
|
declare type PopupActionButton = {
|
|
@@ -345,7 +351,6 @@ declare type UIButton = {
|
|
|
345
351
|
backgroundColor?: string;
|
|
346
352
|
cornerRadius?: number;
|
|
347
353
|
highlightColor?: string;
|
|
348
|
-
hoverColor?: string;
|
|
349
354
|
borderColor?: string;
|
|
350
355
|
borderWidth?: number;
|
|
351
356
|
paddings?: UIPaddings;
|
|
@@ -357,7 +362,6 @@ declare type UICameraScreenClientConfig = {
|
|
|
357
362
|
header?: UIInfoHeaderView;
|
|
358
363
|
footer?: UIInfoFooterView;
|
|
359
364
|
backgroundColor?: string;
|
|
360
|
-
backgroundImage?: UIImage;
|
|
361
365
|
buttons?: UIButton[];
|
|
362
366
|
selectionLimit?: number;
|
|
363
367
|
};
|
|
@@ -399,7 +403,6 @@ declare type UIDeviceTransferScreenClientConfig = {
|
|
|
399
403
|
buttons?: UIButton[];
|
|
400
404
|
footer?: UIInfoFooterView;
|
|
401
405
|
backgroundColor?: string;
|
|
402
|
-
backgroundImage?: UIImage;
|
|
403
406
|
qr?: {
|
|
404
407
|
color?: string;
|
|
405
408
|
};
|
|
@@ -445,9 +448,6 @@ declare type UIElement = {
|
|
|
445
448
|
} | {
|
|
446
449
|
type: typeof UIElementTypes.SPACER;
|
|
447
450
|
content: WithWeightProp<WithWidthAndHeightProps<UISpacer>>;
|
|
448
|
-
} | {
|
|
449
|
-
type: typeof UIElementTypes.PROGRESS_VIEW;
|
|
450
|
-
content: WithWidthAndHeightProps<UIProgressView>;
|
|
451
451
|
};
|
|
452
452
|
|
|
453
453
|
declare const UIElementTypes: {
|
|
@@ -458,7 +458,6 @@ declare const UIElementTypes: {
|
|
|
458
458
|
readonly COLUMN: "column";
|
|
459
459
|
readonly ROW: "row";
|
|
460
460
|
readonly SPACER: "spacer";
|
|
461
|
-
readonly PROGRESS_VIEW: "progressView";
|
|
462
461
|
};
|
|
463
462
|
|
|
464
463
|
declare type UIFileUploadPopupFilesLimitExceededOnly = UIPopup & {
|
|
@@ -473,21 +472,10 @@ declare type UIGalleryScreenClientConfig = {
|
|
|
473
472
|
header?: UIInfoHeaderView;
|
|
474
473
|
footer?: UIInfoFooterView;
|
|
475
474
|
backgroundColor?: string;
|
|
476
|
-
backgroundImage?: UIImage;
|
|
477
475
|
buttons?: UIButton[];
|
|
478
476
|
selectionLimit?: number;
|
|
479
477
|
};
|
|
480
478
|
|
|
481
|
-
declare type UIGenericLocationScreenClientConfig = {
|
|
482
|
-
rootElement: UIRootElement;
|
|
483
|
-
popups: GenericPopup[];
|
|
484
|
-
settings: LocationSettings;
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
declare type UIGenericProgressScreenClientConfig = {
|
|
488
|
-
rootElement: UIRootElement;
|
|
489
|
-
};
|
|
490
|
-
|
|
491
479
|
declare type UIGenericScreenClientConfig = {
|
|
492
480
|
rootElement: UIRootElement;
|
|
493
481
|
};
|
|
@@ -504,7 +492,6 @@ declare type UIGeolocationScreenClientConfig = {
|
|
|
504
492
|
buttons?: UIButton[];
|
|
505
493
|
footer?: UIInfoFooterView;
|
|
506
494
|
backgroundColor?: string;
|
|
507
|
-
backgroundImage?: UIImage;
|
|
508
495
|
popups: [UIGeolocationPopupSystemRestrictedOnly];
|
|
509
496
|
askEveryTime?: boolean;
|
|
510
497
|
};
|
|
@@ -527,15 +514,9 @@ declare type UIImage = ImageBase & {
|
|
|
527
514
|
};
|
|
528
515
|
|
|
529
516
|
declare type UIImageButton = {
|
|
530
|
-
actionId?: string;
|
|
531
|
-
type?: 'DATA' | 'FORM';
|
|
532
517
|
paddings?: UIPaddings;
|
|
533
518
|
image: UIImage;
|
|
534
519
|
responseBody?: JsonObject;
|
|
535
|
-
backgroundColor?: string;
|
|
536
|
-
highlightColor?: string;
|
|
537
|
-
hoverColor?: string;
|
|
538
|
-
cornerRadius?: number;
|
|
539
520
|
};
|
|
540
521
|
|
|
541
522
|
declare type UIInfoDetailsScreenClientConfig = {
|
|
@@ -545,7 +526,6 @@ declare type UIInfoDetailsScreenClientConfig = {
|
|
|
545
526
|
buttons?: UIButton[];
|
|
546
527
|
footer?: UIInfoFooterView;
|
|
547
528
|
backgroundColor?: string;
|
|
548
|
-
backgroundImage?: UIImage;
|
|
549
529
|
};
|
|
550
530
|
|
|
551
531
|
declare type UIInfoFooterView = {
|
|
@@ -564,7 +544,6 @@ declare type UIInfoScreenClientConfig = {
|
|
|
564
544
|
buttons?: UIButton[];
|
|
565
545
|
footer?: UIInfoFooterView;
|
|
566
546
|
backgroundColor?: string;
|
|
567
|
-
backgroundImage?: UIImage;
|
|
568
547
|
};
|
|
569
548
|
|
|
570
549
|
declare type UILabel = {
|
|
@@ -626,7 +605,6 @@ declare type UIProgressScreenClientConfig = {
|
|
|
626
605
|
progressView?: UIProgressView;
|
|
627
606
|
footer?: UIInfoFooterView;
|
|
628
607
|
backgroundColor?: string;
|
|
629
|
-
backgroundImage?: UIImage;
|
|
630
608
|
};
|
|
631
609
|
|
|
632
610
|
declare type UIProgressView = {
|
|
@@ -643,7 +621,6 @@ declare type UIQuestionsScreenClientConfig = {
|
|
|
643
621
|
backgroundColor?: string;
|
|
644
622
|
};
|
|
645
623
|
backgroundColor?: string;
|
|
646
|
-
backgroundImage?: UIImage;
|
|
647
624
|
cornerRadius?: number;
|
|
648
625
|
};
|
|
649
626
|
|
|
@@ -674,8 +651,6 @@ declare type UIScaffoldContainer = {
|
|
|
674
651
|
mainColumn?: UIColumn;
|
|
675
652
|
bottomColumn?: UIColumn;
|
|
676
653
|
backgroundColor?: string;
|
|
677
|
-
backgroundImage?: UIImage;
|
|
678
|
-
cornerRadius?: number;
|
|
679
654
|
};
|
|
680
655
|
|
|
681
656
|
declare type UISelectorButtonsQuestion = QuestionItem & {
|
|
@@ -713,7 +688,6 @@ declare type UIStatusScreenClientConfig = {
|
|
|
713
688
|
buttons?: UIButton[];
|
|
714
689
|
footer?: UIInfoFooterView;
|
|
715
690
|
backgroundColor?: string;
|
|
716
|
-
backgroundImage?: UIImage;
|
|
717
691
|
};
|
|
718
692
|
|
|
719
693
|
declare type UITextField = UILabel & {
|
|
@@ -737,7 +711,6 @@ declare type UIUploadFilesScreenClientConfig = {
|
|
|
737
711
|
buttons?: UIButton[];
|
|
738
712
|
footer?: UIInfoFooterView;
|
|
739
713
|
backgroundColor?: string;
|
|
740
|
-
backgroundImage?: UIImage;
|
|
741
714
|
popups?: [UIFileUploadPopupNoFilesOnly, UIFileUploadPopupFilesLimitExceededOnly];
|
|
742
715
|
settings: {
|
|
743
716
|
supportedFileFormats: string[];
|