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