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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.192-dev",
3
+ "version": "1.0.192",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -4,7 +4,8 @@ type Props = {
4
4
  register: UseFormRegister<any>;
5
5
  agentIdentityFileInputRef: React.RefObject<HTMLInputElement>;
6
6
  isUploadingAgentIdentity: boolean;
7
- phoneNotice?: string | null;
7
+ phoneNotice?: string | string[] | null;
8
+ agentNotes?: string[];
8
9
  };
9
- export declare const Agent: ({ errors, register, agentIdentityFileInputRef, isUploadingAgentIdentity, phoneNotice, }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const Agent: ({ errors, register, agentIdentityFileInputRef, isUploadingAgentIdentity, phoneNotice, agentNotes, }: Props) => import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -18,6 +18,7 @@ type Props = {
18
18
  handleSelectTicketAsImage: (files: File[]) => void;
19
19
  isMobileDevices: boolean;
20
20
  hideGDSTicketSearch?: boolean;
21
+ onCountryCodeDesChange?: (code: string) => void;
21
22
  };
22
- export declare const FlightInformation: ({ imageSrc, handleCaptureImage, handleAgentIdentityDocumentUpload, agentIdentityFileInputRef, setIsWebcamOpen, showGetTicketInfo, errors, register, getValues, setValue, trigger, isLoading, getFlightInfo, isVN, fileInputRef, handleSelectTicketAsImage, isMobileDevices, hideGDSTicketSearch, }: Props) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const FlightInformation: ({ imageSrc, handleCaptureImage, handleAgentIdentityDocumentUpload, agentIdentityFileInputRef, setIsWebcamOpen, showGetTicketInfo, errors, register, getValues, setValue, trigger, isLoading, getFlightInfo, isVN, fileInputRef, handleSelectTicketAsImage, isMobileDevices, hideGDSTicketSearch, onCountryCodeDesChange, }: Props) => import("react/jsx-runtime").JSX.Element;
23
24
  export {};
@@ -0,0 +1,5 @@
1
+ type Props = {
2
+ messages: string[];
3
+ };
4
+ export declare const SelectingBankMessageAlerts: ({ messages }: Props) => import("react/jsx-runtime").JSX.Element | null;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { IUser } from '../../../types/response.dto';
3
+ interface AgencyUserSelectorProps {
4
+ onUserSelected?: (user: IUser) => void;
5
+ }
6
+ export declare const AgencyUserSelector: React.FC<AgencyUserSelectorProps>;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { IUser } from '../../../types/response.dto';
3
+ interface AgencyUserSelectorModalProps {
4
+ isOpen: boolean;
5
+ onClose: () => void;
6
+ onUserSelected: (user: IUser) => void;
7
+ initialUser?: IUser | null;
8
+ }
9
+ export declare const AgencyUserSelectorModal: React.FC<AgencyUserSelectorModalProps>;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import { EApprovalStatus } from '../types/insurance';
2
+ type ApprovalStatusBadgeProps = {
3
+ approvalBypassed?: boolean;
4
+ approvalStatus?: EApprovalStatus | null;
5
+ };
6
+ export declare const ApprovalStatusBadge: ({ approvalBypassed, approvalStatus, }: ApprovalStatusBadgeProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -6,5 +6,7 @@ export type EmbededIndividualAppProps = {
6
6
  defaultBank?: string;
7
7
  displayDefaultBankLogo?: boolean;
8
8
  type?: ESdkFormType;
9
+ scrollable?: boolean;
10
+ recommendBoxHeight?: string;
9
11
  };
10
- export declare const EmbededIndividualApp: ({ apiKey, externalCssUrl, hide, defaultBank, displayDefaultBankLogo, type, }: 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;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { BankTransferInfo } from '../../types/response.dto';
3
+ interface BankTransferInfoDisplayProps {
4
+ bankTransferInfo: BankTransferInfo;
5
+ }
6
+ export declare const BankTransferInfoDisplay: React.FC<BankTransferInfoDisplayProps>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { TextProps } from '@chakra-ui/react';
2
+ interface DateDisplayProps extends TextProps {
3
+ date?: string | Date | null;
4
+ format?: string;
5
+ }
6
+ export declare const DateDisplay: ({ date, format, ...props }: DateDisplayProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ export type TMultiTagOption = {
2
+ label: string;
3
+ value: string;
4
+ };
5
+ type MultiTagComboboxProps = {
6
+ options: TMultiTagOption[];
7
+ values: string[];
8
+ placeholder?: string;
9
+ emptyText?: string;
10
+ onChange: (nextValues: string[]) => void;
11
+ controlBorderRadius?: string;
12
+ };
13
+ export declare const MultiTagCombobox: ({ options, values, placeholder, emptyText, onChange, controlBorderRadius, }: MultiTagComboboxProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ interface PrimaryRadioGroupOption<T extends string> {
3
+ value: T;
4
+ label: ReactNode;
5
+ disabled?: boolean;
6
+ }
7
+ interface PrimaryRadioGroupProps<T extends string> {
8
+ value: T;
9
+ onValueChange: (value: T) => void;
10
+ options: PrimaryRadioGroupOption<T>[];
11
+ direction?: 'row' | 'column';
12
+ gap?: number;
13
+ disabled?: boolean;
14
+ }
15
+ export declare function PrimaryRadioGroup<T extends string>({ value, onValueChange, options, direction, gap, disabled, }: PrimaryRadioGroupProps<T>): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,17 @@
1
+ type TTimeOption = {
2
+ label: string;
3
+ value: string;
4
+ };
5
+ type TimeRangeSelectProps = {
6
+ startValue: string;
7
+ endValue: string;
8
+ options: TTimeOption[];
9
+ onStartChange: (value: string) => void;
10
+ onEndChange: (value: string) => void;
11
+ error?: string;
12
+ startLabel?: string;
13
+ endLabel?: string;
14
+ fieldBorderRadius?: string;
15
+ };
16
+ export declare const TimeRangeSelect: ({ startValue, endValue, options, onStartChange, onEndChange, error, startLabel, endLabel, fieldBorderRadius, }: TimeRangeSelectProps) => import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { EDepartmentType, IRole } from '../../types/response.dto';
2
+ import { EDepartmentType, IRole, ITenant } from '../../types/response.dto';
3
3
  export interface Department {
4
4
  id: number;
5
5
  name: string;
@@ -11,6 +11,8 @@ export interface Department {
11
11
  transferName?: string;
12
12
  transferNumber?: string;
13
13
  users: DepartmentMember[];
14
+ tenantId?: number;
15
+ tenant?: Pick<ITenant, 'id' | 'name' | 'shortName' | 'type'>;
14
16
  }
15
17
  export interface DepartmentMember {
16
18
  id: number;
@@ -1,10 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
3
+ import { ETravelScope } from '../../types/insurance';
4
+ import { IUser } from '../../types/response.dto';
5
+ export type InsuranceFormInitialData = {
6
+ formValues: TravelPlanFormValues;
7
+ selectedPlan: CoveragePlanPremium | null;
8
+ buyerInfo: BuyerFormValues | null;
9
+ insuredPeople: InsuredPerson[];
10
+ recalculatedPremium?: CoveragePlanPremium['premium'] | null;
11
+ waitForApproval?: boolean;
12
+ };
1
13
  export interface CreateInsuranceTransactionFormProps {
2
14
  storageKey: string;
3
- title?: string;
4
- backButtonText?: string;
15
+ title?: ReactNode;
16
+ travelScope: ETravelScope;
5
17
  onBack?: () => void;
6
18
  onSuccess?: (transactionData: any) => void;
7
- containerMaxWidth?: string;
8
- showBackButton?: boolean;
19
+ scrollable?: boolean;
20
+ recommendBoxHeight?: string;
21
+ isAdminMode?: boolean;
22
+ selectedUser?: IUser | null;
23
+ onOpenUserSelector?: () => void;
24
+ initialData?: InsuranceFormInitialData | null;
25
+ mode?: 'create' | 'edit';
26
+ editingPublicId?: string;
9
27
  }
10
- export declare const CreateInsuranceTransactionForm: ({ storageKey, title, backButtonText, onBack, onSuccess, containerMaxWidth, showBackButton, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const CreateInsuranceTransactionForm: ({ storageKey, title, travelScope, onBack, onSuccess, scrollable, recommendBoxHeight, isAdminMode, selectedUser, onOpenUserSelector, initialData, mode, editingPublicId, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
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
+ labelPosition?: 'top' | 'left';
10
+ }
11
+ export declare const DateRangePicker: ({ control, tripStart, tripEnd, onDatesChange, showLabel, labelPosition, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,6 @@
1
+ import { InsuranceContentBlock } from './types';
2
+ interface DynamicRendererProps {
3
+ blocks?: InsuranceContentBlock[];
4
+ }
5
+ export declare const DynamicRenderer: ({ blocks }: DynamicRendererProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { AccordionBlock as AccordionBlockType } from '../types';
2
+ interface AccordionBlockProps {
3
+ block: AccordionBlockType;
4
+ }
5
+ export declare const AccordionBlock: ({ block }: AccordionBlockProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ActionButtonBlock as ActionButtonBlockType } from '../types';
2
+ interface ActionButtonBlockProps {
3
+ block: ActionButtonBlockType;
4
+ }
5
+ export declare const ActionButtonBlock: ({ block }: ActionButtonBlockProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ContainerBlock as ContainerBlockType } from '../types';
2
+ interface ContainerBlockProps {
3
+ block: ContainerBlockType;
4
+ }
5
+ export declare const ContainerBlock: ({ block }: ContainerBlockProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { DataRowBlock as DataRowBlockType } from '../types';
2
+ interface DataRowBlockProps {
3
+ block: DataRowBlockType;
4
+ }
5
+ export declare const DataRowBlock: ({ block }: DataRowBlockProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { DividerBlock as DividerBlockType } from '../types';
2
+ interface DividerBlockProps {
3
+ block: DividerBlockType;
4
+ }
5
+ export declare const DividerBlock: ({ block }: DividerBlockProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ListGroupBlock as ListGroupBlockType } from '../types';
2
+ interface ListGroupBlockProps {
3
+ block: ListGroupBlockType;
4
+ }
5
+ export declare const ListGroupBlock: ({ block }: ListGroupBlockProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { TextBlock as TextBlockType } from '../types';
2
+ interface TextBlockProps {
3
+ block: TextBlockType;
4
+ }
5
+ export declare const TextBlock: ({ block }: TextBlockProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,64 @@
1
+ export type BlockType = 'accordion' | 'data_row' | 'text_block' | 'list_group' | 'divider' | 'action_button' | 'container';
2
+ export interface StyleBlock {
3
+ margin?: [number, number, number, number];
4
+ padding?: [number, number, number, number];
5
+ font_weight?: 'bold' | 'normal' | 'semibold' | 'medium';
6
+ font_style?: 'italic' | 'normal';
7
+ text_color?: string;
8
+ alignment?: 'left' | 'center' | 'right';
9
+ }
10
+ export interface BaseBlock {
11
+ type: BlockType;
12
+ styles?: StyleBlock;
13
+ }
14
+ export interface AccordionBlock extends BaseBlock {
15
+ type: 'accordion';
16
+ title: string;
17
+ value?: string;
18
+ is_expanded?: boolean;
19
+ children?: InsuranceContentBlock[];
20
+ }
21
+ export interface DataRowBlock extends BaseBlock {
22
+ type: 'data_row';
23
+ label: string;
24
+ value: string;
25
+ has_info?: boolean;
26
+ info_content?: string;
27
+ }
28
+ export interface TextBlock extends BaseBlock {
29
+ type: 'text_block';
30
+ content: string;
31
+ text_style?: 'h1' | 'h2' | 'h3' | 'body';
32
+ }
33
+ export interface ListGroupBlock extends BaseBlock {
34
+ type: 'list_group';
35
+ marker_type?: 'disc' | 'decimal' | 'roman';
36
+ items: Array<{
37
+ content: string;
38
+ }>;
39
+ }
40
+ export interface DividerBlock extends BaseBlock {
41
+ type: 'divider';
42
+ line_style?: 'solid' | 'dashed';
43
+ thickness?: number;
44
+ }
45
+ export interface ActionButtonBlock extends BaseBlock {
46
+ type: 'action_button';
47
+ label: string;
48
+ icon?: 'pdf_red' | string;
49
+ action: {
50
+ type: 'open_url';
51
+ payload: string;
52
+ };
53
+ }
54
+ export interface ContainerBlock extends BaseBlock {
55
+ type: 'container';
56
+ layout?: 'vertical' | 'horizontal';
57
+ children: InsuranceContentBlock[];
58
+ }
59
+ export type InsuranceContentBlock = AccordionBlock | DataRowBlock | TextBlock | ListGroupBlock | DividerBlock | ActionButtonBlock | ContainerBlock;
60
+ export interface InsuranceContent {
61
+ benefits?: InsuranceContentBlock[];
62
+ conditions?: InsuranceContentBlock[];
63
+ compensation?: InsuranceContentBlock[];
64
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Converts markdown-like rich text formatting to HTML
3
+ * Supports:
4
+ * - **text** -> <strong>text</strong> (bold)
5
+ * - _text_ -> <em>text</em> (italic)
6
+ */
7
+ export declare const parseRichText: (content: string) => string;
8
+ /**
9
+ * Safely renders rich text with React
10
+ * Returns an object suitable for dangerouslySetInnerHTML
11
+ */
12
+ export declare const getRichTextHtml: (content: string) => {
13
+ __html: string;
14
+ };
@@ -0,0 +1,6 @@
1
+ import { StyleBlock } from '../types';
2
+ import { SystemStyleObject } from '@chakra-ui/react';
3
+ /**
4
+ * Maps Insurance Content style block to Chakra UI system styles
5
+ */
6
+ export declare const mapStyles: (styles?: StyleBlock) => SystemStyleObject;
@@ -0,0 +1,9 @@
1
+ import { default as DatePicker } from 'react-datepicker';
2
+ export interface DatePickerInputProps {
3
+ value?: string;
4
+ onClick?: () => void;
5
+ placeholder?: string;
6
+ borderRadius?: string;
7
+ }
8
+ export declare const DatePickerInput: import('react').ForwardRefExoticComponent<DatePickerInputProps & import('react').RefAttributes<HTMLInputElement>>;
9
+ export { DatePicker };
@@ -0,0 +1,12 @@
1
+ import { EInsuranceProviderType } from '../../../types/insurance';
2
+ export type SortOrder = 'asc' | 'desc';
3
+ interface InsurancePlanFilterProps {
4
+ selectedProviders: EInsuranceProviderType[];
5
+ onProviderChange: (providers: EInsuranceProviderType[]) => void;
6
+ sortOrder: SortOrder;
7
+ onSortChange: (order: SortOrder) => void;
8
+ allowedProviders?: EInsuranceProviderType[];
9
+ disabled?: boolean;
10
+ }
11
+ export declare const InsurancePlanFilter: ({ selectedProviders, onProviderChange, sortOrder, onSortChange, allowedProviders, disabled, }: InsurancePlanFilterProps) => import("react/jsx-runtime").JSX.Element;
12
+ 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, selectedPlanId, onPlanSelect, title, columns, emptyMessage, showDiscount, actionButtonText, travelInsuranceSettings, travelPlan, }: InsurancePlanListProps) => import("react/jsx-runtime").JSX.Element;
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,16 @@
1
+ import { CoveragePlanPremium, TravelPlanFormValues, InsuranceTypeAndPeopleCountValues } 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
+ showCountryName?: boolean;
11
+ onBuyNow: (plan: CoveragePlanPremium, countryId: number, values: InsuranceTypeAndPeopleCountValues) => void;
12
+ travelInsuranceSettings?: Record<string, any>;
13
+ travelPlan?: TravelPlanFormValues | null;
14
+ }
15
+ export declare const QuickCoveragePlanCard: ({ quickPlan, countryName, showCountryName, onBuyNow, travelInsuranceSettings, travelPlan, }: QuickCoveragePlanCardProps) => import("react/jsx-runtime").JSX.Element | null;
16
+ export {};
@@ -0,0 +1,18 @@
1
+ import { QuickCoveragePlan } from './QuickCoveragePlanCard';
2
+ import { CoveragePlanPremium, TravelPlanFormValues, InsuranceTypeAndPeopleCountValues } from '../types';
3
+ interface QuickRecommendationsSectionProps {
4
+ countryId: number;
5
+ countryName: string;
6
+ plans: QuickCoveragePlan[];
7
+ countryOptions: Array<{
8
+ value: string;
9
+ label: string;
10
+ }>;
11
+ travelInsuranceSettings?: Record<string, any>;
12
+ travelPlan?: TravelPlanFormValues | null;
13
+ onBuyNow: (plan: CoveragePlanPremium, countryId: number, values: InsuranceTypeAndPeopleCountValues) => void;
14
+ onFetchPlansByCountry: (countryId: number) => Promise<QuickCoveragePlan[]>;
15
+ onPlansLoaded?: (countryId: number, plans: QuickCoveragePlan[]) => void;
16
+ }
17
+ export declare const QuickRecommendationsSection: ({ countryId, countryName, plans: plansProp, countryOptions, travelInsuranceSettings, travelPlan, onBuyNow, onFetchPlansByCountry, onPlansLoaded, }: QuickRecommendationsSectionProps) => import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -1,2 +1,3 @@
1
1
  export { InsurancePlanCard, type InsurancePlan, type PriceDisplayType } from './InsurancePlanCard';
2
2
  export { InsurancePlanList } from './InsurancePlanList';
3
+ export { InsurancePlanFilter, type SortOrder } from './InsurancePlanFilter';
@@ -1,7 +1,11 @@
1
1
  export type InsuranceSummaryOverviewProps = {
2
- title?: string;
3
2
  summary: {
4
3
  totalPremium: number;
4
+ premiumBreakdown?: {
5
+ beforeDiscount: number;
6
+ couponCode: string;
7
+ discountAmount: number;
8
+ };
5
9
  providerLabel: string;
6
10
  providerLogoUrl?: string;
7
11
  planName?: string | null;
@@ -10,6 +14,7 @@ export type InsuranceSummaryOverviewProps = {
10
14
  trip: {
11
15
  policyTypeLabel: string;
12
16
  travelTypeLabel: string;
17
+ destinationOrRouteLabel?: string;
13
18
  destinationLabel: string;
14
19
  insuranceTypeLabel: string;
15
20
  tripStart?: Date | string | null;
@@ -18,4 +23,4 @@ export type InsuranceSummaryOverviewProps = {
18
23
  travellersCount?: number | null;
19
24
  };
20
25
  };
21
- export declare const InsuranceSummaryOverview: ({ title, summary, trip, }: InsuranceSummaryOverviewProps) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const InsuranceSummaryOverview: ({ summary, trip }: InsuranceSummaryOverviewProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { Control } from 'react-hook-form';
2
+ import { InsuranceTypeAndPeopleCountValues } from './types';
3
+ /** Props: control must have fields insuranceType, adultsCount, teenagerCount, childrenCount. */
4
+ interface InsuranceTypeAndPeopleCountFieldsProps {
5
+ control: Control<InsuranceTypeAndPeopleCountValues>;
6
+ setValue?: (name: keyof InsuranceTypeAndPeopleCountValues, value: number) => void;
7
+ showFamilyNote?: boolean;
8
+ }
9
+ export declare const InsuranceTypeAndPeopleCountFields: ({ control, setValue, showFamilyNote, }: InsuranceTypeAndPeopleCountFieldsProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { InsuranceQuoteInsured, PolicyInsured } from '../../types/insurance-transaction.dto';
2
+ type Props = {
3
+ insureds: (PolicyInsured | InsuranceQuoteInsured)[];
4
+ };
5
+ export declare const InsuredTravelersTable: ({ insureds }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,17 @@
1
+ /** Request / response captured for one phase (báo giá or đơn hàng). */
2
+ export type ProviderPhasePayload = {
3
+ providerData?: Record<string, unknown> | null;
4
+ providerResponse?: Record<string, unknown> | null;
5
+ };
6
+ export type ProviderApiDebugModalProps = {
7
+ open: boolean;
8
+ onOpenChange: (open: boolean) => void;
9
+ orderOnly?: boolean;
10
+ quoteProviderData?: Record<string, unknown> | null;
11
+ quoteProviderResponse?: Record<string, unknown> | null;
12
+ orderProviderData?: Record<string, unknown> | null;
13
+ orderProviderResponse?: Record<string, unknown> | null;
14
+ };
15
+ export declare const ProviderApiDebugModal: ({ open, onOpenChange, orderOnly, quoteProviderData, quoteProviderResponse, orderProviderData, orderProviderResponse, }: ProviderApiDebugModalProps) => import("react/jsx-runtime").JSX.Element;
16
+ export type ProviderApiDebugButtonProps = Omit<ProviderApiDebugModalProps, 'open' | 'onOpenChange'>;
17
+ export declare const ProviderApiDebugButton: ({ orderOnly, quoteProviderData, quoteProviderResponse, orderProviderData, orderProviderResponse, }: ProviderApiDebugButtonProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  interface SimpleDetailProps {
3
3
  label: string;
4
4
  value?: string | ReactNode | null;
5
+ labelColumnMinW?: string;
5
6
  }
6
- export declare const SimpleDetail: ({ label, value }: SimpleDetailProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const SimpleDetail: ({ label, value, labelColumnMinW }: SimpleDetailProps) => import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -1,14 +1,34 @@
1
1
  import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
2
- import { EPaymentMethod } from '../../types/enum';
3
- interface StepFourPaymentProps {
2
+ import { ETravelScope } from '../../types/insurance';
3
+ import { EOrderPaymentType, EPaymentMethod } from '../../types/enum';
4
+ export interface StepFourPaymentProps {
5
+ travelScope: ETravelScope;
4
6
  travelPlan: TravelPlanFormValues;
5
7
  selectedPlan: CoveragePlanPremium | null;
6
8
  buyerInfo: BuyerFormValues | null;
7
9
  insuredPeople: InsuredPerson[];
8
10
  onBack?: () => void;
9
- onPayment?: (paymentMode: EPaymentMethod) => void;
11
+ onPayment?: (args: {
12
+ paymentMode?: EPaymentMethod;
13
+ paymentType: EOrderPaymentType;
14
+ }) => void;
10
15
  isProcessing?: boolean;
11
16
  onPremiumUpdate?: (premium: CoveragePlanPremium['premium'] | null) => void;
17
+ onCouponChange?: (coupon: {
18
+ code: string;
19
+ discountAmount: number;
20
+ finalAmount: number;
21
+ description?: string | null;
22
+ } | null) => void;
23
+ paymentType?: EOrderPaymentType;
24
+ isAdminMode?: boolean;
25
+ waitForApproval?: boolean;
26
+ onWaitForApprovalChange?: (value: boolean) => void;
27
+ hasSelectedUser?: boolean;
28
+ submitLabel?: string;
29
+ showApprovalToggle?: boolean;
30
+ mode?: 'create' | 'edit';
31
+ selectedUserTenantId?: number;
32
+ selectedUserId?: number;
12
33
  }
13
- export declare const StepFourPayment: ({ travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
14
- export {};
34
+ export declare const StepFourPayment: ({ travelScope, travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, onCouponChange, paymentType: paymentTypeProp, isAdminMode, waitForApproval, onWaitForApprovalChange, hasSelectedUser, submitLabel, showApprovalToggle, mode, selectedUserTenantId, selectedUserId, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,19 @@
1
1
  import { Control } from 'react-hook-form';
2
- import { TravelPlanFormValues } from './types';
2
+ import { TravelPlanFormValues, CoveragePlanPremium, InsuranceTypeAndPeopleCountValues } 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
+ isDomestic?: boolean;
9
+ onQuickPlanSelect?: (plan: CoveragePlanPremium, countryId: number, values: InsuranceTypeAndPeopleCountValues) => void;
10
+ recommendBoxHeight?: string;
11
+ onBack?: () => void;
12
+ onNext?: () => void;
13
+ isSubmitting?: boolean;
14
+ isStepOneReady?: boolean;
15
+ isGuest?: boolean;
16
+ showQuickRecommendations?: boolean;
8
17
  }
9
- export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue, isDomestic, onQuickPlanSelect, recommendBoxHeight, onBack, onNext, isSubmitting, isStepOneReady, isGuest, showQuickRecommendations, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
10
19
  export {};
@@ -0,0 +1,29 @@
1
+ import { Control } from 'react-hook-form';
2
+ import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
3
+ import { EInsuranceProviderType, 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
+ teenagersCount: number | null;
16
+ childrenCount: number | null;
17
+ isDomestic: boolean;
18
+ selectedProvider?: EInsuranceProviderType;
19
+ onBuyerInfoSubmit: (data: BuyerFormValues) => void;
20
+ onInsuredPeopleSubmit: (people: InsuredPerson[]) => void;
21
+ onStepThreeBack: () => void;
22
+ onDatesChange?: (startDate: Date | null, endDate: Date | null) => void;
23
+ buyerInfoFormRef: React.RefObject<HTMLFormElement | null>;
24
+ insuredPeopleFormRef: React.RefObject<HTMLFormElement | null>;
25
+ onInsuredPeopleListUpdate?: (people: InsuredPerson[]) => void;
26
+ insuredPeopleSnapshotRef?: React.MutableRefObject<(() => InsuredPerson[]) | null>;
27
+ }
28
+ export declare const StepThree: ({ control, tripStart, tripEnd, stepThreeChildStep, onStepThreeChildStepClick, selectedPlan, buyerInfo, insuredPeople, insuranceType, adultsCount, teenagersCount, childrenCount, isDomestic, selectedProvider, onBuyerInfoSubmit, onInsuredPeopleSubmit, onStepThreeBack, onDatesChange, buyerInfoFormRef, insuredPeopleFormRef, onInsuredPeopleListUpdate, insuredPeopleSnapshotRef, }: StepThreeProps) => import("react/jsx-runtime").JSX.Element;
29
+ export {};
@@ -1,9 +1,12 @@
1
+ import { EInsuranceProviderType } from '../../types/insurance';
1
2
  import { BuyerFormValues } from './types';
2
3
  interface StepThreeBuyerInfoProps {
3
4
  initialValues?: Partial<BuyerFormValues>;
4
5
  onSubmit: (values: BuyerFormValues) => void;
5
6
  onBack: () => void;
6
7
  onFormRef?: (form: HTMLFormElement | null) => void;
8
+ isDomestic?: boolean;
9
+ selectedProvider?: EInsuranceProviderType;
7
10
  }
8
- export declare const StepThreeBuyerInfo: ({ initialValues, onSubmit, onBack: _onBack, onFormRef, }: StepThreeBuyerInfoProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const StepThreeBuyerInfo: ({ initialValues, onSubmit, onBack: _onBack, onFormRef, isDomestic, selectedProvider, }: StepThreeBuyerInfoProps) => import("react/jsx-runtime").JSX.Element;
9
12
  export {};