@mychoice/mychoice-sdk-modules 2.1.35 → 2.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +159 -90
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +160 -91
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
3
|
-
import { AppTypes, TitleForm, TooltipForm, IconDelete, ColorVariablesTypes, InputTypes, InputForm, InputFormPhone, InputFormEmail, InputFormLicence, SelectForm, getFormattedDate, DateTypes, getDateOptions, ButtonForm, OfferHeader, OfferPrice, ButtonBase, ButtonTypes, CategoryTypes, ColorTypes, ButtonVariantTypes, SizeTypes, IconDropdownArrow, OfferDetail, CompanyRoleTypes, OperationHoursInfo, InsuranceTypes, HeaderNavGroup, ButtonMenu, DeviceTypes, IconLoaderPrimary, getInsuranceType, RequestStatusTypes, formatPostalCode, IconLoaderSecondary, postalCodeFormat, defaultBrokerPhone, useEffectOnce, carCondition, carStatus, carWinterTiresCheck, carKeepPlace, carUsagePurpose, firstDriveDistanceList, dailyDriveBusinessDistanceList, yearlyDriveDistanceList, numberWithCommas, VehiclePrimaryUseTypes, comprehensiveCoverage, collisionCoverage, defaultLocalIndex, maritalStatusOptions, subYearsFromDate, occupationOptions, genderOptions, applicantRelationshipOptions, addYearsToDate, checkDateIsSpecial, DriverLicenceTypes, getDifferenceInYears, getLicenceTypeOptions, getDisabledLicenceTypes, yesNoOptions, addDaysToDate, getMinDate, CheckboxForm,
|
|
3
|
+
import { AppTypes, TitleForm, TooltipForm, IconDelete, ColorVariablesTypes, InputTypes, InputForm, InputFormPhone, InputFormEmail, InputFormLicence, SelectForm, getFormattedDate, DateTypes, getDateOptions, ButtonForm, OfferHeader, OfferPrice, ButtonBase, ButtonTypes, CategoryTypes, ColorTypes, ButtonVariantTypes, SizeTypes, IconDropdownArrow, OfferDetail, CompanyRoleTypes, OperationHoursInfo, InsuranceTypes, HeaderNavGroup, ButtonMenu, DeviceTypes, IconLoaderPrimary, getInsuranceType, RequestStatusTypes, formatPostalCode, IconLoaderSecondary, postalCodeFormat, defaultBrokerPhone, useEffectOnce, carCondition, carStatus, carWinterTiresCheck, carKeepPlace, carUsagePurpose, firstDriveDistanceList, dailyDriveBusinessDistanceList, yearlyDriveDistanceList, numberWithCommas, VehiclePrimaryUseTypes, comprehensiveCoverage, collisionCoverage, defaultLocalIndex, maritalStatusOptions, subYearsFromDate, occupationOptions, genderOptions, applicantRelationshipOptions, addYearsToDate, checkDateIsSpecial, DriverLicenceTypes, getDifferenceInYears, getLicenceTypeOptions, getDisabledLicenceTypes, yesNoOptions, addDaysToDate, getMinDate, CheckboxForm, getMinDateByYears, compareDates, insuranceCancellationReasonOptions, DriverListTypes, licenceSuspensionsReasonOptions, trafficTicketsGroupOptions, DriverPriorityTypes, ValidationStatusTypes, QuoteEdit, coverageOptions, liabilityOptions, homeOwnerTypeOptions, tenantBuildingStructureOptions, condoBuildingStructureOptions, homeBuildingStructureOptions, residentsOptions, insuredYearsOptions, getInsuranceYearsOptions, ApplicantListTypes, claimTypeOptions, exteriorFinishOptions, constructionTypeOptions, garageTypeOptions, getNumericOptions, fireHallDistanceOptions, fireHydrantDistanceOptions, primaryHeatingTypeOptions, auxHeatingTypeOptions, InfoMessage, ppOptions, homeCoverageOptions, homeLiabilityOptions, lifeInsuranceTypeOptions, lifeProvinceOptions, lifeCoverageOptions, smokerOptions, MychoiceStep, Step, IconClock, ButtonArrow, DirectionTypes, ButtonTabArrow, ButtonTab, ButtonTabMobile, NavigationCar, NavigationPerson, NavigationDiscount, NavigationQuotes, NavigationAddress, NavigationProperty, ModalTypes } from '@mychoice/mychoice-sdk-components';
|
|
4
4
|
import { useStoreAppConfig, CarQuoteDataHandler, useStorePartner, useStoreDeviceType, useStoreAppLoader, useStoreAppModal, StoreConfigAppModalActionTypes, useHandlerPostal, useHandlerCarMake, useHandlerCarModel, useStoreFormCarVehicle, StoreFormCarVehicleActionTypes, useProvince, useStoreFormCarDiscount, StoreFormCarDiscountActionTypes, useValidationVehicle, useStoreFormCarDriverBase, StoreFormCarDriverBaseActionTypes, useStoreFormCarConfig, useStoreFormCarDriverInfo, StoreFormCarDriverInfoActionTypes, useStoreFormCarDriverLicence, addDayToDate, StoreFormCarDriverLicenceActionTypes, useStoreFormCarDriverInsurance, useStoreFormCarQuote, StoreFormCarDriverInsuranceActionTypes, useStoreFormCarDriverCancellation, StoreFormCarDriverCancellationActionTypes, useStoreFormCarDriverSuspension, StoreFormCarDriverSuspensionActionTypes, useStoreFormCarDriverAccident, StoreFormCarDriverAccidentActionTypes, useStoreFormCarDriverTicket, StoreFormCarDriverTicketActionTypes, useValidationDriver, useValidationCarDiscount, useHandlerCarQuoterEmail, useStoreFormHomeDwelling, useStoreFormHomePostal, useStoreFormHomeApplicantBase, StoreFormHomePostalActionTypes, StoreFormHomeDwellingActionTypes, StoreConfigAppConfigActionTypes, StoreFormHomeApplicantBaseActionTypes, useValidationAddress, useStoreFormHomeApplicantInfo, useStoreFormHomeDiscount, StoreFormHomeDiscountActionTypes, StoreFormHomeApplicantInfoActionTypes, useStoreFormHomeApplicantInsurance, StoreFormHomeApplicantInsuranceActionTypes, useStoreFormHomeApplicantCancellation, StoreFormHomeApplicantCancellationActionTypes, useStoreFormHomeApplicantClaim, StoreFormHomeApplicantClaimActionTypes, useValidationApplicant, useValidationDwelling, useStoreFormHomeQuote, HomeQuoteDataHandler, useValidationHomeDiscount, useHandlerHomeQuoterEmail, useStoreFormLifeCoverage, StoreFormLifeCoverageActionTypes, useValidationCoverage, useStoreFormLifeQuote, useStoreFormLifeApplicant, LifeQuoteDataHandler, useValidationLifeApplicant, useHandlerLifeQuoterEmail, StoreFormLifeApplicantActionTypes, useStoreFormCarPostal, useStoreFormLifePostal, ClearFormDataHandler, useStoreAppDevice, useStoreClient, useHandlerAuth, useHandlerPartner, StoreConfigAppLoaderActionTypes, StoreFormCarConfigActionTypes, StoreFormCarPostalActionTypes, StoreFormCarQuoteActionTypes, StoreFormHomeQuoteActionTypes, StoreFormLifePostalActionTypes, StoreFormLifeQuoteActionTypes, StoreClientActionTypes, StoreConfigAppDeviceActionTypes, StoreProvider, initHttpResponse } from '@mychoice/mychoice-sdk-store';
|
|
5
5
|
import { useNavigate, useLocation, BrowserRouter, Routes, Route, Navigate } from 'react-router-dom';
|
|
6
6
|
import React, { useState, useCallback, useEffect, useRef } from 'react';
|
|
@@ -948,36 +948,35 @@ const SectionDriverInsurancePolicy = () => {
|
|
|
948
948
|
const { configState } = useStoreFormCarConfig();
|
|
949
949
|
const { driverState, dispatchDriverInsuranceState } = useStoreFormCarDriverInsurance();
|
|
950
950
|
const { discountState, dispatchDiscountState } = useStoreFormCarDiscount();
|
|
951
|
-
const { quoteState: { isRequested } } = useStoreFormCarQuote();
|
|
951
|
+
const { quoteState: { isRequested }, } = useStoreFormCarQuote();
|
|
952
952
|
const { listed, listedMonth = '', listedYear = '', insured, insuredDate = '', firstName, birthYear, birthMonth, birthDay, licenceInfo: { firstLicenceAge, licenceType, gLicenceYear, gLicenceMonth, g1LicenceYear, g1LicenceMonth, }, } = driverState.items[driverState.activeIndex];
|
|
953
953
|
const { policyStartYear, policyStartMonth, policyStartDay } = discountState;
|
|
954
954
|
const driverNameDefault = `Driver ${driverState.activeIndex + 1}`;
|
|
955
|
-
const birthDate = birthYear && birthMonth && birthDay
|
|
956
|
-
|
|
955
|
+
const birthDate = birthYear && birthMonth && birthDay
|
|
956
|
+
? `${birthYear}-${birthMonth}-${birthDay}`
|
|
957
|
+
: '';
|
|
958
|
+
const { appConfigState: { appType }, } = useStoreAppConfig();
|
|
957
959
|
const mychoiceCls = appType === AppTypes.MyChoice ? 'mychoice' : '';
|
|
958
960
|
const getPeriodOptions = (year, month) => {
|
|
959
|
-
const options = [
|
|
961
|
+
const options = [
|
|
962
|
+
{ value: '', name: 'Date Period', disabled: true },
|
|
963
|
+
];
|
|
960
964
|
if (year && month) {
|
|
961
|
-
const
|
|
962
|
-
const
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
case y === 1:
|
|
972
|
-
options.push({ value: addYearsToDate(listedDate, y), name: '1 Year' });
|
|
973
|
-
break;
|
|
974
|
-
default:
|
|
975
|
-
options.push({
|
|
976
|
-
value: addYearsToDate(listedDate, y),
|
|
977
|
-
name: `${y} Years`,
|
|
978
|
-
});
|
|
979
|
-
}
|
|
965
|
+
const todayDate = new Date();
|
|
966
|
+
const month = String(todayDate.getMonth() + 1).padStart(2, '0');
|
|
967
|
+
const day = String(todayDate.getDate()).padStart(2, '0');
|
|
968
|
+
const yearsInPast = todayDate.getFullYear() - parseInt(year);
|
|
969
|
+
for (let i = yearsInPast; i > 0; i--) {
|
|
970
|
+
const pastDate = `${todayDate.getFullYear() - i}-${month}-${day}`;
|
|
971
|
+
options.push({
|
|
972
|
+
value: pastDate,
|
|
973
|
+
name: `${i} ${i === 1 ? 'Year' : 'Years'}`,
|
|
974
|
+
});
|
|
980
975
|
}
|
|
976
|
+
options.push({
|
|
977
|
+
value: `${todayDate.getFullYear() - 1}-${month}-${day}`,
|
|
978
|
+
name: 'Less than 1 Year',
|
|
979
|
+
});
|
|
981
980
|
}
|
|
982
981
|
return options;
|
|
983
982
|
};
|
|
@@ -1017,7 +1016,9 @@ you had insurance. If this is correct, please continue with the form.`);
|
|
|
1017
1016
|
}
|
|
1018
1017
|
};
|
|
1019
1018
|
if (birthDate) {
|
|
1020
|
-
const defaultMinDate = birthDate && firstLicenceAge
|
|
1019
|
+
const defaultMinDate = birthDate && firstLicenceAge
|
|
1020
|
+
? addYearsToDate(birthDate, +firstLicenceAge)
|
|
1021
|
+
: '';
|
|
1021
1022
|
const isOnlyG = checkDateIsSpecial(defaultMinDate, configState.minDates.g.specialDate);
|
|
1022
1023
|
if (isOnlyG) {
|
|
1023
1024
|
setMessage(gLicenceYear, gLicenceMonth);
|
|
@@ -1036,7 +1037,16 @@ you had insurance. If this is correct, please continue with the form.`);
|
|
|
1036
1037
|
else {
|
|
1037
1038
|
setHintMessage('');
|
|
1038
1039
|
}
|
|
1039
|
-
}, [
|
|
1040
|
+
}, [
|
|
1041
|
+
listedYear,
|
|
1042
|
+
listedMonth,
|
|
1043
|
+
g1LicenceYear,
|
|
1044
|
+
g1LicenceMonth,
|
|
1045
|
+
firstLicenceAge,
|
|
1046
|
+
birthDate,
|
|
1047
|
+
gLicenceYear,
|
|
1048
|
+
gLicenceMonth,
|
|
1049
|
+
]);
|
|
1040
1050
|
const handleInsuredChange = ({ value }) => {
|
|
1041
1051
|
dispatchDriverInsuranceState({
|
|
1042
1052
|
type: StoreFormCarDriverInsuranceActionTypes.FormCarDriverInsuredSelect,
|
|
@@ -1089,12 +1099,11 @@ you had insurance. If this is correct, please continue with the form.`);
|
|
|
1089
1099
|
});
|
|
1090
1100
|
}
|
|
1091
1101
|
};
|
|
1092
|
-
return (jsxs("div", { className: `form-section ${mychoiceCls}`, children: [jsxs("div", { className: "box-container", children: [jsx(DateSelectFormBox, { name: "listedYear", dateNames: ['listedYear', 'listedMonth'], onDateChange: handleListedDateChange, defaultValue: defaultListedDate, disabled: !listed, title: `When was ${firstName || driverNameDefault} first listed as a driver on a Canadian or US insurance policy?`, description: "The selection indicates what year the main driver was first listed on a Canadian or US insurance policy. If you do not remember your age, it is acceptable to provide a best estimate for the purposes of the policy or quote.", errorMessage: listed
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
], driverState.inValidation), error: driverState.inValidation, minDate: addDaysToDate('', 1), maxDate: addDaysToDate('', 60), isDay: true })] }));
|
|
1102
|
+
return (jsxs("div", { className: `form-section ${mychoiceCls}`, children: [jsxs("div", { className: "box-container", children: [jsx(DateSelectFormBox, { name: "listedYear", dateNames: ['listedYear', 'listedMonth'], onDateChange: handleListedDateChange, defaultValue: defaultListedDate, disabled: !listed, title: `When was ${firstName || driverNameDefault} first listed as a driver on a Canadian or US insurance policy?`, description: "The selection indicates what year the main driver was first listed on a Canadian or US insurance policy. If you do not remember your age, it is acceptable to provide a best estimate for the purposes of the policy or quote.", errorMessage: listed
|
|
1103
|
+
? getDateErrorMessage(['01', listedMonth, listedYear], driverState.inValidation)
|
|
1104
|
+
: '', error: driverState.inValidation, hintMessage: hintMessage, minDate: getMinDate(birthDate, firstLicenceAge) }), jsx(CheckboxForm, { name: "listed", label: "Never listed on an insurance policy", onChange: handleListedChange, defaultValue: !listed })] }), listed && (jsxs("div", { className: "box-container", children: [jsx(SelectFormBox, { name: "insuredDate", onChange: handleInsuredPeriodChange, options: getPeriodOptions(listedYear, listedMonth), defaultValue: insuredDate, disabled: !insured, title: `How long has ${firstName || driverNameDefault} been with their current insurance provider?`, description: "It is common for insurers to provide loyalty rewards or discounts for valued customers. Loyalty is a positive trait in the industry, and most insurance companies will want to provide some incentive for continued customer relationships through tangible policy rewards.", errorMessage: insured
|
|
1105
|
+
? getErrorMessage(insuredDate, driverState.inValidation)
|
|
1106
|
+
: '', error: !insuredDate && driverState.inValidation }), jsx(CheckboxForm, { name: "insured", label: "Not currently insured", onChange: handleInsuredChange, defaultValue: !insured })] })), jsx(DateSelectFormBox, { name: "policyStart", dateNames: ['policyStartYear', 'policyStartMonth', 'policyStartDay'], onDateChange: handlePolicyStartDateChange, defaultValue: defaultPolicyStartDate, title: "What is the ideal start date for your new insurance policy?", description: "Select your preferred date for the beginning of your new insurance policy.For instance, you may set the start date for the day that your current insurance expires to ensure that you\u2019re continuously covered. Alternatively, select today's date for a quote or new policy.", errorMessage: getDateErrorMessage([policyStartDay || '', policyStartMonth || '', policyStartYear || ''], driverState.inValidation), error: driverState.inValidation, minDate: addDaysToDate('', 1), maxDate: addDaysToDate('', 60), isDay: true })] }));
|
|
1098
1107
|
};
|
|
1099
1108
|
|
|
1100
1109
|
const SectionDriverCancellation = () => {
|
|
@@ -1742,7 +1751,7 @@ const BlockEndorsements = () => {
|
|
|
1742
1751
|
};
|
|
1743
1752
|
|
|
1744
1753
|
const SectionQuoteRecalc$1 = () => {
|
|
1745
|
-
const { appConfigState: { appType } } = useStoreAppConfig();
|
|
1754
|
+
const { appConfigState: { appType }, } = useStoreAppConfig();
|
|
1746
1755
|
const isTheBig = appType === AppTypes.TheBig;
|
|
1747
1756
|
const mychoiceCls = appType === AppTypes.MyChoice ? 'mychoice' : '';
|
|
1748
1757
|
const { vehicleState, dispatchVehicleState } = useStoreFormCarVehicle();
|
|
@@ -3123,28 +3132,25 @@ const PageLifeQuote = () => {
|
|
|
3123
3132
|
behavior: 'smooth',
|
|
3124
3133
|
});
|
|
3125
3134
|
});
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
? (jsx("div", { className: "offer-container", children: jsx(OfferSection, { isBestOffer: true, offerCompany: items[0]?.company, brokerCompany: items[0]?.brokerProfile, offerPrice: {
|
|
3130
|
-
monthly: items[0]?.priceMonthly,
|
|
3131
|
-
yearly: items[0]?.priceYearly,
|
|
3132
|
-
}, operationHours: {
|
|
3133
|
-
saturdayHours: items[0]?.brokerProfile.hoursSaturday,
|
|
3134
|
-
sundayHours: items[0]?.brokerProfile.hoursSunday,
|
|
3135
|
-
weekdayHours: items[0]?.brokerProfile.hoursWorkdays,
|
|
3136
|
-
}, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '' }) }))
|
|
3137
|
-
: jsx(SplashScreen, {}) })) })), jsx(SectionQuoteEdit, {})] }), appDeviceType !== DeviceTypes.Mobile && quoteState.showCallMessage
|
|
3138
|
-
&& jsx(SplashScreen, {}), !quoteState.showCallMessage
|
|
3139
|
-
&& (jsx("div", { className: "offer-container", children: !!items?.length
|
|
3140
|
-
&& items.map(({ company, brokerProfile, priceMonthly, priceYearly, }, index) => (jsx("div", { children: (appDeviceType !== DeviceTypes.Mobile || (appDeviceType === DeviceTypes.Mobile && index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
3141
|
-
monthly: priceMonthly,
|
|
3142
|
-
yearly: priceYearly,
|
|
3135
|
+
return (jsx("div", { className: "quote-page-content", children: !appLoaderState.isOpen && (jsxs(Fragment, { children: [jsxs("div", { className: "form-section-container", children: [appDeviceType === DeviceTypes.Mobile && (jsx(Fragment, { children: !!items?.length && (jsx(Fragment, { children: !quoteState.showCallMessage ? (jsx("div", { className: "offer-container", children: jsx(OfferSection, { isBestOffer: true, offerCompany: items[0]?.company, brokerCompany: items[0]?.brokerProfile, offerPrice: {
|
|
3136
|
+
monthly: items[0]?.priceMonthly,
|
|
3137
|
+
yearly: items[0]?.priceYearly,
|
|
3143
3138
|
}, operationHours: {
|
|
3144
|
-
saturdayHours: brokerProfile.hoursSaturday,
|
|
3145
|
-
sundayHours: brokerProfile.hoursSunday,
|
|
3146
|
-
weekdayHours: brokerProfile.hoursWorkdays,
|
|
3147
|
-
}, phoneNumber: formatPhoneObject(brokerProfile.phone), redirectUrl: brokerProfile.redirectUrl || '' }))
|
|
3139
|
+
saturdayHours: items[0]?.brokerProfile.hoursSaturday,
|
|
3140
|
+
sundayHours: items[0]?.brokerProfile.hoursSunday,
|
|
3141
|
+
weekdayHours: items[0]?.brokerProfile.hoursWorkdays,
|
|
3142
|
+
}, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '' }) })) : (jsx(SplashScreen, {})) })) })), jsx(SectionQuoteEdit, {})] }), appDeviceType !== DeviceTypes.Mobile &&
|
|
3143
|
+
quoteState.showCallMessage && jsx(SplashScreen, {}), !quoteState.showCallMessage && (jsx("div", { className: "offer-container", children: !!items?.length &&
|
|
3144
|
+
items.map(({ company, brokerProfile, priceMonthly, priceYearly, }, index) => (jsx("div", { children: (appDeviceType !== DeviceTypes.Mobile ||
|
|
3145
|
+
(appDeviceType === DeviceTypes.Mobile &&
|
|
3146
|
+
index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
3147
|
+
monthly: priceMonthly,
|
|
3148
|
+
yearly: priceYearly,
|
|
3149
|
+
}, operationHours: {
|
|
3150
|
+
saturdayHours: brokerProfile.hoursSaturday,
|
|
3151
|
+
sundayHours: brokerProfile.hoursSunday,
|
|
3152
|
+
weekdayHours: brokerProfile.hoursWorkdays,
|
|
3153
|
+
}, phoneNumber: formatPhoneObject(brokerProfile.phone), redirectUrl: brokerProfile.redirectUrl || '' })) }, index))) }))] })) }));
|
|
3148
3154
|
};
|
|
3149
3155
|
|
|
3150
3156
|
const getFormattedAddress = (unitNumber, streetAddress, city, provinceCode, postalCode, country) => {
|
|
@@ -3771,14 +3777,14 @@ const AppRouterListener = () => {
|
|
|
3771
3777
|
|
|
3772
3778
|
const AppRouteWrapper = (props) => {
|
|
3773
3779
|
const { children } = props;
|
|
3774
|
-
const { appConfigState: { isReady, appType, insuranceType, localIndex
|
|
3780
|
+
const { appConfigState: { isReady, appType, insuranceType, localIndex }, } = useStoreAppConfig();
|
|
3775
3781
|
const { dispatchAppModalState } = useStoreAppModal();
|
|
3776
3782
|
const { postRequestQuote: carPostRequestQuote } = CarQuoteDataHandler();
|
|
3777
3783
|
const { postRequestQuote: homePostRequestQuote } = HomeQuoteDataHandler();
|
|
3778
3784
|
const { postRequestQuote: lifePostRequestQuote } = LifeQuoteDataHandler();
|
|
3779
|
-
const { postalState: { item: { postalCode: carPostal } } } = useStoreFormCarPostal();
|
|
3780
|
-
const { postalState: { item: { postalCode: homePostal } } } = useStoreFormHomePostal();
|
|
3781
|
-
const { postalState: { item: { postalCode: lifePostal } } } = useStoreFormLifePostal();
|
|
3785
|
+
const { postalState: { item: { postalCode: carPostal }, }, } = useStoreFormCarPostal();
|
|
3786
|
+
const { postalState: { item: { postalCode: homePostal }, }, } = useStoreFormHomePostal();
|
|
3787
|
+
const { postalState: { item: { postalCode: lifePostal }, }, } = useStoreFormLifePostal();
|
|
3782
3788
|
// Car insurance states
|
|
3783
3789
|
const { vehicleState } = useStoreFormCarVehicle();
|
|
3784
3790
|
const { driverState } = useStoreFormCarDriverBase();
|
|
@@ -3804,9 +3810,9 @@ const AppRouteWrapper = (props) => {
|
|
|
3804
3810
|
const { homeDiscountFormValidate, homeDiscountFormIsValid } = useValidationHomeDiscount();
|
|
3805
3811
|
// life insurance validation
|
|
3806
3812
|
const { coverageFormValidate, coverageFormIsValid } = useValidationCoverage();
|
|
3807
|
-
const { applicantFormValidate: lifeApplicantFormValidate, applicantFormIsValid: lifeApplicantFormIsValid } = useValidationLifeApplicant();
|
|
3813
|
+
const { applicantFormValidate: lifeApplicantFormValidate, applicantFormIsValid: lifeApplicantFormIsValid, } = useValidationLifeApplicant();
|
|
3808
3814
|
let postalCode = carPostal;
|
|
3809
|
-
const { clearFormData, checkIsExpired, checkIsExpiredWithModal
|
|
3815
|
+
const { clearFormData, checkIsExpired, checkIsExpiredWithModal } = ClearFormDataHandler();
|
|
3810
3816
|
const { appLoaderState } = useStoreAppLoader();
|
|
3811
3817
|
const isMychoice = appType === AppTypes.MyChoice;
|
|
3812
3818
|
switch (insuranceType) {
|
|
@@ -3832,19 +3838,28 @@ const AppRouteWrapper = (props) => {
|
|
|
3832
3838
|
key: 0,
|
|
3833
3839
|
path: '/',
|
|
3834
3840
|
name: 'Step 1',
|
|
3835
|
-
validateOptions: {
|
|
3841
|
+
validateOptions: {
|
|
3842
|
+
validate: vehicleFormValidate,
|
|
3843
|
+
isValid: vehicleFormIsValid,
|
|
3844
|
+
},
|
|
3836
3845
|
},
|
|
3837
3846
|
{
|
|
3838
3847
|
key: 1,
|
|
3839
3848
|
path: '/driver',
|
|
3840
3849
|
name: 'Step 2',
|
|
3841
|
-
validateOptions: {
|
|
3850
|
+
validateOptions: {
|
|
3851
|
+
validate: driverFormValidate,
|
|
3852
|
+
isValid: driverFormIsValid,
|
|
3853
|
+
},
|
|
3842
3854
|
},
|
|
3843
3855
|
{
|
|
3844
3856
|
key: 2,
|
|
3845
3857
|
path: '/discount',
|
|
3846
3858
|
name: 'Step 3',
|
|
3847
|
-
validateOptions: {
|
|
3859
|
+
validateOptions: {
|
|
3860
|
+
validate: carDiscountFormValidate,
|
|
3861
|
+
isValid: carDiscountFormIsValid,
|
|
3862
|
+
},
|
|
3848
3863
|
requestFn: carPostRequestQuote,
|
|
3849
3864
|
},
|
|
3850
3865
|
],
|
|
@@ -3853,25 +3868,37 @@ const AppRouteWrapper = (props) => {
|
|
|
3853
3868
|
key: 0,
|
|
3854
3869
|
path: '/',
|
|
3855
3870
|
name: 'Step 1',
|
|
3856
|
-
validateOptions: {
|
|
3871
|
+
validateOptions: {
|
|
3872
|
+
validate: addressFormValidate,
|
|
3873
|
+
isValid: addressFormIsValid,
|
|
3874
|
+
},
|
|
3857
3875
|
},
|
|
3858
3876
|
{
|
|
3859
3877
|
key: 1,
|
|
3860
3878
|
path: '/applicant',
|
|
3861
3879
|
name: 'Step 2',
|
|
3862
|
-
validateOptions: {
|
|
3880
|
+
validateOptions: {
|
|
3881
|
+
validate: applicantFormValidate,
|
|
3882
|
+
isValid: applicantFormIsValid,
|
|
3883
|
+
},
|
|
3863
3884
|
},
|
|
3864
3885
|
{
|
|
3865
3886
|
key: 2,
|
|
3866
3887
|
path: '/property',
|
|
3867
3888
|
name: 'Step 3',
|
|
3868
|
-
validateOptions: {
|
|
3889
|
+
validateOptions: {
|
|
3890
|
+
validate: dwellingFormValidate,
|
|
3891
|
+
isValid: dwellingFormIsValid,
|
|
3892
|
+
},
|
|
3869
3893
|
},
|
|
3870
3894
|
{
|
|
3871
3895
|
key: 3,
|
|
3872
3896
|
path: '/discount',
|
|
3873
3897
|
name: 'Step 4',
|
|
3874
|
-
validateOptions: {
|
|
3898
|
+
validateOptions: {
|
|
3899
|
+
validate: homeDiscountFormValidate,
|
|
3900
|
+
isValid: homeDiscountFormIsValid,
|
|
3901
|
+
},
|
|
3875
3902
|
requestFn: homePostRequestQuote,
|
|
3876
3903
|
},
|
|
3877
3904
|
],
|
|
@@ -3880,25 +3907,37 @@ const AppRouteWrapper = (props) => {
|
|
|
3880
3907
|
key: 0,
|
|
3881
3908
|
path: '/',
|
|
3882
3909
|
name: 'Step 1',
|
|
3883
|
-
validateOptions: {
|
|
3910
|
+
validateOptions: {
|
|
3911
|
+
validate: addressFormValidate,
|
|
3912
|
+
isValid: addressFormIsValid,
|
|
3913
|
+
},
|
|
3884
3914
|
},
|
|
3885
3915
|
{
|
|
3886
3916
|
key: 1,
|
|
3887
3917
|
path: '/applicant',
|
|
3888
3918
|
name: 'Step 2',
|
|
3889
|
-
validateOptions: {
|
|
3919
|
+
validateOptions: {
|
|
3920
|
+
validate: applicantFormValidate,
|
|
3921
|
+
isValid: applicantFormIsValid,
|
|
3922
|
+
},
|
|
3890
3923
|
},
|
|
3891
3924
|
{
|
|
3892
3925
|
key: 2,
|
|
3893
3926
|
path: '/property',
|
|
3894
3927
|
name: 'Step 3',
|
|
3895
|
-
validateOptions: {
|
|
3928
|
+
validateOptions: {
|
|
3929
|
+
validate: dwellingFormValidate,
|
|
3930
|
+
isValid: dwellingFormIsValid,
|
|
3931
|
+
},
|
|
3896
3932
|
},
|
|
3897
3933
|
{
|
|
3898
3934
|
key: 3,
|
|
3899
3935
|
path: '/discount',
|
|
3900
3936
|
name: 'Step 4',
|
|
3901
|
-
validateOptions: {
|
|
3937
|
+
validateOptions: {
|
|
3938
|
+
validate: homeDiscountFormValidate,
|
|
3939
|
+
isValid: homeDiscountFormIsValid,
|
|
3940
|
+
},
|
|
3902
3941
|
requestFn: homePostRequestQuote,
|
|
3903
3942
|
},
|
|
3904
3943
|
],
|
|
@@ -3907,25 +3946,37 @@ const AppRouteWrapper = (props) => {
|
|
|
3907
3946
|
key: 0,
|
|
3908
3947
|
path: '/',
|
|
3909
3948
|
name: 'Step 1',
|
|
3910
|
-
validateOptions: {
|
|
3949
|
+
validateOptions: {
|
|
3950
|
+
validate: addressFormValidate,
|
|
3951
|
+
isValid: addressFormIsValid,
|
|
3952
|
+
},
|
|
3911
3953
|
},
|
|
3912
3954
|
{
|
|
3913
3955
|
key: 1,
|
|
3914
3956
|
path: '/applicant',
|
|
3915
3957
|
name: 'Step 2',
|
|
3916
|
-
validateOptions: {
|
|
3958
|
+
validateOptions: {
|
|
3959
|
+
validate: applicantFormValidate,
|
|
3960
|
+
isValid: applicantFormIsValid,
|
|
3961
|
+
},
|
|
3917
3962
|
},
|
|
3918
3963
|
{
|
|
3919
3964
|
key: 2,
|
|
3920
3965
|
path: '/property',
|
|
3921
3966
|
name: 'Step 3',
|
|
3922
|
-
validateOptions: {
|
|
3967
|
+
validateOptions: {
|
|
3968
|
+
validate: dwellingFormValidate,
|
|
3969
|
+
isValid: dwellingFormIsValid,
|
|
3970
|
+
},
|
|
3923
3971
|
},
|
|
3924
3972
|
{
|
|
3925
3973
|
key: 3,
|
|
3926
3974
|
path: '/discount',
|
|
3927
3975
|
name: 'Step 4',
|
|
3928
|
-
validateOptions: {
|
|
3976
|
+
validateOptions: {
|
|
3977
|
+
validate: homeDiscountFormValidate,
|
|
3978
|
+
isValid: homeDiscountFormIsValid,
|
|
3979
|
+
},
|
|
3929
3980
|
requestFn: homePostRequestQuote,
|
|
3930
3981
|
},
|
|
3931
3982
|
],
|
|
@@ -3934,13 +3985,19 @@ const AppRouteWrapper = (props) => {
|
|
|
3934
3985
|
key: 0,
|
|
3935
3986
|
path: '/',
|
|
3936
3987
|
name: 'Step 1',
|
|
3937
|
-
validateOptions: {
|
|
3988
|
+
validateOptions: {
|
|
3989
|
+
validate: coverageFormValidate,
|
|
3990
|
+
isValid: coverageFormIsValid,
|
|
3991
|
+
},
|
|
3938
3992
|
},
|
|
3939
3993
|
{
|
|
3940
3994
|
key: 1,
|
|
3941
3995
|
path: '/applicant',
|
|
3942
3996
|
name: 'Step 2',
|
|
3943
|
-
validateOptions: {
|
|
3997
|
+
validateOptions: {
|
|
3998
|
+
validate: lifeApplicantFormValidate,
|
|
3999
|
+
isValid: lifeApplicantFormIsValid,
|
|
4000
|
+
},
|
|
3944
4001
|
requestFn: lifePostRequestQuote,
|
|
3945
4002
|
},
|
|
3946
4003
|
],
|
|
@@ -3951,7 +4008,10 @@ const AppRouteWrapper = (props) => {
|
|
|
3951
4008
|
useEffect(() => {
|
|
3952
4009
|
let filteredSteps = formSteps[insuranceType];
|
|
3953
4010
|
let filteredHooks = formValidationHooks[insuranceType];
|
|
3954
|
-
if (isCompleted &&
|
|
4011
|
+
if (isCompleted &&
|
|
4012
|
+
(insuranceType === InsuranceTypes.Home ||
|
|
4013
|
+
insuranceType === InsuranceTypes.Condo ||
|
|
4014
|
+
insuranceType === InsuranceTypes.Tenant)) {
|
|
3955
4015
|
filteredSteps = formSteps[insuranceType].filter((item) => item.path !== '/property');
|
|
3956
4016
|
filteredHooks = formValidationHooks[insuranceType].filter((item) => item.path !== '/property');
|
|
3957
4017
|
}
|
|
@@ -4018,7 +4078,12 @@ const AppRouteWrapper = (props) => {
|
|
|
4018
4078
|
}
|
|
4019
4079
|
}
|
|
4020
4080
|
}, [carPostal, homePostal, lifePostal, isReady]);
|
|
4021
|
-
return (jsx(Fragment, { children: isReady && (jsxs(Fragment, { children: [jsx(AppHeader, {}), jsx(AppModal, {}), insuranceType && (jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted })), insuranceType && appType === AppTypes.MyChoice && (jsx("div", { className: localIndex !== defaultLocalIndex
|
|
4081
|
+
return (jsx(Fragment, { children: isReady && (jsxs(Fragment, { children: [jsx(AppHeader, {}), jsx(AppModal, {}), insuranceType && (jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted })), insuranceType && appType === AppTypes.MyChoice && (jsx("div", { className: localIndex !== defaultLocalIndex
|
|
4082
|
+
? 'step-progress-bar-partner'
|
|
4083
|
+
: 'step-progress-bar', children: jsx("span", { style: { width: progressLength } }) })), jsx("div", { className: `${insuranceType ? 'form-page-content' : ''} ${insuranceType && appType === AppTypes.MyChoice ? 'mychoice' : ''}`, children: insuranceType &&
|
|
4084
|
+
appType === AppTypes.MyChoice &&
|
|
4085
|
+
isDesktop &&
|
|
4086
|
+
progressLength ? (jsx(Fragment, { children: jsxs("div", { className: "mychoice-content", children: [jsx(StepsBox, { className: "step-box", formSteps: steps, validationHooks: validationHooks, propertyIsCompleted: isCompleted }), children, jsx("div", { className: "empty-steps-container" })] }) })) : (children) }), isMychoice && !appLoaderState.isOpen && jsx(ProviderImageFooter, {})] })) }));
|
|
4022
4087
|
};
|
|
4023
4088
|
const NestedRoutes = () => {
|
|
4024
4089
|
const insuranceType = getInsuranceType();
|
|
@@ -4029,10 +4094,11 @@ const NestedRoutes = () => {
|
|
|
4029
4094
|
payload: true,
|
|
4030
4095
|
});
|
|
4031
4096
|
});
|
|
4032
|
-
return (jsx(Fragment, { children: appConfigState.drawWrapper && (jsx(Fragment, { children: jsxs(Routes, { children: [jsx(Route, { path: "*", element: jsx(Navigate, { to: {
|
|
4033
|
-
|
|
4097
|
+
return (jsx(Fragment, { children: appConfigState.drawWrapper && (jsx(Fragment, { children: jsxs(Routes, { children: [jsx(Route, { path: "*", element: jsx(Navigate, { to: {
|
|
4098
|
+
pathname: `/${appConfigState.localIndex || defaultLocalIndex}/${insuranceType}`,
|
|
4099
|
+
} }) }), insuranceType === InsuranceTypes.Car && (jsxs(Route, { path: "car", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageVehicle, {}) }) }) }), jsx(Route, { path: "driver", element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageDriver, {}) }) }) }), jsx(Route, { path: "discount", element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarDiscount, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarQuote, {}) }) }) }), jsx(Route, { path: "offer", element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarQuote, {}) }) }) })] })), jsxs(Route, { path: "home", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) }) }), jsx(Route, { path: "applicant", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) }) }), jsx(Route, { path: "property", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) }) }), jsx(Route, { path: "discount", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) }) })] }), jsxs(Route, { path: "condo", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) }) }), jsx(Route, { path: "applicant", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) }) }), jsx(Route, { path: "property", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) }) }), jsx(Route, { path: "discount", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) }) })] }), jsxs(Route, { path: "tenant", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) }) }), jsx(Route, { path: "applicant", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) }) }), jsx(Route, { path: "property", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) }) }), jsx(Route, { path: "discount", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) }) })] }), jsxs(Route, { path: "life", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageCoverage, {}) }) }) }), jsx(Route, { path: "applicant", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageLifeApplicant, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageLifeQuote, {}) }) }) })] })] }) })) }));
|
|
4034
4100
|
};
|
|
4035
|
-
const RedirectWithSearchParams = ({ to, path }) => {
|
|
4101
|
+
const RedirectWithSearchParams = ({ to, path, }) => {
|
|
4036
4102
|
const insuranceType = getInsuranceType();
|
|
4037
4103
|
useStoreAppConfig();
|
|
4038
4104
|
const [isRender, setIsRender] = useState(false);
|
|
@@ -4044,10 +4110,12 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4044
4110
|
const toBasePath = to?.split('/')?.slice(-1)?.[0];
|
|
4045
4111
|
useEffectOnce(() => {
|
|
4046
4112
|
if (queryRoot.length > 1) {
|
|
4047
|
-
const query = JSON.parse(`{"${decodeURI(queryRoot[1])
|
|
4048
|
-
|
|
4113
|
+
const query = JSON.parse(`{"${decodeURI(queryRoot[1])
|
|
4114
|
+
.replace(/"/g, '\\"')
|
|
4115
|
+
.replace(/&/g, '","')
|
|
4116
|
+
.replace(/=/g, '":"')}"}`);
|
|
4049
4117
|
if (!isRender) {
|
|
4050
|
-
if (query.postal_code &&
|
|
4118
|
+
if (query.postal_code && insuranceType !== InsuranceTypes.Life) {
|
|
4051
4119
|
const formattedPostalCode = query.postal_code.replace(' ', '');
|
|
4052
4120
|
getPostal(formattedPostalCode).then(() => {
|
|
4053
4121
|
setIsRender(true);
|
|
@@ -4076,7 +4144,9 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4076
4144
|
});
|
|
4077
4145
|
}
|
|
4078
4146
|
}
|
|
4079
|
-
if (insuranceType === InsuranceTypes.Home ||
|
|
4147
|
+
if (insuranceType === InsuranceTypes.Home ||
|
|
4148
|
+
insuranceType === InsuranceTypes.Condo ||
|
|
4149
|
+
insuranceType === InsuranceTypes.Tenant) {
|
|
4080
4150
|
if (query.utm_source) {
|
|
4081
4151
|
dispatchHomeDiscountState({
|
|
4082
4152
|
type: StoreFormHomeDiscountActionTypes.FormHomeUtmSourceSet,
|
|
@@ -4089,7 +4159,8 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4089
4159
|
payload: { utmCampaign: query.utm_campaign },
|
|
4090
4160
|
});
|
|
4091
4161
|
}
|
|
4092
|
-
if (path === 'broker' ||
|
|
4162
|
+
if (path === 'broker' ||
|
|
4163
|
+
['home', 'condo', 'tenant'].includes(toBasePath)) {
|
|
4093
4164
|
dispatchHomeDiscountState({
|
|
4094
4165
|
type: StoreFormHomeDiscountActionTypes.FormHomeQuoterBrokerInfoSet,
|
|
4095
4166
|
payload: query,
|
|
@@ -4121,10 +4192,8 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4121
4192
|
const AppRoutes = (props) => {
|
|
4122
4193
|
const { appType } = props;
|
|
4123
4194
|
const defaultInsuranceType = getInsuranceType();
|
|
4124
|
-
const { appConfigState: { localIndex, insuranceType } } = useStoreAppConfig();
|
|
4125
|
-
return (jsxs(BrowserRouter, { children: [jsx(AppTitle, { appType: appType, insuranceType: insuranceType }), jsx(AppRouterListener, {}), jsxs(Routes, { children: [jsx(Route, { path: "/", element:
|
|
4126
|
-
// <BrokerKeys redirectURL={`/${localIndex}/${defaultInsuranceType}`} />
|
|
4127
|
-
) }), jsx(Route, { path: `/${localIndex}`, element: (jsx(NestedRoutes, { appType: appType })) }), jsx(Route, { path: `/${localIndex}/*`, element: (jsx(NestedRoutes, { appType: appType })) }), jsx(Route, { path: "/postal/*", element: (jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` })) }), jsx(Route, { path: "/auto/postal/*", element: (jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` })) })] })] }));
|
|
4195
|
+
const { appConfigState: { localIndex, insuranceType }, } = useStoreAppConfig();
|
|
4196
|
+
return (jsxs(BrowserRouter, { children: [jsx(AppTitle, { appType: appType, insuranceType: insuranceType }), jsx(AppRouterListener, {}), jsxs(Routes, { children: [jsx(Route, { path: "/", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) }), jsx(Route, { path: `/${localIndex}`, element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) }), jsx(Route, { path: "*", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) }), jsx(Route, { path: "/broker", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}`, path: "broker" }) }), jsx(Route, { path: `/${localIndex}`, element: jsx(NestedRoutes, { appType: appType }) }), jsx(Route, { path: `/${localIndex}/*`, element: jsx(NestedRoutes, { appType: appType }) }), jsx(Route, { path: "/postal/*", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) }), jsx(Route, { path: "/auto/postal/*", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) })] })] }));
|
|
4128
4197
|
};
|
|
4129
4198
|
|
|
4130
4199
|
const AppLoader = () => {
|