@mychoice/mychoice-sdk-modules 2.1.19 → 2.1.21
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 +3 -3
- 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
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SdkFC } from '@groksmith/mychoice-sdk-components';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const BestOfferFirst: SdkFC;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BestOfferFirst } from './BestOfferFirst';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OfferSectionDupe } from './OfferSectionDupe';
|
package/dist/esm/index.js
CHANGED
|
@@ -245,7 +245,7 @@ jsx("video", { src: "https://mychoice.ca/wp-content/uploads/2023/05/Pig-Video.mp
|
|
|
245
245
|
const LoaderPrimary = () => {
|
|
246
246
|
const { appLoaderState } = useStoreAppLoader();
|
|
247
247
|
const { appConfigState } = useStoreAppConfig();
|
|
248
|
-
const isLastPage = window.location.pathname.includes('discount') || window.location.pathname.includes('applicant');
|
|
248
|
+
const isLastPage = window.location.pathname.includes('discount') || window.location.pathname.includes('/life/applicant');
|
|
249
249
|
return (jsxs("div", { className: "loader-wrapper", children: [appConfigState.appType === AppTypes.TheBig || !isLastPage ? jsx(IconLoaderPrimary, {}) : jsx(LoaderVid, {}), !!appLoaderState.description && (jsx("h4", { children: appLoaderState.description.split('\n').map((line, index) => (jsxs("div", { children: [line, jsx("br", {})] }, index))) }))] }));
|
|
250
250
|
};
|
|
251
251
|
|
|
@@ -1832,11 +1832,13 @@ const PageCarQuote = () => {
|
|
|
1832
1832
|
const { postRequestQuote } = CarQuoteDataHandler();
|
|
1833
1833
|
const { appLoaderState } = useStoreAppLoader();
|
|
1834
1834
|
const { appDeviceType } = useStoreDeviceType();
|
|
1835
|
+
const { appConfigState: { localIndex, insuranceType } } = useStoreAppConfig();
|
|
1835
1836
|
const { items, quoteConfirm } = quoteState;
|
|
1836
1837
|
const isTheBig = appType === AppTypes.TheBig;
|
|
1837
1838
|
const hasConfirmStep = !!(items?.length && !isTheBig && items[0]?.confirmQuote && quoteConfirm);
|
|
1838
1839
|
const quoteItems = hasConfirmStep ? items?.slice(0, 2) : items;
|
|
1839
1840
|
const showContentWhileLoading = hasConfirmStep ? true : !appLoaderState.isOpen;
|
|
1841
|
+
const navigate = useNavigate();
|
|
1840
1842
|
useEffectOnce(() => {
|
|
1841
1843
|
if (!vehicleFormIsValid) {
|
|
1842
1844
|
vehicleFormValidate();
|
|
@@ -1854,6 +1856,10 @@ const PageCarQuote = () => {
|
|
|
1854
1856
|
top: 0,
|
|
1855
1857
|
behavior: 'smooth',
|
|
1856
1858
|
});
|
|
1859
|
+
if (hasConfirmStep) {
|
|
1860
|
+
const uniqueUrl = 'offer';
|
|
1861
|
+
navigate(`/${localIndex || defaultLocalIndex}/${insuranceType}/quotes/${uniqueUrl}`);
|
|
1862
|
+
}
|
|
1857
1863
|
});
|
|
1858
1864
|
return (jsx("div", { className: `quote-page-content ${hasConfirmStep ? 'confirm-step' : ''}`, children: showContentWhileLoading && (jsxs(Fragment, { children: [hasConfirmStep && jsx(BlockConfirmHeading, {}), jsxs("div", { className: "form-section-container", children: [appDeviceType === DeviceTypes.Mobile && !hasConfirmStep && (jsx(Fragment, { children: !!items?.length && (jsx(Fragment, { children: !quoteState.showCallMessage
|
|
1859
1865
|
? (jsx("div", { className: "offer-container", children: jsx(OfferSection, { isBestOffer: true, offerCompany: items[0]?.company, brokerCompany: items[0]?.brokerProfile, offerPrice: {
|
|
@@ -3995,7 +4001,7 @@ const NestedRoutes = () => {
|
|
|
3995
4001
|
});
|
|
3996
4002
|
});
|
|
3997
4003
|
return (jsx(Fragment, { children: appConfigState.drawWrapper && (jsx(Fragment, { children: jsxs(Routes, { children: [jsx(Route, { path: "*", element: jsx(Navigate, { to: { pathname: `/${appConfigState.localIndex || defaultLocalIndex}/${insuranceType}` } }) }), insuranceType === InsuranceTypes.Car
|
|
3998
|
-
&& (jsxs(Route, { path: "car", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageVehicle, {}) }) })) }), jsx(Route, { path: "driver", element: (jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageDriver, {}) }) })) }), jsx(Route, { path: "discount", element: (jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarDiscount, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarQuote, {}) }) })) })] })), jsxs(Route, { path: "home", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) })) }), jsx(Route, { path: "applicant", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) })) }), jsx(Route, { path: "property", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) })) }), jsx(Route, { path: "discount", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) })) })] }), jsxs(Route, { path: "condo", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) })) }), jsx(Route, { path: "applicant", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) })) }), jsx(Route, { path: "property", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) })) }), jsx(Route, { path: "discount", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) })) })] }), jsxs(Route, { path: "tenant", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) })) }), jsx(Route, { path: "applicant", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) })) }), jsx(Route, { path: "property", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) })) }), jsx(Route, { path: "discount", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) })) })] }), jsxs(Route, { path: "life", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageCoverage, {}) }) })) }), jsx(Route, { path: "applicant", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageLifeApplicant, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageLifeQuote, {}) }) })) })] })] }) })) }));
|
|
4004
|
+
&& (jsxs(Route, { path: "car", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageVehicle, {}) }) })) }), jsx(Route, { path: "driver", element: (jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageDriver, {}) }) })) }), jsx(Route, { path: "discount", element: (jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarDiscount, {}) }) })) }), jsx(Route, { path: "quotes/:uniqueUrl", element: (jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarQuote, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarQuote, {}) }) })) })] })), jsxs(Route, { path: "home", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) })) }), jsx(Route, { path: "applicant", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) })) }), jsx(Route, { path: "property", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) })) }), jsx(Route, { path: "discount", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) })) })] }), jsxs(Route, { path: "condo", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) })) }), jsx(Route, { path: "applicant", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) })) }), jsx(Route, { path: "property", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) })) }), jsx(Route, { path: "discount", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) })) })] }), jsxs(Route, { path: "tenant", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) })) }), jsx(Route, { path: "applicant", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) })) }), jsx(Route, { path: "property", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) })) }), jsx(Route, { path: "discount", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) })) })] }), jsxs(Route, { path: "life", children: [jsx(Route, { index: true, element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageCoverage, {}) }) })) }), jsx(Route, { path: "applicant", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageLifeApplicant, {}) }) })) }), jsx(Route, { path: "quotes", element: (jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageLifeQuote, {}) }) })) })] })] }) })) }));
|
|
3999
4005
|
};
|
|
4000
4006
|
const RedirectWithSearchParams = ({ to, path }) => {
|
|
4001
4007
|
const insuranceType = getInsuranceType();
|