@regulaforensics/idv-gui 3.1.239 → 3.2.3-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/README.md CHANGED
@@ -1,5 +1,21 @@
1
- # Idv-gui module
1
+ # Idv Gui Module
2
2
 
3
- Module which contains UI screens (Info screens , Instruction Screens, etc)
3
+ The **idv-gui** module is an npm package plugin that renders client-side workflow steps according to predefined templates.
4
+
5
+
6
+ It is delivered as part of the **IDV Capturing** solution and has a version synchronized with **idv-capture-web**. Currently, compatibility is guaranteed at the **major.minor** version level.
7
+
8
+ ## What the Module Is
9
+
10
+ The module is an **npm package** that **exports a Web Component**, inside which the **Preact** framework is used for rendering and component logic.
11
+ ## How It Works
12
+
13
+ The module receives typed configuration data following the unified interface used by all **idv-capture-web** modules.
14
+
15
+ ## Module Output
16
+
17
+ The result of execution can be either:
18
+
19
+ - **Data** for submission to the platform, or
20
+ - A typed **BaseError**, which contains detailed information explaining why the module failed.
4
21
 
5
- Module exports React Component which can be used in Idv-capture-web component, Idv Platform
package/dist/index.d.ts CHANGED
@@ -1,24 +1,25 @@
1
- import { JSX as JSX_2 } from 'react/jsx-runtime';
1
+ import { FunctionComponent } from 'preact';
2
+ import { JSX } from 'preact';
2
3
 
3
4
  declare function AgeIcon({ size }: {
4
5
  size?: number;
5
6
  color?: string;
6
- }): JSX_2.Element;
7
+ }): JSX.Element;
7
8
 
8
9
  declare function AndroidIcon({ size, color }: {
9
10
  size?: number;
10
11
  color?: string;
11
- }): JSX_2.Element;
12
+ }): JSX.Element;
12
13
 
13
14
  declare function ArrowIcon({ size }: {
14
15
  size?: number;
15
16
  color?: string;
16
- }): JSX_2.Element;
17
+ }): JSX.Element;
17
18
 
18
19
  declare function BackIcon({ size }: {
19
20
  size?: number;
20
21
  color?: string;
21
- }): JSX_2.Element;
22
+ }): JSX.Element;
22
23
 
23
24
  declare abstract class BaseModule<TModuleProps = unknown, TModulesConfig = unknown> extends HTMLElement {
24
25
  abstract props: IdvModuleProps<TModuleProps, TModulesConfig> | null;
@@ -28,7 +29,7 @@ declare abstract class BaseModule<TModuleProps = unknown, TModulesConfig = unkno
28
29
  declare function BiometricIcon({ size }: {
29
30
  size?: number;
30
31
  color?: string;
31
- }): JSX_2.Element;
32
+ }): JSX.Element;
32
33
 
33
34
  declare const ContentMode: {
34
35
  readonly ASPECT_FILL: "ASPECT_FILL";
@@ -59,11 +60,11 @@ declare type DropdownControl = {
59
60
  declare function ErrorIcon({ size, color }: {
60
61
  size?: number;
61
62
  color?: string;
62
- }): JSX_2.Element;
63
+ }): JSX.Element;
63
64
 
64
- declare class GuiIdv extends BaseModule<GuiModuleProps, GuiModuleConfig> {
65
- private _root;
65
+ export declare class GuiIdv extends BaseModule<GuiModuleProps, GuiModuleConfig> {
66
66
  private _mounted;
67
+ private _shadowRoot;
67
68
  props: IdvModuleProps<GuiModuleProps, GuiModuleConfig> | null;
68
69
  constructor();
69
70
  static displayName: string;
@@ -72,15 +73,13 @@ declare class GuiIdv extends BaseModule<GuiModuleProps, GuiModuleConfig> {
72
73
  private render;
73
74
  disconnectedCallback(): void;
74
75
  static isReady(): boolean;
75
- static getSupportedTemplates: () => ("INFO" | "INFO_DETAILS" | "STATUS" | "PROGRESS" | "QUESTIONS" | "CAMERA" | "GALLERY")[];
76
- static initialize(modulesConfig: Record<string, unknown>): void;
76
+ static getSupportedTemplates: () => ("INFO" | "INFO_DETAILS" | "STATUS" | "PROGRESS" | "QUESTIONS" | "CAMERA" | "GALLERY" | "GEOLOCATION")[];
77
+ static initialize(_modulesConfig: Record<string, unknown>): void;
77
78
  static deinitialize(): void;
78
79
  static getIdentifier: () => string;
79
80
  }
80
- export { GuiIdv }
81
- export default GuiIdv;
82
81
 
83
- export declare const GuiIdvReactComponent: React.FC<IdvModuleProps<GuiModuleProps | GuiModulePropsUnknown, GuiModuleConfig>>;
82
+ export declare const GuiIdvReactComponent: FunctionComponent<IdvModuleProps<GuiModuleProps | GuiModulePropsUnknown, GuiModuleConfig>>;
84
83
 
85
84
  export declare const GuiIdvSteps: {
86
85
  readonly INFO: "INFO";
@@ -90,13 +89,12 @@ export declare const GuiIdvSteps: {
90
89
  readonly QUESTIONS: "QUESTIONS";
91
90
  readonly CAMERA: "CAMERA";
92
91
  readonly GALLERY: "GALLERY";
92
+ readonly GEOLOCATION: "GEOLOCATION";
93
93
  };
94
94
 
95
95
  export declare type GuiIdvSteps = (typeof GuiIdvSteps)[keyof typeof GuiIdvSteps];
96
96
 
97
- export declare const GuiIdvStyleInjectionWrapper: React.FC<{
98
- children: React.ReactNode;
99
- }>;
97
+ export declare const GuiIdvStyleInjectionWrapper: FunctionComponent;
100
98
 
101
99
  declare type GuiModuleConfig = Record<string, any>;
102
100
 
@@ -127,6 +125,7 @@ declare type GuiModulePropsMap = {
127
125
  [GuiIdvSteps.QUESTIONS]: UIQuestionsScreenClientConfig;
128
126
  [GuiIdvSteps.CAMERA]: UICameraScreenClientConfig;
129
127
  [GuiIdvSteps.GALLERY]: UIGalleryScreenClientConfig;
128
+ [GuiIdvSteps.GEOLOCATION]: UIGeolocationScreenClientConfig;
130
129
  };
131
130
 
132
131
  export declare type GuiModulePropsUnknown = {
@@ -174,7 +173,7 @@ export declare const idvIconComponents: {
174
173
  warning_icon: typeof WarningIcon;
175
174
  spinner: ({ indicatorColor }: {
176
175
  indicatorColor?: string;
177
- }) => JSX_2.Element;
176
+ }) => JSX.Element;
178
177
  failure: typeof ErrorIcon;
179
178
  age: typeof AgeIcon;
180
179
  android: typeof AndroidIcon;
@@ -182,7 +181,7 @@ export declare const idvIconComponents: {
182
181
  apple: ({ size, color }: {
183
182
  size?: number;
184
183
  color?: string;
185
- }) => JSX_2.Element;
184
+ }) => JSX.Element;
186
185
  back: typeof BackIcon;
187
186
  biometricIcon: typeof BiometricIcon;
188
187
  info: typeof InfoIcon;
@@ -191,53 +190,53 @@ export declare const idvIconComponents: {
191
190
  cross: ({ size, color }: {
192
191
  size?: number;
193
192
  color?: string;
194
- }) => JSX_2.Element;
193
+ }) => JSX.Element;
195
194
  regulaLogo: ({ size, color }: {
196
195
  size?: number;
197
196
  color?: string;
198
- }) => JSX_2.Element;
199
- empty: () => JSX_2.Element;
197
+ }) => JSX.Element;
198
+ empty: () => JSX.Element;
200
199
  signature: typeof PoweredByRegula;
201
200
  success: ({ size, color }: {
202
201
  size?: number;
203
202
  color?: string;
204
- }) => JSX_2.Element;
205
- radio_selected: () => JSX_2.Element;
206
- radio_normal: () => JSX_2.Element;
207
- square_selected: () => JSX_2.Element;
208
- square_normal: () => JSX_2.Element;
203
+ }) => JSX.Element;
204
+ radio_selected: () => JSX.Element;
205
+ radio_normal: () => JSX.Element;
206
+ square_selected: () => JSX.Element;
207
+ square_normal: () => JSX.Element;
209
208
  selected: ({ color }: {
210
209
  color?: string | undefined;
211
- }) => JSX_2.Element;
210
+ }) => JSX.Element;
212
211
  chevronDown: ({ color }: {
213
212
  color?: string | undefined;
214
- }) => JSX_2.Element;
213
+ }) => JSX.Element;
215
214
  close_icon: ({ size, color }: {
216
215
  size?: number;
217
216
  color?: string;
218
- }) => JSX_2.Element;
217
+ }) => JSX.Element;
219
218
  gallery: ({ size, color }: {
220
219
  size?: number;
221
220
  color?: string;
222
- }) => JSX_2.Element;
221
+ }) => JSX.Element;
223
222
  camera: ({ size, color }: {
224
223
  size?: number;
225
224
  color?: string;
226
- }) => JSX_2.Element;
225
+ }) => JSX.Element;
227
226
  };
228
227
 
229
228
  declare type IdvModuleProps<TModuleProps, TModulesConfig> = {
230
229
  isProcessing?: (isProcessing: boolean) => void;
231
230
  moduleProps: TModuleProps;
232
231
  modulesConfig?: TModulesConfig;
233
- perform: (data: any) => void;
232
+ perform: (data: any, type?: PerformType) => void;
234
233
  idvEventListener: (module: string, data: any) => void;
235
234
  };
236
235
 
237
236
  declare function InfoIcon({ size, color }: {
238
237
  size?: number;
239
238
  color?: string;
240
- }): JSX_2.Element;
239
+ }): JSX.Element;
241
240
 
242
241
  declare type JsonArray = JsonValue[];
243
242
 
@@ -247,7 +246,14 @@ declare type JsonObject = {
247
246
 
248
247
  declare type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
249
248
 
250
- declare function PoweredByRegula(): JSX_2.Element;
249
+ declare type PerformType = (typeof performType)[keyof typeof performType] | undefined;
250
+
251
+ declare const performType: {
252
+ readonly FORM: "form";
253
+ readonly DATA: "data";
254
+ };
255
+
256
+ declare function PoweredByRegula(): JSX.Element;
251
257
 
252
258
  declare type QuestionDataSource = {
253
259
  id: string | number;
@@ -334,7 +340,7 @@ declare type TextAlignment = (typeof TextAlignment)[keyof typeof TextAlignment];
334
340
  declare function ToMobileIcon({ size }: {
335
341
  size?: number;
336
342
  color?: string;
337
- }): JSX_2.Element;
343
+ }): JSX.Element;
338
344
 
339
345
  declare type UIButton = {
340
346
  type?: 'RESPONSE_BODY' | 'FORM';
@@ -406,6 +412,18 @@ declare type UIGalleryScreenClientConfig = {
406
412
  selectionLimit?: number;
407
413
  };
408
414
 
415
+ declare type UIGeolocationScreenClientConfig = {
416
+ header?: UIInfoHeaderView;
417
+ title?: UILabel;
418
+ image?: UIImage;
419
+ description?: UILabel;
420
+ buttons?: UIButton[];
421
+ footer?: UIInfoFooterView;
422
+ backgroundColor?: string;
423
+ popups: UIPopup[];
424
+ askEveryTime?: boolean;
425
+ };
426
+
409
427
  declare type UIImage = {
410
428
  imageURL?: string;
411
429
  base64?: string;
@@ -464,6 +482,20 @@ declare type UIMultiSelectorQuestion = QuestionItem & {
464
482
  dropdownPicker: UIDropdownPicker;
465
483
  };
466
484
 
485
+ declare type UIPopup = {
486
+ reason: 'system_restricted';
487
+ actionButton1: {
488
+ title?: UILabel;
489
+ type: 'FORM';
490
+ backgroundColor?: string;
491
+ cornerRadius?: number;
492
+ };
493
+ title?: UILabel;
494
+ message?: UILabel;
495
+ backgroundColor?: string;
496
+ cornerRadius?: number;
497
+ };
498
+
467
499
  declare type UIProgressScreenClientConfig = {
468
500
  header?: UIInfoHeaderView;
469
501
  progressView?: UIProgressView;
@@ -545,7 +577,7 @@ declare type UITextQuestion = QuestionItem & {
545
577
  declare function UnderageIcon({ size }: {
546
578
  size?: number;
547
579
  color?: string;
548
- }): JSX_2.Element;
580
+ }): JSX.Element;
549
581
 
550
582
  declare type Validator = {
551
583
  type: typeof VALIDATOR_TYPE.NOT_EMPTY;
@@ -566,6 +598,6 @@ declare type VALIDATOR_TYPE = (typeof VALIDATOR_TYPE)[keyof typeof VALIDATOR_TYP
566
598
  declare function WarningIcon({ size, color }: {
567
599
  size?: number;
568
600
  color?: string;
569
- }): JSX_2.Element;
601
+ }): JSX.Element;
570
602
 
571
603
  export { }