gotrip-fx-transaction-form 1.0.192-dev → 1.0.192

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 (173) hide show
  1. package/assets/index.css +1 -1
  2. package/index.js +51207 -40767
  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 +3 -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/Department/DepartmentCard.d.ts +3 -1
  17. package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +23 -5
  18. package/types/components/Insurance/DateRangePicker.d.ts +12 -0
  19. package/types/components/Insurance/InsuranceContentRenderer/DynamicRenderer.d.ts +6 -0
  20. package/types/components/Insurance/InsuranceContentRenderer/blocks/AccordionBlock.d.ts +6 -0
  21. package/types/components/Insurance/InsuranceContentRenderer/blocks/ActionButtonBlock.d.ts +6 -0
  22. package/types/components/Insurance/InsuranceContentRenderer/blocks/ContainerBlock.d.ts +6 -0
  23. package/types/components/Insurance/InsuranceContentRenderer/blocks/DataRowBlock.d.ts +6 -0
  24. package/types/components/Insurance/InsuranceContentRenderer/blocks/DividerBlock.d.ts +6 -0
  25. package/types/components/Insurance/InsuranceContentRenderer/blocks/ListGroupBlock.d.ts +6 -0
  26. package/types/components/Insurance/InsuranceContentRenderer/blocks/TextBlock.d.ts +6 -0
  27. package/types/components/Insurance/InsuranceContentRenderer/types.d.ts +64 -0
  28. package/types/components/Insurance/InsuranceContentRenderer/utils/richText.d.ts +14 -0
  29. package/types/components/Insurance/InsuranceContentRenderer/utils/styleMapper.d.ts +6 -0
  30. package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
  31. package/types/components/Insurance/InsurancePlans/InsurancePlanFilter.d.ts +12 -0
  32. package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +1 -1
  33. package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +16 -0
  34. package/types/components/Insurance/InsurancePlans/QuickRecommendationsSection.d.ts +18 -0
  35. package/types/components/Insurance/InsurancePlans/index.d.ts +1 -0
  36. package/types/components/Insurance/InsuranceSummaryOverview.d.ts +7 -2
  37. package/types/components/Insurance/InsuranceTypeAndPeopleCountFields.d.ts +10 -0
  38. package/types/components/Insurance/InsuredTravelersTable.d.ts +6 -0
  39. package/types/components/Insurance/ProviderApiDebugDialog.d.ts +17 -0
  40. package/types/components/Insurance/SimpleDetail.d.ts +2 -1
  41. package/types/components/Insurance/StepFourPayment.d.ts +25 -5
  42. package/types/components/Insurance/StepOneForm.d.ts +11 -2
  43. package/types/components/Insurance/StepThree.d.ts +29 -0
  44. package/types/components/Insurance/StepThreeBuyerInfo.d.ts +4 -1
  45. package/types/components/Insurance/StepThreeInsuredPeople.d.ts +4 -1
  46. package/types/components/Insurance/StepTwoPlans.d.ts +9 -1
  47. package/types/components/Insurance/documentScanAutofill.d.ts +37 -0
  48. package/types/components/Insurance/insuranceExcelImport.d.ts +13 -0
  49. package/types/components/Insurance/insuredPeopleImport.d.ts +23 -0
  50. package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +13 -3
  51. package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
  52. package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +10 -0
  53. package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
  54. package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
  55. package/types/components/Insurance/shared/index.d.ts +5 -0
  56. package/types/components/Insurance/types.d.ts +22 -5
  57. package/types/components/Insurance/validationUtils.d.ts +7 -1
  58. package/types/components/Modal/CancelTransactionModal.d.ts +1 -0
  59. package/types/components/Modal/ESimPurchaseModal.d.ts +4 -1
  60. package/types/components/Modal/EsimBankTransferModal.d.ts +13 -0
  61. package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
  62. package/types/components/Modal/MotorInsurancePaymentModal.d.ts +13 -0
  63. package/types/components/Modal/ProcessingOrderDialog.d.ts +8 -0
  64. package/types/components/Modal/UpdateTenantCommissionInputCell.d.ts +14 -13
  65. package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +9 -0
  66. package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +30 -0
  67. package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +26 -0
  68. package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +12 -0
  69. package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +17 -0
  70. package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
  71. package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +8 -0
  72. package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +30 -0
  73. package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +27 -0
  74. package/types/components/MotorInsurance/Car/CarStepThreeInfo.d.ts +11 -0
  75. package/types/components/MotorInsurance/Car/CarStepTwoPlan.d.ts +11 -0
  76. package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +17 -0
  77. package/types/components/MotorInsurance/Car/car-form.constants.d.ts +23 -0
  78. package/types/components/MotorInsurance/Car/index.d.ts +6 -0
  79. package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +17 -0
  80. package/types/components/MotorInsurance/DocumentUploadPreview.d.ts +14 -0
  81. package/types/components/MotorInsurance/image-storage.utils.d.ts +18 -0
  82. package/types/components/MotorInsurance/index.d.ts +4 -0
  83. package/types/components/MotorInsurance/motor-insurance.types.d.ts +335 -0
  84. package/types/components/MotorInsurance/motor-insurance.validation.d.ts +21 -0
  85. package/types/components/Notification/NotificationBell.d.ts +5 -0
  86. package/types/components/Notification/NotificationItem.d.ts +8 -0
  87. package/types/components/Notification/NotificationPanel.d.ts +6 -0
  88. package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
  89. package/types/components/PolicyGroup/CommissionPolicyGroupFormDialog.d.ts +16 -0
  90. package/types/components/PolicyGroup/CommissionPolicyGroupListView.d.ts +11 -0
  91. package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
  92. package/types/components/PolicyGroup/PolicyRulesEditor.d.ts +54 -0
  93. package/types/components/PolicyGroup/PolicyTypes.d.ts +41 -0
  94. package/types/components/PolicyGroup/PricingPolicyListView.d.ts +11 -0
  95. package/types/components/StepIndicator/StepIndicatorHorizontal.d.ts +2 -1
  96. package/types/constants/api-urls.d.ts +63 -6
  97. package/types/constants/business-codes.d.ts +2 -1
  98. package/types/constants/commission-policy-constants.d.ts +5 -0
  99. package/types/constants/env.d.ts +2 -0
  100. package/types/constants/policy-enums.d.ts +18 -1
  101. package/types/constants/regex.d.ts +4 -0
  102. package/types/embeded-main.d.ts +1 -0
  103. package/types/hooks/fetchEsimTransaction.d.ts +2 -0
  104. package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
  105. package/types/hooks/useAdminDashboard.d.ts +19 -0
  106. package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
  107. package/types/hooks/useComissionPolicies.d.ts +6 -6
  108. package/types/hooks/useCoupon.d.ts +95 -0
  109. package/types/hooks/useCouponValidation.d.ts +29 -0
  110. package/types/hooks/useGroupCustomers.d.ts +12 -9
  111. package/types/hooks/useInsuranceData.d.ts +3 -11
  112. package/types/hooks/useInsurancePlans.d.ts +13 -1
  113. package/types/hooks/useInsuranceTransaction.d.ts +34 -4
  114. package/types/hooks/useLocationData.d.ts +22 -0
  115. package/types/hooks/useMotorInsurance.d.ts +17 -0
  116. package/types/hooks/useMotorInsuranceTransaction.d.ts +124 -0
  117. package/types/hooks/useMotorQuote.d.ts +15 -0
  118. package/types/hooks/useNotifications.d.ts +10 -0
  119. package/types/hooks/usePolicyGroups.d.ts +17 -1
  120. package/types/hooks/useTenantList.d.ts +5 -4
  121. package/types/hooks/useUserById.d.ts +7 -0
  122. package/types/hooks/useUserList.d.ts +3 -1
  123. package/types/hooks/useUserSearch.d.ts +10 -0
  124. package/types/hooks/useUsersByTenantTypes.d.ts +11 -0
  125. package/types/hooks/useVehicleRegistrationScan.d.ts +39 -0
  126. package/types/pages/admin/CreateOrderOnBehalfTest.d.ts +3 -0
  127. package/types/pages/admin/coupons/CampaignCouponTable.d.ts +13 -0
  128. package/types/pages/admin/coupons/CampaignDetailPage.d.ts +1 -0
  129. package/types/pages/admin/coupons/CampaignListPage.d.ts +1 -0
  130. package/types/pages/admin/coupons/CouponFormPage.d.ts +1 -0
  131. package/types/pages/admin/fx-commission-policy/FxCommissionPolicyManagement.d.ts +1 -0
  132. package/types/pages/admin/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
  133. package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
  134. package/types/pages/admin/insurance-policy-management/InsurancePolicyManagement.d.ts +1 -0
  135. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorBikeTransactionPage.d.ts +1 -0
  136. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorCarTransactionPage.d.ts +1 -0
  137. package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts +1 -0
  138. package/types/pages/admin/motor-insurance-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  139. package/types/pages/admin/motor-insurance-transaction-list/MotorInsuranceTransactionListPage.d.ts +5 -0
  140. package/types/pages/agency/home/HomePage.d.ts +1 -0
  141. package/types/pages/agency/home/constants.d.ts +16 -0
  142. package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +1 -0
  143. package/types/pages/agency/insurance/motor-transaction-create/CreateCarInsuranceTransactionPage.d.ts +1 -0
  144. package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
  145. package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  146. package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
  147. package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +1 -0
  148. package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
  149. package/types/pages/guest/insurance-create.d.ts +8 -1
  150. package/types/pages/guest/motor-insurance-create.d.ts +6 -0
  151. package/types/providers/AppSettingsProvider.d.ts +1 -0
  152. package/types/store/useNotificationStore.d.ts +16 -0
  153. package/types/store/useTenantStore.d.ts +12 -0
  154. package/types/store/useTrackingStore.d.ts +8 -0
  155. package/types/types/app-settings.d.ts +13 -1
  156. package/types/types/coupon.d.ts +70 -0
  157. package/types/types/enum.d.ts +14 -1
  158. package/types/types/insurance-transaction.dto.d.ts +21 -1
  159. package/types/types/insurance.d.ts +19 -2
  160. package/types/types/notification.d.ts +23 -0
  161. package/types/types/response.dto.d.ts +78 -8
  162. package/types/types/sdk.d.ts +5 -1
  163. package/types/types/tracking.dto.d.ts +19 -0
  164. package/types/util/booker-display.d.ts +6 -0
  165. package/types/util/couponErrorMessages.d.ts +2 -0
  166. package/types/util/debt-report-display.d.ts +4 -0
  167. package/types/util/formatter.d.ts +6 -0
  168. package/types/util/fx-travelling-messages.d.ts +1 -0
  169. package/types/util/fx.d.ts +15 -0
  170. package/types/util/order-payment-display.d.ts +13 -0
  171. package/types/util/sim-display.d.ts +2 -0
  172. package/types/util/tracking.d.ts +29 -0
  173. package/types/util/transaction.util.d.ts +1 -1
@@ -4,7 +4,9 @@ interface StepThreeInsuredPeopleProps {
4
4
  initialPeople: InsuredPerson[];
5
5
  insuranceType: EInsuranceType;
6
6
  adultsCount: number;
7
+ teenagersCount: number;
7
8
  childrenCount: number;
9
+ isDomestic: boolean;
8
10
  providerCode?: string | null;
9
11
  buyerInfo?: {
10
12
  isInsuredPerson?: boolean;
@@ -12,6 +14,7 @@ interface StepThreeInsuredPeopleProps {
12
14
  onSubmit: (people: InsuredPerson[]) => void;
13
15
  onBack: () => void;
14
16
  onFormRef?: (form: HTMLFormElement | null) => void;
17
+ insuredPeopleSnapshotRef?: React.MutableRefObject<(() => InsuredPerson[]) | null>;
15
18
  }
16
- export declare const StepThreeInsuredPeople: ({ initialPeople, insuranceType, providerCode, buyerInfo, onSubmit, onFormRef, }: StepThreeInsuredPeopleProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const StepThreeInsuredPeople: ({ initialPeople, isDomestic, providerCode, buyerInfo, onSubmit, onFormRef, insuredPeopleSnapshotRef, }: StepThreeInsuredPeopleProps) => import("react/jsx-runtime").JSX.Element;
17
20
  export {};
@@ -1,3 +1,5 @@
1
+ import { SortOrder } from './InsurancePlans';
2
+ import { EInsuranceProviderType } from '../../types/insurance';
1
3
  import { CoveragePlanPremium, CalculatePremiumRequest, TravelPlanFormValues } from './types';
2
4
  interface StepTwoPlansProps {
3
5
  requestPayload: CalculatePremiumRequest | null;
@@ -5,6 +7,12 @@ interface StepTwoPlansProps {
5
7
  onPlanSelect: (plan: CoveragePlanPremium) => void;
6
8
  insuranceType?: 'travel' | 'car' | 'motorcycle' | string;
7
9
  travelPlan?: TravelPlanFormValues | null;
10
+ allowDiscount?: boolean;
11
+ onScrollToTop?: () => void;
12
+ selectedProviders: EInsuranceProviderType[];
13
+ onProviderChange: (providers: EInsuranceProviderType[]) => void;
14
+ sortOrder: SortOrder;
15
+ onSortChange: (sortOrder: SortOrder) => void;
8
16
  }
9
- export declare const StepTwoPlans: ({ requestPayload, selectedPlanId, onPlanSelect, insuranceType, travelPlan, }: StepTwoPlansProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const StepTwoPlans: ({ requestPayload, selectedPlanId, onPlanSelect, insuranceType, travelPlan, allowDiscount, onScrollToTop, selectedProviders, onProviderChange, sortOrder, onSortChange, }: StepTwoPlansProps) => import("react/jsx-runtime").JSX.Element;
10
18
  export {};
@@ -0,0 +1,37 @@
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
+ export type ProvinceOption = {
8
+ value: string;
9
+ label: string;
10
+ };
11
+ type AutofillFieldPaths = {
12
+ fullName: any;
13
+ idType: any;
14
+ idNumber: any;
15
+ dateOfBirth: any;
16
+ gender: any;
17
+ nationality: any;
18
+ countryId?: any;
19
+ address?: any;
20
+ stateId?: any;
21
+ };
22
+ type AutofillHelpers = {
23
+ formatDateToYYYYMMDD: (dateStr: string | undefined) => string;
24
+ findCountryIdByNationality: (nationality: string | undefined, countryOptions: Array<{
25
+ value: string;
26
+ label: string;
27
+ }>) => number | null;
28
+ };
29
+ export declare function applyDocumentScanAutofillToRHF<TFieldValues extends FieldValues>({ setValue, data, fields, countryOptions, provinceOptions, helpers, }: {
30
+ setValue: UseFormSetValue<TFieldValues>;
31
+ data: DocumentScanResult;
32
+ fields: AutofillFieldPaths;
33
+ countryOptions: CountryOption[];
34
+ provinceOptions?: ProvinceOption[];
35
+ helpers: AutofillHelpers;
36
+ }): void;
37
+ export {};
@@ -0,0 +1,13 @@
1
+ import { InsuredPerson } from './types';
2
+ export type ParseInsuredExcelResult = {
3
+ ok: true;
4
+ people: InsuredPerson[];
5
+ skippedRows: number;
6
+ } | {
7
+ ok: false;
8
+ error: string;
9
+ };
10
+ /**
11
+ * Parse insured list from Excel (first sheet). Finds header row where column A is "STT".
12
+ */
13
+ export declare function parseInsuredPeopleFromExcelBuffer(buffer: ArrayBuffer): ParseInsuredExcelResult;
@@ -0,0 +1,23 @@
1
+ import { EIdType, EInsuranceType } from '../../types/insurance';
2
+ import { InsuredPerson } from './types';
3
+ /** Row is treated as an empty slot from plan counts (no name and no document number). */
4
+ export declare function isPlaceholderInsuredPerson(person: InsuredPerson): boolean;
5
+ /** Replace entire list with import only when every current row is a placeholder. */
6
+ export declare function shouldReplaceInsuredListWithImport(current: InsuredPerson[]): boolean;
7
+ export declare function makeIdDocumentKey(idType: EIdType | string | undefined, idNumber: string | undefined): string | null;
8
+ /** CCCD/CMND must pass 9/12 digit format before duplicate checks apply. */
9
+ export declare function isIdDocumentComparableForDuplicates(idType: EIdType | string | undefined, idNumber: string | undefined): boolean;
10
+ /** Row indices that are duplicate (2nd+ occurrence of same idType + idNumber); first row wins. */
11
+ export declare function findDuplicateIdDocumentRowIndices(rows: Array<{
12
+ idType: EIdType;
13
+ idNumber: string;
14
+ }>): Set<number>;
15
+ /**
16
+ * First occurrence per (idType, idNumber) keeps status; later duplicates get NEEDS_CHECK.
17
+ */
18
+ export declare function markDuplicateInsuredByIdDocument(people: InsuredPerson[]): {
19
+ people: InsuredPerson[];
20
+ duplicateCount: number;
21
+ };
22
+ /** After import/replace: first insured is primary (SELF) for individual policies. */
23
+ export declare function applyFirstPersonSelfForIndividualInsurance(people: InsuredPerson[], insuranceType: EInsuranceType): InsuredPerson[];
@@ -1,8 +1,8 @@
1
1
  import { Control, FieldPath, FieldValues, RegisterOptions } from 'react-hook-form';
2
2
  import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
3
- import { EDocumentType, DocumentScanResult } from '../../hooks/useDocumentScan';
3
+ import { EDocumentType, DocumentScanResult } from '../../../hooks/useDocumentScan';
4
4
  export declare const FieldLabel: ({ label, tooltip }: {
5
- label: string;
5
+ label: React.ReactNode;
6
6
  tooltip?: string;
7
7
  }) => import("react/jsx-runtime").JSX.Element;
8
8
  export declare const InfoBanner: ({ children }: {
@@ -33,7 +33,7 @@ export declare enum InputType {
33
33
  interface FormInputFieldProps<T extends FieldValues> {
34
34
  name: FieldPath<T>;
35
35
  control: Control<T>;
36
- label: string;
36
+ label: React.ReactNode;
37
37
  required?: boolean;
38
38
  placeholder?: string;
39
39
  type?: InputType;
@@ -49,6 +49,16 @@ interface FormInputFieldProps<T extends FieldValues> {
49
49
  disabled?: boolean;
50
50
  }
51
51
  export declare function FormInputField<T extends FieldValues>({ name, control, label, required, placeholder, type, rules, leftIcon, rightIcon, showScanButton, documentType, onScanClick, onScanComplete, showValidationState, isValid, disabled, }: FormInputFieldProps<T>): import("react/jsx-runtime").JSX.Element;
52
+ interface FormTextareaFieldProps<T extends FieldValues> {
53
+ name: FieldPath<T>;
54
+ control: Control<T>;
55
+ label: string;
56
+ required?: boolean;
57
+ placeholder?: string;
58
+ rules?: RegisterOptions<T>;
59
+ rows?: number;
60
+ }
61
+ export declare function FormTextareaField<T extends FieldValues>({ name, control, label, required, placeholder, rules, rows, }: FormTextareaFieldProps<T>): import("react/jsx-runtime").JSX.Element;
52
62
  interface CountryComboboxProps {
53
63
  options: {
54
64
  value: string;
@@ -0,0 +1,10 @@
1
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+ import { ReactNode } from 'react';
3
+ interface InfoBlockCardProps {
4
+ title: string;
5
+ icon?: IconDefinition;
6
+ onEdit?: () => void;
7
+ children: ReactNode;
8
+ }
9
+ export declare function InfoBlockCard({ title, icon, onEdit, children }: InfoBlockCardProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { EPaymentMethod } from '../../../types/enum';
2
+ export type PaymentMethodSelectorVariant = 'buttons' | 'radio';
3
+ interface PaymentMethodSelectorProps {
4
+ value: EPaymentMethod;
5
+ onChange: (value: EPaymentMethod) => void;
6
+ showTopupBalance?: boolean;
7
+ variant?: PaymentMethodSelectorVariant;
8
+ }
9
+ export declare function PaymentMethodSelector({ value, onChange, showTopupBalance, variant, }: PaymentMethodSelectorProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -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,21 +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;
104
+ providers?: EInsuranceProviderType[];
105
+ sortOrder?: 'asc' | 'desc';
94
106
  };
95
107
  export type CoveragePlanPremium = {
96
- provider: string;
108
+ provider: EInsuranceProviderType;
97
109
  coveragePlan: {
98
110
  id: number;
99
111
  planCode: string;
@@ -105,6 +117,10 @@ export type CoveragePlanPremium = {
105
117
  premiumPerPerson: number;
106
118
  days: number;
107
119
  region: string;
120
+ freeTeenagerCount?: number;
121
+ paidTeenagerCount?: number;
122
+ freeChildrenCount?: number;
123
+ paidChildrenCount?: number;
108
124
  } | null;
109
125
  error: string | null;
110
126
  };
@@ -116,9 +132,10 @@ export type CalculatePremiumResponse = {
116
132
  plans: CoveragePlanPremium[];
117
133
  };
118
134
  export type BuyerFormValues = {
135
+ buyerType?: EBuyerType | null;
119
136
  fullName: string;
120
137
  gender?: EGender;
121
- dateOfBirth: string;
138
+ dateOfBirth: string | null;
122
139
  nationality: number | null;
123
140
  idType: EIdType;
124
141
  idNumber: string;
@@ -136,7 +153,7 @@ export type InsuredPersonFormValues = {
136
153
  gender?: EGender;
137
154
  idType: EIdType;
138
155
  idNumber: string;
139
- relationship: ERelationToPrimary;
156
+ relationship: ERelationToPrimary | null;
140
157
  nationality: number | null;
141
158
  };
142
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 {};
@@ -1,31 +1,32 @@
1
1
  import { ITenant } from '../../types/response.dto';
2
- import { ECommissionPolicyCalculationType } from '../../types/enum';
2
+ import { EPolicyActionType } from '../../constants/policy-enums';
3
3
  export type ICommissionPolicySettings = {
4
4
  [key: string]: {
5
5
  [currency: string]: {
6
6
  [method: string]: {
7
- type: ECommissionPolicyCalculationType;
7
+ type: EPolicyActionType;
8
8
  value: string;
9
9
  };
10
10
  };
11
11
  };
12
12
  };
13
- type Props = {
14
- id: string;
15
- bank: ITenant;
16
- curr: string;
17
- method: string;
18
- type: ECommissionPolicyCalculationType;
19
- value: string;
20
- canEdit: boolean;
21
- };
22
13
  export type RefMethod = {
23
14
  getId: () => string;
24
15
  getCurrency: () => string;
25
16
  getMethod: () => string;
26
17
  getBank: () => ITenant;
27
18
  getValue: () => string;
28
- getType: () => ECommissionPolicyCalculationType;
19
+ getType: () => EPolicyActionType;
20
+ };
21
+ type UpdateTenantCommissionInputCellProps = {
22
+ id: string;
23
+ bank: ITenant;
24
+ curr: string;
25
+ method: string;
26
+ type: EPolicyActionType;
27
+ value: string;
28
+ canEdit: boolean;
29
+ forceDisplay?: boolean;
29
30
  };
30
- declare const _default: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<RefMethod>>>;
31
+ declare const _default: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<UpdateTenantCommissionInputCellProps & import('react').RefAttributes<RefMethod>>>;
31
32
  export default _default;
@@ -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 {};