@mychoice/mychoice-sdk-modules 2.2.2 → 2.2.3

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
@@ -517,7 +517,7 @@ const HeaderBeginInsurance = ({ className }) => {
517
517
  const { appConfigState: { insuranceType }, } = mychoiceSdkStore.useStoreAppConfig();
518
518
  const insuranceTypeCls = insuranceType !== mychoiceSdkComponents.InsuranceTypes.Car && insuranceType !== mychoiceSdkComponents.InsuranceTypes.Life ? mychoiceSdkComponents.InsuranceTypes.Home : insuranceType;
519
519
  const { externalPathGroup } = usePathGroups(insuranceTypeCls);
520
- return (jsxRuntime.jsx("div", { className: `${className} primary-header`, children: jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("a", { href: "https://www.begininsurance.com/", rel: "noreferrer", children: jsxRuntime.jsx("img", { src: logo, alt: "Begin Insurance" }) }) }), jsxRuntime.jsx("div", { className: "nav-links", children: jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { className: insuranceTypeCls, navItems: externalPathGroup, isExternal: true }) }), jsxRuntime.jsx("div", { className: "empty-box" })] }) }));
520
+ return (jsxRuntime.jsx("div", { className: `${className} primary-header`, children: jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("a", { href: "https://begininsurance.ca/en", rel: "noreferrer", children: jsxRuntime.jsx("img", { src: logo, alt: "Begin Insurance" }) }) }), jsxRuntime.jsx("div", { className: "nav-links", children: jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { className: insuranceTypeCls, navItems: externalPathGroup, isExternal: true }) }), jsxRuntime.jsx("div", { className: "empty-box" })] }) }));
521
521
  };
522
522
  HeaderBeginInsurance.defaultProps = {
523
523
  className: '',
@@ -543,7 +543,7 @@ const HeaderBeginInsuranceMobile = ({ className }) => {
543
543
  const handleMenuClick = () => {
544
544
  setIsMenuOpen(!isMenuOpen);
545
545
  };
546
- return (jsxRuntime.jsxs("div", { className: `${className} ${isMenuOpen ? 'open' : ''} primary-header-mobile`, children: [jsxRuntime.jsxs("div", { className: "content-mobile", children: [jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("a", { href: "https://www.begininsurance.com/", target: "_blank", rel: "noreferrer", children: jsxRuntime.jsx("img", { src: logo, alt: "Begin Insurance" }) }) }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonMenu, { className: `${className} ${isMenuOpen ? 'is-active' : ''}`, onClick: handleMenuClick })] }), isMenuOpen && (jsxRuntime.jsx("div", { className: "menu-items", children: jsxRuntime.jsx("div", { className: "nav-links", children: jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { className: insuranceType, navItems: externalPathGroup, isExternal: true }) }) }))] }));
546
+ return (jsxRuntime.jsxs("div", { className: `${className} ${isMenuOpen ? 'open' : ''} primary-header-mobile`, children: [jsxRuntime.jsxs("div", { className: "content-mobile", children: [jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("a", { href: "https://begininsurance.ca/en", target: "_blank", rel: "noreferrer", children: jsxRuntime.jsx("img", { src: logo, alt: "Begin Insurance" }) }) }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonMenu, { className: `${className} ${isMenuOpen ? 'is-active' : ''}`, onClick: handleMenuClick })] }), isMenuOpen && (jsxRuntime.jsx("div", { className: "menu-items", children: jsxRuntime.jsx("div", { className: "nav-links", children: jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { className: insuranceType, navItems: externalPathGroup, isExternal: true }) }) }))] }));
547
547
  };
548
548
  HeaderBeginInsuranceMobile.defaultProps = {
549
549
  className: '',
@@ -4528,6 +4528,10 @@ const AppConfig = (props) => {
4528
4528
  const localIndex = window.location.pathname.split('/')[1];
4529
4529
  const authHandler = mychoiceSdkStore.useHandlerAuth();
4530
4530
  const partnerHandler = mychoiceSdkStore.useHandlerPartner();
4531
+ // Check if localIndex is actually an insurance type (car, home, condo, tenant, life)
4532
+ // In that case, it should not be treated as a partner ID
4533
+ const insuranceTypeValues = Object.values(mychoiceSdkComponents.InsuranceTypes);
4534
+ const isInsuranceTypePath = insuranceTypeValues.includes(localIndex);
4531
4535
  const windowResize = () => {
4532
4536
  dispatchDeviceState({
4533
4537
  type: mychoiceSdkStore.StoreConfigAppDeviceActionTypes.AppDeviceSetSize,
@@ -4546,7 +4550,7 @@ const AppConfig = (props) => {
4546
4550
  payload: appType,
4547
4551
  });
4548
4552
  }
4549
- if (appType !== mychoiceSdkComponents.AppTypes.TheBig && localIndex !== mychoiceSdkComponents.defaultLocalIndex && localIndex !== '') {
4553
+ if (appType !== mychoiceSdkComponents.AppTypes.TheBig && localIndex !== mychoiceSdkComponents.defaultLocalIndex && localIndex !== '' && !isInsuranceTypePath) {
4550
4554
  partnerHandler.getPartner(localIndex);
4551
4555
  }
4552
4556
  else {