@mychoice/mychoice-sdk-modules 2.1.82 → 2.1.84

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/esm/index.js CHANGED
@@ -621,7 +621,7 @@ const getRecommendedRange = (distanceDaily, distanceBusiness) => {
621
621
  };
622
622
 
623
623
  const BlockCarInfo = () => {
624
- const { status: statusMake, getVehicleMake, vehicleMakeList = [] } = useHandlerCarMake();
624
+ const { status: statusMake, getVehicleMake, vehicleMakeGroupList = [], } = useHandlerCarMake();
625
625
  const { status: statusModel, getVehicleModel, vehicleModelList = [] } = useHandlerCarModel();
626
626
  const { vehicleState, dispatchVehicleState } = useStoreFormCarVehicle();
627
627
  const { year: currentYear, make: currentMake, model: currentModel, } = vehicleState.items[vehicleState.activeIndex];
@@ -661,10 +661,10 @@ const BlockCarInfo = () => {
661
661
  getVehicleModel(currentYear, currentMake);
662
662
  }
663
663
  });
664
- return (jsxs(Fragment, { children: [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 ? yearMessage : getErrorMessage(currentYear, vehicleState.inValidation), defaultValue: currentYear, autoSelectIfValueIsOutOfOptions: false, onChange: handleVehicleYearChange }), !!vehicleMakeList.length
664
+ return (jsxs(Fragment, { children: [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 ? yearMessage : getErrorMessage(currentYear, vehicleState.inValidation), defaultValue: currentYear, autoSelectIfValueIsOutOfOptions: false, onChange: handleVehicleYearChange }), !!vehicleMakeGroupList.length
665
665
  && yearIsValid
666
666
  && statusMake === RequestStatusTypes.Success
667
- && (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
667
+ && (jsx(SelectFormBox, { options: [], groupOptions: vehicleMakeGroupList, 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
668
668
  && currentMake
669
669
  && yearIsValid
670
670
  && statusModel === RequestStatusTypes.Success