@lendi/navbar 7.19.0 → 7.21.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.
@@ -1,8 +1,6 @@
1
- import { TeamMember } from '../../../types';
2
1
  import { ChatIconProps } from './ChatIcon';
3
2
  import { ChatLinKWrapperProps } from './style';
4
3
  export interface ChatLinkProps extends ChatIconProps, ChatLinKWrapperProps {
5
4
  onChatLinkClick: () => void;
6
- teamMember?: TeamMember;
7
5
  }
8
- export declare const ChatLink: ({ disabled, onChatLinkClick, teamMember, hasNew, isChatOpen }: ChatLinkProps) => JSX.Element;
6
+ export declare const ChatLink: ({ disabled, onChatLinkClick, hasNew, isChatOpen }: ChatLinkProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
- import { TeamMember } from '../../shared/types';
1
+ import { CustomerChatState } from '@lendi/chat';
2
2
  export interface TalkToExpertProps {
3
3
  openCommPanel: () => void;
4
- teamMember?: TeamMember;
4
+ customerOwner?: CustomerChatState['customerOwner'];
5
5
  }
6
- export declare const TalkToExpertButton: ({ openCommPanel, teamMember }: TalkToExpertProps) => JSX.Element;
6
+ export declare const TalkToExpertButton: ({ openCommPanel, customerOwner }: TalkToExpertProps) => JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import { CTAProps } from '../../../shared/components/CTA';
2
2
  import { UnReadProp } from '../CTA';
3
- declare const RenderDesktopAction: ({ dashboardVariant, isAuthenticated, continueURL, showContinueAction, showTalkToExpertCta, showBookanAppointmentCta, openCommPanel, teamMember, hasUnreadMessages, utmCampaign, }: CTAProps & UnReadProp) => JSX.Element;
3
+ declare const RenderDesktopAction: ({ dashboardVariant, isAuthenticated, continueURL, showContinueAction, showTalkToExpertCta, showBookanAppointmentCta, openCommPanel, customerOwner, hasUnreadMessages, }: CTAProps & UnReadProp) => JSX.Element;
4
4
  export default RenderDesktopAction;
@@ -1,4 +1,4 @@
1
1
  import { CTAProps } from '../../../shared/components/CTA';
2
2
  import { UnReadProp } from '../CTA';
3
- declare const RenderMobileAction: ({ isAuthenticated, continueURL, teamMember, openCommPanel, showContinueAction, showTalkToExpertCta, hasUnreadMessages, utmCampaign, }: CTAProps & UnReadProp) => JSX.Element;
3
+ declare const RenderMobileAction: ({ isAuthenticated, continueURL, customerOwner, openCommPanel, showContinueAction, showTalkToExpertCta, hasUnreadMessages, }: CTAProps & UnReadProp) => JSX.Element;
4
4
  export default RenderMobileAction;
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
+ import { CustomerChatState } from '@lendi/chat';
2
3
  import { BreakpointValueMap, BreakpointValue } from '@lendi-ui/breakpoint';
3
- import { TeamMember } from '../types';
4
4
  import { SlideoutMenuProps } from '../SlideoutMenuBase/SlideoutMenuBase';
5
5
  export interface ChatProps {
6
6
  isCommPanelOpen: boolean;
7
7
  hasUnread: boolean;
8
8
  closeCommPanel: () => void;
9
9
  openCommPanel: () => void;
10
- latestTeamMember?: TeamMember;
11
10
  topOffset?: BreakpointValue<string> | BreakpointValueMap<string>;
11
+ customerOwner?: CustomerChatState['customerOwner'];
12
12
  }
13
13
  export interface CommPanelWrapperProps extends SlideoutMenuProps {
14
14
  toTheTop?: boolean;
@@ -1,3 +1,4 @@
1
+ import { CustomerChatState } from '@lendi/chat';
1
2
  import { TeamMember } from '../../types';
2
3
  import { UnReadProp } from '../../../SimpleNavbar/components/CTA';
3
4
  export interface CTAProps {
@@ -7,9 +8,9 @@ export interface CTAProps {
7
8
  showContinueAction?: boolean;
8
9
  showTalkToExpertCta?: boolean;
9
10
  showBookanAppointmentCta?: boolean;
10
- utmCampaign?: string | null;
11
11
  openCommPanel?: () => void;
12
12
  teamMember?: TeamMember;
13
+ customerOwner?: CustomerChatState['customerOwner'];
13
14
  }
14
15
  declare const CTAButtons: (props: CTAProps & UnReadProp) => JSX.Element;
15
16
  export default CTAButtons;
@@ -577,12 +577,13 @@ var getEnvFromHostname = hostname => {
577
577
  var RenderChatOrSideBar = _ref => {
578
578
  var {
579
579
  openCommPanel = () => {},
580
- teamMember,
580
+ customerOwner,
581
581
  dashboardVariant,
582
582
  hasUnreadMessages
583
583
  } = _ref;
584
+ console.log('customerOwner:', customerOwner);
584
585
  var brand = lalaUtils.getBrandFromHostname();
585
- var primaryLabel = teamMember !== null && teamMember !== void 0 && teamMember.firstName ? "Talk to ".concat(teamMember.firstName) : brand === 'aussie' ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
586
+ var primaryLabel = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : brand === 'aussie' ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
586
587
  return /*#__PURE__*/jsxRuntime.jsx(TalkExpertAction, {
587
588
  dashboardVariant: dashboardVariant,
588
589
  size: "sm",
@@ -619,18 +620,17 @@ var RenderDesktopAction = _ref2 => {
619
620
  showTalkToExpertCta = true,
620
621
  showBookanAppointmentCta = true,
621
622
  openCommPanel = () => {},
622
- teamMember,
623
- hasUnreadMessages,
624
- utmCampaign
623
+ customerOwner,
624
+ hasUnreadMessages
625
625
  } = _ref2;
626
626
  var brand = lalaUtils.getBrandFromHostname();
627
627
  var env = getEnvFromHostname((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname);
628
628
  var signInURL = getSignInURL(brand, env, (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$location = _window2.location) === null || _window2$location === void 0 ? void 0 : _window2$location.href);
629
629
  var isDomain = brand === lalaUtils.Brand.Domain;
630
630
  var path = isDomain ? PATH_DOMAIN : PATH_LENDI;
631
- var renderSecondaryBtn = (utmCampaign, isAuthenticated, showBookanAppointmentCta, showContinueAction) => {
631
+ var renderSecondaryBtn = (isAuthenticated, showBookanAppointmentCta, showContinueAction) => {
632
632
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
633
- children: [(utmCampaign || showContinueAction) && isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(SecondaryAction, {
633
+ children: [showContinueAction && isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(SecondaryAction, {
634
634
  size: "sm",
635
635
  variant: 'emphasis',
636
636
  href: continueURL,
@@ -645,7 +645,7 @@ var RenderDesktopAction = _ref2 => {
645
645
  },
646
646
  "aria-label": continueURL,
647
647
  children: LABEL_CONTINUE
648
- }), (utmCampaign || showContinueAction) && !isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(SecondaryAction, {
648
+ }), showContinueAction && !isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(SecondaryAction, {
649
649
  size: "sm",
650
650
  variant: 'primary',
651
651
  href: signInURL,
@@ -660,7 +660,7 @@ var RenderDesktopAction = _ref2 => {
660
660
  },
661
661
  "aria-label": signInURL,
662
662
  children: LABEL_SIGN_IN
663
- }), !(utmCampaign || showContinueAction) && showBookanAppointmentCta && /*#__PURE__*/jsxRuntime.jsx(SecondaryAction, {
663
+ }), !showContinueAction && showBookanAppointmentCta && /*#__PURE__*/jsxRuntime.jsx(SecondaryAction, {
664
664
  size: "sm",
665
665
  variant: 'primary',
666
666
  href: "".concat(path).concat(ROUTE_BOOK_APPOINTMENT),
@@ -681,10 +681,10 @@ var RenderDesktopAction = _ref2 => {
681
681
  return /*#__PURE__*/jsxRuntime.jsxs(DesktopActionsWrapper, {
682
682
  children: [showTalkToExpertCta && /*#__PURE__*/jsxRuntime.jsx(RenderChatOrSideBar, {
683
683
  openCommPanel: openCommPanel,
684
- teamMember: teamMember,
684
+ customerOwner: customerOwner,
685
685
  dashboardVariant: dashboardVariant,
686
686
  hasUnreadMessages: hasUnreadMessages
687
- }), renderSecondaryBtn(utmCampaign, isAuthenticated, showBookanAppointmentCta, showContinueAction), isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(LogoutComponent, {})]
687
+ }), renderSecondaryBtn(isAuthenticated, showBookanAppointmentCta, showContinueAction), isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(LogoutComponent, {})]
688
688
  });
689
689
  };
690
690
  var RenderDesktopAction$1 = RenderDesktopAction;
@@ -700,22 +700,21 @@ var RenderMobileAction = _ref => {
700
700
  var {
701
701
  isAuthenticated,
702
702
  continueURL,
703
- teamMember,
703
+ customerOwner,
704
704
  openCommPanel = () => {},
705
705
  showContinueAction = false,
706
706
  showTalkToExpertCta = true,
707
- hasUnreadMessages,
708
- utmCampaign
707
+ hasUnreadMessages
709
708
  } = _ref;
710
709
  var {
711
710
  isTransparent
712
711
  } = NavbarBase.useNavbarBaseContext();
713
712
  var needToContinue = () => isAuthenticated && showContinueAction;
714
- var needToSignIn = () => !isAuthenticated && utmCampaign;
713
+ var needToSignIn = () => !isAuthenticated;
715
714
  var brand = lalaUtils.getBrandFromHostname();
716
715
  var env = getEnvFromHostname((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname);
717
716
  var signInURL = getSignInURL(brand, env, (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$location = _window2.location) === null || _window2$location === void 0 ? void 0 : _window2$location.href);
718
- var primaryLabel = teamMember !== null && teamMember !== void 0 && teamMember.firstName ? "Talk to ".concat(teamMember.firstName) : needToContinue() ? CONTACT_US : brand === 'aussie' ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
717
+ var primaryLabel = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : needToContinue() ? CONTACT_US : brand === 'aussie' ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
719
718
  return /*#__PURE__*/jsxRuntime.jsxs(MobileActionsWrapper, {
720
719
  children: [showTalkToExpertCta && /*#__PURE__*/jsxRuntime.jsx(TalkExpertAction, {
721
720
  size: "sm",
@@ -1206,7 +1205,6 @@ var ChatLink = _ref => {
1206
1205
  var {
1207
1206
  disabled,
1208
1207
  onChatLinkClick,
1209
- teamMember,
1210
1208
  hasNew,
1211
1209
  isChatOpen
1212
1210
  } = _ref;
@@ -1221,11 +1219,7 @@ var ChatLink = _ref => {
1221
1219
  }), /*#__PURE__*/jsxRuntime.jsxs(ChatBodyWrapper, {
1222
1220
  children: [/*#__PURE__*/jsxRuntime.jsx(BodyWrapper, {
1223
1221
  size: "md",
1224
- children: teamMember && !disabled ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1225
- children: ["Chat with ", teamMember.firstName]
1226
- }) : /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
1227
- children: "Chat online"
1228
- })
1222
+ children: "Chat Now"
1229
1223
  }), /*#__PURE__*/jsxRuntime.jsx(StyledChevronRightIcon, {
1230
1224
  color: getColour.getColour('interaction', 'main'),
1231
1225
  height: "24px",
@@ -1261,7 +1255,6 @@ var SidePanel = _ref => {
1261
1255
  isChatOpen: isChatOpen,
1262
1256
  disabled: disabled,
1263
1257
  onChatLinkClick: onChatLinkClick,
1264
- teamMember: teamMember,
1265
1258
  hasNew: hasNew
1266
1259
  })]
1267
1260
  })]
@@ -1583,8 +1576,8 @@ props => {
1583
1576
  isCommPanelOpen,
1584
1577
  openCommPanel,
1585
1578
  closeCommPanel,
1586
- teamMember,
1587
- channelId
1579
+ channelId,
1580
+ customerOwner
1588
1581
  } = chat.useBootstrappedChatState();
1589
1582
  var [hasUnread, setHasUnread] = React__default["default"].useState(false);
1590
1583
  var [isOtherUserOnline, setIsOtherUserOnline] = React__default["default"].useState(false);
@@ -1602,7 +1595,7 @@ props => {
1602
1595
  hasUnread: hasUnread,
1603
1596
  closeCommPanel: closeCommPanel,
1604
1597
  openCommPanel: openCommPanel,
1605
- latestTeamMember: teamMember
1598
+ customerOwner: customerOwner
1606
1599
  })), /*#__PURE__*/jsxRuntime.jsx(CommPanelWrapper, _objectSpread2(_objectSpread2({
1607
1600
  isOpen: isCommPanelOpen,
1608
1601
  handleClose: closeCommPanel,
@@ -1638,12 +1631,10 @@ var SimpleNavbarComponent = _ref => {
1638
1631
  hasUnread,
1639
1632
  closeCommPanel,
1640
1633
  openCommPanel: _openCommPanel,
1641
- latestTeamMember
1634
+ customerOwner
1642
1635
  } = _ref;
1643
1636
  var session = lalaReact.useSession();
1644
1637
  var isAuthenticated = session.status === lalaReact.Status.Authenticated;
1645
- var hasWindow = typeof window !== 'undefined';
1646
- var utmCampaign = hasWindow ? new URLSearchParams(window.location.search).get('utm_campaign') : null;
1647
1638
  return /*#__PURE__*/jsxRuntime.jsxs(NavbarWrapper, {
1648
1639
  isTransparent: useTransparent,
1649
1640
  isAuthenticated: isAuthenticated,
@@ -1664,10 +1655,9 @@ var SimpleNavbarComponent = _ref => {
1664
1655
  showBookanAppointmentCta: showBookanAppointmentCta,
1665
1656
  isAuthenticated: isAuthenticated,
1666
1657
  continueURL: continueURL,
1667
- utmCampaign: utmCampaign,
1668
1658
  showContinueAction: showContinueAction,
1669
1659
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
1670
- teamMember: latestTeamMember,
1660
+ customerOwner: customerOwner,
1671
1661
  hasUnreadMessages: hasUnread
1672
1662
  })
1673
1663
  })
@@ -2406,7 +2396,7 @@ var onClickOption = (label, setCurrentSelected) => {
2406
2396
  };
2407
2397
  var MenuOptions$1 = MenuOptions;
2408
2398
 
2409
- var _excluded$8 = ["useTransparent", "homeURL", "params", "continueURL", "onLogout", "application", "showContinueAction", "showTalkToExpertCta", "hideDashboardItem", "hideManageApplicationsItem", "isCommPanelOpen", "hasUnread", "closeCommPanel", "openCommPanel", "latestTeamMember"];
2399
+ var _excluded$8 = ["useTransparent", "homeURL", "params", "continueURL", "onLogout", "application", "showContinueAction", "showTalkToExpertCta", "hideDashboardItem", "hideManageApplicationsItem", "isCommPanelOpen", "hasUnread", "closeCommPanel", "openCommPanel", "customerOwner"];
2410
2400
  var MultiNavbarComponent = _ref => {
2411
2401
  var {
2412
2402
  // Public props
@@ -2425,7 +2415,7 @@ var MultiNavbarComponent = _ref => {
2425
2415
  hasUnread,
2426
2416
  closeCommPanel,
2427
2417
  openCommPanel: _openCommPanel,
2428
- latestTeamMember
2418
+ customerOwner
2429
2419
  } = _ref,
2430
2420
  otherProps = _objectWithoutProperties(_ref, _excluded$8);
2431
2421
  var session = lalaReact.useSession();
@@ -2471,7 +2461,7 @@ var MultiNavbarComponent = _ref => {
2471
2461
  continueURL: continueURL,
2472
2462
  showContinueAction: showContinueAction,
2473
2463
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
2474
- teamMember: latestTeamMember,
2464
+ customerOwner: customerOwner,
2475
2465
  hasUnreadMessages: hasUnread
2476
2466
  })
2477
2467
  })
@@ -3196,9 +3186,9 @@ var SlideoutMenu = _ref6 => {
3196
3186
  var TalkToExpertButton = _ref => {
3197
3187
  var {
3198
3188
  openCommPanel,
3199
- teamMember
3189
+ customerOwner
3200
3190
  } = _ref;
3201
- var buttonText = teamMember !== null && teamMember !== void 0 && teamMember.firstName ? "Talk to ".concat(teamMember.firstName) : 'Talk to a broker';
3191
+ var buttonText = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : 'Talk to a broker';
3202
3192
  var handleClick = () => {
3203
3193
  openCommPanel();
3204
3194
  var event = {
@@ -3285,7 +3275,7 @@ var _templateObject;
3285
3275
  var HamburgerCtaBlock = _ref => {
3286
3276
  var {
3287
3277
  handleApplyNowClick,
3288
- teamMember,
3278
+ customerOwner,
3289
3279
  application,
3290
3280
  openCommPanel
3291
3281
  } = _ref;
@@ -3296,7 +3286,7 @@ var HamburgerCtaBlock = _ref => {
3296
3286
  handleApplyNowClick: handleApplyNowClick,
3297
3287
  application: application
3298
3288
  }), /*#__PURE__*/jsxRuntime.jsx(TalkToExpertButton, {
3299
- teamMember: teamMember,
3289
+ customerOwner: customerOwner,
3300
3290
  openCommPanel: openCommPanel
3301
3291
  })]
3302
3292
  })
@@ -3754,7 +3744,7 @@ var HeaderWithContext = _ref => {
3754
3744
  isCommPanelOpen,
3755
3745
  closeCommPanel,
3756
3746
  openCommPanel: _openCommPanel,
3757
- latestTeamMember
3747
+ customerOwner
3758
3748
  } = _ref;
3759
3749
  var session = lalaReact.useSession();
3760
3750
  var application = useApplication(session);
@@ -3768,7 +3758,7 @@ var HeaderWithContext = _ref => {
3768
3758
  children: /*#__PURE__*/jsxRuntime.jsx(HamburgerMenu, {
3769
3759
  handleApplyNowClick: handleApplyNow,
3770
3760
  application: application,
3771
- teamMember: latestTeamMember,
3761
+ teamMember: customerOwner,
3772
3762
  navOptions: navOptions,
3773
3763
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel()
3774
3764
  })
@@ -3778,7 +3768,7 @@ var HeaderWithContext = _ref => {
3778
3768
  handleApplyNowClick: handleApplyNow,
3779
3769
  application: application,
3780
3770
  session: session,
3781
- teamMember: latestTeamMember,
3771
+ customerOwner: customerOwner,
3782
3772
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
3783
3773
  onLogout: onLogout
3784
3774
  })
@@ -335,7 +335,9 @@ var _templateObject$c, _templateObject$b, _templateObject$a, _templateObject$9,
335
335
  var urls = lalaUtils.getURLs(brand, lalaReact.Type.Customer, env), dashboardReturnURL = brand === lalaReact.Brand.Domain ? "/loanfinder".concat(DEFAULT_DASHBOARD_URL) : DEFAULT_DASHBOARD_URL, lendiOrAussieLandingPageRoute = "".concat(urls.origin, "lp/"), hasNoReturnURL = void 0 === returnURL || "" === returnURL, isReturnURLOrigin = returnURL === urls.origin, isReturnURLLendiOrAussieLandingPage = (null == returnURL ? void 0 : returnURL.includes(lendiOrAussieLandingPageRoute)) && brand !== lalaReact.Brand.Domain, newReturnURL = hasNoReturnURL || isReturnURLOrigin || isReturnURLLendiOrAussieLandingPage ? dashboardReturnURL : returnURL;
336
336
  return "".concat(urls.authenticate, "?returnURL=").concat(encodeURIComponent(newReturnURL));
337
337
  }, getEnvFromHostname = hostname => null != hostname && hostname.includes("dev.") ? lalaReact.Environment.Development : null != hostname && hostname.includes("stg.") || null != hostname && hostname.includes("stage.") ? lalaReact.Environment.Staging : null != hostname && hostname.includes("preprod.") ? lalaReact.Environment.Preproduction : null != hostname && hostname.includes("lendi.com.au") || null != hostname && hostname.includes("domain.com.au") || null != hostname && hostname.includes("aussie.com.au") ? lalaReact.Environment.Production : lalaReact.Environment.Development, RenderChatOrSideBar = _ref => {
338
- var {openCommPanel: openCommPanel = (() => {}), teamMember: teamMember, dashboardVariant: dashboardVariant, hasUnreadMessages: hasUnreadMessages} = _ref, brand = lalaUtils.getBrandFromHostname(), primaryLabel = null != teamMember && teamMember.firstName ? "Talk to ".concat(teamMember.firstName) : "aussie" === brand ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
338
+ var {openCommPanel: openCommPanel = (() => {}), customerOwner: customerOwner, dashboardVariant: dashboardVariant, hasUnreadMessages: hasUnreadMessages} = _ref;
339
+ console.log("customerOwner:", customerOwner);
340
+ var brand = lalaUtils.getBrandFromHostname(), primaryLabel = null != customerOwner && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : "aussie" === brand ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
339
341
  return jsxRuntime.jsx(TalkExpertAction, {
340
342
  dashboardVariant: dashboardVariant,
341
343
  size: "sm",
@@ -362,15 +364,15 @@ var _templateObject$c, _templateObject$b, _templateObject$a, _templateObject$9,
362
364
  })
363
365
  });
364
366
  }, RenderDesktopAction = _ref2 => {
365
- var _window, _window$location, _window2, _window2$location, {dashboardVariant: dashboardVariant, isAuthenticated: isAuthenticated, continueURL: continueURL, showContinueAction: showContinueAction = !1, showTalkToExpertCta: showTalkToExpertCta = !0, showBookanAppointmentCta: showBookanAppointmentCta = !0, openCommPanel: openCommPanel = (() => {}), teamMember: teamMember, hasUnreadMessages: hasUnreadMessages, utmCampaign: utmCampaign} = _ref2, brand = lalaUtils.getBrandFromHostname(), env = getEnvFromHostname(null === (_window = window) || void 0 === _window || null === (_window$location = _window.location) || void 0 === _window$location ? void 0 : _window$location.hostname), signInURL = getSignInURL(brand, env, null === (_window2 = window) || void 0 === _window2 || null === (_window2$location = _window2.location) || void 0 === _window2$location ? void 0 : _window2$location.href), path = brand === lalaUtils.Brand.Domain ? PATH_DOMAIN : PATH_LENDI;
367
+ var _window, _window$location, _window2, _window2$location, {dashboardVariant: dashboardVariant, isAuthenticated: isAuthenticated, continueURL: continueURL, showContinueAction: showContinueAction = !1, showTalkToExpertCta: showTalkToExpertCta = !0, showBookanAppointmentCta: showBookanAppointmentCta = !0, openCommPanel: openCommPanel = (() => {}), customerOwner: customerOwner, hasUnreadMessages: hasUnreadMessages} = _ref2, brand = lalaUtils.getBrandFromHostname(), env = getEnvFromHostname(null === (_window = window) || void 0 === _window || null === (_window$location = _window.location) || void 0 === _window$location ? void 0 : _window$location.hostname), signInURL = getSignInURL(brand, env, null === (_window2 = window) || void 0 === _window2 || null === (_window2$location = _window2.location) || void 0 === _window2$location ? void 0 : _window2$location.href), path = brand === lalaUtils.Brand.Domain ? PATH_DOMAIN : PATH_LENDI;
366
368
  return jsxRuntime.jsxs(DesktopActionsWrapper, {
367
369
  children: [ showTalkToExpertCta && jsxRuntime.jsx(RenderChatOrSideBar, {
368
370
  openCommPanel: openCommPanel,
369
- teamMember: teamMember,
371
+ customerOwner: customerOwner,
370
372
  dashboardVariant: dashboardVariant,
371
373
  hasUnreadMessages: hasUnreadMessages
372
- }), ((utmCampaign, isAuthenticated, showBookanAppointmentCta, showContinueAction) => jsxRuntime.jsxs(jsxRuntime.Fragment, {
373
- children: [ (utmCampaign || showContinueAction) && isAuthenticated && jsxRuntime.jsx(SecondaryAction, {
374
+ }), ((isAuthenticated, showBookanAppointmentCta, showContinueAction) => jsxRuntime.jsxs(jsxRuntime.Fragment, {
375
+ children: [ showContinueAction && isAuthenticated && jsxRuntime.jsx(SecondaryAction, {
374
376
  size: "sm",
375
377
  variant: "emphasis",
376
378
  href: continueURL,
@@ -385,7 +387,7 @@ var _templateObject$c, _templateObject$b, _templateObject$a, _templateObject$9,
385
387
  },
386
388
  "aria-label": continueURL,
387
389
  children: LABEL_CONTINUE
388
- }), (utmCampaign || showContinueAction) && !isAuthenticated && jsxRuntime.jsx(SecondaryAction, {
390
+ }), showContinueAction && !isAuthenticated && jsxRuntime.jsx(SecondaryAction, {
389
391
  size: "sm",
390
392
  variant: "primary",
391
393
  href: signInURL,
@@ -400,7 +402,7 @@ var _templateObject$c, _templateObject$b, _templateObject$a, _templateObject$9,
400
402
  },
401
403
  "aria-label": signInURL,
402
404
  children: LABEL_SIGN_IN
403
- }), !(utmCampaign || showContinueAction) && showBookanAppointmentCta && jsxRuntime.jsx(SecondaryAction, {
405
+ }), !showContinueAction && showBookanAppointmentCta && jsxRuntime.jsx(SecondaryAction, {
404
406
  size: "sm",
405
407
  variant: "primary",
406
408
  href: "".concat(path).concat(ROUTE_BOOK_APPOINTMENT),
@@ -416,13 +418,13 @@ var _templateObject$c, _templateObject$b, _templateObject$a, _templateObject$9,
416
418
  "aria-label": "".concat(path).concat(ROUTE_BOOK_APPOINTMENT),
417
419
  children: BOOK_AN_APPOINTMENT
418
420
  }) ]
419
- }))(utmCampaign, isAuthenticated, showBookanAppointmentCta, showContinueAction), isAuthenticated && jsxRuntime.jsx(LogoutComponent, {}) ]
421
+ }))(isAuthenticated, showBookanAppointmentCta, showContinueAction), isAuthenticated && jsxRuntime.jsx(LogoutComponent, {}) ]
420
422
  });
421
423
  }, RenderDesktopAction$1 = RenderDesktopAction, MobileActionsWrapper = styled__default.default.div.withConfig({
422
424
  displayName: "style__MobileActionsWrapper",
423
425
  componentId: "lui__sc-jzhj4e-0"
424
426
  })([ "display:flex;", ";.noHover{", ";:hover{box-shadow:none;}}" ], breakpoint.gte("desktop")(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteral([ "\n display: none;\n " ]))), spacing.mr("nil")), RenderMobileAction = _ref => {
425
- var _window, _window$location, _window2, _window2$location, {isAuthenticated: isAuthenticated, continueURL: continueURL, teamMember: teamMember, openCommPanel: openCommPanel = (() => {}), showContinueAction: showContinueAction = !1, showTalkToExpertCta: showTalkToExpertCta = !0, hasUnreadMessages: hasUnreadMessages, utmCampaign: utmCampaign} = _ref, {isTransparent: isTransparent} = NavbarBase.useNavbarBaseContext(), needToContinue = () => isAuthenticated && showContinueAction, brand = lalaUtils.getBrandFromHostname(), env = getEnvFromHostname(null === (_window = window) || void 0 === _window || null === (_window$location = _window.location) || void 0 === _window$location ? void 0 : _window$location.hostname), signInURL = getSignInURL(brand, env, null === (_window2 = window) || void 0 === _window2 || null === (_window2$location = _window2.location) || void 0 === _window2$location ? void 0 : _window2$location.href), primaryLabel = null != teamMember && teamMember.firstName ? "Talk to ".concat(teamMember.firstName) : needToContinue() ? CONTACT_US : "aussie" === brand ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
427
+ var _window, _window$location, _window2, _window2$location, {isAuthenticated: isAuthenticated, continueURL: continueURL, customerOwner: customerOwner, openCommPanel: openCommPanel = (() => {}), showContinueAction: showContinueAction = !1, showTalkToExpertCta: showTalkToExpertCta = !0, hasUnreadMessages: hasUnreadMessages} = _ref, {isTransparent: isTransparent} = NavbarBase.useNavbarBaseContext(), needToContinue = () => isAuthenticated && showContinueAction, brand = lalaUtils.getBrandFromHostname(), env = getEnvFromHostname(null === (_window = window) || void 0 === _window || null === (_window$location = _window.location) || void 0 === _window$location ? void 0 : _window$location.hostname), signInURL = getSignInURL(brand, env, null === (_window2 = window) || void 0 === _window2 || null === (_window2$location = _window2.location) || void 0 === _window2$location ? void 0 : _window2$location.href), primaryLabel = null != customerOwner && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : needToContinue() ? CONTACT_US : "aussie" === brand ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
426
428
  return jsxRuntime.jsxs(MobileActionsWrapper, {
427
429
  children: [ showTalkToExpertCta && jsxRuntime.jsx(TalkExpertAction, {
428
430
  size: "sm",
@@ -449,7 +451,7 @@ var _templateObject$c, _templateObject$b, _templateObject$a, _templateObject$9,
449
451
  }) : jsxRuntime.jsx(jsxRuntime.Fragment, {
450
452
  children: primaryLabel
451
453
  })
452
- }), !isAuthenticated && utmCampaign && jsxRuntime.jsx(SecondaryActionMobile, {
454
+ }), !isAuthenticated && jsxRuntime.jsx(SecondaryActionMobile, {
453
455
  size: "sm",
454
456
  variant: isAuthenticated ? "emphasis" : "primary",
455
457
  href: signInURL,
@@ -776,7 +778,7 @@ var ChevronRightIcon = styled__default.default(KeyboardArrowRight__default.defau
776
778
  displayName: "style__StyledChevronRightIcon",
777
779
  componentId: "lui__sc-1pa95jd-3"
778
780
  })([ "", ";" ], positionedRight), ChatLink = _ref => {
779
- var {disabled: disabled, onChatLinkClick: onChatLinkClick, teamMember: teamMember, hasNew: hasNew, isChatOpen: isChatOpen} = _ref;
781
+ var {disabled: disabled, onChatLinkClick: onChatLinkClick, hasNew: hasNew, isChatOpen: isChatOpen} = _ref;
780
782
  return jsxRuntime.jsx(ChatLinKWrapper, {
781
783
  disabled: disabled,
782
784
  isChatOpen: isChatOpen,
@@ -788,11 +790,7 @@ var ChevronRightIcon = styled__default.default(KeyboardArrowRight__default.defau
788
790
  }), jsxRuntime.jsxs(ChatBodyWrapper, {
789
791
  children: [ jsxRuntime.jsx(BodyWrapper, {
790
792
  size: "md",
791
- children: teamMember && !disabled ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
792
- children: [ "Chat with ", teamMember.firstName ]
793
- }) : jsxRuntime.jsx(jsxRuntime.Fragment, {
794
- children: "Chat online"
795
- })
793
+ children: "Chat Now"
796
794
  }), jsxRuntime.jsx(StyledChevronRightIcon, {
797
795
  color: getColour.getColour("interaction", "main"),
798
796
  height: "24px",
@@ -816,7 +814,6 @@ var ChevronRightIcon = styled__default.default(KeyboardArrowRight__default.defau
816
814
  isChatOpen: isChatOpen,
817
815
  disabled: disabled,
818
816
  onChatLinkClick: onChatLinkClick,
819
- teamMember: teamMember,
820
817
  hasNew: hasNew
821
818
  }) ]
822
819
  }) ]
@@ -997,7 +994,7 @@ var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6,
997
994
  var {toTheTop: toTheTop} = _ref2;
998
995
  return toTheTop && styled.css([ "top:0;z-index:999;" ]);
999
996
  })), withCommPanelWrapper = Component => props => {
1000
- var {onException: onException} = useError(), {isCommPanelOpen: isCommPanelOpen, openCommPanel: openCommPanel, closeCommPanel: closeCommPanel, teamMember: teamMember, channelId: channelId} = chat.useBootstrappedChatState(), [hasUnread, setHasUnread] = React__default.default.useState(!1), [isOtherUserOnline, setIsOtherUserOnline] = React__default.default.useState(!1), [breakpoint$1, setBreakpoint] = React__default.default.useState();
997
+ var {onException: onException} = useError(), {isCommPanelOpen: isCommPanelOpen, openCommPanel: openCommPanel, closeCommPanel: closeCommPanel, channelId: channelId, customerOwner: customerOwner} = chat.useBootstrappedChatState(), [hasUnread, setHasUnread] = React__default.default.useState(!1), [isOtherUserOnline, setIsOtherUserOnline] = React__default.default.useState(!1), [breakpoint$1, setBreakpoint] = React__default.default.useState();
1001
998
  breakpoint.useBreakpoint(setBreakpoint);
1002
999
  var shouldFullScreen = "aussie" === utils$1.getThemeName() || "mobile" === breakpoint$1;
1003
1000
  return jsxRuntime.jsxs(chat.ChatDataExposureContext.Provider, {
@@ -1010,7 +1007,7 @@ var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6,
1010
1007
  hasUnread: hasUnread,
1011
1008
  closeCommPanel: closeCommPanel,
1012
1009
  openCommPanel: openCommPanel,
1013
- latestTeamMember: teamMember
1010
+ customerOwner: customerOwner
1014
1011
  })), jsxRuntime.jsx(CommPanelWrapper, _objectSpread2(_objectSpread2({
1015
1012
  isOpen: isCommPanelOpen,
1016
1013
  handleClose: closeCommPanel,
@@ -1026,7 +1023,7 @@ var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6,
1026
1023
  })) ]
1027
1024
  });
1028
1025
  }, withCommPanel = Component => chat.withCustomerChatProvider(withCommPanelWrapper(Component)), SimpleNavbarComponent = _ref => {
1029
- var {useTransparent: useTransparent = !1, showBookanAppointmentCta: showBookanAppointmentCta = !0, showTalkToExpertCta: showTalkToExpertCta = !0, homeURL: homeURL, params: params = "", continueURL: continueURL = "/", onLogout: onLogout, showContinueAction: showContinueAction = !1, hideDashboardItem: hideDashboardItem, hideManageApplicationsItem: hideManageApplicationsItem, isCommPanelOpen: isCommPanelOpen, hasUnread: hasUnread, closeCommPanel: closeCommPanel, openCommPanel: _openCommPanel, latestTeamMember: latestTeamMember} = _ref, isAuthenticated = lalaReact.useSession().status === lalaReact.Status.Authenticated, utmCampaign = "undefined" != typeof window ? new URLSearchParams(window.location.search).get("utm_campaign") : null;
1026
+ var {useTransparent: useTransparent = !1, showBookanAppointmentCta: showBookanAppointmentCta = !0, showTalkToExpertCta: showTalkToExpertCta = !0, homeURL: homeURL, params: params = "", continueURL: continueURL = "/", onLogout: onLogout, showContinueAction: showContinueAction = !1, hideDashboardItem: hideDashboardItem, hideManageApplicationsItem: hideManageApplicationsItem, isCommPanelOpen: isCommPanelOpen, hasUnread: hasUnread, closeCommPanel: closeCommPanel, openCommPanel: _openCommPanel, customerOwner: customerOwner} = _ref, isAuthenticated = lalaReact.useSession().status === lalaReact.Status.Authenticated;
1030
1027
  return jsxRuntime.jsxs(NavbarWrapper, {
1031
1028
  isTransparent: useTransparent,
1032
1029
  isAuthenticated: isAuthenticated,
@@ -1047,10 +1044,9 @@ var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6,
1047
1044
  showBookanAppointmentCta: showBookanAppointmentCta,
1048
1045
  isAuthenticated: isAuthenticated,
1049
1046
  continueURL: continueURL,
1050
- utmCampaign: utmCampaign,
1051
1047
  showContinueAction: showContinueAction,
1052
1048
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
1053
- teamMember: latestTeamMember,
1049
+ customerOwner: customerOwner,
1054
1050
  hasUnreadMessages: hasUnread
1055
1051
  })
1056
1052
  })
@@ -1616,8 +1612,8 @@ var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6,
1616
1612
  });
1617
1613
  }, onClickOption = (label, setCurrentSelected) => {
1618
1614
  setCurrentSelected(prevSelected === label ? "" : label);
1619
- }, MenuOptions$1 = MenuOptions, _excluded$8 = [ "useTransparent", "homeURL", "params", "continueURL", "onLogout", "application", "showContinueAction", "showTalkToExpertCta", "hideDashboardItem", "hideManageApplicationsItem", "isCommPanelOpen", "hasUnread", "closeCommPanel", "openCommPanel", "latestTeamMember" ], MultiNavbarComponent = _ref => {
1620
- var {useTransparent: useTransparent = !1, homeURL: homeURL, params: params = "", continueURL: continueURL = "/", onLogout: onLogout = (() => {}), application: application, showContinueAction: showContinueAction, showTalkToExpertCta: showTalkToExpertCta, hideDashboardItem: hideDashboardItem, hideManageApplicationsItem: hideManageApplicationsItem, isCommPanelOpen: isCommPanelOpen, hasUnread: hasUnread, closeCommPanel: closeCommPanel, openCommPanel: _openCommPanel, latestTeamMember: latestTeamMember} = _ref, otherProps = _objectWithoutProperties(_ref, _excluded$8), isAuthenticated = lalaReact.useSession().status === lalaReact.Status.Authenticated, [leftSidebarState, setLeftSidebarState] = React__default.default.useState(!1);
1615
+ }, MenuOptions$1 = MenuOptions, _excluded$8 = [ "useTransparent", "homeURL", "params", "continueURL", "onLogout", "application", "showContinueAction", "showTalkToExpertCta", "hideDashboardItem", "hideManageApplicationsItem", "isCommPanelOpen", "hasUnread", "closeCommPanel", "openCommPanel", "customerOwner" ], MultiNavbarComponent = _ref => {
1616
+ var {useTransparent: useTransparent = !1, homeURL: homeURL, params: params = "", continueURL: continueURL = "/", onLogout: onLogout = (() => {}), application: application, showContinueAction: showContinueAction, showTalkToExpertCta: showTalkToExpertCta, hideDashboardItem: hideDashboardItem, hideManageApplicationsItem: hideManageApplicationsItem, isCommPanelOpen: isCommPanelOpen, hasUnread: hasUnread, closeCommPanel: closeCommPanel, openCommPanel: _openCommPanel, customerOwner: customerOwner} = _ref, otherProps = _objectWithoutProperties(_ref, _excluded$8), isAuthenticated = lalaReact.useSession().status === lalaReact.Status.Authenticated, [leftSidebarState, setLeftSidebarState] = React__default.default.useState(!1);
1621
1617
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
1622
1618
  children: [ jsxRuntime.jsx(LeftSidebar$1, {
1623
1619
  menuOptions: MULTI_MENU_OPTIONS,
@@ -1658,7 +1654,7 @@ var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6,
1658
1654
  continueURL: continueURL,
1659
1655
  showContinueAction: showContinueAction,
1660
1656
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
1661
- teamMember: latestTeamMember,
1657
+ customerOwner: customerOwner,
1662
1658
  hasUnreadMessages: hasUnread
1663
1659
  })
1664
1660
  })
@@ -2129,7 +2125,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2129
2125
  }) ]
2130
2126
  }));
2131
2127
  }, TalkToExpertButton = _ref => {
2132
- var {openCommPanel: openCommPanel, teamMember: teamMember} = _ref, buttonText = null != teamMember && teamMember.firstName ? "Talk to ".concat(teamMember.firstName) : "Talk to a broker";
2128
+ var {openCommPanel: openCommPanel, customerOwner: customerOwner} = _ref, buttonText = null != customerOwner && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : "Talk to a broker";
2133
2129
  return jsxRuntime.jsx(Button.Button, {
2134
2130
  variant: "secondary",
2135
2131
  "data-component": "navbar-button-talk-to-expert",
@@ -2196,7 +2192,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2196
2192
  width: "100%"
2197
2193
  });
2198
2194
  }, _excluded = [ "navOptions" ], HamburgerCtaBlock = _ref => {
2199
- var {handleApplyNowClick: handleApplyNowClick, teamMember: teamMember, application: application, openCommPanel: openCommPanel} = _ref;
2195
+ var {handleApplyNowClick: handleApplyNowClick, customerOwner: customerOwner, application: application, openCommPanel: openCommPanel} = _ref;
2200
2196
  return jsxRuntime.jsx(MenuPadding, {
2201
2197
  children: jsxRuntime.jsxs(Layout.Spacer, {
2202
2198
  ygap: "12",
@@ -2204,7 +2200,7 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
2204
2200
  handleApplyNowClick: handleApplyNowClick,
2205
2201
  application: application
2206
2202
  }), jsxRuntime.jsx(TalkToExpertButton, {
2207
- teamMember: teamMember,
2203
+ customerOwner: customerOwner,
2208
2204
  openCommPanel: openCommPanel
2209
2205
  }) ]
2210
2206
  })
@@ -2561,7 +2557,7 @@ var getApplications = function() {
2561
2557
  })) : setApplication(void 0);
2562
2558
  }), [ session, onException ]), application;
2563
2559
  }, HeaderWithContext = _ref => {
2564
- var {handleApplyNow: handleApplyNow, onLogout: onLogout, navOptions: navOptions = [], isCommPanelOpen: isCommPanelOpen, closeCommPanel: closeCommPanel, openCommPanel: _openCommPanel, latestTeamMember: latestTeamMember} = _ref, session = lalaReact.useSession(), application = useApplication(session);
2560
+ var {handleApplyNow: handleApplyNow, onLogout: onLogout, navOptions: navOptions = [], isCommPanelOpen: isCommPanelOpen, closeCommPanel: closeCommPanel, openCommPanel: _openCommPanel, customerOwner: customerOwner} = _ref, session = lalaReact.useSession(), application = useApplication(session);
2565
2561
  return jsxRuntime.jsx(HeaderBase, {
2566
2562
  navSlot: jsxRuntime.jsxs(jsxRuntime.Fragment, {
2567
2563
  children: [ jsxRuntime.jsx(ShowFromTweakLarge, {
@@ -2572,7 +2568,7 @@ var getApplications = function() {
2572
2568
  children: jsxRuntime.jsx(HamburgerMenu, {
2573
2569
  handleApplyNowClick: handleApplyNow,
2574
2570
  application: application,
2575
- teamMember: latestTeamMember,
2571
+ teamMember: customerOwner,
2576
2572
  navOptions: navOptions,
2577
2573
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel()
2578
2574
  })
@@ -2582,7 +2578,7 @@ var getApplications = function() {
2582
2578
  handleApplyNowClick: handleApplyNow,
2583
2579
  application: application,
2584
2580
  session: session,
2585
- teamMember: latestTeamMember,
2581
+ customerOwner: customerOwner,
2586
2582
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
2587
2583
  onLogout: onLogout
2588
2584
  })
@@ -544,12 +544,13 @@ var getEnvFromHostname = hostname => {
544
544
  var RenderChatOrSideBar = _ref => {
545
545
  var {
546
546
  openCommPanel = () => {},
547
- teamMember,
547
+ customerOwner,
548
548
  dashboardVariant,
549
549
  hasUnreadMessages
550
550
  } = _ref;
551
+ console.log('customerOwner:', customerOwner);
551
552
  var brand = getBrandFromHostname();
552
- var primaryLabel = teamMember !== null && teamMember !== void 0 && teamMember.firstName ? "Talk to ".concat(teamMember.firstName) : brand === 'aussie' ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
553
+ var primaryLabel = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : brand === 'aussie' ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
553
554
  return /*#__PURE__*/jsx(TalkExpertAction, {
554
555
  dashboardVariant: dashboardVariant,
555
556
  size: "sm",
@@ -586,18 +587,17 @@ var RenderDesktopAction = _ref2 => {
586
587
  showTalkToExpertCta = true,
587
588
  showBookanAppointmentCta = true,
588
589
  openCommPanel = () => {},
589
- teamMember,
590
- hasUnreadMessages,
591
- utmCampaign
590
+ customerOwner,
591
+ hasUnreadMessages
592
592
  } = _ref2;
593
593
  var brand = getBrandFromHostname();
594
594
  var env = getEnvFromHostname((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname);
595
595
  var signInURL = getSignInURL(brand, env, (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$location = _window2.location) === null || _window2$location === void 0 ? void 0 : _window2$location.href);
596
596
  var isDomain = brand === Brand.Domain;
597
597
  var path = isDomain ? PATH_DOMAIN : PATH_LENDI;
598
- var renderSecondaryBtn = (utmCampaign, isAuthenticated, showBookanAppointmentCta, showContinueAction) => {
598
+ var renderSecondaryBtn = (isAuthenticated, showBookanAppointmentCta, showContinueAction) => {
599
599
  return /*#__PURE__*/jsxs(Fragment, {
600
- children: [(utmCampaign || showContinueAction) && isAuthenticated && /*#__PURE__*/jsx(SecondaryAction, {
600
+ children: [showContinueAction && isAuthenticated && /*#__PURE__*/jsx(SecondaryAction, {
601
601
  size: "sm",
602
602
  variant: 'emphasis',
603
603
  href: continueURL,
@@ -612,7 +612,7 @@ var RenderDesktopAction = _ref2 => {
612
612
  },
613
613
  "aria-label": continueURL,
614
614
  children: LABEL_CONTINUE
615
- }), (utmCampaign || showContinueAction) && !isAuthenticated && /*#__PURE__*/jsx(SecondaryAction, {
615
+ }), showContinueAction && !isAuthenticated && /*#__PURE__*/jsx(SecondaryAction, {
616
616
  size: "sm",
617
617
  variant: 'primary',
618
618
  href: signInURL,
@@ -627,7 +627,7 @@ var RenderDesktopAction = _ref2 => {
627
627
  },
628
628
  "aria-label": signInURL,
629
629
  children: LABEL_SIGN_IN
630
- }), !(utmCampaign || showContinueAction) && showBookanAppointmentCta && /*#__PURE__*/jsx(SecondaryAction, {
630
+ }), !showContinueAction && showBookanAppointmentCta && /*#__PURE__*/jsx(SecondaryAction, {
631
631
  size: "sm",
632
632
  variant: 'primary',
633
633
  href: "".concat(path).concat(ROUTE_BOOK_APPOINTMENT),
@@ -648,10 +648,10 @@ var RenderDesktopAction = _ref2 => {
648
648
  return /*#__PURE__*/jsxs(DesktopActionsWrapper, {
649
649
  children: [showTalkToExpertCta && /*#__PURE__*/jsx(RenderChatOrSideBar, {
650
650
  openCommPanel: openCommPanel,
651
- teamMember: teamMember,
651
+ customerOwner: customerOwner,
652
652
  dashboardVariant: dashboardVariant,
653
653
  hasUnreadMessages: hasUnreadMessages
654
- }), renderSecondaryBtn(utmCampaign, isAuthenticated, showBookanAppointmentCta, showContinueAction), isAuthenticated && /*#__PURE__*/jsx(LogoutComponent, {})]
654
+ }), renderSecondaryBtn(isAuthenticated, showBookanAppointmentCta, showContinueAction), isAuthenticated && /*#__PURE__*/jsx(LogoutComponent, {})]
655
655
  });
656
656
  };
657
657
  var RenderDesktopAction$1 = RenderDesktopAction;
@@ -667,22 +667,21 @@ var RenderMobileAction = _ref => {
667
667
  var {
668
668
  isAuthenticated,
669
669
  continueURL,
670
- teamMember,
670
+ customerOwner,
671
671
  openCommPanel = () => {},
672
672
  showContinueAction = false,
673
673
  showTalkToExpertCta = true,
674
- hasUnreadMessages,
675
- utmCampaign
674
+ hasUnreadMessages
676
675
  } = _ref;
677
676
  var {
678
677
  isTransparent
679
678
  } = useNavbarBaseContext();
680
679
  var needToContinue = () => isAuthenticated && showContinueAction;
681
- var needToSignIn = () => !isAuthenticated && utmCampaign;
680
+ var needToSignIn = () => !isAuthenticated;
682
681
  var brand = getBrandFromHostname();
683
682
  var env = getEnvFromHostname((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname);
684
683
  var signInURL = getSignInURL(brand, env, (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$location = _window2.location) === null || _window2$location === void 0 ? void 0 : _window2$location.href);
685
- var primaryLabel = teamMember !== null && teamMember !== void 0 && teamMember.firstName ? "Talk to ".concat(teamMember.firstName) : needToContinue() ? CONTACT_US : brand === 'aussie' ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
684
+ var primaryLabel = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : needToContinue() ? CONTACT_US : brand === 'aussie' ? LABEL_TALK_TO_A_BROKER : LABEL_TALK_TO_EXPERT;
686
685
  return /*#__PURE__*/jsxs(MobileActionsWrapper, {
687
686
  children: [showTalkToExpertCta && /*#__PURE__*/jsx(TalkExpertAction, {
688
687
  size: "sm",
@@ -1173,7 +1172,6 @@ var ChatLink = _ref => {
1173
1172
  var {
1174
1173
  disabled,
1175
1174
  onChatLinkClick,
1176
- teamMember,
1177
1175
  hasNew,
1178
1176
  isChatOpen
1179
1177
  } = _ref;
@@ -1188,11 +1186,7 @@ var ChatLink = _ref => {
1188
1186
  }), /*#__PURE__*/jsxs(ChatBodyWrapper, {
1189
1187
  children: [/*#__PURE__*/jsx(BodyWrapper, {
1190
1188
  size: "md",
1191
- children: teamMember && !disabled ? /*#__PURE__*/jsxs(Fragment, {
1192
- children: ["Chat with ", teamMember.firstName]
1193
- }) : /*#__PURE__*/jsx(Fragment, {
1194
- children: "Chat online"
1195
- })
1189
+ children: "Chat Now"
1196
1190
  }), /*#__PURE__*/jsx(StyledChevronRightIcon, {
1197
1191
  color: getColour$1('interaction', 'main'),
1198
1192
  height: "24px",
@@ -1228,7 +1222,6 @@ var SidePanel = _ref => {
1228
1222
  isChatOpen: isChatOpen,
1229
1223
  disabled: disabled,
1230
1224
  onChatLinkClick: onChatLinkClick,
1231
- teamMember: teamMember,
1232
1225
  hasNew: hasNew
1233
1226
  })]
1234
1227
  })]
@@ -1550,8 +1543,8 @@ props => {
1550
1543
  isCommPanelOpen,
1551
1544
  openCommPanel,
1552
1545
  closeCommPanel,
1553
- teamMember,
1554
- channelId
1546
+ channelId,
1547
+ customerOwner
1555
1548
  } = useBootstrappedChatState();
1556
1549
  var [hasUnread, setHasUnread] = React.useState(false);
1557
1550
  var [isOtherUserOnline, setIsOtherUserOnline] = React.useState(false);
@@ -1569,7 +1562,7 @@ props => {
1569
1562
  hasUnread: hasUnread,
1570
1563
  closeCommPanel: closeCommPanel,
1571
1564
  openCommPanel: openCommPanel,
1572
- latestTeamMember: teamMember
1565
+ customerOwner: customerOwner
1573
1566
  })), /*#__PURE__*/jsx(CommPanelWrapper, _objectSpread2(_objectSpread2({
1574
1567
  isOpen: isCommPanelOpen,
1575
1568
  handleClose: closeCommPanel,
@@ -1605,12 +1598,10 @@ var SimpleNavbarComponent = _ref => {
1605
1598
  hasUnread,
1606
1599
  closeCommPanel,
1607
1600
  openCommPanel: _openCommPanel,
1608
- latestTeamMember
1601
+ customerOwner
1609
1602
  } = _ref;
1610
1603
  var session = useSession();
1611
1604
  var isAuthenticated = session.status === Status.Authenticated;
1612
- var hasWindow = typeof window !== 'undefined';
1613
- var utmCampaign = hasWindow ? new URLSearchParams(window.location.search).get('utm_campaign') : null;
1614
1605
  return /*#__PURE__*/jsxs(NavbarWrapper, {
1615
1606
  isTransparent: useTransparent,
1616
1607
  isAuthenticated: isAuthenticated,
@@ -1631,10 +1622,9 @@ var SimpleNavbarComponent = _ref => {
1631
1622
  showBookanAppointmentCta: showBookanAppointmentCta,
1632
1623
  isAuthenticated: isAuthenticated,
1633
1624
  continueURL: continueURL,
1634
- utmCampaign: utmCampaign,
1635
1625
  showContinueAction: showContinueAction,
1636
1626
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
1637
- teamMember: latestTeamMember,
1627
+ customerOwner: customerOwner,
1638
1628
  hasUnreadMessages: hasUnread
1639
1629
  })
1640
1630
  })
@@ -2373,7 +2363,7 @@ var onClickOption = (label, setCurrentSelected) => {
2373
2363
  };
2374
2364
  var MenuOptions$1 = MenuOptions;
2375
2365
 
2376
- var _excluded$8 = ["useTransparent", "homeURL", "params", "continueURL", "onLogout", "application", "showContinueAction", "showTalkToExpertCta", "hideDashboardItem", "hideManageApplicationsItem", "isCommPanelOpen", "hasUnread", "closeCommPanel", "openCommPanel", "latestTeamMember"];
2366
+ var _excluded$8 = ["useTransparent", "homeURL", "params", "continueURL", "onLogout", "application", "showContinueAction", "showTalkToExpertCta", "hideDashboardItem", "hideManageApplicationsItem", "isCommPanelOpen", "hasUnread", "closeCommPanel", "openCommPanel", "customerOwner"];
2377
2367
  var MultiNavbarComponent = _ref => {
2378
2368
  var {
2379
2369
  // Public props
@@ -2392,7 +2382,7 @@ var MultiNavbarComponent = _ref => {
2392
2382
  hasUnread,
2393
2383
  closeCommPanel,
2394
2384
  openCommPanel: _openCommPanel,
2395
- latestTeamMember
2385
+ customerOwner
2396
2386
  } = _ref,
2397
2387
  otherProps = _objectWithoutProperties(_ref, _excluded$8);
2398
2388
  var session = useSession();
@@ -2438,7 +2428,7 @@ var MultiNavbarComponent = _ref => {
2438
2428
  continueURL: continueURL,
2439
2429
  showContinueAction: showContinueAction,
2440
2430
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
2441
- teamMember: latestTeamMember,
2431
+ customerOwner: customerOwner,
2442
2432
  hasUnreadMessages: hasUnread
2443
2433
  })
2444
2434
  })
@@ -3163,9 +3153,9 @@ var SlideoutMenu = _ref6 => {
3163
3153
  var TalkToExpertButton = _ref => {
3164
3154
  var {
3165
3155
  openCommPanel,
3166
- teamMember
3156
+ customerOwner
3167
3157
  } = _ref;
3168
- var buttonText = teamMember !== null && teamMember !== void 0 && teamMember.firstName ? "Talk to ".concat(teamMember.firstName) : 'Talk to a broker';
3158
+ var buttonText = customerOwner !== null && customerOwner !== void 0 && customerOwner.firstName ? "Talk to ".concat(customerOwner.firstName) : 'Talk to a broker';
3169
3159
  var handleClick = () => {
3170
3160
  openCommPanel();
3171
3161
  var event = {
@@ -3252,7 +3242,7 @@ var _templateObject;
3252
3242
  var HamburgerCtaBlock = _ref => {
3253
3243
  var {
3254
3244
  handleApplyNowClick,
3255
- teamMember,
3245
+ customerOwner,
3256
3246
  application,
3257
3247
  openCommPanel
3258
3248
  } = _ref;
@@ -3263,7 +3253,7 @@ var HamburgerCtaBlock = _ref => {
3263
3253
  handleApplyNowClick: handleApplyNowClick,
3264
3254
  application: application
3265
3255
  }), /*#__PURE__*/jsx(TalkToExpertButton, {
3266
- teamMember: teamMember,
3256
+ customerOwner: customerOwner,
3267
3257
  openCommPanel: openCommPanel
3268
3258
  })]
3269
3259
  })
@@ -3721,7 +3711,7 @@ var HeaderWithContext = _ref => {
3721
3711
  isCommPanelOpen,
3722
3712
  closeCommPanel,
3723
3713
  openCommPanel: _openCommPanel,
3724
- latestTeamMember
3714
+ customerOwner
3725
3715
  } = _ref;
3726
3716
  var session = useSession();
3727
3717
  var application = useApplication(session);
@@ -3735,7 +3725,7 @@ var HeaderWithContext = _ref => {
3735
3725
  children: /*#__PURE__*/jsx(HamburgerMenu, {
3736
3726
  handleApplyNowClick: handleApplyNow,
3737
3727
  application: application,
3738
- teamMember: latestTeamMember,
3728
+ teamMember: customerOwner,
3739
3729
  navOptions: navOptions,
3740
3730
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel()
3741
3731
  })
@@ -3745,7 +3735,7 @@ var HeaderWithContext = _ref => {
3745
3735
  handleApplyNowClick: handleApplyNow,
3746
3736
  application: application,
3747
3737
  session: session,
3748
- teamMember: latestTeamMember,
3738
+ customerOwner: customerOwner,
3749
3739
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
3750
3740
  onLogout: onLogout
3751
3741
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lendi/navbar",
3
3
  "access": "restricted",
4
- "version": "7.19.0",
4
+ "version": "7.21.0",
5
5
  "license": "ISC",
6
6
  "source": "src/index.tsx",
7
7
  "main": "dist/navbar.cjs.js",
@@ -40,7 +40,7 @@
40
40
  "@lendi-ui/typography": "^5.13.11-beta.0",
41
41
  "@lendi-ui/utils": "^6.0.2-beta.1",
42
42
  "@lendi/analytics": "^4.6.0",
43
- "@lendi/chat": "^1.5.0",
43
+ "@lendi/chat": "^1.7.0",
44
44
  "@lendi/lala-utils": "^11.2.0",
45
45
  "@lendi/launchdarkly": "^0.1.7",
46
46
  "@lendi/lendigroup-leads-library": "^3.2.1",