@mychoice/mychoice-sdk-modules 2.1.9 → 2.1.13

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
@@ -178,9 +178,9 @@ const usePathGroups = (insuranceType) => {
178
178
  // [`${InsuranceTypes.Life}`]: [{ name: 'Life', link: `/${appConfigState.localIndex}/life` }],
179
179
  };
180
180
  const externalPathGroup = [
181
- { name: 'Car', link: 'https://www.mychoice.ca/insurance/car' },
182
- { name: 'Home', link: 'https://www.mychoice.ca/insurance/home' },
183
- { name: 'Life', link: 'https://www.mychoice.ca/insurance/life' },
181
+ { name: 'Car', link: 'https://quote.mychoice.ca/insurance/car' },
182
+ { name: 'Home', link: 'https://quote.mychoice.ca/insurance/home' },
183
+ { name: 'Life', link: 'https://quote.mychoice.ca/insurance/life' },
184
184
  { name: 'Learn', link: 'https://www.mychoice.ca/blog/' },
185
185
  ];
186
186
  // @todo: use in future.
@@ -298,10 +298,12 @@ const ModalPostal = () => {
298
298
  const getVehicleYearRange = () => {
299
299
  const currentDate = new Date();
300
300
  const vehicleYear = [];
301
- for (let year = (currentDate.getFullYear()); year >= 1999; year -= 1) {
301
+ const currentYear = currentDate.getFullYear();
302
+ const minYear = currentYear - 25;
303
+ for (let year = (currentDate.getFullYear()); year > minYear; year -= 1) {
302
304
  vehicleYear.push({ name: `${year}`, value: `${year}` });
303
305
  }
304
- vehicleYear.push({ name: '1998 or older', value: '1998' });
306
+ vehicleYear.push({ name: `${minYear} or older`, value: `${minYear}` });
305
307
  return vehicleYear;
306
308
  };
307
309
  const getRecommendedRange = (distanceDaily, distanceBusiness) => {
@@ -3766,6 +3768,7 @@ const AppRouteWrapper = (props) => {
3766
3768
  let postalCode = carPostal;
3767
3769
  const { clearFormData, checkIsExpired, checkIsExpiredWithModal, } = ClearFormDataHandler();
3768
3770
  const { appLoaderState } = useStoreAppLoader();
3771
+ const isMychoice = appType === AppTypes.MyChoice;
3769
3772
  switch (insuranceType) {
3770
3773
  case InsuranceTypes.Car:
3771
3774
  postalCode = carPostal;
@@ -3975,7 +3978,7 @@ const AppRouteWrapper = (props) => {
3975
3978
  }
3976
3979
  }
3977
3980
  }, [carPostal, homePostal, lifePostal, isReady]);
3978
- return (jsx(Fragment, { children: isReady && (jsxs(Fragment, { children: [jsx(AppHeader, {}), jsx(AppModal, {}), insuranceType && (jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted })), insuranceType && appType === AppTypes.MyChoice && (jsx("div", { className: "step-progress-bar", children: jsx("span", { style: { width: progressLength } }) })), jsx("div", { className: `${insuranceType ? 'form-page-content' : ''} ${insuranceType && appType === AppTypes.MyChoice ? 'mychoice' : ''}`, children: insuranceType && appType === AppTypes.MyChoice && isDesktop && progressLength ? (jsx(Fragment, { children: jsxs("div", { className: "mychoice-content", children: [jsx(StepsBox, { className: "step-box", formSteps: steps, validationHooks: validationHooks, propertyIsCompleted: isCompleted }), children, jsx("div", { className: "empty-steps-container" })] }) })) : children }), !appLoaderState.isOpen && insuranceType === InsuranceTypes.Car && jsx(ProviderImageFooter, {})] })) }));
3981
+ return (jsx(Fragment, { children: isReady && (jsxs(Fragment, { children: [jsx(AppHeader, {}), jsx(AppModal, {}), insuranceType && (jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted })), insuranceType && appType === AppTypes.MyChoice && (jsx("div", { className: "step-progress-bar", children: jsx("span", { style: { width: progressLength } }) })), jsx("div", { className: `${insuranceType ? 'form-page-content' : ''} ${insuranceType && appType === AppTypes.MyChoice ? 'mychoice' : ''}`, children: insuranceType && appType === AppTypes.MyChoice && isDesktop && progressLength ? (jsx(Fragment, { children: jsxs("div", { className: "mychoice-content", children: [jsx(StepsBox, { className: "step-box", formSteps: steps, validationHooks: validationHooks, propertyIsCompleted: isCompleted }), children, jsx("div", { className: "empty-steps-container" })] }) })) : children }), isMychoice && !appLoaderState.isOpen && insuranceType === InsuranceTypes.Car && jsx(ProviderImageFooter, {})] })) }));
3979
3982
  };
3980
3983
  const NestedRoutes = () => {
3981
3984
  const insuranceType = getInsuranceType();