gotrip-fx-transaction-form 1.0.207-dev → 1.0.209-dev

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.207-dev",
3
+ "version": "1.0.209-dev",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -6,6 +6,7 @@ interface DateRangePickerProps {
6
6
  tripEnd: Date | null;
7
7
  onDatesChange?: (startDate: Date | null, endDate: Date | null) => void;
8
8
  showLabel?: boolean;
9
+ labelPosition?: 'top' | 'left';
9
10
  }
10
- export declare const DateRangePicker: ({ control, tripStart, tripEnd, onDatesChange, showLabel, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const DateRangePicker: ({ control, tripStart, tripEnd, onDatesChange, showLabel, labelPosition, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export {};
@@ -7,6 +7,11 @@ interface StepOneFormProps {
7
7
  setValue: (name: keyof TravelPlanFormValues, value: any) => void;
8
8
  onQuickPlanSelect?: (plan: CoveragePlanPremium, adultsCount: number, countryId: number) => void;
9
9
  recommendBoxHeight?: string;
10
+ onBack?: () => void;
11
+ onNext?: () => void;
12
+ isSubmitting?: boolean;
13
+ isStepOneReady?: boolean;
14
+ isGuest?: boolean;
10
15
  }
11
- export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue, onQuickPlanSelect, recommendBoxHeight, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue, onQuickPlanSelect, recommendBoxHeight, onBack, onNext, isSubmitting, isStepOneReady, isGuest, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
12
17
  export {};
@@ -13,5 +13,5 @@ interface StepThreeInsuredPeopleProps {
13
13
  onBack: () => void;
14
14
  onFormRef?: (form: HTMLFormElement | null) => void;
15
15
  }
16
- export declare const StepThreeInsuredPeople: ({ initialPeople, insuranceType, providerCode, buyerInfo, onSubmit, onFormRef, }: StepThreeInsuredPeopleProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const StepThreeInsuredPeople: ({ initialPeople, providerCode, buyerInfo, onSubmit, onFormRef, }: StepThreeInsuredPeopleProps) => import("react/jsx-runtime").JSX.Element;
17
17
  export {};
@@ -0,0 +1,31 @@
1
+ import { FieldValues, UseFormSetValue } from 'react-hook-form';
2
+ import { DocumentScanResult } from '../../hooks/useDocumentScan';
3
+ export type CountryOption = {
4
+ value: string;
5
+ label: string;
6
+ };
7
+ type AutofillFieldPaths = {
8
+ fullName: any;
9
+ idType: any;
10
+ idNumber: any;
11
+ dateOfBirth: any;
12
+ gender: any;
13
+ nationality: any;
14
+ countryId?: any;
15
+ address?: any;
16
+ };
17
+ type AutofillHelpers = {
18
+ formatDateToYYYYMMDD: (dateStr: string | undefined) => string;
19
+ findCountryIdByNationality: (nationality: string | undefined, countryOptions: Array<{
20
+ value: string;
21
+ label: string;
22
+ }>) => number | null;
23
+ };
24
+ export declare function applyDocumentScanAutofillToRHF<TFieldValues extends FieldValues>({ setValue, data, fields, countryOptions, helpers, }: {
25
+ setValue: UseFormSetValue<TFieldValues>;
26
+ data: DocumentScanResult;
27
+ fields: AutofillFieldPaths;
28
+ countryOptions: CountryOption[];
29
+ helpers: AutofillHelpers;
30
+ }): void;
31
+ export {};