gotrip-fx-transaction-form 1.0.186-dev → 1.0.187-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.186-dev",
3
+ "version": "1.0.187-dev",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -1,20 +1,10 @@
1
- import { Control, UseFormSetValue } from 'react-hook-form';
2
- import { InsuranceFormValues } from './types';
3
- import { EInsuranceType } from '../../types/insurance';
1
+ import { Control } from 'react-hook-form';
2
+ import { TravelPlanFormValues } from './types';
4
3
  interface StepOneFormProps {
5
- control: Control<InsuranceFormValues>;
6
- insuranceTypeValue: EInsuranceType;
7
- isTMIVSelected: boolean;
8
- isMSIGSelected: boolean;
9
- isPVISelected?: boolean;
10
- providerValue: string;
11
- destinationIdValue: string;
12
- updateDestinationId: (value: string | null) => void;
4
+ control: Control<TravelPlanFormValues>;
13
5
  tripStart: Date | null;
14
6
  tripEnd: Date | null;
15
- setValue: UseFormSetValue<InsuranceFormValues>;
16
- onSubmit: (event: React.FormEvent<HTMLFormElement>) => void;
17
- formId?: string;
7
+ setValue: (name: keyof TravelPlanFormValues, value: any) => void;
18
8
  }
19
- export declare const StepOneForm: ({ control, insuranceTypeValue, isTMIVSelected, isMSIGSelected, isPVISelected, providerValue, destinationIdValue, updateDestinationId, tripStart, tripEnd, setValue, onSubmit, formId, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
20
10
  export {};
@@ -1,10 +1,10 @@
1
1
  import { CoveragePlanPremium, CalculatePremiumRequest, TravelPlanFormValues } from './types';
2
- interface StepTwoPlansV2Props {
2
+ interface StepTwoPlansProps {
3
3
  requestPayload: CalculatePremiumRequest | null;
4
4
  selectedPlanId?: number | null;
5
5
  onPlanSelect: (plan: CoveragePlanPremium) => void;
6
6
  insuranceType?: 'travel' | 'car' | 'motorcycle' | string;
7
7
  travelPlan?: TravelPlanFormValues | null;
8
8
  }
9
- export declare const StepTwoPlansV2: ({ requestPayload, selectedPlanId, onPlanSelect, insuranceType, travelPlan, }: StepTwoPlansV2Props) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const StepTwoPlans: ({ requestPayload, selectedPlanId, onPlanSelect, insuranceType, travelPlan, }: StepTwoPlansProps) => import("react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -1,9 +1,9 @@
1
- import { EPolicyStatus, EQuoteStatus } from '../../types/insurance';
1
+ import { EQuoteStatus } from '../../types/insurance';
2
2
  export declare const QUOTE_STATUS_BADGE: Record<EQuoteStatus, {
3
3
  label: string;
4
4
  color: string;
5
5
  }>;
6
- export declare const POLICY_STATUS_BADGE: Record<EPolicyStatus, {
6
+ export declare const POLICY_STATUS_BADGE: Record<EQuoteStatus, {
7
7
  label: string;
8
8
  color: string;
9
9
  }>;
@@ -213,13 +213,9 @@ export declare const ApiUrls: {
213
213
  };
214
214
  insuranceHandlers: {
215
215
  providers: string;
216
- providerAvailability: (provider: string) => string;
217
216
  coveragePlans: (provider: string) => string;
218
217
  transactionDetail: (publicId: string) => string;
219
218
  transactionList: string;
220
- createQuote: string;
221
- createPolicy: string;
222
- createPolicyFromQuote: (quoteId: number | string) => string;
223
219
  coveragePlanQuotes: (provider: string) => string;
224
220
  travelInsuranceSettings: string;
225
221
  calculatePremium: string;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { CoveragePlanQuotesRequestPayload, CoveragePlanQuotesResponse } from '../components/Insurance/types';
3
- import { EDestination, EGender, EInsuranceType, EPolicyType, ERelationToPrimary, ETravelType, EPersonType } from '../types/insurance';
3
+ import { EGender, EInsuranceType, EPolicyType, ERelationToPrimary, ETravelType, EPersonType } from '../types/insurance';
4
4
  interface Country {
5
5
  id: number;
6
6
  name: string;
@@ -30,7 +30,6 @@ type InsuranceDataContextValue = {
30
30
  countriesError: string | null;
31
31
  provincesError: string | null;
32
32
  wardsErrorByState: Record<number, string | undefined>;
33
- refetchProviders: () => void;
34
33
  refetchCountries: () => void;
35
34
  refetchProvinces: () => void;
36
35
  fetchWardsByState: (stateId: number) => Promise<void>;
@@ -38,23 +37,10 @@ type InsuranceDataContextValue = {
38
37
  travelInsuranceSettings: Record<string, any>;
39
38
  loadingTravelInsuranceSettings: boolean;
40
39
  refetchTravelInsuranceSettings: () => void;
41
- policyTypeOptions: {
42
- value: EPolicyType;
43
- label: string;
44
- description?: string;
45
- }[];
46
- destinationOptions: {
47
- value: EDestination;
48
- label: string;
49
- }[];
50
40
  insuranceTypeOptions: {
51
41
  value: EInsuranceType;
52
42
  label: string;
53
43
  }[];
54
- travelTypeOptions: {
55
- value: ETravelType;
56
- label: string;
57
- }[];
58
44
  getPolicyTypeLabel: (value?: EPolicyType | null) => string;
59
45
  getInsuranceTypeLabel: (value?: EInsuranceType | null) => string;
60
46
  getTravelTypeLabel: (value?: ETravelType | null) => string;
@@ -83,7 +83,6 @@ export declare const useInsuranceTransaction: (options?: {
83
83
  error: string | null;
84
84
  refetch: () => Promise<void>;
85
85
  };
86
- createPolicyFromQuote: (quoteId: number) => Promise<any>;
87
86
  createTransaction: (payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
88
87
  isCreatingTransaction: boolean;
89
88
  checkTransactionStatus: (publicId: string) => Promise<InsuranceTransaction>;
@@ -1,18 +0,0 @@
1
- import { InsuranceFormValues, CoveragePlanQuote } from './types';
2
- type ConsentState = Record<string, boolean>;
3
- interface StepFourSummaryProps {
4
- plan: CoveragePlanQuote;
5
- stepOneValues: InsuranceFormValues;
6
- policyTypeLabel: string;
7
- destinationLabel: string;
8
- insuranceTypeLabel: string;
9
- travelTypeLabel: string;
10
- totalDays: number;
11
- travellersCount: number;
12
- consents: ConsentState;
13
- provider: string;
14
- travelInsuranceSettings?: Record<string, any>;
15
- onConsentChange: (key: string, value: boolean) => void;
16
- }
17
- export declare const StepFourSummary: ({ plan, stepOneValues, policyTypeLabel, destinationLabel, insuranceTypeLabel, travelTypeLabel, totalDays, travellersCount, consents, provider, travelInsuranceSettings, onConsentChange, }: StepFourSummaryProps) => import("react/jsx-runtime").JSX.Element;
18
- export {};
@@ -1,10 +0,0 @@
1
- import { Control } from 'react-hook-form';
2
- import { TravelPlanFormValues } from './types';
3
- interface StepOneFormV2Props {
4
- control: Control<TravelPlanFormValues>;
5
- tripStart: Date | null;
6
- tripEnd: Date | null;
7
- setValue: (name: keyof TravelPlanFormValues, value: any) => void;
8
- }
9
- export declare const StepOneFormV2: ({ control, tripStart, tripEnd, setValue }: StepOneFormV2Props) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,11 +0,0 @@
1
- import { CoveragePlanQuote } from './types';
2
- interface StepThreePlanComparisonProps {
3
- provider: string;
4
- plans: CoveragePlanQuote[];
5
- selectedPlanId?: number | null;
6
- onPlanSelect: (plan: CoveragePlanQuote) => void;
7
- onPlanBuyNow?: (plan: CoveragePlanQuote) => void;
8
- travelInsuranceSettings?: Record<string, any>;
9
- }
10
- export declare const StepThreePlanComparison: ({ provider, plans, selectedPlanId, onPlanSelect, onPlanBuyNow, travelInsuranceSettings, }: StepThreePlanComparisonProps) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,15 +0,0 @@
1
- import { Control, UseFormSetValue } from 'react-hook-form';
2
- import { HolderFormValues, InsuredMember } from './types';
3
- import { ERelationToPrimary } from '../../types/insurance';
4
- interface StepTwoFormProps {
5
- holderControl: Control<HolderFormValues>;
6
- setHolderValue: UseFormSetValue<HolderFormValues>;
7
- insuredMembers: InsuredMember[];
8
- onEditMember: (index: number) => void;
9
- relationshipOptions: {
10
- label: string;
11
- value: ERelationToPrimary;
12
- }[];
13
- }
14
- export declare const StepTwoForm: ({ holderControl, setHolderValue, insuredMembers, onEditMember, relationshipOptions, }: StepTwoFormProps) => import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -1 +0,0 @@
1
- export declare const CreateInsuranceTransactionPageV2: () => import("react/jsx-runtime").JSX.Element;