gotrip-fx-transaction-form 1.0.202-dev → 1.0.203-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/index.js +26753 -26443
- package/package.json +1 -1
- package/types/components/Apps/EmbededIndividualApp.d.ts +2 -1
- package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +2 -1
- package/types/components/Insurance/DateRangePicker.d.ts +11 -0
- package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +1 -1
- package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +15 -0
- package/types/components/Insurance/StepOneForm.d.ts +4 -2
- package/types/components/Insurance/StepThree.d.ts +24 -0
- package/types/components/Insurance/types.d.ts +1 -1
- package/types/constants/api-urls.d.ts +1 -0
- package/types/hooks/useInsurancePlans.d.ts +5 -0
- package/types/pages/guest/insurance-create.d.ts +2 -1
package/package.json
CHANGED
|
@@ -7,5 +7,6 @@ export type EmbededIndividualAppProps = {
|
|
|
7
7
|
displayDefaultBankLogo?: boolean;
|
|
8
8
|
type?: ESdkFormType;
|
|
9
9
|
scrollable?: boolean;
|
|
10
|
+
recommendBoxHeight?: string;
|
|
10
11
|
};
|
|
11
|
-
export declare const EmbededIndividualApp: ({ apiKey, externalCssUrl, hide, defaultBank, displayDefaultBankLogo, type, scrollable, }: EmbededIndividualAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const EmbededIndividualApp: ({ apiKey, externalCssUrl, hide, defaultBank, displayDefaultBankLogo, type, scrollable, recommendBoxHeight, }: EmbededIndividualAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,5 +4,6 @@ export interface CreateInsuranceTransactionFormProps {
|
|
|
4
4
|
onBack?: () => void;
|
|
5
5
|
onSuccess?: (transactionData: any) => void;
|
|
6
6
|
scrollable?: boolean;
|
|
7
|
+
recommendBoxHeight?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare const CreateInsuranceTransactionForm: ({ storageKey, title, onBack, onSuccess, scrollable, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const CreateInsuranceTransactionForm: ({ storageKey, title, onBack, onSuccess, scrollable, recommendBoxHeight, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Control } from 'react-hook-form';
|
|
2
|
+
import { TravelPlanFormValues } from './types';
|
|
3
|
+
interface DateRangePickerProps {
|
|
4
|
+
control: Control<TravelPlanFormValues>;
|
|
5
|
+
tripStart: Date | null;
|
|
6
|
+
tripEnd: Date | null;
|
|
7
|
+
onDatesChange?: (startDate: Date | null, endDate: Date | null) => void;
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const DateRangePicker: ({ control, tripStart, tripEnd, onDatesChange, showLabel, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -17,5 +17,5 @@ interface InsurancePlanListProps {
|
|
|
17
17
|
travelInsuranceSettings?: Record<string, any>;
|
|
18
18
|
travelPlan?: TravelPlanFormValues | null;
|
|
19
19
|
}
|
|
20
|
-
export declare const InsurancePlanList: ({ plans, loading,
|
|
20
|
+
export declare const InsurancePlanList: ({ plans, loading, onPlanSelect, title, columns, emptyMessage, showDiscount, actionButtonText, travelInsuranceSettings, travelPlan, }: InsurancePlanListProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CoveragePlanPremium, TravelPlanFormValues } from '../types';
|
|
2
|
+
export interface QuickCoveragePlan {
|
|
3
|
+
countryId: number;
|
|
4
|
+
provider: string;
|
|
5
|
+
plan: CoveragePlanPremium;
|
|
6
|
+
}
|
|
7
|
+
interface QuickCoveragePlanCardProps {
|
|
8
|
+
quickPlan: QuickCoveragePlan;
|
|
9
|
+
countryName: string;
|
|
10
|
+
onBuyNow: (plan: CoveragePlanPremium, adultsCount: number) => void;
|
|
11
|
+
travelInsuranceSettings?: Record<string, any>;
|
|
12
|
+
travelPlan?: TravelPlanFormValues | null;
|
|
13
|
+
}
|
|
14
|
+
export declare const QuickCoveragePlanCard: ({ quickPlan, countryName, onBuyNow, travelInsuranceSettings, travelPlan, }: QuickCoveragePlanCardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Control } from 'react-hook-form';
|
|
2
|
-
import { TravelPlanFormValues } from './types';
|
|
2
|
+
import { TravelPlanFormValues, CoveragePlanPremium } from './types';
|
|
3
3
|
interface StepOneFormProps {
|
|
4
4
|
control: Control<TravelPlanFormValues>;
|
|
5
5
|
tripStart: Date | null;
|
|
6
6
|
tripEnd: Date | null;
|
|
7
7
|
setValue: (name: keyof TravelPlanFormValues, value: any) => void;
|
|
8
|
+
onQuickPlanSelect?: (plan: CoveragePlanPremium, adultsCount: number, countryId: number) => void;
|
|
9
|
+
recommendBoxHeight?: string;
|
|
8
10
|
}
|
|
9
|
-
export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue, onQuickPlanSelect, recommendBoxHeight, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Control } from 'react-hook-form';
|
|
2
|
+
import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
|
|
3
|
+
import { EInsuranceType } from '../../types/insurance';
|
|
4
|
+
interface StepThreeProps {
|
|
5
|
+
control: Control<TravelPlanFormValues>;
|
|
6
|
+
tripStart: Date | null;
|
|
7
|
+
tripEnd: Date | null;
|
|
8
|
+
stepThreeChildStep: number;
|
|
9
|
+
onStepThreeChildStepClick: (step: number) => void;
|
|
10
|
+
selectedPlan: CoveragePlanPremium | null;
|
|
11
|
+
buyerInfo: BuyerFormValues | null;
|
|
12
|
+
insuredPeople: InsuredPerson[];
|
|
13
|
+
insuranceType: EInsuranceType;
|
|
14
|
+
adultsCount: number | null;
|
|
15
|
+
childrenCount: number | null;
|
|
16
|
+
onBuyerInfoSubmit: (data: BuyerFormValues) => void;
|
|
17
|
+
onInsuredPeopleSubmit: (people: InsuredPerson[]) => void;
|
|
18
|
+
onStepThreeBack: () => void;
|
|
19
|
+
onDatesChange?: (startDate: Date | null, endDate: Date | null) => void;
|
|
20
|
+
buyerInfoFormRef: React.RefObject<HTMLFormElement | null>;
|
|
21
|
+
insuredPeopleFormRef: React.RefObject<HTMLFormElement | null>;
|
|
22
|
+
}
|
|
23
|
+
export declare const StepThree: ({ control, tripStart, tripEnd, stepThreeChildStep, onStepThreeChildStepClick, selectedPlan, buyerInfo, insuredPeople, insuranceType, adultsCount, childrenCount, onBuyerInfoSubmit, onInsuredPeopleSubmit, onStepThreeBack, onDatesChange, buyerInfoFormRef, insuredPeopleFormRef, }: StepThreeProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -138,7 +138,7 @@ export type InsuredPersonFormValues = {
|
|
|
138
138
|
gender?: EGender;
|
|
139
139
|
idType: EIdType;
|
|
140
140
|
idNumber: string;
|
|
141
|
-
relationship: ERelationToPrimary;
|
|
141
|
+
relationship: ERelationToPrimary | null;
|
|
142
142
|
nationality: number | null;
|
|
143
143
|
};
|
|
144
144
|
export type InsuredPerson = InsuredPersonFormValues & {
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { CoveragePlanPremium, CalculatePremiumRequest, InsuredPerson, TravelPlanFormValues } from '../components/Insurance/types';
|
|
2
|
+
import { QuickCoveragePlan } from '../components/Insurance/InsurancePlans/QuickCoveragePlanCard';
|
|
2
3
|
interface UseInsurancePlansReturn {
|
|
3
4
|
plans: CoveragePlanPremium[];
|
|
4
5
|
loading: boolean;
|
|
5
6
|
error: string | null;
|
|
6
7
|
refetch: () => Promise<void>;
|
|
7
8
|
recalculatePremiumForPlan: (travelPlan: TravelPlanFormValues, insuredPeople: InsuredPerson[], planId: number, provider: string) => Promise<CoveragePlanPremium | null>;
|
|
9
|
+
quickRecommendations: QuickCoveragePlan[];
|
|
10
|
+
loadingQuickRecommendations: boolean;
|
|
11
|
+
errorQuickRecommendations: string | null;
|
|
12
|
+
refetchQuickRecommendations: () => Promise<void>;
|
|
8
13
|
}
|
|
9
14
|
export declare const useInsurancePlans: (requestPayload: CalculatePremiumRequest | null) => UseInsurancePlansReturn;
|
|
10
15
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface CreateGuestInsuranceTransactionPageProps {
|
|
2
2
|
scrollable?: boolean;
|
|
3
|
+
recommendBoxHeight?: string;
|
|
3
4
|
}
|
|
4
|
-
export declare const CreateGuestInsuranceTransactionPage: ({ scrollable, }: CreateGuestInsuranceTransactionPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const CreateGuestInsuranceTransactionPage: ({ scrollable, recommendBoxHeight, }: CreateGuestInsuranceTransactionPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|