@lendi/navbar 7.36.0 → 7.37.0

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.
@@ -8,6 +8,6 @@ interface SignOutProps {
8
8
  onLogout: () => void;
9
9
  }
10
10
  export type AccountProps = AuthenticationProps & PrimaryCTAProps & TalkToExpertProps & SignOutProps;
11
- export declare const AccountDropdown: ({ application, session, handleApplyNowClick, teamMember, openCommPanel, onLogout, }: AccountProps) => JSX.Element;
12
- export declare const AccountSlideoutMenu: ({ session, application, teamMember, handleApplyNowClick, openCommPanel, onLogout, }: AccountProps) => JSX.Element;
11
+ export declare const AccountDropdown: ({ application, session, handleApplyNowClick, teamMember, customerOwner, openCommPanel, onLogout, }: AccountProps) => JSX.Element;
12
+ export declare const AccountSlideoutMenu: ({ session, application, teamMember, customerOwner, handleApplyNowClick, openCommPanel, onLogout, }: AccountProps) => JSX.Element;
13
13
  export {};
@@ -1,2 +1,2 @@
1
1
  import { AccountProps } from './AccountMenu';
2
- export declare const CtaNav: ({ handleApplyNowClick, session, application, teamMember, openCommPanel, onLogout, }: AccountProps) => JSX.Element;
2
+ export declare const CtaNav: ({ handleApplyNowClick, session, application, customerOwner, teamMember, openCommPanel, onLogout, }: AccountProps) => JSX.Element;
@@ -3409,7 +3409,10 @@ var TalkToExpertButton = _ref => {
3409
3409
  openCommPanel,
3410
3410
  customerOwner
3411
3411
  } = _ref;
3412
- var buttonText = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : 'Talk to a broker';
3412
+ var {
3413
+ cmsNavbarBrokerNameButton
3414
+ } = launchdarkly.useFlags();
3415
+ var buttonText = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName && cmsNavbarBrokerNameButton ? "Talk to ".concat(customerOwner.firstName) : 'Talk to a broker';
3413
3416
  var handleClick = () => {
3414
3417
  openCommPanel();
3415
3418
  var event = {
@@ -3604,7 +3607,7 @@ var LoggedInContent = _ref2 => {
3604
3607
  var {
3605
3608
  handleApplyNowClick,
3606
3609
  application,
3607
- teamMember,
3610
+ customerOwner,
3608
3611
  openCommPanel,
3609
3612
  onLogout
3610
3613
  } = _ref2;
@@ -3625,8 +3628,8 @@ var LoggedInContent = _ref2 => {
3625
3628
  application: application
3626
3629
  })
3627
3630
  }), /*#__PURE__*/jsxRuntime.jsx(TalkToExpertButton, {
3628
- teamMember: teamMember,
3629
- openCommPanel: openCommPanel
3631
+ openCommPanel: openCommPanel,
3632
+ customerOwner: customerOwner
3630
3633
  })]
3631
3634
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
3632
3635
  style: {
@@ -3767,6 +3770,7 @@ var AccountDropdown = _ref3 => {
3767
3770
  session,
3768
3771
  handleApplyNowClick,
3769
3772
  teamMember,
3773
+ customerOwner,
3770
3774
  openCommPanel,
3771
3775
  onLogout
3772
3776
  } = _ref3;
@@ -3787,6 +3791,7 @@ var AccountDropdown = _ref3 => {
3787
3791
  },
3788
3792
  children: isAuthenticated ? /*#__PURE__*/jsxRuntime.jsx(LoggedInContent, {
3789
3793
  teamMember: teamMember,
3794
+ customerOwner: customerOwner,
3790
3795
  application: application,
3791
3796
  handleApplyNowClick: handleApplyNowClick,
3792
3797
  openCommPanel: openCommPanel,
@@ -3799,6 +3804,7 @@ var AccountSlideoutMenu = _ref4 => {
3799
3804
  session,
3800
3805
  application,
3801
3806
  teamMember,
3807
+ customerOwner,
3802
3808
  handleApplyNowClick,
3803
3809
  openCommPanel,
3804
3810
  onLogout
@@ -3844,6 +3850,7 @@ var AccountSlideoutMenu = _ref4 => {
3844
3850
  hasTitleDivider: false,
3845
3851
  children: isAuthenticated ? /*#__PURE__*/jsxRuntime.jsx(LoggedInContent, {
3846
3852
  teamMember: teamMember,
3853
+ customerOwner: customerOwner,
3847
3854
  application: application,
3848
3855
  handleApplyNowClick: handleApplyNowClick,
3849
3856
  openCommPanel: openCommPanel,
@@ -3858,6 +3865,7 @@ var CtaNav = _ref => {
3858
3865
  handleApplyNowClick,
3859
3866
  session,
3860
3867
  application,
3868
+ customerOwner,
3861
3869
  teamMember,
3862
3870
  openCommPanel,
3863
3871
  onLogout
@@ -3866,7 +3874,8 @@ var CtaNav = _ref => {
3866
3874
  xalign: "center",
3867
3875
  children: [/*#__PURE__*/jsxRuntime.jsx(ShowFromTweakLarge, {
3868
3876
  children: /*#__PURE__*/jsxRuntime.jsx(TalkToExpertButton, {
3869
- openCommPanel: openCommPanel
3877
+ openCommPanel: openCommPanel,
3878
+ customerOwner: customerOwner
3870
3879
  })
3871
3880
  }), /*#__PURE__*/jsxRuntime.jsx(ShowFromSmall, {
3872
3881
  children: /*#__PURE__*/jsxRuntime.jsx(PrimaryCTA, {
@@ -3878,6 +3887,7 @@ var CtaNav = _ref => {
3878
3887
  handleApplyNowClick: handleApplyNowClick,
3879
3888
  session: session,
3880
3889
  teamMember: teamMember,
3890
+ customerOwner: customerOwner,
3881
3891
  application: application,
3882
3892
  openCommPanel: openCommPanel,
3883
3893
  onLogout: onLogout
@@ -3887,6 +3897,7 @@ var CtaNav = _ref => {
3887
3897
  handleApplyNowClick: handleApplyNowClick,
3888
3898
  session: session,
3889
3899
  teamMember: teamMember,
3900
+ customerOwner: customerOwner,
3890
3901
  application: application,
3891
3902
  openCommPanel: openCommPanel,
3892
3903
  onLogout: onLogout
@@ -3998,7 +4009,7 @@ var HeaderWithContext = _ref => {
3998
4009
  children: /*#__PURE__*/jsxRuntime.jsx(HamburgerMenu, {
3999
4010
  handleApplyNowClick: handleApplyNow,
4000
4011
  application: application,
4001
- teamMember: customerOwner,
4012
+ customerOwner: customerOwner,
4002
4013
  navOptions: navOptions,
4003
4014
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel()
4004
4015
  })
@@ -2242,7 +2242,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2242
2242
  }) ]
2243
2243
  }));
2244
2244
  }, TalkToExpertButton = _ref => {
2245
- var {openCommPanel: openCommPanel, customerOwner: customerOwner} = _ref, buttonText = null != customerOwner && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : "Talk to a broker";
2245
+ var {openCommPanel: openCommPanel, customerOwner: customerOwner} = _ref, {cmsNavbarBrokerNameButton: cmsNavbarBrokerNameButton} = launchdarkly.useFlags(), buttonText = null != customerOwner && customerOwner.firstName && cmsNavbarBrokerNameButton ? "Talk to ".concat(customerOwner.firstName) : "Talk to a broker";
2246
2246
  return jsxRuntime.jsx(Button.Button, {
2247
2247
  variant: "secondary",
2248
2248
  "data-component": "navbar-button-talk-to-expert",
@@ -2389,7 +2389,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2389
2389
  children: "Manage your loan applications"
2390
2390
  }), jsxRuntime.jsx(StyledHR, {}) ]
2391
2391
  }), LoggedInContent = _ref2 => {
2392
- var {handleApplyNowClick: handleApplyNowClick, application: application, teamMember: teamMember, openCommPanel: openCommPanel, onLogout: onLogout} = _ref2, {referAFriend: referAFriend} = launchdarkly.useFlags();
2392
+ var {handleApplyNowClick: handleApplyNowClick, application: application, customerOwner: customerOwner, openCommPanel: openCommPanel, onLogout: onLogout} = _ref2, {referAFriend: referAFriend} = launchdarkly.useFlags();
2393
2393
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
2394
2394
  children: [ jsxRuntime.jsxs(DropdownPrimaryContent, {
2395
2395
  style: {
@@ -2404,8 +2404,8 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2404
2404
  application: application
2405
2405
  })
2406
2406
  }), jsxRuntime.jsx(TalkToExpertButton, {
2407
- teamMember: teamMember,
2408
- openCommPanel: openCommPanel
2407
+ openCommPanel: openCommPanel,
2408
+ customerOwner: customerOwner
2409
2409
  }) ]
2410
2410
  }), jsxRuntime.jsxs("div", {
2411
2411
  style: {
@@ -2530,7 +2530,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2530
2530
  }) ]
2531
2531
  });
2532
2532
  }, AccountDropdown = _ref3 => {
2533
- var {application: application, session: session, handleApplyNowClick: handleApplyNowClick, teamMember: teamMember, openCommPanel: openCommPanel, onLogout: onLogout} = _ref3, isAuthenticated = (null == session ? void 0 : session.status) === lalaReact.Status.Authenticated;
2533
+ var {application: application, session: session, handleApplyNowClick: handleApplyNowClick, teamMember: teamMember, customerOwner: customerOwner, openCommPanel: openCommPanel, onLogout: onLogout} = _ref3, isAuthenticated = (null == session ? void 0 : session.status) === lalaReact.Status.Authenticated;
2534
2534
  return jsxRuntime.jsx(NavDropdown, {
2535
2535
  label: isAuthenticated ? LOGGEDIN_TEXT : LOGGEDOUT_TEXT,
2536
2536
  align: "right",
@@ -2547,6 +2547,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2547
2547
  },
2548
2548
  children: isAuthenticated ? jsxRuntime.jsx(LoggedInContent, {
2549
2549
  teamMember: teamMember,
2550
+ customerOwner: customerOwner,
2550
2551
  application: application,
2551
2552
  handleApplyNowClick: handleApplyNowClick,
2552
2553
  openCommPanel: openCommPanel,
@@ -2554,7 +2555,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2554
2555
  }) : jsxRuntime.jsx(LoggedOutContent, {})
2555
2556
  });
2556
2557
  }, AccountSlideoutMenu = _ref4 => {
2557
- var {session: session, application: application, teamMember: teamMember, handleApplyNowClick: handleApplyNowClick, openCommPanel: openCommPanel, onLogout: onLogout} = _ref4, {showMenu: showMenu, toggleMenu: toggleMenu} = useSlideoutMenu(), isAuthenticated = (null == session ? void 0 : session.status) === lalaReact.Status.Authenticated, loggedInOutText = isAuthenticated ? LOGGEDIN_TEXT : LOGGEDOUT_TEXT, handleClick = () => {
2558
+ var {session: session, application: application, teamMember: teamMember, customerOwner: customerOwner, handleApplyNowClick: handleApplyNowClick, openCommPanel: openCommPanel, onLogout: onLogout} = _ref4, {showMenu: showMenu, toggleMenu: toggleMenu} = useSlideoutMenu(), isAuthenticated = (null == session ? void 0 : session.status) === lalaReact.Status.Authenticated, loggedInOutText = isAuthenticated ? LOGGEDIN_TEXT : LOGGEDOUT_TEXT, handleClick = () => {
2558
2559
  toggleMenu();
2559
2560
  var event = {
2560
2561
  event_name: "Menu Clicked",
@@ -2589,6 +2590,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2589
2590
  hasTitleDivider: !1,
2590
2591
  children: isAuthenticated ? jsxRuntime.jsx(LoggedInContent, {
2591
2592
  teamMember: teamMember,
2593
+ customerOwner: customerOwner,
2592
2594
  application: application,
2593
2595
  handleApplyNowClick: handleApplyNowClick,
2594
2596
  openCommPanel: openCommPanel,
@@ -2597,12 +2599,13 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2597
2599
  }) ]
2598
2600
  });
2599
2601
  }, CtaNav = _ref => {
2600
- var {handleApplyNowClick: handleApplyNowClick, session: session, application: application, teamMember: teamMember, openCommPanel: openCommPanel, onLogout: onLogout} = _ref;
2602
+ var {handleApplyNowClick: handleApplyNowClick, session: session, application: application, customerOwner: customerOwner, teamMember: teamMember, openCommPanel: openCommPanel, onLogout: onLogout} = _ref;
2601
2603
  return jsxRuntime.jsxs(Layout.Spacer, {
2602
2604
  xalign: "center",
2603
2605
  children: [ jsxRuntime.jsx(ShowFromTweakLarge, {
2604
2606
  children: jsxRuntime.jsx(TalkToExpertButton, {
2605
- openCommPanel: openCommPanel
2607
+ openCommPanel: openCommPanel,
2608
+ customerOwner: customerOwner
2606
2609
  })
2607
2610
  }), jsxRuntime.jsx(ShowFromSmall, {
2608
2611
  children: jsxRuntime.jsx(PrimaryCTA, {
@@ -2614,6 +2617,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2614
2617
  handleApplyNowClick: handleApplyNowClick,
2615
2618
  session: session,
2616
2619
  teamMember: teamMember,
2620
+ customerOwner: customerOwner,
2617
2621
  application: application,
2618
2622
  openCommPanel: openCommPanel,
2619
2623
  onLogout: onLogout
@@ -2623,6 +2627,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2623
2627
  handleApplyNowClick: handleApplyNowClick,
2624
2628
  session: session,
2625
2629
  teamMember: teamMember,
2630
+ customerOwner: customerOwner,
2626
2631
  application: application,
2627
2632
  openCommPanel: openCommPanel,
2628
2633
  onLogout: onLogout
@@ -2699,7 +2704,7 @@ var getApplications = function() {
2699
2704
  children: jsxRuntime.jsx(HamburgerMenu, {
2700
2705
  handleApplyNowClick: handleApplyNow,
2701
2706
  application: application,
2702
- teamMember: customerOwner,
2707
+ customerOwner: customerOwner,
2703
2708
  navOptions: navOptions,
2704
2709
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel()
2705
2710
  })
@@ -3376,7 +3376,10 @@ var TalkToExpertButton = _ref => {
3376
3376
  openCommPanel,
3377
3377
  customerOwner
3378
3378
  } = _ref;
3379
- var buttonText = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : 'Talk to a broker';
3379
+ var {
3380
+ cmsNavbarBrokerNameButton
3381
+ } = useFlags();
3382
+ var buttonText = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName && cmsNavbarBrokerNameButton ? "Talk to ".concat(customerOwner.firstName) : 'Talk to a broker';
3380
3383
  var handleClick = () => {
3381
3384
  openCommPanel();
3382
3385
  var event = {
@@ -3571,7 +3574,7 @@ var LoggedInContent = _ref2 => {
3571
3574
  var {
3572
3575
  handleApplyNowClick,
3573
3576
  application,
3574
- teamMember,
3577
+ customerOwner,
3575
3578
  openCommPanel,
3576
3579
  onLogout
3577
3580
  } = _ref2;
@@ -3592,8 +3595,8 @@ var LoggedInContent = _ref2 => {
3592
3595
  application: application
3593
3596
  })
3594
3597
  }), /*#__PURE__*/jsx(TalkToExpertButton, {
3595
- teamMember: teamMember,
3596
- openCommPanel: openCommPanel
3598
+ openCommPanel: openCommPanel,
3599
+ customerOwner: customerOwner
3597
3600
  })]
3598
3601
  }), /*#__PURE__*/jsxs("div", {
3599
3602
  style: {
@@ -3734,6 +3737,7 @@ var AccountDropdown = _ref3 => {
3734
3737
  session,
3735
3738
  handleApplyNowClick,
3736
3739
  teamMember,
3740
+ customerOwner,
3737
3741
  openCommPanel,
3738
3742
  onLogout
3739
3743
  } = _ref3;
@@ -3754,6 +3758,7 @@ var AccountDropdown = _ref3 => {
3754
3758
  },
3755
3759
  children: isAuthenticated ? /*#__PURE__*/jsx(LoggedInContent, {
3756
3760
  teamMember: teamMember,
3761
+ customerOwner: customerOwner,
3757
3762
  application: application,
3758
3763
  handleApplyNowClick: handleApplyNowClick,
3759
3764
  openCommPanel: openCommPanel,
@@ -3766,6 +3771,7 @@ var AccountSlideoutMenu = _ref4 => {
3766
3771
  session,
3767
3772
  application,
3768
3773
  teamMember,
3774
+ customerOwner,
3769
3775
  handleApplyNowClick,
3770
3776
  openCommPanel,
3771
3777
  onLogout
@@ -3811,6 +3817,7 @@ var AccountSlideoutMenu = _ref4 => {
3811
3817
  hasTitleDivider: false,
3812
3818
  children: isAuthenticated ? /*#__PURE__*/jsx(LoggedInContent, {
3813
3819
  teamMember: teamMember,
3820
+ customerOwner: customerOwner,
3814
3821
  application: application,
3815
3822
  handleApplyNowClick: handleApplyNowClick,
3816
3823
  openCommPanel: openCommPanel,
@@ -3825,6 +3832,7 @@ var CtaNav = _ref => {
3825
3832
  handleApplyNowClick,
3826
3833
  session,
3827
3834
  application,
3835
+ customerOwner,
3828
3836
  teamMember,
3829
3837
  openCommPanel,
3830
3838
  onLogout
@@ -3833,7 +3841,8 @@ var CtaNav = _ref => {
3833
3841
  xalign: "center",
3834
3842
  children: [/*#__PURE__*/jsx(ShowFromTweakLarge, {
3835
3843
  children: /*#__PURE__*/jsx(TalkToExpertButton, {
3836
- openCommPanel: openCommPanel
3844
+ openCommPanel: openCommPanel,
3845
+ customerOwner: customerOwner
3837
3846
  })
3838
3847
  }), /*#__PURE__*/jsx(ShowFromSmall, {
3839
3848
  children: /*#__PURE__*/jsx(PrimaryCTA, {
@@ -3845,6 +3854,7 @@ var CtaNav = _ref => {
3845
3854
  handleApplyNowClick: handleApplyNowClick,
3846
3855
  session: session,
3847
3856
  teamMember: teamMember,
3857
+ customerOwner: customerOwner,
3848
3858
  application: application,
3849
3859
  openCommPanel: openCommPanel,
3850
3860
  onLogout: onLogout
@@ -3854,6 +3864,7 @@ var CtaNav = _ref => {
3854
3864
  handleApplyNowClick: handleApplyNowClick,
3855
3865
  session: session,
3856
3866
  teamMember: teamMember,
3867
+ customerOwner: customerOwner,
3857
3868
  application: application,
3858
3869
  openCommPanel: openCommPanel,
3859
3870
  onLogout: onLogout
@@ -3965,7 +3976,7 @@ var HeaderWithContext = _ref => {
3965
3976
  children: /*#__PURE__*/jsx(HamburgerMenu, {
3966
3977
  handleApplyNowClick: handleApplyNow,
3967
3978
  application: application,
3968
- teamMember: customerOwner,
3979
+ customerOwner: customerOwner,
3969
3980
  navOptions: navOptions,
3970
3981
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel()
3971
3982
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lendi/navbar",
3
3
  "access": "restricted",
4
- "version": "7.36.0",
4
+ "version": "7.37.0",
5
5
  "license": "ISC",
6
6
  "source": "src/index.tsx",
7
7
  "main": "dist/navbar.cjs.js",