gotrip-fx-transaction-form 1.0.201-dev → 1.0.201

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.
Files changed (164) hide show
  1. package/assets/index.css +1 -1
  2. package/index.js +48010 -39279
  3. package/package.json +1 -1
  4. package/types/components/AddTransaction/Agent.d.ts +3 -2
  5. package/types/components/AddTransaction/FlightInfomation.d.ts +2 -1
  6. package/types/components/AddTransaction/SelectingBankMessageAlerts.d.ts +5 -0
  7. package/types/components/Admin/AgencyUserSelector/AgencyUserSelector.d.ts +7 -0
  8. package/types/components/Admin/AgencyUserSelector/AgencyUserSelectorModal.d.ts +10 -0
  9. package/types/components/ApprovalStatusBadge.d.ts +7 -0
  10. package/types/components/Apps/EmbededIndividualApp.d.ts +2 -1
  11. package/types/components/BankTransferInfo/BankTransferInfoDisplay.d.ts +7 -0
  12. package/types/components/Common/DateDisplay.d.ts +7 -0
  13. package/types/components/Common/MultiTagCombobox.d.ts +14 -0
  14. package/types/components/Common/PrimaryRadioGroup.d.ts +16 -0
  15. package/types/components/Common/TimeRangeSelect.d.ts +17 -0
  16. package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +38 -2
  17. package/types/components/Insurance/DateRangePicker.d.ts +12 -0
  18. package/types/components/Insurance/FxInsuranceCouponBox.d.ts +10 -0
  19. package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
  20. package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +1 -1
  21. package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +16 -0
  22. package/types/components/Insurance/InsurancePlans/QuickRecommendationsSection.d.ts +18 -0
  23. package/types/components/Insurance/InsuranceSummaryOverview.d.ts +7 -2
  24. package/types/components/Insurance/InsuranceTypeAndPeopleCountFields.d.ts +10 -0
  25. package/types/components/Insurance/InsuredTravelersTable.d.ts +6 -0
  26. package/types/components/Insurance/ProviderApiDebugDialog.d.ts +17 -0
  27. package/types/components/Insurance/SimpleDetail.d.ts +2 -1
  28. package/types/components/Insurance/StepFourPayment.d.ts +32 -5
  29. package/types/components/Insurance/StepOneForm.d.ts +11 -2
  30. package/types/components/Insurance/StepThree.d.ts +29 -0
  31. package/types/components/Insurance/StepThreeBuyerInfo.d.ts +4 -1
  32. package/types/components/Insurance/StepThreeInsuredPeople.d.ts +4 -1
  33. package/types/components/Insurance/documentScanAutofill.d.ts +37 -0
  34. package/types/components/Insurance/insuranceExcelImport.d.ts +13 -0
  35. package/types/components/Insurance/insuredPeopleImport.d.ts +23 -0
  36. package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +13 -3
  37. package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
  38. package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +10 -0
  39. package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
  40. package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
  41. package/types/components/Insurance/shared/index.d.ts +5 -0
  42. package/types/components/Insurance/types.d.ts +21 -6
  43. package/types/components/Insurance/validationUtils.d.ts +7 -1
  44. package/types/components/Modal/CancelTransactionModal.d.ts +1 -0
  45. package/types/components/Modal/ESimPurchaseModal.d.ts +4 -1
  46. package/types/components/Modal/EsimBankTransferModal.d.ts +13 -0
  47. package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
  48. package/types/components/Modal/MotorInsurancePaymentModal.d.ts +13 -0
  49. package/types/components/Modal/ProcessingOrderDialog.d.ts +8 -0
  50. package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +9 -0
  51. package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +30 -0
  52. package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +26 -0
  53. package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +12 -0
  54. package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +17 -0
  55. package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
  56. package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +8 -0
  57. package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +30 -0
  58. package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +27 -0
  59. package/types/components/MotorInsurance/Car/CarStepThreeInfo.d.ts +11 -0
  60. package/types/components/MotorInsurance/Car/CarStepTwoPlan.d.ts +11 -0
  61. package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +17 -0
  62. package/types/components/MotorInsurance/Car/car-form.constants.d.ts +23 -0
  63. package/types/components/MotorInsurance/Car/index.d.ts +6 -0
  64. package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +17 -0
  65. package/types/components/MotorInsurance/DocumentUploadPreview.d.ts +14 -0
  66. package/types/components/MotorInsurance/image-storage.utils.d.ts +18 -0
  67. package/types/components/MotorInsurance/index.d.ts +4 -0
  68. package/types/components/MotorInsurance/motor-insurance.types.d.ts +335 -0
  69. package/types/components/MotorInsurance/motor-insurance.validation.d.ts +21 -0
  70. package/types/components/Notification/NotificationBell.d.ts +5 -0
  71. package/types/components/Notification/NotificationItem.d.ts +8 -0
  72. package/types/components/Notification/NotificationPanel.d.ts +6 -0
  73. package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
  74. package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
  75. package/types/components/TransactionList/PublicIdActionMenu.d.ts +3 -1
  76. package/types/constants/api-urls.d.ts +57 -5
  77. package/types/constants/business-codes.d.ts +2 -1
  78. package/types/constants/env.d.ts +3 -0
  79. package/types/constants/policy-enums.d.ts +11 -0
  80. package/types/constants/regex.d.ts +4 -0
  81. package/types/constants/tenant.d.ts +3 -0
  82. package/types/constants/transaction-status-labels.d.ts +3 -0
  83. package/types/embeded-main.d.ts +1 -0
  84. package/types/hooks/fetchEsimTransaction.d.ts +2 -0
  85. package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
  86. package/types/hooks/traveller-confirmation/submit-confirmation.util.d.ts +1 -0
  87. package/types/hooks/traveller-confirmation/traveller-confirmation-flow.d.ts +4 -0
  88. package/types/hooks/traveller-confirmation/types.d.ts +22 -0
  89. package/types/hooks/traveller-confirmation/usePurchaseTravellerConfirmation.d.ts +12 -0
  90. package/types/hooks/traveller-confirmation/useTravellerConfirmationFetch.d.ts +2 -0
  91. package/types/hooks/useAdminDashboard.d.ts +19 -0
  92. package/types/hooks/useAutoSelectBankBranchAndDepartment.d.ts +19 -0
  93. package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
  94. package/types/hooks/useConfirmTransaction.d.ts +15 -31
  95. package/types/hooks/useCoupon.d.ts +95 -0
  96. package/types/hooks/useCouponValidation.d.ts +29 -0
  97. package/types/hooks/useCreateAutoCoupon.d.ts +5 -0
  98. package/types/hooks/useFxPrefill.d.ts +19 -0
  99. package/types/hooks/useGroupCustomers.d.ts +12 -9
  100. package/types/hooks/useInsuranceData.d.ts +3 -11
  101. package/types/hooks/useInsurancePlans.d.ts +13 -1
  102. package/types/hooks/useInsuranceTransaction.d.ts +34 -4
  103. package/types/hooks/useLocationData.d.ts +22 -0
  104. package/types/hooks/useMotorInsurance.d.ts +17 -0
  105. package/types/hooks/useMotorInsuranceTransaction.d.ts +124 -0
  106. package/types/hooks/useMotorQuote.d.ts +15 -0
  107. package/types/hooks/useNotifications.d.ts +10 -0
  108. package/types/hooks/usePolicyGroups.d.ts +1 -0
  109. package/types/hooks/useTenantList.d.ts +3 -4
  110. package/types/hooks/useUserById.d.ts +7 -0
  111. package/types/hooks/useUserSearch.d.ts +10 -0
  112. package/types/hooks/useUsersByTenantTypes.d.ts +11 -0
  113. package/types/hooks/useVehicleRegistrationScan.d.ts +39 -0
  114. package/types/pages/admin/CreateOrderOnBehalfTest.d.ts +3 -0
  115. package/types/pages/admin/coupons/CampaignCouponTable.d.ts +13 -0
  116. package/types/pages/admin/coupons/CampaignDetailPage.d.ts +1 -0
  117. package/types/pages/admin/coupons/CampaignListPage.d.ts +1 -0
  118. package/types/pages/admin/coupons/CouponFormPage.d.ts +1 -0
  119. package/types/pages/admin/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
  120. package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
  121. package/types/pages/admin/insurance-policy-management/InsurancePolicyManagement.d.ts +1 -0
  122. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorBikeTransactionPage.d.ts +1 -0
  123. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorCarTransactionPage.d.ts +1 -0
  124. package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts +1 -0
  125. package/types/pages/admin/motor-insurance-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  126. package/types/pages/admin/motor-insurance-transaction-list/MotorInsuranceTransactionListPage.d.ts +5 -0
  127. package/types/pages/agency/home/HomePage.d.ts +1 -0
  128. package/types/pages/agency/home/constants.d.ts +16 -0
  129. package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +1 -0
  130. package/types/pages/agency/insurance/motor-transaction-create/CreateCarInsuranceTransactionPage.d.ts +1 -0
  131. package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
  132. package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  133. package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
  134. package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +1 -0
  135. package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
  136. package/types/pages/agency/traveller-confirmation/PurchaseTravellerConfirmation.d.ts +5 -0
  137. package/types/pages/agency/traveller-confirmation/TravellerPurchaseConfirmation.d.ts +2 -0
  138. package/types/pages/guest/insurance-create.d.ts +4 -1
  139. package/types/pages/guest/motor-insurance-create.d.ts +6 -0
  140. package/types/providers/AppSettingsProvider.d.ts +1 -0
  141. package/types/store/useNotificationStore.d.ts +16 -0
  142. package/types/store/useTenantStore.d.ts +12 -0
  143. package/types/store/useTrackingStore.d.ts +10 -0
  144. package/types/types/app-settings.d.ts +13 -1
  145. package/types/types/coupon.d.ts +70 -0
  146. package/types/types/enum.d.ts +15 -2
  147. package/types/types/insurance-transaction.dto.d.ts +22 -1
  148. package/types/types/insurance.d.ts +19 -2
  149. package/types/types/notification.d.ts +23 -0
  150. package/types/types/response.dto.d.ts +53 -5
  151. package/types/types/sdk.d.ts +5 -1
  152. package/types/types/tracking.dto.d.ts +21 -0
  153. package/types/util/booker-display.d.ts +6 -0
  154. package/types/util/couponErrorMessages.d.ts +2 -0
  155. package/types/util/debt-report-display.d.ts +4 -0
  156. package/types/util/formatter.d.ts +6 -0
  157. package/types/util/fx-travelling-messages.d.ts +1 -0
  158. package/types/util/fx.d.ts +15 -0
  159. package/types/util/order-payment-display.d.ts +16 -0
  160. package/types/util/sim-display.d.ts +2 -0
  161. package/types/util/tracking.d.ts +19 -0
  162. package/types/util/transaction.util.d.ts +2 -1
  163. package/types/utils/bank.d.ts +4 -0
  164. package/types/utils/transaction-confirmation-link.d.ts +9 -0
@@ -0,0 +1,14 @@
1
+ interface SimpleSelectOption<T> {
2
+ value: T;
3
+ label: string;
4
+ }
5
+ interface SimpleSelectProps<T> {
6
+ value: T;
7
+ onChange: (value: T) => void;
8
+ options: SimpleSelectOption<T>[];
9
+ placeholder?: string;
10
+ size?: 'sm' | 'md';
11
+ minWidth?: number;
12
+ }
13
+ export declare function SimpleSelect<T extends string | number>({ value, onChange, options, placeholder, size, minWidth, }: SimpleSelectProps<T>): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ interface StepFooterProps {
2
+ onBack: () => void;
3
+ onNext?: () => void;
4
+ nextLabel?: string;
5
+ nextDisabled?: boolean;
6
+ }
7
+ export declare function StepFooter({ onBack, onNext, nextLabel, nextDisabled, }: StepFooterProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ export { PaymentMethodSelector, type PaymentMethodSelectorVariant } from './PaymentMethodSelector';
2
+ export { InfoBlockCard } from './InfoBlockCard';
3
+ export { StepFooter } from './StepFooter';
4
+ export { SimpleSelect } from './SimpleSelect';
5
+ export { FieldLabel, InfoBanner, OptionCard, DateInput, InputType, FormInputField, FormTextareaField, CountryCombobox, ProvinceCombobox, WardCombobox, } from './FormElements';
@@ -1,4 +1,4 @@
1
- import { EDestination, EGender, EIdType, EInsuranceType, EPolicyType, ERelationToPrimary, ETravelType, EPersonType, EPersonValidationStatus } from '../../types/insurance';
1
+ import { EDestination, EBuyerType, EGender, EIdType, EInsuranceType, EInsuranceProviderType, EPolicyType, ERelationToPrimary, ETravelType, EPersonType, EPersonValidationStatus, ETravelScope } from '../../types/insurance';
2
2
  export type InsuranceFormValues = {
3
3
  provider: string;
4
4
  type: EInsuranceType;
@@ -79,23 +79,33 @@ export type CoveragePlanQuote = {
79
79
  };
80
80
  export type TravelPlanFormValues = {
81
81
  destinationCountryId: number | null;
82
+ provinceFromId: number | null;
83
+ provinceToId: number | null;
82
84
  startDate: Date | null;
83
85
  endDate: Date | null;
84
86
  insuranceType: EInsuranceType;
85
87
  adultsCount: number;
88
+ teenagerCount: number;
86
89
  childrenCount: number;
90
+ travelScope?: ETravelScope;
87
91
  };
92
+ export type InsuranceTypeAndPeopleCountValues = Pick<TravelPlanFormValues, 'insuranceType' | 'adultsCount' | 'teenagerCount' | 'childrenCount'>;
88
93
  export type CalculatePremiumRequest = {
89
- destinationCountryId: number;
94
+ travelScope: ETravelScope;
95
+ destinationCountryId?: number;
96
+ provinceFromId?: number;
97
+ provinceToId?: number;
90
98
  startDate: string;
91
99
  endDate: string;
100
+ insuranceType?: EInsuranceType;
92
101
  adultsCount: number;
102
+ teenagerCount: number;
93
103
  childrenCount: number;
94
- providers?: string[];
104
+ providers?: EInsuranceProviderType[];
95
105
  sortOrder?: 'asc' | 'desc';
96
106
  };
97
107
  export type CoveragePlanPremium = {
98
- provider: string;
108
+ provider: EInsuranceProviderType;
99
109
  coveragePlan: {
100
110
  id: number;
101
111
  planCode: string;
@@ -107,6 +117,10 @@ export type CoveragePlanPremium = {
107
117
  premiumPerPerson: number;
108
118
  days: number;
109
119
  region: string;
120
+ freeTeenagerCount?: number;
121
+ paidTeenagerCount?: number;
122
+ freeChildrenCount?: number;
123
+ paidChildrenCount?: number;
110
124
  } | null;
111
125
  error: string | null;
112
126
  };
@@ -118,9 +132,10 @@ export type CalculatePremiumResponse = {
118
132
  plans: CoveragePlanPremium[];
119
133
  };
120
134
  export type BuyerFormValues = {
135
+ buyerType?: EBuyerType | null;
121
136
  fullName: string;
122
137
  gender?: EGender;
123
- dateOfBirth: string;
138
+ dateOfBirth: string | null;
124
139
  nationality: number | null;
125
140
  idType: EIdType;
126
141
  idNumber: string;
@@ -138,7 +153,7 @@ export type InsuredPersonFormValues = {
138
153
  gender?: EGender;
139
154
  idType: EIdType;
140
155
  idNumber: string;
141
- relationship: ERelationToPrimary;
156
+ relationship: ERelationToPrimary | null;
142
157
  nationality: number | null;
143
158
  };
144
159
  export type InsuredPerson = InsuredPersonFormValues & {
@@ -1,6 +1,12 @@
1
- import { EPersonValidationStatus } from '../../types/insurance';
1
+ import { EPersonValidationStatus, EPersonType } from '../../types/insurance';
2
2
  import { InsuredPersonFormValues } from './types';
3
3
  export type PersonValidationStatus = EPersonValidationStatus;
4
+ /** Calculate age in full years from date of birth (YYYY-MM-DD). Returns null if invalid. */
5
+ export declare const calculateAge: (dateOfBirth: string) => number | null;
6
+ /** Map date of birth to insured person type using the same age bands as validation. */
7
+ export declare const getPersonTypeFromDateOfBirth: (dateOfBirth: string) => EPersonType;
8
+ /** Validate date of birth by person type (adult/teenager/children). Same rules for all providers. */
9
+ export declare const validateDateOfBirthByPersonType: (personType: EPersonType, dateOfBirth: string) => string | true;
4
10
  export declare const validatePerson: (person: InsuredPersonFormValues) => PersonValidationStatus;
5
11
  export declare const hasPersonBeenInteracted: (person: InsuredPersonFormValues | undefined, isFormSubmitted: boolean) => boolean;
6
12
  export declare const getFieldBorderColor: (fieldState: {
@@ -8,6 +8,7 @@ type Props = {
8
8
  export declare enum CancelReason {
9
9
  CUSTOMER_CANCEL = "CUSTOMER_CANCEL",
10
10
  BAD_DATA = "BAD_DATA",
11
+ DUPLICATED = "DUPLICATED",
11
12
  OTHER = "OTHER"
12
13
  }
13
14
  export declare const CancelTransactionModal: ({ isOpen, onClose, transaction, onSuccess }: Props) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,4 @@
1
- import { ESimPackage } from '../../types/response.dto';
1
+ import { ESimPackage, IUser } from '../../types/response.dto';
2
2
  import { default as React } from 'react';
3
3
  interface ESimPurchaseModalProps {
4
4
  selectedPackage: ESimPackage;
@@ -6,6 +6,9 @@ interface ESimPurchaseModalProps {
6
6
  open: boolean;
7
7
  onClose: () => void;
8
8
  onFinish?: () => void;
9
+ isAdminMode?: boolean;
10
+ selectedUser?: IUser | null;
11
+ onChangeBooker?: () => void;
9
12
  }
10
13
  declare const ESimPurchaseModal: React.FC<ESimPurchaseModalProps>;
11
14
  export default ESimPurchaseModal;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { BankTransferInfo } from '../../types/response.dto';
3
+ interface EsimBankTransferModalProps {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ qrCodeUrl: string;
7
+ transactionPublicId?: string;
8
+ amount: number;
9
+ onSuccess?: () => void;
10
+ bankTransferInfo?: BankTransferInfo;
11
+ }
12
+ declare const EsimBankTransferModal: React.FC<EsimBankTransferModalProps>;
13
+ export default EsimBankTransferModal;
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { BankTransferInfo } from '../../types/response.dto';
2
3
  interface InsurancePaymentModalProps {
3
4
  open: boolean;
4
5
  onClose: () => void;
@@ -6,6 +7,7 @@ interface InsurancePaymentModalProps {
6
7
  transactionPublicId?: string;
7
8
  amount: number;
8
9
  onSuccess?: () => void;
10
+ bankTransferInfo?: BankTransferInfo;
9
11
  }
10
12
  declare const InsurancePaymentModal: React.FC<InsurancePaymentModalProps>;
11
13
  export default InsurancePaymentModal;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { BankTransferInfo } from '../../types/response.dto';
3
+ interface MotorInsurancePaymentModalProps {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ qrCodeUrl: string;
7
+ transactionPublicId?: string;
8
+ amount: number;
9
+ onSuccess?: () => void;
10
+ bankTransferInfo?: BankTransferInfo;
11
+ }
12
+ declare const MotorInsurancePaymentModal: React.FC<MotorInsurancePaymentModalProps>;
13
+ export default MotorInsurancePaymentModal;
@@ -0,0 +1,8 @@
1
+ export declare const DEFAULT_PROCESSING_ORDER_MESSAGE = "\u0110ang x\u1EED l\u00FD \u0111\u01A1n h\u00E0ng, xin vui l\u00F2ng ch\u1EDD...";
2
+ type ProcessingOrderDialogProps = {
3
+ open: boolean;
4
+ /** Defaults to {@link DEFAULT_PROCESSING_ORDER_MESSAGE} */
5
+ message?: string;
6
+ };
7
+ export declare const ProcessingOrderDialog: ({ open, message, }: ProcessingOrderDialogProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import { MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ interface BikePremiumSummaryProps {
3
+ summary?: MotorPremiumSummaryType | null;
4
+ isLoading?: boolean;
5
+ /** Provider code (e.g. PVI, MIC) – used to fetch CMS benefits */
6
+ providerCode?: string | null;
7
+ }
8
+ export declare const BikePremiumSummary: ({ summary, isLoading, providerCode, }: BikePremiumSummaryProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,30 @@
1
+ import { EMotorProvider, MotorPlanFormValues, MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ import { Control, UseFormSetValue } from 'react-hook-form';
3
+ import { BikeRegistrationOcrData } from '../../../hooks/useVehicleRegistrationScan';
4
+ type BikeStepOneFormProps = {
5
+ control: Control<MotorPlanFormValues>;
6
+ setValue: UseFormSetValue<MotorPlanFormValues>;
7
+ premiumSummary?: MotorPremiumSummaryType | null;
8
+ isLoadingQuote?: boolean;
9
+ providers?: EMotorProvider[];
10
+ onOcrComplete?: (data: BikeRegistrationOcrData) => void;
11
+ onOcrReset?: () => void;
12
+ onIdCardComplete?: (data: {
13
+ ownerName: string;
14
+ ownerIdNumber: string;
15
+ }) => void;
16
+ onIdCardReset?: () => void;
17
+ vehicleRegImageUrl?: string | null;
18
+ idCardImageUrl?: string | null;
19
+ onVehicleRegImageCapture?: (imageData: {
20
+ dataUrl: string;
21
+ gcsUrl?: string;
22
+ }) => void;
23
+ onIdCardImageCapture?: (imageData: {
24
+ dataUrl: string;
25
+ gcsUrl?: string;
26
+ }) => void;
27
+ onScanningChange?: (scanning: boolean) => void;
28
+ };
29
+ export declare const BikeStepOneForm: ({ control, setValue, premiumSummary, isLoadingQuote, providers, onOcrComplete, onOcrReset, onIdCardComplete, onIdCardReset, vehicleRegImageUrl, idCardImageUrl, onVehicleRegImageCapture, onIdCardImageCapture, onScanningChange, }: BikeStepOneFormProps) => import("react/jsx-runtime").JSX.Element;
30
+ export {};
@@ -0,0 +1,26 @@
1
+ import { EOrderPaymentType, EPaymentMethod } from '../../../types/enum';
2
+ import { IUser } from '../../../types/response.dto';
3
+ import { MotorPlanFormValues, MotorPremiumSummary, VehicleInfoFormValues } from '../motor-insurance.types';
4
+ export interface BikeStepThreePaymentProps {
5
+ planValues: MotorPlanFormValues;
6
+ premiumSummary: MotorPremiumSummary | null;
7
+ vehicleInfo: VehicleInfoFormValues | null;
8
+ isLoading: boolean;
9
+ paymentMode: EPaymentMethod;
10
+ onPaymentModeChange: (mode: EPaymentMethod) => void;
11
+ isTermsAgreed: boolean;
12
+ onTermsAgreedChange: (agreed: boolean) => void;
13
+ isPersonalDataConsentAgreed: boolean;
14
+ onPersonalDataConsentChange: (agreed: boolean) => void;
15
+ onPayment: () => void;
16
+ isProcessing: boolean;
17
+ isGuest: boolean;
18
+ onBack: () => void;
19
+ paymentType?: EOrderPaymentType;
20
+ isAdminMode?: boolean;
21
+ selectedUser?: IUser | null;
22
+ waitForApproval?: boolean;
23
+ onWaitForApprovalChange?: (value: boolean) => void;
24
+ mode?: 'create' | 'edit';
25
+ }
26
+ export declare const BikeStepThreePayment: ({ planValues, premiumSummary, vehicleInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, paymentType, isAdminMode, selectedUser, waitForApproval, onWaitForApprovalChange, mode, }: BikeStepThreePaymentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { VehicleInfoFormValues, MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ interface BikeStepTwoVehicleInfoProps {
3
+ initialValues?: Partial<VehicleInfoFormValues>;
4
+ premiumSummary?: MotorPremiumSummaryType | null;
5
+ isLoadingQuote?: boolean;
6
+ provider?: string;
7
+ onSubmit: (values: VehicleInfoFormValues) => void;
8
+ onBack: () => void;
9
+ formRef?: (form: HTMLFormElement | null) => void;
10
+ }
11
+ export declare const BikeStepTwoVehicleInfo: ({ initialValues, premiumSummary, isLoadingQuote, provider, onSubmit, formRef, }: BikeStepTwoVehicleInfoProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,17 @@
1
+ import { IUser } from '../../../types/response.dto';
2
+ import { EMotorProvider } from '../motor-insurance.types';
3
+ export interface CreateBikeInsuranceFormProps {
4
+ storageKey: string;
5
+ title?: string;
6
+ onBack?: () => void;
7
+ onSuccess?: (transactionData: unknown) => void;
8
+ scrollable?: boolean;
9
+ allowedProviders?: EMotorProvider[];
10
+ isAdminMode?: boolean;
11
+ selectedUser?: IUser | null;
12
+ onOpenUserSelector?: () => void;
13
+ mode?: 'create' | 'edit';
14
+ editingPublicId?: string;
15
+ initialData?: Record<string, any>;
16
+ }
17
+ export declare const CreateBikeInsuranceForm: ({ storageKey, title, onBack, onSuccess, scrollable, allowedProviders, isAdminMode, selectedUser, onOpenUserSelector, mode, editingPublicId, initialData, }: CreateBikeInsuranceFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export { BikePremiumSummary } from './BikePremiumSummary';
2
+ export { BikeStepOneForm } from './BikeStepOneForm';
3
+ export { BikeStepTwoVehicleInfo } from './BikeStepTwoVehicleInfo';
4
+ export { BikeStepThreePayment } from './BikeStepThreePayment';
5
+ export { CreateBikeInsuranceForm } from './CreateBikeInsuranceForm';
@@ -0,0 +1,8 @@
1
+ import { MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ interface CarPremiumSummaryProps {
3
+ summary: MotorPremiumSummaryType | null | undefined;
4
+ isLoading?: boolean;
5
+ providerCode?: string | null;
6
+ }
7
+ export declare const CarPremiumSummary: ({ summary, isLoading, providerCode }: CarPremiumSummaryProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,30 @@
1
+ import { EOrderPaymentType, EPaymentMethod } from '../../../types/enum';
2
+ import { IUser } from '../../../types/response.dto';
3
+ import { CarPlanFormValues, CarPremiumSummary, CarVehicleInfoFormValues } from '../motor-insurance.types';
4
+ interface CarStepFourPaymentProps {
5
+ planValues: CarPlanFormValues;
6
+ premiumSummary: CarPremiumSummary | null;
7
+ vehicleInfo: CarVehicleInfoFormValues | null;
8
+ buyerCertificateInfo: CarVehicleInfoFormValues | null;
9
+ isLoading: boolean;
10
+ paymentMode: EPaymentMethod;
11
+ onPaymentModeChange: (mode: EPaymentMethod) => void;
12
+ isTermsAgreed: boolean;
13
+ onTermsAgreedChange: (agreed: boolean) => void;
14
+ isPersonalDataConsentAgreed: boolean;
15
+ onPersonalDataConsentChange: (agreed: boolean) => void;
16
+ onPayment: () => void;
17
+ isProcessing: boolean;
18
+ isGuest: boolean;
19
+ onBack: () => void;
20
+ getProviderLogoUrl: (providerCode?: string | null) => string | undefined;
21
+ getTermsAgreeHtml: (providerCode?: string | null) => string | undefined;
22
+ paymentType?: EOrderPaymentType;
23
+ isAdminMode?: boolean;
24
+ selectedUser?: IUser | null;
25
+ waitForApproval?: boolean;
26
+ onWaitForApprovalChange?: (value: boolean) => void;
27
+ mode?: 'create' | 'edit';
28
+ }
29
+ export declare const CarStepFourPayment: ({ planValues, premiumSummary, vehicleInfo, buyerCertificateInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, getProviderLogoUrl, getTermsAgreeHtml, paymentType, isAdminMode, selectedUser, waitForApproval, onWaitForApprovalChange, mode, }: CarStepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
30
+ export {};
@@ -0,0 +1,27 @@
1
+ import { Control, UseFormSetValue } from 'react-hook-form';
2
+ import { CarPlanFormValues } from '../motor-insurance.types';
3
+ import { CarRegistrationOcrData } from '../../../hooks/useVehicleRegistrationScan';
4
+ interface CarStepOneFormProps {
5
+ control: Control<CarPlanFormValues>;
6
+ setValue: UseFormSetValue<CarPlanFormValues>;
7
+ onOcrComplete?: (data: CarRegistrationOcrData) => void;
8
+ onOcrReset?: () => void;
9
+ onIdCardComplete?: (data: {
10
+ ownerName: string;
11
+ ownerIdNumber: string;
12
+ }) => void;
13
+ onIdCardReset?: () => void;
14
+ vehicleRegImageUrl?: string | null;
15
+ idCardImageUrl?: string | null;
16
+ onVehicleRegImageCapture?: (imageData: {
17
+ dataUrl: string;
18
+ gcsUrl?: string;
19
+ }) => void;
20
+ onIdCardImageCapture?: (imageData: {
21
+ dataUrl: string;
22
+ gcsUrl?: string;
23
+ }) => void;
24
+ onScanningChange?: (scanning: boolean) => void;
25
+ }
26
+ export declare const CarStepOneForm: ({ control, setValue, onOcrComplete, onOcrReset, onIdCardComplete, onIdCardReset, vehicleRegImageUrl, idCardImageUrl, onVehicleRegImageCapture, onIdCardImageCapture, onScanningChange, }: CarStepOneFormProps) => import("react/jsx-runtime").JSX.Element;
27
+ export {};
@@ -0,0 +1,11 @@
1
+ import { CarVehicleInfoFormValues, MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ interface CarStepThreeInfoProps {
3
+ initialValues?: Partial<CarVehicleInfoFormValues>;
4
+ premiumSummary: MotorPremiumSummaryType | null;
5
+ isLoadingQuote?: boolean;
6
+ provider?: string;
7
+ onSubmit: (values: CarVehicleInfoFormValues) => void;
8
+ formRef?: (form: HTMLFormElement | null) => void;
9
+ }
10
+ export declare const CarStepThreeInfo: ({ initialValues, premiumSummary, isLoadingQuote, provider, onSubmit, formRef, }: CarStepThreeInfoProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Control, UseFormSetValue } from 'react-hook-form';
2
+ import { CarPlanFormValues, CarPremiumSummary, EMotorProvider } from '../motor-insurance.types';
3
+ interface CarStepTwoPlanProps {
4
+ control: Control<CarPlanFormValues>;
5
+ setValue: UseFormSetValue<CarPlanFormValues>;
6
+ premiumSummary: CarPremiumSummary | null;
7
+ isLoadingQuote?: boolean;
8
+ providers?: EMotorProvider[];
9
+ }
10
+ export declare const CarStepTwoPlan: ({ control, setValue, premiumSummary, isLoadingQuote, providers, }: CarStepTwoPlanProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,17 @@
1
+ import { IUser } from '../../../types/response.dto';
2
+ import { EMotorProvider } from '../motor-insurance.types';
3
+ export interface CreateCarInsuranceFormProps {
4
+ storageKey: string;
5
+ title?: string;
6
+ onBack?: () => void;
7
+ onSuccess?: (transactionData: unknown) => void;
8
+ scrollable?: boolean;
9
+ allowedProviders?: EMotorProvider[];
10
+ isAdminMode?: boolean;
11
+ selectedUser?: IUser | null;
12
+ onOpenUserSelector?: () => void;
13
+ mode?: 'create' | 'edit';
14
+ editingPublicId?: string;
15
+ initialData?: Record<string, any>;
16
+ }
17
+ export declare const CreateCarInsuranceForm: ({ storageKey, title, onBack, onSuccess, scrollable, allowedProviders, isAdminMode, selectedUser, onOpenUserSelector, mode, editingPublicId, initialData, }: CreateCarInsuranceFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { EVehicleTypeCode, EVehicleUsageType } from '../motor-insurance.types';
2
+ /** Manufacturing year range: from this year to current year. */
3
+ export declare const MANUFACTURING_YEAR_MIN = 2007;
4
+ export declare const SEAT_COUNT_OPTIONS: readonly [4, 5, 7, 9, 16, 24, 45];
5
+ /** Usage purpose options (mục đích sử dụng) – EVehicleUsageType. */
6
+ export declare const USAGE_PURPOSE_OPTIONS: {
7
+ value: EVehicleUsageType;
8
+ label: string;
9
+ }[];
10
+ /** Vehicle type code options (loại vận chuyển đặc biệt) by purpose + usage. */
11
+ export type VehicleTypeCodeOption = {
12
+ value: EVehicleTypeCode;
13
+ label: string;
14
+ };
15
+ export declare function getVehicleTypeCodeOptions(isCommercialUse: boolean, usagePurposeCode: EVehicleUsageType | null): VehicleTypeCodeOption[];
16
+ /** Seat and load capacity bounds by usage + vehicle type (from business rules). */
17
+ export type SeatLoadBounds = {
18
+ seatMin: number;
19
+ seatMax: number;
20
+ loadMin?: number;
21
+ loadMax?: number;
22
+ };
23
+ export declare function getSeatAndLoadBounds(usagePurposeCode: EVehicleUsageType | null, vehicleTypeCode: EVehicleTypeCode | null): SeatLoadBounds;
@@ -0,0 +1,6 @@
1
+ export { CarPremiumSummary } from './CarPremiumSummary';
2
+ export { CarStepOneForm } from './CarStepOneForm';
3
+ export { CarStepTwoPlan } from './CarStepTwoPlan';
4
+ export { CarStepThreeInfo } from './CarStepThreeInfo';
5
+ export { CarStepFourPayment } from './CarStepFourPayment';
6
+ export { CreateCarInsuranceForm } from './CreateCarInsuranceForm';
@@ -0,0 +1,17 @@
1
+ import { EMotorVehicleType } from './motor-insurance.types';
2
+ import { IUser } from '../../types/response.dto';
3
+ export interface CreateMotorInsuranceTransactionFormProps {
4
+ vehicleType: EMotorVehicleType;
5
+ storageKey: string;
6
+ title?: string;
7
+ onBack?: () => void;
8
+ onSuccess?: (transactionData: unknown) => void;
9
+ scrollable?: boolean;
10
+ isAdminMode?: boolean;
11
+ selectedUser?: IUser | null;
12
+ onOpenUserSelector?: () => void;
13
+ mode?: 'create' | 'edit';
14
+ editingPublicId?: string;
15
+ initialData?: Record<string, any>;
16
+ }
17
+ export declare const CreateMotorInsuranceTransactionForm: ({ vehicleType, storageKey, title, onBack, onSuccess, scrollable, isAdminMode, selectedUser, onOpenUserSelector, mode, editingPublicId, initialData, }: CreateMotorInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export interface DocumentUploadPreviewProps {
2
+ label: string;
3
+ scanningLabel?: string;
4
+ icon: React.ElementType;
5
+ isScanning: boolean;
6
+ file: File | null;
7
+ /** Data URL restored from storage when no File object is available (e.g. after page reload) */
8
+ persistedPreviewUrl?: string | null;
9
+ scanError?: string | null;
10
+ accept?: string;
11
+ onFileSelect: (file: File) => void;
12
+ onRemove: () => void;
13
+ }
14
+ export declare const DocumentUploadPreview: ({ label, scanningLabel, icon, isScanning, file, persistedPreviewUrl, scanError, accept, onFileSelect, onRemove, }: DocumentUploadPreviewProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ export type StoredImageData = {
2
+ dataUrl?: string | null;
3
+ gcsUrl?: string | null;
4
+ };
5
+ export type ImageCaptureData = {
6
+ dataUrl: string;
7
+ gcsUrl?: string;
8
+ };
9
+ export declare const normalizeStoredImageData: (value: unknown) => {
10
+ previewUrl: string | null;
11
+ gcsUrl: string | null;
12
+ };
13
+ export declare const buildStoredImageData: (imageData: ImageCaptureData) => StoredImageData;
14
+ export declare const buildPreviewDataUrlForStorage: (file: File, options?: {
15
+ maxDimension?: number;
16
+ jpegQuality?: number;
17
+ }) => Promise<string>;
18
+ export declare const resolveImageUrlForPayload: (gcsUrl: string | null, previewUrl: string | null) => string | undefined;
@@ -0,0 +1,4 @@
1
+ export { BikePremiumSummary, BikeStepOneForm, BikeStepTwoVehicleInfo, CreateBikeInsuranceForm, } from './Bike';
2
+ export { CarPremiumSummary, CarStepOneForm, CreateCarInsuranceForm } from './Car';
3
+ export { CreateMotorInsuranceTransactionForm } from './CreateMotorInsuranceTransactionForm';
4
+ export * from './motor-insurance.types';