@mychoice/mychoice-sdk-modules 2.1.16 → 2.1.18

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.
Files changed (27) hide show
  1. package/dist/cjs/index.js +8 -5
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/init/StoryAppWrapper/StoryAppWrapper.d.ts +1 -1
  4. package/dist/cjs/init/StoryAppWrapper/interfaces.d.ts +1 -1
  5. package/dist/cjs/insurances/car/pages/{three-point-five/BestOfferFirst.d.ts → quote/PageAllQuotes.d.ts} +1 -1
  6. package/dist/cjs/insurances/car/pages/quote/sections/blocks/BlockConfirmImages.d.ts +1 -0
  7. package/dist/cjs/insurances/car/pages/quote/sections/blocks/BlockQuoteStatistics.d.ts +2 -0
  8. package/dist/cjs/shared/sections/quotes/OfferSection/BestOfferSection.d.ts +3 -0
  9. package/dist/cjs/shared/sections/quotes/OfferSection/DummyOfferSection.d.ts +3 -0
  10. package/dist/esm/index.js +9 -6
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/init/StoryAppWrapper/StoryAppWrapper.d.ts +1 -1
  13. package/dist/esm/init/StoryAppWrapper/interfaces.d.ts +1 -1
  14. package/dist/esm/insurances/car/pages/{three-point-five/BestOfferFirst.d.ts → quote/PageAllQuotes.d.ts} +1 -1
  15. package/dist/esm/insurances/car/pages/quote/sections/blocks/BlockConfirmImages.d.ts +1 -0
  16. package/dist/esm/insurances/car/pages/quote/sections/blocks/BlockQuoteStatistics.d.ts +2 -0
  17. package/dist/esm/shared/sections/quotes/OfferSection/BestOfferSection.d.ts +3 -0
  18. package/dist/esm/shared/sections/quotes/OfferSection/DummyOfferSection.d.ts +3 -0
  19. package/package.json +3 -3
  20. package/dist/cjs/insurances/car/pages/three-point-five/index.d.ts +0 -1
  21. package/dist/cjs/insurances/car/pages/three-point-five/sections/OfferSectionCopy.d.ts +0 -3
  22. package/dist/cjs/insurances/car/pages/three-point-five/sections/OfferSectionDupe.d.ts +0 -3
  23. package/dist/cjs/insurances/car/pages/three-point-five/sections/index.d.ts +0 -1
  24. package/dist/esm/insurances/car/pages/three-point-five/index.d.ts +0 -1
  25. package/dist/esm/insurances/car/pages/three-point-five/sections/OfferSectionCopy.d.ts +0 -3
  26. package/dist/esm/insurances/car/pages/three-point-five/sections/OfferSectionDupe.d.ts +0 -3
  27. package/dist/esm/insurances/car/pages/three-point-five/sections/index.d.ts +0 -1
package/dist/cjs/index.js CHANGED
@@ -254,7 +254,11 @@ jsxRuntime.jsx("video", { src: "https://mychoice.ca/wp-content/uploads/2023/05/P
254
254
 
255
255
  const LoaderPrimary = () => {
256
256
  const { appLoaderState } = mychoiceSdkStore.useStoreAppLoader();
257
- return (jsxRuntime.jsxs("div", { className: "loader-wrapper", children: [jsxRuntime.jsx(LoaderVid, {}), !!appLoaderState.description && jsxRuntime.jsx("h4", { children: appLoaderState.description })] }));
257
+ const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
258
+ console.log(window.location.pathname);
259
+ const isLastPage = window.location.pathname.includes('discount') || window.location.pathname.includes('applicant');
260
+ console.log(isLastPage);
261
+ 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))) }))] }));
258
262
  };
259
263
 
260
264
  const ModalConfirm = () => {
@@ -310,11 +314,10 @@ const ModalPostal = () => {
310
314
  };
311
315
 
312
316
  const getVehicleYearRange = () => {
313
- const currentDate = new Date();
314
317
  const vehicleYear = [];
315
- const currentYear = currentDate.getFullYear();
318
+ const currentYear = 2024;
316
319
  const minYear = currentYear - 25;
317
- for (let year = (currentDate.getFullYear()); year > minYear; year -= 1) {
320
+ for (let year = (currentYear); year > minYear; year -= 1) {
318
321
  vehicleYear.push({ name: `${year}`, value: `${year}` });
319
322
  }
320
323
  vehicleYear.push({ name: `${minYear} or older`, value: `${minYear}` });
@@ -1843,7 +1846,7 @@ const PageCarQuote = () => {
1843
1846
  const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
1844
1847
  const { items, quoteConfirm } = quoteState;
1845
1848
  const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
1846
- const hasConfirmStep = items?.length && !isTheBig && items[0]?.confirmQuote && quoteConfirm;
1849
+ const hasConfirmStep = !!(items?.length && !isTheBig && items[0]?.confirmQuote && quoteConfirm);
1847
1850
  const quoteItems = hasConfirmStep ? items?.slice(0, 2) : items;
1848
1851
  const showContentWhileLoading = hasConfirmStep ? true : !appLoaderState.isOpen;
1849
1852
  mychoiceSdkComponents.useEffectOnce(() => {