@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 +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -3620,7 +3620,7 @@ StepsBox.defaultProps = {
|
|
|
3620
3620
|
activeIndex: 0,
|
|
3621
3621
|
};
|
|
3622
3622
|
|
|
3623
|
-
const ButtonsBox = ({ formSteps, validationHooks, clearForm
|
|
3623
|
+
const ButtonsBox = ({ formSteps, validationHooks, clearForm }) => {
|
|
3624
3624
|
const { pathname } = useLocation();
|
|
3625
3625
|
const navigate = useNavigate();
|
|
3626
3626
|
const { appConfigState } = useStoreAppConfig();
|
|
@@ -3641,7 +3641,7 @@ const ButtonsBox = ({ formSteps, validationHooks, clearForm, }) => {
|
|
|
3641
3641
|
let activeIndex = formSteps.indexOf(activeStep);
|
|
3642
3642
|
activeIndex = activeIndex === -1 ? 0 : activeIndex;
|
|
3643
3643
|
const onForwardClick = () => {
|
|
3644
|
-
const { validateOptions: { validate, isValid }, requestFn } = validationHooks[activeIndex] || { validateOptions: { isValid: true } };
|
|
3644
|
+
const { validateOptions: { validate, isValid }, requestFn, } = validationHooks[activeIndex] || { validateOptions: { isValid: true } };
|
|
3645
3645
|
const formIsValid = !isValid ? validate && validate() : isValid;
|
|
3646
3646
|
if (activeIndex < formSteps.length && formIsValid) {
|
|
3647
3647
|
if (requestFn) {
|
|
@@ -3660,11 +3660,12 @@ const ButtonsBox = ({ formSteps, validationHooks, clearForm, }) => {
|
|
|
3660
3660
|
}
|
|
3661
3661
|
};
|
|
3662
3662
|
const onFinishClick = () => {
|
|
3663
|
+
const companyName = appType === AppTypes.BeginInsurance ? 'Begin Insurance' : 'My Choice';
|
|
3663
3664
|
dispatchAppModalState({
|
|
3664
3665
|
type: StoreConfigAppModalActionTypes.AppModalFinaleModal,
|
|
3665
3666
|
payload: {
|
|
3666
3667
|
title: 'Thank You!',
|
|
3667
|
-
description:
|
|
3668
|
+
description: `Thanks for using ${companyName} to compare insurance rates.`,
|
|
3668
3669
|
submitCallBack: () => {
|
|
3669
3670
|
navigate(`/${localIndex}/${insuranceType}${formSteps[0].path}`);
|
|
3670
3671
|
if (clearForm) {
|
|
@@ -3689,8 +3690,7 @@ const ButtonsBox = ({ formSteps, validationHooks, clearForm, }) => {
|
|
|
3689
3690
|
},
|
|
3690
3691
|
});
|
|
3691
3692
|
};
|
|
3692
|
-
return (jsxs("div", { className: "buttons-box", children: [activeIndex === 0 ? (jsx(ButtonBase, { size: isMobile ? SizeTypes.Small : SizeTypes.Medium, category: CategoryTypes.Outlined, color: ColorTypes.Secondary, variant: ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onClearClick, children: jsx("span", { children: "Clear Form" }) }))
|
|
3693
|
-
: (jsx(ButtonArrow, { direction: DirectionTypes.Left, category: CategoryTypes.Outlined, color: ColorTypes.Secondary, size: isMobile ? SizeTypes.Small : SizeTypes.Medium, onClick: onBackClick })), activeIndex === formSteps.length - 1 ? (jsx(Fragment, { children: !isTheBig && (jsx(ButtonBase, { size: isMobile ? SizeTypes.Small : SizeTypes.Medium, category: CategoryTypes.Filled, color: ColorTypes.Secondary, variant: ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onFinishClick, children: jsx("span", { children: "Finish" }) })) })) : (jsx(ButtonArrow, { direction: DirectionTypes.Right, category: CategoryTypes.Filled, color: ColorTypes.Secondary, size: isMobile ? SizeTypes.Small : SizeTypes.Medium, onClick: onForwardClick }))] }));
|
|
3693
|
+
return (jsxs("div", { className: "buttons-box", children: [activeIndex === 0 ? (jsx(ButtonBase, { size: isMobile ? SizeTypes.Small : SizeTypes.Medium, category: CategoryTypes.Outlined, color: ColorTypes.Secondary, variant: ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onClearClick, children: jsx("span", { children: "Clear Form" }) })) : (jsx(ButtonArrow, { direction: DirectionTypes.Left, category: CategoryTypes.Outlined, color: ColorTypes.Secondary, size: isMobile ? SizeTypes.Small : SizeTypes.Medium, onClick: onBackClick })), activeIndex === formSteps.length - 1 ? (jsx(Fragment, { children: !isTheBig && (jsx(ButtonBase, { size: isMobile ? SizeTypes.Small : SizeTypes.Medium, category: CategoryTypes.Filled, color: ColorTypes.Secondary, variant: ButtonVariantTypes.Circle, className: "button-arrow button-with-text", onClick: onFinishClick, children: jsx("span", { children: "Finish" }) })) })) : (jsx(ButtonArrow, { direction: DirectionTypes.Right, category: CategoryTypes.Filled, color: ColorTypes.Secondary, size: isMobile ? SizeTypes.Small : SizeTypes.Medium, onClick: onForwardClick }))] }));
|
|
3694
3694
|
};
|
|
3695
3695
|
ButtonsBox.defaultProps = {
|
|
3696
3696
|
isMobile: false,
|