@mychoice/mychoice-sdk-modules 2.1.19 → 2.1.20
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 +8 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/init/StoryAppWrapper/StoryAppWrapper.d.ts +1 -1
- package/dist/cjs/init/StoryAppWrapper/interfaces.d.ts +1 -1
- package/dist/cjs/insurances/car/pages/{quote/PageAllQuotes.d.ts → three-point-five/BestOfferFirst.d.ts} +1 -1
- package/dist/cjs/insurances/car/pages/three-point-five/index.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/three-point-five/sections/OfferSectionCopy.d.ts +3 -0
- package/dist/cjs/insurances/car/pages/three-point-five/sections/OfferSectionDupe.d.ts +3 -0
- package/dist/cjs/insurances/car/pages/three-point-five/sections/index.d.ts +1 -0
- package/dist/esm/index.js +8 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/init/StoryAppWrapper/StoryAppWrapper.d.ts +1 -1
- package/dist/esm/init/StoryAppWrapper/interfaces.d.ts +1 -1
- package/dist/esm/insurances/car/pages/{quote/PageAllQuotes.d.ts → three-point-five/BestOfferFirst.d.ts} +1 -1
- package/dist/esm/insurances/car/pages/three-point-five/index.d.ts +1 -0
- package/dist/esm/insurances/car/pages/three-point-five/sections/OfferSectionCopy.d.ts +3 -0
- package/dist/esm/insurances/car/pages/three-point-five/sections/OfferSectionDupe.d.ts +3 -0
- package/dist/esm/insurances/car/pages/three-point-five/sections/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/insurances/car/pages/quote/sections/blocks/BlockConfirmImages.d.ts +0 -1
- package/dist/cjs/insurances/car/pages/quote/sections/blocks/BlockQuoteStatistics.d.ts +0 -2
- package/dist/cjs/shared/sections/quotes/OfferSection/BestOfferSection.d.ts +0 -3
- package/dist/cjs/shared/sections/quotes/OfferSection/DummyOfferSection.d.ts +0 -3
- package/dist/esm/insurances/car/pages/quote/sections/blocks/BlockConfirmImages.d.ts +0 -1
- package/dist/esm/insurances/car/pages/quote/sections/blocks/BlockQuoteStatistics.d.ts +0 -2
- package/dist/esm/shared/sections/quotes/OfferSection/BestOfferSection.d.ts +0 -3
- package/dist/esm/shared/sections/quotes/OfferSection/DummyOfferSection.d.ts +0 -3
package/dist/cjs/index.js
CHANGED
|
@@ -255,7 +255,7 @@ jsxRuntime.jsx("video", { src: "https://mychoice.ca/wp-content/uploads/2023/05/P
|
|
|
255
255
|
const LoaderPrimary = () => {
|
|
256
256
|
const { appLoaderState } = mychoiceSdkStore.useStoreAppLoader();
|
|
257
257
|
const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
|
|
258
|
-
const isLastPage = window.location.pathname.includes('discount') || window.location.pathname.includes('applicant');
|
|
258
|
+
const isLastPage = window.location.pathname.includes('discount') || window.location.pathname.includes('/life/applicant');
|
|
259
259
|
return (jsxRuntime.jsxs("div", { className: "loader-wrapper", children: [appConfigState.appType === mychoiceSdkComponents.AppTypes.TheBig || !isLastPage ? jsxRuntime.jsx(mychoiceSdkComponents.IconLoaderPrimary, {}) : jsxRuntime.jsx(LoaderVid, {}), !!appLoaderState.description && (jsxRuntime.jsx("h4", { children: appLoaderState.description.split('\n').map((line, index) => (jsxRuntime.jsxs("div", { children: [line, jsxRuntime.jsx("br", {})] }, index))) }))] }));
|
|
260
260
|
};
|
|
261
261
|
|
|
@@ -1842,11 +1842,13 @@ const PageCarQuote = () => {
|
|
|
1842
1842
|
const { postRequestQuote } = mychoiceSdkStore.CarQuoteDataHandler();
|
|
1843
1843
|
const { appLoaderState } = mychoiceSdkStore.useStoreAppLoader();
|
|
1844
1844
|
const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
|
|
1845
|
+
const { appConfigState: { localIndex, insuranceType } } = mychoiceSdkStore.useStoreAppConfig();
|
|
1845
1846
|
const { items, quoteConfirm } = quoteState;
|
|
1846
1847
|
const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
|
|
1847
1848
|
const hasConfirmStep = !!(items?.length && !isTheBig && items[0]?.confirmQuote && quoteConfirm);
|
|
1848
1849
|
const quoteItems = hasConfirmStep ? items?.slice(0, 2) : items;
|
|
1849
1850
|
const showContentWhileLoading = hasConfirmStep ? true : !appLoaderState.isOpen;
|
|
1851
|
+
const navigate = reactRouterDom.useNavigate();
|
|
1850
1852
|
mychoiceSdkComponents.useEffectOnce(() => {
|
|
1851
1853
|
if (!vehicleFormIsValid) {
|
|
1852
1854
|
vehicleFormValidate();
|
|
@@ -1864,6 +1866,10 @@ const PageCarQuote = () => {
|
|
|
1864
1866
|
top: 0,
|
|
1865
1867
|
behavior: 'smooth',
|
|
1866
1868
|
});
|
|
1869
|
+
if (hasConfirmStep) {
|
|
1870
|
+
const uniqueUrl = 'offer';
|
|
1871
|
+
navigate(`/${localIndex || mychoiceSdkComponents.defaultLocalIndex}/${insuranceType}/quotes/${uniqueUrl}`);
|
|
1872
|
+
}
|
|
1867
1873
|
});
|
|
1868
1874
|
return (jsxRuntime.jsx("div", { className: `quote-page-content ${hasConfirmStep ? 'confirm-step' : ''}`, children: showContentWhileLoading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasConfirmStep && jsxRuntime.jsx(BlockConfirmHeading, {}), jsxRuntime.jsxs("div", { className: "form-section-container", children: [appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && !hasConfirmStep && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!items?.length && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !quoteState.showCallMessage
|
|
1869
1875
|
? (jsxRuntime.jsx("div", { className: "offer-container", children: jsxRuntime.jsx(OfferSection, { isBestOffer: true, offerCompany: items[0]?.company, brokerCompany: items[0]?.brokerProfile, offerPrice: {
|
|
@@ -4005,7 +4011,7 @@ const NestedRoutes = () => {
|
|
|
4005
4011
|
});
|
|
4006
4012
|
});
|
|
4007
4013
|
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}/${insuranceType}` } }) }), insuranceType === mychoiceSdkComponents.InsuranceTypes.Car
|
|
4008
|
-
&& (jsxRuntime.jsxs(reactRouterDom.Route, { path: "car", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageVehicle, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "driver", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageDriver, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarQuote, {}) }) })) })] })), jsxRuntime.jsxs(reactRouterDom.Route, { path: "home", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "condo", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "tenant", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "life", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCoverage, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageLifeApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageLifeQuote, {}) }) })) })] })] }) })) }));
|
|
4014
|
+
&& (jsxRuntime.jsxs(reactRouterDom.Route, { path: "car", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageVehicle, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "driver", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageDriver, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes/:uniqueUrl", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarQuote, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarQuote, {}) }) })) })] })), jsxRuntime.jsxs(reactRouterDom.Route, { path: "home", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "condo", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "tenant", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "life", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCoverage, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageLifeApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageLifeQuote, {}) }) })) })] })] }) })) }));
|
|
4009
4015
|
};
|
|
4010
4016
|
const RedirectWithSearchParams = ({ to, path }) => {
|
|
4011
4017
|
const insuranceType = mychoiceSdkComponents.getInsuranceType();
|