@regulaforensics/idv-gui 3.9.493-rc → 3.9.495-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 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
  };
@@ -158,6 +159,12 @@ export declare type GuiModuleProps = {
158
159
  } | {
159
160
  templateId: typeof GuiIdvSteps.GENERIC;
160
161
  templateLayout: UIGenericScreenClientConfig;
162
+ } | {
163
+ templateId: typeof GuiIdvSteps.GENERIC_PROGRESS;
164
+ templateLayout: UIGenericProgressScreenClientConfig;
165
+ } | {
166
+ templateId: typeof GuiIdvSteps.GENERIC_LOCATION;
167
+ templateLayout: UIGenericLocationScreenClientConfig;
161
168
  } | {
162
169
  templateId: typeof GuiIdvSteps.UPLOAD_FILES;
163
170
  templateLayout: UIUploadFilesScreenClientConfig;
@@ -203,26 +210,6 @@ export declare type IDV_UI_ICONS = (typeof IDV_UI_ICONS)[keyof typeof IDV_UI_ICO
203
210
 
204
211
  export declare const idvIconDataUrlMap: Record<IDV_UI_ICONS, (color?: string) => string>;
205
212
 
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
213
  declare type JsonArray = JsonValue[];
227
214
 
228
215
  declare type JsonObject = {
@@ -231,11 +218,9 @@ declare type JsonObject = {
231
218
 
232
219
  declare type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
233
220
 
234
- declare type PerformType = (typeof PerformTypes)[keyof typeof PerformTypes] | undefined;
235
-
236
- declare const PerformTypes: {
237
- readonly FORM: "form";
238
- readonly DATA: "data";
221
+ declare type LocationSettings = {
222
+ askEveryTime: boolean;
223
+ getLocationTimeout: number;
239
224
  };
240
225
 
241
226
  declare type PopupActionButton = {
@@ -351,6 +336,7 @@ declare type UIButton = {
351
336
  backgroundColor?: string;
352
337
  cornerRadius?: number;
353
338
  highlightColor?: string;
339
+ hoverColor?: string;
354
340
  borderColor?: string;
355
341
  borderWidth?: number;
356
342
  paddings?: UIPaddings;
@@ -362,6 +348,7 @@ declare type UICameraScreenClientConfig = {
362
348
  header?: UIInfoHeaderView;
363
349
  footer?: UIInfoFooterView;
364
350
  backgroundColor?: string;
351
+ backgroundImage?: UIImage;
365
352
  buttons?: UIButton[];
366
353
  selectionLimit?: number;
367
354
  };
@@ -403,6 +390,7 @@ declare type UIDeviceTransferScreenClientConfig = {
403
390
  buttons?: UIButton[];
404
391
  footer?: UIInfoFooterView;
405
392
  backgroundColor?: string;
393
+ backgroundImage?: UIImage;
406
394
  qr?: {
407
395
  color?: string;
408
396
  };
@@ -448,6 +436,9 @@ declare type UIElement = {
448
436
  } | {
449
437
  type: typeof UIElementTypes.SPACER;
450
438
  content: WithWeightProp<WithWidthAndHeightProps<UISpacer>>;
439
+ } | {
440
+ type: typeof UIElementTypes.PROGRESS_VIEW;
441
+ content: WithWidthAndHeightProps<UIProgressView>;
451
442
  };
452
443
 
453
444
  declare const UIElementTypes: {
@@ -458,6 +449,7 @@ declare const UIElementTypes: {
458
449
  readonly COLUMN: "column";
459
450
  readonly ROW: "row";
460
451
  readonly SPACER: "spacer";
452
+ readonly PROGRESS_VIEW: "progressView";
461
453
  };
462
454
 
463
455
  declare type UIFileUploadPopupFilesLimitExceededOnly = UIPopup & {
@@ -472,10 +464,21 @@ declare type UIGalleryScreenClientConfig = {
472
464
  header?: UIInfoHeaderView;
473
465
  footer?: UIInfoFooterView;
474
466
  backgroundColor?: string;
467
+ backgroundImage?: UIImage;
475
468
  buttons?: UIButton[];
476
469
  selectionLimit?: number;
477
470
  };
478
471
 
472
+ declare type UIGenericLocationScreenClientConfig = {
473
+ rootElement: UIRootElement;
474
+ popups: GenericPopup[];
475
+ settings: LocationSettings;
476
+ };
477
+
478
+ declare type UIGenericProgressScreenClientConfig = {
479
+ rootElement: UIRootElement;
480
+ };
481
+
479
482
  declare type UIGenericScreenClientConfig = {
480
483
  rootElement: UIRootElement;
481
484
  };
@@ -492,6 +495,7 @@ declare type UIGeolocationScreenClientConfig = {
492
495
  buttons?: UIButton[];
493
496
  footer?: UIInfoFooterView;
494
497
  backgroundColor?: string;
498
+ backgroundImage?: UIImage;
495
499
  popups: [UIGeolocationPopupSystemRestrictedOnly];
496
500
  askEveryTime?: boolean;
497
501
  };
@@ -514,9 +518,15 @@ declare type UIImage = ImageBase & {
514
518
  };
515
519
 
516
520
  declare type UIImageButton = {
521
+ actionId?: string;
522
+ type?: 'DATA' | 'FORM';
517
523
  paddings?: UIPaddings;
518
524
  image: UIImage;
519
525
  responseBody?: JsonObject;
526
+ backgroundColor?: string;
527
+ highlightColor?: string;
528
+ hoverColor?: string;
529
+ cornerRadius?: number;
520
530
  };
521
531
 
522
532
  declare type UIInfoDetailsScreenClientConfig = {
@@ -526,6 +536,7 @@ declare type UIInfoDetailsScreenClientConfig = {
526
536
  buttons?: UIButton[];
527
537
  footer?: UIInfoFooterView;
528
538
  backgroundColor?: string;
539
+ backgroundImage?: UIImage;
529
540
  };
530
541
 
531
542
  declare type UIInfoFooterView = {
@@ -544,6 +555,7 @@ declare type UIInfoScreenClientConfig = {
544
555
  buttons?: UIButton[];
545
556
  footer?: UIInfoFooterView;
546
557
  backgroundColor?: string;
558
+ backgroundImage?: UIImage;
547
559
  };
548
560
 
549
561
  declare type UILabel = {
@@ -605,6 +617,7 @@ declare type UIProgressScreenClientConfig = {
605
617
  progressView?: UIProgressView;
606
618
  footer?: UIInfoFooterView;
607
619
  backgroundColor?: string;
620
+ backgroundImage?: UIImage;
608
621
  };
609
622
 
610
623
  declare type UIProgressView = {
@@ -621,6 +634,7 @@ declare type UIQuestionsScreenClientConfig = {
621
634
  backgroundColor?: string;
622
635
  };
623
636
  backgroundColor?: string;
637
+ backgroundImage?: UIImage;
624
638
  cornerRadius?: number;
625
639
  };
626
640
 
@@ -651,6 +665,8 @@ declare type UIScaffoldContainer = {
651
665
  mainColumn?: UIColumn;
652
666
  bottomColumn?: UIColumn;
653
667
  backgroundColor?: string;
668
+ backgroundImage?: UIImage;
669
+ cornerRadius?: number;
654
670
  };
655
671
 
656
672
  declare type UISelectorButtonsQuestion = QuestionItem & {
@@ -688,6 +704,7 @@ declare type UIStatusScreenClientConfig = {
688
704
  buttons?: UIButton[];
689
705
  footer?: UIInfoFooterView;
690
706
  backgroundColor?: string;
707
+ backgroundImage?: UIImage;
691
708
  };
692
709
 
693
710
  declare type UITextField = UILabel & {
@@ -711,6 +728,7 @@ declare type UIUploadFilesScreenClientConfig = {
711
728
  buttons?: UIButton[];
712
729
  footer?: UIInfoFooterView;
713
730
  backgroundColor?: string;
731
+ backgroundImage?: UIImage;
714
732
  popups?: [UIFileUploadPopupNoFilesOnly, UIFileUploadPopupFilesLimitExceededOnly];
715
733
  settings: {
716
734
  supportedFileFormats: string[];