@mychoice/mychoice-sdk-modules 2.2.17 → 2.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -766,6 +766,7 @@ const BlockCarConditionInfo = () => {
766
766
  const { discountState, dispatchDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
767
767
  const { isAlbertaProvince } = mychoiceSdkStore.useProvince();
768
768
  const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
769
+ const showPolicyStartOnVehiclePage = isTheBig || mychoiceSdkComponents.isMyChoiceLike(appType);
769
770
  const { policyStartYear, policyStartMonth, policyStartDay } = discountState;
770
771
  const defaultPolicyStartDate = {
771
772
  year: policyStartYear,
@@ -881,7 +882,7 @@ const BlockCarConditionInfo = () => {
881
882
  purchaseMonth || '',
882
883
  purchaseYear || '',
883
884
  ], vehicleState.inValidation), error: vehicleState.inValidation, minDate: year ? `${Number(year) - 1}-01-01` : mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd'), maxDate: mychoiceSdkComponents.getFormattedDate('', 'yyyy-MM-dd') }), !(isAlbertaProvince && isTheBig) && (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
884
- ${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) }), isTheBig && (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're continuously covered. Alternatively, select today's date for a quote or new policy.", minDate: mychoiceSdkComponents.addDaysToDate('', 1), maxDate: mychoiceSdkComponents.addDaysToDate('', 90), isDay: true }))] }));
885
+ ${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) }), showPolicyStartOnVehiclePage && (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're continuously covered. Alternatively, select today's date for a quote or new policy.", minDate: mychoiceSdkComponents.addDaysToDate('', 1), maxDate: mychoiceSdkComponents.addDaysToDate('', 90), isDay: true }))] }));
885
886
  };
886
887
 
887
888
  const VehicleSectionMain = () => {
@@ -890,9 +891,13 @@ const VehicleSectionMain = () => {
890
891
  return (jsxRuntime.jsxs("div", { className: `form-section top-section ${mychoiceCls}`, children: [mychoiceCls && jsxRuntime.jsx("h2", { className: "section-title", children: "Give us the scoop on your four-wheeled friend." }), jsxRuntime.jsx(BlockCarInfo, {}), jsxRuntime.jsx(BlockCarConditionInfo, {})] }));
891
892
  };
892
893
 
893
- const AccidentBenefitsModal = ({ selectedCoverages, onApply, onCancel, }) => {
894
- const [localSelected, setLocalSelected] = React.useState([...selectedCoverages]);
894
+ const AccidentBenefitsModal = ({ selectedCoverages, onApply, onCancel, selectAllByDefault = false, }) => {
895
+ const { appConfigState: { appType } } = mychoiceSdkStore.useStoreAppConfig();
896
+ const isMyChoice = mychoiceSdkComponents.isMyChoiceLike(appType);
895
897
  const allValues = mychoiceSdkComponents.accidentBenefitsOptionalOptions.map((o) => o.value);
898
+ const [localSelected, setLocalSelected] = React.useState(selectedCoverages.length > 0
899
+ ? [...selectedCoverages]
900
+ : (selectAllByDefault ? [...allValues] : []));
896
901
  const allSelected = allValues.every((v) => localSelected.includes(v));
897
902
  const handleToggle = (value) => {
898
903
  setLocalSelected((prev) => prev.includes(value) ? prev.filter((v) => v !== value) : [...prev, value]);
@@ -905,17 +910,44 @@ const AccidentBenefitsModal = ({ selectedCoverages, onApply, onCancel, }) => {
905
910
  setLocalSelected([...allValues]);
906
911
  }
907
912
  };
908
- return (jsxRuntime.jsx("div", { className: "ab-modal-overlay", onClick: onCancel, children: jsxRuntime.jsxs("div", { className: "ab-modal", onClick: (e) => e.stopPropagation(), children: [jsxRuntime.jsxs("div", { className: "ab-modal-header", children: [jsxRuntime.jsx("h3", { children: "Accident Benefits" }), jsxRuntime.jsx("p", { className: "ab-modal-subtitle", children: "Standard Coverage + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { className: "ab-modal-body-text", children: "Base coverage with flexibility to select additional benefits" })] }), jsxRuntime.jsxs("div", { className: "ab-modal-content", children: [jsxRuntime.jsxs("div", { className: "ab-modal-standard-block ab-modal-standard-block--included", children: [jsxRuntime.jsxs("div", { className: "ab-modal-standard-included-header", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: true, disabled: true, readOnly: true, className: "ab-modal-standard-locked-checkbox" }), jsxRuntime.jsx("h4", { children: "Standard Benefits \u2014 Included" })] }), jsxRuntime.jsx("p", { className: "ab-modal-standard-subtitle", children: "Medical, Rehabilitation, and Attendant Care" }), jsxRuntime.jsx("p", { className: "ab-modal-standard-description", children: "Covers medical expenses, therapy and personal care for injuries from an accident, including doctor visits and physiotherapy." })] }), jsxRuntime.jsxs("div", { className: "ab-modal-optional-block", children: [jsxRuntime.jsxs("label", { className: "ab-modal-select-all", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: allSelected, onChange: handleSelectAll }), jsxRuntime.jsx("span", { children: "Select All Additional Benefits" })] }), jsxRuntime.jsx("div", { className: "ab-modal-options", children: mychoiceSdkComponents.accidentBenefitsOptionalOptions.map((option) => (jsxRuntime.jsxs("label", { className: "ab-modal-option", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: localSelected.includes(option.value), onChange: () => handleToggle(option.value) }), jsxRuntime.jsxs("div", { className: "ab-modal-option-text", children: [jsxRuntime.jsx("strong", { children: option.name }), jsxRuntime.jsx("span", { children: option.description })] })] }, option.value))) }), jsxRuntime.jsxs("div", { className: "ab-modal-minimum-notice", children: [jsxRuntime.jsx("strong", { children: "Minimum Limits Apply" }), jsxRuntime.jsx("p", { children: "All optional benefits selected below will be quoted at their minimum coverage limits. Please speak with your broker if you wish to discuss higher limits." })] })] })] }), jsxRuntime.jsxs("div", { className: "ab-modal-actions", children: [jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-cancel", onClick: onCancel, children: "Cancel" }), jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-apply", onClick: () => onApply(localSelected), children: "Apply" })] })] }) }));
913
+ return (jsxRuntime.jsx("div", { className: "ab-modal-overlay", onClick: onCancel, children: jsxRuntime.jsxs("div", { className: "ab-modal", onClick: (e) => e.stopPropagation(), children: [jsxRuntime.jsxs("div", { className: "ab-modal-header", children: [jsxRuntime.jsx("h3", { children: "Accident Benefits" }), jsxRuntime.jsx("p", { className: "ab-modal-subtitle", children: "Standard Coverage + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { className: "ab-modal-body-text", children: "Base coverage with flexibility to select additional benefits" })] }), jsxRuntime.jsxs("div", { className: "ab-modal-content", children: [jsxRuntime.jsxs("div", { className: "ab-modal-standard-block ab-modal-standard-block--included", children: [jsxRuntime.jsxs("div", { className: "ab-modal-standard-included-header", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: true, disabled: true, readOnly: true, className: "ab-modal-standard-locked-checkbox" }), jsxRuntime.jsx("h4", { children: isMyChoice ? 'All Coverages Included by Default' : 'Standard Benefits Included' })] }), !isMyChoice && (jsxRuntime.jsx("p", { className: "ab-modal-standard-subtitle", children: "Medical, Rehabilitation, and Attendant Care" })), jsxRuntime.jsx("p", { className: "ab-modal-standard-description", children: isMyChoice ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["Our standard quote automatically includes all optional accident benefits at their minimum coverage limits. We strongly recommend keeping all coverages selected to ensure the most complete protection \u2014 opting out could leave you without critical support when you need it most. For example, deselecting Income Replacement means no weekly payments if an injury prevents you from working, and removing Caregiver Replacement leaves no financial support for dependents in your care.", jsxRuntime.jsx("br", {}), jsxRuntime.jsx("br", {}), "Please speak with a broker partner to discuss higher limits or learn more about how each benefit protects you."] })) : ('Covers medical expenses, therapy and personal care for injuries from an accident, including doctor visits and physiotherapy.') })] }), jsxRuntime.jsxs("div", { className: "ab-modal-optional-block", children: [jsxRuntime.jsxs("label", { className: "ab-modal-select-all", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: allSelected, onChange: handleSelectAll }), jsxRuntime.jsx("span", { children: "Select All Additional Benefits" })] }), jsxRuntime.jsx("div", { className: "ab-modal-options", children: mychoiceSdkComponents.accidentBenefitsOptionalOptions.map((option) => (jsxRuntime.jsxs("label", { className: "ab-modal-option", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: localSelected.includes(option.value), onChange: () => handleToggle(option.value) }), jsxRuntime.jsxs("div", { className: "ab-modal-option-text", children: [jsxRuntime.jsx("strong", { children: option.name }), jsxRuntime.jsx("span", { children: option.description })] })] }, option.value))) }), jsxRuntime.jsxs("div", { className: "ab-modal-minimum-notice", children: [jsxRuntime.jsx("strong", { children: "Minimum Limits Apply" }), jsxRuntime.jsx("p", { children: "All optional benefits selected below will be quoted at their minimum coverage limits. Please speak with your broker if you wish to discuss higher limits." })] })] })] }), jsxRuntime.jsxs("div", { className: "ab-modal-actions", children: [jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-cancel", onClick: onCancel, children: "Cancel" }), jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-apply", onClick: () => onApply(localSelected), children: "Apply" })] })] }) }));
909
914
  };
910
915
 
916
+ const allAccidentBenefitsCoverageValues = mychoiceSdkComponents.accidentBenefitsOptionalOptions.map((option) => option.value);
911
917
  const VehicleSectionAccidentBenefits = () => {
912
918
  const { vehicleState, dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
913
919
  const { accidentbenefits } = vehicleState.items[vehicleState.activeIndex];
914
920
  const { appConfigState: { appType }, } = mychoiceSdkStore.useStoreAppConfig();
915
- const mychoiceCls = mychoiceSdkComponents.isMyChoiceLike(appType) ? 'mychoice' : '';
921
+ const isMyChoice = mychoiceSdkComponents.isMyChoiceLike(appType);
922
+ const mychoiceCls = isMyChoice ? 'mychoice' : '';
916
923
  const { isAbReformActive } = mychoiceSdkStore.useAbReform();
917
924
  const [modalOpen, setModalOpen] = React.useState(false);
918
- if (!isAbReformActive || appType !== mychoiceSdkComponents.AppTypes.TheBig)
925
+ React.useEffect(() => {
926
+ if (!isAbReformActive || !isMyChoice || accidentbenefits.abAcknowledged) {
927
+ return;
928
+ }
929
+ const isUnset = accidentbenefits.baseCoverage === 'minimum_required'
930
+ && accidentbenefits.additionalCoverages.length === 0;
931
+ if (!isUnset) {
932
+ return;
933
+ }
934
+ dispatchVehicleState({
935
+ type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarAccidentBenefitsAdditionalCoveragesSet,
936
+ payload: { additionalCoverages: [...allAccidentBenefitsCoverageValues] },
937
+ });
938
+ dispatchVehicleState({
939
+ type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarAccidentBenefitsBaseCoverageSelect,
940
+ payload: { baseCoverage: 'med_rehab_cat_1m' },
941
+ });
942
+ }, [
943
+ isAbReformActive,
944
+ isMyChoice,
945
+ accidentbenefits.abAcknowledged,
946
+ accidentbenefits.baseCoverage,
947
+ accidentbenefits.additionalCoverages.length,
948
+ dispatchVehicleState,
949
+ ]);
950
+ if (!isAbReformActive)
919
951
  return null;
920
952
  const handleApply = (selected) => {
921
953
  dispatchVehicleState({
@@ -940,7 +972,7 @@ const VehicleSectionAccidentBenefits = () => {
940
972
  setModalOpen(false);
941
973
  };
942
974
  const hasError = !accidentbenefits.abAcknowledged && vehicleState.inValidation;
943
- return (jsxRuntime.jsxs("div", { id: "abAcknowledged", className: `form-section ab-section ${mychoiceCls}`, children: [jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: "As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs." })] }), jsxRuntime.jsxs("div", { className: `ab-option-selector${hasError ? ' ab-option-selector--error' : ''}`, role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (e) => e.key === 'Enter' && setModalOpen(true), children: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: "Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { children: "Base coverage with flexibility to select additional benefits" }), jsxRuntime.jsx("p", { className: "ab-option-selector-hint", children: "Selecting this option will open a window displaying all available optional Accident Benefits, which you may individually select based on your needs. Each selected benefit will be quoted at its minimum limit." })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleApply, onCancel: () => setModalOpen(false) }))] }));
975
+ return (jsxRuntime.jsxs("div", { id: "abAcknowledged", className: `form-section ab-section ${mychoiceCls}`, children: [jsxRuntime.jsx(LabelFormBox, { name: "accident-benefits", title: "Accident Benefits" }), jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: "As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs." })] }), jsxRuntime.jsxs("div", { className: `ab-option-selector${hasError ? ' ab-option-selector--error' : ''}`, role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (e) => e.key === 'Enter' && setModalOpen(true), children: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: "Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { children: "Base coverage with flexibility to select additional benefits" }), jsxRuntime.jsx("p", { className: "ab-option-selector-hint", children: "Selecting this option will open a window displaying all available optional Accident Benefits, which you may individually select based on your needs. Each selected benefit will be quoted at its minimum limit." })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleApply, onCancel: () => setModalOpen(false), selectAllByDefault: isMyChoice }))] }));
944
976
  };
945
977
 
946
978
  const VehicleSectionCoverage = () => {
@@ -1467,7 +1499,7 @@ you had insurance. If this is correct, please continue with the form.`);
1467
1499
  };
1468
1500
  return (jsxRuntime.jsxs("div", { className: `form-section ${mychoiceCls}`, 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
1469
1501
  ? getDateErrorMessage(['01', listedMonth, listedYear], driverState.inValidation)
1470
- : '', 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 && (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 })] })), !isTheBig && (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([policyStartDay || '', policyStartMonth || '', policyStartYear || ''], driverState.inValidation), error: driverState.inValidation, minDate: mychoiceSdkComponents.addDaysToDate('', 1), maxDate: mychoiceSdkComponents.addDaysToDate('', 60), isDay: true }))] }));
1502
+ : '', 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 && (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 })] })), !isTheBig && !mychoiceSdkComponents.isMyChoiceLike(appType) && (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([policyStartDay || '', policyStartMonth || '', policyStartYear || ''], driverState.inValidation), error: driverState.inValidation, minDate: mychoiceSdkComponents.addDaysToDate('', 1), maxDate: mychoiceSdkComponents.addDaysToDate('', 60), isDay: true }))] }));
1471
1503
  };
1472
1504
 
1473
1505
  const SectionDriverCancellation = () => {
@@ -2143,12 +2175,12 @@ const SectionQuoteRecalc$1 = () => {
2143
2175
  ? 'Your premium has been recalculated. Your broker has been notified and will contact you to discuss your Accident Benefits selections.'
2144
2176
  : 'Your premium has been recalculated.';
2145
2177
  }
2146
- return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabVehicle, { readOnly: true }), jsxRuntime.jsxs("div", { className: `form-section edit-recalc-container ${mychoiceCls}`, 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 }), isAbReformActive && isTheBig && (jsxRuntime.jsxs("div", { className: "accident-benefits-container", children: [jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: "As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs." })] }), jsxRuntime.jsxs("div", { className: "ab-option-selector", role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (event) => event.key === 'Enter' && setModalOpen(true), children: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: "Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { children: "Base coverage with flexibility to select additional benefits" })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleModalApply, onCancel: () => setModalOpen(false) }))] })), isAbReformActive && isTheBig && abPendingRecalc && !isRecalcSubmitted && (jsxRuntime.jsx("p", { className: "accident-benefits-recalc-pending", children: "Your Accident Benefits selections have been updated. Click Recalculate to update your premium." })), jsxRuntime.jsx(BlockSubmit$2, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} recalculate`, label: "Recalculate Quote", buttonSize: mychoiceSdkComponents.SizeTypes.Medium, isRecalc: true, onSubmitClick: () => {
2178
+ return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabVehicle, { readOnly: true }), jsxRuntime.jsxs("div", { className: `form-section edit-recalc-container ${mychoiceCls}`, 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 }), isAbReformActive && (jsxRuntime.jsxs("div", { className: "accident-benefits-container", children: [jsxRuntime.jsx(LabelFormBox, { name: "accident-benefits-recalc", title: "Accident Benefits" }), jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: "As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs." })] }), jsxRuntime.jsxs("div", { className: "ab-option-selector", role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (event) => event.key === 'Enter' && setModalOpen(true), children: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: "Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { children: "Base coverage with flexibility to select additional benefits" })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleModalApply, onCancel: () => setModalOpen(false), selectAllByDefault: mychoiceCls === 'mychoice' }))] })), isAbReformActive && abPendingRecalc && !isRecalcSubmitted && (jsxRuntime.jsx("p", { className: "accident-benefits-recalc-pending", children: "Your Accident Benefits selections have been updated. Click Recalculate to update your premium." })), jsxRuntime.jsx(BlockSubmit$2, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} recalculate`, label: "Recalculate Quote", buttonSize: mychoiceSdkComponents.SizeTypes.Medium, isRecalc: true, onSubmitClick: () => {
2147
2179
  recalcInitiatedRef.current = true;
2148
2180
  setAbPendingRecalc(false);
2149
2181
  emitAbPendingRecalc(false);
2150
2182
  setIsRecalcSubmitted(false);
2151
- } }), isAbReformActive && isTheBig && isRecalcSubmitted && (jsxRuntime.jsx("p", { className: "accident-benefits-recalc-message", children: recalcMessage })), isTheBig ? jsxRuntime.jsx(BlockEndorsements, {}) : jsxRuntime.jsx(BlockMCEndorsements, {})] })] }));
2183
+ } }), isAbReformActive && isRecalcSubmitted && (jsxRuntime.jsx("p", { className: "accident-benefits-recalc-message", children: recalcMessage })), isTheBig ? jsxRuntime.jsx(BlockEndorsements, {}) : jsxRuntime.jsx(BlockMCEndorsements, {})] })] }));
2152
2184
  };
2153
2185
 
2154
2186
  const lockEmoji$1 = '\u{1F512}';
@@ -2236,7 +2268,7 @@ const PageCarQuote = () => {
2236
2268
  const navigate = reactRouterDom.useNavigate();
2237
2269
  const [recalcFailed, setRecalcFailed] = React.useState(false);
2238
2270
  const [abPendingRecalc, setAbPendingRecalc] = React.useState(false);
2239
- const showAbRecalculateCta = abPendingRecalc && isTheBig;
2271
+ const showAbRecalculateCta = abPendingRecalc && isAbReformActive;
2240
2272
  const shouldGreyOutOffers = recalcFailed && !showAbRecalculateCta;
2241
2273
  const prevRequestDateRef = React.useRef(undefined);
2242
2274
  const lastSuccessfulItemsRef = React.useRef(undefined);
@@ -2304,7 +2336,7 @@ const PageCarQuote = () => {
2304
2336
  saturdayHours: displayBestItem?.brokerProfile.hoursSaturday,
2305
2337
  sundayHours: displayBestItem?.brokerProfile.hoursSunday,
2306
2338
  weekdayHours: displayBestItem?.brokerProfile.hoursWorkdays,
2307
- }, phoneNumber: formatPhoneObject(displayBestItem?.brokerProfile.phone ?? ''), redirectUrl: displayBestItem?.brokerProfile.redirectUrl || '', coverages: displayBestItem?.coverages, nonStandardCoverages: displayBestItem?.nonStandardCoverages, brokerIntegration: displayBestItem?.brokerIntegration, showRecalculateCta: showAbRecalculateCta, onRecalculateClick: handleRecalculateClick }) })) : (jsxRuntime.jsx(SplashScreen$2, {})) })) : (jsxRuntime.jsx(NoQuotesMessage, { type: "car" })) })), (!hasConfirmStep || appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsxRuntime.jsx(SectionQuoteRecalc$1, {})] }))] }), appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile && quoteState.showCallMessage && jsxRuntime.jsx(SplashScreen$2, {}), !quoteState.showCallMessage && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { style: { position: 'relative', width: '100%' }, children: [isAbReformActive && isTheBig && (jsxRuntime.jsxs("div", { className: "ab-disclaimer", children: [jsxRuntime.jsx("strong", { children: "Important Disclaimer" }), jsxRuntime.jsxs("p", { children: ["Due to the changes to the Statutory Accident Benefit Coverage, effective July 1, 2026", ' ', jsxRuntime.jsx("a", { href: "https://www.fsrao.ca/industry/auto-insurance/changes-statutory-accident-benefits-coverage-ontario-july-1-2026#:~:text=July%201%2C%202026-,Changes%20in%20Statutory%20Accident%20Benefits%20coverage%20in%20Ontario%20on%20July,fits%20their%20needs%20and%20budgets.", target: "_blank", rel: "noreferrer noopener", children: "(Government of Ontario website)" }), ", please consider the individual circumstances for all drivers quoted before making your selections. Speak with your insurance broker if you have questions or need help understanding your options. Your Accident Benefits coverage selections will impact both your quoted premium and the coverage available to drivers on the quote."] })] })), hasConfirmStep && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "offer-container", children: jsxRuntime.jsx(SectionConfirm, {}) }), appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsxRuntime.jsx(SectionQuoteRecalc$1, {})] }))] })), jsxRuntime.jsx("div", { className: `offer-container ${hasConfirmStep ? 'blur' : ''} ${shouldGreyOutOffers ? 'greyed-out' : ''}`, children: !!(items?.length || recalcFailed) ? ((() => {
2339
+ }, phoneNumber: formatPhoneObject(displayBestItem?.brokerProfile.phone ?? ''), redirectUrl: displayBestItem?.brokerProfile.redirectUrl || '', coverages: displayBestItem?.coverages, nonStandardCoverages: displayBestItem?.nonStandardCoverages, brokerIntegration: displayBestItem?.brokerIntegration, showRecalculateCta: showAbRecalculateCta, onRecalculateClick: handleRecalculateClick }) })) : (jsxRuntime.jsx(SplashScreen$2, {})) })) : (jsxRuntime.jsx(NoQuotesMessage, { type: "car" })) })), (!hasConfirmStep || appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsxRuntime.jsx(SectionQuoteRecalc$1, {})] }))] }), appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile && quoteState.showCallMessage && jsxRuntime.jsx(SplashScreen$2, {}), !quoteState.showCallMessage && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { style: { position: 'relative', width: '100%' }, children: [isAbReformActive && (jsxRuntime.jsxs("div", { className: "ab-disclaimer", children: [jsxRuntime.jsx("strong", { children: "Important Disclaimer" }), jsxRuntime.jsxs("p", { children: ["Due to the changes to the Statutory Accident Benefit Coverage, effective July 1, 2026", ' ', jsxRuntime.jsx("a", { href: "https://www.fsrao.ca/industry/auto-insurance/changes-statutory-accident-benefits-coverage-ontario-july-1-2026#:~:text=July%201%2C%202026-,Changes%20in%20Statutory%20Accident%20Benefits%20coverage%20in%20Ontario%20on%20July,fits%20their%20needs%20and%20budgets.", target: "_blank", rel: "noreferrer noopener", children: "(Government of Ontario website)" }), ", please consider the individual circumstances for all drivers quoted before making your selections. Speak with your insurance broker if you have questions or need help understanding your options. Your Accident Benefits coverage selections will impact both your quoted premium and the coverage available to drivers on the quote."] })] })), hasConfirmStep && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "offer-container", children: jsxRuntime.jsx(SectionConfirm, {}) }), appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsxRuntime.jsx(SectionQuoteRecalc$1, {})] }))] })), jsxRuntime.jsx("div", { className: `offer-container ${hasConfirmStep ? 'blur' : ''} ${shouldGreyOutOffers ? 'greyed-out' : ''}`, children: !!(items?.length || recalcFailed) ? ((() => {
2308
2340
  const bestQuote = displayItems?.[0];
2309
2341
  const isContactOnlyIntegration = bestQuote?.brokerIntegration?.ux === 'contactonly';
2310
2342
  if (isContactOnlyIntegration && bestQuote) {
@@ -2326,7 +2358,7 @@ const PageCarQuote = () => {
2326
2358
  sundayHours: brokerProfile.hoursSunday,
2327
2359
  weekdayHours: brokerProfile.hoursWorkdays,
2328
2360
  }, phoneNumber: formatPhoneObject(brokerProfile.phone), redirectUrl: brokerProfile.redirectUrl || '', coverages: coverages, nonStandardCoverages: nonStandardCoverages, brokerIntegration: brokerIntegration, showRecalculateCta: showAbRecalculateCta, onRecalculateClick: handleRecalculateClick })) }, index)));
2329
- })()) : (jsxRuntime.jsx(NoQuotesMessage, { type: "car" })) }), isAbReformActive && isTheBig && (jsxRuntime.jsx("div", { className: "quote-expiry-disclaimer", children: "The information provided through this quote is for indicative purposes only and is based on the details submitted. Quotes are subject to change, may expire, and are not guaranteed or binding. Final premiums, coverage, and eligibility are determined by the insurer upon full review and underwriting. Please speak with your broker to confirm all details and secure binding coverage." }))] }) }))] })) }));
2361
+ })()) : (jsxRuntime.jsx(NoQuotesMessage, { type: "car" })) }), isAbReformActive && (jsxRuntime.jsx("div", { className: "quote-expiry-disclaimer", children: "The information provided through this quote is for indicative purposes only and is based on the details submitted. Quotes are subject to change, may expire, and are not guaranteed or binding. Final premiums, coverage, and eligibility are determined by the insurer upon full review and underwriting. Please speak with your broker to confirm all details and secure binding coverage." }))] }) }))] })) }));
2330
2362
  };
2331
2363
 
2332
2364
  const IndicatorsContainer = () => jsxRuntime.jsx(jsxRuntime.Fragment, {});