@mychoice/mychoice-sdk-modules 1.0.0
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/README.md +11 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +3194 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/init/AppConfig/AppConfig.d.ts +4 -0
- package/dist/cjs/init/AppConfig/helper.d.ts +2 -0
- package/dist/cjs/init/AppConfig/index.d.ts +1 -0
- package/dist/cjs/init/AppConfig/interfaces.d.ts +5 -0
- package/dist/cjs/init/AppContainer/AppContainer.d.ts +2 -0
- package/dist/cjs/init/AppContainer/index.d.ts +1 -0
- package/dist/cjs/init/AppHeader/AppHeader.d.ts +2 -0
- package/dist/cjs/init/AppHeader/index.d.ts +1 -0
- package/dist/cjs/init/AppLoader/AppLoader.d.ts +2 -0
- package/dist/cjs/init/AppLoader/index.d.ts +1 -0
- package/dist/cjs/init/AppModal/AppModal.d.ts +2 -0
- package/dist/cjs/init/AppModal/index.d.ts +1 -0
- package/dist/cjs/init/AppModal/interfaces.d.ts +4 -0
- package/dist/cjs/init/AppRouterListener/AppRouterListener.d.ts +2 -0
- package/dist/cjs/init/AppRouterListener/index.d.ts +1 -0
- package/dist/cjs/init/AppRoutes/AppRoutes.d.ts +3 -0
- package/dist/cjs/init/AppRoutes/BrokerKeys.d.ts +6 -0
- package/dist/cjs/init/AppRoutes/hoox/useRedirectPartner.d.ts +5 -0
- package/dist/cjs/init/AppRoutes/hoox/useRouteParams.d.ts +1 -0
- package/dist/cjs/init/AppRoutes/index.d.ts +3 -0
- package/dist/cjs/init/AppRoutes/routeTypes/RouteWrapperPrivate.d.ts +3 -0
- package/dist/cjs/init/AppRoutes/routeTypes/RouteWrapperPublic.d.ts +3 -0
- package/dist/cjs/init/AppRoutes/routeTypes/RouteWrapperRestricted.d.ts +3 -0
- package/dist/cjs/init/AppRoutes/routeTypes/index.d.ts +3 -0
- package/dist/cjs/init/AppRoutes/routeTypes/interface.d.ts +4 -0
- package/dist/cjs/init/AppWrapper/AppWrapper.d.ts +3 -0
- package/dist/cjs/init/AppWrapper/index.d.ts +1 -0
- package/dist/cjs/init/AppWrapper/interfaces.d.ts +5 -0
- package/dist/cjs/init/StoryAppWrapper/StoryAppWrapper.d.ts +3 -0
- package/dist/cjs/init/StoryAppWrapper/index.d.ts +1 -0
- package/dist/cjs/init/StoryAppWrapper/interfaces.d.ts +4 -0
- package/dist/cjs/init/helper.d.ts +2 -0
- package/dist/cjs/init/index.d.ts +3 -0
- package/dist/cjs/insurances/car/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/discount/PageDiscount.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/discount/helpers.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/discount/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/discount/sections/SectionDiscountInfo.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/discount/sections/blocks/BlockNextPageInfo.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/discount/sections/blocks/BlockSubmit.d.ts +3 -0
- package/dist/cjs/insurances/car/pages/discount/sections/blocks/BlockVehLinks.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/discount/sections/blocks/index.d.ts +3 -0
- package/dist/cjs/insurances/car/pages/discount/sections/blocks/interfaces.d.ts +7 -0
- package/dist/cjs/insurances/car/pages/discount/sections/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/driver/PageDriver.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/driver/TabDriver.d.ts +3 -0
- package/dist/cjs/insurances/car/pages/driver/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverCancellation/SectionDriverCancellation.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverCancellation/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverHistory/SectionDriverHistory.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverHistory/blocks/BlockDriverAccident.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverHistory/blocks/BlockDriverSuspension.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverHistory/blocks/BlockDriverTicket.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverHistory/blocks/index.d.ts +3 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverHistory/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverInfo/SectionDriverInfo.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverInfo/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverInsurancePolicy/SectionDriverInsurancePolicy.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverInsurancePolicy/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverLicence/SectionDriverLicence.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/driver/sections/SectionDriverLicence/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/driver/sections/index.d.ts +5 -0
- package/dist/cjs/insurances/car/pages/helpers.d.ts +7 -0
- package/dist/cjs/insurances/car/pages/index.d.ts +6 -0
- package/dist/cjs/insurances/car/pages/interfaces.d.ts +9 -0
- package/dist/cjs/insurances/car/pages/quote/PageQuote.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/quote/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/quote/sections/SectionQuoteEdit.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/quote/sections/SectionQuoteRecalc.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/quote/sections/SplashScreen.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/quote/sections/blocks/BlockEndorsements.d.ts +3 -0
- package/dist/cjs/insurances/car/pages/quote/sections/index.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/vehicle/PageVehicle.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/vehicle/TabVehicle.d.ts +3 -0
- package/dist/cjs/insurances/car/pages/vehicle/helpers.d.ts +3 -0
- package/dist/cjs/insurances/car/pages/vehicle/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/vehicle/sections/SectionCoverage.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/vehicle/sections/SectionMain.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/vehicle/sections/blocks/BlockCarConditionInfo.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/vehicle/sections/blocks/BlockCarInfo.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/vehicle/sections/blocks/index.d.ts +2 -0
- package/dist/cjs/insurances/car/pages/vehicle/sections/index.d.ts +2 -0
- package/dist/cjs/insurances/helpers.d.ts +11 -0
- package/dist/cjs/insurances/home/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/address/PageAddress.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/address/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/address/sections/SectionAddress.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/address/sections/blocks/BlockAddressInfo.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/address/sections/blocks/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/address/sections/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/applicant/PageApplicant.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/applicant/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/applicant/sections/SectionApplicantCancellation/SectionApplicantCancellation.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/applicant/sections/SectionApplicantCancellation/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/applicant/sections/SectionApplicantClaim/SectionApplicantClaim.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/applicant/sections/SectionApplicantClaim/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/applicant/sections/SectionApplicantInfo/SectionApplicantInfo.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/applicant/sections/SectionApplicantInfo/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/applicant/sections/SectionApplicantInsurancePolicy/SectionApplicantInsurancePolicy.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/applicant/sections/SectionApplicantInsurancePolicy/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/applicant/sections/index.d.ts +4 -0
- package/dist/cjs/insurances/home/pages/discount/PageDiscount.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/discount/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/discount/sections/SectionDiscountInfo.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/discount/sections/blocks/BlockDwellingInfo.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/discount/sections/blocks/BlockNextPageInfo.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/discount/sections/blocks/BlockSubmit.d.ts +3 -0
- package/dist/cjs/insurances/home/pages/discount/sections/blocks/index.d.ts +3 -0
- package/dist/cjs/insurances/home/pages/discount/sections/blocks/interfaces.d.ts +7 -0
- package/dist/cjs/insurances/home/pages/discount/sections/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/dwelling/PageProperty.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/dwelling/helpers.d.ts +3 -0
- package/dist/cjs/insurances/home/pages/dwelling/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/dwelling/sections/SectionDwelling.d.ts +2 -0
- package/dist/cjs/insurances/home/pages/dwelling/sections/index.d.ts +1 -0
- package/dist/cjs/insurances/home/pages/helpers.d.ts +4 -0
- package/dist/cjs/insurances/home/pages/index.d.ts +4 -0
- package/dist/cjs/insurances/index.d.ts +3 -0
- package/dist/cjs/shared/boxes/Container/Container.d.ts +3 -0
- package/dist/cjs/shared/boxes/Container/index.d.ts +2 -0
- package/dist/cjs/shared/boxes/Container/interface.d.ts +7 -0
- package/dist/cjs/shared/boxes/DateSelectFormBox/DateSelectFormBox.d.ts +3 -0
- package/dist/cjs/shared/boxes/DateSelectFormBox/index.d.ts +1 -0
- package/dist/cjs/shared/boxes/DateSelectFormBox/interface.d.ts +21 -0
- package/dist/cjs/shared/boxes/InputFormBox/InputFormBox.d.ts +3 -0
- package/dist/cjs/shared/boxes/InputFormBox/InputFormEmailBox.d.ts +3 -0
- package/dist/cjs/shared/boxes/InputFormBox/InputFormLicenceBox.d.ts +3 -0
- package/dist/cjs/shared/boxes/InputFormBox/InputFormPhoneBox.d.ts +3 -0
- package/dist/cjs/shared/boxes/InputFormBox/index.d.ts +4 -0
- package/dist/cjs/shared/boxes/InputFormBox/interface.d.ts +14 -0
- package/dist/cjs/shared/boxes/LabelFormBox/LabelFormBox.d.ts +3 -0
- package/dist/cjs/shared/boxes/LabelFormBox/index.d.ts +1 -0
- package/dist/cjs/shared/boxes/LabelFormBox/interface.d.ts +10 -0
- package/dist/cjs/shared/boxes/SelectFormBox/SelectFormBox.d.ts +3 -0
- package/dist/cjs/shared/boxes/SelectFormBox/index.d.ts +1 -0
- package/dist/cjs/shared/boxes/SelectFormBox/interface.d.ts +12 -0
- package/dist/cjs/shared/boxes/SwitchButtonBox/SwitchButtonBox.d.ts +3 -0
- package/dist/cjs/shared/boxes/SwitchButtonBox/index.d.ts +1 -0
- package/dist/cjs/shared/boxes/SwitchButtonBox/interface.d.ts +10 -0
- package/dist/cjs/shared/boxes/index.d.ts +5 -0
- package/dist/cjs/shared/headers/HeaderDesktop/Mychoice.d.ts +3 -0
- package/dist/cjs/shared/headers/HeaderDesktop/Partner.d.ts +3 -0
- package/dist/cjs/shared/headers/HeaderDesktop/TheBig.d.ts +3 -0
- package/dist/cjs/shared/headers/HeaderDesktop/index.d.ts +3 -0
- package/dist/cjs/shared/headers/HeaderMobile/MyChoice.d.ts +3 -0
- package/dist/cjs/shared/headers/HeaderMobile/index.d.ts +1 -0
- package/dist/cjs/shared/headers/constants.d.ts +11 -0
- package/dist/cjs/shared/headers/index.d.ts +4 -0
- package/dist/cjs/shared/headers/interfaces.d.ts +8 -0
- package/dist/cjs/shared/index.d.ts +6 -0
- package/dist/cjs/shared/loaders/LoaderPrimary/LoaderPrimary.d.ts +2 -0
- package/dist/cjs/shared/loaders/LoaderPrimary/index.d.ts +1 -0
- package/dist/cjs/shared/loaders/index.d.ts +1 -0
- package/dist/cjs/shared/modals/ModalConfirm/ModalConfirm.d.ts +2 -0
- package/dist/cjs/shared/modals/ModalConfirm/index.d.ts +1 -0
- package/dist/cjs/shared/modals/ModalFinale/ModalFinale.d.ts +2 -0
- package/dist/cjs/shared/modals/ModalFinale/index.d.ts +1 -0
- package/dist/cjs/shared/modals/ModalMessage/ModalMessage.d.ts +2 -0
- package/dist/cjs/shared/modals/ModalMessage/index.d.ts +1 -0
- package/dist/cjs/shared/modals/ModalPostal/ModalPostal.d.ts +3 -0
- package/dist/cjs/shared/modals/ModalPostal/index.d.ts +1 -0
- package/dist/cjs/shared/modals/ModalQuoteRequest/ModalQuoteRequest.d.ts +3 -0
- package/dist/cjs/shared/modals/ModalQuoteRequest/index.d.ts +1 -0
- package/dist/cjs/shared/modals/index.d.ts +5 -0
- package/dist/cjs/shared/modals/interfaces.d.ts +21 -0
- package/dist/cjs/shared/navigations/NavigationBottom/NavigationBottom.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationBottom/NavigationBottomTheBig.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationBottom/index.d.ts +2 -0
- package/dist/cjs/shared/navigations/NavigationTab/NavigationTab.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationTab/NavigationTabMobile.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationTab/index.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationTab/interface.d.ts +18 -0
- package/dist/cjs/shared/navigations/NavigationTop/NavigationTop.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationTop/components/ButtonsBox.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationTop/components/PostalCodeDataBox.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationTop/components/StepsBox.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationTop/components/index.d.ts +3 -0
- package/dist/cjs/shared/navigations/NavigationTop/components/interface.d.ts +5 -0
- package/dist/cjs/shared/navigations/NavigationTop/index.d.ts +1 -0
- package/dist/cjs/shared/navigations/constants/index.d.ts +1 -0
- package/dist/cjs/shared/navigations/constants/insuranceSteps.d.ts +17 -0
- package/dist/cjs/shared/navigations/index.d.ts +5 -0
- package/dist/cjs/shared/navigations/interfaces.d.ts +34 -0
- package/dist/cjs/shared/sections/index.d.ts +1 -0
- package/dist/cjs/shared/sections/quotes/OfferSection/OfferSection.d.ts +3 -0
- package/dist/cjs/shared/sections/quotes/OfferSection/index.d.ts +1 -0
- package/dist/cjs/shared/sections/quotes/index.d.ts +1 -0
- package/dist/cjs/shared/sections/quotes/interfaces.d.ts +11 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +3138 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/init/AppConfig/AppConfig.d.ts +4 -0
- package/dist/esm/init/AppConfig/helper.d.ts +2 -0
- package/dist/esm/init/AppConfig/index.d.ts +1 -0
- package/dist/esm/init/AppConfig/interfaces.d.ts +5 -0
- package/dist/esm/init/AppContainer/AppContainer.d.ts +2 -0
- package/dist/esm/init/AppContainer/index.d.ts +1 -0
- package/dist/esm/init/AppHeader/AppHeader.d.ts +2 -0
- package/dist/esm/init/AppHeader/index.d.ts +1 -0
- package/dist/esm/init/AppLoader/AppLoader.d.ts +2 -0
- package/dist/esm/init/AppLoader/index.d.ts +1 -0
- package/dist/esm/init/AppModal/AppModal.d.ts +2 -0
- package/dist/esm/init/AppModal/index.d.ts +1 -0
- package/dist/esm/init/AppModal/interfaces.d.ts +4 -0
- package/dist/esm/init/AppRouterListener/AppRouterListener.d.ts +2 -0
- package/dist/esm/init/AppRouterListener/index.d.ts +1 -0
- package/dist/esm/init/AppRoutes/AppRoutes.d.ts +3 -0
- package/dist/esm/init/AppRoutes/BrokerKeys.d.ts +6 -0
- package/dist/esm/init/AppRoutes/hoox/useRedirectPartner.d.ts +5 -0
- package/dist/esm/init/AppRoutes/hoox/useRouteParams.d.ts +1 -0
- package/dist/esm/init/AppRoutes/index.d.ts +3 -0
- package/dist/esm/init/AppRoutes/routeTypes/RouteWrapperPrivate.d.ts +3 -0
- package/dist/esm/init/AppRoutes/routeTypes/RouteWrapperPublic.d.ts +3 -0
- package/dist/esm/init/AppRoutes/routeTypes/RouteWrapperRestricted.d.ts +3 -0
- package/dist/esm/init/AppRoutes/routeTypes/index.d.ts +3 -0
- package/dist/esm/init/AppRoutes/routeTypes/interface.d.ts +4 -0
- package/dist/esm/init/AppWrapper/AppWrapper.d.ts +3 -0
- package/dist/esm/init/AppWrapper/index.d.ts +1 -0
- package/dist/esm/init/AppWrapper/interfaces.d.ts +5 -0
- package/dist/esm/init/StoryAppWrapper/StoryAppWrapper.d.ts +3 -0
- package/dist/esm/init/StoryAppWrapper/index.d.ts +1 -0
- package/dist/esm/init/StoryAppWrapper/interfaces.d.ts +4 -0
- package/dist/esm/init/helper.d.ts +2 -0
- package/dist/esm/init/index.d.ts +3 -0
- package/dist/esm/insurances/car/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/discount/PageDiscount.d.ts +2 -0
- package/dist/esm/insurances/car/pages/discount/helpers.d.ts +2 -0
- package/dist/esm/insurances/car/pages/discount/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/discount/sections/SectionDiscountInfo.d.ts +2 -0
- package/dist/esm/insurances/car/pages/discount/sections/blocks/BlockNextPageInfo.d.ts +2 -0
- package/dist/esm/insurances/car/pages/discount/sections/blocks/BlockSubmit.d.ts +3 -0
- package/dist/esm/insurances/car/pages/discount/sections/blocks/BlockVehLinks.d.ts +2 -0
- package/dist/esm/insurances/car/pages/discount/sections/blocks/index.d.ts +3 -0
- package/dist/esm/insurances/car/pages/discount/sections/blocks/interfaces.d.ts +7 -0
- package/dist/esm/insurances/car/pages/discount/sections/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/driver/PageDriver.d.ts +2 -0
- package/dist/esm/insurances/car/pages/driver/TabDriver.d.ts +3 -0
- package/dist/esm/insurances/car/pages/driver/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverCancellation/SectionDriverCancellation.d.ts +2 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverCancellation/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverHistory/SectionDriverHistory.d.ts +2 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverHistory/blocks/BlockDriverAccident.d.ts +2 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverHistory/blocks/BlockDriverSuspension.d.ts +2 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverHistory/blocks/BlockDriverTicket.d.ts +2 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverHistory/blocks/index.d.ts +3 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverHistory/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverInfo/SectionDriverInfo.d.ts +2 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverInfo/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverInsurancePolicy/SectionDriverInsurancePolicy.d.ts +2 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverInsurancePolicy/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverLicence/SectionDriverLicence.d.ts +2 -0
- package/dist/esm/insurances/car/pages/driver/sections/SectionDriverLicence/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/driver/sections/index.d.ts +5 -0
- package/dist/esm/insurances/car/pages/helpers.d.ts +7 -0
- package/dist/esm/insurances/car/pages/index.d.ts +6 -0
- package/dist/esm/insurances/car/pages/interfaces.d.ts +9 -0
- package/dist/esm/insurances/car/pages/quote/PageQuote.d.ts +2 -0
- package/dist/esm/insurances/car/pages/quote/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/quote/sections/SectionQuoteEdit.d.ts +2 -0
- package/dist/esm/insurances/car/pages/quote/sections/SectionQuoteRecalc.d.ts +2 -0
- package/dist/esm/insurances/car/pages/quote/sections/SplashScreen.d.ts +2 -0
- package/dist/esm/insurances/car/pages/quote/sections/blocks/BlockEndorsements.d.ts +3 -0
- package/dist/esm/insurances/car/pages/quote/sections/index.d.ts +2 -0
- package/dist/esm/insurances/car/pages/vehicle/PageVehicle.d.ts +2 -0
- package/dist/esm/insurances/car/pages/vehicle/TabVehicle.d.ts +3 -0
- package/dist/esm/insurances/car/pages/vehicle/helpers.d.ts +3 -0
- package/dist/esm/insurances/car/pages/vehicle/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/vehicle/sections/SectionCoverage.d.ts +2 -0
- package/dist/esm/insurances/car/pages/vehicle/sections/SectionMain.d.ts +2 -0
- package/dist/esm/insurances/car/pages/vehicle/sections/blocks/BlockCarConditionInfo.d.ts +2 -0
- package/dist/esm/insurances/car/pages/vehicle/sections/blocks/BlockCarInfo.d.ts +2 -0
- package/dist/esm/insurances/car/pages/vehicle/sections/blocks/index.d.ts +2 -0
- package/dist/esm/insurances/car/pages/vehicle/sections/index.d.ts +2 -0
- package/dist/esm/insurances/helpers.d.ts +11 -0
- package/dist/esm/insurances/home/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/address/PageAddress.d.ts +2 -0
- package/dist/esm/insurances/home/pages/address/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/address/sections/SectionAddress.d.ts +2 -0
- package/dist/esm/insurances/home/pages/address/sections/blocks/BlockAddressInfo.d.ts +2 -0
- package/dist/esm/insurances/home/pages/address/sections/blocks/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/address/sections/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/applicant/PageApplicant.d.ts +2 -0
- package/dist/esm/insurances/home/pages/applicant/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/applicant/sections/SectionApplicantCancellation/SectionApplicantCancellation.d.ts +2 -0
- package/dist/esm/insurances/home/pages/applicant/sections/SectionApplicantCancellation/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/applicant/sections/SectionApplicantClaim/SectionApplicantClaim.d.ts +2 -0
- package/dist/esm/insurances/home/pages/applicant/sections/SectionApplicantClaim/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/applicant/sections/SectionApplicantInfo/SectionApplicantInfo.d.ts +2 -0
- package/dist/esm/insurances/home/pages/applicant/sections/SectionApplicantInfo/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/applicant/sections/SectionApplicantInsurancePolicy/SectionApplicantInsurancePolicy.d.ts +2 -0
- package/dist/esm/insurances/home/pages/applicant/sections/SectionApplicantInsurancePolicy/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/applicant/sections/index.d.ts +4 -0
- package/dist/esm/insurances/home/pages/discount/PageDiscount.d.ts +2 -0
- package/dist/esm/insurances/home/pages/discount/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/discount/sections/SectionDiscountInfo.d.ts +2 -0
- package/dist/esm/insurances/home/pages/discount/sections/blocks/BlockDwellingInfo.d.ts +2 -0
- package/dist/esm/insurances/home/pages/discount/sections/blocks/BlockNextPageInfo.d.ts +2 -0
- package/dist/esm/insurances/home/pages/discount/sections/blocks/BlockSubmit.d.ts +3 -0
- package/dist/esm/insurances/home/pages/discount/sections/blocks/index.d.ts +3 -0
- package/dist/esm/insurances/home/pages/discount/sections/blocks/interfaces.d.ts +7 -0
- package/dist/esm/insurances/home/pages/discount/sections/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/dwelling/PageProperty.d.ts +2 -0
- package/dist/esm/insurances/home/pages/dwelling/helpers.d.ts +3 -0
- package/dist/esm/insurances/home/pages/dwelling/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/dwelling/sections/SectionDwelling.d.ts +2 -0
- package/dist/esm/insurances/home/pages/dwelling/sections/index.d.ts +1 -0
- package/dist/esm/insurances/home/pages/helpers.d.ts +4 -0
- package/dist/esm/insurances/home/pages/index.d.ts +4 -0
- package/dist/esm/insurances/index.d.ts +3 -0
- package/dist/esm/shared/boxes/Container/Container.d.ts +3 -0
- package/dist/esm/shared/boxes/Container/index.d.ts +2 -0
- package/dist/esm/shared/boxes/Container/interface.d.ts +7 -0
- package/dist/esm/shared/boxes/DateSelectFormBox/DateSelectFormBox.d.ts +3 -0
- package/dist/esm/shared/boxes/DateSelectFormBox/index.d.ts +1 -0
- package/dist/esm/shared/boxes/DateSelectFormBox/interface.d.ts +21 -0
- package/dist/esm/shared/boxes/InputFormBox/InputFormBox.d.ts +3 -0
- package/dist/esm/shared/boxes/InputFormBox/InputFormEmailBox.d.ts +3 -0
- package/dist/esm/shared/boxes/InputFormBox/InputFormLicenceBox.d.ts +3 -0
- package/dist/esm/shared/boxes/InputFormBox/InputFormPhoneBox.d.ts +3 -0
- package/dist/esm/shared/boxes/InputFormBox/index.d.ts +4 -0
- package/dist/esm/shared/boxes/InputFormBox/interface.d.ts +14 -0
- package/dist/esm/shared/boxes/LabelFormBox/LabelFormBox.d.ts +3 -0
- package/dist/esm/shared/boxes/LabelFormBox/index.d.ts +1 -0
- package/dist/esm/shared/boxes/LabelFormBox/interface.d.ts +10 -0
- package/dist/esm/shared/boxes/SelectFormBox/SelectFormBox.d.ts +3 -0
- package/dist/esm/shared/boxes/SelectFormBox/index.d.ts +1 -0
- package/dist/esm/shared/boxes/SelectFormBox/interface.d.ts +12 -0
- package/dist/esm/shared/boxes/SwitchButtonBox/SwitchButtonBox.d.ts +3 -0
- package/dist/esm/shared/boxes/SwitchButtonBox/index.d.ts +1 -0
- package/dist/esm/shared/boxes/SwitchButtonBox/interface.d.ts +10 -0
- package/dist/esm/shared/boxes/index.d.ts +5 -0
- package/dist/esm/shared/headers/HeaderDesktop/Mychoice.d.ts +3 -0
- package/dist/esm/shared/headers/HeaderDesktop/Partner.d.ts +3 -0
- package/dist/esm/shared/headers/HeaderDesktop/TheBig.d.ts +3 -0
- package/dist/esm/shared/headers/HeaderDesktop/index.d.ts +3 -0
- package/dist/esm/shared/headers/HeaderMobile/MyChoice.d.ts +3 -0
- package/dist/esm/shared/headers/HeaderMobile/index.d.ts +1 -0
- package/dist/esm/shared/headers/constants.d.ts +11 -0
- package/dist/esm/shared/headers/index.d.ts +4 -0
- package/dist/esm/shared/headers/interfaces.d.ts +8 -0
- package/dist/esm/shared/index.d.ts +6 -0
- package/dist/esm/shared/loaders/LoaderPrimary/LoaderPrimary.d.ts +2 -0
- package/dist/esm/shared/loaders/LoaderPrimary/index.d.ts +1 -0
- package/dist/esm/shared/loaders/index.d.ts +1 -0
- package/dist/esm/shared/modals/ModalConfirm/ModalConfirm.d.ts +2 -0
- package/dist/esm/shared/modals/ModalConfirm/index.d.ts +1 -0
- package/dist/esm/shared/modals/ModalFinale/ModalFinale.d.ts +2 -0
- package/dist/esm/shared/modals/ModalFinale/index.d.ts +1 -0
- package/dist/esm/shared/modals/ModalMessage/ModalMessage.d.ts +2 -0
- package/dist/esm/shared/modals/ModalMessage/index.d.ts +1 -0
- package/dist/esm/shared/modals/ModalPostal/ModalPostal.d.ts +3 -0
- package/dist/esm/shared/modals/ModalPostal/index.d.ts +1 -0
- package/dist/esm/shared/modals/ModalQuoteRequest/ModalQuoteRequest.d.ts +3 -0
- package/dist/esm/shared/modals/ModalQuoteRequest/index.d.ts +1 -0
- package/dist/esm/shared/modals/index.d.ts +5 -0
- package/dist/esm/shared/modals/interfaces.d.ts +21 -0
- package/dist/esm/shared/navigations/NavigationBottom/NavigationBottom.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationBottom/NavigationBottomTheBig.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationBottom/index.d.ts +2 -0
- package/dist/esm/shared/navigations/NavigationTab/NavigationTab.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationTab/NavigationTabMobile.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationTab/index.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationTab/interface.d.ts +18 -0
- package/dist/esm/shared/navigations/NavigationTop/NavigationTop.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationTop/components/ButtonsBox.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationTop/components/PostalCodeDataBox.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationTop/components/StepsBox.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationTop/components/index.d.ts +3 -0
- package/dist/esm/shared/navigations/NavigationTop/components/interface.d.ts +5 -0
- package/dist/esm/shared/navigations/NavigationTop/index.d.ts +1 -0
- package/dist/esm/shared/navigations/constants/index.d.ts +1 -0
- package/dist/esm/shared/navigations/constants/insuranceSteps.d.ts +17 -0
- package/dist/esm/shared/navigations/index.d.ts +5 -0
- package/dist/esm/shared/navigations/interfaces.d.ts +34 -0
- package/dist/esm/shared/sections/index.d.ts +1 -0
- package/dist/esm/shared/sections/quotes/OfferSection/OfferSection.d.ts +3 -0
- package/dist/esm/shared/sections/quotes/OfferSection/index.d.ts +1 -0
- package/dist/esm/shared/sections/quotes/index.d.ts +1 -0
- package/dist/esm/shared/sections/quotes/interfaces.d.ts +11 -0
- package/dist/images/logotype-mychoice-primary.png +0 -0
- package/dist/images/logotype-thebig-primary.png +0 -0
- package/dist/images/pigLoader.mp4 +0 -0
- package/dist/images/powered-by-mychoice.png +0 -0
- package/dist/index.d.ts +292 -0
- package/package.json +40 -0
|
@@ -0,0 +1,3194 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var mychoiceSdkComponents = require('@mychoice/mychoice-sdk-components');
|
|
7
|
+
var mychoiceSdkStore = require('@mychoice/mychoice-sdk-store');
|
|
8
|
+
var reactRouterDom = require('react-router-dom');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var TagManager = require('react-gtm-module');
|
|
11
|
+
require('react-phone-input-2/lib/style.css');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
var TagManager__default = /*#__PURE__*/_interopDefaultLegacy(TagManager);
|
|
17
|
+
|
|
18
|
+
const LabelFormBox = (props) => {
|
|
19
|
+
const { name, className, title, subTitle, description, isRemovable, onIconClick, isActive, } = props;
|
|
20
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
21
|
+
const isThebig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
22
|
+
return (jsxRuntime.jsxs("div", { className: `label-container ${className}`, children: [jsxRuntime.jsx(mychoiceSdkComponents.TitleForm, { className: isThebig ? 'thebig-medium' : '', title: title, subTitle: subTitle, isActive: isActive }), (name && description)
|
|
23
|
+
&& jsxRuntime.jsx(mychoiceSdkComponents.TooltipForm, { id: `${name.toLowerCase()}-tooltip`, description: description }), isRemovable
|
|
24
|
+
&& (jsxRuntime.jsx(mychoiceSdkComponents.IconDelete, { className: "icon-label-delete", onClick: onIconClick, color: mychoiceSdkComponents.ColorVariablesTypes.Primary, height: "1.125rem", width: "1.125rem" }))] }));
|
|
25
|
+
};
|
|
26
|
+
LabelFormBox.defaultProps = {
|
|
27
|
+
className: '',
|
|
28
|
+
isActive: false,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const Container = (props) => {
|
|
32
|
+
const { name, className, title, subTitle, description, isRemovable, onIconClick, errorMessage, hintMessage, children, } = props;
|
|
33
|
+
return (jsxRuntime.jsxs("div", { className: `input-form-box-container ${className}`, children: [title && name ? (jsxRuntime.jsx(LabelFormBox, { name: name, title: title, subTitle: subTitle, description: description, isRemovable: isRemovable, onIconClick: onIconClick })) : '', children, errorMessage && jsxRuntime.jsx("p", { className: "error-message", children: errorMessage }), hintMessage && jsxRuntime.jsx("p", { className: "hint-message", children: hintMessage })] }));
|
|
34
|
+
};
|
|
35
|
+
Container.defaultProps = {
|
|
36
|
+
name: '',
|
|
37
|
+
className: '',
|
|
38
|
+
title: '',
|
|
39
|
+
subTitle: '',
|
|
40
|
+
description: '',
|
|
41
|
+
errorMessage: '',
|
|
42
|
+
hintMessage: '',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const InputFormBox = (props) => {
|
|
46
|
+
const { className, defaultValue, placeholder, disabled, error, name, title, subTitle, description, onChange, errorMessage, hintMessage, type, minValue, maxValue, } = props;
|
|
47
|
+
return (jsxRuntime.jsx(Container, { name: name, className: ` ${className} ${error ? 'error' : ''}`, title: title, subTitle: subTitle, description: description, errorMessage: errorMessage, hintMessage: hintMessage, children: jsxRuntime.jsx(mychoiceSdkComponents.InputForm, { className: "input-form", name: name, type: type, defaultValue: defaultValue, onChange: onChange, placeholder: placeholder, disabled: disabled, minValue: minValue, maxValue: maxValue }) }));
|
|
48
|
+
};
|
|
49
|
+
InputFormBox.defaultProps = {
|
|
50
|
+
className: '',
|
|
51
|
+
type: mychoiceSdkComponents.InputTypes.Text,
|
|
52
|
+
title: '',
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const InputFormPhoneBox = (props) => {
|
|
56
|
+
const { className, defaultValue, placeholder, disabled, error, name, title, onChange, errorMessage, hintMessage, } = props;
|
|
57
|
+
return (jsxRuntime.jsx(Container, { name: name, className: ` ${className} ${error ? 'error' : ''}`, title: title, errorMessage: errorMessage, hintMessage: hintMessage, children: jsxRuntime.jsx(mychoiceSdkComponents.InputFormPhone, { className: "input-form", name: name, type: mychoiceSdkComponents.InputTypes.Text, defaultValue: defaultValue, onChange: onChange, placeholder: placeholder, disabled: disabled }) }));
|
|
58
|
+
};
|
|
59
|
+
InputFormPhoneBox.defaultProps = {
|
|
60
|
+
className: '',
|
|
61
|
+
title: '',
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const InputFormEmailBox = (props) => {
|
|
65
|
+
const { className, defaultValue, placeholder, disabled, error, name, title, onChange, errorMessage, hintMessage, description, validationStatus, } = props;
|
|
66
|
+
return (jsxRuntime.jsx(Container, { name: name, className: ` ${className} ${error ? 'error' : ''}`, title: title, errorMessage: errorMessage, hintMessage: hintMessage, description: description, children: jsxRuntime.jsx(mychoiceSdkComponents.InputFormEmail, { name: name, defaultValue: defaultValue, onChange: onChange, placeholder: placeholder, disabled: disabled, validationStatus: validationStatus, error: error }) }));
|
|
67
|
+
};
|
|
68
|
+
InputFormEmailBox.defaultProps = {
|
|
69
|
+
className: '',
|
|
70
|
+
title: '',
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const InputFormLicenceBox = (props) => {
|
|
74
|
+
const { className, defaultValue, placeholder, disabled, error, name, title, description, onChange, errorMessage, hintMessage, maxLength, } = props;
|
|
75
|
+
return (jsxRuntime.jsx(Container, { name: name, className: ` ${className} ${error ? 'error' : ''}`, title: title, description: description, errorMessage: errorMessage, hintMessage: hintMessage, children: jsxRuntime.jsx(mychoiceSdkComponents.InputFormLicence, { className: "input-form", name: name, type: mychoiceSdkComponents.InputTypes.Text, defaultValue: defaultValue, onChange: onChange, placeholder: placeholder, disabled: disabled, maxLength: maxLength }) }));
|
|
76
|
+
};
|
|
77
|
+
InputFormLicenceBox.defaultProps = {
|
|
78
|
+
className: '',
|
|
79
|
+
title: '',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const SelectFormBox = (props) => {
|
|
83
|
+
const { className, defaultValue, disabled, error, name, title, description, onChange, errorMessage, hintMessage, isRemovable, onIconClick, options, groupOptions, placeholder, autoSelectIfValueIsOutOfOptions, } = props;
|
|
84
|
+
return (jsxRuntime.jsx(Container, { name: name, className: ` ${className} ${error ? 'error' : ''}`, title: title, description: description, errorMessage: errorMessage, hintMessage: hintMessage, isRemovable: isRemovable, onIconClick: onIconClick, children: jsxRuntime.jsx(mychoiceSdkComponents.SelectForm, { className: "input-form", name: name, defaultValue: defaultValue, onChange: onChange, options: options || [], groupOptions: groupOptions || [], placeholder: placeholder, disabled: disabled, autoSelectIfValueIsOutOfOptions: autoSelectIfValueIsOutOfOptions }) }));
|
|
85
|
+
};
|
|
86
|
+
SelectFormBox.defaultProps = {
|
|
87
|
+
className: '',
|
|
88
|
+
title: '',
|
|
89
|
+
autoSelectIfValueIsOutOfOptions: true,
|
|
90
|
+
groupOptions: [],
|
|
91
|
+
options: [],
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const DateSelectFormBox = (props) => {
|
|
95
|
+
const { className, defaultValue, disabled, name, dateNames, // this is need for scrolling after validation
|
|
96
|
+
datePlaceholders, title, description, onDateChange, isRemovable, onIconClick, errorMessage, hintMessage, isDay, isMonth, maxDate, minDate, error, } = props;
|
|
97
|
+
const { day, month, year } = defaultValue;
|
|
98
|
+
const isError = !disabled && error;
|
|
99
|
+
return (jsxRuntime.jsx(Container, { name: name, className: className, title: title, description: description, errorMessage: errorMessage, hintMessage: hintMessage, isRemovable: isRemovable, onIconClick: onIconClick, children: jsxRuntime.jsxs("div", { className: "date-content", children: [isDay && (jsxRuntime.jsx(mychoiceSdkComponents.SelectForm, { className: "input-form day-select", name: dateNames[2], defaultValue: day, onChange: onDateChange(mychoiceSdkComponents.DateTypes.Day), options: mychoiceSdkComponents.getDateOptions(mychoiceSdkComponents.DateTypes.Day, minDate, maxDate, defaultValue), placeholder: (datePlaceholders && datePlaceholders[2]) || 'Day', disabled: disabled, error: !day && isError, autoSelectIfValueIsOutOfOptions: !!day })), isMonth && (jsxRuntime.jsx(mychoiceSdkComponents.SelectForm, { className: "input-form month-select", name: dateNames[1], defaultValue: month, onChange: onDateChange(mychoiceSdkComponents.DateTypes.Month), options: mychoiceSdkComponents.getDateOptions(mychoiceSdkComponents.DateTypes.Month, minDate, maxDate, defaultValue), placeholder: (datePlaceholders && datePlaceholders[1]) || 'Month', disabled: disabled, error: !month && isError, autoSelectIfValueIsOutOfOptions: !!month })), jsxRuntime.jsx(mychoiceSdkComponents.SelectForm, { className: "input-form year-select", name: dateNames[0], defaultValue: year, onChange: onDateChange(mychoiceSdkComponents.DateTypes.Year), options: mychoiceSdkComponents.getDateOptions(mychoiceSdkComponents.DateTypes.Year, minDate, maxDate, defaultValue), placeholder: (datePlaceholders && datePlaceholders[0]) || 'Year', disabled: disabled, error: !year && isError, autoSelectIfValueIsOutOfOptions: !!year })] }) }));
|
|
100
|
+
};
|
|
101
|
+
DateSelectFormBox.defaultProps = {
|
|
102
|
+
isDay: false,
|
|
103
|
+
isMonth: true,
|
|
104
|
+
className: '',
|
|
105
|
+
dateNames: ['year', 'month', 'day'],
|
|
106
|
+
datePlaceholders: [],
|
|
107
|
+
title: '',
|
|
108
|
+
autoSelectIfValueIsOutOfOptions: true,
|
|
109
|
+
options: [],
|
|
110
|
+
minDate: mychoiceSdkComponents.getFormattedDate('1922-01-01', 'yyyy-MM-dd'),
|
|
111
|
+
maxDate: mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd'),
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const SwitchButtonBox = (props) => {
|
|
115
|
+
const { name, title, description, hintMessage, isRemovable, errorMessage, className, defaultValue, items, onChange, } = props;
|
|
116
|
+
const [activeId, setActiveId] = React.useState(defaultValue);
|
|
117
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
118
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
119
|
+
const setClassNames = (isActive) => {
|
|
120
|
+
if (isTheBig) {
|
|
121
|
+
return isActive ? 'thebig-bold' : 'thebig-regular';
|
|
122
|
+
}
|
|
123
|
+
return '';
|
|
124
|
+
};
|
|
125
|
+
const handleClick = React.useCallback((selectedItem) => () => {
|
|
126
|
+
setActiveId(selectedItem.value);
|
|
127
|
+
if (onChange) {
|
|
128
|
+
onChange({
|
|
129
|
+
name,
|
|
130
|
+
value: selectedItem.value,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}, []);
|
|
134
|
+
return (jsxRuntime.jsx(Container, { name: name, className: className, title: title, description: description, errorMessage: errorMessage, isRemovable: isRemovable, hintMessage: hintMessage, children: jsxRuntime.jsx("div", { className: "flex-items-container", children: items.map((item, index) => (jsxRuntime.jsx(mychoiceSdkComponents.ButtonForm, { className: setClassNames(item.value === activeId), onClick: handleClick(item), selected: item.value === activeId, label: item.name }, `${item.name}_${index}`))) }) }));
|
|
135
|
+
};
|
|
136
|
+
SwitchButtonBox.defaultProps = {
|
|
137
|
+
defaultValue: '',
|
|
138
|
+
items: [],
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, isBestOffer, operationHours = {}, redirectUrl, }) => {
|
|
142
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
143
|
+
const { postRequestQuoteOnliaUrl } = mychoiceSdkStore.QuoteDataHandler();
|
|
144
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
145
|
+
const { weekdayHours, saturdayHours, sundayHours } = operationHours;
|
|
146
|
+
const [detailsIsOpen, setDetailsIsOpenIsOpen] = React.useState(false);
|
|
147
|
+
const handleDropdownClick = () => {
|
|
148
|
+
setDetailsIsOpenIsOpen(!detailsIsOpen);
|
|
149
|
+
};
|
|
150
|
+
return (jsxRuntime.jsxs("div", { className: "offer-section", children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferHeader, { className: isTheBig ? 'thebig-bold' : '', companyName: offerCompany?.name, isBestOffer: isBestOffer }), jsxRuntime.jsx(mychoiceSdkComponents.OfferPrice, { className: isTheBig ? 'thebig' : '', companyLogo: offerCompany?.logo, price: offerPrice }), !isTheBig && redirectUrl
|
|
151
|
+
? (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { children: "Click below to get this rate" }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "offer-phone-number", label: "Get details", type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: () => {
|
|
152
|
+
postRequestQuoteOnliaUrl(true, redirectUrl);
|
|
153
|
+
} })] })) : (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { className: isTheBig ? 'thebig-bold' : '', children: "Call now to get this rate" }), jsxRuntime.jsx("a", { target: "_blank", rel: "noreferrer noopener", href: `tel:${phoneNumber?.number}`, children: jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `${isTheBig ? 'thebig-bold' : ''} offer-phone-number`, label: phoneNumber?.title, type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium }) })] })), jsxRuntime.jsxs("button", { className: "dropdown", onClick: handleDropdownClick, children: [jsxRuntime.jsx("span", { children: detailsIsOpen ? 'Less Info' : 'More Info' }), jsxRuntime.jsx(mychoiceSdkComponents.IconDropdownArrow, { color: "grey", className: detailsIsOpen ? 'rotated' : '' })] }), detailsIsOpen && (jsxRuntime.jsxs("div", { className: "offer-details", children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: offerCompany?.name, companyType: mychoiceSdkComponents.CompanyRoleTypes.Offering, description: offerCompany?.description }), jsxRuntime.jsx("hr", {}), (isTheBig || !redirectUrl)
|
|
154
|
+
&& (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', logo: brokerCompany?.logo, name: brokerCompany?.title, companyType: mychoiceSdkComponents.CompanyRoleTypes.Broker, description: brokerCompany?.description }), jsxRuntime.jsx("hr", {})] })), jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: "Hours of Operation", children: jsxRuntime.jsx(mychoiceSdkComponents.OperationHoursInfo, { weekdayHours: weekdayHours, saturdayHours: saturdayHours, sundayHours: sundayHours }) })] }))] }));
|
|
155
|
+
};
|
|
156
|
+
OfferSection.defaultProps = {
|
|
157
|
+
offerPrice: { monthly: 0, yearly: 0 },
|
|
158
|
+
operationHours: {},
|
|
159
|
+
redirectUrl: '',
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
var logo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABXgAAAEzCAMAAAC8BZu5AAAAq1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Nr6iZAAAAOHRSTlMAQODxEJCg+gUwwPdwCNrQAiI17FAcFAwr6HmvW5VDSdV/yapW5KWbJrkYiHRgs4NsZDtpjcTNvSddkcQAACntSURBVHja7N3ZjtpAEIXhAoMMZjAO27DDDPs2LDaZev8ny0UioWTotgFHkZz/u2/VXal0ulUtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyIJCfXbavR2K27deODu3SgIA+Guq5Wji6u9cv39obgQAkLZSJ1Izf9ksCAAgNYXBXOO467AtAIAUvO66mozbbwYCAHhO7kPvkd8ROQDAM8YXvZezJXEAgEfVPX2Ec2DqBYBHbBb6qG5I1gsA9wpeHH3C97IAAO6xuuhz3KgqAIDEThV92oShFwCSep1qGiqhAACS+DbRlCyIGwAggZyjqXlnfQ4AxBq4mqJ5RwAAVqGmyzkLAMBip2mrjAQAYHRU/bed9/UcHorFbZjjWg7A/2GvScwvi2UxipbTz7wm4dQlmcLRc6/rfQf0XgDZN3Y1RndxrJf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ofBkQQMBxfwnG3jtkfFO96BMcb04C1JoOUhB78zbTZ2LYuuYnzgZQbGmEb2Lp3XxJctbl26ntaCs8sY04vTorMifJG/pOtpT/nDaj/Yu7fktIEgCsNtQRAEhLnK5mbuYAQ2BAzp/a8slTw4ZSGYGcCuAv/fAvTYNdXVOgfA9Xno6FFpcVPQL5Ja1K+3pRPAN3fn6RE1cVPUrzDNXWlNHACYH70dx2/paVKTllradtMCANcuN9BDeuIk1BP4rVEgUvBtLhgi9gsAbsRLUQ+IxEXWV0f+66+0/LP29Kj5IwcMAG5Jtr3VRO3P3PHmW+20vAvmvh7QWnO/AOAGPS893ZcRJ1u11pjWAvmoPPV1jzcKBQBuVKnW0zhPnNyrncGyUpIEYeHD6Pb7ZfYLAG5b8NvQPWkQ5NWskWmHcli628zMfv7cDgssdQF8B88atxIHbTWotlZE2gDAB68a8yr2Qk+PaAxXOa7BAMD4Zs1nxVa00wP8XaddFgBAgrSvMU9i52FV1SS9TGHNH74AcNhAY+Ziof4yTGmCfoUDXAAw+KEx92IQPL31NFlPAAAmI7e/hh8Ls7wetBAAgElkPz3DUWasx6QIEgOAU+IWitnE/cJyoCZzAQCYZYxP3lKlOcurWZWQBQCwsdE4/0n+K2+GVbWzEQCAhbru8ReB/BW2p55amwkAwMpO91WHy+Wkpy7GkQAArDT1ElI5AQDYiXw9X+pOAAC2Jnq2RkUAANaefT3Tti4AAAdTPUu+SXUEALgJq3qGCcm7AOCspqdKFciBBIBTdPQUuy5TFwBOVJqpo+qmTqEaAJxX9O5gThM7AJwtmKmd1pr9AgBcROlNjYojkh8B4IK64+PXumWWugBwYQ9veU02qdDYDgCfIpo3NO6+RpUaAHyibK3j6bsxR2MA8BXSdy+Lfn/RjRi6AAAAAAAAAAAA+NMeHJAAAAAACPr/uh2BCgAAPARR5XqJ8H4ZmQAAAABJRU5ErkJggg==";
|
|
163
|
+
|
|
164
|
+
const usePathGroups = (insuranceType) => {
|
|
165
|
+
const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
166
|
+
const insurancePathGroup = {
|
|
167
|
+
[`${mychoiceSdkComponents.InsuranceTypes.Car}`]: [{ name: 'Car', link: `/${appConfigState.localIndex}/car` }],
|
|
168
|
+
[`${mychoiceSdkComponents.InsuranceTypes.Home}`]: [{ name: 'Home', link: `/${appConfigState.localIndex}/home` }],
|
|
169
|
+
// @todo: will be used in future
|
|
170
|
+
// [`${InsuranceTypes.Life}`]: [{ name: 'Life', link: `/${appConfigState.localIndex}/life` }],
|
|
171
|
+
};
|
|
172
|
+
const externalPathGroup = [
|
|
173
|
+
{ name: 'Blog', link: 'https://www.mychoice.ca/blog/' },
|
|
174
|
+
{ name: 'About us', link: 'https://www.mychoice.ca/about-us/' },
|
|
175
|
+
{ name: 'Contact', link: 'https://www.mychoice.ca/contact/' },
|
|
176
|
+
];
|
|
177
|
+
// @todo: use in future.
|
|
178
|
+
// const loggedOutPathGroup = [
|
|
179
|
+
// { name: 'Login', link: '/accounts/signin' },
|
|
180
|
+
// { name: 'Signup', link: '/accounts/signup' },
|
|
181
|
+
// ];
|
|
182
|
+
//
|
|
183
|
+
// const loggedInPathGroup = [
|
|
184
|
+
// { name: 'My Profile', link: '/accounts/myProfile' },
|
|
185
|
+
// { name: 'Quotes History', link: '/accounts/quotes/history' },
|
|
186
|
+
// { name: 'Logout', link: '/accounts/logout' },
|
|
187
|
+
// ];
|
|
188
|
+
return {
|
|
189
|
+
insurancePathGroup: insurancePathGroup[insuranceType],
|
|
190
|
+
externalPathGroup,
|
|
191
|
+
// loggedOutPathGroup,
|
|
192
|
+
// loggedInPathGroup,
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
const HeaderMyChoice = ({ className, }) => {
|
|
197
|
+
// const isLoggedIn = true;
|
|
198
|
+
const { appConfigState: { insuranceType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
199
|
+
const { externalPathGroup, insurancePathGroup } = usePathGroups(insuranceType);
|
|
200
|
+
return (jsxRuntime.jsx("div", { className: `${className} primary-header`, children: jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("a", { href: "https://www.mychoice.ca/", rel: "noreferrer", children: jsxRuntime.jsx("img", { src: logo, alt: "logotype" }) }) }), jsxRuntime.jsxs("div", { className: "nav-links", children: [jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { navItems: insurancePathGroup }), jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { navItems: externalPathGroup, isExternal: true })] })] }) }));
|
|
201
|
+
};
|
|
202
|
+
HeaderMyChoice.defaultProps = {
|
|
203
|
+
className: '',
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
const HeaderPartner = ({ className }) => {
|
|
207
|
+
const { partnerState } = mychoiceSdkStore.useStorePartner();
|
|
208
|
+
return (jsxRuntime.jsx("div", { className: `${className} primary-header-partner`, children: jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx("a", { href: partnerState.redirectUrl || 'https://www.mychoice.ca/', target: "_blank", rel: "noreferrer", children: jsxRuntime.jsx("img", { src: partnerState.logo || 'https://s3.amazonaws.com/mychoice-logos-dev/partners/newpartner/AE1C9160-F0AD-4969-BEBB-86EBFA7CF2E7.png', alt: "new-partner-logotype" }) }), jsxRuntime.jsx("div", {})] }) }));
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
var theBigLogotype = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAxkAAADkCAYAAAD0B+mlAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAMX9JREFUeNrsnd1V5MiWtqNmzfXAWEC2BVAWpMoCaAtSrHW+68qyAGFBJddzQWJBgwUICzqxoBMLBj4HzmjDVnc2DZkRUoQiQvk8a2lRp49SP/Gn/Ubs2PvLy7+OC2PMvQEAgFHwX/+z+kIpAABATP6DIgAAAAAAAEQGAAAAAAAg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T5fcGaXHe6/VIG9F352Hyz7qtSZaD+tI5brSlbOvPdtXK5a+qssdqxcAnzBknozChw8pAACMWmyIC82rG41GUZJDZtgl2dtnmaNlBUSM15UedQYrFtso9X1scmfIRvql5zp41msuNcleWweF1sPxFkEhv6036uE5sfa10vLdbF+FCqujLW2r1vep6aUAdnx5+dexdK57igIAYDSG+hdKAQAAYoK7FAAAAAAAIDIAAAAAAACRAQAAAAAAiAwAAAAAAABEBgAAAAAAIDIAAAAAAACRAQAAAAAAgMgAAAAAAABEBgAAAAAAIDIAAAAAAACRAQAAAAAAgMgAAAAAAABEBgAAAAAAIDIAAAAAAAAQGQAAAAAAgMgAAAAAAABEBgAAAAAAACIDAAAAAAAQGQAAAAAAgMgAAAAAAABEBgAAAAAAACIDAAAAAAAQGQAAAAAAgMgAAAAAAABAZAAAAAAAQCT+szmem+OBogAAAAAAAB/8nwADAP5wJPS5nm4vAAAAAElFTkSuQmCC";
|
|
212
|
+
|
|
213
|
+
const HeaderTheBig = ({ textBack, className, }) => (jsxRuntime.jsx("div", { className: `${className} primary-header-thebig`, children: jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("img", { src: theBigLogotype, alt: "thebig-logotype" }) }), jsxRuntime.jsx("a", { href: "https://www.thebig.ca/", target: "_blank", rel: "noreferrer", children: jsxRuntime.jsxs("div", { className: "back-button", children: [jsxRuntime.jsx("div", { className: "back-icon" }), jsxRuntime.jsx("h2", { children: textBack })] }) })] }) }));
|
|
214
|
+
HeaderTheBig.defaultProps = {
|
|
215
|
+
className: '',
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const HeaderMyChoiceMobile = ({ className, }) => {
|
|
219
|
+
const { appConfigState: { insuranceType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
220
|
+
const { externalPathGroup, insurancePathGroup } = usePathGroups(insuranceType);
|
|
221
|
+
const [isMenuOpen, setIsMenuOpen] = React.useState(false);
|
|
222
|
+
const handleMenuClick = () => {
|
|
223
|
+
setIsMenuOpen(!isMenuOpen);
|
|
224
|
+
};
|
|
225
|
+
// const isLoggedIn = true;
|
|
226
|
+
return (jsxRuntime.jsxs("div", { className: `${className} ${isMenuOpen ? 'open' : ''} primary-header-mobile`, children: [jsxRuntime.jsxs("div", { className: "content-mobile", children: [jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("a", { href: "https://www.mychoice.ca/", target: "_blank", rel: "noreferrer", children: jsxRuntime.jsx("img", { src: logo, alt: "logotype" }) }) }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonMenu, { className: `${className} ${isMenuOpen ? 'is-active' : ''}`, onClick: handleMenuClick })] }), isMenuOpen && (jsxRuntime.jsx("div", { className: "menu-items", children: jsxRuntime.jsxs("div", { className: "nav-links", children: [jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { navItems: insurancePathGroup }), jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { navItems: externalPathGroup })] }) }))] }));
|
|
227
|
+
};
|
|
228
|
+
HeaderMyChoiceMobile.defaultProps = {
|
|
229
|
+
className: '',
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
const LoaderPrimary = () => {
|
|
233
|
+
const { appLoaderState } = mychoiceSdkStore.useStoreAppLoader();
|
|
234
|
+
return (jsxRuntime.jsxs("div", { className: "loader-wrapper", children: [!!appLoaderState.description && jsxRuntime.jsx("h4", { children: appLoaderState.description }), jsxRuntime.jsx(mychoiceSdkComponents.IconLoaderPrimary, {})] }));
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
const ModalConfirm = () => {
|
|
238
|
+
const { appModalState: { title, description, submitButtonText, cancelButtonText, submitCallBack, cancelCallBack, }, dispatchAppModalState, } = mychoiceSdkStore.useStoreAppModal();
|
|
239
|
+
const handleClick = (callBack) => () => {
|
|
240
|
+
if (callBack) {
|
|
241
|
+
callBack();
|
|
242
|
+
}
|
|
243
|
+
dispatchAppModalState({
|
|
244
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalClose,
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
return (jsxRuntime.jsxs("div", { className: "modal-container confirm", children: [title && jsxRuntime.jsx("h3", { children: title }), description && jsxRuntime.jsx("p", { children: description }), jsxRuntime.jsxs("div", { className: "modal-buttons", children: [cancelButtonText && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { type: mychoiceSdkComponents.ButtonTypes.Button, label: cancelButtonText, category: mychoiceSdkComponents.CategoryTypes.Outlined, color: mychoiceSdkComponents.ColorTypes.Default, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Large, onClick: handleClick(cancelCallBack) })), submitButtonText && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { type: mychoiceSdkComponents.ButtonTypes.Button, label: submitButtonText, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Large, onClick: handleClick(submitCallBack) }))] })] }));
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
const ModalMessage = () => {
|
|
251
|
+
const { appModalState: { title, description, submitButtonText, submitCallBack, }, dispatchAppModalState, } = mychoiceSdkStore.useStoreAppModal();
|
|
252
|
+
const handleOk = () => {
|
|
253
|
+
if (submitCallBack) {
|
|
254
|
+
submitCallBack();
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
dispatchAppModalState({
|
|
258
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalClose,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
return (jsxRuntime.jsxs("div", { className: "modal-container", children: [title && jsxRuntime.jsx("h3", { children: title }), description && jsxRuntime.jsx("p", { children: description }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { type: mychoiceSdkComponents.ButtonTypes.Button, label: submitButtonText || 'OK', category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Large, onClick: handleOk })] }));
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
const ModalPostal = () => {
|
|
266
|
+
const [inputValue, setInputValue] = React.useState('');
|
|
267
|
+
const insuranceType = getInsuranceType();
|
|
268
|
+
const { getPostal, status, errorMessage, } = mychoiceSdkStore.useHandlerPostal(insuranceType);
|
|
269
|
+
const { appModalState: { title, submitButtonText, submitCallBack, }, } = mychoiceSdkStore.useStoreAppModal();
|
|
270
|
+
const loading = status === mychoiceSdkComponents.RequestStatusTypes.Loading;
|
|
271
|
+
const error = status === mychoiceSdkComponents.RequestStatusTypes.Error;
|
|
272
|
+
const onSubmit = (event) => {
|
|
273
|
+
event.preventDefault();
|
|
274
|
+
if (!loading) {
|
|
275
|
+
if (submitCallBack) {
|
|
276
|
+
submitCallBack();
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
getPostal(mychoiceSdkComponents.postalCodeFormat(inputValue));
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
const handleChange = (event) => {
|
|
284
|
+
setInputValue(event.target.value);
|
|
285
|
+
};
|
|
286
|
+
return (jsxRuntime.jsxs("div", { className: "modal-container", children: [title && jsxRuntime.jsx("h3", { children: title }), jsxRuntime.jsxs("form", { onSubmit: onSubmit, children: [jsxRuntime.jsxs("div", { className: "input-block", children: [jsxRuntime.jsx("input", { className: `input-form ${mychoiceSdkComponents.SizeTypes.Large} ${error ? 'error' : ''}`, name: "postal", type: mychoiceSdkComponents.InputTypes.Text, value: mychoiceSdkComponents.formatPostalCode(inputValue), onChange: handleChange, placeholder: "A1A 1A1", maxLength: 7 }), error && jsxRuntime.jsx("p", { className: "error-message", children: errorMessage })] }), jsxRuntime.jsx("div", { className: "button-container", children: jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `${loading ? 'disabled' : ''}`, type: mychoiceSdkComponents.ButtonTypes.Submit, label: !loading ? submitButtonText || 'OK' : '', category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Large, children: loading ? jsxRuntime.jsx(mychoiceSdkComponents.IconLoaderSecondary, {}) : undefined }) })] })] }));
|
|
287
|
+
};
|
|
288
|
+
ModalPostal.defaultProps = {
|
|
289
|
+
title: '',
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
const ModalFinale = () => {
|
|
293
|
+
// const { isLoggedIn } = useStoreClientLoggedIn();
|
|
294
|
+
const { appModalState: { title, description, submitButtonText, submitCallBack, }, dispatchAppModalState, } = mychoiceSdkStore.useStoreAppModal();
|
|
295
|
+
const handleOk = () => {
|
|
296
|
+
if (submitCallBack) {
|
|
297
|
+
submitCallBack();
|
|
298
|
+
}
|
|
299
|
+
dispatchAppModalState({
|
|
300
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalClose,
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
return (jsxRuntime.jsxs("div", { className: "modal-container", children: [title && jsxRuntime.jsx("h3", { children: title }), jsxRuntime.jsxs("div", { className: "modal-content", children: [description && jsxRuntime.jsx("p", { className: "description", children: description }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { type: mychoiceSdkComponents.ButtonTypes.Button, label: submitButtonText || 'OK', category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Large, onClick: handleOk })] })] }));
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
const ModalQuoteRequest = ({ title, description, phoneNumber, }) => (jsxRuntime.jsxs("div", { className: "modal-container", children: [title && jsxRuntime.jsx("h3", { children: title }), description
|
|
307
|
+
&& jsxRuntime.jsx("p", { children: description }), jsxRuntime.jsxs("div", { className: "modal-buttons", children: [jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { type: mychoiceSdkComponents.ButtonTypes.Button, label: "OK", category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Large }), phoneNumber
|
|
308
|
+
&& (jsxRuntime.jsx("a", { target: "_blank", rel: "noreferrer noopener", href: `tel:1${phoneNumber}`, className: "phoneNumber", children: "Call the Broker" }))] })] }));
|
|
309
|
+
|
|
310
|
+
const PostalCodeDataBox = ({ title, postalCode, className }) => (jsxRuntime.jsxs("div", { className: `${className} postal-code-data-box`, children: [jsxRuntime.jsx("h2", { children: title }), jsxRuntime.jsxs("p", { children: ["Your postal code:", ' ', postalCode] })] }));
|
|
311
|
+
PostalCodeDataBox.defaultProps = {
|
|
312
|
+
title: '',
|
|
313
|
+
postalCode: '',
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
const StepsBox = ({ formSteps, validationHooks }) => {
|
|
317
|
+
const { appConfigState: { insuranceType, localIndex } } = mychoiceSdkStore.useStoreAppConfig();
|
|
318
|
+
const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
|
|
319
|
+
const isMobile = appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile;
|
|
320
|
+
const navigate = reactRouterDom.useNavigate();
|
|
321
|
+
const { dispatchAppModalState } = mychoiceSdkStore.useStoreAppModal();
|
|
322
|
+
const { pathname } = reactRouterDom.useLocation();
|
|
323
|
+
const currentPath = pathname.split('/');
|
|
324
|
+
const activeIndex = formSteps.find((step) => currentPath[currentPath.length - 1] === step.path?.substring(1))?.key || 0;
|
|
325
|
+
const handleStepClick = (item) => () => {
|
|
326
|
+
if (window.location.pathname !== `/${localIndex}/${insuranceType}${item.path}`) { // ignore double click
|
|
327
|
+
if (activeIndex > (item.key || 0)) {
|
|
328
|
+
navigate(`/${localIndex}/${insuranceType}${item?.path}`);
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
const validateOptions = [];
|
|
332
|
+
validationHooks.forEach((option, index) => {
|
|
333
|
+
if ((item.key || 0) > index) {
|
|
334
|
+
validateOptions.push(option.validateOptions);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
const formValidations = [];
|
|
338
|
+
if (validateOptions.length) {
|
|
339
|
+
validateOptions.forEach((option, index) => {
|
|
340
|
+
const isValid = !option.isValid ? option.validate(false) : option.isValid;
|
|
341
|
+
formValidations.push({ isValid, validate: option.validate, index });
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
const formValidated = formValidations.find((option) => !option.isValid);
|
|
345
|
+
if (formValidated && !formValidated.isValid) {
|
|
346
|
+
navigate(`/${localIndex}/${insuranceType}${formSteps[(formValidated.index || 0)]?.path}`);
|
|
347
|
+
dispatchAppModalState({
|
|
348
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalMessageModal,
|
|
349
|
+
payload: {
|
|
350
|
+
title: 'Please enter missing values of required fields',
|
|
351
|
+
},
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
else if (activeIndex < formSteps.length) {
|
|
355
|
+
navigate(`/${localIndex}/${insuranceType}${item.path}`);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
return (jsxRuntime.jsx("ol", { className: "navigation-steps-container", children: !isMobile ? formSteps?.map((item, index) => {
|
|
361
|
+
let cls;
|
|
362
|
+
switch (true) {
|
|
363
|
+
case activeIndex > index:
|
|
364
|
+
cls = 'done';
|
|
365
|
+
break;
|
|
366
|
+
case activeIndex === index:
|
|
367
|
+
cls = 'in-progress';
|
|
368
|
+
break;
|
|
369
|
+
default: cls = 'todo';
|
|
370
|
+
}
|
|
371
|
+
return (
|
|
372
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
373
|
+
jsxRuntime.jsx("div", { onKeyDown: handleStepClick(item), onClick: handleStepClick(item), className: "navigation-step-container", children: jsxRuntime.jsx(mychoiceSdkComponents.Step, { className: cls, item: item, index: index }) }, `${index}-${item?.title}`));
|
|
374
|
+
}) : jsxRuntime.jsx(mychoiceSdkComponents.Step, { item: formSteps[activeIndex], index: activeIndex, itemsCount: formSteps.length, isMobile: true }) }));
|
|
375
|
+
};
|
|
376
|
+
StepsBox.defaultProps = {
|
|
377
|
+
partnerId: '',
|
|
378
|
+
className: '',
|
|
379
|
+
activeIndex: 0,
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
const ButtonsBox = ({ formSteps, validationHooks, clearForm, }) => {
|
|
383
|
+
const { pathname } = reactRouterDom.useLocation();
|
|
384
|
+
const navigate = reactRouterDom.useNavigate();
|
|
385
|
+
const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
386
|
+
const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
|
|
387
|
+
const { dispatchAppModalState } = mychoiceSdkStore.useStoreAppModal();
|
|
388
|
+
const { appType, insuranceType, localIndex } = appConfigState;
|
|
389
|
+
const isMobile = appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile;
|
|
390
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
391
|
+
const currentPath = pathname.split('/');
|
|
392
|
+
const activeIndex = formSteps.find((step) => currentPath[currentPath.length - 1] === step.path?.substring(1))?.key || 0;
|
|
393
|
+
const onForwardClick = () => {
|
|
394
|
+
const { validateOptions: { validate, isValid } } = validationHooks[activeIndex] || { validateOptions: { isValid: true } };
|
|
395
|
+
const formIsValid = !isValid ? validate && validate() : isValid;
|
|
396
|
+
if (activeIndex < formSteps.length && formIsValid) {
|
|
397
|
+
navigate(`/${localIndex}/${insuranceType}${formSteps[activeIndex + 1].path}`);
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
const onBackClick = () => {
|
|
401
|
+
if (activeIndex > 0) {
|
|
402
|
+
navigate(`/${localIndex}/${insuranceType}${formSteps[activeIndex - 1].path}`);
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
const onFinishClick = () => {
|
|
406
|
+
dispatchAppModalState({
|
|
407
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalFinaleModal,
|
|
408
|
+
payload: {
|
|
409
|
+
title: 'Thank You!',
|
|
410
|
+
description: 'Thanks for using My Choice to compare car insurance rates.',
|
|
411
|
+
submitCallBack: () => {
|
|
412
|
+
navigate(`/${localIndex}/${insuranceType}${formSteps[0].path}`);
|
|
413
|
+
if (clearForm) {
|
|
414
|
+
clearForm();
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
});
|
|
419
|
+
};
|
|
420
|
+
const onClearClick = () => {
|
|
421
|
+
dispatchAppModalState({
|
|
422
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalConfirmModal,
|
|
423
|
+
payload: {
|
|
424
|
+
title: 'Are you sure you want to clear the form? This will erase all form data you have input.',
|
|
425
|
+
cancelButtonText: 'Cancel',
|
|
426
|
+
submitButtonText: 'Confirm',
|
|
427
|
+
submitCallBack: () => {
|
|
428
|
+
if (clearForm) {
|
|
429
|
+
clearForm();
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
});
|
|
434
|
+
};
|
|
435
|
+
return (jsxRuntime.jsxs("div", { className: "buttons-box", children: [activeIndex === 0 ? (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, category: mychoiceSdkComponents.CategoryTypes.Outlined, color: mychoiceSdkComponents.ColorTypes.Secondary, variant: mychoiceSdkComponents.ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onClearClick, children: jsxRuntime.jsx("span", { children: "Clear Form" }) }))
|
|
436
|
+
: (jsxRuntime.jsx(mychoiceSdkComponents.ButtonArrow, { direction: mychoiceSdkComponents.DirectionTypes.Left, category: mychoiceSdkComponents.CategoryTypes.Outlined, color: mychoiceSdkComponents.ColorTypes.Secondary, size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, onClick: onBackClick })), activeIndex === formSteps.length - 1 ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !isTheBig && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Secondary, variant: mychoiceSdkComponents.ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onFinishClick, children: jsxRuntime.jsx("span", { children: "Finish" }) })) })) : (jsxRuntime.jsx(mychoiceSdkComponents.ButtonArrow, { direction: mychoiceSdkComponents.DirectionTypes.Right, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Secondary, size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, onClick: onForwardClick }))] }));
|
|
437
|
+
};
|
|
438
|
+
ButtonsBox.defaultProps = {
|
|
439
|
+
isMobile: false,
|
|
440
|
+
activeIndex: 0,
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
const NavigationTop = ({ title, postalCode, validationHooks, formSteps, clearForm, }) => {
|
|
444
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
445
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
446
|
+
return (jsxRuntime.jsx("div", { className: "navigation-container", children: jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx(PostalCodeDataBox, { className: isTheBig ? 'thebig' : '', title: title, postalCode: postalCode }), jsxRuntime.jsx(StepsBox, { formSteps: formSteps, validationHooks: validationHooks }), jsxRuntime.jsx(ButtonsBox, { formSteps: formSteps, validationHooks: validationHooks, clearForm: clearForm })] }) }));
|
|
447
|
+
};
|
|
448
|
+
NavigationTop.defaultProps = {
|
|
449
|
+
isMobile: false,
|
|
450
|
+
activeIndex: 0,
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
const NavigationBottom = ({ createItem, validateForm, formSteps, className, itemCount = 1, maxItemCount = 5, formIsValid, }) => {
|
|
454
|
+
const { pathname } = reactRouterDom.useLocation();
|
|
455
|
+
const navigate = reactRouterDom.useNavigate();
|
|
456
|
+
const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
457
|
+
const { dispatchAppModalState } = mychoiceSdkStore.useStoreAppModal();
|
|
458
|
+
const currentPath = pathname.split('/');
|
|
459
|
+
const activeIndex = formSteps.find((step) => currentPath[currentPath.length - 1] === step.path?.substring(1))?.key || 0;
|
|
460
|
+
const onForwardClick = () => {
|
|
461
|
+
const isValid = !formIsValid ? validateForm && validateForm() : formIsValid;
|
|
462
|
+
if (!isValid) {
|
|
463
|
+
dispatchAppModalState({
|
|
464
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalMessageModal,
|
|
465
|
+
payload: {
|
|
466
|
+
title: 'Please enter missing values of required fields',
|
|
467
|
+
},
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
if (activeIndex < formSteps.length && isValid) {
|
|
471
|
+
navigate(`/${appConfigState.localIndex}/${appConfigState.insuranceType}${formSteps[activeIndex + 1].path}`);
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
const onBackClick = () => {
|
|
475
|
+
if (activeIndex > 0) {
|
|
476
|
+
navigate(`/${appConfigState.localIndex}/${appConfigState.insuranceType}${formSteps[activeIndex - 1].path}`);
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
return (jsxRuntime.jsxs("div", { className: `${className} navigation-bottom`, children: [!!activeIndex && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "previous", label: "Previous", type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Outlined, color: mychoiceSdkComponents.ColorTypes.Secondary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: onBackClick })), itemCount < maxItemCount && createItem && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "add-item", label: `Add a ${formSteps[activeIndex].title?.split(' ')[0]}`, type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Default, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: createItem })), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "next", label: "Next", type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Secondary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: onForwardClick })] }));
|
|
480
|
+
};
|
|
481
|
+
NavigationBottom.defaultProps = {
|
|
482
|
+
className: '',
|
|
483
|
+
activeIndex: 0,
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
const NavigationBottomTheBig = ({ createItem, validateForm, formSteps, className, itemCount = 1, maxItemCount = 5, formIsValid, }) => {
|
|
487
|
+
const { pathname } = reactRouterDom.useLocation();
|
|
488
|
+
const navigate = reactRouterDom.useNavigate();
|
|
489
|
+
const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
490
|
+
const { dispatchAppModalState } = mychoiceSdkStore.useStoreAppModal();
|
|
491
|
+
const currentPath = pathname.split('/');
|
|
492
|
+
const activeIndex = formSteps.find((step) => currentPath[currentPath.length - 1] === step.path?.substring(1))?.key || 0;
|
|
493
|
+
const onForwardClick = () => {
|
|
494
|
+
const isValid = !formIsValid ? validateForm && validateForm() : formIsValid;
|
|
495
|
+
if (!isValid) {
|
|
496
|
+
dispatchAppModalState({
|
|
497
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalMessageModal,
|
|
498
|
+
payload: {
|
|
499
|
+
title: 'Please enter missing values of required fields',
|
|
500
|
+
},
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
if (activeIndex < formSteps.length && isValid) {
|
|
504
|
+
navigate(`/${appConfigState.localIndex}/${appConfigState.insuranceType}${formSteps[activeIndex + 1].path}`);
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
const onBackClick = () => {
|
|
508
|
+
if (activeIndex > 0) {
|
|
509
|
+
navigate(`/${appConfigState.localIndex}/${appConfigState.insuranceType}${formSteps[activeIndex - 1].path}`);
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
return (jsxRuntime.jsxs("div", { className: `${className} navigation-bottom-thebig`, children: [itemCount < maxItemCount && createItem && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "add-item", label: `Add a ${formSteps[activeIndex].title?.split(' ')[0]}`, type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Default, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: createItem })), jsxRuntime.jsxs("div", { className: "navigation-buttons", children: [!!activeIndex && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "previous", label: "Previous", type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Outlined, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: onBackClick })), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "next", label: "Next", type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: onForwardClick })] })] }));
|
|
513
|
+
};
|
|
514
|
+
NavigationBottomTheBig.defaultProps = {
|
|
515
|
+
activeIndex: 0,
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
const NavigationTab = React__default["default"].memo((props) => {
|
|
519
|
+
const { className, name, addButtonLabel, items, selectItem, removeItem, createItem, activeItemIndex = 0, maxItemCount = 5, readOnly, } = props;
|
|
520
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
521
|
+
const isThebig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
522
|
+
const handleButtonClick = (index) => () => {
|
|
523
|
+
if (selectItem) {
|
|
524
|
+
selectItem(index);
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
const handleIconClick = (index) => (event) => {
|
|
528
|
+
event.stopPropagation();
|
|
529
|
+
if (removeItem) {
|
|
530
|
+
removeItem(index);
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
const handleArrowClick = (direction) => {
|
|
534
|
+
if (selectItem) {
|
|
535
|
+
if (direction === mychoiceSdkComponents.DirectionTypes.Left) {
|
|
536
|
+
selectItem(((activeItemIndex - 1) > -1) ? activeItemIndex - 1 : 0);
|
|
537
|
+
}
|
|
538
|
+
if (direction === mychoiceSdkComponents.DirectionTypes.Right) {
|
|
539
|
+
selectItem(((activeItemIndex + 1) < maxItemCount) ? activeItemIndex + 1 : maxItemCount);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
const reduceCount = activeItemIndex === 4 ? 2 : 1;
|
|
544
|
+
return (jsxRuntime.jsxs("div", { className: `navigation-tab-box ${className}`, children: [(activeItemIndex > 1) && jsxRuntime.jsx(mychoiceSdkComponents.ButtonTabArrow, { onClick: () => handleArrowClick(mychoiceSdkComponents.DirectionTypes.Left) }), (activeItemIndex <= items.length - 2
|
|
545
|
+
&& activeItemIndex < 3
|
|
546
|
+
&& ((items.length > 2 && createItem) || (items.length > 3 && !createItem)))
|
|
547
|
+
&& jsxRuntime.jsx(mychoiceSdkComponents.ButtonTabArrow, { onClick: () => handleArrowClick(mychoiceSdkComponents.DirectionTypes.Right), direction: mychoiceSdkComponents.DirectionTypes.Right }), jsxRuntime.jsxs("div", { className: "navigation-tab-container", style: { marginLeft: `${activeItemIndex > 1 ? `-${(activeItemIndex - reduceCount) * 9.875}rem` : '0'}` }, children: [items.map((tab, index) => (jsxRuntime.jsx(mychoiceSdkComponents.ButtonTab, { className: `${activeItemIndex === index ? 'active-tab' : 'inactive-tab'} ${isThebig ? 'thebig-bold' : ''}`, label: tab.name, buttonClick: handleButtonClick(index), iconClick: handleIconClick(index), selfDelete: index !== 0 && !readOnly }, `${name}-${index}`))), (items.length < maxItemCount && createItem) && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonTab, { className: isThebig ? 'add-thebig-medium' : 'add', label: addButtonLabel, buttonClick: createItem, selfDelete: false }))] })] }));
|
|
548
|
+
}, (prevProps, nextProps) => !((prevProps.items !== nextProps.items
|
|
549
|
+
|| prevProps.activeItemIndex !== nextProps.activeItemIndex)));
|
|
550
|
+
NavigationTab.defaultProps = {
|
|
551
|
+
className: '',
|
|
552
|
+
items: [],
|
|
553
|
+
readOnly: false,
|
|
554
|
+
addButtonLabel: '',
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
const NavigationTabMobile = React__default["default"].memo((props) => {
|
|
558
|
+
const { items, addButtonLabel, selectItem, removeItem, createItem, activeItemIndex = 0, isOpen, openListClick, maxItemCount = 5, } = props;
|
|
559
|
+
const handleButtonClick = (index) => () => {
|
|
560
|
+
if (selectItem) {
|
|
561
|
+
selectItem(index);
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
const handleIconClick = (index) => (event) => {
|
|
565
|
+
event.stopPropagation();
|
|
566
|
+
if (removeItem) {
|
|
567
|
+
removeItem(index);
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
return (jsxRuntime.jsxs("div", { className: "navigation-tab-box", children: [jsxRuntime.jsxs("button", { type: mychoiceSdkComponents.ButtonTypes.Button, className: "navigation-tab-selected", onClick: openListClick, children: [jsxRuntime.jsx("h4", { children: items[activeItemIndex].name }), jsxRuntime.jsx(mychoiceSdkComponents.IconDropdownArrow, { className: isOpen ? 'rotated' : '' })] }), isOpen && (jsxRuntime.jsxs("div", { className: "navigation-tab-container-mobile", children: [items.map((tab, index) => (jsxRuntime.jsx(mychoiceSdkComponents.ButtonTabMobile, { label: tab.name, buttonClick: handleButtonClick(index), iconClick: handleIconClick(index), selfDelete: index !== 0 }, `${index}`))), (items.length < maxItemCount) && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonTabMobile, { className: "add", label: addButtonLabel, buttonClick: createItem, selfDelete: false }))] }))] }));
|
|
571
|
+
}, (prevProps, nextProps) => !((prevProps.items !== nextProps.items
|
|
572
|
+
|| prevProps.activeItemIndex !== nextProps.activeItemIndex
|
|
573
|
+
|| prevProps.isOpen !== nextProps.isOpen)));
|
|
574
|
+
NavigationTabMobile.defaultProps = {
|
|
575
|
+
className: '',
|
|
576
|
+
items: [],
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
const formSteps = {
|
|
580
|
+
[mychoiceSdkComponents.InsuranceTypes.Car]: [
|
|
581
|
+
{
|
|
582
|
+
key: 0, path: '/', name: 'Step 1', title: 'Vehicle Info', icon: mychoiceSdkComponents.NavigationCar({}),
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
key: 1, path: '/driver', name: 'Step 2', title: 'Driver Info', icon: mychoiceSdkComponents.NavigationPerson({}),
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
key: 2, path: '/discount', name: 'Step 3', title: 'Discount Info', icon: mychoiceSdkComponents.NavigationDiscount({}),
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
key: 3, path: '/quotes', name: 'Step 4', title: 'Your Quotes', icon: mychoiceSdkComponents.NavigationQuotes({}),
|
|
592
|
+
},
|
|
593
|
+
],
|
|
594
|
+
[mychoiceSdkComponents.InsuranceTypes.Home]: [
|
|
595
|
+
{
|
|
596
|
+
key: 0, path: '/', name: 'Step 1', title: 'Your Address', icon: mychoiceSdkComponents.NavigationAddress({}),
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
key: 1, path: '/applicant', name: 'Step 2', title: 'Applicant Info', icon: mychoiceSdkComponents.NavigationPerson({}),
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
key: 2, path: '/property', name: 'Step 3', title: 'Property Info', icon: mychoiceSdkComponents.NavigationProperty({}),
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
key: 3, path: '/discount', name: 'Step 4', title: 'Discount Info', icon: mychoiceSdkComponents.NavigationDiscount({}),
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
key: 4, path: '/quotes', name: 'Step 5', title: 'Your Quotes', icon: mychoiceSdkComponents.NavigationQuotes({}),
|
|
609
|
+
},
|
|
610
|
+
],
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
const getInsuranceType = () => {
|
|
614
|
+
const pathParts = window.location.pathname.split('/');
|
|
615
|
+
if (pathParts.includes('car')) {
|
|
616
|
+
return mychoiceSdkComponents.InsuranceTypes.Car;
|
|
617
|
+
}
|
|
618
|
+
if (pathParts.includes('home')) {
|
|
619
|
+
return mychoiceSdkComponents.InsuranceTypes.Home;
|
|
620
|
+
}
|
|
621
|
+
return mychoiceSdkComponents.InsuranceTypes.Car;
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
const AppModalWrapper = () => {
|
|
625
|
+
const { appModalState } = mychoiceSdkStore.useStoreAppModal();
|
|
626
|
+
switch (appModalState.modalType) {
|
|
627
|
+
case mychoiceSdkComponents.ModalTypes.MessageModal:
|
|
628
|
+
return (jsxRuntime.jsx(ModalMessage, {}));
|
|
629
|
+
case mychoiceSdkComponents.ModalTypes.ConfirmModal:
|
|
630
|
+
return (jsxRuntime.jsx(ModalConfirm, {}));
|
|
631
|
+
case mychoiceSdkComponents.ModalTypes.PostalModal:
|
|
632
|
+
return (jsxRuntime.jsx(ModalPostal, {}));
|
|
633
|
+
case mychoiceSdkComponents.ModalTypes.FinaleModal:
|
|
634
|
+
return (jsxRuntime.jsx(ModalFinale, {}));
|
|
635
|
+
default:
|
|
636
|
+
return null;
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
const AppModal = () => {
|
|
640
|
+
const { appModalState } = mychoiceSdkStore.useStoreAppModal();
|
|
641
|
+
const insuranceType = getInsuranceType();
|
|
642
|
+
if (appModalState.isOpen && document.location.pathname.indexOf(insuranceType) !== -1) {
|
|
643
|
+
return (jsxRuntime.jsx("div", { className: "app-modal", children: jsxRuntime.jsx(AppModalWrapper, {}) }));
|
|
644
|
+
}
|
|
645
|
+
return null;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
const AppHeader = () => {
|
|
649
|
+
const { appConfigState: { appType, localIndex } } = mychoiceSdkStore.useStoreAppConfig();
|
|
650
|
+
const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
|
|
651
|
+
if (appType) {
|
|
652
|
+
return (jsxRuntime.jsxs("div", { className: "app-header", children: [appType === mychoiceSdkComponents.AppTypes.TheBig && jsxRuntime.jsx(HeaderTheBig, { textBack: "home" }), appType === mychoiceSdkComponents.AppTypes.MyChoice
|
|
653
|
+
&& (localIndex !== mychoiceSdkComponents.defaultLocalIndex
|
|
654
|
+
? jsxRuntime.jsx(HeaderPartner, {})
|
|
655
|
+
: (jsxRuntime.jsx(jsxRuntime.Fragment, { children: appDeviceType === mychoiceSdkComponents.DeviceTypes.Desktop
|
|
656
|
+
? jsxRuntime.jsx(HeaderMyChoice, {})
|
|
657
|
+
: jsxRuntime.jsx(HeaderMyChoiceMobile, {}) })))] }));
|
|
658
|
+
}
|
|
659
|
+
return null;
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
const RouteWrapperPublic = (props) => {
|
|
663
|
+
const { children } = props;
|
|
664
|
+
const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
665
|
+
if (appConfigState.isReady) {
|
|
666
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: children }));
|
|
667
|
+
}
|
|
668
|
+
return null;
|
|
669
|
+
};
|
|
670
|
+
|
|
671
|
+
const getVehicleYearRange = () => {
|
|
672
|
+
const currentDate = new Date();
|
|
673
|
+
const vehicleYear = [];
|
|
674
|
+
for (let year = (currentDate.getFullYear()); year >= 2001; year -= 1) {
|
|
675
|
+
vehicleYear.push({ name: `${year}`, value: `${year}` });
|
|
676
|
+
}
|
|
677
|
+
vehicleYear.push({ name: '2000 or older', value: '2000' });
|
|
678
|
+
return vehicleYear;
|
|
679
|
+
};
|
|
680
|
+
const getRecommendedRange = (distanceDaily, distanceBusiness) => {
|
|
681
|
+
let kmEachDay = +distanceDaily;
|
|
682
|
+
if (distanceBusiness && (+distanceBusiness > +distanceDaily)) {
|
|
683
|
+
kmEachDay = +distanceBusiness;
|
|
684
|
+
}
|
|
685
|
+
switch (true) {
|
|
686
|
+
case kmEachDay === 1:
|
|
687
|
+
return 8000;
|
|
688
|
+
case ((kmEachDay >= 2) && (kmEachDay <= 10)):
|
|
689
|
+
return 10000;
|
|
690
|
+
case ((kmEachDay >= 15) && (kmEachDay <= 20)):
|
|
691
|
+
return 15000;
|
|
692
|
+
case ((kmEachDay >= 30) && (kmEachDay <= 40)):
|
|
693
|
+
return 20000;
|
|
694
|
+
case ((kmEachDay >= 50) && (kmEachDay <= 80)):
|
|
695
|
+
return 30000;
|
|
696
|
+
case ((kmEachDay >= 90) && (kmEachDay <= 100)):
|
|
697
|
+
return 50000;
|
|
698
|
+
case kmEachDay === 150:
|
|
699
|
+
return 60000;
|
|
700
|
+
case kmEachDay === 200:
|
|
701
|
+
return 80000;
|
|
702
|
+
case kmEachDay === 250:
|
|
703
|
+
return 100000;
|
|
704
|
+
case kmEachDay === 300:
|
|
705
|
+
return 150000;
|
|
706
|
+
case kmEachDay === 350:
|
|
707
|
+
return 200000;
|
|
708
|
+
case kmEachDay === 400:
|
|
709
|
+
return 250000;
|
|
710
|
+
default:
|
|
711
|
+
return kmEachDay;
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
const getSelectedOption = (options, value) => {
|
|
716
|
+
if (typeof value === 'boolean') {
|
|
717
|
+
return value ? options[0].value : options[1].value;
|
|
718
|
+
}
|
|
719
|
+
return options.find((option) => option.value === value)?.value;
|
|
720
|
+
};
|
|
721
|
+
const getErrorMessage = (value, inValidation = false, message = '') => {
|
|
722
|
+
if (inValidation) {
|
|
723
|
+
return !value ? 'This field is required.' : message;
|
|
724
|
+
}
|
|
725
|
+
return '';
|
|
726
|
+
};
|
|
727
|
+
const getDateErrorMessage = (values, inValidation = false) => {
|
|
728
|
+
const emptyValues = values.filter((value) => !value);
|
|
729
|
+
if (inValidation) {
|
|
730
|
+
if (emptyValues.length > 1) {
|
|
731
|
+
return 'These fields are required.';
|
|
732
|
+
}
|
|
733
|
+
if (emptyValues.length === 1) {
|
|
734
|
+
return 'This field is required.';
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
return '';
|
|
738
|
+
};
|
|
739
|
+
const formatPhoneObject = (phone) => {
|
|
740
|
+
const phoneToArray = (phone || mychoiceSdkComponents.defaultBrokerPhone).split(',');
|
|
741
|
+
const onlyNumbers = phoneToArray[0].replace(/\D/g, '');
|
|
742
|
+
let phoneNumber;
|
|
743
|
+
if (onlyNumbers.length < 11) {
|
|
744
|
+
phoneNumber = `1${onlyNumbers}`;
|
|
745
|
+
}
|
|
746
|
+
else {
|
|
747
|
+
phoneNumber = onlyNumbers;
|
|
748
|
+
}
|
|
749
|
+
const phoneToNumbers = Number(phoneNumber).toString();
|
|
750
|
+
const phoneWithoutSpecialKey = phoneToNumbers.length > 10
|
|
751
|
+
? phoneToNumbers.replace(/(\d{1})(\d{3})(\d{3})(\d{4})/, '$1-$2-$3-$4')
|
|
752
|
+
: phoneToNumbers.replace(/(\d{1})(\d{3})(\d{3})(\d{3})/, '$1-$2-$3-$4');
|
|
753
|
+
const title = phoneToArray.length < 2 ? phoneWithoutSpecialKey : `${phoneWithoutSpecialKey} x${phoneToArray[1]}`;
|
|
754
|
+
const specialKeys = phoneToArray[1] ? `,${phoneToArray[1]}` : '';
|
|
755
|
+
return {
|
|
756
|
+
number: phoneWithoutSpecialKey,
|
|
757
|
+
title,
|
|
758
|
+
specialKeys,
|
|
759
|
+
};
|
|
760
|
+
};
|
|
761
|
+
const formatTitleToCapital = (name) => name.replace(/-/g, ' ')
|
|
762
|
+
.replace(/\+/g, ' ').replace(/(\b[a-z](?!\s))/g, (letter) => letter.toUpperCase());
|
|
763
|
+
const capitalize = (text) => text.charAt(0).toUpperCase() + text.slice(1);
|
|
764
|
+
|
|
765
|
+
const BlockCarInfo = () => {
|
|
766
|
+
const { status: statusMake, getVehicleMake, vehicleMakeList = [] } = mychoiceSdkStore.useHandlerCarMake();
|
|
767
|
+
const { status: statusModel, getVehicleModel, vehicleModelList = [] } = mychoiceSdkStore.useHandlerCarModel();
|
|
768
|
+
const { vehicleState, dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
769
|
+
const { year: currentYear, make: currentMake, model: currentModel, } = vehicleState.items[vehicleState.activeIndex];
|
|
770
|
+
const yearIsValid = !currentYear || Number(currentYear) > 2000;
|
|
771
|
+
const handleVehicleYearChange = ({ value }) => {
|
|
772
|
+
if (value) {
|
|
773
|
+
dispatchVehicleState({
|
|
774
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleYearSet,
|
|
775
|
+
payload: { year: value },
|
|
776
|
+
});
|
|
777
|
+
getVehicleMake(value);
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
const handleVehicleMakeChange = ({ value }) => {
|
|
781
|
+
if (value) {
|
|
782
|
+
dispatchVehicleState({
|
|
783
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleMakeSet,
|
|
784
|
+
payload: { make: value },
|
|
785
|
+
});
|
|
786
|
+
getVehicleModel(currentYear, value);
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
const handleVehicleModelChange = ({ value }) => {
|
|
790
|
+
if (value) {
|
|
791
|
+
dispatchVehicleState({
|
|
792
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleModelSet,
|
|
793
|
+
payload: { model: value },
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
798
|
+
if (currentYear) {
|
|
799
|
+
getVehicleMake(currentYear);
|
|
800
|
+
}
|
|
801
|
+
if (currentMake) {
|
|
802
|
+
getVehicleModel(currentYear, currentMake);
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SelectFormBox, { options: getVehicleYearRange(), name: "carYear", title: "Car Year", placeholder: "Select Year", description: "Every car is different, so for insurers to accurately cover, repair, or replace your vehicle, they need to know the make, model, age, body type, and vehicle history. Each factor will raise or lower your premium\u2014an older vehicle is typically more affordable to repair, for example, since cars lose value each year.", error: !currentYear && vehicleState.inValidation, errorMessage: !yearIsValid ? mychoiceSdkComponents.yearMessage : getErrorMessage(currentYear, vehicleState.inValidation), defaultValue: currentYear, autoSelectIfValueIsOutOfOptions: false, onChange: handleVehicleYearChange }), !!vehicleMakeList.length
|
|
806
|
+
&& yearIsValid
|
|
807
|
+
&& statusMake === mychoiceSdkComponents.RequestStatusTypes.Success
|
|
808
|
+
&& (jsxRuntime.jsx(SelectFormBox, { options: vehicleMakeList, name: "carMakes", title: "Car Manufacturer", placeholder: "Select a Make", description: "The manufacturer of your vehicle is a huge influence on your insurance premium, but it isn\u2019t the only consideration. Some car manufacturers include security features that may qualify for discounts, like anti-theft protection or anti-lock brakes. Insurers also consider repair, risk, injury, and retail prices. If you do not see your vehicle on our list, call us for a telephonic quote.", error: !currentMake && vehicleState.inValidation, errorMessage: getErrorMessage(currentMake, vehicleState.inValidation), defaultValue: currentMake, autoSelectIfValueIsOutOfOptions: false, onChange: handleVehicleMakeChange })), vehicleModelList.length > 0
|
|
809
|
+
&& currentMake
|
|
810
|
+
&& yearIsValid
|
|
811
|
+
&& statusModel === mychoiceSdkComponents.RequestStatusTypes.Success
|
|
812
|
+
&& (jsxRuntime.jsx(SelectFormBox, { options: vehicleModelList, name: "carModel", title: "Car Model", placeholder: "Select a Model", description: "Insurers use the model to calculate insurance premiums. It may not significantly impact basic liability, but it does influence collision and comprehensive car insurance premiums. Safety features are also pivotal. Rear-view cameras and anti-theft devices decrease the likelihood of a claim, and larger cars risk more damage if you do have an accident. If you do not see your vehicle on our list, call us for a telephonic quote.", error: !currentModel && vehicleState.inValidation, errorMessage: getErrorMessage(currentModel, vehicleState.inValidation), defaultValue: currentModel, autoSelectIfValueIsOutOfOptions: false, onChange: handleVehicleModelChange }))] }));
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
const BlockCarConditionInfo = () => {
|
|
816
|
+
const { vehicleState, dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
817
|
+
const { year, condition, leased, winterTires, parkingLocation, primaryUse, distanceDaily, distanceBusiness, distanceYearly, purchaseYear, purchaseMonth, purchaseDay, } = vehicleState.items[vehicleState.activeIndex];
|
|
818
|
+
// eslint-disable-next-line max-len
|
|
819
|
+
const primaryUseHintMessage = primaryUse === 'business' ? 'Please choose "Business" only if your vehicle is used primarily for work (sales representatives, realtors, consultants, etc.). If you drive back and forth to work or use your vehicle occasionally for work, please select "Personal".' : '';
|
|
820
|
+
const defaultPurchaseDate = {
|
|
821
|
+
day: purchaseDay,
|
|
822
|
+
month: purchaseMonth,
|
|
823
|
+
year: purchaseYear,
|
|
824
|
+
};
|
|
825
|
+
const handleConditionChange = ({ value }) => {
|
|
826
|
+
dispatchVehicleState({
|
|
827
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleConditionSelect,
|
|
828
|
+
payload: { condition: value },
|
|
829
|
+
});
|
|
830
|
+
};
|
|
831
|
+
const handleLeasedChange = ({ value }) => {
|
|
832
|
+
dispatchVehicleState({
|
|
833
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleCarStatusSelect,
|
|
834
|
+
payload: { leased: value },
|
|
835
|
+
});
|
|
836
|
+
};
|
|
837
|
+
const handlePurchaseDateChange = (dateType) => ({ value }) => {
|
|
838
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Day) {
|
|
839
|
+
dispatchVehicleState({
|
|
840
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehiclePurchaseDaySelect,
|
|
841
|
+
payload: { purchaseDay: value },
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
845
|
+
dispatchVehicleState({
|
|
846
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehiclePurchaseMonthSelect,
|
|
847
|
+
payload: { purchaseMonth: value },
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
851
|
+
dispatchVehicleState({
|
|
852
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehiclePurchaseYearSelect,
|
|
853
|
+
payload: { purchaseYear: value },
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
const handleWinterTiresChange = ({ value }) => {
|
|
858
|
+
dispatchVehicleState({
|
|
859
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleWinterTiresSelect,
|
|
860
|
+
payload: { winterTires: value },
|
|
861
|
+
});
|
|
862
|
+
};
|
|
863
|
+
const handleCarParkingLocationChange = ({ value }) => {
|
|
864
|
+
dispatchVehicleState({
|
|
865
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarParkingLocationSelect,
|
|
866
|
+
payload: { parkingLocation: value },
|
|
867
|
+
});
|
|
868
|
+
};
|
|
869
|
+
const handleCarUsageChange = ({ value }) => {
|
|
870
|
+
dispatchVehicleState({
|
|
871
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleUsageSelect,
|
|
872
|
+
payload: { primaryUse: value },
|
|
873
|
+
});
|
|
874
|
+
};
|
|
875
|
+
const handleCarDailyDistanceChange = ({ value }) => {
|
|
876
|
+
dispatchVehicleState({
|
|
877
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarDailyDistanceSelect,
|
|
878
|
+
payload: { distanceDaily: value },
|
|
879
|
+
});
|
|
880
|
+
dispatchVehicleState({
|
|
881
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarYearlyDistanceSelect,
|
|
882
|
+
payload: { distanceYearly: `${getRecommendedRange(value, primaryUse === mychoiceSdkComponents.VehiclePrimaryUseTypes.Business ? distanceBusiness : 1)}` },
|
|
883
|
+
});
|
|
884
|
+
};
|
|
885
|
+
const handleCarBusinessDailyDistanceChange = ({ value }) => {
|
|
886
|
+
dispatchVehicleState({
|
|
887
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarBusinessDistanceSelect,
|
|
888
|
+
payload: { distanceBusiness: value },
|
|
889
|
+
});
|
|
890
|
+
dispatchVehicleState({
|
|
891
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarYearlyDistanceSelect,
|
|
892
|
+
payload: { distanceYearly: `${getRecommendedRange(value, primaryUse === mychoiceSdkComponents.VehiclePrimaryUseTypes.Business ? distanceBusiness : 1)}` },
|
|
893
|
+
});
|
|
894
|
+
};
|
|
895
|
+
const handleCarYearlyDistanceChange = ({ value }) => {
|
|
896
|
+
dispatchVehicleState({
|
|
897
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarYearlyDistanceSelect,
|
|
898
|
+
payload: { distanceYearly: value },
|
|
899
|
+
});
|
|
900
|
+
};
|
|
901
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.carCondition, onChange: handleConditionChange, name: "condition", defaultValue: getSelectedOption(mychoiceSdkComponents.carCondition, condition), description: "Used cars are usually cheaper to insure than new ones because of the depreciation. The cost to replace this vehicle is typically less expensive and insurers will account for the condition of the car when giving you a rate.", title: "Was this car new or used when you bought it?" }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.carStatus, onChange: handleLeasedChange, name: "leased", defaultValue: getSelectedOption(mychoiceSdkComponents.carStatus, leased), description: "You can own or lease a car. Ownership means that you bought the vehicle or are currently financing it. Leasing is renting it under a long-term contract. In this case, the leasing company maintains ownership of the vehicle, which you will see clearly on your insurance policy.", title: "Is this car owned/financed or leased?" }), jsxRuntime.jsx(DateSelectFormBox, { name: "purchaseDate", dateNames: ['purchaseYear', 'purchaseMonth'], onDateChange: handlePurchaseDateChange, defaultValue: defaultPurchaseDate, title: "When did you buy this car?", description: "Insurers generally consider your age and driving experience when calculating a vehicle insurance quote. The safest drivers are often those who are over thirty, but each insurer will have their own parameters. The youngest and oldest drivers have the greatest liability reflected in their premiums due to inexperience or health complications, respectively.", errorMessage: getDateErrorMessage([
|
|
902
|
+
purchaseDay || '',
|
|
903
|
+
purchaseMonth || '',
|
|
904
|
+
purchaseYear || '',
|
|
905
|
+
], vehicleState.inValidation), error: vehicleState.inValidation, minDate: year ? `${Number(year) - 1}-01-01` : mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd'), maxDate: mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd') }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.carWinterTiresCheck, onChange: handleWinterTiresChange, name: "winterTires", defaultValue: getSelectedOption(mychoiceSdkComponents.carWinterTiresCheck, winterTires), description: "Snow. Ice. Freezing temperatures. Winter tires protect you from all these winter weather conditions, and more. It also protects your wallet. Investing in winter tires can save you $50 to $100 on your insurance.", title: "Does your car have winter tires?" }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.carKeepPlace, name: "parkingLocation", onChange: handleCarParkingLocationChange, defaultValue: getSelectedOption(mychoiceSdkComponents.carKeepPlace, parkingLocation), title: "Where do you keep your car overnight?", placeholder: "Select from the list", description: "For many of us, the answer is \u201Cat home.\u201D If you park your car in various locations throughout the year, then select the most frequently parking spot. Be honest\u2014some insurers will use your overnight parking location to calculate a quote, which could affect your claims in the future.", autoSelectIfValueIsOutOfOptions: false, error: !parkingLocation && vehicleState.inValidation, errorMessage: getErrorMessage(parkingLocation, vehicleState.inValidation) }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.carUsagePurpose, onChange: handleCarUsageChange, name: "primaryUse", defaultValue: getSelectedOption(mychoiceSdkComponents.carUsagePurpose, primaryUse) || mychoiceSdkComponents.carUsagePurpose[0].value, hintMessage: primaryUseHintMessage, description: "The way you use your vehicle is a primary factor that insurers use in your policy terms and fees, whether it be personal or business.\n \u2022 Personal is driving from work or school to home.\n \u2022 Business considers other uses like sales calls, pick-ups or deliveries, or other business errands.", title: "What do you mainly use your car for?" }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.firstDriveDistanceList, name: "distanceDaily", onChange: handleCarDailyDistanceChange, defaultValue: getSelectedOption(mychoiceSdkComponents.firstDriveDistanceList, distanceDaily), title: "How far is your 1-way commute to work or school?", placeholder: "Select", description: "The distance you drive to work or school would be an example of your daily commute. It is one of the most important factors when determining coverage options since it exposes you to traffic each day. The shorter your commute, the less risk you carry of an accident.", autoSelectIfValueIsOutOfOptions: false, error: !distanceDaily && vehicleState.inValidation, errorMessage: getErrorMessage(distanceDaily, vehicleState.inValidation) }), primaryUse === 'business' && (jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.dailyDriveBusinessDistanceList, name: "distanceBusiness", onChange: handleCarBusinessDailyDistanceChange, defaultValue: getSelectedOption(mychoiceSdkComponents.dailyDriveBusinessDistanceList, distanceBusiness), title: "How many kilometers are driven for business use each day?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !distanceBusiness && vehicleState.inValidation, errorMessage: getErrorMessage(distanceBusiness, vehicleState.inValidation) })), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.yearlyDriveDistanceList, name: "distanceYearly", onChange: handleCarYearlyDistanceChange, defaultValue: getSelectedOption(mychoiceSdkComponents.yearlyDriveDistanceList, distanceYearly), title: "How many total kilometers are driven each year?", placeholder: "Select", hintMessage: distanceDaily ? `Based on your daily driven kilometers, we recommend
|
|
906
|
+
${mychoiceSdkComponents.numberWithCommas(getRecommendedRange(distanceDaily, primaryUse === mychoiceSdkComponents.VehiclePrimaryUseTypes.Business ? distanceBusiness : 1))} for your yearly driven kilometers` : '', autoSelectIfValueIsOutOfOptions: false, error: !distanceYearly && vehicleState.inValidation, errorMessage: getErrorMessage(distanceYearly, vehicleState.inValidation) })] }));
|
|
907
|
+
};
|
|
908
|
+
|
|
909
|
+
const VehicleSectionMain = () => (jsxRuntime.jsxs("div", { className: "form-section top-section", children: [jsxRuntime.jsx(BlockCarInfo, {}), jsxRuntime.jsx(BlockCarConditionInfo, {})] }));
|
|
910
|
+
|
|
911
|
+
const VehicleSectionCoverage = () => {
|
|
912
|
+
const { vehicleState, dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
913
|
+
const { collision, comprehensive } = vehicleState.items[vehicleState.activeIndex];
|
|
914
|
+
const handleComprehensiveChange = ({ value }) => {
|
|
915
|
+
dispatchVehicleState({
|
|
916
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarComprehensiveCoverageSelect,
|
|
917
|
+
payload: { coverage: value, deductible: 1000 },
|
|
918
|
+
});
|
|
919
|
+
};
|
|
920
|
+
const handleCollisionChange = ({ value }) => {
|
|
921
|
+
dispatchVehicleState({
|
|
922
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarCollisionCoverageSelect,
|
|
923
|
+
payload: { coverage: value, deductible: 1000 },
|
|
924
|
+
});
|
|
925
|
+
};
|
|
926
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx("h2", { children: "Do you want your insurance to have either comprehensive, collision coverage or both? " }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.comprehensiveCoverage, onChange: handleComprehensiveChange, name: "comprehensive", defaultValue: getSelectedOption(mychoiceSdkComponents.comprehensiveCoverage, comprehensive?.coverage), description: "Comprehensive insurance covers factors outside of traffic, like fire, flooding, and theft. It also includes terms, limits, and conditions, which become more favourable as the car ages and devalues. Comprehensive coverage is ideal for newer or lightly used vehicles, but for older vehicles, it tends to be poor value for money.", title: "Comprehensive Coverage" }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.collisionCoverage, onChange: handleCollisionChange, name: "collision", defaultValue: getSelectedOption(mychoiceSdkComponents.collisionCoverage, collision?.coverage), description: "Sometimes, you are at-fault in a collision. Collision coverage pays for repairs when you hit another car or object. It may also cover damage if another driver hits your vehicle, and their insurance doesn't cover the repairs. You will have to pay a deductible before the insurer begins to pay for damages. If another driver hits you without collision coverage, the liability portion of your insurance kicks in, and liability insurance will cover the other driver if you are at fault. The definition of at-fault varies based on location. When the cost of repairs exceeds the car's value, it is time to forgo collision coverage as unnecessary.", title: "Collision Coverage" })] }));
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
const TabVehicle = ({ createItem, readOnly }) => {
|
|
930
|
+
const { vehicleState, dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
931
|
+
const { dispatchDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
932
|
+
const { dispatchAppModalState } = mychoiceSdkStore.useStoreAppModal();
|
|
933
|
+
const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
|
|
934
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
935
|
+
const selectVehicle = (vehicleIndex) => {
|
|
936
|
+
dispatchVehicleState({
|
|
937
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleSelect,
|
|
938
|
+
payload: {
|
|
939
|
+
vehicleIndex,
|
|
940
|
+
},
|
|
941
|
+
});
|
|
942
|
+
setIsOpen(false);
|
|
943
|
+
};
|
|
944
|
+
const deleteVehicle = (itemIndex) => {
|
|
945
|
+
dispatchAppModalState({
|
|
946
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalConfirmModal,
|
|
947
|
+
payload: {
|
|
948
|
+
title: `Are you sure you want to delete ${vehicleState.tabs[itemIndex]?.name} ?`,
|
|
949
|
+
submitButtonText: 'YES',
|
|
950
|
+
cancelButtonText: 'NO',
|
|
951
|
+
submitCallBack: () => {
|
|
952
|
+
dispatchVehicleState({
|
|
953
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleDeleteVehicle,
|
|
954
|
+
payload: {
|
|
955
|
+
vehicleIndex: itemIndex,
|
|
956
|
+
},
|
|
957
|
+
});
|
|
958
|
+
dispatchDiscountState({
|
|
959
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountVehlinkByVehicleDelete,
|
|
960
|
+
payload: {
|
|
961
|
+
vehicleIndex: itemIndex,
|
|
962
|
+
},
|
|
963
|
+
});
|
|
964
|
+
dispatchAppModalState({
|
|
965
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalClose,
|
|
966
|
+
});
|
|
967
|
+
},
|
|
968
|
+
},
|
|
969
|
+
});
|
|
970
|
+
};
|
|
971
|
+
const handleOpenListClick = () => {
|
|
972
|
+
setIsOpen(!isOpen);
|
|
973
|
+
};
|
|
974
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile
|
|
975
|
+
? (jsxRuntime.jsx(NavigationTabMobile, { name: "vehicle-tab-navigation-mobile", addButtonLabel: "Add a Vehicle", items: vehicleState.tabs, activeItemIndex: vehicleState.activeIndex, selectItem: selectVehicle, createItem: createItem, removeItem: deleteVehicle, isOpen: isOpen, openListClick: handleOpenListClick })) : (jsxRuntime.jsx(NavigationTab, { name: "vehicle-tab-navigation", addButtonLabel: "Add a Vehicle", items: vehicleState.tabs, activeItemIndex: vehicleState.activeIndex, selectItem: selectVehicle, createItem: createItem, removeItem: deleteVehicle, readOnly: readOnly })) }));
|
|
976
|
+
};
|
|
977
|
+
|
|
978
|
+
var myChoicePartnerLogo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB9AAAAEzCAYAAABpOJhvAAAACXBIWXMAAAsTAAALEwEAmpwYAAB980lEQVR4nO3dd5hdVbn48e+E3kKCNOmEXgUi0kQQAopXbBhEQMEGdrHdoNeuV0GvigUvRFRULIB4AcVGFJQuhCa9hKEjLaHXZH5/rDm/TIYpp6y119rnfD/Ps59AMvOu99R99nnXelffwMAAkiRJUmn6+vpyp9Ct1ga2ADYCNgDWAtYEVgFWBCYBiw/5+fnA48DTwBPAfcCdg8fdwC3AVYP/L2mQ19qSJEmSJNVTnxf1kiRJKpEF9CiWA3YZPHYGtgNWSjTWPEIh/XLgH8DfgbmJxpKK57W2JEmSJEn1ZAFdkiRJRbKA3rYNgDcB+xAK50tmymMBcAVwLnAGcMHg30k9wWttSZIkSZLqyQK6JEmSimQBvSVrAAcDbwW2yZvKqO4FTgNOwWK6eoDX2pIkSZIk1ZMFdEmSJBXJAvq4JgCvAd4PvGrw/+viNuB44MfAA5lzkZLwWluSJEmSpHqygC5JkqQiWUAf1XLAu4CPAuvlTaVjzwKnAt8DLsmcixSV19qSJEmSJNWTBXRJkiQVyQL6CywPfIRQOH9R5lx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GqD19qSJEmSJNXT4rkTkCRJktS2kwkrtE8Cls6cSzsGgOsIhfKLBv+8afDvJUmSJEmSpMq5Al2SJElFcgV6S14OnAK8OHci43iEhavLLwIuBh7NmpGUiNfakiRJkiTVkwV0SZIkFckCestWBX4KvDp3IkPcwKKry28AFmTNSKqI19qSJEmSJNWTBXRJkiQVyQJ62w4EvgmsXvG4TwGXEgrl5xNWlz9UcQ5SMbzWliRJkiSpniygS5IkqUgW0DuyDPBB4OPAaonGuJdQKL8IuAC4Angu0VhS7XitLUmSJElSPVlAlyRJUpEsoEexBPB64O3AXsDSbcZZAFxNKJafT1hl3h8hP6lrea0tSZIkSVI9WUCXJElSkSygR7cs8ApgB2A7YH1gTWClIT/zyOBxL3AdcA2hcH4J8FiVyUp157W2JEmSJEn19P8AUhmiV9/cQ2oAAAAASUVORK5CYII=";
|
|
979
|
+
|
|
980
|
+
const PageVehicle = () => {
|
|
981
|
+
const { appConfigState: { appType, localIndex } } = mychoiceSdkStore.useStoreAppConfig();
|
|
982
|
+
const { vehicleState: { activeIndex, items }, dispatchVehicleState, } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
983
|
+
const [isRender, setIsRender] = React.useState(false);
|
|
984
|
+
const { dispatchDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
985
|
+
const { vehicleFormIsValid, vehicleFormValidate } = mychoiceSdkStore.useValidationVehicle();
|
|
986
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
987
|
+
window.scrollTo({
|
|
988
|
+
top: 0,
|
|
989
|
+
behavior: 'smooth',
|
|
990
|
+
});
|
|
991
|
+
});
|
|
992
|
+
React.useEffect(() => {
|
|
993
|
+
setIsRender(false);
|
|
994
|
+
}, [activeIndex]);
|
|
995
|
+
React.useEffect(() => {
|
|
996
|
+
setIsRender(true);
|
|
997
|
+
}, [isRender]);
|
|
998
|
+
const validateForm = () => vehicleFormValidate(false);
|
|
999
|
+
const createVehicle = () => {
|
|
1000
|
+
dispatchVehicleState({
|
|
1001
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleCreateVehicle,
|
|
1002
|
+
});
|
|
1003
|
+
dispatchDiscountState({
|
|
1004
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountVehlinkAdd,
|
|
1005
|
+
});
|
|
1006
|
+
window.scrollTo({
|
|
1007
|
+
top: 0,
|
|
1008
|
+
behavior: 'smooth',
|
|
1009
|
+
});
|
|
1010
|
+
};
|
|
1011
|
+
return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabVehicle, { createItem: createVehicle }), jsxRuntime.jsxs("div", { className: "form-section-container", children: [isRender && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(VehicleSectionMain, {}), jsxRuntime.jsx(VehicleSectionCoverage, {})] })), appType === mychoiceSdkComponents.AppTypes.TheBig
|
|
1012
|
+
? (jsxRuntime.jsx(NavigationBottomTheBig, { createItem: createVehicle, formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: vehicleFormIsValid }))
|
|
1013
|
+
: (jsxRuntime.jsx(NavigationBottom, { createItem: createVehicle, formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: vehicleFormIsValid }))] }), localIndex !== mychoiceSdkComponents.defaultLocalIndex
|
|
1014
|
+
&& jsxRuntime.jsx("img", { className: "logo-for-partner", src: myChoicePartnerLogo, alt: "partner logo" })] }));
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
const TabDriver = ({ createItem, readOnly }) => {
|
|
1018
|
+
const { driverState, dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
1019
|
+
const { dispatchDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
1020
|
+
const { dispatchAppModalState } = mychoiceSdkStore.useStoreAppModal();
|
|
1021
|
+
const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
|
|
1022
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
1023
|
+
const selectDriver = (driverIndex) => {
|
|
1024
|
+
dispatchDriverBaseState({
|
|
1025
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverSelect,
|
|
1026
|
+
payload: {
|
|
1027
|
+
driverIndex,
|
|
1028
|
+
},
|
|
1029
|
+
});
|
|
1030
|
+
setIsOpen(false);
|
|
1031
|
+
};
|
|
1032
|
+
const deleteDriver = (itemIndex) => {
|
|
1033
|
+
dispatchAppModalState({
|
|
1034
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalConfirmModal,
|
|
1035
|
+
payload: {
|
|
1036
|
+
title: `Are you sure you want to delete ${driverState.tabs[itemIndex]?.name} ?`,
|
|
1037
|
+
submitButtonText: 'YES',
|
|
1038
|
+
cancelButtonText: 'NO',
|
|
1039
|
+
submitCallBack: () => {
|
|
1040
|
+
dispatchDriverBaseState({
|
|
1041
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverDelete,
|
|
1042
|
+
payload: {
|
|
1043
|
+
driverIndex: itemIndex,
|
|
1044
|
+
},
|
|
1045
|
+
});
|
|
1046
|
+
dispatchDiscountState({
|
|
1047
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountVehlinkByDriverDelete,
|
|
1048
|
+
payload: {
|
|
1049
|
+
driverIndex: itemIndex,
|
|
1050
|
+
},
|
|
1051
|
+
});
|
|
1052
|
+
dispatchAppModalState({
|
|
1053
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalClose,
|
|
1054
|
+
});
|
|
1055
|
+
},
|
|
1056
|
+
},
|
|
1057
|
+
});
|
|
1058
|
+
};
|
|
1059
|
+
const handleOpenListClick = () => {
|
|
1060
|
+
setIsOpen(!isOpen);
|
|
1061
|
+
};
|
|
1062
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile ? (jsxRuntime.jsx(NavigationTabMobile, { name: "vehicle-tab-navigation-mobile", addButtonLabel: "Add a Driver", items: driverState.tabs, activeItemIndex: driverState.activeIndex, selectItem: selectDriver, createItem: createItem, removeItem: deleteDriver, isOpen: isOpen, openListClick: handleOpenListClick })) : (jsxRuntime.jsx(NavigationTab, { name: "vehicle-tab-navigation", addButtonLabel: "Add a Driver", items: driverState.tabs, activeItemIndex: driverState.activeIndex, selectItem: selectDriver, createItem: createItem, removeItem: deleteDriver, readOnly: readOnly })) }));
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
const SectionDriverInfo = () => {
|
|
1066
|
+
const { configState } = mychoiceSdkStore.useStoreFormCarConfig();
|
|
1067
|
+
const { driverState, dispatchDriverInfoState } = mychoiceSdkStore.useStoreFormCarDriverInfo();
|
|
1068
|
+
const { discountState, dispatchDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
1069
|
+
const { firstName, maritalStatus, birthDay, birthMonth, birthYear, occupation, gender, applicantRelationship, } = driverState.items[driverState.activeIndex];
|
|
1070
|
+
const defaultDateOfBirth = {
|
|
1071
|
+
day: birthDay,
|
|
1072
|
+
month: birthMonth,
|
|
1073
|
+
year: birthYear,
|
|
1074
|
+
};
|
|
1075
|
+
React.useEffect(() => {
|
|
1076
|
+
if (discountState.quoterInfo.firstName !== driverState.items[0].firstName) {
|
|
1077
|
+
dispatchDiscountState({
|
|
1078
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterFirstNameSet,
|
|
1079
|
+
payload: { firstName: driverState.items[0].firstName },
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
}, [driverState.items[0].firstName]);
|
|
1083
|
+
const handleFirstNameChange = ({ value }) => {
|
|
1084
|
+
dispatchDriverInfoState({
|
|
1085
|
+
type: mychoiceSdkStore.StoreFormCarDriverInfoActionTypes.FormCarDriverNameSet,
|
|
1086
|
+
payload: { firstName: value },
|
|
1087
|
+
});
|
|
1088
|
+
};
|
|
1089
|
+
const handleMaritalStatusChange = ({ value }) => {
|
|
1090
|
+
dispatchDriverInfoState({
|
|
1091
|
+
type: mychoiceSdkStore.StoreFormCarDriverInfoActionTypes.FormCarDriverMaritalStatusSelect,
|
|
1092
|
+
payload: { maritalStatus: value },
|
|
1093
|
+
});
|
|
1094
|
+
};
|
|
1095
|
+
const handleDateOfBirthChange = (dateType) => ({ value }) => {
|
|
1096
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Day) {
|
|
1097
|
+
dispatchDriverInfoState({
|
|
1098
|
+
type: mychoiceSdkStore.StoreFormCarDriverInfoActionTypes.FormCarDriverBirthDaySelect,
|
|
1099
|
+
payload: { birthDay: value, config: configState },
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1103
|
+
dispatchDriverInfoState({
|
|
1104
|
+
type: mychoiceSdkStore.StoreFormCarDriverInfoActionTypes.FormCarDriverBirthMonthSelect,
|
|
1105
|
+
payload: { birthMonth: value, config: configState },
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1109
|
+
dispatchDriverInfoState({
|
|
1110
|
+
type: mychoiceSdkStore.StoreFormCarDriverInfoActionTypes.FormCarDriverBirthYearSelect,
|
|
1111
|
+
payload: { birthYear: value, config: configState },
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
};
|
|
1115
|
+
const handleOccupationChange = ({ value }) => {
|
|
1116
|
+
dispatchDriverInfoState({
|
|
1117
|
+
type: mychoiceSdkStore.StoreFormCarDriverInfoActionTypes.FormCarDriverOccupationSelect,
|
|
1118
|
+
payload: { occupation: value },
|
|
1119
|
+
});
|
|
1120
|
+
};
|
|
1121
|
+
const handleGenderChange = ({ value }) => {
|
|
1122
|
+
dispatchDriverInfoState({
|
|
1123
|
+
type: mychoiceSdkStore.StoreFormCarDriverInfoActionTypes.FormCarDriverGenderSelect,
|
|
1124
|
+
payload: { gender: value },
|
|
1125
|
+
});
|
|
1126
|
+
};
|
|
1127
|
+
const handleApplicantRelationshipChange = ({ value }) => {
|
|
1128
|
+
dispatchDriverInfoState({
|
|
1129
|
+
type: mychoiceSdkStore.StoreFormCarDriverInfoActionTypes.FormCarDriverApplicantRelationshipSelect,
|
|
1130
|
+
payload: { applicantRelationship: value },
|
|
1131
|
+
});
|
|
1132
|
+
};
|
|
1133
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx(InputFormBox, { name: "firstName", title: "What is your legal first name?", onChange: handleFirstNameChange, defaultValue: firstName, description: "The name on a policy should match the one on your official driver\u2019s licence.", placeholder: "Driver First Name", error: !firstName && driverState.inValidation, errorMessage: getErrorMessage(firstName, driverState.inValidation) }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.maritalStatusOptions, name: "maritalStatus", onChange: handleMaritalStatusChange, defaultValue: getSelectedOption(mychoiceSdkComponents.maritalStatusOptions, maritalStatus), title: "What is your marital status?", placeholder: "Select from the list", description: "If you are married, it may have a positive effect on your car insurance premiums and coverage. In some provinces, the law now considers same-sex partners to have a common-law marriage, so you will need to check your local regulations. If you are divorced or widowed, select single.", autoSelectIfValueIsOutOfOptions: false, error: !maritalStatus && driverState.inValidation, errorMessage: getErrorMessage(maritalStatus, driverState.inValidation) }), jsxRuntime.jsx(DateSelectFormBox, { name: "dateOfBirth", dateNames: ['birthYear', 'birthMonth', 'birthDay'], onDateChange: handleDateOfBirthChange, defaultValue: defaultDateOfBirth, title: "When were you born?", description: "Insurers generally consider your age and driving experience when calculating a vehicle insurance quote. The safest drivers are often those who are over thirty, but each insurer will have their own parameters. The youngest and oldest drivers have the greatest liability reflected in their premiums due to inexperience or health complications, respectively.", errorMessage: getDateErrorMessage([birthDay || '', birthMonth || '', birthYear || ''], driverState.inValidation), error: driverState.inValidation, maxDate: mychoiceSdkComponents.subYearsFromDate('', configState.licenceConfig.minLicenceAge || 16), isDay: true }), jsxRuntime.jsx(SwitchButtonBox, { name: "occupation", items: mychoiceSdkComponents.occupationOptions, onChange: handleOccupationChange, defaultValue: getSelectedOption(mychoiceSdkComponents.occupationOptions, occupation), title: "Are you currently employed or unemployed?", description: "Your employment status reflects your driving frequency, and insurers consider this in your policy." }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.genderOptions, onChange: handleGenderChange, name: "gender", defaultValue: getSelectedOption(mychoiceSdkComponents.genderOptions, gender), title: "What is your gender?", description: "The gender on the policy should match your official driver\u2019s licence. Some insurers analyze a driver's sex when creating a policy. Men are typically considered higher risk than female drivers, but the statistics supporting this idea vary from province to province. On average, men and women pay roughly the same for insurance, though." }), driverState.activeIndex > 0
|
|
1134
|
+
&& (jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.applicantRelationshipOptions, name: "applicantRelationship", onChange: handleApplicantRelationshipChange, defaultValue: getSelectedOption(mychoiceSdkComponents.applicantRelationshipOptions, applicantRelationship), title: "Relationship to applicant", placeholder: "Select...", autoSelectIfValueIsOutOfOptions: false, error: !applicantRelationship && driverState.inValidation, errorMessage: getErrorMessage(applicantRelationship, driverState.inValidation) }))] }));
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1137
|
+
const getLicenceTypeOptions = (options, optionValues, disabled) => (options.map((option) => {
|
|
1138
|
+
const newOption = option;
|
|
1139
|
+
if (optionValues.includes(option.value)) {
|
|
1140
|
+
newOption.disabled = disabled;
|
|
1141
|
+
}
|
|
1142
|
+
return newOption;
|
|
1143
|
+
}));
|
|
1144
|
+
const checkDateIsSpecial = (defaultMinDate, specialDate) => mychoiceSdkComponents.compareDates(specialDate, defaultMinDate) >= 0;
|
|
1145
|
+
const getLicenceMinDate = (licenceType, defaultMinDate, config) => {
|
|
1146
|
+
if (defaultMinDate) {
|
|
1147
|
+
if (licenceType === mychoiceSdkComponents.DriverLicenceTypes.G1) {
|
|
1148
|
+
return mychoiceSdkComponents.addMonthsToDate(defaultMinDate, config.minDates.g1.minMonth);
|
|
1149
|
+
}
|
|
1150
|
+
if (licenceType === mychoiceSdkComponents.DriverLicenceTypes.G) {
|
|
1151
|
+
if (checkDateIsSpecial(defaultMinDate, config.minDates.g.specialDate)) {
|
|
1152
|
+
return defaultMinDate;
|
|
1153
|
+
}
|
|
1154
|
+
return mychoiceSdkComponents.addMonthsToDate(defaultMinDate, config.minDates.g.minMonth);
|
|
1155
|
+
}
|
|
1156
|
+
if (licenceType === mychoiceSdkComponents.DriverLicenceTypes.G2) {
|
|
1157
|
+
return mychoiceSdkComponents.addMonthsToDate(defaultMinDate, config.minDates.g2.minMonth);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
return '';
|
|
1161
|
+
};
|
|
1162
|
+
const getLicenceMaxDate = (licenceType, minDate, config) => {
|
|
1163
|
+
let maxDate = '';
|
|
1164
|
+
const { minDates: { g: { specialDate } } } = config;
|
|
1165
|
+
if (licenceType === mychoiceSdkComponents.DriverLicenceTypes.G
|
|
1166
|
+
&& mychoiceSdkComponents.compareDates(specialDate, minDate) >= 0) {
|
|
1167
|
+
maxDate = config.minDates.g.specialDate;
|
|
1168
|
+
}
|
|
1169
|
+
return mychoiceSdkComponents.getFormattedDate(maxDate, 'yyyy-MM-dd');
|
|
1170
|
+
};
|
|
1171
|
+
const getDisabledLicenceTypes = (gBlock, g2Block, g1Block) => {
|
|
1172
|
+
const disabledLicenceTypes = [];
|
|
1173
|
+
if (gBlock) {
|
|
1174
|
+
disabledLicenceTypes.push(mychoiceSdkComponents.DriverLicenceTypes.G);
|
|
1175
|
+
}
|
|
1176
|
+
if (g1Block) {
|
|
1177
|
+
disabledLicenceTypes.push(mychoiceSdkComponents.DriverLicenceTypes.G1);
|
|
1178
|
+
}
|
|
1179
|
+
if (g2Block) {
|
|
1180
|
+
disabledLicenceTypes.push(mychoiceSdkComponents.DriverLicenceTypes.G2);
|
|
1181
|
+
}
|
|
1182
|
+
return disabledLicenceTypes;
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
const SectionDriverLicence = () => {
|
|
1186
|
+
const [driverEducation, setDriverEducation] = React.useState(false);
|
|
1187
|
+
const { configState } = mychoiceSdkStore.useStoreFormCarConfig();
|
|
1188
|
+
const { driverState, dispatchDriverLicenceState } = mychoiceSdkStore.useStoreFormCarDriverLicence();
|
|
1189
|
+
const { firstName, birthDay, birthMonth, birthYear, licenceInfo: { firstLicenceAge, licenceType, g1LicenceYear, g1LicenceMonth, gLicenceYear, gLicenceMonth, g2LicenceYear, g2LicenceMonth, passedDriverTraining, previousLicence, }, minMaxDates, } = driverState.items[driverState.activeIndex];
|
|
1190
|
+
const { gMax = mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd'), gMin = '1922-01-01', gOneMax = mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd'), gOneMin = '1922-01-01', gTwoMax = mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd'), gTwoMin = '1922-01-01', gBlock = false, gTwoBlock = false, gOneBlock = false, licenceAgeMax = 16, } = minMaxDates ?? {};
|
|
1191
|
+
const maxLicenceAge = licenceAgeMax;
|
|
1192
|
+
const driverNameDefault = `Driver ${driverState.activeIndex + 1}`;
|
|
1193
|
+
const birthDate = birthYear && birthMonth && birthDay ? `${birthYear}-${birthMonth}-${birthDay}` : '';
|
|
1194
|
+
const defaultMinDate = birthDate && firstLicenceAge ? mychoiceSdkComponents.addYearsToDate(birthDate, +firstLicenceAge) : '';
|
|
1195
|
+
const isOnlyG = checkDateIsSpecial(defaultMinDate, configState.minDates.g.specialDate);
|
|
1196
|
+
const { g, g1, g2, minLicenceAge, } = configState.licenceConfig;
|
|
1197
|
+
const licenceTypeOptions = [
|
|
1198
|
+
{ value: g.name, name: g.title },
|
|
1199
|
+
{ value: g1.name, name: g1.title },
|
|
1200
|
+
{ value: g2.name, name: g2.title },
|
|
1201
|
+
];
|
|
1202
|
+
React.useEffect(() => {
|
|
1203
|
+
if (!gOneBlock && !gTwoBlock) {
|
|
1204
|
+
if (licenceType !== mychoiceSdkComponents.DriverLicenceTypes.G1) {
|
|
1205
|
+
const g2Date = mychoiceSdkStore.addDayToDate(`${g2LicenceYear}-${g2LicenceMonth}`, birthDay ? +birthDay + 1 : 1);
|
|
1206
|
+
if (mychoiceSdkComponents.getDifferenceInYears('', g2Date) <= 3) {
|
|
1207
|
+
setDriverEducation(true);
|
|
1208
|
+
}
|
|
1209
|
+
else {
|
|
1210
|
+
setDriverEducation(false);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
else {
|
|
1214
|
+
setDriverEducation(false);
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}, [g2LicenceYear, g2LicenceMonth, licenceType]);
|
|
1218
|
+
const getMinDate = (type) => {
|
|
1219
|
+
switch (type) {
|
|
1220
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G:
|
|
1221
|
+
return gMin;
|
|
1222
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G1:
|
|
1223
|
+
return gOneMin;
|
|
1224
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G2:
|
|
1225
|
+
return gTwoMin;
|
|
1226
|
+
default: return '';
|
|
1227
|
+
}
|
|
1228
|
+
};
|
|
1229
|
+
const getMaxDate = (type) => {
|
|
1230
|
+
switch (type) {
|
|
1231
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G:
|
|
1232
|
+
return gMax;
|
|
1233
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G1:
|
|
1234
|
+
return gOneMax;
|
|
1235
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G2:
|
|
1236
|
+
return gTwoMax;
|
|
1237
|
+
default: return '';
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1240
|
+
const getLicenceYear = (type) => {
|
|
1241
|
+
switch (type) {
|
|
1242
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G:
|
|
1243
|
+
return gLicenceYear;
|
|
1244
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G1:
|
|
1245
|
+
return g1LicenceYear;
|
|
1246
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G2:
|
|
1247
|
+
return g2LicenceYear;
|
|
1248
|
+
default: return '';
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
const getLicenceMonth = (type) => {
|
|
1252
|
+
switch (type) {
|
|
1253
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G:
|
|
1254
|
+
return gLicenceMonth;
|
|
1255
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G1:
|
|
1256
|
+
return g1LicenceMonth;
|
|
1257
|
+
case mychoiceSdkComponents.DriverLicenceTypes.G2:
|
|
1258
|
+
return g2LicenceMonth;
|
|
1259
|
+
default: return '';
|
|
1260
|
+
}
|
|
1261
|
+
};
|
|
1262
|
+
const getDefaultLicenceDate = (type) => ({
|
|
1263
|
+
year: getLicenceYear(type),
|
|
1264
|
+
month: getLicenceMonth(type),
|
|
1265
|
+
day: birthDay || '01',
|
|
1266
|
+
});
|
|
1267
|
+
const handleLicenceAgeChange = ({ value }) => {
|
|
1268
|
+
dispatchDriverLicenceState({
|
|
1269
|
+
type: mychoiceSdkStore.StoreFormCarDriverLicenceActionTypes.FormCarDriverLicenceAgeSelect,
|
|
1270
|
+
payload: { firstLicenceAge: value, config: configState },
|
|
1271
|
+
});
|
|
1272
|
+
};
|
|
1273
|
+
const handleLicenceTypeChange = ({ value }) => {
|
|
1274
|
+
dispatchDriverLicenceState({
|
|
1275
|
+
type: mychoiceSdkStore.StoreFormCarDriverLicenceActionTypes.FormCarDriverLicenceTypeSelect,
|
|
1276
|
+
payload: { licenceType: value, config: configState },
|
|
1277
|
+
});
|
|
1278
|
+
};
|
|
1279
|
+
const handleTrainingChange = ({ value }) => {
|
|
1280
|
+
dispatchDriverLicenceState({
|
|
1281
|
+
type: mychoiceSdkStore.StoreFormCarDriverLicenceActionTypes.FormCarDriverTrainingSelect,
|
|
1282
|
+
payload: { training: value },
|
|
1283
|
+
});
|
|
1284
|
+
};
|
|
1285
|
+
const handlePreviousLicenceChange = ({ value }) => {
|
|
1286
|
+
dispatchDriverLicenceState({
|
|
1287
|
+
type: mychoiceSdkStore.StoreFormCarDriverLicenceActionTypes.FormCarDriverPreviousLicenceSelect,
|
|
1288
|
+
payload: { previousLicence: value },
|
|
1289
|
+
});
|
|
1290
|
+
};
|
|
1291
|
+
const handleLicenceDateChange = (type) => (dateType) => ({ value }) => {
|
|
1292
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1293
|
+
dispatchDriverLicenceState({
|
|
1294
|
+
type: mychoiceSdkStore.StoreFormCarDriverLicenceActionTypes.FormCarDriverLicenceMonthSelect,
|
|
1295
|
+
payload: { value: value, config: configState, type },
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1299
|
+
dispatchDriverLicenceState({
|
|
1300
|
+
type: mychoiceSdkStore.StoreFormCarDriverLicenceActionTypes.FormCarDriverLicenceYearSelect,
|
|
1301
|
+
payload: { value: value, config: configState, type },
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1305
|
+
const getHintMessage = (type) => {
|
|
1306
|
+
const currentType = type || licenceType;
|
|
1307
|
+
const licenceMinDate = getMinDate(currentType);
|
|
1308
|
+
const licenceTypeTitle = configState.licenceConfig[currentType].title;
|
|
1309
|
+
const formattedMinDate = `${mychoiceSdkComponents.getFormattedDate(licenceMinDate, 'MMMM yyyy')}`;
|
|
1310
|
+
const defaultHintMessage = `${formattedMinDate} would be your earliest ${licenceTypeTitle}
|
|
1311
|
+
licence date based on your first licenced age and date of birth`;
|
|
1312
|
+
return currentType === mychoiceSdkComponents.DriverLicenceTypes.G2 ? `${defaultHintMessage}
|
|
1313
|
+
if you completed a driver education course` : defaultHintMessage;
|
|
1314
|
+
};
|
|
1315
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx(InputFormBox, { name: "firstLicenceAge", title: `What age was ${firstName || driverNameDefault} when first licenced?`, onChange: handleLicenceAgeChange, type: mychoiceSdkComponents.InputTypes.Number, defaultValue: firstLicenceAge, description: configState.toolTip.licenceAge, hintMessage: birthDate ? `${firstName || driverNameDefault} was licenced in
|
|
1316
|
+
${Number(birthYear) + Number(firstLicenceAge)} - ${Number(birthYear) + Number(firstLicenceAge) + 1}` : '', placeholder: "Select Licence Age", disabled: !birthDate, error: !firstLicenceAge && driverState.inValidation, errorMessage: getErrorMessage(firstLicenceAge, driverState.inValidation), minValue: minLicenceAge || 16, maxValue: maxLicenceAge }), jsxRuntime.jsx(SelectFormBox, { options: getLicenceTypeOptions(licenceTypeOptions, getDisabledLicenceTypes(gBlock, gTwoBlock, gOneBlock), true), name: "licenceType", onChange: handleLicenceTypeChange, defaultValue: getSelectedOption(licenceTypeOptions, licenceType), title: `Please choose the type of licence that ${firstName || driverNameDefault} currently holds`, placeholder: "Select from the list", disabled: !birthDate, description: configState.toolTip.licenceType, autoSelectIfValueIsOutOfOptions: false }), licenceType === mychoiceSdkComponents.DriverLicenceTypes.G && !isOnlyG
|
|
1317
|
+
&& (jsxRuntime.jsx(DateSelectFormBox, { name: "g2LicenceDate", dateNames: ['g2LicenceYear', 'g2LicenceMonth'], onDateChange: handleLicenceDateChange(mychoiceSdkComponents.DriverLicenceTypes.G2), defaultValue: getDefaultLicenceDate(mychoiceSdkComponents.DriverLicenceTypes.G2), title: `${configState.licenceConfig.g2.title} licence date`, errorMessage: getDateErrorMessage(['01', g2LicenceMonth, g2LicenceYear], driverState.inValidation), hintMessage: getHintMessage(mychoiceSdkComponents.DriverLicenceTypes.G2), error: driverState.inValidation, minDate: getMinDate(mychoiceSdkComponents.DriverLicenceTypes.G2), maxDate: getMaxDate(mychoiceSdkComponents.DriverLicenceTypes.G2) })), licenceType && (jsxRuntime.jsx(DateSelectFormBox, { name: `${licenceType}LicenceDate`, dateNames: [`${licenceType}LicenceYear`, `${licenceType}LicenceMonth`], onDateChange: handleLicenceDateChange(), defaultValue: getDefaultLicenceDate(licenceType), title: `${configState.licenceConfig[licenceType].title} licence date`, errorMessage: getDateErrorMessage(['01', getLicenceMonth(licenceType), getLicenceYear(licenceType)], driverState.inValidation), hintMessage: getHintMessage(), error: driverState.inValidation, maxDate: getMaxDate(licenceType), minDate: getMinDate(licenceType) })), driverEducation
|
|
1318
|
+
&& (jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleTrainingChange, name: "passedDriverTraining", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, passedDriverTraining), title: `Has ${firstName || driverNameDefault} completed a driver education course within the last 3 years?` })), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handlePreviousLicenceChange, name: "previousLicence", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, previousLicence), title: `Has ${firstName || driverNameDefault} ever had a full license anywhere else in Canada or USA?`, description: "If you have driving experience outside Canada or the United States, it may lower your premium. Your insurer may require proof of insurance in these other locations or some proof of driving experience from the country you indicate (like a copy of a previous driver\u2019s licence)." })] }));
|
|
1319
|
+
};
|
|
1320
|
+
|
|
1321
|
+
const SectionDriverInsurancePolicy = () => {
|
|
1322
|
+
const [hintMessage, setHintMessage] = React.useState('');
|
|
1323
|
+
const { configState } = mychoiceSdkStore.useStoreFormCarConfig();
|
|
1324
|
+
const { driverState, dispatchDriverInsuranceState } = mychoiceSdkStore.useStoreFormCarDriverInsurance();
|
|
1325
|
+
const { discountState, dispatchDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
1326
|
+
const { quoteState: { isRequested } } = mychoiceSdkStore.useStoreFormCarQuote();
|
|
1327
|
+
const { listed, listedMonth = '', listedYear = '', insured, insuredDate = '', firstName, birthYear, birthMonth, birthDay, licenceInfo: { firstLicenceAge, licenceType, gLicenceYear, gLicenceMonth, g1LicenceYear, g1LicenceMonth, }, } = driverState.items[driverState.activeIndex];
|
|
1328
|
+
const { policyStartYear, policyStartMonth, policyStartDay } = discountState;
|
|
1329
|
+
const driverNameDefault = `Driver ${driverState.activeIndex + 1}`;
|
|
1330
|
+
const birthDate = birthYear && birthMonth && birthDay ? `${birthYear}-${birthMonth}-${birthDay}` : '';
|
|
1331
|
+
const getPeriodOptions = (year, month) => {
|
|
1332
|
+
const options = [{ value: '', name: 'Date Period', disabled: true }];
|
|
1333
|
+
if (year && month) {
|
|
1334
|
+
const listedDate = mychoiceSdkComponents.addDaysToDate(`${year}-${month}-01`, birthDay ? +birthDay + 1 : 1);
|
|
1335
|
+
const yearPeriod = mychoiceSdkComponents.getDifferenceInYears('', listedDate) || 0;
|
|
1336
|
+
for (let y = yearPeriod; y >= 0; y -= 1) {
|
|
1337
|
+
switch (true) {
|
|
1338
|
+
case y === 0:
|
|
1339
|
+
options.push({
|
|
1340
|
+
value: mychoiceSdkComponents.subMonthsFromDate('', 10),
|
|
1341
|
+
name: 'Less than 1 Year',
|
|
1342
|
+
});
|
|
1343
|
+
break;
|
|
1344
|
+
case y === 1:
|
|
1345
|
+
options.push({ value: mychoiceSdkComponents.addYearsToDate(listedDate, y), name: '1 Year' });
|
|
1346
|
+
break;
|
|
1347
|
+
default:
|
|
1348
|
+
options.push({
|
|
1349
|
+
value: mychoiceSdkComponents.addYearsToDate(listedDate, y),
|
|
1350
|
+
name: `${y} Years`,
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
return options;
|
|
1356
|
+
};
|
|
1357
|
+
const defaultListedDate = {
|
|
1358
|
+
year: listedYear,
|
|
1359
|
+
month: listedMonth,
|
|
1360
|
+
day: '01',
|
|
1361
|
+
};
|
|
1362
|
+
const defaultPolicyStartDate = {
|
|
1363
|
+
year: policyStartYear,
|
|
1364
|
+
month: policyStartMonth,
|
|
1365
|
+
day: policyStartDay,
|
|
1366
|
+
};
|
|
1367
|
+
React.useEffect(() => {
|
|
1368
|
+
if (listedYear && listedMonth && !isRequested) {
|
|
1369
|
+
const options = getPeriodOptions(listedYear, listedMonth);
|
|
1370
|
+
if (options.length > 1) {
|
|
1371
|
+
dispatchDriverInsuranceState({
|
|
1372
|
+
type: mychoiceSdkStore.StoreFormCarDriverInsuranceActionTypes.FormCarDriverInsuredDateSelect,
|
|
1373
|
+
payload: { insuredDate: options[1].value },
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}, [listedYear, listedMonth]);
|
|
1378
|
+
React.useEffect(() => {
|
|
1379
|
+
if (listedYear && listedMonth && listed) {
|
|
1380
|
+
const listedDate = mychoiceSdkComponents.addDaysToDate(`${listedYear}-${listedMonth}-01`, birthDay ? +birthDay + 1 : 1);
|
|
1381
|
+
const setMessage = (licenceYear, licenceMonth) => {
|
|
1382
|
+
const licenceDate = mychoiceSdkComponents.addDaysToDate(`${licenceYear}-${licenceMonth}-01`, birthDay ? +birthDay + 1 : 1);
|
|
1383
|
+
const yearsPeriod = mychoiceSdkComponents.getDifferenceInYears(listedDate, licenceDate);
|
|
1384
|
+
if (yearsPeriod >= 5) {
|
|
1385
|
+
setHintMessage(`We noticed that you received your licence ${yearsPeriod} years before
|
|
1386
|
+
you had insurance. If this is correct, please continue with the form.`);
|
|
1387
|
+
}
|
|
1388
|
+
else {
|
|
1389
|
+
setHintMessage('');
|
|
1390
|
+
}
|
|
1391
|
+
};
|
|
1392
|
+
if (birthDate) {
|
|
1393
|
+
const defaultMinDate = birthDate && firstLicenceAge ? mychoiceSdkComponents.addYearsToDate(birthDate, +firstLicenceAge) : '';
|
|
1394
|
+
const isOnlyG = checkDateIsSpecial(defaultMinDate, configState.minDates.g.specialDate);
|
|
1395
|
+
if (isOnlyG) {
|
|
1396
|
+
setMessage(gLicenceYear, gLicenceMonth);
|
|
1397
|
+
}
|
|
1398
|
+
else if (licenceType === mychoiceSdkComponents.DriverLicenceTypes.G1) {
|
|
1399
|
+
setMessage(g1LicenceYear, g1LicenceMonth);
|
|
1400
|
+
}
|
|
1401
|
+
else {
|
|
1402
|
+
const licenceDate = mychoiceSdkComponents.addYearsToDate(birthDate, firstLicenceAge);
|
|
1403
|
+
const licenceYear = mychoiceSdkComponents.getFormattedDate(licenceDate, 'yyyy');
|
|
1404
|
+
const licenceMonth = mychoiceSdkComponents.getFormattedDate(licenceDate, 'MM');
|
|
1405
|
+
setMessage(licenceYear, licenceMonth);
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
else {
|
|
1410
|
+
setHintMessage('');
|
|
1411
|
+
}
|
|
1412
|
+
}, [listedYear, listedMonth, g1LicenceYear, g1LicenceMonth, firstLicenceAge, birthDate, gLicenceYear, gLicenceMonth]);
|
|
1413
|
+
const handleInsuredChange = ({ value }) => {
|
|
1414
|
+
dispatchDriverInsuranceState({
|
|
1415
|
+
type: mychoiceSdkStore.StoreFormCarDriverInsuranceActionTypes.FormCarDriverInsuredSelect,
|
|
1416
|
+
payload: { insured: !value },
|
|
1417
|
+
});
|
|
1418
|
+
};
|
|
1419
|
+
const handleListedChange = ({ value }) => {
|
|
1420
|
+
dispatchDriverInsuranceState({
|
|
1421
|
+
type: mychoiceSdkStore.StoreFormCarDriverInsuranceActionTypes.FormCarDriverListedSelect,
|
|
1422
|
+
payload: { listed: !value },
|
|
1423
|
+
});
|
|
1424
|
+
};
|
|
1425
|
+
const handleInsuredPeriodChange = ({ value }) => {
|
|
1426
|
+
dispatchDriverInsuranceState({
|
|
1427
|
+
type: mychoiceSdkStore.StoreFormCarDriverInsuranceActionTypes.FormCarDriverInsuredDateSelect,
|
|
1428
|
+
payload: { insuredDate: value },
|
|
1429
|
+
});
|
|
1430
|
+
};
|
|
1431
|
+
const handleListedDateChange = (dateType) => ({ value }) => {
|
|
1432
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1433
|
+
dispatchDriverInsuranceState({
|
|
1434
|
+
type: mychoiceSdkStore.StoreFormCarDriverInsuranceActionTypes.FormCarDriverListedMonthSelect,
|
|
1435
|
+
payload: { listedMonth: value },
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1439
|
+
dispatchDriverInsuranceState({
|
|
1440
|
+
type: mychoiceSdkStore.StoreFormCarDriverInsuranceActionTypes.FormCarDriverListedYearSelect,
|
|
1441
|
+
payload: { listedYear: value },
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
};
|
|
1445
|
+
const handlePolicyStartDateChange = (dateType) => ({ value }) => {
|
|
1446
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Day) {
|
|
1447
|
+
dispatchDiscountState({
|
|
1448
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountPolicyStartDaySelect,
|
|
1449
|
+
payload: { policyStartDay: value },
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1453
|
+
dispatchDiscountState({
|
|
1454
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountPolicyStartMonthSelect,
|
|
1455
|
+
payload: { policyStartMonth: value },
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1459
|
+
dispatchDiscountState({
|
|
1460
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountPolicyStartYearSelect,
|
|
1461
|
+
payload: { policyStartYear: value },
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
};
|
|
1465
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsxs("div", { className: "box-container", children: [jsxRuntime.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 ? getDateErrorMessage(['01', listedMonth, listedYear], driverState.inValidation) : '', error: driverState.inValidation, hintMessage: hintMessage, minDate: mychoiceSdkComponents.getMinDate(birthDate, firstLicenceAge) }), jsxRuntime.jsx(mychoiceSdkComponents.CheckboxForm, { name: "listed", label: "Never listed on an insurance policy", onChange: handleListedChange, defaultValue: !listed })] }), listed
|
|
1466
|
+
&& (jsxRuntime.jsxs("div", { className: "box-container", children: [jsxRuntime.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 ? getErrorMessage(insuredDate, driverState.inValidation) : '', error: !insuredDate && driverState.inValidation }), jsxRuntime.jsx(mychoiceSdkComponents.CheckboxForm, { name: "insured", label: "Not currently insured", onChange: handleInsuredChange, defaultValue: !insured })] })), jsxRuntime.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([
|
|
1467
|
+
policyStartDay || '',
|
|
1468
|
+
policyStartMonth || '',
|
|
1469
|
+
policyStartYear || '',
|
|
1470
|
+
], driverState.inValidation), error: driverState.inValidation, minDate: mychoiceSdkComponents.addDaysToDate('', 1), maxDate: mychoiceSdkComponents.addDaysToDate('', 60), isDay: true })] }));
|
|
1471
|
+
};
|
|
1472
|
+
|
|
1473
|
+
const SectionDriverCancellation = () => {
|
|
1474
|
+
const { driverState, dispatchDriverCancellationState } = mychoiceSdkStore.useStoreFormCarDriverCancellation();
|
|
1475
|
+
const { dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
1476
|
+
const { insuranceCancellation, insuranceCancellationList = [] } = driverState.items[driverState.activeIndex];
|
|
1477
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
1478
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
1479
|
+
const { firstName, birthYear, birthMonth, birthDay, licenceInfo: { firstLicenceAge }, } = driverState.items[driverState.activeIndex];
|
|
1480
|
+
const birthDate = birthYear && birthMonth && birthDay ? `${birthYear}-${birthMonth}-${birthDay}` : '';
|
|
1481
|
+
const handleIconClick = (index) => () => {
|
|
1482
|
+
dispatchDriverCancellationState({
|
|
1483
|
+
type: mychoiceSdkStore.StoreFormCarDriverCancellationActionTypes.FormCarDriverInsuranceCancellationDelete,
|
|
1484
|
+
payload: { itemIndex: index },
|
|
1485
|
+
});
|
|
1486
|
+
};
|
|
1487
|
+
const handleCancellationChange = ({ value }) => {
|
|
1488
|
+
dispatchDriverCancellationState({
|
|
1489
|
+
type: mychoiceSdkStore.StoreFormCarDriverCancellationActionTypes.FormCarDriverInsuranceCancellationSelect,
|
|
1490
|
+
payload: { insuranceCancellation: value },
|
|
1491
|
+
});
|
|
1492
|
+
if (!value) {
|
|
1493
|
+
dispatchDriverBaseState({
|
|
1494
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverInitialList,
|
|
1495
|
+
payload: { listKey: mychoiceSdkComponents.DriverListTypes.InsuranceCancellation },
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
};
|
|
1499
|
+
const handleAddButtonClick = () => {
|
|
1500
|
+
dispatchDriverCancellationState({
|
|
1501
|
+
type: mychoiceSdkStore.StoreFormCarDriverCancellationActionTypes.FormCarDriverInsuranceCancellationAdd,
|
|
1502
|
+
});
|
|
1503
|
+
};
|
|
1504
|
+
const handleReasonChange = (index) => ({ value }) => {
|
|
1505
|
+
dispatchDriverCancellationState({
|
|
1506
|
+
type: mychoiceSdkStore.StoreFormCarDriverCancellationActionTypes.FormCarDriverInsuranceCancelReasonSelect,
|
|
1507
|
+
payload: {
|
|
1508
|
+
reason: value,
|
|
1509
|
+
index,
|
|
1510
|
+
},
|
|
1511
|
+
});
|
|
1512
|
+
};
|
|
1513
|
+
const handleStartDateChange = (index) => (dateType) => ({ value }) => {
|
|
1514
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1515
|
+
dispatchDriverCancellationState({
|
|
1516
|
+
type: mychoiceSdkStore.StoreFormCarDriverCancellationActionTypes.FormCarDriverInsuranceCancelStartMonthSelect,
|
|
1517
|
+
payload: {
|
|
1518
|
+
startMonth: value,
|
|
1519
|
+
index,
|
|
1520
|
+
},
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1524
|
+
dispatchDriverCancellationState({
|
|
1525
|
+
type: mychoiceSdkStore.StoreFormCarDriverCancellationActionTypes.FormCarDriverInsuranceCancelStartYearSelect,
|
|
1526
|
+
payload: {
|
|
1527
|
+
startYear: value,
|
|
1528
|
+
index,
|
|
1529
|
+
},
|
|
1530
|
+
});
|
|
1531
|
+
}
|
|
1532
|
+
};
|
|
1533
|
+
const handleEndDateChange = (index) => (dateType) => ({ value }) => {
|
|
1534
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1535
|
+
dispatchDriverCancellationState({
|
|
1536
|
+
type: mychoiceSdkStore.StoreFormCarDriverCancellationActionTypes.FormCarDriverInsuranceCancelEndMonthSelect,
|
|
1537
|
+
payload: {
|
|
1538
|
+
endMonth: value,
|
|
1539
|
+
index,
|
|
1540
|
+
},
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1544
|
+
dispatchDriverCancellationState({
|
|
1545
|
+
type: mychoiceSdkStore.StoreFormCarDriverCancellationActionTypes.FormCarDriverInsuranceCancelEndYearSelect,
|
|
1546
|
+
payload: {
|
|
1547
|
+
endYear: value,
|
|
1548
|
+
index,
|
|
1549
|
+
},
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
};
|
|
1553
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx("h2", { className: isTheBig ? 'thebig-bold' : '', children: "Insurance Cancellation" }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleCancellationChange, name: "insuranceCancellation", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, insuranceCancellation), title: `Has ${firstName} had an insurance company cancellation or
|
|
1554
|
+
a time without insurance coverage, within the past 3 years?`, description: "If an insurance company cancels your policy, it will increase your future insurance premiums. The most common reasons for cancellations include missed payments, excessive claims, false declarations, or criminal actions, for example. If you cancel the insurance policy, it is not relevant." }), insuranceCancellation && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [insuranceCancellationList?.map(({ cancellationReason, startYear, startMonth, endYear, endMonth, }, index) => {
|
|
1555
|
+
const defaultStartDate = {
|
|
1556
|
+
year: startYear,
|
|
1557
|
+
month: startMonth,
|
|
1558
|
+
};
|
|
1559
|
+
const defaultEndDate = {
|
|
1560
|
+
year: endYear,
|
|
1561
|
+
month: endMonth,
|
|
1562
|
+
};
|
|
1563
|
+
const now = mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd');
|
|
1564
|
+
const days = birthDay ? (+birthDay + 1) : 1;
|
|
1565
|
+
const endDate = endYear && endMonth ? mychoiceSdkStore.addDayToDate(`${endYear}-${endMonth}`, days) : now;
|
|
1566
|
+
const currentMinDate = mychoiceSdkComponents.getMinDateByYears(mychoiceSdkComponents.getMinDate(birthDate, firstLicenceAge), 3);
|
|
1567
|
+
const currentEndDate = mychoiceSdkComponents.compareDates(endDate, currentMinDate) < 0 ? currentMinDate : endDate;
|
|
1568
|
+
return (jsxRuntime.jsxs("div", { className: "list-block", children: [jsxRuntime.jsx("hr", {}), jsxRuntime.jsxs("div", { className: "list-item", children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.insuranceCancellationReasonOptions, name: `cancellationReason-${index}`, onChange: handleReasonChange(index), defaultValue: cancellationReason, title: "Reason", placeholder: "Select from the list", isRemovable: insuranceCancellationList.length > 1, onIconClick: handleIconClick(index), autoSelectIfValueIsOutOfOptions: false, error: !cancellationReason && driverState.inValidation, errorMessage: getErrorMessage(cancellationReason, driverState.inValidation) }), jsxRuntime.jsx(DateSelectFormBox, { name: `startDate-${index}`, dateNames: [`startYear-${index}`, `startMonth-${index}`], onDateChange: handleStartDateChange(index), defaultValue: defaultStartDate, title: "Start date", errorMessage: getDateErrorMessage(['01', startMonth, startYear], driverState.inValidation), error: driverState.inValidation, minDate: currentMinDate, maxDate: currentEndDate }), jsxRuntime.jsx(DateSelectFormBox, { name: `endDate-${index}`, dateNames: [`endYear-${index}`, `endMonth-${index}`], onDateChange: handleEndDateChange(index), defaultValue: defaultEndDate, title: "End Date", errorMessage: getDateErrorMessage(['01', endMonth, endYear], driverState.inValidation), error: driverState.inValidation, minDate: startMonth && startYear
|
|
1569
|
+
? mychoiceSdkStore.addDayToDate(`${startYear}-${startMonth}`, days) : currentMinDate })] })] }, `insurance-cancellation-${index}`));
|
|
1570
|
+
}), insuranceCancellationList?.length < 3 && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleAddButtonClick, size: mychoiceSdkComponents.SizeTypes.Medium, color: mychoiceSdkComponents.ColorTypes.Primary, label: "Add another" }))] }))] }));
|
|
1571
|
+
};
|
|
1572
|
+
|
|
1573
|
+
const BlockDriverSuspension = () => {
|
|
1574
|
+
const { driverState, dispatchDriverSuspensionState } = mychoiceSdkStore.useStoreFormCarDriverSuspension();
|
|
1575
|
+
const { licenceSuspension, licenceSuspensionList = [] } = driverState.items[driverState.activeIndex];
|
|
1576
|
+
const { dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
1577
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
1578
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
1579
|
+
const { firstName, birthYear, birthMonth, birthDay, licenceInfo: { firstLicenceAge }, } = driverState.items[driverState.activeIndex];
|
|
1580
|
+
const birthDate = birthYear && birthMonth && birthDay ? `${birthYear}-${birthMonth}-${birthDay}` : '';
|
|
1581
|
+
const handleSuspensionChange = ({ value }) => {
|
|
1582
|
+
dispatchDriverSuspensionState({
|
|
1583
|
+
type: mychoiceSdkStore.StoreFormCarDriverSuspensionActionTypes.FormCarDriverLicenceSuspensionSelect,
|
|
1584
|
+
payload: { licenceSuspension: value },
|
|
1585
|
+
});
|
|
1586
|
+
if (!value) {
|
|
1587
|
+
dispatchDriverBaseState({
|
|
1588
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverInitialList,
|
|
1589
|
+
payload: { listKey: mychoiceSdkComponents.DriverListTypes.LicenceSuspension },
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
};
|
|
1593
|
+
const handleIconClick = (index) => () => {
|
|
1594
|
+
dispatchDriverSuspensionState({
|
|
1595
|
+
type: mychoiceSdkStore.StoreFormCarDriverSuspensionActionTypes.FormCarDriverLicenceSuspensionDelete,
|
|
1596
|
+
payload: { itemIndex: index },
|
|
1597
|
+
});
|
|
1598
|
+
};
|
|
1599
|
+
const handleAddButtonClick = () => {
|
|
1600
|
+
dispatchDriverSuspensionState({
|
|
1601
|
+
type: mychoiceSdkStore.StoreFormCarDriverSuspensionActionTypes.FormCarDriverLicenceSuspensionAdd,
|
|
1602
|
+
});
|
|
1603
|
+
};
|
|
1604
|
+
const handleReasonChange = (index) => ({ value }) => {
|
|
1605
|
+
dispatchDriverSuspensionState({
|
|
1606
|
+
type: mychoiceSdkStore.StoreFormCarDriverSuspensionActionTypes.FormCarDriverLicenceSuspensionReasonSelect,
|
|
1607
|
+
payload: {
|
|
1608
|
+
reason: value,
|
|
1609
|
+
index,
|
|
1610
|
+
},
|
|
1611
|
+
});
|
|
1612
|
+
};
|
|
1613
|
+
const handleSuspensionDateChange = (index) => (dateType) => ({ value }) => {
|
|
1614
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1615
|
+
dispatchDriverSuspensionState({
|
|
1616
|
+
type: mychoiceSdkStore.StoreFormCarDriverSuspensionActionTypes.FormCarDriverLicenceSuspensionMonthSelect,
|
|
1617
|
+
payload: {
|
|
1618
|
+
suspensionMonth: value,
|
|
1619
|
+
index,
|
|
1620
|
+
},
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1624
|
+
dispatchDriverSuspensionState({
|
|
1625
|
+
type: mychoiceSdkStore.StoreFormCarDriverSuspensionActionTypes.FormCarDriverLicenceSuspensionYearSelect,
|
|
1626
|
+
payload: {
|
|
1627
|
+
suspensionYear: value,
|
|
1628
|
+
index,
|
|
1629
|
+
},
|
|
1630
|
+
});
|
|
1631
|
+
}
|
|
1632
|
+
};
|
|
1633
|
+
const handleReinstatementDateChange = (index) => (dateType) => ({ value }) => {
|
|
1634
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1635
|
+
dispatchDriverSuspensionState({
|
|
1636
|
+
type: mychoiceSdkStore.StoreFormCarDriverSuspensionActionTypes.FormCarDriverLicenceReinstatementMonthSelect,
|
|
1637
|
+
payload: {
|
|
1638
|
+
reinstatementMonth: value,
|
|
1639
|
+
index,
|
|
1640
|
+
},
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1644
|
+
dispatchDriverSuspensionState({
|
|
1645
|
+
type: mychoiceSdkStore.StoreFormCarDriverSuspensionActionTypes.FormCarDriverLicenceReinstatementYearSelect,
|
|
1646
|
+
payload: {
|
|
1647
|
+
reinstatementYear: value,
|
|
1648
|
+
index,
|
|
1649
|
+
},
|
|
1650
|
+
});
|
|
1651
|
+
}
|
|
1652
|
+
};
|
|
1653
|
+
return (jsxRuntime.jsxs("div", { className: "form-block-container", children: [jsxRuntime.jsx("h2", { className: isTheBig ? 'thebig-bold' : '', children: "Licence Suspensions" }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleSuspensionChange, name: "licenceSuspension", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, licenceSuspension), title: `Has ${firstName} had a licence suspension within the past 3 years?`, description: "Three licence suspensions are common: 1) driving under the influence, 2) being found guilty of drinking and driving, and 3) a police officer finding reasonable grounds for a driving offence. Licence suspensions are also different from driving prohibitions as part of a criminal sentence." }), licenceSuspension && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [licenceSuspensionList?.map(({ suspensionReason, suspensionYear, suspensionMonth, reinstatementYear, reinstatementMonth, }, index) => {
|
|
1654
|
+
const defaultSuspensionDate = {
|
|
1655
|
+
year: suspensionYear,
|
|
1656
|
+
month: suspensionMonth,
|
|
1657
|
+
};
|
|
1658
|
+
const defaultReinstatementDate = {
|
|
1659
|
+
year: reinstatementYear,
|
|
1660
|
+
month: reinstatementMonth,
|
|
1661
|
+
};
|
|
1662
|
+
const now = mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd');
|
|
1663
|
+
const days = birthDay ? (+birthDay + 1) : 1;
|
|
1664
|
+
const endDate = reinstatementYear && reinstatementMonth ? mychoiceSdkStore.addDayToDate(`${reinstatementYear}-${reinstatementMonth}`, days) : now;
|
|
1665
|
+
const currentMinDate = mychoiceSdkComponents.getMinDateByYears(mychoiceSdkComponents.getMinDate(birthDate, firstLicenceAge), 3);
|
|
1666
|
+
const currentEndDate = mychoiceSdkComponents.compareDates(endDate, currentMinDate) < 0 ? currentMinDate : endDate;
|
|
1667
|
+
return (jsxRuntime.jsxs("div", { className: "list-block", children: [jsxRuntime.jsx("hr", {}), jsxRuntime.jsxs("div", { className: "list-item", children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.licenceSuspensionsReasonOptions, name: `suspensionReason-${index}`, onChange: handleReasonChange(index), defaultValue: suspensionReason, title: "Reason for licence suspension", placeholder: "Select from the list", isRemovable: licenceSuspensionList.length > 1, onIconClick: handleIconClick(index), autoSelectIfValueIsOutOfOptions: false, error: !suspensionReason && driverState.inValidation, errorMessage: getErrorMessage(suspensionReason, driverState.inValidation) }), jsxRuntime.jsx(DateSelectFormBox, { name: `suspensionDate-${index}`, dateNames: [`suspensionYear-${index}`, `suspensionMonth-${index}`], onDateChange: handleSuspensionDateChange(index), defaultValue: defaultSuspensionDate, title: "Start date", errorMessage: getDateErrorMessage(['01', suspensionMonth, suspensionYear], driverState.inValidation), error: driverState.inValidation, minDate: currentMinDate, maxDate: currentEndDate }), jsxRuntime.jsx(DateSelectFormBox, { name: `reinstatementDate-${index}`, dateNames: [`reinstatementYear-${index}`, `reinstatementMonth-${index}`], onDateChange: handleReinstatementDateChange(index), defaultValue: defaultReinstatementDate, title: "End Date", errorMessage: getDateErrorMessage(['01', reinstatementMonth, reinstatementYear], driverState.inValidation), error: driverState.inValidation, minDate: suspensionYear && suspensionMonth
|
|
1668
|
+
? mychoiceSdkStore.addDayToDate(`${suspensionYear}-${suspensionMonth}`, days) : currentMinDate })] })] }, `suspension-${index}`));
|
|
1669
|
+
}), licenceSuspensionList?.length < 3 && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "list-item-add", category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleAddButtonClick, size: mychoiceSdkComponents.SizeTypes.Medium, color: mychoiceSdkComponents.ColorTypes.Primary, label: "Add another" }))] }))] }));
|
|
1670
|
+
};
|
|
1671
|
+
|
|
1672
|
+
const BlockDriverAccident = () => {
|
|
1673
|
+
const { driverState, dispatchDriverAccidentState } = mychoiceSdkStore.useStoreFormCarDriverAccident();
|
|
1674
|
+
const { dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
1675
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
1676
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
1677
|
+
const { accident, accidentList = [] } = driverState.items[driverState.activeIndex];
|
|
1678
|
+
const { firstName, birthYear, birthMonth, birthDay, licenceInfo: { firstLicenceAge }, } = driverState.items[driverState.activeIndex];
|
|
1679
|
+
const birthDate = birthYear && birthMonth && birthDay ? `${birthYear}-${birthMonth}-${birthDay}` : '';
|
|
1680
|
+
const handleAccidentChange = ({ value }) => {
|
|
1681
|
+
dispatchDriverAccidentState({
|
|
1682
|
+
type: mychoiceSdkStore.StoreFormCarDriverAccidentActionTypes.FormCarDriverAccidentSelect,
|
|
1683
|
+
payload: { accident: value },
|
|
1684
|
+
});
|
|
1685
|
+
if (!value) {
|
|
1686
|
+
dispatchDriverBaseState({
|
|
1687
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverInitialList,
|
|
1688
|
+
payload: { listKey: mychoiceSdkComponents.DriverListTypes.Accident },
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
};
|
|
1692
|
+
const handleIconClick = (index) => () => {
|
|
1693
|
+
dispatchDriverAccidentState({
|
|
1694
|
+
type: mychoiceSdkStore.StoreFormCarDriverAccidentActionTypes.FormCarDriverAccidentDelete,
|
|
1695
|
+
payload: { itemIndex: index },
|
|
1696
|
+
});
|
|
1697
|
+
};
|
|
1698
|
+
const handleAddButtonClick = () => {
|
|
1699
|
+
dispatchDriverAccidentState({
|
|
1700
|
+
type: mychoiceSdkStore.StoreFormCarDriverAccidentActionTypes.FormCarDriverAccidentAdd,
|
|
1701
|
+
});
|
|
1702
|
+
};
|
|
1703
|
+
const handleAccidentDateChange = (index) => (dateType) => ({ value }) => {
|
|
1704
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1705
|
+
dispatchDriverAccidentState({
|
|
1706
|
+
type: mychoiceSdkStore.StoreFormCarDriverAccidentActionTypes.FormCarDriverAccidentMonthSelect,
|
|
1707
|
+
payload: {
|
|
1708
|
+
accidentMonth: value,
|
|
1709
|
+
index,
|
|
1710
|
+
},
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1714
|
+
dispatchDriverAccidentState({
|
|
1715
|
+
type: mychoiceSdkStore.StoreFormCarDriverAccidentActionTypes.FormCarDriverAccidentYearSelect,
|
|
1716
|
+
payload: {
|
|
1717
|
+
accidentYear: value,
|
|
1718
|
+
index,
|
|
1719
|
+
},
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
};
|
|
1723
|
+
return (jsxRuntime.jsxs("div", { className: "form-block-container", children: [jsxRuntime.jsx("h2", { className: isTheBig ? 'thebig-bold' : '', children: "Accidents" }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleAccidentChange, name: "accident", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, accident), title: `Has ${firstName} ever been at-fault for any accidents?`, description: "An at-fault accident means you are responsible for the car accident according to the investigative report. Whether you did not obey traffic signals or hit the brakes too late, it will show up on your insurance record for up to ten years. Insurers access at-fault information if one party reports it, so it is best to disclose previous incidents. A clean driving record mitigates additional hikes to your insurance premium." }), accident && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [accidentList?.map(({ accidentYear, accidentMonth, }, index) => {
|
|
1724
|
+
const defaultSuspensionDate = {
|
|
1725
|
+
year: accidentYear,
|
|
1726
|
+
month: accidentMonth,
|
|
1727
|
+
day: '01',
|
|
1728
|
+
};
|
|
1729
|
+
return (jsxRuntime.jsxs("div", { className: "list-block", children: [jsxRuntime.jsx("hr", {}), jsxRuntime.jsx(DateSelectFormBox, { name: `accidentDate-${index}`, dateNames: [`accidentYear-${index}`, `accidentMonth-${index}`], onDateChange: handleAccidentDateChange(index), isRemovable: accidentList.length > 1, onIconClick: handleIconClick(index), defaultValue: defaultSuspensionDate, title: "Accident date", errorMessage: getDateErrorMessage(['01', accidentMonth, accidentYear], driverState.inValidation), error: driverState.inValidation, minDate: mychoiceSdkComponents.getMinDate(birthDate, firstLicenceAge) })] }, `accident-${index}`));
|
|
1730
|
+
}), accidentList?.length < 3 && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleAddButtonClick, size: mychoiceSdkComponents.SizeTypes.Medium, color: mychoiceSdkComponents.ColorTypes.Primary, label: "Add another" }))] }))] }));
|
|
1731
|
+
};
|
|
1732
|
+
|
|
1733
|
+
const BlockDriverTicket = () => {
|
|
1734
|
+
const { driverState, dispatchDriverTicketState } = mychoiceSdkStore.useStoreFormCarDriverTicket();
|
|
1735
|
+
const { ticket, ticketList = [] } = driverState.items[driverState.activeIndex];
|
|
1736
|
+
const { dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
1737
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
1738
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
1739
|
+
const { firstName, minMaxDates, } = driverState.items[driverState.activeIndex];
|
|
1740
|
+
const { gOneMin } = minMaxDates;
|
|
1741
|
+
const handleTicketChange = ({ value }) => {
|
|
1742
|
+
dispatchDriverTicketState({
|
|
1743
|
+
type: mychoiceSdkStore.StoreFormCarDriverTicketActionTypes.FormCarDriverTrafficTicketSelect,
|
|
1744
|
+
payload: { ticket: value },
|
|
1745
|
+
});
|
|
1746
|
+
if (!value) {
|
|
1747
|
+
dispatchDriverBaseState({
|
|
1748
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverInitialList,
|
|
1749
|
+
payload: { listKey: mychoiceSdkComponents.DriverListTypes.Ticket },
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1752
|
+
};
|
|
1753
|
+
const handleIconClick = (index) => () => {
|
|
1754
|
+
dispatchDriverTicketState({
|
|
1755
|
+
type: mychoiceSdkStore.StoreFormCarDriverTicketActionTypes.FormCarDriverTrafficTicketDelete,
|
|
1756
|
+
payload: { itemIndex: index },
|
|
1757
|
+
});
|
|
1758
|
+
};
|
|
1759
|
+
const handleAddButtonClick = () => {
|
|
1760
|
+
dispatchDriverTicketState({
|
|
1761
|
+
type: mychoiceSdkStore.StoreFormCarDriverTicketActionTypes.FormCarDriverTrafficTicketAdd,
|
|
1762
|
+
});
|
|
1763
|
+
};
|
|
1764
|
+
const handleReasonChange = (index) => ({ value }) => {
|
|
1765
|
+
dispatchDriverTicketState({
|
|
1766
|
+
type: mychoiceSdkStore.StoreFormCarDriverTicketActionTypes.FormCarDriverTrafficTicketReasonSelect,
|
|
1767
|
+
payload: {
|
|
1768
|
+
reason: value,
|
|
1769
|
+
index,
|
|
1770
|
+
},
|
|
1771
|
+
});
|
|
1772
|
+
};
|
|
1773
|
+
const handleTicketDateChange = (index) => (dateType) => ({ value }) => {
|
|
1774
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
1775
|
+
dispatchDriverTicketState({
|
|
1776
|
+
type: mychoiceSdkStore.StoreFormCarDriverTicketActionTypes.FormCarDriverTrafficTicketMonthSelect,
|
|
1777
|
+
payload: {
|
|
1778
|
+
ticketMonth: value,
|
|
1779
|
+
index,
|
|
1780
|
+
},
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
1784
|
+
dispatchDriverTicketState({
|
|
1785
|
+
type: mychoiceSdkStore.StoreFormCarDriverTicketActionTypes.FormCarDriverTrafficTicketYearSelect,
|
|
1786
|
+
payload: {
|
|
1787
|
+
ticketYear: value,
|
|
1788
|
+
index,
|
|
1789
|
+
},
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
};
|
|
1793
|
+
return (jsxRuntime.jsxs("div", { className: "form-block-container", children: [jsxRuntime.jsx("h2", { className: isTheBig ? 'thebig-bold' : '', children: "Traffic Tickets" }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleTicketChange, name: "ticket", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, ticket), title: `Except for parking, has ${firstName} had any driving related tickets within the past 3 years?`, description: "Insurers want to make sure drivers are safe, which means minimizing driving infractions and encouraging good behaviour on the roads. Some of the most common liabilities include speeding, failure to stop, running a red light, reckless driving, and seatbelt negligence. It affects your insurance premium for up to three years and may void your policy." }), ticket && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [ticketList?.map(({ ticketReason, ticketYear, ticketMonth, }, index) => {
|
|
1794
|
+
const defaultTicketDate = {
|
|
1795
|
+
year: ticketYear,
|
|
1796
|
+
month: ticketMonth,
|
|
1797
|
+
day: '01',
|
|
1798
|
+
};
|
|
1799
|
+
return (jsxRuntime.jsxs("div", { className: "list-block", children: [jsxRuntime.jsx("hr", {}), jsxRuntime.jsxs("div", { className: "list-item", children: [jsxRuntime.jsx(SelectFormBox, { groupOptions: mychoiceSdkComponents.trafficTicketsGroupOptions, name: `ticketReason-${index}`, onChange: handleReasonChange(index), defaultValue: ticketReason, title: "Reason for traffic ticket", placeholder: "Select from the list", isRemovable: ticketList.length > 1, onIconClick: handleIconClick(index), autoSelectIfValueIsOutOfOptions: false, error: !ticketReason && driverState.inValidation, errorMessage: getErrorMessage(ticketReason, driverState.inValidation) }), jsxRuntime.jsx(DateSelectFormBox, { name: `ticketDate-${index}`, dateNames: [`ticketYear-${index}`, `ticketMonth-${index}`], onDateChange: handleTicketDateChange(index), defaultValue: defaultTicketDate, title: "Ticket date", errorMessage: getDateErrorMessage(['01', ticketMonth, ticketYear], driverState.inValidation), error: driverState.inValidation, minDate: mychoiceSdkComponents.getMinDateByYears(gOneMin, 3) })] })] }, `ticket-${index}`));
|
|
1800
|
+
}), ticketList?.length < 3 && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "list-item-add", category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleAddButtonClick, size: mychoiceSdkComponents.SizeTypes.Medium, color: mychoiceSdkComponents.ColorTypes.Primary, label: "Add another" }))] }))] }));
|
|
1801
|
+
};
|
|
1802
|
+
|
|
1803
|
+
const SectionDriverHistory = () => (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx(BlockDriverSuspension, {}), jsxRuntime.jsx(BlockDriverAccident, {}), jsxRuntime.jsx(BlockDriverTicket, {})] }));
|
|
1804
|
+
|
|
1805
|
+
const PageDriver = () => {
|
|
1806
|
+
const { appConfigState: { appType, localIndex } } = mychoiceSdkStore.useStoreAppConfig();
|
|
1807
|
+
const { driverState: { activeIndex, items }, dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
1808
|
+
const { vehicleFormValidate, vehicleFormIsValid } = mychoiceSdkStore.useValidationVehicle();
|
|
1809
|
+
const { driverFormIsValid, driverFormValidate } = mychoiceSdkStore.useValidationDriver();
|
|
1810
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
1811
|
+
if (!vehicleFormIsValid) {
|
|
1812
|
+
vehicleFormValidate();
|
|
1813
|
+
}
|
|
1814
|
+
window.scrollTo({
|
|
1815
|
+
top: 0,
|
|
1816
|
+
behavior: 'smooth',
|
|
1817
|
+
});
|
|
1818
|
+
});
|
|
1819
|
+
const [isRender, setIsRender] = React.useState(false);
|
|
1820
|
+
const validateForm = () => driverFormValidate(false);
|
|
1821
|
+
const createDriver = () => {
|
|
1822
|
+
dispatchDriverBaseState({
|
|
1823
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverCreate,
|
|
1824
|
+
});
|
|
1825
|
+
window.scrollTo({
|
|
1826
|
+
top: 0,
|
|
1827
|
+
behavior: 'smooth',
|
|
1828
|
+
});
|
|
1829
|
+
};
|
|
1830
|
+
React.useEffect(() => {
|
|
1831
|
+
setIsRender(false);
|
|
1832
|
+
}, [activeIndex]);
|
|
1833
|
+
React.useEffect(() => {
|
|
1834
|
+
setIsRender(true);
|
|
1835
|
+
}, [isRender]);
|
|
1836
|
+
return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabDriver, { createItem: createDriver }), jsxRuntime.jsxs("div", { className: "form-section-container", children: [isRender && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionDriverInfo, {}), jsxRuntime.jsx(SectionDriverLicence, {}), jsxRuntime.jsx(SectionDriverInsurancePolicy, {}), jsxRuntime.jsx(SectionDriverCancellation, {}), jsxRuntime.jsx(SectionDriverHistory, {})] })), appType === mychoiceSdkComponents.AppTypes.TheBig
|
|
1837
|
+
? (jsxRuntime.jsx(NavigationBottomTheBig, { createItem: createDriver, formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid }))
|
|
1838
|
+
: (jsxRuntime.jsx(NavigationBottom, { createItem: createDriver, formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid }))] }), localIndex !== mychoiceSdkComponents.defaultLocalIndex
|
|
1839
|
+
&& jsxRuntime.jsx("img", { className: "logo-for-partner", src: myChoicePartnerLogo, alt: "partner logo" })] }));
|
|
1840
|
+
};
|
|
1841
|
+
|
|
1842
|
+
const BlockVehLinks = () => {
|
|
1843
|
+
const { vehicleState: { items: vehicles } } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
1844
|
+
const { driverState: { items: drivers } } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
1845
|
+
const { discountState: { vehlinks }, dispatchDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
1846
|
+
const driverOptions = drivers.map((driver, index) => ({ name: driver.firstName, value: index }));
|
|
1847
|
+
const handleDriverChange = (vehicleIndex) => ({ value }) => {
|
|
1848
|
+
dispatchDiscountState({
|
|
1849
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountVehlinkSelect,
|
|
1850
|
+
payload: {
|
|
1851
|
+
driverIndex: value,
|
|
1852
|
+
vehicleIndex,
|
|
1853
|
+
},
|
|
1854
|
+
});
|
|
1855
|
+
};
|
|
1856
|
+
if (drivers.length > 1) {
|
|
1857
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(LabelFormBox, { title: "Since there are multiple drivers in this quote,\n please tell us who drives which vehicle the most.\n Please provide an answer that best suits your situation." }), vehicles.map((vehicle, index) => {
|
|
1858
|
+
const { year, make, model } = vehicle;
|
|
1859
|
+
const selectedDriver = vehlinks.find((vehlink) => (vehlink.vehicleIndex === index && vehlink.priority === mychoiceSdkComponents.DriverPriorityTypes.Prn));
|
|
1860
|
+
return (jsxRuntime.jsx(SelectFormBox, { title: `Who is the principal driver of the ${year} ${make} ${model} ?`, onChange: handleDriverChange(index), options: driverOptions, defaultValue: selectedDriver?.driverIndex || 0, name: `vehlink-${index}` }, `vehlink-${index}`));
|
|
1861
|
+
})] }));
|
|
1862
|
+
}
|
|
1863
|
+
return null;
|
|
1864
|
+
};
|
|
1865
|
+
|
|
1866
|
+
const BlockNextPageInfo$1 = () => {
|
|
1867
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
1868
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
1869
|
+
return (jsxRuntime.jsx("div", { className: "next-page-info", children: isTheBig ? (jsxRuntime.jsx("div", { className: "privacy-policy", children: jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { children: "DISCLAIMER: " }), "As insurance premiums are based on the information you provide it is important that it be 100% accurate and up to date. If you are not sure it is best to check before completing your quote."] }) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("h5", { children: "On the next page, you will also be able to:" }), jsxRuntime.jsxs("div", { className: "next-page-points", children: [jsxRuntime.jsx("p", { children: "1. See what rates insurance carriers are offering" }), jsxRuntime.jsx("p", { children: "2. Get in touch with a broker and secure your rate" }), jsxRuntime.jsx("p", { children: "3. Potentially save more by speaking with a broker" })] }), jsxRuntime.jsx("div", { className: "privacy-policy", children: jsxRuntime.jsxs("p", { children: ["Once you submit this form, you are agreeing to have your insurance quote sent to you via email and My Choice will provide your contact information to one of our trusted broker partners, who will contact you after your quote is complete to further assist you in securing your best rate. For more details, see our", jsxRuntime.jsx("a", { href: "https://www.mychoice.ca/privacy-policy/", children: " Privacy Policy" }), "."] }) })] })) }));
|
|
1870
|
+
};
|
|
1871
|
+
|
|
1872
|
+
const BlockSubmit$1 = ({ className, label, buttonSize, isRecalc = false, }) => {
|
|
1873
|
+
const { postRequestQuote } = mychoiceSdkStore.QuoteDataHandler();
|
|
1874
|
+
const { carDiscountFormValidate } = mychoiceSdkStore.useValidationCarDiscount();
|
|
1875
|
+
const handleRequest = () => {
|
|
1876
|
+
postRequestQuote(isRecalc);
|
|
1877
|
+
};
|
|
1878
|
+
const handleGetQuotesClick = () => {
|
|
1879
|
+
carDiscountFormValidate(true, handleRequest);
|
|
1880
|
+
};
|
|
1881
|
+
return (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: className, size: buttonSize, category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleGetQuotesClick, color: mychoiceSdkComponents.ColorTypes.Primary, label: label }));
|
|
1882
|
+
};
|
|
1883
|
+
BlockSubmit$1.defaultProps = {
|
|
1884
|
+
buttonSize: mychoiceSdkComponents.SizeTypes.Large,
|
|
1885
|
+
label: 'Get Your Quotes',
|
|
1886
|
+
className: '',
|
|
1887
|
+
};
|
|
1888
|
+
|
|
1889
|
+
const SectionDiscountInfo$1 = () => {
|
|
1890
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
1891
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
1892
|
+
const { discountState, dispatchDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
1893
|
+
const { validateEmail, errorMessage } = mychoiceSdkStore.useHandlerQuoterEmail();
|
|
1894
|
+
const { multiplePoliciesDiscount, appInstallDiscount, caaMemberDiscount, quoterInfo, emailTo: { email, emailStatus }, } = discountState;
|
|
1895
|
+
const { firstName, lastName, phone, driverLicense = '', caslConsent, } = quoterInfo;
|
|
1896
|
+
const handleMultiplePolicyChange = ({ value }) => {
|
|
1897
|
+
dispatchDiscountState({
|
|
1898
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountMultiplePoliciesSelect,
|
|
1899
|
+
payload: { multiplePoliciesDiscount: value },
|
|
1900
|
+
});
|
|
1901
|
+
};
|
|
1902
|
+
const handleAppInstallChange = ({ value }) => {
|
|
1903
|
+
dispatchDiscountState({
|
|
1904
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountAppInstallSelect,
|
|
1905
|
+
payload: { appInstallDiscount: value },
|
|
1906
|
+
});
|
|
1907
|
+
};
|
|
1908
|
+
const handleCaaMemberChange = ({ value }) => {
|
|
1909
|
+
dispatchDiscountState({
|
|
1910
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountCaaMemberSelect,
|
|
1911
|
+
payload: { caaMemberDiscount: value },
|
|
1912
|
+
});
|
|
1913
|
+
};
|
|
1914
|
+
const handleFirstNameChange = ({ value }) => {
|
|
1915
|
+
dispatchDiscountState({
|
|
1916
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterFirstNameSet,
|
|
1917
|
+
payload: { firstName: value },
|
|
1918
|
+
});
|
|
1919
|
+
};
|
|
1920
|
+
const handleLastNameChange = ({ value }) => {
|
|
1921
|
+
dispatchDiscountState({
|
|
1922
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterLastNameSet,
|
|
1923
|
+
payload: { lastName: value },
|
|
1924
|
+
});
|
|
1925
|
+
};
|
|
1926
|
+
const handleDriverLicenseChange = ({ value }) => {
|
|
1927
|
+
dispatchDiscountState({
|
|
1928
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterDriverLicenseSet,
|
|
1929
|
+
payload: { driverLicense: value },
|
|
1930
|
+
});
|
|
1931
|
+
};
|
|
1932
|
+
const handlePhoneNumberChange = ({ value }) => {
|
|
1933
|
+
dispatchDiscountState({
|
|
1934
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterPhoneSet,
|
|
1935
|
+
payload: { phone: value },
|
|
1936
|
+
});
|
|
1937
|
+
};
|
|
1938
|
+
const handleEmailChange = ({ value }) => {
|
|
1939
|
+
validateEmail(value);
|
|
1940
|
+
};
|
|
1941
|
+
const handleCaslConsentChange = ({ value }) => {
|
|
1942
|
+
dispatchDiscountState({
|
|
1943
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterCaslConsentSet,
|
|
1944
|
+
payload: { caslConsent: value },
|
|
1945
|
+
});
|
|
1946
|
+
};
|
|
1947
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx("h5", { className: `${isTheBig ? 'thebig-medium' : ''} hint-message`, children: "You are just seconds away from the best quote" }), jsxRuntime.jsx(LabelFormBox, { title: "You are seconds away from receiving your car insurance quotes,\n please provide your email after completing the discount section so we\n can send you your personalized free car insurance quotes!" }), jsxRuntime.jsx(BlockVehLinks, {}), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleMultiplePolicyChange, name: "multiplePoliciesDiscount", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, multiplePoliciesDiscount), title: "You could receive a 10-15% discount for bundling insurance with multiple policies with the same insurance company. Does that interest you?", description: "Bundling your home and auto insurance can save you significantly on insurance premiums as a whole package. Do you want to learn more about the benefits of multiple policies for home, tenant, condo, or car insurance? All you have to do is select yes.." }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleCaaMemberChange, name: "caaMemberDiscount", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, caaMemberDiscount), title: "Please indicate if you are a member of CAA, you could save up to an additional 20%." }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleAppInstallChange, name: "appInstallDiscount", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, appInstallDiscount), title: "You could receive up to a 30% discount by using an app to track driving habits. Does that interest you?", description: "Get rewarded for safe driving with the click of a button. If you install the app, you may be eligible for a 30% discount on your insurance premiums. Typically, you receive 10% of the discount upfront and the balance after six months of good driving." }), isTheBig
|
|
1948
|
+
? (jsxRuntime.jsxs("div", { className: "input-form-box-container", children: [jsxRuntime.jsx(LabelFormBox, { title: "Complete this form to see all your personalized\n quotes on the next page, you will also be able to:" }), jsxRuntime.jsxs("ol", { className: "ordered-block", children: [jsxRuntime.jsx("li", { children: "See what rates insurance carriers are offering" }), jsxRuntime.jsx("li", { children: "Get in touch with us and secure your rate" }), jsxRuntime.jsx("li", { children: "Potentially save more by speaking with a broker" })] })] }))
|
|
1949
|
+
: jsxRuntime.jsx("h2", { children: "Complete the form below to see which companies are offering your quotes." }), jsxRuntime.jsx(InputFormBox, { name: "firstName", title: "First Name", onChange: handleFirstNameChange, defaultValue: firstName, placeholder: "Your First Name", error: !firstName && discountState.inValidation, errorMessage: getErrorMessage(firstName, discountState.inValidation) }), jsxRuntime.jsx(InputFormBox, { name: "lastname", title: "Last Name", onChange: handleLastNameChange, defaultValue: lastName, placeholder: "Your Last Name", error: !lastName && discountState.inValidation, errorMessage: getErrorMessage(lastName, discountState.inValidation) }), isTheBig
|
|
1950
|
+
&& (jsxRuntime.jsx(InputFormLicenceBox, { name: "driverLicense", title: "Driver Licence Number (Optional)", onChange: handleDriverLicenseChange, defaultValue: driverLicense, placeholder: "V1234-12345-12345", maxLength: 17, description: "Enter your drivers licence number in to receive a more accurate, prequalified quote from our broker partners. This will enable you to provide less details over the phone if you choose to have a broker contact you. This is an optional input." })), jsxRuntime.jsx(InputFormPhoneBox, { name: "phone", onChange: handlePhoneNumberChange, defaultValue: phone, title: "Phone Number", placeholder: "(855) 325-8444", error: !phone && discountState.inValidation, errorMessage: getErrorMessage(phone, discountState.inValidation) }), jsxRuntime.jsx(InputFormEmailBox, { validationStatus: emailStatus, errorMessage: emailStatus === mychoiceSdkComponents.ValidationStatusTypes.Declined
|
|
1951
|
+
? errorMessage : getErrorMessage(email, discountState.inValidation), error: emailStatus === mychoiceSdkComponents.ValidationStatusTypes.Declined || (!email && discountState.inValidation), name: "email", title: "Please provide your email address so we can send you a copy of your quotes", description: "We will provide you with your insurance quotes immediately after this form completion. If you are not ready to apply today, don\u2019t worry as we will be emailing your quotes to you if you\u2019d like to complete at a later date with the help of one of our trusted broker partners.", onChange: handleEmailChange, defaultValue: email, placeholder: "johnsmith@mychoice.ca" }), isTheBig
|
|
1952
|
+
&& (jsxRuntime.jsx(mychoiceSdkComponents.CheckboxForm, { className: "casl-consent", name: "caslConsent", label: "Yes, I consent to receiving emails from the Billyard Insurance Group.\n I understand that I can unsubscribe at any time", onChange: handleCaslConsentChange, defaultValue: caslConsent })), jsxRuntime.jsx(BlockSubmit$1, { className: isTheBig ? 'thebig-bold' : '' }), jsxRuntime.jsx(BlockNextPageInfo$1, {})] }));
|
|
1953
|
+
};
|
|
1954
|
+
|
|
1955
|
+
const PageCarDiscount = () => {
|
|
1956
|
+
const { vehicleFormValidate, vehicleFormIsValid } = mychoiceSdkStore.useValidationVehicle();
|
|
1957
|
+
const { driverFormValidate, driverFormIsValid } = mychoiceSdkStore.useValidationDriver();
|
|
1958
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
1959
|
+
if (!vehicleFormIsValid) {
|
|
1960
|
+
vehicleFormValidate();
|
|
1961
|
+
}
|
|
1962
|
+
if (!driverFormIsValid) {
|
|
1963
|
+
driverFormValidate();
|
|
1964
|
+
}
|
|
1965
|
+
window.scrollTo({
|
|
1966
|
+
top: 0,
|
|
1967
|
+
behavior: 'smooth',
|
|
1968
|
+
});
|
|
1969
|
+
});
|
|
1970
|
+
return (jsxRuntime.jsx("div", { className: "form-container", children: jsxRuntime.jsx("div", { className: "form-section-container", children: jsxRuntime.jsx(SectionDiscountInfo$1, {}) }) }));
|
|
1971
|
+
};
|
|
1972
|
+
|
|
1973
|
+
const SectionQuoteEdit = () => {
|
|
1974
|
+
const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
1975
|
+
const { driverState, dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
1976
|
+
const { vehicleState, dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
1977
|
+
const { discountState: { appInstallDiscount, multiplePoliciesDiscount } } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
1978
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
1979
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
1980
|
+
const navigate = reactRouterDom.useNavigate();
|
|
1981
|
+
const vehicles = vehicleState.items.map(({ year, make, model }) => [`${year} ${make} ${model}`]);
|
|
1982
|
+
const drivers = driverState.items.map(({ firstName }) => [`${firstName}`]);
|
|
1983
|
+
const discounts = [[]];
|
|
1984
|
+
if (!appInstallDiscount && !multiplePoliciesDiscount) {
|
|
1985
|
+
discounts[0].push('No discounts');
|
|
1986
|
+
}
|
|
1987
|
+
if (appInstallDiscount) {
|
|
1988
|
+
discounts[0].push('Driving habits scoring app');
|
|
1989
|
+
}
|
|
1990
|
+
if (multiplePoliciesDiscount) {
|
|
1991
|
+
discounts[0].push('Bundle w/ Home');
|
|
1992
|
+
}
|
|
1993
|
+
const vehicleEdit = (vehicleIndex) => () => {
|
|
1994
|
+
dispatchVehicleState({
|
|
1995
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleSelect,
|
|
1996
|
+
payload: {
|
|
1997
|
+
vehicleIndex,
|
|
1998
|
+
},
|
|
1999
|
+
});
|
|
2000
|
+
navigate(`/${appConfigState.localIndex || mychoiceSdkComponents.defaultLocalIndex}/car`);
|
|
2001
|
+
};
|
|
2002
|
+
const driverEdit = (driverIndex) => () => {
|
|
2003
|
+
dispatchDriverBaseState({
|
|
2004
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverSelect,
|
|
2005
|
+
payload: {
|
|
2006
|
+
driverIndex,
|
|
2007
|
+
},
|
|
2008
|
+
});
|
|
2009
|
+
navigate(`/${appConfigState.localIndex || mychoiceSdkComponents.defaultLocalIndex}/car/driver`);
|
|
2010
|
+
};
|
|
2011
|
+
const discountEdit = () => () => {
|
|
2012
|
+
navigate(`/${appConfigState.localIndex || mychoiceSdkComponents.defaultLocalIndex}/car/discount`);
|
|
2013
|
+
};
|
|
2014
|
+
return (jsxRuntime.jsxs("div", { className: "edit-quote-section", children: [jsxRuntime.jsx("h3", { className: isTheBig ? 'thebig-bold' : '', children: "Edit Quote" }), jsxRuntime.jsxs("div", { className: "edit-section-content", children: [jsxRuntime.jsx(mychoiceSdkComponents.QuoteEdit, { className: isTheBig ? 'thebig-medium' : '', editClick: vehicleEdit, title: "Vehicle Information", items: vehicles }), jsxRuntime.jsx(mychoiceSdkComponents.QuoteEdit, { className: isTheBig ? 'thebig-medium' : '', editClick: driverEdit, title: "Driver Information", items: drivers }), jsxRuntime.jsx(mychoiceSdkComponents.QuoteEdit, { className: isTheBig ? 'thebig-medium' : '', editClick: discountEdit, title: "Discount Information", items: discounts })] })] }));
|
|
2015
|
+
};
|
|
2016
|
+
|
|
2017
|
+
const BlockEndorsements = () => {
|
|
2018
|
+
const { vehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
2019
|
+
const { activeIndex } = vehicleState;
|
|
2020
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2021
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
2022
|
+
const [isCoverage, setIsCoverage] = React.useState(vehicleState.items[activeIndex].collision.coverage
|
|
2023
|
+
&& vehicleState.items[activeIndex].comprehensive.coverage);
|
|
2024
|
+
React.useEffect(() => {
|
|
2025
|
+
setIsCoverage(vehicleState.items[activeIndex].collision.coverage
|
|
2026
|
+
&& vehicleState.items[activeIndex].comprehensive.coverage);
|
|
2027
|
+
}, [activeIndex, vehicleState]);
|
|
2028
|
+
return (jsxRuntime.jsxs("div", { className: "endorsements-container", children: [jsxRuntime.jsx("h4", { className: isTheBig ? 'thebig-bold' : '', children: "Endorsements" }), jsxRuntime.jsxs("div", { className: "labels-block", children: [jsxRuntime.jsx(LabelFormBox, { className: !isCoverage ? 'inActive' : '', name: "loss", title: "Loss of Use", description: "This endorsement will offer you protection in the event you are without use of your vehicle from an accident or it is stolen. You will be provided with a rental or replacement car while your own vehicle is in the process of being repaired or replaced.", isActive: isCoverage }), jsxRuntime.jsx(LabelFormBox, { className: !isCoverage ? 'inActive' : '', name: "liabilityDamage", title: "Liability for Damage for Non-owned Cars", description: "This endorsement will provide coverage and insure you as a driver for vehicles you do not own, for up to $50,000 in physical damages, effectively known as the \u2018rental car endorsement\u2019. This would be applicable throughout all of Canada and the USA.", isActive: isCoverage }), jsxRuntime.jsx(LabelFormBox, { name: "forgiveness", title: "Accident Waiver or Forgiveness", description: "Available to only drivers who have clean record, this endorsement will effectively forgive you and protect your driving record if you were to have your first at-fault accident. This would be beneficial as it would mean that you monthly premiums would not increase if you were to have an at-fault accident.", isActive: true })] })] }));
|
|
2029
|
+
};
|
|
2030
|
+
|
|
2031
|
+
const SectionQuoteRecalc = () => {
|
|
2032
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2033
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
2034
|
+
const { vehicleState, dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
2035
|
+
const { comprehensive, collision, liability } = vehicleState.items[vehicleState.activeIndex];
|
|
2036
|
+
const handleComprehensiveChange = ({ value }) => {
|
|
2037
|
+
dispatchVehicleState({
|
|
2038
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarComprehensiveCoverageSelect,
|
|
2039
|
+
payload: { coverage: !!Number(value), deductible: value },
|
|
2040
|
+
});
|
|
2041
|
+
};
|
|
2042
|
+
const handleCollisionChange = ({ value }) => {
|
|
2043
|
+
dispatchVehicleState({
|
|
2044
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarCollisionCoverageSelect,
|
|
2045
|
+
payload: { coverage: !!Number(value), deductible: value },
|
|
2046
|
+
});
|
|
2047
|
+
};
|
|
2048
|
+
const handleLiabilityChange = ({ value }) => {
|
|
2049
|
+
dispatchVehicleState({
|
|
2050
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarLiabilityCoverageSelect,
|
|
2051
|
+
payload: { coverage: true, limit: value },
|
|
2052
|
+
});
|
|
2053
|
+
};
|
|
2054
|
+
return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabVehicle, { readOnly: true }), jsxRuntime.jsxs("div", { className: "form-section edit-recalc-container", children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "comprehensive-coverage", onChange: handleComprehensiveChange, defaultValue: getSelectedOption(mychoiceSdkComponents.coverageOptions, comprehensive.coverage ? comprehensive.deductible : 0), title: "Comprehensive coverage", description: "This deductible is the amount of money that you will pay out of your own pocket if your vehicle is damaged in events not covered by collision coverage. This includes events such as falling or flying objects, vandalism, and theft. Your insurance company covers the cost of repair minus the deductible chosen.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "collision-coverage", onChange: handleCollisionChange, defaultValue: getSelectedOption(mychoiceSdkComponents.coverageOptions, collision.coverage ? collision.deductible : 0), title: "Collision coverage", description: "This deductible is the specific dollar amount you will pay out of your own pocket if your vehicle is damaged in an accident. Your insurance company covers the remaining amount.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.liabilityOptions, name: "liability-limit", onChange: handleLiabilityChange, defaultValue: getSelectedOption(mychoiceSdkComponents.liabilityOptions, liability.coverage ? liability.limit : 1000000), title: "Third Party Liability", description: "This protects you from lawsuits resulting from accidents causing bodily injury or death to others or property damage.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(BlockSubmit$1, { className: `${isTheBig ? 'thebig-bold' : ''} recalculate`, label: "Recalculate Quote", buttonSize: mychoiceSdkComponents.SizeTypes.Medium, isRecalc: true }), isTheBig && jsxRuntime.jsx(BlockEndorsements, {})] })] }));
|
|
2055
|
+
};
|
|
2056
|
+
|
|
2057
|
+
const SplashScreen = () => {
|
|
2058
|
+
const { discountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
2059
|
+
const phoneObject = formatPhoneObject(discountState.quoterInfo.brokerInfo?.phone) || {};
|
|
2060
|
+
return (jsxRuntime.jsxs("div", { className: "splash-screen-wrapper", children: [jsxRuntime.jsx("h2", { children: "We Aren\u2019t Done Yet" }), "This quote requires us to get a bit more information from you, please give", discountState.quoterInfo.brokerInfo?.id
|
|
2061
|
+
&& ` ${formatTitleToCapital(discountState.quoterInfo.brokerInfo?.id)} `, !discountState.quoterInfo.brokerInfo?.id && ' us ', "a call at", phoneObject.number
|
|
2062
|
+
&& (jsxRuntime.jsx("a", { className: "phoneNumber", target: "_blank", rel: "noreferrer noopener", href: `tel:${phoneObject?.number}`, children: phoneObject?.title })), "and we will be happy to get you the best rate.", jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("img", { src: theBigLogotype, alt: "thebig-logotype" }) })] }));
|
|
2063
|
+
};
|
|
2064
|
+
|
|
2065
|
+
const PageQuote = () => {
|
|
2066
|
+
const { vehicleFormValidate, vehicleFormIsValid } = mychoiceSdkStore.useValidationVehicle();
|
|
2067
|
+
const { driverFormValidate, driverFormIsValid } = mychoiceSdkStore.useValidationDriver();
|
|
2068
|
+
const { carDiscountFormValidate, carDiscountFormIsValid } = mychoiceSdkStore.useValidationCarDiscount();
|
|
2069
|
+
const { quoteState } = mychoiceSdkStore.useStoreFormCarQuote();
|
|
2070
|
+
const { postRequestQuote } = mychoiceSdkStore.QuoteDataHandler();
|
|
2071
|
+
const { appLoaderState } = mychoiceSdkStore.useStoreAppLoader();
|
|
2072
|
+
const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
|
|
2073
|
+
const { items } = quoteState;
|
|
2074
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
2075
|
+
if (!vehicleFormIsValid) {
|
|
2076
|
+
vehicleFormValidate();
|
|
2077
|
+
}
|
|
2078
|
+
if (vehicleFormIsValid && !driverFormIsValid) {
|
|
2079
|
+
driverFormValidate();
|
|
2080
|
+
}
|
|
2081
|
+
if (vehicleFormIsValid && driverFormIsValid && !carDiscountFormIsValid) {
|
|
2082
|
+
carDiscountFormValidate();
|
|
2083
|
+
}
|
|
2084
|
+
if (!quoteState.isRequested) {
|
|
2085
|
+
postRequestQuote(false);
|
|
2086
|
+
}
|
|
2087
|
+
window.scrollTo({
|
|
2088
|
+
top: 0,
|
|
2089
|
+
behavior: 'smooth',
|
|
2090
|
+
});
|
|
2091
|
+
});
|
|
2092
|
+
return (jsxRuntime.jsx("div", { className: "quote-page-content", children: !appLoaderState.isOpen
|
|
2093
|
+
&& (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: "form-section-container", children: [appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!items?.length && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !quoteState.showCallMessage
|
|
2094
|
+
? (jsxRuntime.jsx("div", { className: "offer-container", children: jsxRuntime.jsx(OfferSection, { isBestOffer: true, offerCompany: items[0]?.company, brokerCompany: items[0]?.brokerProfile, offerPrice: {
|
|
2095
|
+
monthly: items[0]?.priceMonthly,
|
|
2096
|
+
yearly: items[0]?.priceYearly,
|
|
2097
|
+
}, operationHours: {
|
|
2098
|
+
saturdayHours: items[0]?.brokerProfile.hoursSaturday,
|
|
2099
|
+
sundayHours: items[0]?.brokerProfile.hoursSunday,
|
|
2100
|
+
weekdayHours: items[0]?.brokerProfile.hoursWorkdays,
|
|
2101
|
+
}, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '' }) }))
|
|
2102
|
+
: jsxRuntime.jsx(SplashScreen, {}) })) })), jsxRuntime.jsx(SectionQuoteEdit, {}), jsxRuntime.jsx(SectionQuoteRecalc, {})] }), appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile && quoteState.showCallMessage
|
|
2103
|
+
&& jsxRuntime.jsx(SplashScreen, {}), !quoteState.showCallMessage
|
|
2104
|
+
&& (jsxRuntime.jsx("div", { className: "offer-container", children: !!items?.length
|
|
2105
|
+
&& items.map(({ company, brokerProfile, priceMonthly, priceYearly, }, index) => (jsxRuntime.jsx("div", { children: (appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile || (appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && index !== 0)) && (jsxRuntime.jsx(OfferSection, { isBestOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
2106
|
+
monthly: priceMonthly,
|
|
2107
|
+
yearly: priceYearly,
|
|
2108
|
+
}, operationHours: {
|
|
2109
|
+
saturdayHours: brokerProfile.hoursSaturday,
|
|
2110
|
+
sundayHours: brokerProfile.hoursSunday,
|
|
2111
|
+
weekdayHours: brokerProfile.hoursWorkdays,
|
|
2112
|
+
}, phoneNumber: formatPhoneObject(brokerProfile.phone), redirectUrl: brokerProfile.redirectUrl || '' })) }, index))) }))] })) }));
|
|
2113
|
+
};
|
|
2114
|
+
|
|
2115
|
+
const BlockAddressInfo = () => {
|
|
2116
|
+
const { status, errorMessage, } = mychoiceSdkStore.useHandlerPostal(mychoiceSdkComponents.InsuranceTypes.Home);
|
|
2117
|
+
const { postalState, dispatchPostalState } = mychoiceSdkStore.useStoreFormHomePostal();
|
|
2118
|
+
const { addressState, dispatchAddressState } = mychoiceSdkStore.useStoreFormHomeAddress();
|
|
2119
|
+
const { item: { postalCode, city, provinceCode } } = postalState;
|
|
2120
|
+
const { addressStreet, unitApartmentNumber, inValidation } = addressState;
|
|
2121
|
+
const error = status === mychoiceSdkComponents.RequestStatusTypes.Error;
|
|
2122
|
+
const streetAddressErrMessage = !/\b\s+\b/.test(addressStreet) ? 'The street address should be in the format "123 Streetname Rd."' : '';
|
|
2123
|
+
const handleAddressStreetChange = ({ value }) => {
|
|
2124
|
+
dispatchAddressState({
|
|
2125
|
+
type: mychoiceSdkStore.StoreFormHomeAddressActionTypes.FormHomeAddressStreetSet,
|
|
2126
|
+
payload: { addressStreet: value },
|
|
2127
|
+
});
|
|
2128
|
+
};
|
|
2129
|
+
const handleUnitApartmentNumberChange = ({ value }) => {
|
|
2130
|
+
dispatchAddressState({
|
|
2131
|
+
type: mychoiceSdkStore.StoreFormHomeAddressActionTypes.FormHomeAddressUnitApartmentNumberSet,
|
|
2132
|
+
payload: { unitApartmentNumber: value },
|
|
2133
|
+
});
|
|
2134
|
+
};
|
|
2135
|
+
const handleCityChange = ({ value }) => {
|
|
2136
|
+
dispatchPostalState({
|
|
2137
|
+
type: mychoiceSdkStore.StoreFormHomePostalActionTypes.FormHomePostalCitySet,
|
|
2138
|
+
payload: { city: value },
|
|
2139
|
+
});
|
|
2140
|
+
};
|
|
2141
|
+
const handlePostalCodeChange = ({ value }) => {
|
|
2142
|
+
dispatchPostalState({
|
|
2143
|
+
type: mychoiceSdkStore.StoreFormHomePostalActionTypes.FormHomePostalCodeSet,
|
|
2144
|
+
payload: { postalCode: value },
|
|
2145
|
+
});
|
|
2146
|
+
};
|
|
2147
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(InputFormBox, { name: "addressStreet", title: "Street Address", onChange: handleAddressStreetChange, defaultValue: addressStreet, placeholder: "Street Name and Number", error: (!addressStreet || !/\b\s+\b/.test(addressStreet)) && inValidation, errorMessage: getErrorMessage(addressStreet, inValidation, streetAddressErrMessage) }), jsxRuntime.jsx(InputFormBox, { name: "unitApartmentNumber", title: "Unit/Apartment number", onChange: handleUnitApartmentNumberChange, defaultValue: unitApartmentNumber, placeholder: "Unit, Suite or Apartment Number" }), jsxRuntime.jsx(InputFormBox, { name: "city", title: "City", onChange: handleCityChange, defaultValue: city, placeholder: "City", error: !city && inValidation, errorMessage: getErrorMessage(city, inValidation) }), jsxRuntime.jsx(InputFormBox, { name: "postalCode", title: "Postal Code", onChange: handlePostalCodeChange, defaultValue: postalCode, placeholder: "", maxLength: 7, error: !postalCode && inValidation, errorMessage: getErrorMessage(postalCode, inValidation) }), error && jsxRuntime.jsx("p", { className: "error-message", children: errorMessage }), jsxRuntime.jsx(InputFormBox, { name: "province", title: "Province", defaultValue: provinceCode, placeholder: "", error: !provinceCode && inValidation, errorMessage: getErrorMessage(provinceCode, inValidation), disabled: true })] }));
|
|
2148
|
+
};
|
|
2149
|
+
|
|
2150
|
+
const SectionAddress = () => {
|
|
2151
|
+
const { addressState: { type, inValidation }, dispatchAddressState } = mychoiceSdkStore.useStoreFormHomeAddress();
|
|
2152
|
+
const handleOwnerTypeChange = ({ value }) => {
|
|
2153
|
+
dispatchAddressState({
|
|
2154
|
+
type: mychoiceSdkStore.StoreFormHomeAddressActionTypes.FormHomeAddressTypeSelect,
|
|
2155
|
+
payload: { type: value },
|
|
2156
|
+
});
|
|
2157
|
+
};
|
|
2158
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.homeOwnerTypeOptions, name: "ownerType", onChange: handleOwnerTypeChange, defaultValue: type, title: "Type of Insurance", placeholder: "Select Type of Insurance", error: !type && inValidation, errorMessage: getErrorMessage(type, inValidation) }), jsxRuntime.jsx(BlockAddressInfo, {})] }));
|
|
2159
|
+
};
|
|
2160
|
+
|
|
2161
|
+
const PageAddress = () => {
|
|
2162
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2163
|
+
const { addressFormIsValid, addressFormValidate } = mychoiceSdkStore.useValidationAddress();
|
|
2164
|
+
const validateForm = () => addressFormValidate(false);
|
|
2165
|
+
return (jsxRuntime.jsx("div", { className: "form-container", children: jsxRuntime.jsxs("div", { className: "form-section-container", children: [jsxRuntime.jsx(SectionAddress, {}), appType === mychoiceSdkComponents.AppTypes.TheBig
|
|
2166
|
+
? (jsxRuntime.jsx(NavigationBottomTheBig, { formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Home], validateForm: validateForm, formIsValid: addressFormIsValid }))
|
|
2167
|
+
: (jsxRuntime.jsx(NavigationBottom, { formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Home], validateForm: validateForm, formIsValid: addressFormIsValid }))] }) }));
|
|
2168
|
+
};
|
|
2169
|
+
|
|
2170
|
+
const SectionApplicantInfo = () => {
|
|
2171
|
+
const { applicantState, dispatchApplicantInfoState } = mychoiceSdkStore.useStoreFormHomeApplicantInfo();
|
|
2172
|
+
const { dwellingState, dispatchDwellingState } = mychoiceSdkStore.useStoreFormHomeDwelling();
|
|
2173
|
+
const { quoterInfo, insured: { birthDay, birthMonth, birthYear, }, } = applicantState;
|
|
2174
|
+
const { firstName, } = quoterInfo || {};
|
|
2175
|
+
const { familiesCount, occupiedYear } = dwellingState;
|
|
2176
|
+
// VARIABLES =========
|
|
2177
|
+
const birthDate = birthYear ? `${birthYear}-${birthMonth || '01'}-${birthDay || '01'}` : '';
|
|
2178
|
+
const occupiedDate = occupiedYear ? `${occupiedYear}-${birthMonth || '01'}-${birthDay || '01'}` : '';
|
|
2179
|
+
const defaultDateOfBirth = {
|
|
2180
|
+
day: birthDay,
|
|
2181
|
+
month: birthMonth,
|
|
2182
|
+
year: birthYear,
|
|
2183
|
+
};
|
|
2184
|
+
const defaultOccupiedDate = {
|
|
2185
|
+
day: birthDay || '01',
|
|
2186
|
+
month: birthMonth || '01',
|
|
2187
|
+
year: occupiedYear,
|
|
2188
|
+
};
|
|
2189
|
+
const liveYears = mychoiceSdkComponents.getDifferenceInYears('', occupiedDate);
|
|
2190
|
+
const occupiedHintMessage = ((yearsCount) => {
|
|
2191
|
+
if (yearsCount === 0) {
|
|
2192
|
+
return 'You have lived at this location for less then a year.';
|
|
2193
|
+
}
|
|
2194
|
+
if (yearsCount > 0) {
|
|
2195
|
+
return `You have lived at this location for ${liveYears} years.`;
|
|
2196
|
+
}
|
|
2197
|
+
return '';
|
|
2198
|
+
})(liveYears);
|
|
2199
|
+
//= ===========
|
|
2200
|
+
const handleFirstNameChange = ({ value }) => {
|
|
2201
|
+
dispatchApplicantInfoState({
|
|
2202
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInfoActionTypes.FormHomeApplicantFirstNameSet,
|
|
2203
|
+
payload: { firstName: value },
|
|
2204
|
+
});
|
|
2205
|
+
};
|
|
2206
|
+
const handleDateOfBirthChange = (dateType) => ({ value }) => {
|
|
2207
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Day) {
|
|
2208
|
+
dispatchApplicantInfoState({
|
|
2209
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInfoActionTypes.FormHomeApplicantBirthDaySelect,
|
|
2210
|
+
payload: { birthDay: value },
|
|
2211
|
+
});
|
|
2212
|
+
}
|
|
2213
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
2214
|
+
dispatchApplicantInfoState({
|
|
2215
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInfoActionTypes.FormHomeApplicantBirthMonthSelect,
|
|
2216
|
+
payload: { birthMonth: value },
|
|
2217
|
+
});
|
|
2218
|
+
}
|
|
2219
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
2220
|
+
dispatchApplicantInfoState({
|
|
2221
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInfoActionTypes.FormHomeApplicantBirthYearSelect,
|
|
2222
|
+
payload: { birthYear: value },
|
|
2223
|
+
});
|
|
2224
|
+
}
|
|
2225
|
+
};
|
|
2226
|
+
const handleFamiliesCountChange = ({ value }) => {
|
|
2227
|
+
dispatchDwellingState({
|
|
2228
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingFamiliesCountSelect,
|
|
2229
|
+
payload: { familiesCount: value },
|
|
2230
|
+
});
|
|
2231
|
+
};
|
|
2232
|
+
const handleOccupiedDateChange = (dateType) => ({ value }) => {
|
|
2233
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
2234
|
+
dispatchDwellingState({
|
|
2235
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingOccupiedYearSelect,
|
|
2236
|
+
payload: { occupiedYear: value },
|
|
2237
|
+
});
|
|
2238
|
+
}
|
|
2239
|
+
};
|
|
2240
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx(InputFormBox, { name: "firstName", title: "First Name", onChange: handleFirstNameChange, defaultValue: firstName, placeholder: "Applicant First Name", error: !firstName && applicantState.inValidation, errorMessage: getErrorMessage(firstName, applicantState.inValidation) }), jsxRuntime.jsx(DateSelectFormBox, { name: "dateOfBirth", dateNames: ['birthYear', 'birthMonth', 'birthDay'], onDateChange: handleDateOfBirthChange, defaultValue: defaultDateOfBirth, title: "Date of birth of the eldest applicant", description: "If there\u2019s more than one applicant, please use the date of birth of the eldest applicant.", error: applicantState.inValidation, errorMessage: getDateErrorMessage([birthDay || '', birthMonth || '', birthYear || ''], applicantState.inValidation), maxDate: mychoiceSdkComponents.subYearsFromDate('', 14), isDay: true }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.residentsOptions, name: "familiesCount", onChange: handleFamiliesCountChange, defaultValue: getSelectedOption(mychoiceSdkComponents.residentsOptions, familiesCount), title: "Who occupies this residence?", placeholder: "Select", description: "Let us know whether this address is being used for residential or commercial purposes.", autoSelectIfValueIsOutOfOptions: false, error: !familiesCount && applicantState.inValidation, errorMessage: getErrorMessage(`${familiesCount}`.toString(), applicantState.inValidation) }), familiesCount?.toString() === '0' && (jsxRuntime.jsx("p", { className: "warning-message", children: "Please contact a licenced representative at 1-855-331-6933 from Monday \u2013 Saturday: 9:30 AM \u2013 9:30 PM to get an accurate quote. With properties that are used for commercial purpose, speaking with a representative will ensure that the incidents are accurately incorporated into your insurance quote." }))] }), jsxRuntime.jsx(DateSelectFormBox, { name: "occupiedDate", dateNames: ['occupiedYear'], datePlaceholders: ['Select'], onDateChange: handleOccupiedDateChange, defaultValue: defaultOccupiedDate, title: "What year did you move into this property?", hintMessage: occupiedHintMessage, errorMessage: getDateErrorMessage(['01', '01', occupiedYear || ''], applicantState.inValidation), error: applicantState.inValidation, minDate: birthDate, isMonth: false })] }));
|
|
2241
|
+
};
|
|
2242
|
+
|
|
2243
|
+
const getInsuranceYearsOptions = (maxValue) => (mychoiceSdkComponents.insuredYearsOptions.filter((option) => +option.value <= +maxValue));
|
|
2244
|
+
|
|
2245
|
+
const SectionApplicantInsurancePolicy = () => {
|
|
2246
|
+
const { applicantState, dispatchApplicantInsuranceState } = mychoiceSdkStore.useStoreFormHomeApplicantInsurance();
|
|
2247
|
+
const { discountState } = mychoiceSdkStore.useStoreFormHomeDiscount();
|
|
2248
|
+
const { policyStartYear, policyStartMonth } = discountState;
|
|
2249
|
+
const { insuredCurrent, insuredBefore, insured: { dateInsuredCurrent, dateInsuredSince } } = applicantState;
|
|
2250
|
+
// const defaultListedDate: SelectDateInterface = {
|
|
2251
|
+
// year: listedYear as string,
|
|
2252
|
+
// month: listedMonth as string,
|
|
2253
|
+
// day: '01',
|
|
2254
|
+
// };
|
|
2255
|
+
// const defaultInsuredDate: SelectDateInterface = {
|
|
2256
|
+
// year: insuredYear as string,
|
|
2257
|
+
// month: insuredMonth as string,
|
|
2258
|
+
// day: '01',
|
|
2259
|
+
// };
|
|
2260
|
+
//
|
|
2261
|
+
const defaultPolicyStartDate = {
|
|
2262
|
+
year: policyStartYear,
|
|
2263
|
+
month: policyStartMonth,
|
|
2264
|
+
day: '01',
|
|
2265
|
+
};
|
|
2266
|
+
const handleInsuredBeforeChange = ({ value }) => {
|
|
2267
|
+
dispatchApplicantInsuranceState({
|
|
2268
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInsuranceActionTypes.FormHomeApplicantInsuredBeforeSelect,
|
|
2269
|
+
payload: { insuredBefore: value },
|
|
2270
|
+
});
|
|
2271
|
+
};
|
|
2272
|
+
const handleInsuredCurrentChange = ({ value }) => {
|
|
2273
|
+
dispatchApplicantInsuranceState({
|
|
2274
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInsuranceActionTypes.FormHomeApplicantInsuredCurrentSelect,
|
|
2275
|
+
payload: { insuredCurrent: value },
|
|
2276
|
+
});
|
|
2277
|
+
};
|
|
2278
|
+
const handlePolicyStartChange = (dateType) => ({ value }) => {
|
|
2279
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
2280
|
+
dispatchApplicantInsuranceState({
|
|
2281
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInsuranceActionTypes.FormHomeApplicantPolicyStartMonthSelect,
|
|
2282
|
+
payload: { policyStartMonth: value },
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2285
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
2286
|
+
dispatchApplicantInsuranceState({
|
|
2287
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInsuranceActionTypes.FormHomeApplicantPolicyStartYearSelect,
|
|
2288
|
+
payload: { policyStartYear: value },
|
|
2289
|
+
});
|
|
2290
|
+
}
|
|
2291
|
+
};
|
|
2292
|
+
const handleInsuredSinceDateChange = ({ value }) => {
|
|
2293
|
+
dispatchApplicantInsuranceState({
|
|
2294
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInsuranceActionTypes.FormHomeApplicantDateInsuredSinceSelect,
|
|
2295
|
+
payload: { dateInsuredSince: value },
|
|
2296
|
+
});
|
|
2297
|
+
};
|
|
2298
|
+
const handleInsuredCurrentDateChange = ({ value }) => {
|
|
2299
|
+
dispatchApplicantInsuranceState({
|
|
2300
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInsuranceActionTypes.FormHomeApplicantDateInsuredCurrentSelect,
|
|
2301
|
+
payload: { dateInsuredCurrent: value },
|
|
2302
|
+
});
|
|
2303
|
+
};
|
|
2304
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx(DateSelectFormBox, { name: "policyStart", dateNames: ['policyStartYear', 'policyStartMonth'], onDateChange: handlePolicyStartChange, defaultValue: defaultPolicyStartDate, title: "When do you want to start the policy?", errorMessage: getDateErrorMessage(['01', policyStartMonth || '', policyStartYear || ''], applicantState.inValidation), error: applicantState.inValidation, minDate: mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd'), maxDate: mychoiceSdkComponents.getFormattedDate(mychoiceSdkComponents.addYearsToDate('', 1), 'yyyy-MM-dd') }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleInsuredCurrentChange, name: "insuredCurrent", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, insuredCurrent), title: "Do you have a current active policy?", description: "Insurers offer better rates to customers who have a long history of coverage without any gaps." }), insuredCurrent
|
|
2305
|
+
&& (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.insuredYearsOptions, name: "dateInsuredSince", onChange: handleInsuredSinceDateChange, defaultValue: getSelectedOption(mychoiceSdkComponents.insuredYearsOptions, dateInsuredSince), title: "How long have you had insurance without gaps?", description: "Let us know how long you\u2019ve had home insurance without letting the policy expire. It\u2019s fine if you\u2019ve changed providers in the past: what matters is that you switched before your coverage expired.", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !dateInsuredSince && applicantState.inValidation, errorMessage: getErrorMessage(dateInsuredSince, applicantState.inValidation) }), jsxRuntime.jsx(SelectFormBox, { options: getInsuranceYearsOptions(dateInsuredSince || mychoiceSdkComponents.insuredYearsOptions.length.toString()), name: "dateInsuredCurrent", onChange: handleInsuredCurrentDateChange, defaultValue: getSelectedOption(getInsuranceYearsOptions(dateInsuredSince || mychoiceSdkComponents.insuredYearsOptions.length.toString()), dateInsuredCurrent), title: "How long have you been insured with your current company?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !dateInsuredCurrent && applicantState.inValidation, errorMessage: getErrorMessage(dateInsuredCurrent, applicantState.inValidation) })] })), (!insuredCurrent && insuredCurrent !== null)
|
|
2306
|
+
&& (jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleInsuredBeforeChange, name: "insuredBefore", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, insuredBefore), title: "Have you ever had a home insurance policy?", description: "The gender on the policy should match your official applicant\u2019s licence. Some insurers analyze a applicant's sex when creating a policy. Men are typically considered higher risk than female applicants, but the statistics supporting this idea vary from province to province. On average, men and women pay roughly the same for insurance, though." }))] }));
|
|
2307
|
+
};
|
|
2308
|
+
|
|
2309
|
+
const SectionApplicantCancellation = () => {
|
|
2310
|
+
const { applicantState, dispatchApplicantCancellationState } = mychoiceSdkStore.useStoreFormHomeApplicantCancellation();
|
|
2311
|
+
const { dispatchApplicantBaseState } = mychoiceSdkStore.useStoreFormHomeApplicantBase();
|
|
2312
|
+
const { insuranceCancellation, insuranceCancellationList } = applicantState;
|
|
2313
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2314
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
2315
|
+
const handleIconClick = (index) => () => {
|
|
2316
|
+
dispatchApplicantCancellationState({
|
|
2317
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantCancellationActionTypes.FormHomeApplicantCancellationDelete,
|
|
2318
|
+
payload: { itemIndex: index },
|
|
2319
|
+
});
|
|
2320
|
+
};
|
|
2321
|
+
const handleCancellationChange = ({ value }) => {
|
|
2322
|
+
dispatchApplicantCancellationState({
|
|
2323
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantCancellationActionTypes.FormHomeApplicantCancellationSelect,
|
|
2324
|
+
payload: { insuranceCancellation: value },
|
|
2325
|
+
});
|
|
2326
|
+
if (!value) {
|
|
2327
|
+
dispatchApplicantBaseState({
|
|
2328
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantBaseActionTypes.FormHomeApplicantInitialList,
|
|
2329
|
+
payload: { listKey: mychoiceSdkComponents.ApplicantListTypes.InsuranceCancellation },
|
|
2330
|
+
});
|
|
2331
|
+
}
|
|
2332
|
+
};
|
|
2333
|
+
const handleAddButtonClick = () => {
|
|
2334
|
+
dispatchApplicantCancellationState({
|
|
2335
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantCancellationActionTypes.FormHomeApplicantCancellationAdd,
|
|
2336
|
+
});
|
|
2337
|
+
};
|
|
2338
|
+
const handleCancellationDateChange = (index) => (dateType) => ({ value }) => {
|
|
2339
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
2340
|
+
dispatchApplicantCancellationState({
|
|
2341
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantCancellationActionTypes.FormHomeApplicantCancellationMonthSelect,
|
|
2342
|
+
payload: {
|
|
2343
|
+
cancellationMonth: value,
|
|
2344
|
+
index,
|
|
2345
|
+
},
|
|
2346
|
+
});
|
|
2347
|
+
}
|
|
2348
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
2349
|
+
dispatchApplicantCancellationState({
|
|
2350
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantCancellationActionTypes.FormHomeApplicantCancellationYearSelect,
|
|
2351
|
+
payload: {
|
|
2352
|
+
cancellationYear: value,
|
|
2353
|
+
index,
|
|
2354
|
+
},
|
|
2355
|
+
});
|
|
2356
|
+
}
|
|
2357
|
+
};
|
|
2358
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx("h2", { className: isTheBig ? 'thebig-bold' : '', children: "Cancellations" }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleCancellationChange, name: "insuranceCancellation", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, insuranceCancellation), title: "How many cancellations have you had due to non-payment?" }), insuranceCancellation && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [insuranceCancellationList?.map(({ cancellationYear, cancellationMonth, }, index) => {
|
|
2359
|
+
const defaultCancellationDate = {
|
|
2360
|
+
year: cancellationYear,
|
|
2361
|
+
month: cancellationMonth,
|
|
2362
|
+
day: '01',
|
|
2363
|
+
};
|
|
2364
|
+
return (jsxRuntime.jsxs("div", { className: "list-block", children: [jsxRuntime.jsx("hr", {}), jsxRuntime.jsx("div", { className: "list-item", children: jsxRuntime.jsx(DateSelectFormBox, { name: `cancellationDate-${index}`, dateNames: [`cancellationYear-${index}`, `cancellationMonth-${index}`], onDateChange: handleCancellationDateChange(index), defaultValue: defaultCancellationDate, title: "What was the date of the cancellation?", isRemovable: insuranceCancellationList.length > 1, onIconClick: handleIconClick(index), errorMessage: getDateErrorMessage(['01', cancellationMonth, cancellationYear], applicantState.inValidation), error: applicantState.inValidation }) })] }, `insurance-cancellation-${index}`));
|
|
2365
|
+
}), insuranceCancellationList && insuranceCancellationList.length < 3
|
|
2366
|
+
? (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleAddButtonClick, size: mychoiceSdkComponents.SizeTypes.Medium, color: mychoiceSdkComponents.ColorTypes.Primary, label: "Add another" })) : (jsxRuntime.jsx("p", { className: "warning-message", children: "If You have 3+ Cancellations, please contact a licenced representative at XXXXXXXXXXX from Monday \u2013 Saturday: 9:30 AM \u2013 9:30 PM to get an accurate quote. With quotes that have more than two cancellations, speaking with a representative will ensure that the incidents are accurately incorporated into your insurance quote." }))] }))] }));
|
|
2367
|
+
};
|
|
2368
|
+
|
|
2369
|
+
const SectionApplicantClaim = () => {
|
|
2370
|
+
const { applicantState, dispatchApplicantClaimState } = mychoiceSdkStore.useStoreFormHomeApplicantClaim();
|
|
2371
|
+
const { dispatchApplicantBaseState } = mychoiceSdkStore.useStoreFormHomeApplicantBase();
|
|
2372
|
+
const { insuranceClaim, insuranceClaimList } = applicantState;
|
|
2373
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2374
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
2375
|
+
const handleIconClick = (index) => () => {
|
|
2376
|
+
dispatchApplicantClaimState({
|
|
2377
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantClaimActionTypes.FormHomeApplicantClaimDelete,
|
|
2378
|
+
payload: { itemIndex: index },
|
|
2379
|
+
});
|
|
2380
|
+
};
|
|
2381
|
+
const handleClaimChange = ({ value }) => {
|
|
2382
|
+
dispatchApplicantClaimState({
|
|
2383
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantClaimActionTypes.FormHomeApplicantClaimSelect,
|
|
2384
|
+
payload: { insuranceClaim: value },
|
|
2385
|
+
});
|
|
2386
|
+
if (!value) {
|
|
2387
|
+
dispatchApplicantBaseState({
|
|
2388
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantBaseActionTypes.FormHomeApplicantInitialList,
|
|
2389
|
+
payload: { listKey: mychoiceSdkComponents.ApplicantListTypes.InsuranceClaim },
|
|
2390
|
+
});
|
|
2391
|
+
}
|
|
2392
|
+
};
|
|
2393
|
+
const handleAddButtonClick = () => {
|
|
2394
|
+
dispatchApplicantClaimState({
|
|
2395
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantClaimActionTypes.FormHomeApplicantClaimAdd,
|
|
2396
|
+
});
|
|
2397
|
+
};
|
|
2398
|
+
const handleClaimTypeChange = (index) => ({ value }) => {
|
|
2399
|
+
dispatchApplicantClaimState({
|
|
2400
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantClaimActionTypes.FormHomeApplicantClaimTypeSelect,
|
|
2401
|
+
payload: {
|
|
2402
|
+
claimType: value,
|
|
2403
|
+
index,
|
|
2404
|
+
},
|
|
2405
|
+
});
|
|
2406
|
+
};
|
|
2407
|
+
const handleClaimDateChange = (index) => (dateType) => ({ value }) => {
|
|
2408
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Month) {
|
|
2409
|
+
dispatchApplicantClaimState({
|
|
2410
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantClaimActionTypes.FormHomeApplicantClaimMonthSelect,
|
|
2411
|
+
payload: {
|
|
2412
|
+
claimMonth: value,
|
|
2413
|
+
index,
|
|
2414
|
+
},
|
|
2415
|
+
});
|
|
2416
|
+
}
|
|
2417
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
2418
|
+
dispatchApplicantClaimState({
|
|
2419
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantClaimActionTypes.FormHomeApplicantClaimYearSelect,
|
|
2420
|
+
payload: {
|
|
2421
|
+
claimYear: value,
|
|
2422
|
+
index,
|
|
2423
|
+
},
|
|
2424
|
+
});
|
|
2425
|
+
}
|
|
2426
|
+
};
|
|
2427
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx("h2", { className: isTheBig ? 'thebig-bold' : '', children: "Claims" }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleClaimChange, name: "insuranceClaim", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, insuranceClaim), title: "Any claims within the last 5 years?", description: "Your quotes will be more accurate if you let us know your claims history." }), insuranceClaim && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [insuranceClaimList?.map(({ claimYear, claimMonth, claimType, }, index) => {
|
|
2428
|
+
const defaultClaimDate = {
|
|
2429
|
+
year: claimYear,
|
|
2430
|
+
month: claimMonth,
|
|
2431
|
+
day: '01',
|
|
2432
|
+
};
|
|
2433
|
+
return (jsxRuntime.jsxs("div", { className: "list-block", children: [jsxRuntime.jsx("hr", {}), jsxRuntime.jsxs("div", { className: "list-item", children: [jsxRuntime.jsx(DateSelectFormBox, { name: `claimDate-${index}`, dateNames: [`claimYear-${index}`, `claimMonth-${index}`], onDateChange: handleClaimDateChange(index), defaultValue: defaultClaimDate, title: "Claim Date", isRemovable: insuranceClaimList.length > 1, onIconClick: handleIconClick(index), errorMessage: getDateErrorMessage(['01', claimMonth, claimYear], applicantState.inValidation), error: applicantState.inValidation, minDate: mychoiceSdkComponents.subYearsFromDate('', 5) }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.claimTypeOptions, name: `claim-type-${index}`, onChange: handleClaimTypeChange(index), defaultValue: claimType, title: "Claim Type", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !claimType && applicantState.inValidation, errorMessage: getErrorMessage(claimType, applicantState.inValidation) })] })] }, `driver-claim-${index}`));
|
|
2434
|
+
}), insuranceClaimList && insuranceClaimList.length < 3
|
|
2435
|
+
? (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleAddButtonClick, size: mychoiceSdkComponents.SizeTypes.Medium, color: mychoiceSdkComponents.ColorTypes.Primary, label: "Add another" })) : (jsxRuntime.jsx("p", { className: "warning-message", children: "If You have 3+ Claims, please contact a licenced representative at XXXXXXXXXXX from Monday \u2013 Saturday: 9:30 AM \u2013 9:30 PM to get an accurate quote. With quotes that have more than two claims, speaking with a representative will ensure that the incidents are accurately incorporated into your insurance quote." }))] }))] }));
|
|
2436
|
+
};
|
|
2437
|
+
|
|
2438
|
+
const PageApplicant = () => {
|
|
2439
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2440
|
+
const { applicantState: { insuredCurrent, insuredBefore }, } = mychoiceSdkStore.useStoreFormHomeApplicantBase();
|
|
2441
|
+
const { addressFormIsValid, addressFormValidate } = mychoiceSdkStore.useValidationAddress();
|
|
2442
|
+
const { applicantFormIsValid, applicantFormValidate } = mychoiceSdkStore.useValidationApplicant();
|
|
2443
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
2444
|
+
if (!addressFormIsValid) {
|
|
2445
|
+
addressFormValidate();
|
|
2446
|
+
}
|
|
2447
|
+
window.scrollTo({
|
|
2448
|
+
top: 0,
|
|
2449
|
+
behavior: 'smooth',
|
|
2450
|
+
});
|
|
2451
|
+
});
|
|
2452
|
+
const validateForm = () => applicantFormValidate(false);
|
|
2453
|
+
return (jsxRuntime.jsx("div", { className: "form-container", children: jsxRuntime.jsxs("div", { className: "form-section-container", children: [jsxRuntime.jsx(SectionApplicantInfo, {}), jsxRuntime.jsx(SectionApplicantInsurancePolicy, {}), (insuredCurrent || insuredBefore)
|
|
2454
|
+
&& (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionApplicantClaim, {}), jsxRuntime.jsx(SectionApplicantCancellation, {})] })), appType === mychoiceSdkComponents.AppTypes.TheBig
|
|
2455
|
+
? (jsxRuntime.jsx(NavigationBottomTheBig, { formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Home], validateForm: validateForm, formIsValid: applicantFormIsValid }))
|
|
2456
|
+
: (jsxRuntime.jsx(NavigationBottom, { formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Home], validateForm: validateForm, formIsValid: applicantFormIsValid }))] }) }));
|
|
2457
|
+
};
|
|
2458
|
+
|
|
2459
|
+
const SectionDwelling = () => {
|
|
2460
|
+
const { dwellingState, dispatchDwellingState } = mychoiceSdkStore.useStoreFormHomeDwelling();
|
|
2461
|
+
const { builtYear, livingArea, exteriorFinish, constructionType, garageType, basementFinishPercent, storeysCount, roofReplaceYear, fireHallDistance, fireHydrantDistance,
|
|
2462
|
+
// replacementCost,
|
|
2463
|
+
heatings, buildingStructure, } = dwellingState;
|
|
2464
|
+
const builtDate = {
|
|
2465
|
+
day: '01',
|
|
2466
|
+
month: '01',
|
|
2467
|
+
year: builtYear,
|
|
2468
|
+
};
|
|
2469
|
+
const roofReplaceDate = {
|
|
2470
|
+
day: '01',
|
|
2471
|
+
month: '01',
|
|
2472
|
+
year: roofReplaceYear,
|
|
2473
|
+
};
|
|
2474
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
2475
|
+
const keys = [
|
|
2476
|
+
'builtYear',
|
|
2477
|
+
'livingArea',
|
|
2478
|
+
'roofReplaceYear',
|
|
2479
|
+
'fireHallDistance',
|
|
2480
|
+
'fireHydrantDistance',
|
|
2481
|
+
'buildingStructure',
|
|
2482
|
+
// 'replacementCost': string, // TODO: need to be approved
|
|
2483
|
+
];
|
|
2484
|
+
const listKeys = ['heatings'];
|
|
2485
|
+
const errors = [];
|
|
2486
|
+
Object.keys(dwellingState).forEach((key) => {
|
|
2487
|
+
if (keys.includes(key) && !dwellingState[key]) {
|
|
2488
|
+
errors.push(key);
|
|
2489
|
+
}
|
|
2490
|
+
if (listKeys.includes(key)) {
|
|
2491
|
+
dwellingState[key].forEach((listItem, listItemIndex) => {
|
|
2492
|
+
Object.keys(listItem).forEach((objectKey) => {
|
|
2493
|
+
if (!listItem[objectKey]) {
|
|
2494
|
+
errors.push(`heatings-${listItemIndex}`);
|
|
2495
|
+
}
|
|
2496
|
+
});
|
|
2497
|
+
});
|
|
2498
|
+
}
|
|
2499
|
+
});
|
|
2500
|
+
if (errors.length) {
|
|
2501
|
+
const element = document.getElementsByName(errors[0])[0];
|
|
2502
|
+
element?.scrollIntoView({ block: 'center', behavior: 'smooth' });
|
|
2503
|
+
}
|
|
2504
|
+
});
|
|
2505
|
+
const handleBuiltDateChange = (dateType) => ({ value }) => {
|
|
2506
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
2507
|
+
dispatchDwellingState({
|
|
2508
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingBuiltYearSelect,
|
|
2509
|
+
payload: { builtYear: value },
|
|
2510
|
+
});
|
|
2511
|
+
}
|
|
2512
|
+
};
|
|
2513
|
+
const handleLivingAreaChange = ({ value }) => {
|
|
2514
|
+
dispatchDwellingState({
|
|
2515
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingLivingAreaSelect,
|
|
2516
|
+
payload: { livingArea: value },
|
|
2517
|
+
});
|
|
2518
|
+
};
|
|
2519
|
+
const handleExteriorFinishChange = ({ value }) => {
|
|
2520
|
+
dispatchDwellingState({
|
|
2521
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingExteriorFinishSelect,
|
|
2522
|
+
payload: { exteriorFinish: value },
|
|
2523
|
+
});
|
|
2524
|
+
};
|
|
2525
|
+
const handleConstructionTypeChange = ({ value }) => {
|
|
2526
|
+
dispatchDwellingState({
|
|
2527
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingConstructionTypeSelect,
|
|
2528
|
+
payload: { constructionType: value },
|
|
2529
|
+
});
|
|
2530
|
+
};
|
|
2531
|
+
const handleGarageTypeChange = ({ value }) => {
|
|
2532
|
+
dispatchDwellingState({
|
|
2533
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingGarageTypeSelect,
|
|
2534
|
+
payload: { garageType: value },
|
|
2535
|
+
});
|
|
2536
|
+
};
|
|
2537
|
+
const handleBasementFinishPercentChange = ({ value }) => {
|
|
2538
|
+
dispatchDwellingState({
|
|
2539
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingBasementFinishPercentSelect,
|
|
2540
|
+
payload: { basementFinishPercent: value },
|
|
2541
|
+
});
|
|
2542
|
+
};
|
|
2543
|
+
const handleStoreysCountChange = ({ value }) => {
|
|
2544
|
+
dispatchDwellingState({
|
|
2545
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingStoreysCountSelect,
|
|
2546
|
+
payload: { storeysCount: value },
|
|
2547
|
+
});
|
|
2548
|
+
};
|
|
2549
|
+
const handleRoofReplaceDateChange = (dateType) => ({ value }) => {
|
|
2550
|
+
if (dateType === mychoiceSdkComponents.DateTypes.Year) {
|
|
2551
|
+
dispatchDwellingState({
|
|
2552
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingRoofReplaceYearSelect,
|
|
2553
|
+
payload: { roofReplaceYear: value },
|
|
2554
|
+
});
|
|
2555
|
+
}
|
|
2556
|
+
};
|
|
2557
|
+
const handleFireHallDistanceChange = ({ value }) => {
|
|
2558
|
+
dispatchDwellingState({
|
|
2559
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingFireHallDistanceSelect,
|
|
2560
|
+
payload: { fireHallDistance: value },
|
|
2561
|
+
});
|
|
2562
|
+
};
|
|
2563
|
+
const handleFireHydrantDistanceChange = ({ value }) => {
|
|
2564
|
+
dispatchDwellingState({
|
|
2565
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingFireHydrantDistanceSelect,
|
|
2566
|
+
payload: { fireHydrantDistance: value },
|
|
2567
|
+
});
|
|
2568
|
+
};
|
|
2569
|
+
const handleHeatingTypeChange = (index) => ({ value }) => {
|
|
2570
|
+
dispatchDwellingState({
|
|
2571
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingHeatingSelect,
|
|
2572
|
+
payload: {
|
|
2573
|
+
type: value,
|
|
2574
|
+
index,
|
|
2575
|
+
},
|
|
2576
|
+
});
|
|
2577
|
+
};
|
|
2578
|
+
const handleBuildingStructureChange = ({ value }) => {
|
|
2579
|
+
dispatchDwellingState({
|
|
2580
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingBuildingStructureSelect,
|
|
2581
|
+
payload: { buildingStructure: value },
|
|
2582
|
+
});
|
|
2583
|
+
};
|
|
2584
|
+
// const handleReplacementCostChange = ({ value }: OnChangeEventInterface) => {
|
|
2585
|
+
// dispatchDwellingState({
|
|
2586
|
+
// type: StoreFormHomeDwellingActionTypes.FormHomeDwellingReplacementCostSelect,
|
|
2587
|
+
// payload: { replacementCost: value as string },
|
|
2588
|
+
// });
|
|
2589
|
+
// };
|
|
2590
|
+
return (jsxRuntime.jsxs("div", { className: "form-section top-section", children: [jsxRuntime.jsx(DateSelectFormBox, { name: "builtDate", dateNames: ['builtYear'], datePlaceholders: ['Select'], onDateChange: handleBuiltDateChange, defaultValue: builtDate, title: "What year was your property built?", errorMessage: getDateErrorMessage(['01', '01', builtYear || ''], dwellingState.inValidation), error: dwellingState.inValidation, isMonth: false }), jsxRuntime.jsx(InputFormBox, { name: "livingArea", title: "What is the total living area of your property (in sq ft)?", type: mychoiceSdkComponents.InputTypes.Number, onChange: handleLivingAreaChange, defaultValue: livingArea, placeholder: "Living area", error: !livingArea && dwellingState.inValidation, errorMessage: getErrorMessage(livingArea, dwellingState.inValidation) }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.exteriorFinishOptions, name: "exteriorFinish", onChange: handleExteriorFinishChange, defaultValue: getSelectedOption(mychoiceSdkComponents.exteriorFinishOptions, exteriorFinish), title: "What is the exterior finish of your property?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.constructionTypeOptions, name: "constructionType", onChange: handleConstructionTypeChange, defaultValue: getSelectedOption(mychoiceSdkComponents.constructionTypeOptions, constructionType), title: "What is the construction type of your property?", placeholder: "Select", description: "Insurance companies need to know the construction type of your property in order to provide a quote. Generally, if your property is made with a more solid material such as brick, it is less combustible and the cost of insurance is lower. Most properties built since 1970 are made of wood even though they may have a brick, concrete or stone exterior. Brick and masonry construction was more common in houses built before 1970. Most high-rise buildings are constructed with fire-resistive material. Select \u2018Other\u2019 if you are unsure of your property construction type.", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.garageTypeOptions, name: "garageType", onChange: handleGarageTypeChange, defaultValue: getSelectedOption(mychoiceSdkComponents.garageTypeOptions, garageType), title: "What is the type of garage?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.getNumericOptions(0, 100, '%'), name: "basementFinishPercent", onChange: handleBasementFinishPercentChange, defaultValue: getSelectedOption(mychoiceSdkComponents.getNumericOptions(0, 100, '%'), basementFinishPercent), title: "What percentage of the basement is finished?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(InputFormBox, { name: "storeysCount", title: "How many storeys are there in your property?", type: mychoiceSdkComponents.InputTypes.Number, onChange: handleStoreysCountChange, defaultValue: storeysCount, placeholder: "Storeys count", minValue: 1, maxValue: 30 }), jsxRuntime.jsx(DateSelectFormBox, { name: "roofReplaceDate", dateNames: ['roofReplaceYear'], datePlaceholders: ['Select'], onDateChange: handleRoofReplaceDateChange, defaultValue: roofReplaceDate, title: "What year was your roof most recently replaced?", errorMessage: getDateErrorMessage(['01', '01', roofReplaceYear || ''], dwellingState.inValidation), error: dwellingState.inValidation, isMonth: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.fireHallDistanceOptions, name: "fireHallDistance", onChange: handleFireHallDistanceChange, defaultValue: getSelectedOption(mychoiceSdkComponents.fireHallDistanceOptions, fireHallDistance), title: "What is the approximate distance to the nearest fire hall?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !fireHallDistance && dwellingState.inValidation, errorMessage: getErrorMessage(fireHallDistance.toString(), dwellingState.inValidation) }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.fireHydrantDistanceOptions, name: "fireHydrantDistance", onChange: handleFireHydrantDistanceChange, defaultValue: getSelectedOption(mychoiceSdkComponents.fireHydrantDistanceOptions, fireHydrantDistance), title: "What is the approximate distance to the nearest fire hydrant?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !fireHydrantDistance && dwellingState.inValidation, errorMessage: getErrorMessage(fireHydrantDistance.toString(), dwellingState.inValidation) }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.heatingTypeOptions, name: `heatings-${0}`, onChange: handleHeatingTypeChange(0), defaultValue: getSelectedOption(mychoiceSdkComponents.heatingTypeOptions, heatings[0].type), title: "What is the type of the primary heating installed at your property?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !heatings[0].type && dwellingState.inValidation, errorMessage: getErrorMessage(heatings[0].type, dwellingState.inValidation) }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.heatingTypeOptions, name: `heatings-${1}`, onChange: handleHeatingTypeChange(1), defaultValue: getSelectedOption(mychoiceSdkComponents.heatingTypeOptions, heatings[1].type), title: "What is the type of the secondary heating installed at your property?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !heatings[1].type && dwellingState.inValidation, errorMessage: getErrorMessage(heatings[1].type, dwellingState.inValidation) }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.buildingStructureOptions, name: "buildingStructure", onChange: handleBuildingStructureChange, defaultValue: getSelectedOption(mychoiceSdkComponents.buildingStructureOptions, buildingStructure), title: "What is the style of the building?", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !buildingStructure && dwellingState.inValidation, errorMessage: getErrorMessage(buildingStructure, dwellingState.inValidation) })] }));
|
|
2591
|
+
};
|
|
2592
|
+
|
|
2593
|
+
const PageProperty = () => {
|
|
2594
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2595
|
+
const { addressFormIsValid, addressFormValidate } = mychoiceSdkStore.useValidationAddress();
|
|
2596
|
+
const { applicantFormIsValid, applicantFormValidate } = mychoiceSdkStore.useValidationApplicant();
|
|
2597
|
+
const { dwellingFormIsValid, dwellingFormValidate } = mychoiceSdkStore.useValidationDwelling();
|
|
2598
|
+
const [isOpen, setIsOpen] = React.useState(true);
|
|
2599
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
2600
|
+
if (!addressFormIsValid) {
|
|
2601
|
+
addressFormValidate();
|
|
2602
|
+
}
|
|
2603
|
+
if (!applicantFormIsValid) {
|
|
2604
|
+
applicantFormValidate();
|
|
2605
|
+
}
|
|
2606
|
+
window.scrollTo({
|
|
2607
|
+
top: 0,
|
|
2608
|
+
behavior: 'smooth',
|
|
2609
|
+
});
|
|
2610
|
+
});
|
|
2611
|
+
const validateForm = () => dwellingFormValidate(false);
|
|
2612
|
+
const handleIconClick = () => {
|
|
2613
|
+
setIsOpen(false);
|
|
2614
|
+
};
|
|
2615
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isOpen && jsxRuntime.jsx(mychoiceSdkComponents.InfoMessage, { text: "We have gathered and pre-filled the information below about your property to simplify the quote process. Please review to make sure it is accurate and provide any missing details.", isRemovable: true, onIconClick: handleIconClick }), jsxRuntime.jsx("div", { className: "form-container", children: jsxRuntime.jsxs("div", { className: "form-section-container", children: [jsxRuntime.jsx(SectionDwelling, {}), appType === mychoiceSdkComponents.AppTypes.TheBig
|
|
2616
|
+
? (jsxRuntime.jsx(NavigationBottomTheBig, { formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Home], validateForm: validateForm, formIsValid: dwellingFormIsValid }))
|
|
2617
|
+
: (jsxRuntime.jsx(NavigationBottom, { formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Home], validateForm: validateForm, formIsValid: dwellingFormIsValid }))] }) })] }));
|
|
2618
|
+
};
|
|
2619
|
+
|
|
2620
|
+
const dwellingSwitchInfo = [
|
|
2621
|
+
{ name: 'burglarAlarm', title: 'a monitored burglar alarm' },
|
|
2622
|
+
{ name: 'fireAlarm', title: 'a monitored fire alarm' },
|
|
2623
|
+
{ name: 'sprinkler', title: 'a sprinkler system' },
|
|
2624
|
+
{ name: 'deadbolt', title: 'deadbolt locks on all entrances' },
|
|
2625
|
+
];
|
|
2626
|
+
const dwellingSelectInfo = [
|
|
2627
|
+
{ name: 'fireExtinguishersCount', title: 'Number of fire extinguishers' },
|
|
2628
|
+
{ name: 'mortgageCount', title: 'How many mortgages do you have on the property?' },
|
|
2629
|
+
];
|
|
2630
|
+
const BlockDwellingInfo = () => {
|
|
2631
|
+
const { dwellingState, } = mychoiceSdkStore.useStoreFormHomeDwelling();
|
|
2632
|
+
const { applicantState: { insured: { nonsmoker } }, dispatchApplicantInfoState } = mychoiceSdkStore.useStoreFormHomeApplicantInfo();
|
|
2633
|
+
const { dispatchDwellingState } = mychoiceSdkStore.useStoreFormHomeDwelling();
|
|
2634
|
+
// const { dispatchDiscountState } = useStoreFormHomeDiscount();
|
|
2635
|
+
const handleChange = (name) => ({ value }) => {
|
|
2636
|
+
dispatchDwellingState({
|
|
2637
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes[`FormHomeDwelling${capitalize(name)}Select`],
|
|
2638
|
+
payload: { [name]: value },
|
|
2639
|
+
});
|
|
2640
|
+
};
|
|
2641
|
+
const handleSmokerChange = ({ value }) => {
|
|
2642
|
+
dispatchApplicantInfoState({
|
|
2643
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInfoActionTypes.FormHomeApplicantNonsmokerSelect,
|
|
2644
|
+
payload: {
|
|
2645
|
+
nonsmoker: value,
|
|
2646
|
+
},
|
|
2647
|
+
});
|
|
2648
|
+
};
|
|
2649
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [dwellingSwitchInfo.map(({ name, title }, index) => (jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleChange(name), name: name, defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, dwellingState[name]), title: `Does your property have ${title}?` }, `dwelling-switch-info-${index}`))), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleSmokerChange, name: "nonsmoker", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, nonsmoker), title: "Are the occupants non-smokers?" }), dwellingSelectInfo.map(({ name, title }, index) => (jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.constructionTypeOptions, name: name, onChange: handleChange(name), defaultValue: getSelectedOption(mychoiceSdkComponents.constructionTypeOptions, dwellingState[name]), title: title, placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !dwellingState[name] && dwellingState.inValidation, errorMessage: getErrorMessage(dwellingState[name], dwellingState.inValidation) }, `dwelling-select-info-${index}`)))] }));
|
|
2650
|
+
};
|
|
2651
|
+
|
|
2652
|
+
const BlockNextPageInfo = () => {
|
|
2653
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2654
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
2655
|
+
return (jsxRuntime.jsx("div", { className: "next-page-info", children: isTheBig ? (jsxRuntime.jsx("div", { className: "privacy-policy", children: jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { children: "DISCLAIMER: " }), "As insurance premiums are based on the information you provide it is important that it be 100% accurate and up to date. If you are not sure it is best to check before completing your quote."] }) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("h5", { children: "On the next page, you will also be able to:" }), jsxRuntime.jsxs("div", { className: "next-page-points", children: [jsxRuntime.jsx("p", { children: "1. See what rates insurance carriers are offering" }), jsxRuntime.jsx("p", { children: "2. Get in touch with a broker and secure your rate" }), jsxRuntime.jsx("p", { children: "3. Potentially save more by speaking with a broker" })] }), jsxRuntime.jsx("div", { className: "privacy-policy", children: jsxRuntime.jsxs("p", { children: ["Once you submit this form, you are agreeing to have your insurance quote sent to you via email and My Choice will provide your contact information to one of our trusted broker partners, who will contact you after your quote is complete to further assist you in securing your best rate. For more details, see our", jsxRuntime.jsx("a", { href: "https://www.mychoice.ca/privacy-policy/", children: " Privacy Policy" }), "."] }) })] })) }));
|
|
2656
|
+
};
|
|
2657
|
+
|
|
2658
|
+
const BlockSubmit = ({ className, label, buttonSize, isRecalc = false, }) => {
|
|
2659
|
+
const { postRequestQuote } = mychoiceSdkStore.QuoteDataHandler();
|
|
2660
|
+
const handleGetQuotesClick = () => {
|
|
2661
|
+
postRequestQuote(isRecalc);
|
|
2662
|
+
};
|
|
2663
|
+
return (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: className, size: buttonSize, category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleGetQuotesClick, color: mychoiceSdkComponents.ColorTypes.Primary, label: label }));
|
|
2664
|
+
};
|
|
2665
|
+
BlockSubmit.defaultProps = {
|
|
2666
|
+
buttonSize: mychoiceSdkComponents.SizeTypes.Large,
|
|
2667
|
+
label: 'Get Your Quotes',
|
|
2668
|
+
className: '',
|
|
2669
|
+
};
|
|
2670
|
+
|
|
2671
|
+
const SectionDiscountInfo = () => {
|
|
2672
|
+
const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2673
|
+
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
2674
|
+
const { discountState, dispatchDiscountState } = mychoiceSdkStore.useStoreFormHomeDiscount();
|
|
2675
|
+
const { applicantState, dispatchApplicantInfoState } = mychoiceSdkStore.useStoreFormHomeApplicantInfo();
|
|
2676
|
+
const { validateEmail, errorMessage } = mychoiceSdkStore.useHandlerQuoterEmail();
|
|
2677
|
+
const { quoterInfo = {}, } = applicantState;
|
|
2678
|
+
const { multiplePoliciesDiscount, emailTo: { email, emailStatus }, } = discountState;
|
|
2679
|
+
const { firstName = '', lastName = '', phone = '', } = quoterInfo;
|
|
2680
|
+
const handleMultiplePolicyChange = ({ value }) => {
|
|
2681
|
+
dispatchDiscountState({
|
|
2682
|
+
type: mychoiceSdkStore.StoreFormHomeDiscountActionTypes.FormHomeDiscountMultiplePoliciesSelect,
|
|
2683
|
+
payload: { multiplePoliciesDiscount: value },
|
|
2684
|
+
});
|
|
2685
|
+
};
|
|
2686
|
+
const handleFirstNameChange = ({ value }) => {
|
|
2687
|
+
dispatchApplicantInfoState({
|
|
2688
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInfoActionTypes.FormHomeApplicantFirstNameSet,
|
|
2689
|
+
payload: { firstName: value },
|
|
2690
|
+
});
|
|
2691
|
+
};
|
|
2692
|
+
const handleLastNameChange = ({ value }) => {
|
|
2693
|
+
dispatchApplicantInfoState({
|
|
2694
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInfoActionTypes.FormHomeApplicantLastNameSet,
|
|
2695
|
+
payload: { lastName: value },
|
|
2696
|
+
});
|
|
2697
|
+
};
|
|
2698
|
+
const handlePhoneNumberChange = ({ value }) => {
|
|
2699
|
+
dispatchApplicantInfoState({
|
|
2700
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantInfoActionTypes.FormHomeApplicantPhoneSet,
|
|
2701
|
+
payload: { phone: value },
|
|
2702
|
+
});
|
|
2703
|
+
};
|
|
2704
|
+
const handleEmailChange = ({ value }) => {
|
|
2705
|
+
validateEmail(value);
|
|
2706
|
+
};
|
|
2707
|
+
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx("h5", { className: `${isTheBig ? 'thebig-medium' : ''} hint-message`, children: "You are just seconds away from the best quote" }), jsxRuntime.jsx(LabelFormBox, { title: "You are seconds away from receiving your home insurance quotes, please provide your email after completing the discount section so we can send you your personalized free home insurance quotes!" }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleMultiplePolicyChange, name: "multiplePoliciesDiscount", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, multiplePoliciesDiscount), title: "Save up to 18% more. Are you open to bundling multiple policies (e.g. auto) with the same company?", description: "Most insurers offer discounts to consumers who purchase multiple policies. Select \u2018yes\u2019 if you\u2019d like to bundle your home and auto insurance policies." }), jsxRuntime.jsx(BlockDwellingInfo, {}), jsxRuntime.jsx("h2", { children: "Complete the form below to see which companies are offering your quotes." }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.yesNoOptions, onChange: handleMultiplePolicyChange, name: "multiplePoliciesDiscount", defaultValue: getSelectedOption(mychoiceSdkComponents.yesNoOptions, multiplePoliciesDiscount), title: "Do you authorize us to run a soft credit check and check your claims history so that you can save up to 50% on your insurance? Rest assured, this will not affect your credit score in any way." }), jsxRuntime.jsx(InputFormBox, { name: "firstName", title: "First Name", onChange: handleFirstNameChange, defaultValue: firstName, placeholder: "Your First Name", error: !firstName && discountState.inValidation, errorMessage: getErrorMessage(firstName, discountState.inValidation) }), jsxRuntime.jsx(InputFormBox, { name: "lastName", title: "Last Name", onChange: handleLastNameChange, defaultValue: lastName, placeholder: "Your Last Name", error: !lastName && discountState.inValidation, errorMessage: getErrorMessage(lastName, discountState.inValidation) }), jsxRuntime.jsx(InputFormPhoneBox, { name: "phone", onChange: handlePhoneNumberChange, defaultValue: phone, title: "Phone Number", placeholder: "(855) 325-8444", error: !phone && discountState.inValidation, errorMessage: getErrorMessage(phone, discountState.inValidation) }), jsxRuntime.jsx(InputFormEmailBox, { validationStatus: emailStatus, name: "email", title: "Please provide your email address so we can send you a copy of your quotes", description: "We will provide you with your insurance quotes immediately after this form completion. If you are not ready to apply today, don\u2019t worry as we will be emailing your quotes to you if you\u2019d like to complete at a later date with the help of one of our trusted broker partners.", onChange: handleEmailChange, defaultValue: email, placeholder: "johnsmith@mychoice.ca", errorMessage: emailStatus === mychoiceSdkComponents.ValidationStatusTypes.Declined
|
|
2708
|
+
? errorMessage : getErrorMessage(email, discountState.inValidation), error: emailStatus === mychoiceSdkComponents.ValidationStatusTypes.Declined || (!email && discountState.inValidation) }), jsxRuntime.jsx(BlockSubmit, { className: isTheBig ? 'thebig-bold' : '' }), jsxRuntime.jsx(BlockNextPageInfo, {})] }));
|
|
2709
|
+
};
|
|
2710
|
+
|
|
2711
|
+
const PageHomeDiscount = () => {
|
|
2712
|
+
const { applicantFormValidate, applicantFormIsValid } = mychoiceSdkStore.useValidationApplicant();
|
|
2713
|
+
const { dwellingFormValidate, dwellingFormIsValid } = mychoiceSdkStore.useValidationDwelling();
|
|
2714
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
2715
|
+
if (!applicantFormIsValid) {
|
|
2716
|
+
applicantFormValidate();
|
|
2717
|
+
}
|
|
2718
|
+
if (!dwellingFormIsValid) {
|
|
2719
|
+
dwellingFormValidate();
|
|
2720
|
+
}
|
|
2721
|
+
window.scrollTo({
|
|
2722
|
+
top: 0,
|
|
2723
|
+
behavior: 'smooth',
|
|
2724
|
+
});
|
|
2725
|
+
});
|
|
2726
|
+
return (jsxRuntime.jsx("div", { className: "form-container", children: jsxRuntime.jsx("div", { className: "form-section-container", children: jsxRuntime.jsx(SectionDiscountInfo, {}) }) }));
|
|
2727
|
+
};
|
|
2728
|
+
|
|
2729
|
+
const AppRouterListener = () => {
|
|
2730
|
+
const routeLocation = reactRouterDom.useLocation();
|
|
2731
|
+
React.useEffect(() => {
|
|
2732
|
+
if (process.env.REACT_APP_ENV === 'production') {
|
|
2733
|
+
TagManager__default["default"].dataLayer({
|
|
2734
|
+
dataLayer: {
|
|
2735
|
+
page: routeLocation.pathname,
|
|
2736
|
+
},
|
|
2737
|
+
dataLayerName: 'PageDataLayer',
|
|
2738
|
+
});
|
|
2739
|
+
}
|
|
2740
|
+
window.scrollTo(0, 0);
|
|
2741
|
+
}, [routeLocation]);
|
|
2742
|
+
return null;
|
|
2743
|
+
};
|
|
2744
|
+
|
|
2745
|
+
const AppRouteWrapper = (props) => {
|
|
2746
|
+
const { children, insuranceType } = props;
|
|
2747
|
+
const { appConfigState: { isReady } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2748
|
+
const { dispatchAppModalState } = mychoiceSdkStore.useStoreAppModal();
|
|
2749
|
+
const { postalState: { item: { postalCode: carPostal } } } = mychoiceSdkStore.useStoreFormCarPostal();
|
|
2750
|
+
// const { postalState: { item: { postalCode: homePostal } } } = useStoreFormHomePostal();
|
|
2751
|
+
// car insurance validation
|
|
2752
|
+
const { vehicleFormValidate, vehicleFormIsValid } = mychoiceSdkStore.useValidationVehicle();
|
|
2753
|
+
const { driverFormValidate, driverFormIsValid } = mychoiceSdkStore.useValidationDriver();
|
|
2754
|
+
const { carDiscountFormValidate, carDiscountFormIsValid } = mychoiceSdkStore.useValidationCarDiscount();
|
|
2755
|
+
// home insurance validation
|
|
2756
|
+
// const { addressFormValidate, addressFormIsValid } = useValidationAddress();
|
|
2757
|
+
// const { applicantFormValidate, applicantFormIsValid } = useValidationApplicant();
|
|
2758
|
+
// const { dwellingFormValidate, dwellingFormIsValid } = useValidationDwelling();
|
|
2759
|
+
// const { homeDiscountFormValidate, homeDiscountFormIsValid } = useValidationHomeDiscount();
|
|
2760
|
+
const { clearFormData, checkIsExpired, checkIsExpiredWithModal } = mychoiceSdkStore.ClearFormDataHandler();
|
|
2761
|
+
const formValidationHooks = {
|
|
2762
|
+
[mychoiceSdkComponents.InsuranceTypes.Car]: [
|
|
2763
|
+
{
|
|
2764
|
+
key: 0,
|
|
2765
|
+
path: '/',
|
|
2766
|
+
name: 'Step 1',
|
|
2767
|
+
validateOptions: { validate: vehicleFormValidate, isValid: vehicleFormIsValid },
|
|
2768
|
+
},
|
|
2769
|
+
{
|
|
2770
|
+
key: 1,
|
|
2771
|
+
path: '/driver',
|
|
2772
|
+
name: 'Step 2',
|
|
2773
|
+
validateOptions: { validate: driverFormValidate, isValid: driverFormIsValid },
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
key: 2,
|
|
2777
|
+
path: '/discount',
|
|
2778
|
+
name: 'Step 3',
|
|
2779
|
+
validateOptions: { validate: carDiscountFormValidate, isValid: carDiscountFormIsValid },
|
|
2780
|
+
},
|
|
2781
|
+
],
|
|
2782
|
+
// [InsuranceTypes.Home]: [
|
|
2783
|
+
// {
|
|
2784
|
+
// key: 0,
|
|
2785
|
+
// path: '/',
|
|
2786
|
+
// name: 'Step 1',
|
|
2787
|
+
// validateOptions: { validate: addressFormValidate, isValid: addressFormIsValid },
|
|
2788
|
+
// },
|
|
2789
|
+
// {
|
|
2790
|
+
// key: 1,
|
|
2791
|
+
// path: '/applicant',
|
|
2792
|
+
// name: 'Step 2',
|
|
2793
|
+
// validateOptions: { validate: applicantFormValidate, isValid: applicantFormIsValid },
|
|
2794
|
+
// },
|
|
2795
|
+
// {
|
|
2796
|
+
// key: 2,
|
|
2797
|
+
// path: '/property',
|
|
2798
|
+
// name: 'Step 3',
|
|
2799
|
+
// validateOptions: { validate: dwellingFormValidate, isValid: dwellingFormIsValid },
|
|
2800
|
+
// },
|
|
2801
|
+
// {
|
|
2802
|
+
// key: 3,
|
|
2803
|
+
// path: '/discount',
|
|
2804
|
+
// name: 'Step 4',
|
|
2805
|
+
// validateOptions: { validate: homeDiscountFormValidate, isValid: homeDiscountFormIsValid },
|
|
2806
|
+
// },
|
|
2807
|
+
// ],
|
|
2808
|
+
};
|
|
2809
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
2810
|
+
if (checkIsExpired()) {
|
|
2811
|
+
checkIsExpiredWithModal();
|
|
2812
|
+
}
|
|
2813
|
+
});
|
|
2814
|
+
React.useEffect(() => {
|
|
2815
|
+
if (isReady) {
|
|
2816
|
+
if (!carPostal && insuranceType === mychoiceSdkComponents.InsuranceTypes.Car) {
|
|
2817
|
+
dispatchAppModalState({
|
|
2818
|
+
type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalPostalModal,
|
|
2819
|
+
payload: {
|
|
2820
|
+
title: 'Please Enter Your Postal Code',
|
|
2821
|
+
},
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
// if (!homePostal && insuranceType === InsuranceTypes.Home) {
|
|
2825
|
+
// dispatchAppModalState({
|
|
2826
|
+
// type: StoreConfigAppModalActionTypes.AppModalPostalModal,
|
|
2827
|
+
// payload: {
|
|
2828
|
+
// title: 'Please Enter Your Postal Code',
|
|
2829
|
+
// },
|
|
2830
|
+
// });
|
|
2831
|
+
// }
|
|
2832
|
+
}
|
|
2833
|
+
}, [carPostal, isReady]);
|
|
2834
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isReady && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(AppHeader, {}), jsxRuntime.jsx(AppModal, {}), insuranceType && (jsxRuntime.jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: carPostal, formSteps: formSteps[insuranceType], validationHooks: formValidationHooks[insuranceType], clearForm: clearFormData })), jsxRuntime.jsx("div", { className: `${insuranceType ? 'form-page-content' : ''}`, children: children })] })) }));
|
|
2835
|
+
};
|
|
2836
|
+
const NestedRoutes = () => {
|
|
2837
|
+
const insuranceType = getInsuranceType();
|
|
2838
|
+
const { appConfigState, dispatchAppConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
2839
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
2840
|
+
dispatchAppConfigState({
|
|
2841
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetDrawWrapper,
|
|
2842
|
+
payload: true,
|
|
2843
|
+
});
|
|
2844
|
+
});
|
|
2845
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: appConfigState.drawWrapper && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(reactRouterDom.Routes, { children: [jsxRuntime.jsx(reactRouterDom.Route, { path: "*", element: jsxRuntime.jsx(reactRouterDom.Navigate, { to: { pathname: `/${appConfigState.localIndex || mychoiceSdkComponents.defaultLocalIndex}/${mychoiceSdkComponents.InsuranceTypes.Car}` } }) }), insuranceType === mychoiceSdkComponents.InsuranceTypes.Car
|
|
2846
|
+
&& (jsxRuntime.jsxs(reactRouterDom.Route, { path: "car", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Car, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageVehicle, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "driver", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Car, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageDriver, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Car, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Car, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageQuote, {}) }) })) })] }))] }) })) }));
|
|
2847
|
+
};
|
|
2848
|
+
const RedirectWithSearchParams = ({ to, path }) => {
|
|
2849
|
+
const insuranceType = getInsuranceType();
|
|
2850
|
+
const [isRender, setIsRender] = React.useState(false);
|
|
2851
|
+
const { getPostal } = mychoiceSdkStore.useHandlerPostal(insuranceType);
|
|
2852
|
+
const { dispatchDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
2853
|
+
const queryRoot = reactRouterDom.useLocation().search.split('?');
|
|
2854
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
2855
|
+
if (queryRoot.length > 1) {
|
|
2856
|
+
const query = JSON.parse(`{"${decodeURI(queryRoot[1]).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"')}"}`);
|
|
2857
|
+
if (!isRender) {
|
|
2858
|
+
if (query.postal_code) {
|
|
2859
|
+
getPostal(query.postal_code).then(() => {
|
|
2860
|
+
setIsRender(true);
|
|
2861
|
+
});
|
|
2862
|
+
}
|
|
2863
|
+
else {
|
|
2864
|
+
setIsRender(true);
|
|
2865
|
+
}
|
|
2866
|
+
if (query.utm_source) {
|
|
2867
|
+
dispatchDiscountState({ type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterUtmSourceSet, payload: { utmSource: query.utm_source } });
|
|
2868
|
+
}
|
|
2869
|
+
if (query.utm_campaign) {
|
|
2870
|
+
dispatchDiscountState({ type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterUtmCampaignSet, payload: { utmCampaign: query.utm_campaign } });
|
|
2871
|
+
}
|
|
2872
|
+
if (path === 'broker') {
|
|
2873
|
+
dispatchDiscountState({ type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterBrokerInfoSet, payload: query });
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
else {
|
|
2878
|
+
setIsRender(true);
|
|
2879
|
+
}
|
|
2880
|
+
});
|
|
2881
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: isRender && jsxRuntime.jsx(reactRouterDom.Navigate, { to: to }) });
|
|
2882
|
+
};
|
|
2883
|
+
const AppRoutes = (props) => {
|
|
2884
|
+
const { appType } = props;
|
|
2885
|
+
const defaultInsuranceType = getInsuranceType();
|
|
2886
|
+
const { appConfigState: { localIndex } } = mychoiceSdkStore.useStoreAppConfig();
|
|
2887
|
+
return (jsxRuntime.jsxs(reactRouterDom.BrowserRouter, { children: [jsxRuntime.jsx(AppRouterListener, {}), jsxRuntime.jsxs(reactRouterDom.Routes, { children: [jsxRuntime.jsx(reactRouterDom.Route, { path: "/", element: (jsxRuntime.jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: `/${localIndex}`, element: (jsxRuntime.jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "*", element: (jsxRuntime.jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "/broker", element: (jsxRuntime.jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}`, path: "broker" })
|
|
2888
|
+
// <BrokerKeys redirectURL={`/${localIndex}/${defaultInsuranceType}`} />
|
|
2889
|
+
) }), jsxRuntime.jsx(reactRouterDom.Route, { path: `/${localIndex}`, element: (jsxRuntime.jsx(NestedRoutes, { appType: appType })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: `/${localIndex}/*`, element: (jsxRuntime.jsx(NestedRoutes, { appType: appType })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "/postal/*", element: (jsxRuntime.jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "/auto/postal/*", element: (jsxRuntime.jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` })) })] })] }));
|
|
2890
|
+
};
|
|
2891
|
+
|
|
2892
|
+
const AppLoader = () => {
|
|
2893
|
+
const { appLoaderState } = mychoiceSdkStore.useStoreAppLoader();
|
|
2894
|
+
if (appLoaderState.isOpen) {
|
|
2895
|
+
return (jsxRuntime.jsx("div", { className: "app-loader", children: jsxRuntime.jsx(LoaderPrimary, {}) }));
|
|
2896
|
+
}
|
|
2897
|
+
return null;
|
|
2898
|
+
};
|
|
2899
|
+
|
|
2900
|
+
const setExternalColors = (primaryColor, secondaryColor) => {
|
|
2901
|
+
document.documentElement.style.setProperty('--color-primary', primaryColor);
|
|
2902
|
+
document.documentElement.style.setProperty('--color-secondary', secondaryColor);
|
|
2903
|
+
};
|
|
2904
|
+
const setInsuranceStepsCount = (count) => {
|
|
2905
|
+
document.documentElement.style.setProperty('--steps-count', count);
|
|
2906
|
+
};
|
|
2907
|
+
|
|
2908
|
+
const AppConfig = (props) => {
|
|
2909
|
+
const { appType } = props;
|
|
2910
|
+
const insuranceType = getInsuranceType();
|
|
2911
|
+
const { dispatchDeviceState } = mychoiceSdkStore.useStoreAppDevice();
|
|
2912
|
+
const { dispatchAppLoaderState } = mychoiceSdkStore.useStoreAppLoader();
|
|
2913
|
+
const { appConfigState, dispatchAppConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
2914
|
+
const { dispatchClientState } = mychoiceSdkStore.useStoreClient();
|
|
2915
|
+
const { partnerState } = mychoiceSdkStore.useStorePartner();
|
|
2916
|
+
// car insurance steps states
|
|
2917
|
+
const { dispatchPostalState: dispatchCarPostalState, postalState } = mychoiceSdkStore.useStoreFormCarPostal();
|
|
2918
|
+
const { dispatchConfigState } = mychoiceSdkStore.useStoreFormCarConfig();
|
|
2919
|
+
const { dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
2920
|
+
const { dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
2921
|
+
const { dispatchDiscountState: dispatchCarDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
|
|
2922
|
+
const { dispatchQuoteState } = mychoiceSdkStore.useStoreFormCarQuote();
|
|
2923
|
+
// home insurance steps states
|
|
2924
|
+
const { dispatchPostalState: dispatchHomePostalState } = mychoiceSdkStore.useStoreFormHomePostal();
|
|
2925
|
+
const { dispatchAddressState } = mychoiceSdkStore.useStoreFormHomeAddress();
|
|
2926
|
+
const { dispatchApplicantBaseState } = mychoiceSdkStore.useStoreFormHomeApplicantBase();
|
|
2927
|
+
const { dispatchDwellingState } = mychoiceSdkStore.useStoreFormHomeDwelling();
|
|
2928
|
+
const { dispatchDiscountState: dispatchHomeDiscountState } = mychoiceSdkStore.useStoreFormHomeDiscount();
|
|
2929
|
+
// const { dispatchQuoteState } = useStoreFormCarQuote();
|
|
2930
|
+
const localIndex = window.location.pathname.split('/')[1];
|
|
2931
|
+
const authHandler = mychoiceSdkStore.useHandlerAuth();
|
|
2932
|
+
const partnerHandler = mychoiceSdkStore.useHandlerPartner();
|
|
2933
|
+
const windowResize = () => {
|
|
2934
|
+
dispatchDeviceState({
|
|
2935
|
+
type: mychoiceSdkStore.StoreConfigAppDeviceActionTypes.AppDeviceSetSize,
|
|
2936
|
+
payload: {
|
|
2937
|
+
width: window.innerWidth,
|
|
2938
|
+
height: window.innerHeight,
|
|
2939
|
+
},
|
|
2940
|
+
});
|
|
2941
|
+
};
|
|
2942
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
2943
|
+
if (!appConfigState.isPreloaded && partnerHandler.status === mychoiceSdkComponents.RequestStatusTypes.Waiting) {
|
|
2944
|
+
window.addEventListener('resize', windowResize);
|
|
2945
|
+
windowResize();
|
|
2946
|
+
dispatchAppConfigState({
|
|
2947
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetAppType,
|
|
2948
|
+
payload: appType,
|
|
2949
|
+
});
|
|
2950
|
+
}
|
|
2951
|
+
if (appType !== mychoiceSdkComponents.AppTypes.TheBig && localIndex !== mychoiceSdkComponents.defaultLocalIndex && localIndex !== '') {
|
|
2952
|
+
partnerHandler.getPartner(localIndex);
|
|
2953
|
+
}
|
|
2954
|
+
else {
|
|
2955
|
+
dispatchAppConfigState({
|
|
2956
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetLocalIndex,
|
|
2957
|
+
payload: mychoiceSdkComponents.defaultLocalIndex,
|
|
2958
|
+
});
|
|
2959
|
+
dispatchAppConfigState({
|
|
2960
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetPreloaded,
|
|
2961
|
+
payload: true,
|
|
2962
|
+
});
|
|
2963
|
+
}
|
|
2964
|
+
});
|
|
2965
|
+
React.useEffect(() => {
|
|
2966
|
+
if (appConfigState.isReady) {
|
|
2967
|
+
dispatchAppLoaderState({
|
|
2968
|
+
type: mychoiceSdkStore.StoreConfigAppLoaderActionTypes.AppLoaderClose,
|
|
2969
|
+
});
|
|
2970
|
+
dispatchConfigState({
|
|
2971
|
+
type: mychoiceSdkStore.StoreFormCarConfigActionTypes.FormCarConfigSet,
|
|
2972
|
+
payload: { province: postalState.item.provinceCode },
|
|
2973
|
+
});
|
|
2974
|
+
}
|
|
2975
|
+
}, [appConfigState]);
|
|
2976
|
+
React.useEffect(() => {
|
|
2977
|
+
if (appConfigState.isPreloaded) {
|
|
2978
|
+
if (authHandler.status === mychoiceSdkComponents.RequestStatusTypes.Waiting) {
|
|
2979
|
+
authHandler.checkUser();
|
|
2980
|
+
}
|
|
2981
|
+
if (authHandler.status !== mychoiceSdkComponents.RequestStatusTypes.Waiting
|
|
2982
|
+
&& authHandler.status !== mychoiceSdkComponents.RequestStatusTypes.Loading) {
|
|
2983
|
+
if (insuranceType === mychoiceSdkComponents.InsuranceTypes.Car) {
|
|
2984
|
+
dispatchCarPostalState({
|
|
2985
|
+
type: mychoiceSdkStore.StoreFormCarPostalActionTypes.FormCarPostalGetLocal,
|
|
2986
|
+
});
|
|
2987
|
+
dispatchDriverBaseState({
|
|
2988
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverGetLocal,
|
|
2989
|
+
});
|
|
2990
|
+
dispatchDriverBaseState({
|
|
2991
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverValidate,
|
|
2992
|
+
payload: { inValidation: false },
|
|
2993
|
+
});
|
|
2994
|
+
dispatchVehicleState({
|
|
2995
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleGetLocal,
|
|
2996
|
+
});
|
|
2997
|
+
dispatchVehicleState({
|
|
2998
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleValidate,
|
|
2999
|
+
payload: { inValidation: false },
|
|
3000
|
+
});
|
|
3001
|
+
dispatchCarDiscountState({
|
|
3002
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountGetLocal,
|
|
3003
|
+
});
|
|
3004
|
+
dispatchCarDiscountState({
|
|
3005
|
+
type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountValidate,
|
|
3006
|
+
payload: { inValidation: false },
|
|
3007
|
+
});
|
|
3008
|
+
dispatchQuoteState({
|
|
3009
|
+
type: mychoiceSdkStore.StoreFormCarQuoteActionTypes.FormCarQuoteGetLocal,
|
|
3010
|
+
});
|
|
3011
|
+
}
|
|
3012
|
+
if (insuranceType === mychoiceSdkComponents.InsuranceTypes.Home) {
|
|
3013
|
+
dispatchHomePostalState({
|
|
3014
|
+
type: mychoiceSdkStore.StoreFormHomePostalActionTypes.FormHomePostalGetLocal,
|
|
3015
|
+
});
|
|
3016
|
+
dispatchAddressState({
|
|
3017
|
+
type: mychoiceSdkStore.StoreFormHomeAddressActionTypes.FormHomeAddressGetLocal,
|
|
3018
|
+
});
|
|
3019
|
+
dispatchApplicantBaseState({
|
|
3020
|
+
type: mychoiceSdkStore.StoreFormHomeApplicantBaseActionTypes.FormHomeApplicantGetLocal,
|
|
3021
|
+
});
|
|
3022
|
+
dispatchDwellingState({
|
|
3023
|
+
type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingGetLocal,
|
|
3024
|
+
});
|
|
3025
|
+
dispatchHomeDiscountState({
|
|
3026
|
+
type: mychoiceSdkStore.StoreFormHomeDiscountActionTypes.FormHomeDiscountGetLocal,
|
|
3027
|
+
});
|
|
3028
|
+
// dispatchQuoteState({
|
|
3029
|
+
// type: StoreFormCarQuoteActionTypes.FormCarQuoteGetLocal,
|
|
3030
|
+
// });
|
|
3031
|
+
}
|
|
3032
|
+
if (authHandler.status === mychoiceSdkComponents.RequestStatusTypes.Success) {
|
|
3033
|
+
dispatchClientState({
|
|
3034
|
+
type: mychoiceSdkStore.StoreClientActionTypes.ClientGetLocal,
|
|
3035
|
+
});
|
|
3036
|
+
}
|
|
3037
|
+
dispatchAppConfigState({
|
|
3038
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetIsReady,
|
|
3039
|
+
payload: true,
|
|
3040
|
+
});
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
}, [appConfigState.isPreloaded, authHandler.status]);
|
|
3044
|
+
React.useEffect(() => {
|
|
3045
|
+
if (appType === mychoiceSdkComponents.AppTypes.TheBig) {
|
|
3046
|
+
setExternalColors('#F1642F', '#4C4B4B');
|
|
3047
|
+
dispatchAppConfigState({
|
|
3048
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetPreloaded,
|
|
3049
|
+
payload: true,
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
3052
|
+
}, [appType]);
|
|
3053
|
+
React.useEffect(() => {
|
|
3054
|
+
const stepCount = `${formSteps[insuranceType].length}`;
|
|
3055
|
+
setInsuranceStepsCount(stepCount);
|
|
3056
|
+
dispatchAppConfigState({
|
|
3057
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetInsuranceType,
|
|
3058
|
+
payload: insuranceType,
|
|
3059
|
+
});
|
|
3060
|
+
}, [insuranceType]);
|
|
3061
|
+
React.useEffect(() => {
|
|
3062
|
+
if (partnerHandler.status === mychoiceSdkComponents.RequestStatusTypes.Success) {
|
|
3063
|
+
setExternalColors(partnerState.primaryColor, partnerState.secondaryColor);
|
|
3064
|
+
dispatchAppConfigState({
|
|
3065
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetPreloaded,
|
|
3066
|
+
payload: true,
|
|
3067
|
+
});
|
|
3068
|
+
}
|
|
3069
|
+
if (partnerHandler.status === mychoiceSdkComponents.RequestStatusTypes.Error) ;
|
|
3070
|
+
}, [partnerHandler.status]);
|
|
3071
|
+
return null;
|
|
3072
|
+
};
|
|
3073
|
+
|
|
3074
|
+
const AppWrapperConfig = (props) => {
|
|
3075
|
+
mychoiceSdkStore.initHttpResponse();
|
|
3076
|
+
const { appType } = props;
|
|
3077
|
+
const { appConfigState: { isReady, drawWrapper }, dispatchAppConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
3078
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
3079
|
+
dispatchAppConfigState({
|
|
3080
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetDrawWrapper,
|
|
3081
|
+
payload: true,
|
|
3082
|
+
});
|
|
3083
|
+
});
|
|
3084
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(AppLoader, {}), jsxRuntime.jsx(AppConfig, { appType: appType }), drawWrapper && isReady
|
|
3085
|
+
&& jsxRuntime.jsx(AppRoutes, { appType: appType })] }));
|
|
3086
|
+
};
|
|
3087
|
+
const AppWrapper = ({ appType }) => (jsxRuntime.jsx(mychoiceSdkStore.StoreProvider, { children: jsxRuntime.jsx(AppWrapperConfig, { appType: appType }) }));
|
|
3088
|
+
AppWrapper.defaultProps = {
|
|
3089
|
+
appType: mychoiceSdkComponents.AppTypes.MyChoice,
|
|
3090
|
+
insuranceType: mychoiceSdkComponents.InsuranceTypes.Car,
|
|
3091
|
+
};
|
|
3092
|
+
|
|
3093
|
+
const StoreConfig = () => {
|
|
3094
|
+
const { dispatchAppConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
3095
|
+
const { dispatchDriverBaseState } = mychoiceSdkStore.useStoreFormCarDriverBase();
|
|
3096
|
+
const { dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
|
|
3097
|
+
const { dispatchDeviceState } = mychoiceSdkStore.useStoreAppDevice();
|
|
3098
|
+
const windowResize = () => {
|
|
3099
|
+
dispatchDeviceState({
|
|
3100
|
+
type: mychoiceSdkStore.StoreConfigAppDeviceActionTypes.AppDeviceSetSize,
|
|
3101
|
+
payload: {
|
|
3102
|
+
width: window.innerWidth,
|
|
3103
|
+
height: window.innerHeight,
|
|
3104
|
+
},
|
|
3105
|
+
});
|
|
3106
|
+
};
|
|
3107
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
3108
|
+
dispatchDriverBaseState({
|
|
3109
|
+
type: mychoiceSdkStore.StoreFormCarDriverBaseActionTypes.FormCarDriverGetLocal,
|
|
3110
|
+
});
|
|
3111
|
+
dispatchVehicleState({
|
|
3112
|
+
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleGetLocal,
|
|
3113
|
+
});
|
|
3114
|
+
dispatchAppConfigState({
|
|
3115
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetIsReady,
|
|
3116
|
+
payload: true,
|
|
3117
|
+
});
|
|
3118
|
+
window.addEventListener('resize', windowResize);
|
|
3119
|
+
windowResize();
|
|
3120
|
+
});
|
|
3121
|
+
return null;
|
|
3122
|
+
};
|
|
3123
|
+
const StoryAppWrapperConfig = (props) => {
|
|
3124
|
+
const { children } = props;
|
|
3125
|
+
const { appConfigState, dispatchAppConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
3126
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
3127
|
+
dispatchAppConfigState({
|
|
3128
|
+
type: mychoiceSdkStore.StoreConfigAppConfigActionTypes.AppConfigSetDrawWrapper,
|
|
3129
|
+
payload: true,
|
|
3130
|
+
});
|
|
3131
|
+
});
|
|
3132
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(StoreConfig, {}), appConfigState.drawWrapper
|
|
3133
|
+
&& (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(AppModal, {}), children] }))] }));
|
|
3134
|
+
};
|
|
3135
|
+
const StoryAppWrapper = (props) => {
|
|
3136
|
+
const { appType, children } = props;
|
|
3137
|
+
mychoiceSdkComponents.useEffectOnce(() => {
|
|
3138
|
+
mychoiceSdkStore.initHttpResponse();
|
|
3139
|
+
});
|
|
3140
|
+
return (jsxRuntime.jsx(mychoiceSdkStore.StoreProvider, { children: jsxRuntime.jsx(reactRouterDom.BrowserRouter, { children: jsxRuntime.jsx(StoryAppWrapperConfig, { appType: appType, children: children }) }) }));
|
|
3141
|
+
};
|
|
3142
|
+
StoryAppWrapper.defaultProps = {
|
|
3143
|
+
appType: mychoiceSdkComponents.AppTypes.MyChoice,
|
|
3144
|
+
};
|
|
3145
|
+
|
|
3146
|
+
exports.AppWrapper = AppWrapper;
|
|
3147
|
+
exports.DateSelectFormBox = DateSelectFormBox;
|
|
3148
|
+
exports.HeaderMyChoice = HeaderMyChoice;
|
|
3149
|
+
exports.HeaderMyChoiceMobile = HeaderMyChoiceMobile;
|
|
3150
|
+
exports.HeaderPartner = HeaderPartner;
|
|
3151
|
+
exports.HeaderTheBig = HeaderTheBig;
|
|
3152
|
+
exports.InputFormBox = InputFormBox;
|
|
3153
|
+
exports.InputFormEmailBox = InputFormEmailBox;
|
|
3154
|
+
exports.InputFormLicenceBox = InputFormLicenceBox;
|
|
3155
|
+
exports.InputFormPhoneBox = InputFormPhoneBox;
|
|
3156
|
+
exports.LabelFormBox = LabelFormBox;
|
|
3157
|
+
exports.LoaderPrimary = LoaderPrimary;
|
|
3158
|
+
exports.ModalConfirm = ModalConfirm;
|
|
3159
|
+
exports.ModalFinale = ModalFinale;
|
|
3160
|
+
exports.ModalMessage = ModalMessage;
|
|
3161
|
+
exports.ModalPostal = ModalPostal;
|
|
3162
|
+
exports.ModalQuoteRequest = ModalQuoteRequest;
|
|
3163
|
+
exports.NavigationBottom = NavigationBottom;
|
|
3164
|
+
exports.NavigationBottomTheBig = NavigationBottomTheBig;
|
|
3165
|
+
exports.NavigationTab = NavigationTab;
|
|
3166
|
+
exports.NavigationTabMobile = NavigationTabMobile;
|
|
3167
|
+
exports.NavigationTop = NavigationTop;
|
|
3168
|
+
exports.OfferSection = OfferSection;
|
|
3169
|
+
exports.PageAddress = PageAddress;
|
|
3170
|
+
exports.PageApplicant = PageApplicant;
|
|
3171
|
+
exports.PageCarDiscount = PageCarDiscount;
|
|
3172
|
+
exports.PageDriver = PageDriver;
|
|
3173
|
+
exports.PageHomeDiscount = PageHomeDiscount;
|
|
3174
|
+
exports.PageProperty = PageProperty;
|
|
3175
|
+
exports.PageQuote = PageQuote;
|
|
3176
|
+
exports.PageVehicle = PageVehicle;
|
|
3177
|
+
exports.SelectFormBox = SelectFormBox;
|
|
3178
|
+
exports.StoryAppWrapper = StoryAppWrapper;
|
|
3179
|
+
exports.SwitchButtonBox = SwitchButtonBox;
|
|
3180
|
+
exports.capitalize = capitalize;
|
|
3181
|
+
exports.checkDateIsSpecial = checkDateIsSpecial;
|
|
3182
|
+
exports.formSteps = formSteps;
|
|
3183
|
+
exports.formatPhoneObject = formatPhoneObject;
|
|
3184
|
+
exports.formatTitleToCapital = formatTitleToCapital;
|
|
3185
|
+
exports.getDateErrorMessage = getDateErrorMessage;
|
|
3186
|
+
exports.getDisabledLicenceTypes = getDisabledLicenceTypes;
|
|
3187
|
+
exports.getErrorMessage = getErrorMessage;
|
|
3188
|
+
exports.getInsuranceType = getInsuranceType;
|
|
3189
|
+
exports.getLicenceMaxDate = getLicenceMaxDate;
|
|
3190
|
+
exports.getLicenceMinDate = getLicenceMinDate;
|
|
3191
|
+
exports.getLicenceTypeOptions = getLicenceTypeOptions;
|
|
3192
|
+
exports.getSelectedOption = getSelectedOption;
|
|
3193
|
+
exports.usePathGroups = usePathGroups;
|
|
3194
|
+
//# sourceMappingURL=index.js.map
|