@mychoice/mychoice-sdk-modules 2.1.5 → 2.1.7

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 CHANGED
@@ -1517,7 +1517,7 @@ const BlockNextPageInfo$2 = () => {
1517
1517
  };
1518
1518
 
1519
1519
  const BlockSubmit$2 = ({ className, label, buttonSize, isRecalc = false, }) => {
1520
- const { quoteState: { isRequested } } = mychoiceSdkStore.useStoreFormCarQuote();
1520
+ const { quoteState: { isRequested, quoteConfirm } } = mychoiceSdkStore.useStoreFormCarQuote();
1521
1521
  const { discountState: { isValid } } = mychoiceSdkStore.useStoreFormCarDiscount();
1522
1522
  const { appConfigState: { localIndex, insuranceType } } = mychoiceSdkStore.useStoreAppConfig();
1523
1523
  const navigate = reactRouterDom.useNavigate();
@@ -1525,10 +1525,10 @@ const BlockSubmit$2 = ({ className, label, buttonSize, isRecalc = false, }) => {
1525
1525
  const { carDiscountFormValidate } = mychoiceSdkStore.useValidationCarDiscount();
1526
1526
  const handleGetQuotesClick = () => {
1527
1527
  if (!isValid) {
1528
- carDiscountFormValidate(false, () => postRequestQuote(isRecalc));
1528
+ carDiscountFormValidate(false, () => postRequestQuote(isRecalc, quoteConfirm));
1529
1529
  }
1530
1530
  else if (!isRequested) {
1531
- postRequestQuote(isRecalc);
1531
+ postRequestQuote(isRecalc, quoteConfirm);
1532
1532
  }
1533
1533
  else if (!isRecalc) {
1534
1534
  navigate(`/${localIndex || mychoiceSdkComponents.defaultLocalIndex}/${insuranceType}/quotes`);
@@ -1812,7 +1812,7 @@ const SectionConfirm = () => {
1812
1812
  };
1813
1813
  if (!bestQuote)
1814
1814
  return null;
1815
- return (jsxRuntime.jsxs("div", { style: { zIndex: '1' }, children: [jsxRuntime.jsxs("div", { className: "shadow-box", children: [jsxRuntime.jsx("div", { className: "highlighted-heading", children: "Best Offer" }), jsxRuntime.jsx("h1", { children: `$${bestQuote.priceMonthly} / month` }), jsxRuntime.jsx("div", { className: "highlighted-heading", children: jsxRuntime.jsx("span", { children: `$${bestQuote.priceYearly} / year` }) })] }), jsxRuntime.jsxs("div", { className: "statistics-wrapper", children: [jsxRuntime.jsx("div", { className: "counter", id: "output", children: comparedCountMin.toLocaleString('en-US') }), jsxRuntime.jsx("div", { className: "divider" }), jsxRuntime.jsx("div", { style: { textAlign: 'center', fontSize: '1.15rem', marginTop: '10px' }, children: ` and saved ${savedPercentage}% on average` })] }), jsxRuntime.jsx("div", { style: { marginBottom: '2rem' }, children: jsxRuntime.jsx("div", { className: "all-quotes-form", children: jsxRuntime.jsx("h2", { style: { whiteSpace: 'normal', marginTop: '20px', textAlign: 'center' }, children: `${lockEmoji} Complete the form below to see which companies are offering your quotes.` }) }) }), jsxRuntime.jsx("div", { style: { marginBottom: '1rem' }, children: jsxRuntime.jsx(InputFormBox, { name: "firstName", title: "First Name", onChange: handleFirstNameChange, defaultValue: firstName, placeholder: "Your First Name", error: !firstName && discountState.inValidation, errorMessage: getErrorMessage(firstName, discountState.inValidation) }) }), jsxRuntime.jsx("div", { style: { marginBottom: '1rem' }, children: jsxRuntime.jsx(InputFormBox, { name: "lastname", title: "Last Name", onChange: handleLastNameChange, defaultValue: lastName, placeholder: "Your Last Name", error: !lastName && discountState.inValidation, errorMessage: getErrorMessage(lastName, discountState.inValidation) }) }), jsxRuntime.jsx("div", { style: { marginBottom: '1rem' }, children: jsxRuntime.jsx(InputFormPhoneBox, { name: "phone", onChange: handlePhoneNumberChange, defaultValue: phone, title: "Phone Number", placeholder: "(111) 111-1111", error: !phone && discountState.inValidation, errorMessage: getErrorMessage(phone, discountState.inValidation) }) }), jsxRuntime.jsx("div", { className: "submit-wrapper", children: jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "mychoice", size: mychoiceSdkComponents.SizeTypes.Large, category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleSubmit, color: mychoiceSdkComponents.ColorTypes.Primary, label: "Get Your Quote" }) }), jsxRuntime.jsxs("div", { className: "extra-info", children: [jsxRuntime.jsx("h5", { children: "On the next page, you will also be able to:" }), jsxRuntime.jsx("div", { className: "next-page-points", children: jsxRuntime.jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [jsxRuntime.jsxs("div", { className: "bullet-container", children: [jsxRuntime.jsx("div", { className: "bullet-point", children: "1" }), jsxRuntime.jsx("div", { children: "See what rates insurance carriers are offering" })] }), jsxRuntime.jsxs("div", { className: "bullet-container", children: [jsxRuntime.jsx("div", { className: "bullet-point", children: "2" }), jsxRuntime.jsx("div", { children: "Get in touch with a broker and secure your rate" })] }), jsxRuntime.jsxs("div", { className: "bullet-container", children: [jsxRuntime.jsx("div", { className: "bullet-point", children: "3" }), jsxRuntime.jsx("div", { children: "Potentially save more by speaking with a broker" })] })] }) }), jsxRuntime.jsx("div", { className: "privacy-policy", children: jsxRuntime.jsxs("p", { children: ["Once you submit this form, you are agreeing to have your insurance quote sent to you via email and My Choice will provide your contact information to one of our trusted broker partners, who will contact you after your quote is complete to further assist you in securing your best rate. For more details, see our", jsxRuntime.jsx("a", { href: "https://www.mychoice.ca/privacy-policy/", children: " Privacy Policy" }), "."] }) })] })] }));
1815
+ return (jsxRuntime.jsxs("div", { style: { zIndex: '1' }, children: [jsxRuntime.jsxs("div", { className: "shadow-box", children: [jsxRuntime.jsx("div", { className: "highlighted-heading", children: "Best Offer" }), jsxRuntime.jsx("h1", { children: `$${bestQuote.priceMonthly} / month` }), jsxRuntime.jsx("div", { className: "highlighted-heading", children: jsxRuntime.jsx("span", { children: `$${bestQuote.priceYearly} / year` }) })] }), jsxRuntime.jsxs("div", { className: "statistics-wrapper", children: [jsxRuntime.jsx("div", { className: "counter", id: "output", children: comparedCountMin.toLocaleString('en-US') }), jsxRuntime.jsx("div", { className: "divider" }), jsxRuntime.jsx("div", { style: { textAlign: 'center', fontSize: '1.15rem', marginTop: '10px' }, children: `Canadians have compared rates in the last 24 hours and saved ${savedPercentage}% on average` })] }), jsxRuntime.jsx("div", { style: { marginBottom: '2rem' }, children: jsxRuntime.jsx("div", { className: "all-quotes-form", children: jsxRuntime.jsx("h2", { style: { whiteSpace: 'normal', marginTop: '20px', textAlign: 'center' }, children: `${lockEmoji} Complete the form below to see which companies are offering your quotes.` }) }) }), jsxRuntime.jsx("div", { style: { marginBottom: '1rem' }, children: jsxRuntime.jsx(InputFormBox, { name: "firstName", title: "First Name", onChange: handleFirstNameChange, defaultValue: firstName, placeholder: "Your First Name", error: !firstName && discountState.inValidation, errorMessage: getErrorMessage(firstName, discountState.inValidation) }) }), jsxRuntime.jsx("div", { style: { marginBottom: '1rem' }, children: jsxRuntime.jsx(InputFormBox, { name: "lastname", title: "Last Name", onChange: handleLastNameChange, defaultValue: lastName, placeholder: "Your Last Name", error: !lastName && discountState.inValidation, errorMessage: getErrorMessage(lastName, discountState.inValidation) }) }), jsxRuntime.jsx("div", { style: { marginBottom: '1rem' }, children: jsxRuntime.jsx(InputFormPhoneBox, { name: "phone", onChange: handlePhoneNumberChange, defaultValue: phone, title: "Phone Number", placeholder: "(111) 111-1111", error: !phone && discountState.inValidation, errorMessage: getErrorMessage(phone, discountState.inValidation) }) }), jsxRuntime.jsx("div", { className: "submit-wrapper", children: jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: "mychoice", size: mychoiceSdkComponents.SizeTypes.Large, category: mychoiceSdkComponents.CategoryTypes.Filled, onClick: handleSubmit, color: mychoiceSdkComponents.ColorTypes.Primary, label: "Get Your Quote" }) }), jsxRuntime.jsxs("div", { className: "extra-info", children: [jsxRuntime.jsx("h5", { children: "On the next page, you will also be able to:" }), jsxRuntime.jsx("div", { className: "next-page-points", children: jsxRuntime.jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [jsxRuntime.jsxs("div", { className: "bullet-container", children: [jsxRuntime.jsx("div", { className: "bullet-point", children: "1" }), jsxRuntime.jsx("div", { children: "See what rates insurance carriers are offering" })] }), jsxRuntime.jsxs("div", { className: "bullet-container", children: [jsxRuntime.jsx("div", { className: "bullet-point", children: "2" }), jsxRuntime.jsx("div", { children: "Get in touch with a broker and secure your rate" })] }), jsxRuntime.jsxs("div", { className: "bullet-container", children: [jsxRuntime.jsx("div", { className: "bullet-point", children: "3" }), jsxRuntime.jsx("div", { children: "Potentially save more by speaking with a broker" })] })] }) }), jsxRuntime.jsx("div", { className: "privacy-policy", children: jsxRuntime.jsxs("p", { children: ["Once you submit this form, you are agreeing to have your insurance quote sent to you via email and My Choice will provide your contact information to one of our trusted broker partners, who will contact you after your quote is complete to further assist you in securing your best rate. For more details, see our", jsxRuntime.jsx("a", { href: "https://www.mychoice.ca/privacy-policy/", children: " Privacy Policy" }), "."] }) })] })] }));
1816
1816
  };
1817
1817
 
1818
1818
  const SplashScreen$2 = () => {
@@ -1850,7 +1850,7 @@ const PageCarQuote = () => {
1850
1850
  carDiscountFormValidate();
1851
1851
  }
1852
1852
  if (!quoteState.isRequested) {
1853
- postRequestQuote(false);
1853
+ postRequestQuote(false, quoteConfirm);
1854
1854
  }
1855
1855
  window.scrollTo({
1856
1856
  top: 0,
@@ -2892,7 +2892,7 @@ const PageHomeQuote = () => {
2892
2892
  saturdayHours: items[0]?.brokerProfile.hoursSaturday,
2893
2893
  sundayHours: items[0]?.brokerProfile.hoursSunday,
2894
2894
  weekdayHours: items[0]?.brokerProfile.hoursWorkdays,
2895
- }, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '' }) }))
2895
+ }, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '', fulfillmentUrl: items[0]?.fulfillmentUrl || '' }) }))
2896
2896
  : jsxRuntime.jsx(SplashScreen$1, {}) })) })), jsxRuntime.jsx(SectionQuoteEdit$1, {}), jsxRuntime.jsx(SectionQuoteRecalc, {})] }), appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile && quoteState.showCallMessage
2897
2897
  && jsxRuntime.jsx(SplashScreen$1, {}), !quoteState.showCallMessage
2898
2898
  && (jsxRuntime.jsx("div", { className: "offer-container", children: !!items?.length