@mychoice/mychoice-sdk-modules 2.2.1 → 2.2.2

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
@@ -3630,7 +3630,7 @@ StepsBox.defaultProps = {
3630
3630
  activeIndex: 0,
3631
3631
  };
3632
3632
 
3633
- const ButtonsBox = ({ formSteps, validationHooks, clearForm, }) => {
3633
+ const ButtonsBox = ({ formSteps, validationHooks, clearForm }) => {
3634
3634
  const { pathname } = reactRouterDom.useLocation();
3635
3635
  const navigate = reactRouterDom.useNavigate();
3636
3636
  const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
@@ -3651,7 +3651,7 @@ const ButtonsBox = ({ formSteps, validationHooks, clearForm, }) => {
3651
3651
  let activeIndex = formSteps.indexOf(activeStep);
3652
3652
  activeIndex = activeIndex === -1 ? 0 : activeIndex;
3653
3653
  const onForwardClick = () => {
3654
- const { validateOptions: { validate, isValid }, requestFn } = validationHooks[activeIndex] || { validateOptions: { isValid: true } };
3654
+ const { validateOptions: { validate, isValid }, requestFn, } = validationHooks[activeIndex] || { validateOptions: { isValid: true } };
3655
3655
  const formIsValid = !isValid ? validate && validate() : isValid;
3656
3656
  if (activeIndex < formSteps.length && formIsValid) {
3657
3657
  if (requestFn) {
@@ -3670,11 +3670,12 @@ const ButtonsBox = ({ formSteps, validationHooks, clearForm, }) => {
3670
3670
  }
3671
3671
  };
3672
3672
  const onFinishClick = () => {
3673
+ const companyName = appType === mychoiceSdkComponents.AppTypes.BeginInsurance ? 'Begin Insurance' : 'My Choice';
3673
3674
  dispatchAppModalState({
3674
3675
  type: mychoiceSdkStore.StoreConfigAppModalActionTypes.AppModalFinaleModal,
3675
3676
  payload: {
3676
3677
  title: 'Thank You!',
3677
- description: 'Thanks for using My Choice to compare car insurance rates.',
3678
+ description: `Thanks for using ${companyName} to compare insurance rates.`,
3678
3679
  submitCallBack: () => {
3679
3680
  navigate(`/${localIndex}/${insuranceType}${formSteps[0].path}`);
3680
3681
  if (clearForm) {
@@ -3699,8 +3700,7 @@ const ButtonsBox = ({ formSteps, validationHooks, clearForm, }) => {
3699
3700
  },
3700
3701
  });
3701
3702
  };
3702
- return (jsxRuntime.jsxs("div", { className: "buttons-box", children: [activeIndex === 0 ? (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, category: mychoiceSdkComponents.CategoryTypes.Outlined, color: mychoiceSdkComponents.ColorTypes.Secondary, variant: mychoiceSdkComponents.ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onClearClick, children: jsxRuntime.jsx("span", { children: "Clear Form" }) }))
3703
- : (jsxRuntime.jsx(mychoiceSdkComponents.ButtonArrow, { direction: mychoiceSdkComponents.DirectionTypes.Left, category: mychoiceSdkComponents.CategoryTypes.Outlined, color: mychoiceSdkComponents.ColorTypes.Secondary, size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, onClick: onBackClick })), activeIndex === formSteps.length - 1 ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !isTheBig && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Secondary, variant: mychoiceSdkComponents.ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onFinishClick, children: jsxRuntime.jsx("span", { children: "Finish" }) })) })) : (jsxRuntime.jsx(mychoiceSdkComponents.ButtonArrow, { direction: mychoiceSdkComponents.DirectionTypes.Right, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Secondary, size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, onClick: onForwardClick }))] }));
3703
+ return (jsxRuntime.jsxs("div", { className: "buttons-box", children: [activeIndex === 0 ? (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, category: mychoiceSdkComponents.CategoryTypes.Outlined, color: mychoiceSdkComponents.ColorTypes.Secondary, variant: mychoiceSdkComponents.ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onClearClick, children: jsxRuntime.jsx("span", { children: "Clear Form" }) })) : (jsxRuntime.jsx(mychoiceSdkComponents.ButtonArrow, { direction: mychoiceSdkComponents.DirectionTypes.Left, category: mychoiceSdkComponents.CategoryTypes.Outlined, color: mychoiceSdkComponents.ColorTypes.Secondary, size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, onClick: onBackClick })), activeIndex === formSteps.length - 1 ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !isTheBig && (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Secondary, variant: mychoiceSdkComponents.ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onFinishClick, children: jsxRuntime.jsx("span", { children: "Finish" }) })) })) : (jsxRuntime.jsx(mychoiceSdkComponents.ButtonArrow, { direction: mychoiceSdkComponents.DirectionTypes.Right, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Secondary, size: isMobile ? mychoiceSdkComponents.SizeTypes.Small : mychoiceSdkComponents.SizeTypes.Medium, onClick: onForwardClick }))] }));
3704
3704
  };
3705
3705
  ButtonsBox.defaultProps = {
3706
3706
  isMobile: false,