@regulaforensics/idv-gui 4.0.688-nightly → 4.0.690-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 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 CLIENT_VALIDATOR_TYPE: {
10
9
  readonly NOT_EMPTY: "notEmpty";
11
10
  readonly REGEX: "regex";
@@ -13,23 +12,6 @@ declare const CLIENT_VALIDATOR_TYPE: {
13
12
 
14
13
  declare type CLIENT_VALIDATOR_TYPE = (typeof CLIENT_VALIDATOR_TYPE)[keyof typeof CLIENT_VALIDATOR_TYPE];
15
14
 
16
- declare const CodeFieldInputType: {
17
- readonly NUMERIC: "NUMERIC";
18
- readonly ALPHA_NUMERIC: "ALPHA_NUMERIC";
19
- };
20
-
21
- declare type CodeFieldInputType = (typeof CodeFieldInputType)[keyof typeof CodeFieldInputType];
22
-
23
- declare type CodeInputDataItem = {
24
- id: string | number;
25
- text: string;
26
- required: boolean | null;
27
- property: {
28
- id: string;
29
- };
30
- validators: Array<Validator>;
31
- };
32
-
33
15
  declare const ContentMode: {
34
16
  readonly ASPECT_FILL: "ASPECT_FILL";
35
17
  readonly ASPECT_FIT: "ASPECT_FIT";
@@ -46,27 +28,6 @@ declare const DATA_SOURCE_ANSWER_TYPE: {
46
28
 
47
29
  declare type DATA_SOURCE_ANSWER_TYPE = (typeof DATA_SOURCE_ANSWER_TYPE)[keyof typeof DATA_SOURCE_ANSWER_TYPE];
48
30
 
49
- declare type DataItem = {
50
- type: typeof ListElementTypes.GENERIC_COLUMN;
51
- uiComponentId: string;
52
- } | {
53
- type: typeof ListElementTypes.QUESTION;
54
- uiComponentId: string;
55
- content: QuestionDataItem;
56
- } | {
57
- type: typeof ListElementTypes.SECTION;
58
- uiComponentId: string;
59
- content: SectionDataItem;
60
- } | {
61
- type: typeof ListElementTypes.CODE_INPUT;
62
- uiComponentId: string;
63
- content: CodeInputDataItem;
64
- } | {
65
- type: typeof ListElementTypes.TEXT_INPUT;
66
- uiComponentId: string;
67
- content: TextInputDataItem;
68
- };
69
-
70
31
  declare type DropdownControl = {
71
32
  backgroundColor?: string;
72
33
  cornerRadius?: number;
@@ -77,12 +38,6 @@ declare type DropdownControl = {
77
38
  expandButton?: UIImage;
78
39
  };
79
40
 
80
- declare type FailedAssets = {
81
- imageURL: Set<string>;
82
- base64: Set<string>;
83
- blockingAssets: Set<string>;
84
- };
85
-
86
41
  declare const FontWeight: {
87
42
  readonly NORMAL: "NORMAL";
88
43
  readonly BOLD: "BOLD";
@@ -90,10 +45,6 @@ declare const FontWeight: {
90
45
 
91
46
  declare type FontWeight = (typeof FontWeight)[keyof typeof FontWeight];
92
47
 
93
- declare type GenericListDataSource = {
94
- dataItems: DataItem[];
95
- };
96
-
97
48
  declare type GenericPopup = {
98
49
  rootElement: UIRootElement;
99
50
  reason: string;
@@ -116,7 +67,7 @@ export declare class GuiIdv extends BaseModule<GuiModuleProps, GuiModuleConfig>
116
67
  private render;
117
68
  disconnectedCallback(): void;
118
69
  static isReady(): boolean;
119
- static getSupportedTemplates: () => ("INFO" | "INFO_DETAILS" | "STATUS" | "PROGRESS" | "QUESTIONS" | "CAMERA" | "GALLERY" | "GEOLOCATION" | "DEVICE_TRANSFER" | "GENERIC" | "GENERIC_LIST" | "GENERIC_LOCATION" | "GENERIC_PROGRESS" | "UPLOAD_FILES")[];
70
+ static getSupportedTemplates: () => ("INFO" | "INFO_DETAILS" | "STATUS" | "PROGRESS" | "QUESTIONS" | "CAMERA" | "GALLERY" | "GEOLOCATION" | "DEVICE_TRANSFER" | "GENERIC" | "GENERIC_LOCATION" | "GENERIC_PROGRESS" | "UPLOAD_FILES")[];
120
71
  static initialize(_modulesConfig: Record<string, unknown>): void;
121
72
  static deinitialize(): void;
122
73
  static getIdentifier: () => string;
@@ -137,7 +88,6 @@ export declare const GuiIdvSteps: {
137
88
  readonly GEOLOCATION: "GEOLOCATION";
138
89
  readonly DEVICE_TRANSFER: "DEVICE_TRANSFER";
139
90
  readonly GENERIC: "GENERIC";
140
- readonly GENERIC_LIST: "GENERIC_LIST";
141
91
  readonly GENERIC_LOCATION: "GENERIC_LOCATION";
142
92
  readonly GENERIC_PROGRESS: "GENERIC_PROGRESS";
143
93
  readonly UPLOAD_FILES: "UPLOAD_FILES";
@@ -218,11 +168,6 @@ export declare type GuiModuleProps = {
218
168
  } | {
219
169
  templateId: typeof GuiIdvSteps.GENERIC;
220
170
  templateLayout: UIGenericScreenClientConfig;
221
- } | {
222
- templateId: typeof GuiIdvSteps.GENERIC_LIST;
223
- templateLayout: UIGenericListScreenClientConfig;
224
- dataSource?: GenericListDataSource | null;
225
- properties?: SessionPropertiesItem[];
226
171
  } | {
227
172
  templateId: typeof GuiIdvSteps.GENERIC_PROGRESS;
228
173
  templateLayout: UIGenericProgressScreenClientConfig;
@@ -274,26 +219,6 @@ export declare type IDV_UI_ICONS = (typeof IDV_UI_ICONS)[keyof typeof IDV_UI_ICO
274
219
 
275
220
  export declare const idvIconDataUrlMap: Record<IDV_UI_ICONS, (color?: string) => string>;
276
221
 
277
- declare type IdvModuleProps<TModuleProps, TModulesConfig> = {
278
- isProcessing?: (isProcessing: boolean) => void;
279
- moduleProps: TModuleProps;
280
- modulesConfig?: TModulesConfig;
281
- perform: (data: any, type?: PerformType) => void;
282
- idvEventListener: (module: string, data: any, logLevel?: 'INFO' | 'DEBUG') => void;
283
- nonce?: string;
284
- };
285
-
286
- declare type ImageBase = {
287
- imageURL?: string;
288
- imageId?: string;
289
- base64?: string;
290
- prepareRequired?: boolean;
291
- failurePolicy?: ImageFailurePolicy;
292
- timeout?: number;
293
- };
294
-
295
- declare type ImageFailurePolicy = 'ignore' | 'placeholderImage' | 'error';
296
-
297
222
  declare type JsonArray = JsonValue[];
298
223
 
299
224
  declare type JsonObject = {
@@ -302,18 +227,6 @@ declare type JsonObject = {
302
227
 
303
228
  declare type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
304
229
 
305
- declare const ListElementTypes: {
306
- readonly GENERIC_COLUMN: "genericColumn";
307
- readonly QUESTION: "question";
308
- readonly SECTION: "section";
309
- readonly CODE_INPUT: "codeInput";
310
- readonly TEXT_INPUT: "textInput";
311
- };
312
-
313
- declare const ListRootElementTypes: {
314
- readonly LIST_SCAFFOLD: "listScaffold";
315
- };
316
-
317
230
  declare enum LocationAccuracy {
318
231
  HIGH = "HIGH",
319
232
  BALANCED = "BALANCED",
@@ -327,13 +240,6 @@ declare type LocationSettings = {
327
240
  locationAccuracy: LocationAccuracy;
328
241
  };
329
242
 
330
- declare type PerformType = (typeof PerformTypes)[keyof typeof PerformTypes] | undefined;
331
-
332
- declare const PerformTypes: {
333
- readonly FORM: "form";
334
- readonly DATA: "data";
335
- };
336
-
337
243
  declare type PopupActionButton = {
338
244
  title?: UILabel;
339
245
  type: 'FORM';
@@ -350,8 +256,6 @@ export declare const PopupReason: {
350
256
 
351
257
  export declare type PopupReason = (typeof PopupReason)[keyof typeof PopupReason];
352
258
 
353
- declare type QuestionDataItem = QuestionDataSource;
354
-
355
259
  declare type QuestionDataSource = {
356
260
  id: string | number;
357
261
  placeholder?: string | null;
@@ -403,10 +307,6 @@ declare const RootElementTypes: {
403
307
  readonly SCAFFOLD: "scaffold";
404
308
  };
405
309
 
406
- declare type SectionDataItem = {
407
- dataItems: DataItem[];
408
- };
409
-
410
310
  declare type SessionPropertiesItem = {
411
311
  id: string;
412
312
  createdAt: string;
@@ -444,24 +344,6 @@ declare const TextAlignment: {
444
344
 
445
345
  declare type TextAlignment = (typeof TextAlignment)[keyof typeof TextAlignment];
446
346
 
447
- declare const TextFieldInputType: {
448
- readonly EMAIL: "EMAIL";
449
- readonly PHONE: "PHONE";
450
- };
451
-
452
- declare type TextFieldInputType = (typeof TextFieldInputType)[keyof typeof TextFieldInputType];
453
-
454
- declare type TextInputDataItem = {
455
- id: string | number;
456
- text: string;
457
- placeholder?: string | null;
458
- required: boolean | null;
459
- property: {
460
- id: string;
461
- };
462
- validators: Array<Validator>;
463
- };
464
-
465
347
  declare type UIButton = {
466
348
  actionId?: string;
467
349
  type?: 'RESPONSE_BODY' | 'FORM' | 'URL';
@@ -496,36 +378,6 @@ declare type UIChip = {
496
378
  backgroundColor?: string;
497
379
  };
498
380
 
499
- declare type UICodeField = {
500
- codeLength?: number;
501
- inputType?: CodeFieldInputType;
502
- fontName?: string;
503
- fontColor?: string;
504
- fontSize?: number;
505
- fontWeight?: FontWeight;
506
- interSlotSpacing?: number;
507
- slot: UICodeFieldSlot;
508
- };
509
-
510
- declare type UICodeFieldSlot = {
511
- width?: number;
512
- height?: number;
513
- backgroundColor?: string;
514
- cornerRadius?: number;
515
- borderWidth?: number;
516
- borderColor?: string;
517
- focusedBorderWidth?: number;
518
- focusedBorderColor?: string;
519
- errorBorderWidth?: number;
520
- errorBorderColor?: string;
521
- };
522
-
523
- declare type UICodeInput = {
524
- titleLabel?: UILabel;
525
- codeField: UICodeField;
526
- descriptionLabel?: UILabel;
527
- };
528
-
529
381
  declare type UIColumn = {
530
382
  elements?: UIElement[];
531
383
  horizontalAlignment?: UIHorizontalAlignment;
@@ -535,28 +387,6 @@ declare type UIColumn = {
535
387
  paddings?: UIPaddings;
536
388
  };
537
389
 
538
- declare type UiComponent = {
539
- id: string;
540
- type: typeof ListElementTypes.GENERIC_COLUMN;
541
- content: UIColumn;
542
- } | {
543
- id: string;
544
- type: typeof ListElementTypes.QUESTION;
545
- content: QuestionsItem;
546
- } | {
547
- id: string;
548
- type: typeof ListElementTypes.SECTION;
549
- content: UISection;
550
- } | {
551
- id: string;
552
- type: typeof ListElementTypes.CODE_INPUT;
553
- content: UICodeInput;
554
- } | {
555
- id: string;
556
- type: typeof ListElementTypes.TEXT_INPUT;
557
- content: UITextInput;
558
- };
559
-
560
390
  declare type UIDetailsItem = {
561
391
  title?: UILabel;
562
392
  description?: UILabel;
@@ -658,11 +488,6 @@ declare type UIGalleryScreenClientConfig = {
658
488
  selectionLimit?: number;
659
489
  };
660
490
 
661
- declare type UIGenericListScreenClientConfig = {
662
- rootElement: UIListRootElement;
663
- dataSource: GenericListDataSource;
664
- };
665
-
666
491
  declare type UIGenericLocationScreenClientConfig = {
667
492
  rootElement: UIRootElement;
668
493
  popups: GenericPopup[];
@@ -765,28 +590,6 @@ declare type UILabel = {
765
590
  fontWeight?: FontWeight;
766
591
  };
767
592
 
768
- declare type UIListColumn = {
769
- uiComponents: UiComponent[];
770
- verticalAlignment?: UIVerticalAlignment;
771
- backgroundColor?: string;
772
- cornerRadius?: number;
773
- paddings?: UIPaddings;
774
- };
775
-
776
- declare type UIListRootElement = {
777
- type: typeof ListRootElementTypes.LIST_SCAFFOLD;
778
- content: UIListScaffoldContainer;
779
- };
780
-
781
- declare type UIListScaffoldContainer = {
782
- topColumn: UIColumn;
783
- mainListColumn: UIListColumn;
784
- bottomColumn: UIColumn;
785
- backgroundColor: string;
786
- backgroundImage?: UIImage;
787
- cornerRadius?: number;
788
- };
789
-
790
593
  declare type UIMultiDropdownControl = DropdownControl & {
791
594
  chip: UIChip;
792
595
  };
@@ -886,12 +689,6 @@ declare type UIScaffoldContainer = {
886
689
  cornerRadius?: number;
887
690
  };
888
691
 
889
- declare type UISection = {
890
- backgroundColor?: string;
891
- cornerRadius?: number;
892
- paddings?: UIPaddings;
893
- };
894
-
895
692
  declare type UISelectorButtonsQuestion = QuestionItem & {
896
693
  displayType: typeof QUESTIONS_DISPLAY_TYPES.SELECTOR_BUTTONS;
897
694
  option: UIButtonOption;
@@ -930,39 +727,18 @@ declare type UIStatusScreenClientConfig = {
930
727
  backgroundImage?: UIImage;
931
728
  };
932
729
 
933
- declare type UITextField = {
934
- inputType?: TextFieldInputType;
935
- fontName: string;
936
- fontColor: string;
937
- fontSize: number;
938
- fontWeight: FontWeight;
730
+ declare type UITextField = UILabel & {
939
731
  placeholder?: UILabel;
732
+ inputType?: TEXT_INPUT_TYPES;
940
733
  backgroundColor?: string;
941
734
  cornerRadius?: number;
942
735
  borderWidth?: number;
943
736
  borderColor?: string;
944
- focusedBorderWidth?: number;
945
- focusedBorderColor?: string;
946
- errorBorderWidth?: number;
947
- errorBorderColor?: string;
948
- };
949
-
950
- declare type UITextInput = {
951
- titleLabel?: UILabel;
952
- textField: UITextField;
953
- descriptionLabel?: UILabel;
954
737
  };
955
738
 
956
739
  declare type UITextQuestion = QuestionItem & {
957
740
  displayType: typeof QUESTIONS_DISPLAY_TYPES.TEXT_EXPANDABLE | typeof QUESTIONS_DISPLAY_TYPES.TEXT_SINGLE_LINE;
958
- textField?: UILabel & {
959
- placeholder?: UILabel;
960
- inputType?: TEXT_INPUT_TYPES;
961
- backgroundColor?: string;
962
- cornerRadius?: number;
963
- borderWidth?: number;
964
- borderColor?: string;
965
- };
741
+ textField?: UITextField;
966
742
  };
967
743
 
968
744
  declare type UIUploadFilesScreenClientConfig = {