@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/cjs/index.js +9 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +9 -6
- package/dist/esm/index.js.map +1 -1
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -188,9 +188,9 @@ const usePathGroups = (insuranceType) => {
|
|
|
188
188
|
// [`${InsuranceTypes.Life}`]: [{ name: 'Life', link: `/${appConfigState.localIndex}/life` }],
|
|
189
189
|
};
|
|
190
190
|
const externalPathGroup = [
|
|
191
|
-
{ name: 'Car', link: 'https://
|
|
192
|
-
{ name: 'Home', link: 'https://
|
|
193
|
-
{ name: 'Life', link: 'https://
|
|
191
|
+
{ name: 'Car', link: 'https://quote.mychoice.ca/insurance/car' },
|
|
192
|
+
{ name: 'Home', link: 'https://quote.mychoice.ca/insurance/home' },
|
|
193
|
+
{ name: 'Life', link: 'https://quote.mychoice.ca/insurance/life' },
|
|
194
194
|
{ name: 'Learn', link: 'https://www.mychoice.ca/blog/' },
|
|
195
195
|
];
|
|
196
196
|
// @todo: use in future.
|
|
@@ -308,10 +308,12 @@ const ModalPostal = () => {
|
|
|
308
308
|
const getVehicleYearRange = () => {
|
|
309
309
|
const currentDate = new Date();
|
|
310
310
|
const vehicleYear = [];
|
|
311
|
-
|
|
311
|
+
const currentYear = currentDate.getFullYear();
|
|
312
|
+
const minYear = currentYear - 25;
|
|
313
|
+
for (let year = (currentDate.getFullYear()); year > minYear; year -= 1) {
|
|
312
314
|
vehicleYear.push({ name: `${year}`, value: `${year}` });
|
|
313
315
|
}
|
|
314
|
-
vehicleYear.push({ name:
|
|
316
|
+
vehicleYear.push({ name: `${minYear} or older`, value: `${minYear}` });
|
|
315
317
|
return vehicleYear;
|
|
316
318
|
};
|
|
317
319
|
const getRecommendedRange = (distanceDaily, distanceBusiness) => {
|
|
@@ -3776,6 +3778,7 @@ const AppRouteWrapper = (props) => {
|
|
|
3776
3778
|
let postalCode = carPostal;
|
|
3777
3779
|
const { clearFormData, checkIsExpired, checkIsExpiredWithModal, } = mychoiceSdkStore.ClearFormDataHandler();
|
|
3778
3780
|
const { appLoaderState } = mychoiceSdkStore.useStoreAppLoader();
|
|
3781
|
+
const isMychoice = appType === mychoiceSdkComponents.AppTypes.MyChoice;
|
|
3779
3782
|
switch (insuranceType) {
|
|
3780
3783
|
case mychoiceSdkComponents.InsuranceTypes.Car:
|
|
3781
3784
|
postalCode = carPostal;
|
|
@@ -3985,7 +3988,7 @@ const AppRouteWrapper = (props) => {
|
|
|
3985
3988
|
}
|
|
3986
3989
|
}
|
|
3987
3990
|
}, [carPostal, homePostal, lifePostal, isReady]);
|
|
3988
|
-
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: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted })), insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice && (jsxRuntime.jsx("div", { className: "step-progress-bar", children: jsxRuntime.jsx("span", { style: { width: progressLength } }) })), jsxRuntime.jsx("div", { className: `${insuranceType ? 'form-page-content' : ''} ${insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice ? 'mychoice' : ''}`, children: insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice && isDesktop && progressLength ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "mychoice-content", children: [jsxRuntime.jsx(StepsBox, { className: "step-box", formSteps: steps, validationHooks: validationHooks, propertyIsCompleted: isCompleted }), children, jsxRuntime.jsx("div", { className: "empty-steps-container" })] }) })) : children }), !appLoaderState.isOpen && insuranceType === mychoiceSdkComponents.InsuranceTypes.Car && jsxRuntime.jsx(ProviderImageFooter, {})] })) }));
|
|
3991
|
+
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: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted })), insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice && (jsxRuntime.jsx("div", { className: "step-progress-bar", children: jsxRuntime.jsx("span", { style: { width: progressLength } }) })), jsxRuntime.jsx("div", { className: `${insuranceType ? 'form-page-content' : ''} ${insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice ? 'mychoice' : ''}`, children: insuranceType && appType === mychoiceSdkComponents.AppTypes.MyChoice && isDesktop && progressLength ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "mychoice-content", children: [jsxRuntime.jsx(StepsBox, { className: "step-box", formSteps: steps, validationHooks: validationHooks, propertyIsCompleted: isCompleted }), children, jsxRuntime.jsx("div", { className: "empty-steps-container" })] }) })) : children }), isMychoice && !appLoaderState.isOpen && insuranceType === mychoiceSdkComponents.InsuranceTypes.Car && jsxRuntime.jsx(ProviderImageFooter, {})] })) }));
|
|
3989
3992
|
};
|
|
3990
3993
|
const NestedRoutes = () => {
|
|
3991
3994
|
const insuranceType = mychoiceSdkComponents.getInsuranceType();
|